X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=roojs-core-debug.js;h=d64393b5ab4664df69f4b49218039d6bb42f4c13;hb=7e3002584cb7fc8681da1d57855309b65749866d;hp=f0d331d0547afd170e6be24d0ab3d26643147b40;hpb=a0e5c9d5795ccc19b23d04616ea44808d9a9c43f;p=roojs1 diff --git a/roojs-core-debug.js b/roojs-core-debug.js index f0d331d054..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 = {}; /** @@ -50,9 +50,6 @@ Roo.apply = function(o, c, defaults){ var idSeed = 0; var ua = navigator.userAgent.toLowerCase(); - console.log('-------ua---------'); - console.log(ua); - var isStrict = document.compatMode == "CSS1Compat", isOpera = ua.indexOf("opera") > -1, isSafari = (/webkit|khtml/).test(ua), @@ -345,8 +342,8 @@ Roo.factory(conf, Roo.data); if ((typeof(console) == 'undefined') || (typeof(console.log) == 'undefined')) { return; // alerT? } - console.log(s); + console.log(s); }, /** * Takes an object and converts it to an encoded URL. e.g. Roo.urlEncode({foo: 1, bar: 2}); would return "foo=1&bar=2". Optionally, property values can be arrays, instead of keys and the resulting string that's returned will contain a name/value pair for each array value. @@ -633,6 +630,8 @@ Roo.factory(conf, Roo.data); /** @type Boolean */ isIE11 : isIE11, /** @type Boolean */ + isEdge : isEdge, + /** @type Boolean */ isGecko : isGecko, /** @type Boolean */ isBorderBox : isBorderBox, @@ -669,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' + } + + } }); @@ -886,6 +908,8 @@ var s = String.format('