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() {
|
redraw: function() {
|
||||||
|
if(window.debug) console.log('redraw', this.attr('class'), this.get(0));
|
||||||
|
|
||||||
// Force initialization of tabsets to avoid layout glitches
|
// Force initialization of tabsets to avoid layout glitches
|
||||||
this.add(this.find('.cms-tabset')).redrawTabs();
|
this.add(this.find('.cms-tabset')).redrawTabs();
|
||||||
|
|
||||||
|
@ -195,6 +195,8 @@
|
|||||||
this[this.hasClass('is-collapsed') ? 'expand' : 'collapse']();
|
this[this.hasClass('is-collapsed') ? 'expand' : 'collapse']();
|
||||||
},
|
},
|
||||||
redraw: function() {
|
redraw: function() {
|
||||||
|
if(window.debug) console.log('redraw', this.attr('class'), this.get(0));
|
||||||
|
|
||||||
this.layout();
|
this.layout();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -339,6 +339,8 @@
|
|||||||
this.redraw();
|
this.redraw();
|
||||||
},
|
},
|
||||||
redraw: function(type) {
|
redraw: function(type) {
|
||||||
|
if(window.debug) console.log('redraw', this.attr('class'), this.get(0));
|
||||||
|
|
||||||
$('.cms-tree')
|
$('.cms-tree')
|
||||||
.toggleClass('draggable', this.val() == 'draggable')
|
.toggleClass('draggable', this.val() == 'draggable')
|
||||||
.toggleClass('multiple', this.val() == 'multiselect');
|
.toggleClass('multiple', this.val() == 'multiselect');
|
||||||
|
@ -125,6 +125,8 @@ jQuery.noConflict();
|
|||||||
},
|
},
|
||||||
|
|
||||||
redraw: function() {
|
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.
|
// 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.
|
// Not all edit forms are layouted, so qualify by their data value.
|
||||||
this.find('.cms-content-fields[data-layout-type]').redraw();
|
this.find('.cms-content-fields[data-layout-type]').redraw();
|
||||||
@ -306,6 +308,8 @@ jQuery.noConflict();
|
|||||||
|
|
||||||
$('.cms-content-fields').entwine({
|
$('.cms-content-fields').entwine({
|
||||||
redraw: function() {
|
redraw: function() {
|
||||||
|
if(window.debug) console.log('redraw', this.attr('class'), this.get(0));
|
||||||
|
|
||||||
this.layout();
|
this.layout();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -456,6 +460,8 @@ jQuery.noConflict();
|
|||||||
this._super();
|
this._super();
|
||||||
},
|
},
|
||||||
redraw: function() {
|
redraw: function() {
|
||||||
|
if(window.debug) console.log('redraw', this.attr('class'), this.get(0));
|
||||||
|
|
||||||
// Remove whitespace to avoid gaps with inline elements
|
// Remove whitespace to avoid gaps with inline elements
|
||||||
this.contents().filter(function() {
|
this.contents().filter(function() {
|
||||||
return (this.nodeType == 3 && !/\S/.test(this.nodeValue));
|
return (this.nodeType == 3 && !/\S/.test(this.nodeValue));
|
||||||
@ -535,6 +541,8 @@ jQuery.noConflict();
|
|||||||
|
|
||||||
$(".cms-panel-layout").entwine({
|
$(".cms-panel-layout").entwine({
|
||||||
redraw: function() {
|
redraw: function() {
|
||||||
|
if(window.debug) console.log('redraw', this.attr('class'), this.get(0));
|
||||||
|
|
||||||
this.layout({
|
this.layout({
|
||||||
resize: false
|
resize: false
|
||||||
});
|
});
|
||||||
@ -626,6 +634,8 @@ jQuery.noConflict();
|
|||||||
this._super();
|
this._super();
|
||||||
},
|
},
|
||||||
redraw: function() {
|
redraw: function() {
|
||||||
|
if(window.debug) console.log('redraw', this.attr('class'), this.get(0));
|
||||||
|
|
||||||
var self = this, url = this.data('url');
|
var self = this, url = this.data('url');
|
||||||
if(!url) throw 'Elements of class .cms-panel-deferred need a "data-url" attribute';
|
if(!url) throw 'Elements of class .cms-panel-deferred need a "data-url" attribute';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user