From ff0f79453fce5a6a0c173491c4979f73030900a9 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 20 Aug 2007 16:04:37 +0100 Subject: [PATCH] UNDO: add (disabled) dialog to recategorize feeds via draganddrop --- modules/pref-feeds.php | 64 ----------------------------------- prefs.js | 76 ------------------------------------------ tt-rss.css | 13 -------- 3 files changed, 153 deletions(-) diff --git a/modules/pref-feeds.php b/modules/pref-feeds.php index 76e22d7d..fb791a93 100644 --- a/modules/pref-feeds.php +++ b/modules/pref-feeds.php @@ -517,65 +517,6 @@ } - if ($subop == "categorizeDlg") { - $action = $_REQUEST["action"]; - - print "
".__('Category editor')."
"; - - print "
"; - - $result = db_query($link, "SELECT title,id FROM ttrss_feed_categories - WHERE owner_uid = ".$_SESSION["uid"]." - ORDER BY title"); - - if (db_num_rows($result) != 0) { - - print ""; - - - print ""; - - print "
"; - } - - return; - } - if ($subop == "editCats") { $action = $_REQUEST["action"]; @@ -1023,11 +964,6 @@ print " "; - -/* print " "; */ - } print ""; diff --git a/prefs.js b/prefs.js index c52ad446..80a00db1 100644 --- a/prefs.js +++ b/prefs.js @@ -241,63 +241,6 @@ function infobox_feed_cat_callback() { } } -function recat_onChange(elem) { - debug(elem); - -} - -function recat_onUpdate(ctr) { - debug(ctr); - -} - -function infobox_recategorize_callback() { - if (xmlhttp.readyState == 4) { - try { - - infobox_callback(); - - var ctr = document.getElementById("prefFeedCatList2"); - - if (ctr) { - var elems = ctr.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); - } - } - - elems = ctr.getElementsByTagName("UL"); - - ctrs = new Array(); - ctr_ids = new Array(); - - for (var i = 0; i < elems.length; i++) { - if (elems[i].id.match("FCNTR-")) { - ctrs.push(elems[i]); - ctr_ids.push(elems[i].id); - } - } - - Position.includeScrollOffsets = true; - - for (var i = 0; i < ctrs.length; i++) { - Sortable.create(elems[i], { scroll: ctr, ghosting: false, - containment: ctrs, dropOnEmpty: true, onChange: recat_onChange, onUpdate: recat_onUpdate }); - } - - } - - } catch (e) { - exception_error("infobox_recategorize_callback", e); - } - } -} - function updateFeedList(sort_key) { if (!xmlhttp_ready(xmlhttp)) { @@ -1730,25 +1673,6 @@ function editFeedCats() { xmlhttp.send(null); } -function recategorizeFeeds() { - if (!xmlhttp_ready(xmlhttp)) { - printLockingError(); - return - } - - document.getElementById("subscribe_to_feed_btn").disabled = true; - - try { - document.getElementById("top25_feeds_btn").disabled = true; - } catch (e) { - // this button is not always available, no-op if not found - } - - xmlhttp.open("GET", "backend.php?op=pref-feeds&subop=categorizeDlg", true); - xmlhttp.onreadystatechange=infobox_recategorize_callback; - xmlhttp.send(null); -} - function showFeedsWithErrors() { displayDlg('feedUpdateErrors'); } diff --git a/tt-rss.css b/tt-rss.css index 103e2fa8..e2bf62be 100644 --- a/tt-rss.css +++ b/tt-rss.css @@ -1684,16 +1684,3 @@ div.autocomplete ul li { cursor : pointer; } -ul#prefFeedCatList2 { - height : 300px; - overflow : scroll; - list-style-type : none; - border : 1px solid #99d67a; - background-color : white; - margin : 0px 0px 5px 0px; - padding : 0px; -} - -ul#prefFeedCatList2 li.feedEntry { - cursor : move; -} -- 2.39.5