mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Debug messages for tracking down JS layout sequence issues (disabled by default)
This commit is contained in:
parent
c037ee8cbd
commit
460148c12a
@ -23,6 +23,8 @@
|
||||
},
|
||||
|
||||
redraw: function() {
|
||||
if(window.debug) console.log('redraw', this.attr('class'), this.get(0));
|
||||
|
||||
// Force initialization of tabsets to avoid layout glitches
|
||||
this.add(this.find('.cms-tabset')).redrawTabs();
|
||||
|
||||
|
@ -195,6 +195,8 @@
|
||||
this[this.hasClass('is-collapsed') ? 'expand' : 'collapse']();
|
||||
},
|
||||
redraw: function() {
|
||||
if(window.debug) console.log('redraw', this.attr('class'), this.get(0));
|
||||
|
||||
this.layout();
|
||||
}
|
||||
});
|
||||
|
@ -339,6 +339,8 @@
|
||||
this.redraw();
|
||||
},
|
||||
redraw: function(type) {
|
||||
if(window.debug) console.log('redraw', this.attr('class'), this.get(0));
|
||||
|
||||
$('.cms-tree')
|
||||
.toggleClass('draggable', this.val() == 'draggable')
|
||||
.toggleClass('multiple', this.val() == 'multiselect');
|
||||
|
@ -125,6 +125,8 @@ jQuery.noConflict();
|
||||
},
|
||||
|
||||
redraw: function() {
|
||||
if(window.debug) console.log('redraw', this.attr('class'), this.get(0));
|
||||
|
||||
// Move from inner to outer layouts. Some of the elements might not exist.
|
||||
// Not all edit forms are layouted, so qualify by their data value.
|
||||
this.find('.cms-content-fields[data-layout-type]').redraw();
|
||||
@ -306,6 +308,8 @@ jQuery.noConflict();
|
||||
|
||||
$('.cms-content-fields').entwine({
|
||||
redraw: function() {
|
||||
if(window.debug) console.log('redraw', this.attr('class'), this.get(0));
|
||||
|
||||
this.layout();
|
||||
}
|
||||
});
|
||||
@ -456,6 +460,8 @@ jQuery.noConflict();
|
||||
this._super();
|
||||
},
|
||||
redraw: function() {
|
||||
if(window.debug) console.log('redraw', this.attr('class'), this.get(0));
|
||||
|
||||
// Remove whitespace to avoid gaps with inline elements
|
||||
this.contents().filter(function() {
|
||||
return (this.nodeType == 3 && !/\S/.test(this.nodeValue));
|
||||
@ -535,6 +541,8 @@ jQuery.noConflict();
|
||||
|
||||
$(".cms-panel-layout").entwine({
|
||||
redraw: function() {
|
||||
if(window.debug) console.log('redraw', this.attr('class'), this.get(0));
|
||||
|
||||
this.layout({
|
||||
resize: false
|
||||
});
|
||||
@ -626,6 +634,8 @@ jQuery.noConflict();
|
||||
this._super();
|
||||
},
|
||||
redraw: function() {
|
||||
if(window.debug) console.log('redraw', this.attr('class'), this.get(0));
|
||||
|
||||
var self = this, url = this.data('url');
|
||||
if(!url) throw 'Elements of class .cms-panel-deferred need a "data-url" attribute';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user