var resize_enabled = false;
var counters_last_request = 0;
+function toggle_sortable_feedlist(enabled) {
+ try {
+
+ if (enabled) {
+ Sortable.create('feedList', {onChange: feedlist_dragsorted, only: "feedCat"});
+ } else {
+ Sortable.destroy('feedList');
+ }
+
+ } catch (e) {
+ exception_error("toggle_sortable_feedlist", e);
+ }
+}
+
function viewCategory(cat) {
active_feed_is_cat = true;
viewfeed(cat, '', true);
init_collapsable_feedlist(getInitParam("theme"));
- Sortable.create('feedList', {onChange: feedlist_dragsorted, only: "feedCat"});
+ toggle_sortable_feedlist(isFeedlistSortable());
} catch (e) {
exception_error("feedlist/init", e);
<tr><td class='n'>c f</td><td><?php echo __("Create filter") ?></td></tr>
<tr><td class='n'>c s</td><td><?php echo __("Collapse sidebar") ?></td></tr>
+ <tr><td class='n'>c m</td><td><?php echo __("Toggle category reordering mode") ?></td></tr>
<tr><td class='n'>?</td><td><?php echo __("Display this help dialog") ?></td></tr>
</table>
var ver_offset = 0;
var hor_offset = 0;
var feeds_sort_by_unread = false;
+var feedlist_sortable_enabled = false;
+
+function isFeedlistSortable() {
+ return feedlist_sortable_enabled;
+}
function tagsAreDisplayed() {
return display_tags;
}
}
+ if (keycode == 77) { // m
+ feedlist_sortable_enabled = !feedlist_sortable_enabled;
+ if (feedlist_sortable_enabled) {
+ notify_info("Category reordering enabled");
+ toggle_sortable_feedlist(true);
+ } else {
+ notify_info("Category reordering disabled");
+ toggle_sortable_feedlist(false);
+ }
+ }
+
}
/* Prefix g */