summaryrefslogtreecommitdiff
path: root/js/CommonDialogs.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-18 21:51:18 +0300
committerAndrew Dolgov <[email protected]>2021-02-18 21:51:18 +0300
commit70fa4230268a422d0b7eef1ea223ca5cc1c14646 (patch)
treea4dd25afda189691afbdeecc2f32c4ab09969e5e /js/CommonDialogs.js
parent0b6a71f8eac719070747f22273f4bc7dee0526b6 (diff)
initial for RIP prototype/scriptaculous
Diffstat (limited to 'js/CommonDialogs.js')
-rw-r--r--js/CommonDialogs.js20
1 files changed, 7 insertions, 13 deletions
diff --git a/js/CommonDialogs.js b/js/CommonDialogs.js
index dd0d56194..40313d34f 100644
--- a/js/CommonDialogs.js
+++ b/js/CommonDialogs.js
@@ -25,7 +25,7 @@ const CommonDialogs = {
else
Feeds.reload();
- const icon = $$(".feed-editor-icon")[0];
+ const icon = App.findAll(".feed-editor-icon")[0];
if (icon)
icon.src = icon.src.replace(/\?[0-9]+$/, "?" + new Date().getTime());
@@ -36,7 +36,7 @@ const CommonDialogs = {
return false;
},
uploadFeedIcon: function() {
- const file = $("icon_file");
+ const file = App.byId("icon_file");
if (file.value.length == 0) {
alert(__("Please select an image file to upload."));
@@ -57,7 +57,7 @@ const CommonDialogs = {
else
Feeds.reload();
- const icon = $$(".feed-editor-icon")[0];
+ const icon = App.findAll(".feed-editor-icon")[0];
if (icon)
icon.src = icon.src.replace(/\?[0-9]+$/, "?" + new Date().getTime());
@@ -72,7 +72,7 @@ const CommonDialogs = {
break;
}
};
- xhr.send(new FormData($("feed_icon_upload_form")));
+ xhr.send(new FormData(App.byId("feed_icon_upload_form")));
}
return false;
@@ -165,13 +165,11 @@ const CommonDialogs = {
</form>
`,
show_error: function (msg) {
- const elem = $("fadd_error_message");
+ const elem = App.byId("fadd_error_message");
elem.innerHTML = msg;
- if (!Element.visible(elem))
- new Effect.Appear(elem);
-
+ Element.show(elem);
},
execute: function () {
if (this.validate()) {
@@ -239,7 +237,7 @@ const CommonDialogs = {
}
}
- Effect.Appear('feedDlg_feedsContainer', {duration: 0.5});
+ Element.show('feedDlg_feedsContainer');
}
break;
case 5:
@@ -463,8 +461,6 @@ const CommonDialogs = {
target.href = new_link;
target.innerHTML = new_link;
- new Effect.Highlight(target);
-
Notify.close();
} else {
@@ -528,8 +524,6 @@ const CommonDialogs = {
target.href = target.href.replace(/&key=.*$/,
"&key=" + new_link);
- new Effect.Highlight(target);
-
Notify.close();
} else {