From c803c01e99309b4c30764d81e33309dc7d14de5d Mon Sep 17 00:00:00 2001 From: scott1702 Date: Wed, 19 Aug 2015 10:55:55 +1200 Subject: [PATCH 1/8] Make gridfield button sizes consistent with the rest of the cms --- css/GridField.css | 3 +-- scss/GridField.scss | 5 ----- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/css/GridField.css b/css/GridField.css index c671c0695..e9c564d2a 100644 --- a/css/GridField.css +++ b/css/GridField.css @@ -26,8 +26,7 @@ Used in side panels and action tabs .cms .ss-gridfield .right > * { float: right; margin-left: 8px; } .cms .ss-gridfield .right .pagination-records-number { font-size: 1.0em; padding: 6px 3px 6px 0; color: white; text-shadow: 0px -1px 0 rgba(0, 0, 0, 0.2); font-weight: normal; } .cms .ss-gridfield .left { float: left; } -.cms .ss-gridfield .left > * { margin-right: 8px; float: left; font-size: 14.4px; } -.cms .ss-gridfield .ss-gridfield-buttonrow { font-size: 14.4px; } +.cms .ss-gridfield .left > * { margin-right: 8px; float: left; } .cms .ss-gridfield .grid-levelup { text-indent: -9999em; margin-bottom: 6px; } .cms .ss-gridfield .grid-levelup a.list-parent-link { background: transparent url(../images/gridfield-level-up.png) no-repeat 0 0; display: block; } .cms .ss-gridfield .add-existing-autocompleter span { float: left; display: inline-block; vertical-align: top; *vertical-align: auto; *zoom: 1; *display: inline; } diff --git a/scss/GridField.scss b/scss/GridField.scss index 27bcc76f5..a74a02371 100644 --- a/scss/GridField.scss +++ b/scss/GridField.scss @@ -99,14 +99,9 @@ $gf_grid_x: 16px; & > * { margin-right:$gf_grid_x/2; float: left; - font-size: $gf_grid_y*1.2; } } - - .ss-gridfield-buttonrow { - font-size: $gf_grid_y*1.2; } - } .ss-gridfield { .grid-levelup { From fa4942f3b534e8401c4e1affd440f6e5251876b5 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Wed, 19 Aug 2015 16:00:14 +1200 Subject: [PATCH 2/8] MINOR: Fix line-endings in rpc.php --- thirdparty/tinymce-spellchecker/rpc.php | 224 ++++++++++++------------ 1 file changed, 112 insertions(+), 112 deletions(-) diff --git a/thirdparty/tinymce-spellchecker/rpc.php b/thirdparty/tinymce-spellchecker/rpc.php index 415f57007..fa7b3d8cc 100644 --- a/thirdparty/tinymce-spellchecker/rpc.php +++ b/thirdparty/tinymce-spellchecker/rpc.php @@ -1,112 +1,112 @@ -decode($raw); - -// Execute RPC -if (isset($config['general.engine'])) { - $spellchecker = new $config['general.engine']($config); - $result = call_user_func_array(array($spellchecker, $input['method']), $input['params']); -} else - die('{"result":null,"id":null,"error":{"errstr":"You must choose an spellchecker engine in the config.php file.","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}'); - -// Request and response id should always be the same -$output = array( - "id" => $input->id, - "result" => $result, - "error" => null -); - -// Return JSON encoded string -echo $json->encode($output); - -?> +decode($raw); + +// Execute RPC +if (isset($config['general.engine'])) { + $spellchecker = new $config['general.engine']($config); + $result = call_user_func_array(array($spellchecker, $input['method']), $input['params']); +} else + die('{"result":null,"id":null,"error":{"errstr":"You must choose an spellchecker engine in the config.php file.","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}'); + +// Request and response id should always be the same +$output = array( + "id" => $input->id, + "result" => $result, + "error" => null +); + +// Return JSON encoded string +echo $json->encode($output); + +?> From a19fe39301f8a6a2e80e9a9d294c425b8699dc0c Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Wed, 19 Aug 2015 16:01:26 +1200 Subject: [PATCH 3/8] FIX: Avoid PHP 5.6 deprecation with access to HTTP_RAW_POST_DATA. Fixed #4511 PHP 5.6 doesn't like access to HTTP_RAW_POST_DATA and recommends the use of php://input, which is already supported by this code. I've just removed the deprecated calls. --- thirdparty/tinymce-spellchecker/rpc.php | 8 -------- 1 file changed, 8 deletions(-) diff --git a/thirdparty/tinymce-spellchecker/rpc.php b/thirdparty/tinymce-spellchecker/rpc.php index fa7b3d8cc..db1f630bb 100644 --- a/thirdparty/tinymce-spellchecker/rpc.php +++ b/thirdparty/tinymce-spellchecker/rpc.php @@ -24,14 +24,6 @@ $raw = ""; if (isset($_POST["json_data"])) $raw = getRequestParam("json_data"); -// Try globals array -if (!$raw && isset($_GLOBALS) && isset($_GLOBALS["HTTP_RAW_POST_DATA"])) - $raw = $_GLOBALS["HTTP_RAW_POST_DATA"]; - -// Try globals variable -if (!$raw && isset($HTTP_RAW_POST_DATA)) - $raw = $HTTP_RAW_POST_DATA; - // Try stream if (!$raw) { if (!function_exists('file_get_contents')) { From 7182c50721eb1e4acf474bf7a6ab4f48cff30da7 Mon Sep 17 00:00:00 2001 From: scott1702 Date: Fri, 21 Aug 2015 09:51:20 +1200 Subject: [PATCH 4/8] Fix overlaying border on header tabs --- admin/css/screen.css | 7 ++++--- admin/scss/_style.scss | 4 ++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/admin/css/screen.css b/admin/css/screen.css index e51607493..7687a2db8 100644 --- a/admin/css/screen.css +++ b/admin/css/screen.css @@ -233,7 +233,7 @@ form.small .field input.text, form.small .field textarea, form.small .field sele .cms .ss-ui-button.ui-state-hover, .cms .ss-ui-button:hover { text-decoration: none; background-color: white; background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2U2ZTZlNiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #e6e6e6)); background: -moz-linear-gradient(#ffffff, #e6e6e6); background: -webkit-linear-gradient(#ffffff, #e6e6e6); background: linear-gradient(#ffffff, #e6e6e6); -moz-box-shadow: 0 0 5px #b3b3b3; -webkit-box-shadow: 0 0 5px #b3b3b3; box-shadow: 0 0 5px #b3b3b3; } .cms .ss-ui-button:active, .cms .ss-ui-button:focus, .cms .ss-ui-button.ui-state-active, .cms .ss-ui-button.ui-state-focus { border: 1px solid #b3b3b3; background-color: white; background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2U2ZTZlNiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #e6e6e6)); background: -moz-linear-gradient(#ffffff, #e6e6e6); background: -webkit-linear-gradient(#ffffff, #e6e6e6); background: linear-gradient(#ffffff, #e6e6e6); -moz-box-shadow: 0 0 5px #b3b3b3 inset; -webkit-box-shadow: 0 0 5px #b3b3b3 inset; box-shadow: 0 0 5px #b3b3b3 inset; } .cms .ss-ui-button.ss-ui-action-minor span { padding-left: 0; padding-right: 0; } -.cms .ss-ui-button.ss-ui-action-constructive { text-shadow: none; font-weight: bold; color: white; border-color: #1F9433; border-bottom-color: #166a24; background-color: #1F9433; background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzkzYmU0MiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzFmOTQzMyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #93be42), color-stop(100%, #1f9433)); background: -moz-linear-gradient(#93be42, #1f9433); background: -webkit-linear-gradient(#93be42, #1f9433); background: linear-gradient(#93be42, #1f9433); text-shadow: #1c872f 0 -1px -1px; } +.cms .ss-ui-button.ss-ui-action-constructive { text-shadow: none; font-weight: bold; color: white; border-color: #1F9433; border-bottom-color: #166a24; background-color: #1F9433; background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzk0YmU0MiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzFmOTQzMyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #94be42), color-stop(100%, #1f9433)); background: -moz-linear-gradient(#94be42, #1f9433); background: -webkit-linear-gradient(#94be42, #1f9433); background: linear-gradient(#94be42, #1f9433); text-shadow: #1c872f 0 -1px -1px; } .cms .ss-ui-button.ss-ui-action-constructive.ui-state-hover, .cms .ss-ui-button.ss-ui-action-constructive:hover { border-color: #166a24; background-color: #1F9433; background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2E0Y2EzYSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzIzYTkzYSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #a4ca3a), color-stop(100%, #23a93a)); background: -moz-linear-gradient(#a4ca3a, #23a93a); background: -webkit-linear-gradient(#a4ca3a, #23a93a); background: linear-gradient(#a4ca3a, #23a93a); } .cms .ss-ui-button.ss-ui-action-constructive:active, .cms .ss-ui-button.ss-ui-action-constructive:focus, .cms .ss-ui-button.ss-ui-action-constructive.ui-state-active, .cms .ss-ui-button.ss-ui-action-constructive.ui-state-focus { background-color: #1d8c30; -moz-box-shadow: inset 0 1px 3px #17181a, 0 1px 0 rgba(255, 255, 255, 0.6); -webkit-box-shadow: inset 0 1px 3px #17181a, 0 1px 0 rgba(255, 255, 255, 0.6); box-shadow: inset 0 1px 3px #17181a, 0 1px 0 rgba(255, 255, 255, 0.6); } .cms .ss-ui-button.ss-ui-action-destructive { color: #f00; background-color: #e6e6e6; } @@ -391,6 +391,7 @@ body.cms { overflow: hidden; } .cms-content-header .cms-content-header-info { float: left; padding-top: 6px; } .cms-content-header .cms-content-header-info * { display: inline-block; } .cms-content-header .cms-content-header-info .section-icon { opacity: 0.2; margin-right: 4px; background-repeat: no-repeat; } +.cms-content-header .cms-content-header-info .cms_backlink { vertical-align: middle; } .cms-content-header .ss-ui-button { line-height: 24px; } .cms-content-header .ss-ui-button .ui-button-text { line-height: 1.4; } @@ -1136,8 +1137,8 @@ visible. Added and removed with js in TabSet.js */ /*************************** .cms .ss-ui-action-tabset.multi .ss-ui-action-tab.ui-tabs-panel.first { left: 0; width: 203px; } .cms .ss-ui-action-tabset.multi .ss-ui-action-tab.ui-tabs-panel .ui-icon { padding-right: 0; } .cms .ss-ui-action-tabset.multi .ss-ui-action-tab.ui-tabs-panel .tab-nav-link, .cms .ss-ui-action-tabset.multi .ss-ui-action-tab.ui-tabs-panel .ss-ui-button { font-size: 12px; } -.cms .ss-ui-action-tabset.multi .ss-ui-action-tab.ui-tabs-panel #Form_AddForm_PageType_Holder ul { padding: 0; } -.cms .ss-ui-action-tabset.multi .ss-ui-action-tab.ui-tabs-panel #Form_AddForm_PageType_Holder ul li { padding: 4px 5px; } +.cms .ss-ui-action-tabset.multi .ss-ui-action-tab.ui-tabs-panel #Form_AddForm_PageType ul { padding: 0; } +.cms .ss-ui-action-tabset.multi .ss-ui-action-tab.ui-tabs-panel #Form_AddForm_PageType ul li { padding: 4px 5px; } .cms .ss-ui-action-tabset.tabset-open ul.ui-tabs-nav, .cms .ss-ui-action-tabset.tabset-open ul.ui-tabs-nav li.first { -moz-border-radius-bottomleft: 0; -webkit-border-bottom-left-radius: 0; border-bottom-left-radius: 0; } .cms .ss-ui-action-tabset.tabset-open-last ul.ui-tabs-nav li.last { -moz-border-radius-bottomright: 0; -webkit-border-bottom-right-radius: 0; border-bottom-right-radius: 0; } .cms .ss-ui-action-tabset .batch-check, .cms .ss-ui-action-tabset .ui-icon { display: inline-block; float: left; margin-left: -2px; padding-right: 6px; } diff --git a/admin/scss/_style.scss b/admin/scss/_style.scss index a91f9458a..6c67072a0 100644 --- a/admin/scss/_style.scss +++ b/admin/scss/_style.scss @@ -134,6 +134,10 @@ body.cms { margin-right: 4px; background-repeat: no-repeat; } + + .cms_backlink { + vertical-align: middle; + } } // Reset to default styles From 0f81d5ece57a50c0daaf0d86c2faa977f323663b Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Fri, 21 Aug 2015 16:22:08 +1200 Subject: [PATCH 5/8] BUG Fix bulk actions making sitetree unclickable --- admin/javascript/LeftAndMain.BatchActions.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/admin/javascript/LeftAndMain.BatchActions.js b/admin/javascript/LeftAndMain.BatchActions.js index de5caa4da..de975e9c1 100644 --- a/admin/javascript/LeftAndMain.BatchActions.js +++ b/admin/javascript/LeftAndMain.BatchActions.js @@ -174,6 +174,9 @@ // the native dropdown setTimeout(function() { batchactions.addClass('inactive'); }, 100); } + + // Refresh selected / enabled nodes + $('#Form_BatchActionsForm').refreshSelected(); }, /** @@ -236,6 +239,7 @@ st = this.getTree(), ids = this.getIDs(), allIds = [], + viewMode = $('.cms-content-batchactions :input[name=view-mode-batchactions]'), selectedAction = this.find(':input[name=Action]').val(); // Default to refreshing the entire tree @@ -246,7 +250,7 @@ } // If no action is selected, enable all nodes - if(selectedAction == -1) { + if(!selectedAction || selectedAction == -1 || !viewMode.is(":checked")) { $(rootNode).find('li').each(function() { $(this).setEnabled(true); }); From b14794b780b30d5a6d39df9ed080135ff25045a8 Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Fri, 21 Aug 2015 16:24:13 +1200 Subject: [PATCH 6/8] BUG Fix bulk actions making sitetree unclickable --- admin/javascript/LeftAndMain.BatchActions.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/admin/javascript/LeftAndMain.BatchActions.js b/admin/javascript/LeftAndMain.BatchActions.js index 1ab9a5aa2..244538243 100644 --- a/admin/javascript/LeftAndMain.BatchActions.js +++ b/admin/javascript/LeftAndMain.BatchActions.js @@ -170,6 +170,7 @@ st = this.getTree(), ids = this.getIDs(), allIds = [], + viewMode = $('.cms-content-batchactions-button'), selectedAction = this.find(':input[name=Action]').val(); // Default to refreshing the entire tree @@ -180,7 +181,7 @@ } // If no action is selected, enable all nodes - if(!selectedAction || selectedAction == -1) { + if(!selectedAction || selectedAction == -1 || !viewMode.hasClass('active')) { $(rootNode).find('li').each(function() { $(this).setEnabled(true); }); @@ -354,11 +355,12 @@ tree.addClass('multiple'); tree.removeClass('draggable'); form.serializeFromTree(); - $('#Form_BatchActionsForm').refreshSelected(); } else { tree.removeClass('multiple'); tree.addClass('draggable'); } + + $('#Form_BatchActionsForm').refreshSelected(); } }); From 03e644ec6293494f195063ed6c3af99d8b6978d1 Mon Sep 17 00:00:00 2001 From: Dan Date: Fri, 21 Aug 2015 11:26:48 -0400 Subject: [PATCH 7/8] Add support for width and height to embedded photos Noticed that "from the web" images don't respect the width and height settings, this fixes that. --- oembed/Oembed.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/oembed/Oembed.php b/oembed/Oembed.php index da94dccf9..0c8c55cc6 100644 --- a/oembed/Oembed.php +++ b/oembed/Oembed.php @@ -238,7 +238,14 @@ class Oembed_Result extends ViewableData { if(isset($options['class'])) { $this->extraClass = $options['class']; } - + if($options) { + if(isset($options['width'])) { + $this->Width = $options['width']; + } + if(isset($options['height'])) { + $this->Height = $options['height']; + } + } parent::__construct(); } From fb9753ddc4e096d72c4d73f83010ba97931b0b3c Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 10 Nov 2014 22:30:00 +1300 Subject: [PATCH 8/8] Retain script tags in editor if allowed (fixes #3611) TinyMCE strips them by default, but if they're specifically added to the allowed elements we should respect that setting. Example PHP config: $validEls = HtmlEditorConfig::get('cms')->getOption('extended_valid_elements'); $validEls .= ',script[src|type]'; HtmlEditorConfig::get('cms')->setOption('extended_valid_elements', $validEls); --- thirdparty/tinymce_ssbuttons/editor_plugin_src.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/thirdparty/tinymce_ssbuttons/editor_plugin_src.js b/thirdparty/tinymce_ssbuttons/editor_plugin_src.js index 683bfb560..5bf49c1c3 100644 --- a/thirdparty/tinymce_ssbuttons/editor_plugin_src.js +++ b/thirdparty/tinymce_ssbuttons/editor_plugin_src.js @@ -70,7 +70,16 @@ + '[/embed]'; el.replaceWith(shortCode); }); - o.content = jQuery('
').append(content).html(); // Little hack to get outerHTML string + + // Insert outerHTML in order to retain all nodes incl.