X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=roojs-debug.js;h=8d917e931d58057c683eaf862991008c5684582d;hb=7e3002584cb7fc8681da1d57855309b65749866d;hp=84a06ea9c1891cb96b31c126f10858cdd65458fc;hpb=bbffc0b989d2060200417fd91bab3b8fe98b65f1;p=roojs1 diff --git a/roojs-debug.js b/roojs-debug.js index 84a06ea9c1..8d917e931d 100644 --- a/roojs-debug.js +++ b/roojs-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 - *