mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-22 04:21:28 +00:00
remove scriptaculous inplace editor in feed cats dialog
This commit is contained in:
@@ -1085,10 +1085,30 @@
|
|||||||
onclick='toggleSelectRow(this);'
|
onclick='toggleSelectRow(this);'
|
||||||
type=\"checkbox\" id=\"FCCHK-$cat_id\"></td>";
|
type=\"checkbox\" id=\"FCCHK-$cat_id\"></td>";
|
||||||
|
|
||||||
print "<td><span id=\"FCATT-$cat_id\">" .
|
print "<td>";
|
||||||
$edit_title . "</span></td>";
|
|
||||||
|
|
||||||
print "</tr>";
|
# print "<span id=\"FCATT-$cat_id\">" .
|
||||||
|
# $edit_title . "</span>";
|
||||||
|
|
||||||
|
print "<span dojoType=\"dijit.InlineEditBox\"
|
||||||
|
width=\"300px\" autoSave=\"false\"
|
||||||
|
cat-id=\"$cat_id\">" . $edit_title .
|
||||||
|
"<script type=\"dojo/method\" event=\"onChange\" args=\"item\">
|
||||||
|
var elem = this;
|
||||||
|
dojo.xhrPost({
|
||||||
|
url: 'backend.php',
|
||||||
|
content: {op: 'pref-feeds', subop: 'editCats',
|
||||||
|
action: 'save',
|
||||||
|
value: this.value,
|
||||||
|
cid: this.srcNodeRef.getAttribute('cat-id')},
|
||||||
|
load: function(response) {
|
||||||
|
elem.attr('value', response);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</span>";
|
||||||
|
|
||||||
|
print "</td></tr>";
|
||||||
|
|
||||||
++$lnum;
|
++$lnum;
|
||||||
}
|
}
|
||||||
|
|||||||
35
prefs.js
35
prefs.js
@@ -103,35 +103,6 @@ function init_profile_inline_editor() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function init_cat_inline_editor() {
|
|
||||||
try {
|
|
||||||
|
|
||||||
if ($("prefFeedCatList")) {
|
|
||||||
var elems = $("prefFeedCatList").getElementsByTagName("SPAN");
|
|
||||||
|
|
||||||
for (var i = 0; i < elems.length; i++) {
|
|
||||||
if (elems[i].id && elems[i].id.match("FCATT-")) {
|
|
||||||
var cat_id = elems[i].id.replace("FCATT-", "");
|
|
||||||
new Ajax.InPlaceEditor(elems[i],
|
|
||||||
'backend.php?op=pref-feeds&subop=editCats&action=save&cid=' + cat_id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch (e) {
|
|
||||||
exception_error("init_cat_inline_editor", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function infobox_feed_cat_callback2(transport) {
|
|
||||||
try {
|
|
||||||
infobox_callback2(transport);
|
|
||||||
init_cat_inline_editor();
|
|
||||||
} catch (e) {
|
|
||||||
exception_error("infobox_feed_cat_callback2", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateFeedList(sort_key) {
|
function updateFeedList(sort_key) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -254,7 +225,7 @@ function addFeedCat() {
|
|||||||
new Ajax.Request("backend.php", {
|
new Ajax.Request("backend.php", {
|
||||||
parameters: query,
|
parameters: query,
|
||||||
onComplete: function(transport) {
|
onComplete: function(transport) {
|
||||||
infobox_feed_cat_callback2(transport);
|
infobox_callback2(transport);
|
||||||
} });
|
} });
|
||||||
|
|
||||||
link.value = "";
|
link.value = "";
|
||||||
@@ -663,7 +634,7 @@ function removeSelectedFeedCats() {
|
|||||||
new Ajax.Request("backend.php", {
|
new Ajax.Request("backend.php", {
|
||||||
parameters: query,
|
parameters: query,
|
||||||
onComplete: function(transport) {
|
onComplete: function(transport) {
|
||||||
infobox_feed_cat_callback2(transport);
|
infobox_callback2(transport);
|
||||||
} });
|
} });
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1401,7 +1372,7 @@ function editFeedCats() {
|
|||||||
new Ajax.Request("backend.php", {
|
new Ajax.Request("backend.php", {
|
||||||
parameters: query,
|
parameters: query,
|
||||||
onComplete: function(transport) {
|
onComplete: function(transport) {
|
||||||
infobox_feed_cat_callback2(transport);
|
infobox_callback2(transport);
|
||||||
} });
|
} });
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
exception_error("editFeedCats", e);
|
exception_error("editFeedCats", e);
|
||||||
|
|||||||
Reference in New Issue
Block a user