summaryrefslogtreecommitdiff
path: root/js/common.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/common.js')
-rwxr-xr-xjs/common.js38
1 files changed, 29 insertions, 9 deletions
diff --git a/js/common.js b/js/common.js
index 427e3034c..5b2812be6 100755
--- a/js/common.js
+++ b/js/common.js
@@ -56,7 +56,23 @@ const Lists = {
if (row)
checked ? row.addClassName("Selected") : row.removeClassName("Selected");
- }
+ },
+ select: function(elemId, selected) {
+ $(elemId).select("li").each((row) => {
+ const checkNode = row.select(".dijitCheckBox,input[type=checkbox]")[0];
+ if (checkNode) {
+ const widget = dijit.getEnclosingWidget(checkNode);
+
+ if (widget) {
+ widget.attr("checked", selected);
+ } else {
+ checkNode.checked = selected;
+ }
+
+ this.onRowChecked(widget);
+ }
+ });
+ },
};
// noinspection JSUnusedGlobalSymbols
@@ -154,8 +170,7 @@ const Notify = {
}
let msgfmt = "<span class=\"msg\">%s</span>".replace("%s", __(msg));
- let icon = false;
-
+ let icon = "";
notify.className = "notify";
@@ -164,23 +179,28 @@ const Notify = {
switch (kind) {
case this.KIND_INFO:
notify.addClassName("notify_info")
- icon = App.getInitParam("icon_information");
+ icon = "notifications";
break;
case this.KIND_ERROR:
notify.addClassName("notify_error");
- icon = App.getInitParam("icon_alert");
+ icon = "error";
break;
case this.KIND_PROGRESS:
notify.addClassName("notify_progress");
icon = App.getInitParam("icon_indicator_white")
break;
+ default:
+ icon = "notifications";
}
- if (icon) msgfmt = "<span><img src=\"%s\"></span>".replace("%s", icon) + msgfmt;
+ if (icon)
+ if (icon.indexOf("data:image") != -1)
+ msgfmt = "<img src=\"%s\">".replace("%s", icon) + msgfmt;
+ else
+ msgfmt = "<i class='material-icons icon-notify'>%s</i>".replace("%s", icon) + msgfmt;
- msgfmt += (" <span><img src=\"%s\" class='close' title=\"" +
- __("Click to close") + "\" onclick=\"Notify.close()\"></span>")
- .replace("%s", App.getInitParam("icon_cross"));
+ msgfmt += "<i class='material-icons icon-close' title=\"" +
+ __("Click to close") + "\" onclick=\"Notify.close()\">close</i>";
notify.innerHTML = msgfmt;
notify.addClassName("visible");