mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-04 15:15:42 +00:00 
			
		
		
		
	js linting fixes
This commit is contained in:
		@@ -294,4 +294,4 @@ function loadBrandIcon(element, name) {
 | 
				
			|||||||
// Convenience function to determine if an element exists
 | 
					// Convenience function to determine if an element exists
 | 
				
			||||||
$.fn.exists = function() {
 | 
					$.fn.exists = function() {
 | 
				
			||||||
    return this.length !== 0;
 | 
					    return this.length !== 0;
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,6 +3,9 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
/* exported
 | 
					/* exported
 | 
				
			||||||
    attachNavCallbacks,
 | 
					    attachNavCallbacks,
 | 
				
			||||||
 | 
					    enableNavBar,
 | 
				
			||||||
 | 
					    initNavTree,
 | 
				
			||||||
 | 
					    loadTree,
 | 
				
			||||||
    onPanelLoad,
 | 
					    onPanelLoad,
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -132,7 +135,7 @@ function loadTree(url, tree, options={}) {
 | 
				
			|||||||
        data = options.data;
 | 
					        data = options.data;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    var key = "inventree-sidenav-items-";
 | 
					    var key = 'inventree-sidenav-items-';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (options.name) {
 | 
					    if (options.name) {
 | 
				
			||||||
        key += options.name;
 | 
					        key += options.name;
 | 
				
			||||||
@@ -143,7 +146,7 @@ function loadTree(url, tree, options={}) {
 | 
				
			|||||||
        type: 'get',
 | 
					        type: 'get',
 | 
				
			||||||
        dataType: 'json',
 | 
					        dataType: 'json',
 | 
				
			||||||
        data: data,
 | 
					        data: data,
 | 
				
			||||||
        success: function (response) {
 | 
					        success: function(response) {
 | 
				
			||||||
            if (response.tree) {
 | 
					            if (response.tree) {
 | 
				
			||||||
                $(tree).treeview({
 | 
					                $(tree).treeview({
 | 
				
			||||||
                    data: response.tree,
 | 
					                    data: response.tree,
 | 
				
			||||||
@@ -152,7 +155,7 @@ function loadTree(url, tree, options={}) {
 | 
				
			|||||||
                });
 | 
					                });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if (localStorage.getItem(key)) {
 | 
					                if (localStorage.getItem(key)) {
 | 
				
			||||||
                    var saved_exp = localStorage.getItem(key).split(",");
 | 
					                    var saved_exp = localStorage.getItem(key).split(',');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    // Automatically expand the desired notes
 | 
					                    // Automatically expand the desired notes
 | 
				
			||||||
                    for (var q = 0; q < saved_exp.length; q++) {
 | 
					                    for (var q = 0; q < saved_exp.length; q++) {
 | 
				
			||||||
@@ -177,8 +180,8 @@ function loadTree(url, tree, options={}) {
 | 
				
			|||||||
                });
 | 
					                });
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        error: function (xhr, ajaxOptions, thrownError) {
 | 
					        error: function(xhr, ajaxOptions, thrownError) {
 | 
				
			||||||
            //TODO
 | 
					            // TODO
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -292,9 +295,9 @@ function enableNavbar(options) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    // Extract the saved width for this element
 | 
					    // Extract the saved width for this element
 | 
				
			||||||
    $(navId).animate({
 | 
					    $(navId).animate({
 | 
				
			||||||
        width: '45px',
 | 
					        'width': '45px',
 | 
				
			||||||
        'min-width': '45px',
 | 
					        'min-width': '45px',
 | 
				
			||||||
        display: 'block',
 | 
					        'display': 'block',
 | 
				
			||||||
    }, 50, function() {
 | 
					    }, 50, function() {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // Make the navbar resizable
 | 
					        // Make the navbar resizable
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -144,7 +144,7 @@ function makeBuildOutputButtons(output_id, build_info, options={}) {
 | 
				
			|||||||
        'button-output-complete',
 | 
					        'button-output-complete',
 | 
				
			||||||
        output_id,
 | 
					        output_id,
 | 
				
			||||||
        '{% trans "Complete build output" %}',
 | 
					        '{% trans "Complete build output" %}',
 | 
				
			||||||
    )
 | 
					    );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Add a button to "delete" this build output
 | 
					    // Add a button to "delete" this build output
 | 
				
			||||||
    html += makeIconButton(
 | 
					    html += makeIconButton(
 | 
				
			||||||
@@ -344,7 +344,7 @@ function completeBuildOutputs(build_id, outputs, options={}) {
 | 
				
			|||||||
                        }
 | 
					                        }
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            )
 | 
					            );
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user