Skip to content

Commit 4117948

Browse files
author
Kevin Dalman
committed
Layout v1.4.3
Fix reported bugs; update layout-tabs demo; add minified versions of layout files (using Google Closure)
1 parent f402abb commit 4117948

File tree

7 files changed

+652
-245
lines changed

7 files changed

+652
-245
lines changed

demos/layout_inside_tab.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
}
7575

7676
/*
77+
* cosmetic styles
7778
* add some padding and set overflow
7879
*/
7980
.ui-widget-header {
@@ -89,9 +90,9 @@
8990

9091
<script type="text/javascript" src="js/jquery.js"></script>
9192
<script type="text/javascript" src="js/jquery-ui.js"></script>
93+
<script type="text/javascript" src="js/debug.js"></script>
9294
<script type="text/javascript" src="../source/stable/jquery.layout.js"></script>
9395
<script type="text/javascript" src="../source/stable/callbacks/jquery.layout.resizeTabLayout.js"></script>
94-
<script type="text/javascript" src="js/debug.js"></script>
9596

9697
<script type="text/javascript">
9798

@@ -257,7 +258,7 @@
257258

258259
</div>
259260

260-
<div class="middle-west container container hidden">
261+
<div class="middle-west container hidden">
261262
<div>Outer West</div>
262263
<div class="ui-widget-content">Outer West content</div>
263264
</div>

layout.jquery.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "layout",
33
"title": "UI Layout",
4-
"description": "jQuery plugin for advanced UI layouts with sizable, collapsible, nested panels.",
5-
"version": "1.4.2",
4+
"description": "Create advanced UI layouts with sizable, collapsible, nested panels and tons of options. Layout can create any UI look you want; from simple headers or sidebars to a complex application with toolbars, menus, help-panels, status bars, sub-forms, etc. Integrates with and enhances other UI widgets, like tabs, accordions and dialogs, to create rich interfaces.",
5+
"version": "1.4.3",
66
"keywords": [
77
"ui",
88
"layout"
@@ -14,7 +14,7 @@
1414
"maintainers": [
1515
{ "name": "Kevin Dalman",
1616
"email": "[email protected]",
17-
"url": "http://gnarf.net"
17+
"url": "http://layout.jquery-dev.com"
1818
}
1919
],
2020
"licenses": [
@@ -26,9 +26,9 @@
2626
}
2727
],
2828
"homepage": "https://github.com/allpro/layout",
29-
"docs": "https://github.com/allpro/layout",
29+
"docs": "http://layout.jquery-dev.com/documentation.cfm",
3030
"bugs": "https://groups.google.com/forum/#!forum/jquery-ui-layout",
31-
"download": "http://code.jquery.com/#layout",
31+
"download": "https://github.com/allpro/layout/archive/master.zip",
3232
"dependencies": {
3333
"jquery": ">=1.5"
3434
}

source/stable/jquery.layout.js

Lines changed: 43 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/**
22
* @preserve
3-
* jquery.layout 1.4.2
4-
* $Date: 2014-08-09 08:00:00 (Sat, 9 Aug 2014) $
5-
* $Rev: 1.0402 $
3+
* jquery.layout 1.4.3
4+
* $Date: 2014-08-30 08:00:00 (Sat, 30 Aug 2014) $
5+
* $Rev: 1.0403 $
66
*
77
* Copyright (c) 2014 Kevin Dalman (http://jquery-dev.com)
88
* Based on work by Fabrizio Balliano (http://www.fabrizioballiano.net)
@@ -65,8 +65,8 @@ var min = Math.min
6565
*/
6666
$.layout = {
6767

68-
version: "1.4.2"
69-
, revision: 1.0402 // eg: 1.4.1 final = 1.0401 - major(n+).minor(nn)+patch(nn+)
68+
version: "1.4.3"
69+
, revision: 1.0403 // eg: 1.4.1 final = 1.0401 - major(n+).minor(nn)+patch(nn+)
7070

7171
// $.layout.browser REPLACES $.browser
7272
, browser: {} // set below
@@ -323,8 +323,8 @@ $.layout = {
323323
, scrollbarWidth: function () { return window.scrollbarWidth || $.layout.getScrollbarSize('width'); }
324324
, scrollbarHeight: function () { return window.scrollbarHeight || $.layout.getScrollbarSize('height'); }
325325
, getScrollbarSize: function (dim) {
326-
var $c = $('<div style="position: absolute; top: -10000px; left: -10000px; width: 100px; height: 100px; overflow: scroll;"></div>').appendTo("body");
327-
var d = { width: $c.css("width") - $c[0].clientWidth, height: $c.height() - $c[0].clientHeight };
326+
var $c = $('<div style="position: absolute; top: -10000px; left: -10000px; width: 100px; height: 100px; border: 0; overflow: scroll;"></div>').appendTo("body")
327+
, d = { width: $c.outerWidth - $c[0].clientWidth, height: 100 - $c[0].clientHeight };
328328
$c.remove();
329329
window.scrollbarWidth = d.width;
330330
window.scrollbarHeight = d.height;
@@ -466,7 +466,8 @@ $.layout = {
466466
// a 'calculated' outerHeight can be passed so borders and/or padding are removed if needed
467467
if (outerWidth <= 0) return 0;
468468

469-
var bs = !$.layout.browser.boxModel ? "border-box" : $.support.boxSizing ? $E.css("boxSizing") : "content-box"
469+
var lb = $.layout.browser
470+
, bs = !lb.boxModel ? "border-box" : lb.boxSizing ? $E.css("boxSizing") : "content-box"
470471
, b = $.layout.borderWidth
471472
, n = $.layout.cssNum
472473
, W = outerWidth
@@ -491,7 +492,8 @@ $.layout = {
491492
// a 'calculated' outerHeight can be passed so borders and/or padding are removed if needed
492493
if (outerHeight <= 0) return 0;
493494

494-
var bs = !$.layout.browser.boxModel ? "border-box" : $.support.boxSizing ? $E.css("boxSizing") : "content-box"
495+
var lb = $.layout.browser
496+
, bs = !lb.boxModel ? "border-box" : lb.boxSizing ? $E.css("boxSizing") : "content-box"
495497
, b = $.layout.borderWidth
496498
, n = $.layout.cssNum
497499
, H = outerHeight
@@ -628,32 +630,37 @@ $.layout = {
628630
* $.layout.browser REPLACES removed $.browser, with extra data
629631
* Parsing code here adapted from jQuery 1.8 $.browse
630632
*/
631-
var u = navigator.userAgent.toLowerCase()
632-
, m = /(chrome)[ \/]([\w.]+)/.exec( u )
633-
|| /(webkit)[ \/]([\w.]+)/.exec( u )
634-
|| /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( u )
635-
|| /(msie) ([\w.]+)/.exec( u )
636-
|| u.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( u )
637-
|| []
638-
, b = m[1] || ""
639-
, v = m[2] || 0
640-
, ie = b === "msie"
641-
, cm = document.compatMode
642-
, bm = !ie || !cm || cm === 'CSS1Compat' || $.support.boxModel || false
643-
;
644-
$.layout.browser = {
645-
version: v
646-
, safari: b === "webkit" // webkit (NOT chrome) = safari
647-
, webkit: b === "chrome" // chrome = webkit
648-
, msie: ie
649-
, isIE6: ie && v == 6
650-
// ONLY IE reverts to old box-model - Note that compatMode was deprecated as of IE8
651-
, boxModel: bm
652-
};
653-
if (b) $.layout.browser[b] = true; // set CURRENT browser
654-
/* OLD versions of jQuery only set $.support.boxModel after page is loaded
655-
* so if this is IE, use support.boxModel to test for quirks-mode (ONLY IE changes boxModel) */
656-
if (!bm && !cm) $(function(){ $.layout.browser.boxModel = $.support.boxModel; });
633+
(function(){
634+
var u = navigator.userAgent.toLowerCase()
635+
, m = /(chrome)[ \/]([\w.]+)/.exec( u )
636+
|| /(webkit)[ \/]([\w.]+)/.exec( u )
637+
|| /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( u )
638+
|| /(msie) ([\w.]+)/.exec( u )
639+
|| u.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( u )
640+
|| []
641+
, b = m[1] || ""
642+
, v = m[2] || 0
643+
, ie = b === "msie"
644+
, cm = document.compatMode
645+
, $s = $.support
646+
, bs = $s.boxSizing !== undefined ? $s.boxSizing : $s.boxSizingReliable
647+
, bm = !ie || !cm || cm === "CSS1Compat" || $s.boxModel || false
648+
, lb = $.layout.browser = {
649+
version: v
650+
, safari: b === "webkit" // webkit (NOT chrome) = safari
651+
, webkit: b === "chrome" // chrome = webkit
652+
, msie: ie
653+
, isIE6: ie && v == 6
654+
// ONLY IE reverts to old box-model - Note that compatMode was deprecated as of IE8
655+
, boxModel: bm
656+
, boxSizing: !!(typeof bs === "function" ? bs() : bs)
657+
};
658+
;
659+
if (b) lb[b] = true; // set CURRENT browser
660+
/* OLD versions of jQuery only set $.support.boxModel after page is loaded
661+
* so if this is IE, use support.boxModel to test for quirks-mode (ONLY IE changes boxModel) */
662+
if (!bm && !cm) $(function(){ lb.boxModel = $s.boxModel; });
663+
})();
657664

658665

659666
// DEFAULT OPTIONS
@@ -2908,8 +2915,7 @@ $.fn.layout = function (opts) {
29082915
, z = options.zIndexes
29092916
, isIframe, el, $M, css, i
29102917
;
2911-
$Ms = $([]); // init/reset $Ms
2912-
if (!o.maskContents && !o.maskObjects) return $Ms;
2918+
if (!o.maskContents && !o.maskObjects) return $([]);
29132919
// if o.maskObjects=true, then loop TWICE to create BOTH kinds of mask, else only create a DIV
29142920
for (i=0; i < (o.maskObjects ? 2 : 1); i++) {
29152921
isIframe = o.maskObjects && i==0;

0 commit comments

Comments
 (0)