commit/galaxy-central: james_taylor: Always show the tool search box, remove cog from tool menu header, tweak style for clear search button
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/1332bbac0309/ changeset: 1332bbac0309 user: james_taylor date: 2012-09-28 19:13:34 summary: Always show the tool search box, remove cog from tool menu header, tweak style for clear search button affected #: 6 files diff -r b9e60cd2ff4c6e072865d90307a9d95c375505ac -r 1332bbac03097060066b9825ab3f85a5223f8655 static/june_2007_style/base.less --- a/static/june_2007_style/base.less +++ b/static/june_2007_style/base.less @@ -763,8 +763,16 @@ #search-clear-btn { position: absolute; - right: 4px; - top: 8px; + right: 5px; + top: 9px; + display: block; + font-size: 1.4em; + text-decoration: none; + color: #888; + .ficon(); + &:before { + content: "\f057"; + } } // Messages diff -r b9e60cd2ff4c6e072865d90307a9d95c375505ac -r 1332bbac03097060066b9825ab3f85a5223f8655 static/june_2007_style/blue/base.css --- a/static/june_2007_style/blue/base.css +++ b/static/june_2007_style/blue/base.css @@ -715,7 +715,7 @@ .search-query{display:inline-block;padding:4px;font-size:12px;line-height:16px;color:#555555;border:1px solid #999999;padding-left:14px !important;padding-right:14px !important;margin-bottom:0;-webkit-border-radius:14px;-moz-border-radius:14px;border-radius:14px;-webkit-border-radius:14px;-moz-border-radius:14px;border-radius:14px;max-width:auto;} .search-query:focus{border-color:rgba(24, 132, 218, 0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px rgba(82, 168, 236, 0.6);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px rgba(82, 168, 236, 0.6);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px rgba(82, 168, 236, 0.6);-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px rgba(82, 168, 236, 0.6);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px rgba(82, 168, 236, 0.6);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 8px rgba(82, 168, 236, 0.6);outline:0;outline:thin dotted \9;} .search-spinner{position:absolute;display:none;right:5px;top:9px;} -#search-clear-btn{position:absolute;right:4px;top:8px;} +#search-clear-btn{position:absolute;right:5px;top:9px;display:block;font-size:1.4em;text-decoration:none;color:#888;font-family:FontAwesome;font-weight:normal;font-style:normal;display:inline-block;}#search-clear-btn:before{content:"\f057";} .errormessagelarge,.warningmessagelarge,.donemessagelarge,.infomessagelarge{padding:8px 35px 8px 14px;margin-bottom:16px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);background-color:#ffffcc;border:1px solid #ffdd33;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;color:#666600;min-height:36px;padding-left:52px;background-image:url(error_large.png);background-repeat:no-repeat;background-position:10px 10px;} .errormessagelarge{background-color:#ffcccc;border-color:#ff3355;color:#660000;padding-left:52px;} .warningmessagelarge{background-image:url(warn_large.png);border-color:#aaaa66;background-color:#ffffcc;} diff -r b9e60cd2ff4c6e072865d90307a9d95c375505ac -r 1332bbac03097060066b9825ab3f85a5223f8655 static/scripts/templates/compiled/tool_search.js --- a/static/scripts/templates/compiled/tool_search.js +++ b/static/scripts/templates/compiled/tool_search.js @@ -9,7 +9,7 @@ foundHelper = helpers.search_hint_string; if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } else { stack1 = depth0.search_hint_string; stack1 = typeof stack1 === functionType ? stack1() : stack1; } - buffer += escapeExpression(stack1) + "\" id=\"tool-search-query\" autocomplete=\"off\" class=\"search-query parent-width\" />\n<a id=\"search-clear-btn\" class=\"icon-button cross-circle tooltip\" title=\"clear search (esc)\"></a>\n<img src=\""; + buffer += escapeExpression(stack1) + "\" id=\"tool-search-query\" autocomplete=\"off\" class=\"search-query parent-width\" />\n<a id=\"search-clear-btn\" class=\"tooltip\" title=\"clear search (esc)\"></a>\n<img src=\""; foundHelper = helpers.spinner_url; if (foundHelper) { stack1 = foundHelper.call(depth0, {hash:{}}); } else { stack1 = depth0.spinner_url; stack1 = typeof stack1 === functionType ? stack1() : stack1; } diff -r b9e60cd2ff4c6e072865d90307a9d95c375505ac -r 1332bbac03097060066b9825ab3f85a5223f8655 static/scripts/templates/tool_search.handlebars --- a/static/scripts/templates/tool_search.handlebars +++ b/static/scripts/templates/tool_search.handlebars @@ -1,3 +1,3 @@ <input type="text" name="query" value="{{search_hint_string}}" id="tool-search-query" autocomplete="off" class="search-query parent-width" /> -<a id="search-clear-btn" class="icon-button cross-circle tooltip" title="clear search (esc)"></a> +<a id="search-clear-btn" class="tooltip" title="clear search (esc)"></a><img src="{{spinner_url}}" id="search-spinner" class="search-spinner"/> \ No newline at end of file diff -r b9e60cd2ff4c6e072865d90307a9d95c375505ac -r 1332bbac03097060066b9825ab3f85a5223f8655 templates/root/index.mako --- a/templates/root/index.mako +++ b/templates/root/index.mako @@ -70,115 +70,6 @@ } }); - var menu_options = {}; // Holds dictionary of { label: toggle_fn } - - SHOW_TOOL = "${_("Show Tool Search")}"; - HIDE_TOOL = "${_("Hide Tool Search")}"; - SHOW_RECENT = "${_("Show Recently Used")}"; - HIDE_RECENT = "${_("Hide Recently Used")}"; - - var toggle_tool_search_fn = function() { - // Show/hide menu and update vars, user preferences. - var menu = $("#galaxy_tools").contents().find('#tool-search'), - pref_value, menu_option_text, old_text; - if (menu.is(":visible")) { - // Hide menu. - pref_value = "False"; - menu_option_text = SHOW_TOOL; - old_text = HIDE_TOOL; - - // Reset search. - reset_tool_search(true); - } else { - // Show menu. - pref_value = "True"; - menu_option_text = HIDE_TOOL; - old_text = SHOW_TOOL; - } - menu.toggle(); - - // Update menu option. - delete menu_options[old_text]; - - var new_menu_options = {}; - // Because we always want tool menu to be the first link in the dropdown, - // we re-create the menu_options dictionary by creating a new - // dict and then appending the old dict to it - new_menu_options[menu_option_text] = toggle_tool_search_fn; - menu_options = $.extend( new_menu_options, menu_options ); - make_popupmenu( $("#tools-options-button"), menu_options ); - galaxy_async.set_user_pref("show_tool_search", pref_value); - }; - - var toggle_recently_used_fn = function() { - // Show/hide menu. - var ru_menu = $('#galaxy_tools').contents().find('#recently_used_wrapper'), - ru_menu_body = ru_menu.find(".toolSectionBody"), - pref_value, old_text, menu_option_text; - if (ru_menu.hasClass("user_pref_visible")) { - // Hide menu. - ru_menu_body.slideUp(); - ru_menu.slideUp(); - - // Set vars used below and in tool menu frame. - pref_value = "False"; - old_text = HIDE_RECENT; - menu_option_text = SHOW_RECENT; - } else { - // "Show" menu. - if (!$('#galaxy_tools').contents().find('#tool-search-query').hasClass("search_active")) { - // Default. - ru_menu.slideDown(); - } else { - // Search active: tf there are matching tools in RU menu, show menu. - if ( ru_menu.find(".toolTitle.search_match").length !== 0 ) { - ru_menu.slideDown(); - ru_menu_body.slideDown(); - } - } - // Set vars used below and in tool menu frame. - pref_value = "True"; - old_text = SHOW_RECENT; - menu_option_text = HIDE_RECENT; - } - - // Update menu class and option. - ru_menu.toggleClass("user_pref_hidden user_pref_visible"); - delete menu_options[old_text]; - menu_options[menu_option_text] = toggle_recently_used_fn; - make_popupmenu( $("#tools-options-button"), menu_options ); - galaxy_async.set_user_pref("show_recently_used_menu", pref_value); - }; - - // Init tool options. - ## Search tools menu item. - %if trans.app.toolbox_search.enabled: - <% - show_tool_search = True - if trans.user: - show_tool_search = trans.user.preferences.get( "show_tool_search", "False" ) == "True" - - if show_tool_search: - action = "HIDE_TOOL" - else: - action = "SHOW_TOOL" - %> - menu_options[ ${action} ] = toggle_tool_search_fn; - %endif - ## Recently used tools menu. - %if trans.user: - <% - if trans.user.preferences.get( 'show_recently_used_menu', 'False' ) == 'True': - action = "HIDE_RECENT" - else: - action = "SHOW_RECENT" - %> - // TODO: make compatible with new tool menu. - //menu_options[ ${action} ] = toggle_recently_used_fn; - %endif - - - make_popupmenu( $("#tools-options-button"), menu_options ); }); </script></%def> @@ -202,9 +93,9 @@ <%def name="left_panel()"><div class="unified-panel-header" unselectable="on"><div class='unified-panel-header-inner'> - <div style="float: right"> - <a class='panel-header-button' id="tools-options-button" href="#"><span class="ficon large cog"></span></a> - </div> + ## <div style="float: right"> + ## <a class='panel-header-button' id="tools-options-button" href="#"><span class="ficon large cog"></span></a> + ## </div> ${n_('Tools')} </div></div> diff -r b9e60cd2ff4c6e072865d90307a9d95c375505ac -r 1332bbac03097060066b9825ab3f85a5223f8655 templates/root/tool_menu.mako --- a/templates/root/tool_menu.mako +++ b/templates/root/tool_menu.mako @@ -19,12 +19,7 @@ ${h.templates( "tool_link", "panel_section", "tool_search" )} ${h.js( "libs/require", "galaxy.autocom_tagging" )} - <% - # Set up for creating tool panel. - tool_search_hidden = "false" - if trans.user and trans.user.preferences.get( "show_tool_search", "False" ) == "False": - tool_search_hidden = "true" - + <% dictified_panel = trans.app.toolbox.to_dict( trans ) %> @@ -42,11 +37,13 @@ // Init. on document load. var tool_panel, tool_panel_view, tool_search; $(function() { + // Set up search. - tool_search = new tools.ToolSearch( - { spinner_url: "${h.url_for('/static/images/loading_small_white_bg.gif')}", - search_url: "${h.url_for( controller='root', action='tool_search' )}", - hidden: ${tool_search_hidden} } ); + tool_search = new tools.ToolSearch({ + spinner_url: "${h.url_for('/static/images/loading_small_white_bg.gif')}", + search_url: "${h.url_for( controller='root', action='tool_search' )}", + hidden: false + }); // Set up tool panel. tool_panel = new tools.ToolPanel( { tool_search: tool_search } ); Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket