X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=roojs-core-debug.js;h=f2e187a957790a87f4d4093e1e2f8cce081d849b;hb=5b558a29c3937039fd3e5fbff2fde0026d4e64f1;hp=54ce8c6b7ccff17237e40afdac945446e5444c5b;hpb=548db99acb22d3a26a190b77728b3b77575d93e1;p=roojs1 diff --git a/roojs-core-debug.js b/roojs-core-debug.js index 54ce8c6b7c..f2e187a957 100644 --- a/roojs-core-debug.js +++ b/roojs-core-debug.js @@ -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' + } + + } }); @@ -4336,7 +4359,7 @@ Roo.DomHelper = function(){ var ieTable = function(depth, s, h, e){ tempTableEl.innerHTML = [s, h, e].join(''); var i = -1, el = tempTableEl; - while(++i < depth){ + while(++i < depth && el.firstChild){ el = el.firstChild; } return el;