diff --git a/admin/_config.php b/admin/_config.php index d2d9c33f9..1a5daa238 100644 --- a/admin/_config.php +++ b/admin/_config.php @@ -18,7 +18,6 @@ HtmlEditorConfig::get('cms')->setOptions(array( 'body_class' => 'typography', 'document_base_url' => Director::absoluteBaseURL(), - 'setupcontent_callback' => "sapphiremce_setupcontent", 'cleanup_callback' => "sapphiremce_cleanup", 'use_native_selects' => true, // fancy selects are bug as of SS 2.3.0 diff --git a/admin/code/LeftAndMain.php b/admin/code/LeftAndMain.php index 85d622f5c..871052b35 100644 --- a/admin/code/LeftAndMain.php +++ b/admin/code/LeftAndMain.php @@ -230,8 +230,6 @@ class LeftAndMain extends Controller { Requirements::combine_files( 'lib.js', array( - THIRDPARTY_DIR . '/prototype/prototype.js', - THIRDPARTY_DIR . '/behaviour/behaviour.js', SAPPHIRE_DIR . '/javascript/prototype_improvements.js', THIRDPARTY_DIR . '/jquery/jquery.js', SAPPHIRE_DIR . '/javascript/jquery_improvements.js', @@ -255,15 +253,13 @@ class LeftAndMain extends Controller { SAPPHIRE_ADMIN_DIR . '/thirdparty/jquery-hoverIntent/jquery.hoverIntent.js', SAPPHIRE_ADMIN_DIR . '/javascript/jquery-changetracker/lib/jquery.changetracker.js', SAPPHIRE_DIR . '/javascript/TreeDropdownField.js', - SAPPHIRE_DIR ."/thirdparty/jquery-form/jquery.form.js", SAPPHIRE_DIR . '/javascript/DateField.js', SAPPHIRE_DIR . '/javascript/HtmlEditorField.js', SAPPHIRE_DIR . '/javascript/TabSet.js', SAPPHIRE_DIR . '/javascript/Validator.js', SAPPHIRE_DIR . '/javascript/i18n.js', SAPPHIRE_ADMIN_DIR . '/javascript/ssui.core.js', - SAPPHIRE_DIR . '/javascript/tiny_mce_improvements.js', - CMS_DIR . '/javascript/ThumbnailStripField.js', + SAPPHIRE_DIR . '/javascript/GridField.js', ) ); @@ -294,6 +290,7 @@ class LeftAndMain extends Controller { Requirements::css(THIRDPARTY_DIR . '/jstree/themes/apple/style.css'); Requirements::css(SAPPHIRE_DIR . '/css/TreeDropdownField.css'); Requirements::css(SAPPHIRE_ADMIN_DIR . '/css/screen.css'); + Requirements::css(SAPPHIRE_DIR . '/css/GridField.css'); // Browser-specific requirements $ie = isset($_SERVER['HTTP_USER_AGENT']) ? strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') : false; diff --git a/admin/css/screen.css b/admin/css/screen.css index e585ca8a9..9e9a0c9c8 100644 --- a/admin/css/screen.css +++ b/admin/css/screen.css @@ -425,6 +425,16 @@ body.cms-dialog { overflow: auto; background: url("../images/textures/bg_cms_mai /** -------------------------------------------- "Insert X" forms -------------------------------------------- */ .htmleditorfield-linkform .step2 { margin-bottom: 16px; } +.htmleditorfield-mediaform .ss-gridfield tbody td:first-child img { max-height: 30px; } +.htmleditorfield-mediaform .ss-htmleditorfield-file { border: 1px solid #b3b3b3; -moz-border-radius: 5px; -webkit-border-radius: 5px; -o-border-radius: 5px; -ms-border-radius: 5px; -khtml-border-radius: 5px; border-radius: 5px; -moz-background-clip: padding; -webkit-background-clip: padding; -o-background-clip: padding-box; -ms-background-clip: padding-box; -khtml-background-clip: padding-box; background-clip: padding-box; background: #E2E2E2; margin-bottom: 16px; } +.htmleditorfield-mediaform .ss-htmleditorfield-file.loading { width: 100%; height: 100px; background-image: url(../images/spinner.gif); background-position: 50% 50%; background-repeat: no-repeat; } +.htmleditorfield-mediaform .ss-htmleditorfield-file .overview { background-color: #5db4df; background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #5db4df), color-stop(8%, #5db1dd), color-stop(50%, #439bcb), color-stop(54%, #3f99cd), color-stop(96%, #207db6), color-stop(100%, #1e7cba)); background-image: -webkit-linear-gradient(top, #5db4df 0%, #5db1dd 8%, #439bcb 50%, #3f99cd 54%, #207db6 96%, #1e7cba 100%); background-image: -moz-linear-gradient(top, #5db4df 0%, #5db1dd 8%, #439bcb 50%, #3f99cd 54%, #207db6 96%, #1e7cba 100%); background-image: -o-linear-gradient(top, #5db4df 0%, #5db1dd 8%, #439bcb 50%, #3f99cd 54%, #207db6 96%, #1e7cba 100%); background-image: -ms-linear-gradient(top, #5db4df 0%, #5db1dd 8%, #439bcb 50%, #3f99cd 54%, #207db6 96%, #1e7cba 100%); background-image: linear-gradient(top, #5db4df 0%, #5db1dd 8%, #439bcb 50%, #3f99cd 54%, #207db6 96%, #1e7cba 100%); } +.htmleditorfield-mediaform .ss-htmleditorfield-file .overview .thumbnail { display: inline-block; vertical-align: middle; padding: 4px; } +.htmleditorfield-mediaform .ss-htmleditorfield-file .overview .thumbnail img { max-height: 24px; } +.htmleditorfield-mediaform .ss-htmleditorfield-file .overview .title { display: inline-block; vertical-align: middle; background: #fff; border: 1px solid #b3b3b3; -moz-border-radius: 5px; -webkit-border-radius: 5px; -o-border-radius: 5px; -ms-border-radius: 5px; -khtml-border-radius: 5px; border-radius: 5px; margin-left: 16px; padding: 4px; } +.htmleditorfield-mediaform .ss-htmleditorfield-file .overview .action-delete { display: inline-block; } +.htmleditorfield-mediaform .ss-htmleditorfield-file .details { padding: 16px; } + /** -------------------------------------------- Step labels -------------------------------------------- */ .step-label > * { display: inline-block; vertical-align: top; } .step-label .flyout { height: 18px; font-size: 14px; font-weight: bold; -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; -o-border-top-left-radius: 3px; -ms-border-top-left-radius: 3px; -khtml-border-top-left-radius: 3px; border-top-left-radius: 3px; -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; -o-border-bottom-left-radius: 3px; -ms-border-bottom-left-radius: 3px; -khtml-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; background-color: #667980; padding: 4px 3px 4px 6px; text-align: center; text-shadow: none; color: #fff; } diff --git a/admin/javascript/LeftAndMain.AddForm.js b/admin/javascript/LeftAndMain.AddForm.js index 8f9176cf8..9222404c0 100644 --- a/admin/javascript/LeftAndMain.AddForm.js +++ b/admin/javascript/LeftAndMain.AddForm.js @@ -38,8 +38,6 @@ onmatch: function() { var self = this, typeDropdown = this.find(':input[name=PageType]'); - Observable.applyTo(this[0]); - var tree = $('.cms-tree'); this.setTree(tree); diff --git a/admin/javascript/LeftAndMain.Content.js b/admin/javascript/LeftAndMain.Content.js index 074ed3c1e..81450844e 100644 --- a/admin/javascript/LeftAndMain.Content.js +++ b/admin/javascript/LeftAndMain.Content.js @@ -220,7 +220,7 @@ if(status == 'success') { var form = this.replaceForm(oldForm, data); - Behaviour.apply(); // refreshes ComplexTableField + if(typeof(Behaviour) != 'undefined') Behaviour.apply(); // refreshes ComplexTableField this.trigger('reloadeditform', {form: form, origData: origData, xmlhttp: xmlhttp}); } diff --git a/admin/javascript/LeftAndMain.EditForm.js b/admin/javascript/LeftAndMain.EditForm.js index 66f255dcf..439549904 100644 --- a/admin/javascript/LeftAndMain.EditForm.js +++ b/admin/javascript/LeftAndMain.EditForm.js @@ -182,88 +182,6 @@ return false; } }); - - /** - * Class: .cms-edit-form textarea.htmleditor - * - * Add tinymce to HtmlEditorFields within the CMS. Works in combination - * with a TinyMCE.init() call which is prepopulated with the used HTMLEditorConfig settings, - * and included in the page as an inline