mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR Customized jQuery.layout.js to support fetching layout type through HTML5, for easier readability and avoiding the $.metadata dependency (which fails to parse HTML5 data attrs correctly)
This commit is contained in:
parent
4e99af7047
commit
fd847dda4d
@ -119,8 +119,10 @@ if (jQuery && jLayout) {
|
||||
return $.each(this, function () {
|
||||
var element = $(this),
|
||||
o = $.metadata && element.metadata().layout ? $.extend(opts, element.metadata().layout) : opts,
|
||||
// CUSTOM ischommer 2012-16-02 Allow type setting throgh built-in jQuery HTML5 data getters, to avoid including jQuery.metadata.js
|
||||
o = element.data('layoutType') ? $.extend(o, {type: element.data('layoutType')}) : o,
|
||||
// CUSTOM END
|
||||
elementWrapper = wrap(element, o.resize);
|
||||
|
||||
if (o.type === 'border' && typeof jLayout.border !== 'undefined') {
|
||||
$.each(['north', 'south', 'west', 'east', 'center'], function (i, name) {
|
||||
if (element.children().hasClass(name)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user