feed cat editor uses prototype
This commit is contained in:
parent
8c2f0ed7a3
commit
0666e120e8
30
backend.php
30
backend.php
|
@ -1982,6 +1982,8 @@
|
||||||
|
|
||||||
if (db_num_rows($result) != 0) {
|
if (db_num_rows($result) != 0) {
|
||||||
|
|
||||||
|
print "<form id=\"feed_cat_edit_form\">";
|
||||||
|
|
||||||
print "<p><table width=\"100%\" class=\"prefFeedCatList\"
|
print "<p><table width=\"100%\" class=\"prefFeedCatList\"
|
||||||
cellspacing=\"0\" id=\"prefFeedCatList\">";
|
cellspacing=\"0\" id=\"prefFeedCatList\">";
|
||||||
|
|
||||||
|
@ -2005,9 +2007,13 @@
|
||||||
|
|
||||||
$edit_cat_id = $_GET["id"];
|
$edit_cat_id = $_GET["id"];
|
||||||
|
|
||||||
if ($subop == "editCat" && $cat_id != $edit_cat_id) {
|
if ($subop == "editCat") {
|
||||||
$class .= "Grayed";
|
if ($cat_id != $edit_cat_id) {
|
||||||
$this_row_id = "";
|
$class .= "Grayed";
|
||||||
|
$this_row_id = "";
|
||||||
|
} else {
|
||||||
|
$class .= "Selected";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$this_row_id = "id=\"FCATR-$cat_id\"";
|
$this_row_id = "id=\"FCATR-$cat_id\"";
|
||||||
}
|
}
|
||||||
|
@ -2026,16 +2032,22 @@
|
||||||
|
|
||||||
} else if ($cat_id != $edit_cat_id) {
|
} else if ($cat_id != $edit_cat_id) {
|
||||||
|
|
||||||
print "<td><input disabled=\"true\" type=\"checkbox\"
|
print "<td align='center'><input disabled=\"true\" type=\"checkbox\"
|
||||||
id=\"FRCHK-".$line["id"]."\"></td>";
|
id=\"FRCHK-".$line["id"]."\"></td>";
|
||||||
|
|
||||||
print "<td>$edit_title</td>";
|
print "<td>$edit_title</td>";
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
print "<td><input disabled=\"true\" type=\"checkbox\" checked></td>";
|
print "<td align='center'><input disabled=\"true\" type=\"checkbox\" checked>";
|
||||||
|
|
||||||
print "<td><input id=\"iedit_title\" value=\"$edit_title\"></td>";
|
print "<input type=\"hidden\" name=\"id\" value=\"$cat_id\">";
|
||||||
|
print "<input type=\"hidden\" name=\"op\" value=\"pref-feeds\">";
|
||||||
|
print "<input type=\"hidden\" name=\"subop\" value=\"saveCat\">";
|
||||||
|
|
||||||
|
print "</td>";
|
||||||
|
|
||||||
|
print "<td><input name=\"title\" class=\"iedit\" value=\"$edit_title\"></td>";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2046,14 +2058,16 @@
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
|
print "</form>";
|
||||||
|
|
||||||
print "<p id=\"catOpToolbar\">";
|
print "<p id=\"catOpToolbar\">";
|
||||||
|
|
||||||
if ($subop == "editCat") {
|
if ($subop == "editCat") {
|
||||||
print "Edit category:
|
print "Edit category:
|
||||||
<input type=\"submit\" class=\"button\"
|
<input type=\"submit\" class=\"button\"
|
||||||
onclick=\"javascript:feedCatEditCancel()\" value=\"Cancel\">
|
onclick=\"javascript:feedCatEditSave()\" value=\"Save\">
|
||||||
<input type=\"submit\" class=\"button\"
|
<input type=\"submit\" class=\"button\"
|
||||||
onclick=\"javascript:feedCatEditSave()\" value=\"Save\">";
|
onclick=\"javascript:feedCatEditCancel()\" value=\"Cancel\">";
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
print "
|
print "
|
||||||
|
|
8
prefs.js
8
prefs.js
|
@ -719,11 +719,11 @@ function feedCatEditSave() {
|
||||||
|
|
||||||
notify("Saving category...");
|
notify("Saving category...");
|
||||||
|
|
||||||
var cat_title = document.getElementById("iedit_title").value;
|
// var cat_title = document.getElementById("iedit_title").value;
|
||||||
|
|
||||||
xmlhttp.open("GET", "backend.php?op=pref-feeds&subop=saveCat&id=" +
|
var query = Form.serialize("feed_cat_edit_form");
|
||||||
param_escape(active_feed_cat) + "&title=" + param_escape(cat_title),
|
|
||||||
true);
|
xmlhttp.open("GET", "backend.php?" + query, true);
|
||||||
xmlhttp.onreadystatechange=feedlist_callback;
|
xmlhttp.onreadystatechange=feedlist_callback;
|
||||||
xmlhttp.send(null);
|
xmlhttp.send(null);
|
||||||
|
|
||||||
|
|
|
@ -287,11 +287,15 @@ a:hover {
|
||||||
background-color : #f0fff0;
|
background-color : #f0fff0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.iedit {
|
input.iedit {
|
||||||
width : 100%;
|
width : 100%;
|
||||||
padding-left : 2px;
|
padding-left : 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
select.iedit {
|
||||||
|
width : 100%;
|
||||||
|
}
|
||||||
|
|
||||||
input.editbox {
|
input.editbox {
|
||||||
width : 200px;
|
width : 200px;
|
||||||
padding-left : 2px;
|
padding-left : 2px;
|
||||||
|
|
Loading…
Reference in New Issue