new hotkey: c m (toggle category reorder mode)
This commit is contained in:
parent
eedfb635dd
commit
a5550322ba
16
feedlist.js
16
feedlist.js
|
@ -10,6 +10,20 @@ var mouse_x = 0;
|
|||
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);
|
||||
|
@ -382,7 +396,7 @@ function feedlist_init() {
|
|||
|
||||
init_collapsable_feedlist(getInitParam("theme"));
|
||||
|
||||
Sortable.create('feedList', {onChange: feedlist_dragsorted, only: "feedCat"});
|
||||
toggle_sortable_feedlist(isFeedlistSortable());
|
||||
|
||||
} catch (e) {
|
||||
exception_error("feedlist/init", e);
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
<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>
|
||||
|
||||
|
|
16
tt-rss.js
16
tt-rss.js
|
@ -18,6 +18,11 @@ var init_params = new Object();
|
|||
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;
|
||||
|
@ -1315,6 +1320,17 @@ function hotkey_handler(e) {
|
|||
}
|
||||
}
|
||||
|
||||
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 */
|
||||
|
|
Loading…
Reference in New Issue