From 3d678ea3bd1fbd705ccba1a35e905cf75fda0341 Mon Sep 17 00:00:00 2001 From: Trevor Parscal Date: Fri, 2 Dec 2011 21:25:19 +0000 Subject: [PATCH] Integrated menuView into format drop down tool --- modules/es/styles/es.ContextView.css | 1 + modules/es/styles/es.MenuView.css | 1 + modules/es/styles/es.ToolbarView.css | 17 +++- modules/es/tools/es.DropdownTool.js | 33 +++--- modules/es/tools/es.FormatDropdownTool.js | 118 +++++++++++++--------- modules/es/views/es.ContextView.js | 63 +++++++----- modules/es/views/es.MenuView.js | 19 +++- 7 files changed, 161 insertions(+), 91 deletions(-) diff --git a/modules/es/styles/es.ContextView.css b/modules/es/styles/es.ContextView.css index d3a0a9bc75..0d33cb9a07 100644 --- a/modules/es/styles/es.ContextView.css +++ b/modules/es/styles/es.ContextView.css @@ -19,6 +19,7 @@ -webkit-box-shadow: 0 0.25em 1em 0 rgba(0,0,0,0.25); -moz-box-shadow: 0 0.25em 1em 0 rgba(0,0,0,0.25); box-shadow: 0 0.25em 1em 0 rgba(0,0,0,0.25); + z-index: 4; } .es-contextView-position-start .es-contextView-icon { diff --git a/modules/es/styles/es.MenuView.css b/modules/es/styles/es.MenuView.css index 00d4b2e812..651c104561 100644 --- a/modules/es/styles/es.MenuView.css +++ b/modules/es/styles/es.MenuView.css @@ -11,6 +11,7 @@ -moz-box-shadow: 0 0.25em 1em 0 rgba(0,0,0,0.25); box-shadow: 0 0.25em 1em 0 rgba(0,0,0,0.25); padding: 0.33em 0; + z-index: 3; } .es-menuView-item { diff --git a/modules/es/styles/es.ToolbarView.css b/modules/es/styles/es.ToolbarView.css index a53a6f4dd4..e4a2c6db61 100644 --- a/modules/es/styles/es.ToolbarView.css +++ b/modules/es/styles/es.ToolbarView.css @@ -88,6 +88,19 @@ background-image: url(../images/clear.png); } .es-toolbarDropdownTool { + border-color: #dddddd; + -webkit-border-radius: 0.25em; + -moz-border-radius: 0.25em; + -o-border-radius: 0.25em; + background-color: white; + font-size: 0.8em; + line-height: 24px; + padding-left: 0.75em; + padding-right: 24px; + background-image: url(../images/arrow-down.png); + background-position: 9em center; + background-repeat: no-repeat; +} +.es-toolbarDropdownTool-format { + width: 8em; } -.es-toolbarDropdownTool-formatting { -} \ No newline at end of file diff --git a/modules/es/tools/es.DropdownTool.js b/modules/es/tools/es.DropdownTool.js index 826a98f361..b99bb7486b 100644 --- a/modules/es/tools/es.DropdownTool.js +++ b/modules/es/tools/es.DropdownTool.js @@ -1,28 +1,35 @@ -es.DropdownTool = function( toolbar, name ) { +es.DropdownTool = function( toolbar, name, items ) { + // Inheritance es.Tool.call( this, toolbar, name ); - // for es.extendClass + // Early exit when extending via es.extendClass if ( !name ) { return; } - - this.$.addClass( 'es-toolbarDropdownTool' ).addClass( 'es-toolbarDropdownTool-' + name ); - this.$select = $( '