Commit b2b2d283 authored by Boris Kocherov's avatar Boris Kocherov

hide button by style attribute

parent b4b9eb50
...@@ -420,7 +420,10 @@ ...@@ -420,7 +420,10 @@
"ui-shadow-inset ui-btn ui-btn-inline ui-corner-all" + "ui-shadow-inset ui-btn ui-btn-inline ui-corner-all" +
" ui-btn-icon-notext ui-icon-btn ui-icon-plus ui-input-btn"); " ui-btn-icon-notext ui-icon-btn ui-icon-plus ui-input-btn");
input.type = "button"; input.type = "button";
input.hidden = !ret; input.title = title;
if (!ret) {
input.setAttribute("style", "display: none;");
}
gadget.props.add_buttons.push({ gadget.props.add_buttons.push({
element: input, element: input,
event: function () { event: function () {
...@@ -432,7 +435,11 @@ ...@@ -432,7 +435,11 @@
return true; return true;
}) })
.push(function (r) { .push(function (r) {
input.hidden = !r; if (!r) {
input.setAttribute("style", "display: none;");
} else {
input.removeAttribute("style");
}
return checkValidityAndNotifyChange(gadget); return checkValidityAndNotifyChange(gadget);
}); });
}, },
...@@ -445,7 +452,11 @@ ...@@ -445,7 +452,11 @@
return true; return true;
}) })
.push(function (r) { .push(function (r) {
input.hidden = !r; if (!r) {
input.setAttribute("style", "display: none;");
} else {
input.removeAttribute("style");
}
}); });
} }
}); });
......
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