From 7009ba1de007fd29f1712966cd830be7111f247a Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Wed, 7 Jan 2015 17:08:21 +0000 Subject: [PATCH] Fix mail compose issues: -Set default toolbar actions -Set toolbar actions view range to 6 -Fix compose window not being resized correctly in FF -Fix displaying toolbar's selectbox -Fix styling of toggle button --- etemplate/js/et2_widget_toolbar.js | 10 ++++++++++ etemplate/templates/default/etemplate2.css | 2 +- mail/inc/class.mail_compose.inc.php | 9 ++++++--- mail/templates/default/compose.xet | 2 +- mail/templates/pixelegg/app.css | 7 ++++++- mail/templates/pixelegg/app.less | 5 ++++- 6 files changed, 28 insertions(+), 7 deletions(-) diff --git a/etemplate/js/et2_widget_toolbar.js b/etemplate/js/et2_widget_toolbar.js index 6a19a0207a..aeb6e1cd63 100644 --- a/etemplate/js/et2_widget_toolbar.js +++ b/etemplate/js/et2_widget_toolbar.js @@ -485,6 +485,16 @@ var et2_toolbar = et2_DOMWidget.extend([et2_IInput], isValid: function(messages) { return true; + }, + + /** + * Attach the container node of the widget to DOM-Tree + * @returns {Boolean} + */ + doLoadingFinished: function () + { + this._super.apply(this, arguments); + return false; } }); et2_register_widget(et2_toolbar, ["toolbar"]); diff --git a/etemplate/templates/default/etemplate2.css b/etemplate/templates/default/etemplate2.css index 8a29c59f93..9baa9bfb7a 100644 --- a/etemplate/templates/default/etemplate2.css +++ b/etemplate/templates/default/etemplate2.css @@ -1415,7 +1415,7 @@ div.ms-sel-ctn { } .et2_toolbar button.toolbar_toggled { background-color: white; - box-shadow: inset 1px 1px 1px 1px gray; + box-shadow: inset 1px 1px 1px 1px gray !important; } .et2_toolbar-dropdown{ margin: 1px; diff --git a/mail/inc/class.mail_compose.inc.php b/mail/inc/class.mail_compose.inc.php index 1ccb72e78a..08960714ee 100644 --- a/mail/inc/class.mail_compose.inc.php +++ b/mail/inc/class.mail_compose.inc.php @@ -115,7 +115,8 @@ class mail_compose 'icon' => 'mail_send', 'group' => ++$group, 'onExecute' => 'javaScript:app.mail.compose_submitAction', - 'hint' => 'Send' + 'hint' => 'Send', + 'toolbarDefault' => true ), 'button[saveAsDraft]' => array( 'caption' => 'Save', @@ -136,14 +137,16 @@ class mail_compose 'icon' => 'filemanager', 'group' => ++$group, 'onExecute' => 'javaScript:app.mail.compose_triggerWidget', - 'hint' => 'Select file(s) from VFS' + 'hint' => 'Select file(s) from VFS', + 'toolbarDefault' => true ), 'uploadForCompose' => array( 'caption' => 'Upload files...', 'icon' => 'attach', 'group' => ++$group, 'onExecute' => 'javaScript:app.mail.compose_triggerWidget', - 'hint' => 'Select files to upload' + 'hint' => 'Select files to upload', + 'toolbarDefault' => true ), 'to_infolog' => array( 'caption' => 'Infolog', diff --git a/mail/templates/default/compose.xet b/mail/templates/default/compose.xet index 7f453932b4..ae2153f749 100644 --- a/mail/templates/default/compose.xet +++ b/mail/templates/default/compose.xet @@ -3,7 +3,7 @@