mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUGFIX #3715: Removed spurious change detection in files and images section
BUGFIX: #3715: Show the changes message in a popup instead of a blank confirm box git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@73084 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
e1ce3dff46
commit
f18ace08b7
@ -182,6 +182,7 @@ class LeftAndMain extends Controller {
|
|||||||
Requirements::javascript(THIRDPARTY_DIR . '/hover.js');
|
Requirements::javascript(THIRDPARTY_DIR . '/hover.js');
|
||||||
Requirements::javascript(THIRDPARTY_DIR . '/layout_helpers.js');
|
Requirements::javascript(THIRDPARTY_DIR . '/layout_helpers.js');
|
||||||
Requirements::add_i18n_javascript(SAPPHIRE_DIR . '/javascript/lang');
|
Requirements::add_i18n_javascript(SAPPHIRE_DIR . '/javascript/lang');
|
||||||
|
Requirements::add_i18n_javascript(CMS_DIR . '/javascript/lang');
|
||||||
|
|
||||||
Requirements::javascript(THIRDPARTY_DIR . '/scriptaculous/effects.js');
|
Requirements::javascript(THIRDPARTY_DIR . '/scriptaculous/effects.js');
|
||||||
Requirements::javascript(THIRDPARTY_DIR . '/scriptaculous/dragdrop.js');
|
Requirements::javascript(THIRDPARTY_DIR . '/scriptaculous/dragdrop.js');
|
||||||
|
@ -584,7 +584,9 @@ ChangeTracker.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
field_changed: function() {
|
field_changed: function() {
|
||||||
return this.originalSerialized != Form.Element.serialize(this);
|
// Something a value will go from 'undefined' to ''. Ignore such changes
|
||||||
|
if((this.originalSerialized+'') == 'undefined') return Form.Element.serialize(this) ? true : false;
|
||||||
|
else return this.originalSerialized != Form.Element.serialize(this);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -600,8 +602,8 @@ ChangeTracker.prototype = {
|
|||||||
|
|
||||||
if(!element.isChanged) element.isChanged = this.field_changed;
|
if(!element.isChanged) element.isChanged = this.field_changed;
|
||||||
if(!this.changeDetection_fieldsToIgnore[element.name] && element.isChanged()) {
|
if(!this.changeDetection_fieldsToIgnore[element.name] && element.isChanged()) {
|
||||||
//if( window.location.href.match( /^https?:\/\/dev/ ) )
|
//console.log('Changed:'+ element.id + '(' + this.originalSerialized +')->('+Form.Element.serialize(element)+')' );
|
||||||
// Debug.log('Changed:'+ element.id + '(' + this.originalSerialized +')->('+Form.Element.serialize(element)+')' );
|
//console.log(element)
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user