Support for no javascript
This commit is contained in:
27
js/import.js
27
js/import.js
@@ -5,13 +5,12 @@
|
|||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$(document).ready(function() {
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Toggles the hiding and showing of each plugin's options
|
* Toggles the hiding and showing of each plugin's options
|
||||||
* according to the currently selected plugin from the dropdown list
|
* according to the currently selected plugin from the dropdown list
|
||||||
*/
|
*/
|
||||||
function changePluginOpts() {
|
function changePluginOpts() {
|
||||||
$(".format_specific_options").each(function() {
|
$(".format_specific_options").each(function() {
|
||||||
$(this).hide();
|
$(this).hide();
|
||||||
});
|
});
|
||||||
@@ -22,13 +21,13 @@ $(document).ready(function() {
|
|||||||
} else {
|
} else {
|
||||||
$("#import_notification").text("");
|
$("#import_notification").text("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Toggles the hiding and showing of each plugin's options and sets the selected value
|
* Toggles the hiding and showing of each plugin's options and sets the selected value
|
||||||
* in the plugin dropdown list according to the format of the selected file
|
* in the plugin dropdown list according to the format of the selected file
|
||||||
*/
|
*/
|
||||||
function matchFile(fname) {
|
function matchFile(fname) {
|
||||||
fname_array = fname.toLowerCase().split(".");
|
fname_array = fname.toLowerCase().split(".");
|
||||||
len = fname_array.length;
|
len = fname_array.length;
|
||||||
if(len != 0) {
|
if(len != 0) {
|
||||||
@@ -49,8 +48,12 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
changePluginOpts();
|
changePluginOpts();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$(document).ready(function() {
|
||||||
|
// Initially display the options for the selected plugin
|
||||||
|
changePluginOpts();
|
||||||
|
|
||||||
|
// Whenever the selected plugin changes, change the options displayed
|
||||||
$("#plugins").change(function() {
|
$("#plugins").change(function() {
|
||||||
changePluginOpts();
|
changePluginOpts();
|
||||||
});
|
});
|
||||||
@@ -75,4 +78,12 @@ $(document).ready(function() {
|
|||||||
$("#radio_local_import_file").attr('checked', 'checked');
|
$("#radio_local_import_file").attr('checked', 'checked');
|
||||||
$("#radio_import_file").removeAttr('checked');
|
$("#radio_import_file").removeAttr('checked');
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
/**
|
||||||
|
* Set up the interface for Javascript-enabled browsers since the default is for
|
||||||
|
* Javascript-disabled browsers
|
||||||
|
*/
|
||||||
|
$("#scroll_to_options_msg").hide();
|
||||||
|
$(".format_specific_options").css({ "border": 0, "margin": 0, "padding": 0 });
|
||||||
|
$(".format_specific_options h3").remove();
|
||||||
|
});
|
Reference in New Issue
Block a user