mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 15:25:59 +00:00
* customizeCSS: client dialog
* remove hardcoded width from most dialogs (move to css) * add helper to easily get dialog from its widget * rework some dialog buttons to use current object instead of calling dialog by name
This commit is contained in:
@@ -1,16 +1,13 @@
|
||||
/* global dijit, Plugins, __ */
|
||||
|
||||
Plugins.Psql_Trgm = {
|
||||
showRelated: function (id) {
|
||||
const query = "backend.php?op=pluginhandler&plugin=af_psql_trgm&method=showrelated¶m=" + encodeURIComponent(id);
|
||||
|
||||
if (dijit.byId("trgmRelatedDlg"))
|
||||
dijit.byId("trgmRelatedDlg").destroyRecursive();
|
||||
|
||||
dialog = new dijit.Dialog({
|
||||
id: "trgmRelatedDlg",
|
||||
const dialog = new dijit.Dialog({
|
||||
title: __("Related articles"),
|
||||
style: "width: 600px",
|
||||
execute: function () {
|
||||
|
||||
//
|
||||
},
|
||||
href: query,
|
||||
});
|
||||
|
||||
@@ -108,9 +108,9 @@ class Af_Psql_Trgm extends Plugin {
|
||||
|
||||
}
|
||||
|
||||
print "<footer class='text-center'>";
|
||||
print "<button dojoType='dijit.form.Button' onclick=\"dijit.byId('trgmRelatedDlg').hide()\">".__('Close this window')."</button>";
|
||||
print "</footer>";
|
||||
print "<footer class='text-center'>
|
||||
<button dojoType='dijit.form.Button' type='submit' class='alt-primary'>".__('Close this window')."</button>
|
||||
</footer>";
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ Plugins.Mail = {
|
||||
const dialog = new dijit.Dialog({
|
||||
id: "emailArticleDlg",
|
||||
title: __("Forward article by email"),
|
||||
style: "width: 600px",
|
||||
execute: function () {
|
||||
if (this.validate()) {
|
||||
xhrJson("backend.php", this.attr('value'), (reply) => {
|
||||
|
||||
@@ -19,7 +19,6 @@ Plugins.Mailto = {
|
||||
const dialog = new dijit.Dialog({
|
||||
id: "emailArticleDlg",
|
||||
title: __("Forward article by email"),
|
||||
style: "width: 600px",
|
||||
href: query});
|
||||
|
||||
dialog.show();
|
||||
|
||||
@@ -8,7 +8,6 @@ Plugins.Note = {
|
||||
const dialog = new dijit.Dialog({
|
||||
id: "editNoteDlg",
|
||||
title: __("Edit article note"),
|
||||
style: "width: 600px",
|
||||
execute: function () {
|
||||
if (this.validate()) {
|
||||
Notify.progress("Saving article note...", true);
|
||||
|
||||
@@ -123,13 +123,13 @@ class Share extends Plugin {
|
||||
|
||||
print "<footer class='text-center'>";
|
||||
|
||||
print "<button dojoType='dijit.form.Button' onclick=\"return dijit.byId('shareArticleDlg').unshare()\">".
|
||||
print "<button dojoType='dijit.form.Button' onclick=\"return App.dialogOf(this).unshare()\">".
|
||||
__('Unshare article')."</button>";
|
||||
|
||||
print "<button dojoType='dijit.form.Button' onclick=\"return dijit.byId('shareArticleDlg').newurl()\">".
|
||||
print "<button dojoType='dijit.form.Button' onclick=\"return App.dialogOf(this).newurl()\">".
|
||||
__('Generate new URL')."</button>";
|
||||
|
||||
print "<button dojoType='dijit.form.Button' onclick=\"return dijit.byId('shareArticleDlg').hide()\">".
|
||||
print "<button dojoType='dijit.form.Button' type='submit' class='alt-primary'>".
|
||||
__('Close this window')."</button>";
|
||||
|
||||
print "</footer>";
|
||||
|
||||
@@ -8,7 +8,6 @@ Plugins.Share = {
|
||||
const dialog = new dijit.Dialog({
|
||||
id: "shareArticleDlg",
|
||||
title: __("Share article by URL"),
|
||||
style: "width: 600px",
|
||||
newurl: function () {
|
||||
if (confirm(__("Generate new share URL for this article?"))) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user