[hg] galaxy 3450: Page editor: use Galaxy styles for drop downs ...
details: http://www.bx.psu.edu/hg/galaxy/rev/71a525ae9426 changeset: 3450:71a525ae9426 user: James Taylor <james@jamestaylor.org> date: Mon Mar 01 12:46:54 2010 -0500 description: Page editor: use Galaxy styles for drop downs in menubar diffstat: static/june_2007_style/base.css.tmpl | 12 +++++++-- static/june_2007_style/blue/base.css | 3 +- templates/page/editor.mako | 44 +++++++++++++---------------------- 3 files changed, 27 insertions(+), 32 deletions(-) diffs (118 lines): diff -r 405764879961 -r 71a525ae9426 static/june_2007_style/base.css.tmpl --- a/static/june_2007_style/base.css.tmpl Mon Mar 01 12:14:04 2010 -0500 +++ b/static/june_2007_style/base.css.tmpl Mon Mar 01 12:46:54 2010 -0500 @@ -507,9 +507,15 @@ } } -.menubutton.popup { - padding-right: 1.5em; - background: url(../images/dropdownarrow.png) no-repeat right 8px; +.menubutton.action-button { + border-color: #aaaaaa; +} + +.menubutton.popup, .action-button.popup { + padding-right: 20px; + background-image: url(../images/dropdownarrow.png); + background-repeat: no-repeat; + background-position: right 8px; } .menubutton:hover { diff -r 405764879961 -r 71a525ae9426 static/june_2007_style/blue/base.css --- a/static/june_2007_style/blue/base.css Mon Mar 01 12:14:04 2010 -0500 +++ b/static/june_2007_style/blue/base.css Mon Mar 01 12:46:54 2010 -0500 @@ -87,7 +87,8 @@ .action-button:active{color:white;background:#aaaaaa;} .menubutton{display:inline-block;cursor:pointer;position:relative;user-select:none;-moz-user-select:none;-webkit-user-select:none;border:solid transparent 1px;-moz-border-radius:0.5em;-webkit-border-radius:0.5em;border-radius:0.5em;padding:3px 0.5em;margin:-3px -0.5em;} .menubutton .label{position:relative;display:block;border-right:none;} -.menubutton.popup{padding-right:1.5em;background:url(../images/dropdownarrow.png) no-repeat right 8px;} +.menubutton.action-button{border-color:#aaaaaa;} +.menubutton.popup,.action-button.popup{padding-right:20px;background-image:url(../images/dropdownarrow.png);background-repeat:no-repeat;background-position:right 8px;} .menubutton:hover{border-color:#aaaaaa;} .menubutton.popup.split{padding-right:2em;} .menubutton.popup.split:hover{background:url(../images/ddarrowsplit.png) no-repeat right -38px;} diff -r 405764879961 -r 71a525ae9426 templates/page/editor.mako --- a/templates/page/editor.mako Mon Mar 01 12:14:04 2010 -0500 +++ b/templates/page/editor.mako Mon Mar 01 12:46:54 2010 -0500 @@ -534,7 +534,6 @@ boxHtml: "<table class='wym_box' width='100%' height='100%'>" + "<tr><td><div class='wym_area_top'>" + WYMeditor.TOOLS - + WYMeditor.CONTAINERS + "</div></td></tr>" + "<tr height='100%'><td>" + "<div class='wym_area_main' style='height: 100%;'>" @@ -559,11 +558,6 @@ {'name': 'Unlink', 'title': 'Unlink', 'css': 'wym_tools_unlink'}, {'name': 'InsertImage', 'title': 'Image', 'css': 'wym_tools_image'}, {'name': 'InsertTable', 'title': 'Table', 'css': 'wym_tools_table'}, - {'name': 'Insert Galaxy History Link', 'title' : 'Galaxy_History_Link', 'css' : 'galaxy_tools_insert_history_link'}, - {'name': 'Insert Galaxy Dataset Link', 'title' : 'Galaxy_Dataset_Link', 'css' : 'galaxy_tools_insert_dataset_link'}, - {'name': 'Insert Galaxy Workflow Link', 'title' : 'Galaxy_Workflow_Link', 'css' : 'galaxy_tools_insert_workflow_link'}, - {'name': 'Insert Galaxy Page Link', 'title' : 'Galaxy_Page_Link', 'css' : 'galaxy_tools_insert_page_link'}, - {'name': 'Annonate Galaxy History', 'title' : 'Annotate_Galaxy_History', 'css' : 'galaxy_tools_annotate_history'}, ] }); ## Get the editor object @@ -636,35 +630,29 @@ } }); - // Initialize 'Insert history link' button. - $('.galaxy_tools_insert_history_link').children().click( function() { - editor.dialog(Galaxy.DIALOG_HISTORY_LINK); - }); - // Initialize 'Insert dataset link' button. - $('.galaxy_tools_insert_dataset_link').children().click( function() { - editor.dialog(Galaxy.DIALOG_DATASET_LINK); - }); - // Initialize 'Insert workflow link' button. - $('.galaxy_tools_insert_workflow_link').children().click( function() { - editor.dialog(Galaxy.DIALOG_WORKFLOW_LINK); - }); - // Initialize 'Insert page link' button. - $('.galaxy_tools_insert_page_link').children().click( function() { - editor.dialog(Galaxy.DIALOG_PAGE_LINK); - }); - // Initialize 'Annotate history' button. - $('.galaxy_tools_annotate_history').children().click( function() { - editor.dialog(Galaxy.DIALOG_ANNOTATE_HISTORY); - }); // Initialize galaxy elements. //init_galaxy_elts(editor); // + // Containers, Galaxy style + // + var containers_menu = $("<div class='galaxy-page-editor-button'><a id='insert-galaxy-link' class='action-button popup' href='#'>${_('Paragraph type')}</a></div>"); + $(".wym_area_top").append( containers_menu ); + + // Add menu options. + var items = {} + $.each( editor._options.containersItems, function( k, v ) { + var tagname = v.name; + items[ v.title.replace( '_', ' ' ) ] = function() { editor.container( tagname ) } + }); + make_popupmenu( containers_menu, items); + + // // Create 'Insert Link to Galaxy Object' menu. // // Add menu button. - var insert_link_menu_button = $("<div><a id='insert-galaxy-link' class='panel-header-button popup' href='#'>${_('Insert Link to Galaxy Object')}</a></div>").addClass('galaxy-page-editor-button'); + var insert_link_menu_button = $("<div><a id='insert-galaxy-link' class='action-button popup' href='#'>${_('Insert Link to Galaxy Object')}</a></div>").addClass('galaxy-page-editor-button'); $(".wym_area_top").append(insert_link_menu_button); // Add menu options. @@ -688,7 +676,7 @@ // // Add menu button. - var embed_object_button = $("<div><a id='embed-galaxy-object' class='panel-header-button popup' href='#'>${_('Embed Galaxy Object')}</a></div>").addClass('galaxy-page-editor-button'); + var embed_object_button = $("<div><a id='embed-galaxy-object' class='action-button popup' href='#'>${_('Embed Galaxy Object')}</a></div>").addClass('galaxy-page-editor-button'); $(".wym_area_top").append(embed_object_button); // Add menu options.
participants (1)
-
Greg Von Kuster