vendor/assets/javascripts/webshims/shims/forms-picker.js in webshims-rails-1.14.4 vs vendor/assets/javascripts/webshims/shims/forms-picker.js in webshims-rails-1.14.5
- old
+ new
@@ -1493,11 +1493,11 @@
picker.commonDateInit = function(data, popover){
if(data._commonDateInit){return;}
data._commonDateInit = true;
var o = data.options;
var actionfn = function(e){
- if(!$(this).is('.othermonth') || $(this).css('cursor') == 'pointer'){
+ if(!$(this).hasClass('othermonth') || $(this).css('cursor') == 'pointer'){
popover.actionFn({
'data-action': $.attr(this, 'data-action'),
value: $(this).val() || $.attr(this, 'value')
});
}
@@ -1548,16 +1548,16 @@
o.minS.push(tmpMinMax[1]);
}
$('button', popover.buttonRow).each(function(){
var text;
- if($(this).is('.ws-empty')){
+ if($(this).hasClass('ws-empty')){
text = curCfg.date.clear;
if(!text){
text = formcfg[''].date.clear || 'clear';
webshims.warn("could not get clear text from form cfg");
}
- } else if($(this).is('.ws-current')){
+ } else if($(this).hasClass('ws-current')){
text = (curCfg[data.type] || {}).currentText;
if(!text){
text = (formcfg[''][[data.type]] || {}).currentText || (curCfg.date || {}).currentText || 'current';
webshims.warn("could not get currentText from form cfg for "+data.type);
}