mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-23 23:21:29 +00:00
pref-labels: drop scriptaculous inplace editor
This commit is contained in:
@@ -252,10 +252,22 @@
|
|||||||
print_color_picker($id);
|
print_color_picker($id);
|
||||||
print "</div>";
|
print "</div>";
|
||||||
|
|
||||||
|
print "<span dojoType=\"dijit.InlineEditBox\"
|
||||||
print "<span class='prefsLabelEntry'
|
width=\"300px\" autoSave=\"false\"
|
||||||
id=\"LILT-".$line["id"]."\">" . $line["caption"] .
|
label-id=\"".$line["id"]."\">" . $line["caption"] .
|
||||||
"</span>";
|
"<script type=\"dojo/method\" event=\"onChange\" args=\"item\">
|
||||||
|
var elem = this;
|
||||||
|
dojo.xhrPost({
|
||||||
|
url: 'backend.php',
|
||||||
|
content: {op: 'pref-labels', subop: 'save',
|
||||||
|
value: this.value,
|
||||||
|
id: this.srcNodeRef.getAttribute('label-id')},
|
||||||
|
load: function(response) {
|
||||||
|
elem.attr('value', response);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</span>";
|
||||||
|
|
||||||
print "</td>";
|
print "</td>";
|
||||||
|
|
||||||
|
|||||||
28
prefs.js
28
prefs.js
@@ -42,29 +42,6 @@ function filterlist_callback2(transport) {
|
|||||||
remove_splash();
|
remove_splash();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* function init_label_inline_editor() {
|
|
||||||
try {
|
|
||||||
if ($("prefLabelList")) {
|
|
||||||
var elems = $("prefLabelList").getElementsByTagName("SPAN");
|
|
||||||
|
|
||||||
for (var i = 0; i < elems.length; i++) {
|
|
||||||
if (elems[i].id && elems[i].id.match("LILT-")) {
|
|
||||||
|
|
||||||
var id = elems[i].id.replace("LILT-", "");
|
|
||||||
|
|
||||||
new Ajax.InPlaceEditor(elems[i],
|
|
||||||
'backend.php?op=pref-labels&subop=save&id=' + id,
|
|
||||||
{cols: 20, rows: 1});
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch (e) {
|
|
||||||
exception_error("init_label_inline_editor", e);
|
|
||||||
}
|
|
||||||
} */
|
|
||||||
|
|
||||||
function labellist_callback2(transport) {
|
function labellist_callback2(transport) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -72,8 +49,6 @@ function labellist_callback2(transport) {
|
|||||||
dijit.byId('labelConfigTab').attr('content', transport.responseText);
|
dijit.byId('labelConfigTab').attr('content', transport.responseText);
|
||||||
closeInfoBox();
|
closeInfoBox();
|
||||||
|
|
||||||
//init_label_inline_editor();
|
|
||||||
|
|
||||||
notify("");
|
notify("");
|
||||||
remove_splash();
|
remove_splash();
|
||||||
|
|
||||||
@@ -1169,9 +1144,10 @@ function init() {
|
|||||||
dojo.require("dojo.data.ItemFileWriteStore");
|
dojo.require("dojo.data.ItemFileWriteStore");
|
||||||
dojo.require("dijit.Tree");
|
dojo.require("dijit.Tree");
|
||||||
dojo.require("dijit.form.DropDownButton");
|
dojo.require("dijit.form.DropDownButton");
|
||||||
|
dojo.require("dijit.form.Form");
|
||||||
dojo.require("dijit.Menu");
|
dojo.require("dijit.Menu");
|
||||||
dojo.require("dijit.tree.dndSource");
|
dojo.require("dijit.tree.dndSource");
|
||||||
dojo.require("dijit.TooltipDialog");
|
dojo.require("dijit.InlineEditBox");
|
||||||
|
|
||||||
dojo.registerModulePath("lib", "..");
|
dojo.registerModulePath("lib", "..");
|
||||||
dojo.registerModulePath("fox", "../..");
|
dojo.registerModulePath("fox", "../..");
|
||||||
|
|||||||
Reference in New Issue
Block a user