X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=roojs-core-debug.js;h=c94cbef5d511baa18ffda3a3689a969c72ed1d2d;hb=ef4885eb1a4bc02ed4aab9d21e225dc02ac9db4f;hp=dbe892c8ced6b95bb3d3d03e0220b9b8bc38374b;hpb=8d05087bde0afb1a31df3ee4ae78f3f439acc372;p=roojs1 diff --git a/roojs-core-debug.js b/roojs-core-debug.js index dbe892c8ce..c94cbef5d5 100644 --- a/roojs-core-debug.js +++ b/roojs-core-debug.js @@ -19,7 +19,7 @@ window["undefined"] = window["undefined"]; /** * @class Roo * Roo core utilities and functions. - * @singleton + * @static */ var Roo = {}; /** @@ -668,7 +668,30 @@ Roo.factory(conf, Roo.data); { var node = Roo.DomQuery.selectNode(selector,root); return node ? Roo.get(node) : new Roo.Element(false); - } + }, + /** + * Find the current bootstrap width Grid size + * Note xs is the default for smaller.. - this is currently used by grids to render correct columns + * @returns {String} (xs|sm|md|lg|xl) + */ + + getGridSize : function() + { + var w = Roo.lib.Dom.getViewWidth(); + switch(true) { + case w > 1200: + return 'xl'; + case w > 992: + return 'lg'; + case w > 768: + return 'md'; + case w > 576: + return 'sm'; + default: + return 'xs' + } + + } }); @@ -1855,22 +1878,13 @@ Date.prototype.add = function(interval, value){ } return d; }; -/* - * Based on: - * Ext JS Library 1.1.1 - * Copyright(c) 2006-2007, Ext JS, LLC. - * - * Originally Released Under LGPL - original licence link has changed is not relivant. - * - * Fork - LGPL - *