var pat = target.jqmData( 'pat' ),
hour,
- text;
+ text,
+ self = this;
+
switch ( pat ) {
case 'H':
case 'HH':
if ( target.text() != text ) {
if ( target.hasClass("ui-datefield-selected") ) {
target.addClass("out");
+ this._new_value = text;
target.animationComplete( function () {
- target.text( text );
+ target.text( self._new_value);
target.addClass("in")
.removeClass("out");
this.ui = $('<div class="ui-datefield"></div>');
$(this.element).after( this.ui );
+ this._popup_open = false;
this.ui.bind('vclick', function ( e ) {
obj._showDataSelector( obj, this, e.target );
});
$ctx,
$li,
i,
- newLeft = 10;
+ newLeft = 10,
+ self = this;
if ( !attr ) {
return;
if ( !field ) {
return;
}
+ if ( this._popup_open ) {
+ return;
+ }
target.not('.ui-datefield-seperator').addClass('ui-datefield-selected');
$ctx.popupwindow( 'open',
target.offset().left + ( target.width() / 2 ) + newLeft - window.pageXOffset ,
target.offset().top + target.height() - window.pageYOffset );
+
+ this._popup_open = true;
+
$div.bind('popupafterclose', function ( e ) {
if ( obj._reflow ) {
$(window).unbind("resize", obj._reflow);
obj._reflow = null;
}
+
+ if ( !( target.hasClass("in") || target.hasClass("out") ) ) {
+ target.removeClass("ui-datefield-selected");
+ }
+
$div.unbind( 'popupafterclose' );
$ul.unbind( 'vclick' );
$(obj).unbind( 'update' );
$ctx.popupwindow( 'destroy' );
$div.remove();
+
+ self._popup_open = false;
});
$(obj).bind( 'update', function ( e, val ) {