]> git.wh0rd.org Git - tt-rss.git/commitdiff
pref-labels: drop scriptaculous inplace editor
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 18 Nov 2010 13:30:24 +0000 (16:30 +0300)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 18 Nov 2010 13:32:25 +0000 (16:32 +0300)
modules/pref-labels.php
prefs.js

index cc92985a9e9ba0a62a71ef7ce3074cdc69a1bfe2..467928416a44c929f6b8a89b96a38fa1f1b2661d 100644 (file)
                                print_color_picker($id);
                                print "</div>";
 
-
-                               print "<span class='prefsLabelEntry' 
-                                       id=\"LILT-".$line["id"]."\">" . $line["caption"] . 
-                                       "</span>";
+                               print "<span dojoType=\"dijit.InlineEditBox\" 
+                                       width=\"300px\" autoSave=\"false\"
+                                       label-id=\"".$line["id"]."\">" . $line["caption"] . 
+                                       "<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>";
 
index f1e38b6180e749f05d154371fdd63b1658d7a728..2041e3aec43fea3eb553cfba18c50068859ed8a3 100644 (file)
--- a/prefs.js
+++ b/prefs.js
@@ -42,29 +42,6 @@ function filterlist_callback2(transport) {
        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) {
 
        try {
@@ -72,8 +49,6 @@ function labellist_callback2(transport) {
                dijit.byId('labelConfigTab').attr('content', transport.responseText); 
                closeInfoBox();
 
-               //init_label_inline_editor();
-       
                notify("");
                remove_splash();
 
@@ -1169,9 +1144,10 @@ function init() {
                dojo.require("dojo.data.ItemFileWriteStore");
                dojo.require("dijit.Tree");
                dojo.require("dijit.form.DropDownButton");
+               dojo.require("dijit.form.Form");
                dojo.require("dijit.Menu");
                dojo.require("dijit.tree.dndSource");
-               dojo.require("dijit.TooltipDialog");
+               dojo.require("dijit.InlineEditBox");
 
                dojo.registerModulePath("lib", "..");
                dojo.registerModulePath("fox", "../..");