", {"class":uid+'flipcenter ui-overlay-shadow'}).css('pointerEvents', 'none').appendTo(w.d.intHTML);
if ( o.useSetButton ) {
y = $('
', {'class':uid+'controls'});
if ( o.useSetButton ) {
$('
'+w.__('customSet')+'')
.appendTo(y).buttonMarkup({theme: o.theme, icon: 'check', iconpos: 'left', corners:true, shadow:true})
.on(o.clickEventAlt, function(e) {
e.preventDefault();
w.d.input.trigger('datebox', {'method':'set', 'value':w._formatter(o.customFormat,w.customCurrent), 'date':w.tireChoice});
w.d.input.trigger('datebox', {'method':'close'});
});
}
y.appendTo(w.d.intHTML);
}
if ( w.wheelExists ) { // Mousewheel operation, if plugin is loaded
w.d.intHTML.on('mousewheel', '.ui-overlay-shadow', function(e,d) {
e.preventDefault();
w._cubox_offset($(this).jqmData('field'), ((d<0)?1:-1)*$(this).jqmData('amount'));
});
}
w.d.intHTML.on(w.drag.eStart, 'ul', function(e,f) {
if ( !w.drag.move ) {
if ( typeof f !== "undefined" ) { e = f; }
w.drag.move = true;
w.drag.target = $(this).find('li').first();
w.drag.pos = parseInt(w.drag.target.css('marginTop').replace(/px/i, ''),10);
w.drag.start = w.touch ? e.originalEvent.changedTouches[0].pageY : e.pageY;
w.drag.end = false;
e.stopPropagation();
e.preventDefault();
}
});
w.d.intHTML.on(w.drag.eStart, '.'+uid+'flipcenter', function(e) { // Used only on old browsers and IE.
if ( !w.drag.move ) {
w.drag.target = w.touch ? e.originalEvent.changedTouches[0].pageX - $(e.currentTarget).offset().left : e.pageX - $(e.currentTarget).offset().left;
w.drag.tmp = w.d.intHTML.find('.'+uid+'flipcenter').innerWidth() / (( $.inArray('a', w.fldOrder) > -1 && w.__('timeFormat') !== 12 )?w.fldOrder.length-1:w.fldOrder.length);
$(w.d.intHTML.find('ul').get(parseInt(w.drag.target / w.drag.tmp,10))).trigger(w.drag.eStart,e);
}
});
}
});
$.extend( $.mobile.datebox.prototype._drag, {
// This contains the code that the drag and drop (or touch move) code uses
'customflip': function() {
var w = this,
o = this.options,
g = this.drag;
$(document).on(g.eMove, function(e) {
if ( g.move && o.mode === 'customflip' ) {
g.end = w.touch ? e.originalEvent.changedTouches[0].pageY : e.pageY;
g.target.css('marginTop', (g.pos + g.end - g.start) + 'px');
e.preventDefault();
e.stopPropagation();
return false;
}
});
$(document).on(g.eEnd, function(e) {
if ( g.move && o.mode === 'customflip' ) {
g.move = false;
if ( g.end !== false ) {
e.preventDefault();
e.stopPropagation();
g.tmp = g.target.parent().parent();
w._cubox_offset(g.tmp.jqmData('field'), (parseInt((g.start - g.end) / g.target.innerHeight(),10) * g.tmp.jqmData('amount')));
}
g.start = false;
g.end = false;
}
});
}
});
})( jQuery );