diff options
Diffstat (limited to 'css/yaml4/add-ons/syncheight')
| -rw-r--r-- | css/yaml4/add-ons/syncheight/.svn/all-wcprops | 11 | ||||
| -rw-r--r-- | css/yaml4/add-ons/syncheight/.svn/entries | 69 | ||||
| -rw-r--r-- | css/yaml4/add-ons/syncheight/.svn/format | 1 | ||||
| -rw-r--r-- | css/yaml4/add-ons/syncheight/.svn/text-base/jquery.syncheight.js.svn-base | 88 | ||||
| -rw-r--r-- | css/yaml4/add-ons/syncheight/jquery.syncheight.js | 88 |
5 files changed, 257 insertions, 0 deletions
diff --git a/css/yaml4/add-ons/syncheight/.svn/all-wcprops b/css/yaml4/add-ons/syncheight/.svn/all-wcprops new file mode 100644 index 0000000..251a71b --- /dev/null +++ b/css/yaml4/add-ons/syncheight/.svn/all-wcprops @@ -0,0 +1,11 @@ +K 25 +svn:wc:ra_dav:version-url +V 85 +/svn/Themis/!svn/ver/202/ccwn-themis-static/trunk/WebContent/yaml4/add-ons/syncheight +END +jquery.syncheight.js +K 25 +svn:wc:ra_dav:version-url +V 106 +/svn/Themis/!svn/ver/202/ccwn-themis-static/trunk/WebContent/yaml4/add-ons/syncheight/jquery.syncheight.js +END diff --git a/css/yaml4/add-ons/syncheight/.svn/entries b/css/yaml4/add-ons/syncheight/.svn/entries new file mode 100644 index 0000000..53e9ca5 --- /dev/null +++ b/css/yaml4/add-ons/syncheight/.svn/entries @@ -0,0 +1,69 @@ +9 + +dir +206 +https://intern.ccwn.org/svn/Themis/ccwn-themis-static/trunk/WebContent/yaml4/add-ons/syncheight +https://intern.ccwn.org/svn/Themis + + + +2012-03-01T08:51:06.040110Z +202 +pseeger + + +svn:special svn:externals svn:needs-lock + + + + + + + + + + + +e7c95c98-50ad-428d-8ede-669ef7f8c951 + + + + + + +0 + +jquery.syncheight.js +file + + + + +2012-01-03T18:05:36.000000Z +54a7f40a4def0c527bc34065d4dea578 +2012-03-01T08:51:06.040110Z +202 +pseeger + + + + + + + + + + + + + + + + + + + + + +2267 + diff --git a/css/yaml4/add-ons/syncheight/.svn/format b/css/yaml4/add-ons/syncheight/.svn/format new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/css/yaml4/add-ons/syncheight/.svn/format @@ -0,0 +1 @@ +9 diff --git a/css/yaml4/add-ons/syncheight/.svn/text-base/jquery.syncheight.js.svn-base b/css/yaml4/add-ons/syncheight/.svn/text-base/jquery.syncheight.js.svn-base new file mode 100644 index 0000000..4dd818d --- /dev/null +++ b/css/yaml4/add-ons/syncheight/.svn/text-base/jquery.syncheight.js.svn-base @@ -0,0 +1,88 @@ +/** + * syncHeight - jQuery plugin to automagically Snyc the heights of columns + * Made to seemlessly work with the CCS-Framework YAML (yaml.de) + * @requires jQuery v1.0.3 + * + * http://blog.ginader.de/dev/syncheight/ + * + * Copyright (c) 2007-2009 + * Dirk Ginader (ginader.de) + * Dirk Jesse (yaml.de) + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + * Version: 1.2 + * + * Usage: + $(window).load(function(){ + $('p').syncHeight(); + }); + */ + +(function($) { + var getHeightProperty = function() { + var browser_id = 0; + var property = [ + // To avoid content overflow in synchronised boxes on font scaling, we + // use 'min-height' property for modern browsers ... + ['min-height','0px'], + // and 'height' property for Internet Explorer. + ['height','1%'] + ]; + + // check for IE6 ... + if($.browser.msie && $.browser.version < 7){ + browser_id = 1; + } + + return { 'name': property[browser_id][0], + 'autoheightVal': property[browser_id][1] }; + }; + + $.getSyncedHeight = function(selector) { + var max = 0; + var heightProperty = getHeightProperty(); + // get maximum element height ... + $(selector).each(function() { + // fallback to auto height before height check ... + $(this).css(heightProperty.name, heightProperty.autoheightVal); + var val = $(this).height(); + if(val > max){ + max = val; + } + }); + return max; + }; + + $.fn.syncHeight = function(config) { + var defaults = { + updateOnResize: false, // re-sync element heights after a browser resize event (useful in flexible layouts) + height: false + }; + var options = $.extend(defaults, config); + + var e = this; + + var max = 0; + var heightPropertyName = getHeightProperty().name; + + if(typeof(options.height) === "number") { + max = options.height; + } else { + max = $.getSyncedHeight(this); + } + // set synchronized element height ... + $(this).each(function() { + $(this).css(heightPropertyName, max+'px'); + }); + + // optional sync refresh on resize event ... + if (options.updateOnResize === true) { + $(window).resize(function(){ + $(e).syncHeight(); + }); + } + return this; + }; +})(jQuery);
\ No newline at end of file diff --git a/css/yaml4/add-ons/syncheight/jquery.syncheight.js b/css/yaml4/add-ons/syncheight/jquery.syncheight.js new file mode 100644 index 0000000..4dd818d --- /dev/null +++ b/css/yaml4/add-ons/syncheight/jquery.syncheight.js @@ -0,0 +1,88 @@ +/** + * syncHeight - jQuery plugin to automagically Snyc the heights of columns + * Made to seemlessly work with the CCS-Framework YAML (yaml.de) + * @requires jQuery v1.0.3 + * + * http://blog.ginader.de/dev/syncheight/ + * + * Copyright (c) 2007-2009 + * Dirk Ginader (ginader.de) + * Dirk Jesse (yaml.de) + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + * Version: 1.2 + * + * Usage: + $(window).load(function(){ + $('p').syncHeight(); + }); + */ + +(function($) { + var getHeightProperty = function() { + var browser_id = 0; + var property = [ + // To avoid content overflow in synchronised boxes on font scaling, we + // use 'min-height' property for modern browsers ... + ['min-height','0px'], + // and 'height' property for Internet Explorer. + ['height','1%'] + ]; + + // check for IE6 ... + if($.browser.msie && $.browser.version < 7){ + browser_id = 1; + } + + return { 'name': property[browser_id][0], + 'autoheightVal': property[browser_id][1] }; + }; + + $.getSyncedHeight = function(selector) { + var max = 0; + var heightProperty = getHeightProperty(); + // get maximum element height ... + $(selector).each(function() { + // fallback to auto height before height check ... + $(this).css(heightProperty.name, heightProperty.autoheightVal); + var val = $(this).height(); + if(val > max){ + max = val; + } + }); + return max; + }; + + $.fn.syncHeight = function(config) { + var defaults = { + updateOnResize: false, // re-sync element heights after a browser resize event (useful in flexible layouts) + height: false + }; + var options = $.extend(defaults, config); + + var e = this; + + var max = 0; + var heightPropertyName = getHeightProperty().name; + + if(typeof(options.height) === "number") { + max = options.height; + } else { + max = $.getSyncedHeight(this); + } + // set synchronized element height ... + $(this).each(function() { + $(this).css(heightPropertyName, max+'px'); + }); + + // optional sync refresh on resize event ... + if (options.updateOnResize === true) { + $(window).resize(function(){ + $(e).syncHeight(); + }); + } + return this; + }; +})(jQuery);
\ No newline at end of file |
