diff --git a/code/CMSMain.php b/code/CMSMain.php
index 167bda3e..735ab244 100644
--- a/code/CMSMain.php
+++ b/code/CMSMain.php
@@ -426,7 +426,6 @@ JS;
}
}
}
-
$form = new Form($this, "EditForm", $fields, $actions);
$form->loadDataFrom($record);
$form->disableDefaultAction();
@@ -589,7 +588,7 @@ JS;
*/
public function revert($urlParams, $form) {
$id = (int)$_REQUEST['ID'];
- $record = Versioned::get_one_by_stage('SiteTree', 'Live', "\"SiteTree_Live\".\"ID\" = {$id}");
+ $record = Versioned::get_one_by_stage('SiteTree', 'Live', "`SiteTree_Live`.`ID` = {$id}");
// a user can restore a page without publication rights, as it just adds a new draft state
// (this action should just be available when page has been "deleted from draft")
diff --git a/code/ThumbnailStripField.php b/code/ThumbnailStripField.php
index 33d1822b..6cad5859 100755
--- a/code/ThumbnailStripField.php
+++ b/code/ThumbnailStripField.php
@@ -65,25 +65,27 @@ class ThumbnailStripField extends FormField {
foreach($images as $image) {
$thumbnail = $image->getFormattedImage('StripThumbnail');
- // Constrain the output image to a 600x600 square. This is passed to the destwidth/destheight in the class, which are then used to
- // set width & height properties on the tag inserted into the CMS. Resampling is done after save
- $width = $image->Width;
- $height = $image->Height;
- if($width > 600) {
- $height *= (600 / $width);
- $width = 600;
+ if ($thumbnail instanceof Image_Cached) { //Hack here...
+ // Constrain the output image to a 600x600 square. This is passed to the destwidth/destheight in the class, which are then used to
+ // set width & height properties on the tag inserted into the CMS. Resampling is done after save
+ $width = $image->Width;
+ $height = $image->Height;
+ if($width > 600) {
+ $height *= (600 / $width);
+ $width = 600;
+ }
+ if($height > 600) {
+ $width *= (600 / $height);
+ $height = 600;
+ }
+
+ $result .=
+ '
' .
+ '' .
+ '' .
+ '' .
+ '';
}
- if($height > 600) {
- $width *= (600 / $height);
- $height = 600;
- }
-
- $result .=
- '' .
- '' .
- '' .
- '' .
- '';
}
$result .= '';
} else {
diff --git a/css/layout.css b/css/layout.css
index 7e6df2fc..b2e06ae7 100644
--- a/css/layout.css
+++ b/css/layout.css
@@ -102,6 +102,10 @@ input.loading {
background: #fff url(../images/network-save.gif) no-repeat center left;
}
+input.hidden {
+ display: none;
+}
+
/* Overrides - TODO Find a better place to put them */
form#Form_EditForm fieldset {
height: 100%;
@@ -342,10 +346,24 @@ body.stillLoading select {
width: 100%;
margin: 0 0 5px 0;
padding-left: 5px;
+ position: relative;
}
#SearchBox #SiteTreeSearchTerm {
padding: 1px 0 2px 0;
}
+
+ #searchIndicator {
+ display: none;
+ width: 16px;
+ height: 16px;
+ background: #EFEFEF url(../images/network-save.gif) no-repeat;
+ position: absolute;
+ left: 145px;
+ top: 2px;
+ }
+ #searchIndicator.loading {
+ display: block;
+ }
.SearchCriteriaContainer {
float: left;
width: 100%;
diff --git a/javascript/LeftAndMain.js b/javascript/LeftAndMain.js
index f7316f86..9fcfed11 100644
--- a/javascript/LeftAndMain.js
+++ b/javascript/LeftAndMain.js
@@ -594,9 +594,12 @@ ChangeTracker.prototype = {
var elements = Form.getElements(this);
var i, element;
for(i=0;element=elements[i];i++) {
+ // NOTE: TinyMCE coupling
+ // Ignore mce-generated elements
+ if(element.className.substr(0,3) == 'mce') continue;
+
if(!element.isChanged) element.isChanged = this.field_changed;
if(!this.changeDetection_fieldsToIgnore[element.name] && element.isChanged()) {
-
//if( window.location.href.match( /^https?:\/\/dev/ ) )
// Debug.log('Changed:'+ element.id + '(' + this.originalSerialized +')->('+Form.Element.serialize(element)+')' );
diff --git a/javascript/LeftAndMain_left.js b/javascript/LeftAndMain_left.js
index c06703ce..8ec1b7a9 100755
--- a/javascript/LeftAndMain_left.js
+++ b/javascript/LeftAndMain_left.js
@@ -479,11 +479,13 @@ SiteTreeFilterForm = Class.create();
SiteTreeFilterForm.applyTo('form#search_options');
SiteTreeFilterForm.prototype = {
onsubmit: function() {
- $('SiteTreeSearchButton').className = 'loading';
+ $('SiteTreeSearchButton').className = 'hidden';
+ $('searchIndicator').className = 'loading';
Ajax.SubmitForm(this, null, {
onSuccess : function(response) {
$('SiteTreeIsFiltered').value = 1;
$('SiteTreeSearchButton').className = '';
+ $('searchIndicator').className = '';
$('sitetree_ul').innerHTML = response.responseText;
Behaviour.apply($('sitetree_ul'));
statusMessage('Filtered tree','good');
diff --git a/javascript/tinymce.template.js b/javascript/tinymce.template.js
index 32ce3fe1..d1f20fb9 100755
--- a/javascript/tinymce.template.js
+++ b/javascript/tinymce.template.js
@@ -26,7 +26,7 @@ if((typeof tinyMCE != 'undefined')) {
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_toolbar_parent : "right",
- plugins : "blockquote,contextmenu,table,emotions,paste,../../tinymce_ssbuttons,../../tinymce_advcode,spellchecker",
+ plugins : "media,blockquote,contextmenu,table,emotions,paste,../../tinymce_ssbuttons,../../tinymce_advcode,spellchecker",
blockquote_clear_tag : "p",
table_inline_editing : true,
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,separator,bullist,numlist,outdent,indent,blockquote,hr,charmap",
diff --git a/templates/Includes/CMSMain_left.ss b/templates/Includes/CMSMain_left.ss
index 022bd071..4c3e5034 100755
--- a/templates/Includes/CMSMain_left.ss
+++ b/templates/Includes/CMSMain_left.ss
@@ -30,6 +30,7 @@