Commit 15525158 authored by Ryan Herbert's avatar Ryan Herbert
Browse files

database.js reimplement of pre_process_onChange

makes use of JQuery methods rather than javascript attributes. This
allows us to override all display attributes and css.
parent 672091d6
......@@ -333,18 +333,13 @@ Database.prototype = {
pre_process_onChange : function (field) {
var value = field.value;
for (var i=0; i<field.options.length; i++){
var option = field.options[i];
if (value == option.value){
if (option.getAttribute("required_files") == "1"){
$(".file_2").attr('hidden', true);
$(".upload_file_2").val("");
}else{
$(".file_2").attr('hidden', false);
}
}
}
var $option = $(field).find(":selected");
if ($option.attr('required_files') == "1"){
$(".file_2").hide();
$(".upload_file").val("");
}else{
$(".file_2").show();
}
},
upload_file_onChange : function (target_id, value) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment