if ($quiet) return;
+ print "<div dojoType=\"dijit.layout.AccordionContainer\" region=\"center\">";
+ print "<div dojoType=\"dijit.layout.AccordionPane\" title=\"".__('Feeds')."\">";
+
set_pref($link, "_PREFS_ACTIVE_TAB", "feedConfig");
$result = db_query($link, "SELECT COUNT(id) AS num_errors
$feed_search = $_SESSION["prefs_feed_search"];
}
+ print "<div dojoType=\"dijit.Toolbar\">";
+
+ /*
print "<div style='float : right'>
<input id=\"feed_search\" size=\"20\" type=\"search\"
onfocus=\"disableHotkeys();\"
onchange=\"updateFeedList()\" value=\"$feed_search\">
<button onclick=\"updateFeedList()\">".
__('Search')."</button>
- </div>";
-
- print "<button onclick=\"quickAddFeed()\">"
- .__('Subscribe to feed')."</button> ";
+ </div>"; */
+
+ print "<div dojoType=\"dijit.form.DropDownButton\">".
+ "<span>" . __('Select')."</span>";
+
+ print "<div dojoType=\"dijit.Menu\" style=\"display: none;\">";
+ print "<div onclick=\"dijit.byId('feedTree').model.setAllChecked(true)\"
+ dojoType=\"dijit.MenuItem\">".__('All')."</div>";
+ print "<div onclick=\"dijit.byId('feedTree').model.setAllChecked(false)\"
+ dojoType=\"dijit.MenuItem\">".__('None')."</div>";
+ print "</div>";
+
+ /* print "<div onclick=\"selectTableRows('prefFeedList', 'all')\">".__('All')."</div>,
+ <div href=\"#\" onclick=\"selectTableRows('prefFeedList', 'none')\">".__('None')."</div>"; */
- print "<button onclick=\"editSelectedFeed()\">".
- __('Edit feeds')."</button> ";
+ print "</div>";
+
+ print "<button dojoType=\"dijit.form.Button\" onclick=\"quickAddFeed()\">"
+ .__('Subscribe to feed')."</button dojoType=\"dijit.form.Button\"> ";
+
+ print "<button dojoType=\"dijit.form.Button\" onclick=\"editSelectedFeed()\">".
+ __('Edit feeds')."</button dojoType=\"dijit.form.Button\"> ";
if (get_pref($link, 'ENABLE_FEED_CATS')) {
- print "<button onclick=\"editFeedCats()\">".
- __('Edit categories')."</button> ";
+ print "<button dojoType=\"dijit.form.Button\" onclick=\"editFeedCats()\">".
+ __('Edit categories')."</button dojoType=\"dijit.form.Button\"> ";
}
- print "<button onclick=\"removeSelectedFeeds()\">"
- .__('Unsubscribe')."</button> ";
+ print "<button dojoType=\"dijit.form.Button\" onclick=\"removeSelectedFeeds()\">"
+ .__('Unsubscribe')."</button dojoType=\"dijit.form.Button\"> ";
if (defined('_ENABLE_FEED_DEBUGGING')) {
}
+ print "</div>"; # toolbar
+
+ print "<div id=\"feedlistLoading\">
+ <img src='images/indicator_tiny.gif'>".
+ __("Loading, please wait...")."</div>";
+
+ print "<div dojoType=\"dojo.data.ItemFileWriteStore\" jsId=\"feedStore\"
+ url=\"backend.php?op=feeds&root=1\">
+ </div>
+ <div dojoType=\"lib.CheckBoxStoreModel\" jsId=\"feedModel\" store=\"feedStore\"
+ query=\"{id:'root'}\" rootId=\"root\" rootLabel=\"Feeds\"
+ childrenAttrs=\"items\" checkboxStrict=\"false\" checkboxAll=\"false\">
+ </div>
+ <div dojoType=\"lib.CheckBoxTree\" id=\"feedTree\" _dndController=\"dijit.tree.dndSource\"
+ betweenThreshold=\"1\"
+ model=\"feedModel\" openOnClick=\"false\">
+ <script type=\"dojo/method\" event=\"onClick\" args=\"item\">
+ var id = String(item.id);
+ var bare_id = id.substr(id.indexOf(':')+1);
+
+ console.log('onClick: ' + id);
+
+ if (id.match('FEED')) {
+ editFeed(bare_id, event);
+ }
+
+ </script>
+ <script type=\"dojo/method\" event=\"onLoad\" args=\"item\">
+ Element.hide(\"feedlistLoading\");
+ </script>
+ <script type=\"dojo/method\" event=\"checkItemAcceptance\" args=\"item, source, position\">
+ var source_item = dijit.getEnclosingWidget(source);
+ console.log(item);
+ console.log(source_item);
+ </script>
+
+ </div>";
+
+ /*
$feeds_sort = db_escape_string($_REQUEST["sort"]);
if (!$feeds_sort || $feeds_sort == "undefined") {
}
print "</p>";
- }
+ } */
- print "<h3>".__('OPML')."</h3>";
+ print "</div>"; # feeds pane
-/* print "<div style='float : left'>
- <form enctype=\"multipart/form-data\" method=\"POST\" action=\"opml.php\">
- ".__('File:')." <input id=\"opml_file\" name=\"opml_file\" type=\"file\">
- <input type=\"hidden\" name=\"op\" value=\"Import\">
- <button onclick=\"return validateOpmlImport();\"
- type=\"submit\">".__('Import')."</button>
- </form></div>";
-
- print " "; */
+ print "<div dojoType=\"dijit.layout.AccordionPane\" title=\"".__('OPML')."\">";
print "<p>" . __("Using OPML you can export and import your feeds and Tiny Tiny RSS settings.");
</form>";
print "</div> ";
- print "<button onclick=\"gotoExportOpml()\">".
- __('Export OPML')."</button>";
+ print "<button onclick=\"gotoExportOpml()\">".__('Export OPML')."</button>";
print "<p>".__('Your OPML can be published publicly and can be subscribed by anyone who knows the URL below.');
__('Display URL')."</button> ";
- if (strpos($_SERVER['HTTP_USER_AGENT'], "Firefox") !== false) {
-
- print "<h3>" . __("Firefox Integration") . "</h3>";
+ print "</div>"; # pane
+
+ if (true || strpos($_SERVER['HTTP_USER_AGENT'], "Firefox") !== false) {
+
+ print "<div dojoType=\"dijit.layout.AccordionPane\" title=\"".__('Firefox integration')."\">";
print "<p>" . __('This Tiny Tiny RSS site can be used as a Firefox Feed Reader by clicking the link below.') . "</p>";
"</button>";
print "</p>";
- }
- print "<h3>".__("Subscribing via bookmarklet")."</h3>";
+ print "</div>"; # pane
+ }
+ print "<div dojoType=\"dijit.layout.AccordionPane\" title=\"".__('Subscribing using bookmarklet')."\">";
+
print "<p>" . __("Drag the link below to your browser toolbar, open the feed you're interested in in your browser and click on the link to subscribe to it.") . "</p>";
$bm_subscribe_url = str_replace('%s', '', add_feed_url());
print "<a href=\"$bm_url\" class='visibleLink'>" . __('Subscribe in Tiny Tiny RSS'). "</a>";
- print "<h3>".__("Published articles")."</h3>";
+ print "</div>"; #pane
+
+ print "<div dojoType=\"dijit.layout.AccordionPane\" title=\"".__('Published articles and generated feeds')."\">";
print "<p>".__('Published articles are exported as a public RSS feed and can be subscribed by anyone who knows the URL specified below.')."</p>";
print "<button onclick=\"return clearFeedAccessKeys()\">".
__('Clear all generated URLs')."</button> ";
+ print "</div>"; #pane
+ print "</div>"; #container
+
}
function print_feed_browser($link, $search, $limit, $mode = 1) {