isMac = (ua.indexOf("macintosh") != -1 || ua.indexOf("mac os x") != -1),
isLinux = (ua.indexOf("linux") != -1),
isSecure = window.location.href.toLowerCase().indexOf("https") === 0,
+ isIOS = /iphone|ipad/.test(ua),
isTouch = (function() {
try {
document.createEvent("TouchEvent");
/** @type Boolean */
isMac : isMac,
/** @type Boolean */
+ isIOS : isIOS,
+ /** @type Boolean */
isTouch : isTouch,
/**
if(attr=="cls" && Roo.isIE){
el.className = o["cls"];
}else{
- if(useSet) el.setAttribute(attr=="cls" ? 'class' : attr, o[attr]);
- else el[attr] = o[attr];
+ if(useSet) { el.setAttribute(attr=="cls" ? 'class' : attr, o[attr]);}
+ else {
+ el[attr] = o[attr];
+ }
}
}
Roo.DomHelper.applyStyles(el, o.style);
if(Roo.isLinux){
cls.push("roo-linux");
}
+ if(Roo.isIOS){
+ cls.push("roo-ios");
+ }
+ if(Roo.isTouch){
+ cls.push("roo-touch");
+ }
if(Roo.isBorderBox){
cls.push('roo-border-box');
}
* @type String
*/
defaultUnit : "px",
+
/**
* Sets the element's visibility mode. When setVisible() is called it
* will use this to determine whether to set the visibility or the display property.
// we wander
var z = 0;
- var dom = this.dom
+ var dom = this.dom;
while (dom && dom.style) {
if (!isNaN(parseInt(dom.style.zIndex))) {
z = Math.max(z, parseInt(dom.style.zIndex));
*/
add : function(key, o){
if(arguments.length == 1){
- o = key; //arguments[0];
+ o = arguments[0];
key = this.getKey(o);
}
if(typeof key == "undefined" || key === null){