Browse files

MINOR Customized jQuery.layout.js to support fetching layout type thr…

…ough HTML5, for easier readability and avoiding the $.metadata dependency (which fails to parse HTML5 data attrs correctly)
  • Loading branch information...
1 parent 4e99af7 commit fd847dda4da70bc0986535cc0a7ddb16ab6dca50 @chillu chillu committed Feb 16, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 admin/thirdparty/jlayout/lib/jquery.jlayout.js
View
4 admin/thirdparty/jlayout/lib/jquery.jlayout.js
@@ -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)) {

0 comments on commit fd847dd

Please sign in to comment.