X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=roojs-core-debug.js;h=d64393b5ab4664df69f4b49218039d6bb42f4c13;hb=7e3002584cb7fc8681da1d57855309b65749866d;hp=697592cc33ae6a3a9dd8a0feda6f2a738e66993c;hpb=d0b79e9bda4e08f7240e8c824bfc643d4f16b78e;p=roojs1 diff --git a/roojs-core-debug.js b/roojs-core-debug.js index 697592cc33..d64393b5ab 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 - *