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:
Ingo Schommer 2012-02-16 17:38:37 +01:00
parent 4e99af7047
commit fd847dda4d
1 changed files with 3 additions and 1 deletions

View File

@ -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)) {