|
|
|
@ -102,20 +102,25 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
//jquery mobile and jquery ui
|
|
|
|
|
if(!$.widget){ |
|
|
|
|
if(!$.widget && (!$.pluginFactory || !$.pluginFactory.mixin)){ |
|
|
|
|
(function(){ |
|
|
|
|
var _cleanData = $.cleanData; |
|
|
|
|
$.cleanData = function( elems ) { |
|
|
|
|
if(!$.widget){ |
|
|
|
|
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { |
|
|
|
|
$.cleanData = (function( orig ) { |
|
|
|
|
return function( elems ) { |
|
|
|
|
var events, elem, i; |
|
|
|
|
for ( i = 0; (elem = elems[i]) != null; i++ ) { |
|
|
|
|
try { |
|
|
|
|
$( elem ).triggerHandler( "remove" ); |
|
|
|
|
// http://bugs.jquery.com/ticket/8235
|
|
|
|
|
} catch( e ) {} |
|
|
|
|
// Only trigger remove when necessary to save time
|
|
|
|
|
events = $._data( elem, "events" ); |
|
|
|
|
if ( events && events.remove ) { |
|
|
|
|
$( elem ).triggerHandler( "remove" ); |
|
|
|
|
} |
|
|
|
|
// http://bugs.jquery.com/ticket/8235
|
|
|
|
|
} catch ( e ) {} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
_cleanData( elems ); |
|
|
|
|
}; |
|
|
|
|
orig( elems ); |
|
|
|
|
}; |
|
|
|
|
})( $.cleanData ); |
|
|
|
|
})(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -536,7 +541,7 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
|
|
|
|
|
return id; |
|
|
|
|
}; |
|
|
|
|
})(), |
|
|
|
|
domPrefixes: ["ws", "webkit", "moz", "ms", "o"], |
|
|
|
|
domPrefixes: ["webkit", "moz", "ms", "o", "ws"], |
|
|
|
|
|
|
|
|
|
prefixed: function (prop, obj){ |
|
|
|
|
var i, testProp; |
|
|
|
@ -2275,9 +2280,13 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
|
|
|
|
|
}, |
|
|
|
|
time: function(val, o, noCorrect){ |
|
|
|
|
var fVal, i; |
|
|
|
|
|
|
|
|
|
if(val){ |
|
|
|
|
|
|
|
|
|
val = val.split(':'); |
|
|
|
|
if(val.length != 2 || isNaN(parseInt(val[0] || '', 10)) || isNaN(parseInt(val[1] || '', 10))){ |
|
|
|
|
return val.join(':'); |
|
|
|
|
} |
|
|
|
|
if(curCfg.meridian){ |
|
|
|
|
fVal = (val[0] * 1); |
|
|
|
|
if(fVal && fVal >= 12){ |
|
|
|
@ -2432,6 +2441,7 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
|
|
|
|
|
createFormat('d'); |
|
|
|
|
var tmp, obj; |
|
|
|
|
var ret = ''; |
|
|
|
|
|
|
|
|
|
if(opts.splitInput){ |
|
|
|
|
obj = {yy: 0, mm: 1, dd: 2}; |
|
|
|
|
} else { |
|
|
|
@ -2453,8 +2463,7 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
|
|
|
|
|
} |
|
|
|
|
ret = ([addZero(val[obj.yy]), addZero(val[obj.mm]), addZero(val[obj.dd])]).join('-'); |
|
|
|
|
} |
|
|
|
|
return ret |
|
|
|
|
; |
|
|
|
|
return ret; |
|
|
|
|
}, |
|
|
|
|
color: function(val, opts){ |
|
|
|
|
var ret = '#000000'; |
|
|
|
@ -2756,9 +2765,11 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
['defaultValue', 'value'].forEach(function(name){ |
|
|
|
|
var formatName = 'format'+name; |
|
|
|
|
wsWidgetProto[name] = function(val, force){ |
|
|
|
|
if(!this._init || force || val !== this.options[name]){ |
|
|
|
|
this.element.prop(name, this.formatValue(val)); |
|
|
|
|
if(!this._init || force || val !== this.options[name] || this.options[formatName] != this.element.prop(name)){ |
|
|
|
|
this.options[formatName] = this.formatValue(val); |
|
|
|
|
this.element.prop(name, this.options[formatName]); |
|
|
|
|
this.options[name] = val; |
|
|
|
|
this._propertyChange(name); |
|
|
|
|
this.mirrorValidity(); |
|
|
|
@ -2882,36 +2893,34 @@ webshims.register('dom-extend', function($, webshims, window, document, undefine
|
|
|
|
|
var isValue = name == 'value'; |
|
|
|
|
spinBtnProto[name] = function(val, force, isLive){ |
|
|
|
|
var selectionEnd; |
|
|
|
|
if(!this._init || force || this.options[name] !== val){ |
|
|
|
|
if(isValue){ |
|
|
|
|
this._beforeValue(val); |
|
|
|
|
} else { |
|
|
|
|
this.elemHelper.prop(name, val); |
|
|
|
|
} |
|
|
|
|
if(isValue){ |
|
|
|
|
this._beforeValue(val); |
|
|
|
|
} else { |
|
|
|
|
this.elemHelper.prop(name, val); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
val = formatVal[this.type](val, this.options); |
|
|
|
|
if(this.options.splitInput){ |
|
|
|
|
$.each(this.splits, function(i, elem){ |
|
|
|
|
var setOption; |
|
|
|
|
if(!(name in elem) && !isValue && $.nodeName(elem, 'select')){ |
|
|
|
|
$('option[value="'+ val[i] +'"]', elem).prop('defaultSelected', true); |
|
|
|
|
} else { |
|
|
|
|
$.prop(elem, name, val[i]); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
val = this.toFixed(val); |
|
|
|
|
if(isLive && this._getSelectionEnd){ |
|
|
|
|
selectionEnd = this._getSelectionEnd(val); |
|
|
|
|
} |
|
|
|
|
this.element.prop(name, val); |
|
|
|
|
if(selectionEnd != null){ |
|
|
|
|
this.element.prop('selectionEnd', selectionEnd); |
|
|
|
|
val = formatVal[this.type](val, this.options); |
|
|
|
|
if(this.options.splitInput){ |
|
|
|
|
$.each(this.splits, function(i, elem){ |
|
|
|
|
var setOption; |
|
|
|
|
if(!(name in elem) && !isValue && $.nodeName(elem, 'select')){ |
|
|
|
|
$('option[value="'+ val[i] +'"]', elem).prop('defaultSelected', true); |
|
|
|
|
} else { |
|
|
|
|
$.prop(elem, name, val[i]); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
val = this.toFixed(val); |
|
|
|
|
if(isLive && this._getSelectionEnd){ |
|
|
|
|
selectionEnd = this._getSelectionEnd(val); |
|
|
|
|
} |
|
|
|
|
this.element.prop(name, val); |
|
|
|
|
if(selectionEnd != null){ |
|
|
|
|
this.element.prop('selectionEnd', selectionEnd); |
|
|
|
|
} |
|
|
|
|
this._propertyChange(name); |
|
|
|
|
this.mirrorValidity(); |
|
|
|
|
} |
|
|
|
|
this._propertyChange(name); |
|
|
|
|
this.mirrorValidity(); |
|
|
|
|
}; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|