diff options
author | Andrew Dolgov <[email protected]> | 2009-01-18 09:47:34 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2009-01-18 09:47:34 +0100 |
commit | b8a637f3d2eff88de1d2d76d9014cc0a4086d9d1 (patch) | |
tree | 28b2365df8d22ef5f15d6caa7e51e347ccd58ad8 /viewfeed.js | |
parent | ceb30ba49d300d53a0693aba7e1f0e4c523aeedc (diff) |
implement assign-to-label in subtoolbar
Diffstat (limited to 'viewfeed.js')
-rw-r--r-- | viewfeed.js | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/viewfeed.js b/viewfeed.js index a93f886de..b0cb068e1 100644 --- a/viewfeed.js +++ b/viewfeed.js @@ -850,6 +850,38 @@ function toggleUnread(id, cmode, effect) { } } +function selectionAssignLabel(id) { + try { + + var ids = getSelectedArticleIds2(); + + if (ids.length == 0) { + alert(__("No articles are selected.")); + return; + } + + var ok = confirm(__("Assign selected articles to label?")); + + if (ok) { + + var query = "backend.php?op=rpc&subop=assignToLabel&ids=" + + param_escape(ids.toString()) + "&lid=" + param_escape(id); + +// notify_progress("Loading, please wait..."); + + new Ajax.Request(query, { + onComplete: function(transport) { + all_counters_callback2(transport); + } }); + + } + + } catch (e) { + exception_error("selectionAssignLabel", e); + + } +} + function selectionToggleUnread(cdm_mode, set_state, callback_func, no_error) { try { var rows; |