Fixed the javascript for hide the dinamic macros with this property setted. TICKET #1545

This commit is contained in:
mdtrooper 2014-11-06 16:43:45 +01:00
parent 98de5e7401
commit a79af4c68c
1 changed files with 17 additions and 1 deletions

View File

@ -630,7 +630,23 @@ function add_macro_field(macro, row_model_id) {
// Change the text box id and value
$('#'+row_id).children().eq(1).children().attr('id','text-'+macro_macro);
$('#'+row_id).children().eq(1).children().attr('name',macro_macro);
if (macro['hide']) {
macro_field_hide = false;
if (typeof(macro['hide']) == "string") {
if (macro['hide'].length == 0) {
macro_field_hide = false;
}
else {
if (parseInt(macro['hide'])) {
macro_field_hide = true;
}
else {
macro_field_hide = false;
}
}
}
if (macro_field_hide) {
$('#'+row_id).children().eq(1).children().attr('type','password');
}
$('#'+row_id).children().eq(1).children().val(macro_value);