var mouse_x = 0;
var resize_enabled = false;
+var selection_disabled = false;
var counters_last_request = 0;
function toggle_sortable_feedlist(enabled) {
}
}
+function enable_selection(b) {
+ disable_selection = !b;
+}
+
function enable_resize(b) {
resize_enabled = b;
}
document.onselectstart = function() { return false; };
return false;
}
+
+ if (selection_disabled) {
+ document.onselectstart = function() { return false; };
+ return false;
+ }
+
} catch (e) {
exception_error("mouse_move_handler", e);
}
function mouse_up_handler(e) {
try {
mouse_is_down = false;
- document.onselectstart = null;
+
+ if (!disable_selection) {
+ document.onselectstart = null;
+ var e = document.getElementById("headlineActionsBody");
+ if (e) Element.hide(e);
+ }
+
} catch (e) {
exception_error("mouse_move_handler", e);
}
}
- if (strpos($_SESSION["client.userAgent"], "MSIE") === false) {
+ print "<td class=\"headlineActions$rtl_cpart\">";
- print "<td class=\"headlineActions$rtl_cpart\">
- <ul class=\"headlineDropdownMenu\">
+
+/* print"<ul class=\"headlineDropdownMenu\">
<li class=\"top2\">
".__('Select:')."
<a href=\"$sel_all_link\">".__('All')."</a>,
<li><span class=\"insensitive\">".__('Mark as read:')."</span></li>
<li onclick=\"$catchup_sel_link\"> ".__('Selection')."</li>";
-/* if (!get_pref($link, 'COMBINED_DISPLAY_MODE')) {
-
- print "
- <li onclick=\"catchupRelativeToArticle(0)\"> ".__("Above active article")."</li>
- <li onclick=\"catchupRelativeToArticle(1)\"> ".__("Below active article")."</li>";
- } else {
- print "
- <li><span class=\"insensitive\"> ".__("Above active article")."</span></li>
- <li><span class=\"insensitive\"> ".__("Below active article")."</span></li>";
-
- } */
-
print "<li onclick=\"$catchup_feed_link\"> ".__('Entire feed')."</li>";
//print "<li><span class=\"insensitive\">--------</span></li>";
}
}
- print "</ul></li></ul>";
- print "</td>";
-
- } else {
- // old style subtoolbar:
-
- print "<td class=\"headlineActions$rtl_cpart\">".
- __('Select:')."
- <a href=\"$sel_all_link\">".__('All')."</a>,
- <a href=\"$sel_unread_link\">".__('Unread')."</a>,
- <a href=\"$sel_none_link\">".__('None')."</a>
- ".
- __('Toggle:')." <a href=\"$tog_unread_link\">".__('Unread')."</a>,
- <a href=\"$tog_marked_link\">".__('Starred')."</a>
- ".
- __('Mark as read:')."
- <a href=\"#\" onclick=\"$catchup_page_link\">".__('Page')."</a>,
- <a href=\"#\" onclick=\"$catchup_feed_link\">".__('Feed')."</a>";
-
- print "</td>";
-
+ print "</ul></li></ul>"; */
+
+ print __('Select:')."
+ <a href=\"$sel_all_link\">".__('All')."</a>,
+ <a href=\"$sel_unread_link\">".__('Unread')."</a>,
+ <a href=\"$sel_inv_link\">".__('Invert')."</a>,
+ <a href=\"$sel_none_link\">".__('None')."</a></li>";
+
+ print " ";
+
+ print "<span
+ onmouseover=\"enable_selection(false)\"
+ onmouseout=\"enable_selection(true)\"
+ onclick=\"toggleHeadlineActions()\" id=\"headlineActionsDrop\">".
+ __("Actions...") . " <img src=\"images/down_arrow.png\">
+ </span>";
+
+ print "<ul id=\"headlineActionsBody\" style=\"display : none\">";
+
+ print "<li><span class=\"insensitive\">".__('Selection toggle:')."</span></li>
+ <li onclick=\"$tog_unread_link\"> ".__('Unread')."</li>
+ <li onclick=\"$tog_marked_link\"> ".__('Starred')."</li>
+ <li onclick=\"$tog_published_link\"> ".__('Published')."</li>
+ <!-- <li><span class=\"insensitive\">--------</span></li> -->
+ <li><span class=\"insensitive\">".__('Mark as read:')."</span></li>
+ <li onclick=\"$catchup_sel_link\"> ".__('Selection')."</li>";
+
+ print "<li onclick=\"$catchup_feed_link\"> ".__('Entire feed').
+ "</li>";
+
+ //print "<li><span class=\"insensitive\">--------</span></li>";
+ print "<li><span class=\"insensitive\">".__('Assign label:')."</span></li>";
+
+ $result = db_query($link, "SELECT id, caption FROM ttrss_labels2 WHERE
+ owner_uid = '".$_SESSION["uid"]."' ORDER BY caption");
+
+ while ($line = db_fetch_assoc($result)) {
+
+ $label_id = $line["id"];
+ $label_caption = $line["caption"];
+
+ if ($feed_id < -10 && $feed_id == -11-$label_id) {
+ print "<li onclick=\"javascript:selectionRemoveLabel($label_id)\">
+ $label_caption ".__('(remove)')."</li>";
+ } else {
+ print "<li onclick=\"javascript:selectionAssignLabel($label_id)\">
+ $label_caption</li>";
+ }
}
+ print "</ul>";
+
+ print "</td>";
+
print "<td class=\"headlineTitle$rtl_cpart\">";
print "<span id=\"subtoolbar_search\"