mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX Blocking of preview screen (regression)
Blocked when it should be editable, due to entwine's onunmatch not firing when it was expected to.
This commit is contained in:
parent
0ab76e8e11
commit
38e930dfe6
@ -211,6 +211,7 @@
|
|||||||
*/
|
*/
|
||||||
_block: function() {
|
_block: function() {
|
||||||
this.addClass('blocked');
|
this.addClass('blocked');
|
||||||
|
this.find('.cms-preview-overlay').show();
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -219,6 +220,7 @@
|
|||||||
*/
|
*/
|
||||||
_unblock: function() {
|
_unblock: function() {
|
||||||
this.removeClass('blocked');
|
this.removeClass('blocked');
|
||||||
|
this.find('.cms-preview-overlay').hide();
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -405,20 +407,6 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
|
||||||
* Update the "preview unavailable" overlay according to the class.
|
|
||||||
*/
|
|
||||||
$('.cms-preview.blocked').entwine({
|
|
||||||
onmatch: function() {
|
|
||||||
this.find('.cms-preview-overlay').show();
|
|
||||||
this._super();
|
|
||||||
},
|
|
||||||
onunmatch: function() {
|
|
||||||
this.find('.cms-preview-overlay').hide();
|
|
||||||
this._super();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* "Preview state" functions.
|
* "Preview state" functions.
|
||||||
* -------------------------------------------------------------------
|
* -------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user