forked from openlp/openlp
Fix up the last of the packaging issues and increase test coverage of systemplayer to 100%
Add this to your merge proposal: -------------------------------- lp:~raoul-snyman/openlp/re-enable-version-checking-2.4 (revision 2656) [SUCCESS] https://ci.openlp.io/job/Branch-01-Pull/1783/ [SUCCESS] https://ci.openlp.io/job/Branch-02-Functional-Tests/1694/ [SUCCESS] https://ci.openlp.io/job/Branch-03-Interface-Tests/1632/ [SUCCESS] https://ci.openlp.io/job/Branch-04a-Windows_Functional_Tests/1388/ ... bzr-revno: 2655
This commit is contained in:
commit
4f36d6e12a
|
@ -159,7 +159,6 @@ class GeneralTab(SettingsTab):
|
|||
self.startup_layout.addWidget(self.show_splash_check_box)
|
||||
self.check_for_updates_check_box = QtWidgets.QCheckBox(self.startup_group_box)
|
||||
self.check_for_updates_check_box.setObjectName('check_for_updates_check_box')
|
||||
self.check_for_updates_check_box.setVisible(False)
|
||||
self.startup_layout.addWidget(self.check_for_updates_check_box)
|
||||
self.right_layout.addWidget(self.startup_group_box)
|
||||
# Application Settings
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* jQuery Mobile Framework Git Build: SHA1: 27e3c18acfebab2d47ee7ed37bd50fc4942c8838 <> Date: Fri Mar 22 08:50:04 2013 -0600
|
||||
* jQuery Mobile Framework Git Build: SHA1: b49cc06499abf8f987cf90f35349cfac0918c939 <> Date: Tue Oct 2 11:22:34 2012 -0700
|
||||
* http://jquerymobile.com
|
||||
*
|
||||
* Copyright 2010, 2013 jQuery Foundation, Inc. and other contributors
|
||||
* Copyright 2012 jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
|
@ -29,7 +29,7 @@
|
|||
$.mobile = $.extend( {}, {
|
||||
|
||||
// Version of the jQuery Mobile Framework
|
||||
version: "1.2.1",
|
||||
version: "1.2.0",
|
||||
|
||||
// Namespace used framework-wide for data-attrs. Default is no namespace
|
||||
ns: "",
|
||||
|
@ -134,9 +134,6 @@
|
|||
WINDOWS: 91 // COMMAND
|
||||
},
|
||||
|
||||
// Place to store various widget extensions
|
||||
behaviors: {},
|
||||
|
||||
// Scroll page vertically: scroll to 0 to hide iOS address bar, or pass a Y value
|
||||
silentScroll: function( ypos ) {
|
||||
if ( $.type( ypos ) !== "number" ) {
|
||||
|
@ -1000,7 +997,7 @@ $.widget( "mobile.widget", {
|
|||
this.fakeFixLoader();
|
||||
$window
|
||||
.unbind( "scroll", this.checkLoaderPosition )
|
||||
.bind( "scroll", $.proxy( this.fakeFixLoader, this ) );
|
||||
.bind( "scroll", this.fakeFixLoader );
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -1085,8 +1082,8 @@ $.widget( "mobile.widget", {
|
|||
this.element.removeClass( "ui-loader-fakefix" );
|
||||
}
|
||||
|
||||
$( window ).unbind( "scroll", this.fakeFixLoader );
|
||||
$( window ).unbind( "scroll", this.checkLoaderPosition );
|
||||
$( window ).unbind( "scroll", $.proxy( this.fakeFixLoader, this) );
|
||||
$( window ).unbind( "scroll", $.proxy( this.checkLoaderPosition, this ) );
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -3538,7 +3535,6 @@ $.mobile.getMaxScrollForTransition = $.mobile.getMaxScrollForTransition || defau
|
|||
.jqmData( "url", dataUrl );
|
||||
}
|
||||
|
||||
|
||||
// If we failed to find a page in the DOM, check the URL to see if it
|
||||
// refers to the first page in the application. If it isn't a reference
|
||||
// to the first page and refers to non-existent embedded page, error out.
|
||||
|
@ -3560,7 +3556,7 @@ $.mobile.getMaxScrollForTransition = $.mobile.getMaxScrollForTransition || defau
|
|||
return deferred.promise();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// If the page we are interested in is already in the DOM,
|
||||
// and the caller did not indicate that we should force a
|
||||
// reload of the file, we are done. Otherwise, track the
|
||||
|
@ -3569,14 +3565,11 @@ $.mobile.getMaxScrollForTransition = $.mobile.getMaxScrollForTransition || defau
|
|||
if ( !settings.reloadPage ) {
|
||||
enhancePage( page, settings.role );
|
||||
deferred.resolve( absUrl, options, page );
|
||||
//if we are reloading the page make sure we update the base if its not a prefetch
|
||||
if( base && !options.prefetch ){
|
||||
base.set(url);
|
||||
}
|
||||
return deferred.promise();
|
||||
}
|
||||
dupCachedPage = page;
|
||||
}
|
||||
|
||||
var mpc = settings.pageContainer,
|
||||
pblEvent = new $.Event( "pagebeforeload" ),
|
||||
triggerData = { url: url, absUrl: absUrl, dataUrl: dataUrl, deferred: deferred, options: settings };
|
||||
|
@ -3606,9 +3599,9 @@ $.mobile.getMaxScrollForTransition = $.mobile.getMaxScrollForTransition || defau
|
|||
$.mobile.hidePageLoadingMsg();
|
||||
};
|
||||
}
|
||||
|
||||
// Reset base to the default document base.
|
||||
// only reset if we are not prefetching
|
||||
if ( base && typeof options.prefetch === "undefined" ) {
|
||||
if ( base ) {
|
||||
base.reset();
|
||||
}
|
||||
|
||||
|
@ -3642,8 +3635,8 @@ $.mobile.getMaxScrollForTransition = $.mobile.getMaxScrollForTransition || defau
|
|||
RegExp.$1 ) {
|
||||
url = fileUrl = path.getFilePath( $( "<div>" + RegExp.$1 + "</div>" ).text() );
|
||||
}
|
||||
//dont update the base tag if we are prefetching
|
||||
if ( base && typeof options.prefetch === "undefined") {
|
||||
|
||||
if ( base ) {
|
||||
base.set( fileUrl );
|
||||
}
|
||||
|
||||
|
@ -3828,6 +3821,7 @@ $.mobile.getMaxScrollForTransition = $.mobile.getMaxScrollForTransition || defau
|
|||
$.mobile.changePage( newPage, options );
|
||||
})
|
||||
.fail(function( url, options ) {
|
||||
isPageTransitioning = false;
|
||||
|
||||
//clear out the active button state
|
||||
removeActiveLinkClass( true );
|
||||
|
@ -3931,7 +3925,7 @@ $.mobile.getMaxScrollForTransition = $.mobile.getMaxScrollForTransition || defau
|
|||
// However, if a dialog is already displayed at this point, and we're
|
||||
// about to display another dialog, then we must add another hash and
|
||||
// history entry on top so that one may navigate back to the original dialog
|
||||
if ( active.url && active.url.indexOf( dialogHashKey ) > -1 && !$.mobile.activePage.is( ".ui-dialog" ) ) {
|
||||
if ( active.url.indexOf( dialogHashKey ) > -1 && !$.mobile.activePage.is( ".ui-dialog" ) ) {
|
||||
settings.changeHash = false;
|
||||
alreadyThere = true;
|
||||
}
|
||||
|
@ -4062,7 +4056,7 @@ $.mobile.getMaxScrollForTransition = $.mobile.getMaxScrollForTransition || defau
|
|||
//The following event bindings should be bound after mobileinit has been triggered
|
||||
//the following deferred is resolved in the init file
|
||||
$.mobile.navreadyDeferred = $.Deferred();
|
||||
$.mobile._registerInternalEvents = function() {
|
||||
$.mobile.navreadyDeferred.done(function() {
|
||||
//bind to form submit events, handle with Ajax
|
||||
$( document ).delegate( "form", "submit", function( event ) {
|
||||
var $this = $( this );
|
||||
|
@ -4250,7 +4244,7 @@ $.mobile.getMaxScrollForTransition = $.mobile.getMaxScrollForTransition || defau
|
|||
if ( url && $.inArray( url, urls ) === -1 ) {
|
||||
urls.push( url );
|
||||
|
||||
$.mobile.loadPage( url, { role: $link.attr( "data-" + $.mobile.ns + "rel" ),prefetch: true } );
|
||||
$.mobile.loadPage( url, { role: $link.attr( "data-" + $.mobile.ns + "rel" ) } );
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -4364,8 +4358,7 @@ $.mobile.getMaxScrollForTransition = $.mobile.getMaxScrollForTransition || defau
|
|||
$( document ).bind( "pageshow", resetActivePageHeight );
|
||||
$( window ).bind( "throttledresize", resetActivePageHeight );
|
||||
|
||||
};//navreadyDeferred done callback
|
||||
$.mobile.navreadyDeferred.done( function() { $.mobile._registerInternalEvents(); } );
|
||||
});//navreadyDeferred done callback
|
||||
|
||||
})( jQuery );
|
||||
|
||||
|
@ -4671,9 +4664,9 @@ $.widget( "mobile.dialog", $.mobile.widget, {
|
|||
$el
|
||||
.wrapInner( dialogWrap )
|
||||
.children()
|
||||
.find( ":jqmData(role='header')" ).first()
|
||||
.find( ":jqmData(role='header')" )
|
||||
.prepend( headerCloseButton )
|
||||
.end().end()
|
||||
.end()
|
||||
.children( ':first-child')
|
||||
.addClass( "ui-corner-top" )
|
||||
.end()
|
||||
|
@ -4916,20 +4909,6 @@ $( document ).bind( "pagecreate create", function( e ) {
|
|||
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.mobile.behaviors.formReset = {
|
||||
_handleFormReset: function() {
|
||||
this._on( this.element.closest( "form" ), {
|
||||
reset: function() {
|
||||
this._delay( "_reset" );
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
})( jQuery );
|
||||
|
||||
(function( $, undefined ) {
|
||||
|
||||
$.fn.buttonMarkup = function( options ) {
|
||||
var $workingSet = this,
|
||||
mapToDataAttr = function( key, value ) {
|
||||
|
@ -5229,8 +5208,8 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
|
|||
o.expandedIcon = collapsibleSet.jqmData( "expanded-icon" );
|
||||
}
|
||||
// Gets the preference icon position in the set
|
||||
if ( !o.iconpos ) {
|
||||
o.iconpos = collapsibleSet.jqmData( "iconpos" );
|
||||
if ( !o.iconPos ) {
|
||||
o.iconPos = collapsibleSet.jqmData( "iconpos" );
|
||||
}
|
||||
// Inherit the preference for inset from collapsible-set or set the default value to ensure equalty within a set
|
||||
if ( collapsibleSet.jqmData( "inset" ) !== undefined ) {
|
||||
|
@ -5270,7 +5249,7 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
|
|||
.buttonMarkup({
|
||||
shadow: false,
|
||||
corners: false,
|
||||
iconpos: $el.jqmData( "iconpos" ) || o.iconpos || "left",
|
||||
iconpos: $el.jqmData( "iconpos" ) || o.iconPos || "left",
|
||||
icon: collapsedIcon,
|
||||
mini: o.mini,
|
||||
theme: o.theme
|
||||
|
@ -5512,7 +5491,6 @@ $.widget( "mobile.listview", $.mobile.widget, {
|
|||
countTheme: "c",
|
||||
headerTheme: "b",
|
||||
dividerTheme: "b",
|
||||
icon: "arrow-r",
|
||||
splitIcon: "arrow-r",
|
||||
splitTheme: "b",
|
||||
inset: false,
|
||||
|
@ -5655,7 +5633,6 @@ $.widget( "mobile.listview", $.mobile.widget, {
|
|||
dividertheme = $list.jqmData( "dividertheme" ) || o.dividerTheme,
|
||||
listsplittheme = $list.jqmData( "splittheme" ),
|
||||
listspliticon = $list.jqmData( "spliticon" ),
|
||||
listicon = $list.jqmData( "icon" ),
|
||||
li = this._getChildrenByTagName( $list[ 0 ], "li", "LI" ),
|
||||
ol = !!$.nodeName( $list[ 0 ], "ol" ),
|
||||
jsCount = !$.support.cssPseudoElement,
|
||||
|
@ -5704,7 +5681,7 @@ $.widget( "mobile.listview", $.mobile.widget, {
|
|||
shadow: false,
|
||||
corners: false,
|
||||
iconpos: "right",
|
||||
icon: a.length > 1 || icon === false ? false : icon || listicon || o.icon,
|
||||
icon: a.length > 1 || icon === false ? false : icon || "arrow-r",
|
||||
theme: itemTheme
|
||||
});
|
||||
|
||||
|
@ -5942,7 +5919,7 @@ $( document ).bind( "pagecreate create", function( e ) {
|
|||
$.mobile.listview.prototype.options.autodividers = false;
|
||||
$.mobile.listview.prototype.options.autodividersSelector = function( elt ) {
|
||||
// look for the text in the given element
|
||||
var text = $.trim( elt.text() ) || null;
|
||||
var text = elt.text() || null;
|
||||
|
||||
if ( !text ) {
|
||||
return null;
|
||||
|
@ -6005,13 +5982,11 @@ $( document ).delegate( "ul,ol", "listviewcreate", function() {
|
|||
$.widget( "mobile.checkboxradio", $.mobile.widget, {
|
||||
options: {
|
||||
theme: null,
|
||||
mini: false,
|
||||
initSelector: "input[type='checkbox'],input[type='radio']"
|
||||
},
|
||||
_create: function() {
|
||||
var self = this,
|
||||
input = this.element,
|
||||
o = this.options,
|
||||
inheritAttr = function( input, dataAttr ) {
|
||||
return input.jqmData( dataAttr ) || input.closest( "form, fieldset" ).jqmData( dataAttr );
|
||||
},
|
||||
|
@ -6020,7 +5995,7 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
|
|||
parentLabel = $( input ).closest( "label" ),
|
||||
label = parentLabel.length ? parentLabel : $( input ).closest( "form, fieldset, :jqmData(role='page'), :jqmData(role='dialog')" ).find( "label" ).filter( "[for='" + input[0].id + "']" ).first(),
|
||||
inputtype = input[0].type,
|
||||
mini = inheritAttr( input, "mini" ) || o.mini,
|
||||
mini = inheritAttr( input, "mini" ),
|
||||
checkedState = inputtype + "-on",
|
||||
uncheckedState = inputtype + "-off",
|
||||
icon = input.parents( ":jqmData(type='horizontal')" ).length ? undefined : uncheckedState,
|
||||
|
@ -6046,12 +6021,12 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
|
|||
});
|
||||
|
||||
// If there's no selected theme check the data attr
|
||||
if ( !o.theme ) {
|
||||
o.theme = $.mobile.getInheritedTheme( this.element, "c" );
|
||||
if ( !this.options.theme ) {
|
||||
this.options.theme = $.mobile.getInheritedTheme( this.element, "c" );
|
||||
}
|
||||
|
||||
label.buttonMarkup({
|
||||
theme: o.theme,
|
||||
theme: this.options.theme,
|
||||
icon: icon,
|
||||
shadow: false,
|
||||
mini: mini,
|
||||
|
@ -6129,9 +6104,6 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
|
|||
}
|
||||
});
|
||||
|
||||
if ( this._handleFormReset ) {
|
||||
this._handleFormReset();
|
||||
}
|
||||
this.refresh();
|
||||
},
|
||||
|
||||
|
@ -6164,10 +6136,6 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
|
|||
.checkboxradio( "refresh" );
|
||||
},
|
||||
|
||||
_reset: function() {
|
||||
this.refresh();
|
||||
},
|
||||
|
||||
refresh: function() {
|
||||
var input = this.element[0],
|
||||
label = this.label,
|
||||
|
@ -6197,8 +6165,6 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
|
|||
}
|
||||
});
|
||||
|
||||
$.widget( "mobile.checkboxradio", $.mobile.checkboxradio, $.mobile.behaviors.formReset );
|
||||
|
||||
//auto self-init widgets
|
||||
$( document ).bind( "pagecreate create", function( e ) {
|
||||
$.mobile.checkboxradio.prototype.enhanceWithin( e.target, true );
|
||||
|
@ -6499,7 +6465,7 @@ $( document ).bind( "pagecreate create", function( e ) {
|
|||
}
|
||||
},
|
||||
|
||||
_expectResizeEvent: function() {
|
||||
_maybeRefreshTimeout: function() {
|
||||
var winCoords = windowCoords();
|
||||
|
||||
if ( this._resizeData ) {
|
||||
|
@ -6524,21 +6490,14 @@ $( document ).bind( "pagecreate create", function( e ) {
|
|||
},
|
||||
|
||||
_resizeTimeout: function() {
|
||||
if ( this._isOpen ) {
|
||||
if ( !this._expectResizeEvent() ) {
|
||||
if ( this._ui.container.hasClass( "ui-popup-hidden" ) ) {
|
||||
// effectively rapid-open the popup while leaving the screen intact
|
||||
this._trigger( "beforeposition" );
|
||||
this._ui.container
|
||||
.removeClass( "ui-popup-hidden" )
|
||||
.offset( this._placementCoords( this._desiredCoords( undefined, undefined, "window" ) ) );
|
||||
}
|
||||
if ( !this._maybeRefreshTimeout() ) {
|
||||
// effectively rapid-open the popup while leaving the screen intact
|
||||
this._trigger( "beforeposition" );
|
||||
this._ui.container
|
||||
.removeClass( "ui-selectmenu-hidden" )
|
||||
.offset( this._placementCoords( this._desiredCoords( undefined, undefined, "window" ) ) );
|
||||
|
||||
this._resizeScreen();
|
||||
this._resizeData = null;
|
||||
this._orientationchangeInProgress = false;
|
||||
}
|
||||
} else {
|
||||
this._resizeScreen();
|
||||
this._resizeData = null;
|
||||
this._orientationchangeInProgress = false;
|
||||
}
|
||||
|
@ -6546,19 +6505,18 @@ $( document ).bind( "pagecreate create", function( e ) {
|
|||
|
||||
_handleWindowResize: function( e ) {
|
||||
if ( this._isOpen ) {
|
||||
if ( ( this._expectResizeEvent() || this._orientationchangeInProgress ) &&
|
||||
!this._ui.container.hasClass( "ui-popup-hidden" ) ) {
|
||||
// effectively rapid-close the popup while leaving the screen intact
|
||||
this._ui.container
|
||||
.addClass( "ui-popup-hidden" )
|
||||
.removeAttr( "style" );
|
||||
}
|
||||
this._maybeRefreshTimeout();
|
||||
}
|
||||
},
|
||||
|
||||
_handleWindowOrientationchange: function( e ) {
|
||||
if ( !this._orientationchangeInProgress && this._isOpen ) {
|
||||
this._expectResizeEvent();
|
||||
|
||||
if ( !this._orientationchangeInProgress ) {
|
||||
// effectively rapid-close the popup while leaving the screen intact
|
||||
this._ui.container
|
||||
.addClass( "ui-selectmenu-hidden" )
|
||||
.removeAttr( "style" );
|
||||
|
||||
this._orientationchangeInProgress = true;
|
||||
}
|
||||
},
|
||||
|
@ -6567,7 +6525,7 @@ $( document ).bind( "pagecreate create", function( e ) {
|
|||
var ui = {
|
||||
screen: $( "<div class='ui-screen-hidden ui-popup-screen'></div>" ),
|
||||
placeholder: $( "<div style='display: none;'><!-- placeholder --></div>" ),
|
||||
container: $( "<div class='ui-popup-container ui-popup-hidden'></div>" )
|
||||
container: $( "<div class='ui-popup-container ui-selectmenu-hidden'></div>" )
|
||||
},
|
||||
thisPage = this.element.closest( ".ui-page" ),
|
||||
myId = this.element.attr( "id" ),
|
||||
|
@ -6603,7 +6561,6 @@ $( document ).bind( "pagecreate create", function( e ) {
|
|||
|
||||
// Define instance variables
|
||||
$.extend( this, {
|
||||
_scrollTop: 0,
|
||||
_page: thisPage,
|
||||
_ui: ui,
|
||||
_fallbackTransition: "",
|
||||
|
@ -6689,9 +6646,6 @@ $( document ).bind( "pagecreate create", function( e ) {
|
|||
this._ui.container.removeClass( this._fallbackTransition );
|
||||
if ( value && value !== "none" ) {
|
||||
this._fallbackTransition = $.mobile._maybeDegradeTransition( value );
|
||||
if ( this._fallbackTransition === "none" ) {
|
||||
this._fallbackTransition = "";
|
||||
}
|
||||
this._ui.container.addClass( this._fallbackTransition );
|
||||
}
|
||||
},
|
||||
|
@ -6860,7 +6814,7 @@ $( document ).bind( "pagecreate create", function( e ) {
|
|||
|
||||
_animate: function( args ) {
|
||||
// NOTE before removing the default animation of the screen
|
||||
// this had an animate callback that would resolve the deferred
|
||||
// this had an animate callback that would relove the deferred
|
||||
// now the deferred is resolved immediately
|
||||
// TODO remove the dependency on the screen deferred
|
||||
this._ui.screen
|
||||
|
@ -6873,16 +6827,13 @@ $( document ).bind( "pagecreate create", function( e ) {
|
|||
if ( args.applyTransition ) {
|
||||
this._applyTransition( args.transition );
|
||||
}
|
||||
if ( this._fallbackTransition ) {
|
||||
this._ui.container
|
||||
.animationComplete( $.proxy( args.prereqs.container, "resolve" ) )
|
||||
.addClass( args.containerClassToAdd )
|
||||
.removeClass( args.classToRemove );
|
||||
return;
|
||||
}
|
||||
this._ui.container
|
||||
.animationComplete( $.proxy( args.prereqs.container, "resolve" ) )
|
||||
.addClass( args.containerClassToAdd )
|
||||
.removeClass( args.classToRemove );
|
||||
} else {
|
||||
args.prereqs.container.resolve();
|
||||
}
|
||||
this._ui.container.removeClass( args.classToRemove );
|
||||
args.prereqs.container.resolve();
|
||||
},
|
||||
|
||||
// The desired coordinates passed in will be returned untouched if no reference element can be identified via
|
||||
|
@ -6941,7 +6892,6 @@ $( document ).bind( "pagecreate create", function( e ) {
|
|||
// the "blue flash" of element focus in android 4.0
|
||||
setTimeout(function(){
|
||||
self._ui.container.attr( "tabindex", "0" ).focus();
|
||||
self._expectResizeEvent();
|
||||
self._trigger( "afteropen" );
|
||||
});
|
||||
},
|
||||
|
@ -6998,7 +6948,7 @@ $( document ).bind( "pagecreate create", function( e ) {
|
|||
this._ui.screen.removeClass( "ui-screen-hidden" );
|
||||
|
||||
this._ui.container
|
||||
.removeClass( "ui-popup-hidden" )
|
||||
.removeClass( "ui-selectmenu-hidden" )
|
||||
.offset( coords );
|
||||
|
||||
if ( this.options.overlayTheme && androidBlacklist ) {
|
||||
|
@ -7038,7 +6988,7 @@ $( document ).bind( "pagecreate create", function( e ) {
|
|||
_closePrereqContainer: function() {
|
||||
this._ui.container
|
||||
.removeClass( "reverse out" )
|
||||
.addClass( "ui-popup-hidden" )
|
||||
.addClass( "ui-selectmenu-hidden" )
|
||||
.removeAttr( "style" );
|
||||
},
|
||||
|
||||
|
@ -7060,7 +7010,7 @@ $( document ).bind( "pagecreate create", function( e ) {
|
|||
self._trigger( "afterclose" );
|
||||
},
|
||||
|
||||
_close: function( immediate ) {
|
||||
_close: function() {
|
||||
this._ui.container.removeClass( "ui-popup-active" );
|
||||
this._page.removeClass( "ui-popup-open" );
|
||||
|
||||
|
@ -7076,7 +7026,7 @@ $( document ).bind( "pagecreate create", function( e ) {
|
|||
|
||||
this._animate( {
|
||||
additionalCondition: this._ui.screen.hasClass( "in" ),
|
||||
transition: ( immediate ? "none" : ( this._currentTransition || this.options.transition ) ),
|
||||
transition: ( this._currentTransition || this.options.transition ),
|
||||
classToRemove: "in",
|
||||
screenClassToAdd: "out",
|
||||
containerClassToAdd: "reverse out",
|
||||
|
@ -7085,19 +7035,15 @@ $( document ).bind( "pagecreate create", function( e ) {
|
|||
});
|
||||
},
|
||||
|
||||
_unenhance: function() {
|
||||
_destroy: function() {
|
||||
var self = this;
|
||||
|
||||
// hide and remove bindings
|
||||
self._close();
|
||||
|
||||
// Put the element back to where the placeholder was and remove the "ui-popup" class
|
||||
self._setTheme( "none" );
|
||||
self.element
|
||||
// Cannot directly insertAfter() - we need to detach() first, because
|
||||
// insertAfter() will do nothing if the payload div was not attached
|
||||
// to the DOM at the time the widget was created, and so the payload
|
||||
// will remain inside the container even after we call insertAfter().
|
||||
// If that happens and we remove the container a few lines below, we
|
||||
// will cause an infinite recursion - #5244
|
||||
.detach()
|
||||
.insertAfter( self._ui.placeholder )
|
||||
.removeClass( "ui-popup ui-overlay-shadow ui-corner-all" );
|
||||
self._ui.screen.remove();
|
||||
|
@ -7112,46 +7058,6 @@ $( document ).bind( "pagecreate create", function( e ) {
|
|||
});
|
||||
},
|
||||
|
||||
_destroy: function() {
|
||||
if ( $.mobile.popup.active === this ) {
|
||||
this.element.one( "popupafterclose", $.proxy( this, "_unenhance" ) );
|
||||
this.close();
|
||||
} else {
|
||||
this._unenhance();
|
||||
}
|
||||
},
|
||||
|
||||
_closePopup: function( e, data ) {
|
||||
var parsedDst, toUrl;
|
||||
|
||||
window.scrollTo( 0, this._scrollTop );
|
||||
|
||||
if ( e.type === "pagebeforechange" && data ) {
|
||||
// Determine whether we need to rapid-close the popup, or whether we can
|
||||
// take the time to run the closing transition
|
||||
if ( typeof data.toPage === "string" ) {
|
||||
parsedDst = data.toPage;
|
||||
} else {
|
||||
parsedDst = data.toPage.jqmData( "url" );
|
||||
}
|
||||
parsedDst = $.mobile.path.parseUrl( parsedDst );
|
||||
toUrl = parsedDst.pathname + parsedDst.search + parsedDst.hash;
|
||||
|
||||
if ( this._myUrl !== toUrl ) {
|
||||
// Going to a different page - close immediately
|
||||
this.options.container.unbind( this.options.closeEvents );
|
||||
this._close( true );
|
||||
} else {
|
||||
this.close();
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
this._close();
|
||||
},
|
||||
|
||||
// any navigation event after a popup is opened should close the popup
|
||||
// NOTE the pagebeforechange is bound to catch navigation events that don't
|
||||
// alter the url (eg, dialogs from popups)
|
||||
|
@ -7159,7 +7065,7 @@ $( document ).bind( "pagecreate create", function( e ) {
|
|||
var self = this;
|
||||
|
||||
self.options.container
|
||||
.one( self.options.closeEvents, $.proxy( self, "_closePopup" ) );
|
||||
.one( self.options.closeEvents, $.proxy( self._close, self ));
|
||||
},
|
||||
|
||||
// TODO no clear deliniation of what should be here and
|
||||
|
@ -7174,7 +7080,6 @@ $( document ).bind( "pagecreate create", function( e ) {
|
|||
|
||||
// set the global popup mutex
|
||||
$.mobile.popup.active = this;
|
||||
this._scrollTop = $( window ).scrollTop();
|
||||
|
||||
// if history alteration is disabled close on navigate events
|
||||
// and leave the url as is
|
||||
|
@ -7202,7 +7107,7 @@ $( document ).bind( "pagecreate create", function( e ) {
|
|||
hashkey = $.mobile.dialogHashKey;
|
||||
activePage = $.mobile.activePage;
|
||||
currentIsDialog = activePage.is( ".ui-dialog" );
|
||||
this._myUrl = url = $.mobile.urlHistory.getActive().url;
|
||||
url = $.mobile.urlHistory.getActive().url;
|
||||
hasHash = ( url.indexOf( hashkey ) > -1 ) && !currentIsDialog;
|
||||
urlHistory = $.mobile.urlHistory;
|
||||
|
||||
|
@ -7212,7 +7117,13 @@ $( document ).bind( "pagecreate create", function( e ) {
|
|||
return;
|
||||
}
|
||||
|
||||
url = url + hashkey;
|
||||
// if the current url has no dialog hash key proceed as normal
|
||||
// otherwise, if the page is a dialog simply tack on the hash key
|
||||
if ( url.indexOf( hashkey ) === -1 && !currentIsDialog ){
|
||||
url = url + hashkey;
|
||||
} else {
|
||||
url = $.mobile.path.parseLocation().hash + hashkey;
|
||||
}
|
||||
|
||||
// Tack on an extra hashkey if this is the first page and we've just reconstructed the initial hash
|
||||
if ( urlHistory.activeIndex === 0 && url === urlHistory.initialDst ) {
|
||||
|
@ -7241,8 +7152,6 @@ $( document ).bind( "pagecreate create", function( e ) {
|
|||
return;
|
||||
}
|
||||
|
||||
this._scrollTop = $( window ).scrollTop();
|
||||
|
||||
if( this.options.history ) {
|
||||
$.mobile.back();
|
||||
} else {
|
||||
|
@ -7274,11 +7183,6 @@ $( document ).bind( "pagecreate create", function( e ) {
|
|||
|
||||
//remove after delay
|
||||
setTimeout( function() {
|
||||
// Check if we are in a listview
|
||||
var $parent = $link.parent().parent();
|
||||
if ($parent.hasClass("ui-li")) {
|
||||
$link = $parent.parent();
|
||||
}
|
||||
$link.removeClass( $.mobile.activeBtnClass );
|
||||
}, 300 );
|
||||
};
|
||||
|
@ -7336,7 +7240,6 @@ $( document ).bind( "pagecreate create", function( e ) {
|
|||
$.widget( "mobile.textinput", $.mobile.widget, {
|
||||
options: {
|
||||
theme: null,
|
||||
mini: false,
|
||||
// This option defaults to true on iOS devices.
|
||||
preventFocusZoom: /iPhone|iPad|iPod/.test( navigator.platform ) && navigator.userAgent.indexOf( "AppleWebKit" ) > -1,
|
||||
initSelector: "input[type='text'], input[type='search'], :jqmData(type='search'), input[type='number'], :jqmData(type='number'), input[type='password'], input[type='email'], input[type='url'], input[type='tel'], textarea, input[type='time'], input[type='date'], input[type='month'], input[type='week'], input[type='datetime'], input[type='datetime-local'], input[type='color'], input:not([type])",
|
||||
|
@ -7351,7 +7254,8 @@ $.widget( "mobile.textinput", $.mobile.widget, {
|
|||
o = this.options,
|
||||
theme = o.theme || $.mobile.getInheritedTheme( this.element, "c" ),
|
||||
themeclass = " ui-body-" + theme,
|
||||
miniclass = o.mini ? " ui-mini" : "",
|
||||
mini = input.jqmData( "mini" ) === true,
|
||||
miniclass = mini ? " ui-mini" : "",
|
||||
focusedEl, clearbtn;
|
||||
|
||||
function toggleClear() {
|
||||
|
@ -7398,7 +7302,7 @@ $.widget( "mobile.textinput", $.mobile.widget, {
|
|||
iconpos: "notext",
|
||||
corners: true,
|
||||
shadow: true,
|
||||
mini: o.mini
|
||||
mini: mini
|
||||
});
|
||||
|
||||
toggleClear();
|
||||
|
@ -7507,7 +7411,7 @@ var defaultFilterCallback = function( text, searchValue, item ) {
|
|||
|
||||
$.mobile.listview.prototype.options.filterCallback = defaultFilterCallback;
|
||||
|
||||
$( document ).delegate( "ul, ol", "listviewcreate", function() {
|
||||
$( document ).delegate( ":jqmData(role='listview')", "listviewcreate", function() {
|
||||
|
||||
var list = $( this ),
|
||||
listview = list.data( "listview" );
|
||||
|
@ -7519,9 +7423,6 @@ $( document ).delegate( "ul, ol", "listviewcreate", function() {
|
|||
var wrapper = $( "<form>", {
|
||||
"class": "ui-listview-filter ui-bar-" + listview.options.filterTheme,
|
||||
"role": "search"
|
||||
}).submit( function( e ) {
|
||||
e.preventDefault();
|
||||
search.blur();
|
||||
}),
|
||||
search = $( "<input>", {
|
||||
placeholder: listview.options.filterPlaceholder
|
||||
|
@ -7617,6 +7518,8 @@ $( document ).delegate( "ul, ol", "listviewcreate", function() {
|
|||
(function( $, undefined ) {
|
||||
|
||||
$.widget( "mobile.slider", $.mobile.widget, {
|
||||
widgetEventPrefix: "slide",
|
||||
|
||||
options: {
|
||||
theme: null,
|
||||
trackTheme: null,
|
||||
|
@ -7914,9 +7817,6 @@ $.widget( "mobile.slider", $.mobile.widget, {
|
|||
}
|
||||
});
|
||||
|
||||
if ( this._handleFormReset ) {
|
||||
this._handleFormReset();
|
||||
}
|
||||
this.refresh( undefined, undefined, true );
|
||||
},
|
||||
|
||||
|
@ -7931,11 +7831,6 @@ $.widget( "mobile.slider", $.mobile.widget, {
|
|||
parseFloat( this.element.val() ) : this.element[0].selectedIndex;
|
||||
},
|
||||
|
||||
|
||||
_reset: function() {
|
||||
this.refresh( undefined, false, true );
|
||||
},
|
||||
|
||||
refresh: function( val, isfromControl, preventInputUpdate ) {
|
||||
|
||||
// NOTE: we don't return here because we want to support programmatic
|
||||
|
@ -8057,13 +7952,6 @@ $.widget( "mobile.slider", $.mobile.widget, {
|
|||
|
||||
});
|
||||
|
||||
$.widget( "mobile.slider", $.mobile.slider, $.mobile.behaviors.formReset );
|
||||
|
||||
// FIXME: Move the declaration of widgetEventPrefix back to the top of the
|
||||
// initial declaration of the slider widget once we start using a version of
|
||||
// the widget factory that includes a fix for http://bugs.jqueryui.com/ticket/8724
|
||||
$.widget( "mobile.slider", $.mobile.slider, { widgetEventPrefix: "slide" } );
|
||||
|
||||
//auto self-init widgets
|
||||
$( document ).bind( "pagecreate create", function( e ) {
|
||||
$.mobile.slider.prototype.enhanceWithin( e.target, true );
|
||||
|
@ -8139,14 +8027,6 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
|
|||
}
|
||||
},
|
||||
|
||||
_destroy: function() {
|
||||
var wrapper = this.element.parents( ".ui-select" );
|
||||
if ( wrapper.length > 0 ) {
|
||||
this.element.insertAfter( wrapper );
|
||||
wrapper.remove();
|
||||
}
|
||||
},
|
||||
|
||||
_create: function() {
|
||||
this._preExtension();
|
||||
|
||||
|
@ -8212,9 +8092,6 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
|
|||
self.refresh();
|
||||
});
|
||||
|
||||
if ( this._handleFormReset ) {
|
||||
this._handleFormReset();
|
||||
}
|
||||
this.build();
|
||||
},
|
||||
|
||||
|
@ -8251,32 +8128,15 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
|
|||
// In many situations, iOS will zoom into the select upon tap, this prevents that from happening
|
||||
self.button.bind( "vmousedown", function() {
|
||||
if ( self.options.preventFocusZoom ) {
|
||||
$.mobile.zoom.disable( true );
|
||||
$.mobile.zoom.disable( true );
|
||||
}
|
||||
});
|
||||
self.label.bind( "click focus", function() {
|
||||
}).bind( "mouseup", function() {
|
||||
if ( self.options.preventFocusZoom ) {
|
||||
$.mobile.zoom.disable( true );
|
||||
}
|
||||
});
|
||||
self.select.bind( "focus", function() {
|
||||
if ( self.options.preventFocusZoom ) {
|
||||
$.mobile.zoom.disable( true );
|
||||
}
|
||||
});
|
||||
self.button.bind( "mouseup", function() {
|
||||
if ( self.options.preventFocusZoom ) {
|
||||
setTimeout(function() {
|
||||
$.mobile.zoom.enable( true );
|
||||
}, 0 );
|
||||
}, 0);
|
||||
}
|
||||
});
|
||||
self.select.bind( "blur", function() {
|
||||
if ( self.options.preventFocusZoom ) {
|
||||
$.mobile.zoom.enable( true );
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
selected: function() {
|
||||
|
@ -8322,10 +8182,6 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
|
|||
}
|
||||
},
|
||||
|
||||
_reset: function() {
|
||||
this.refresh();
|
||||
},
|
||||
|
||||
refresh: function() {
|
||||
this.setButtonText();
|
||||
this.setButtonCount();
|
||||
|
@ -8347,8 +8203,6 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
|
|||
}
|
||||
});
|
||||
|
||||
$.widget( "mobile.selectmenu", $.mobile.selectmenu, $.mobile.behaviors.formReset );
|
||||
|
||||
//auto self-init widgets
|
||||
$( document ).bind( "pagecreate create", function( e ) {
|
||||
$.mobile.selectmenu.prototype.enhanceWithin( e.target, true );
|
||||
|
@ -8363,7 +8217,6 @@ $( document ).bind( "pagecreate create", function( e ) {
|
|||
var extendSelect = function( widget ) {
|
||||
|
||||
var select = widget.select,
|
||||
origDestroy = widget._destroy,
|
||||
selectID = widget.selectID,
|
||||
label = widget.label,
|
||||
thisPage = widget.select.closest( ".ui-page" ),
|
||||
|
@ -8378,7 +8231,7 @@ $( document ).bind( "pagecreate create", function( e ) {
|
|||
"<div data-" + $.mobile.ns + "role='content'></div>"+
|
||||
"</div>" ),
|
||||
|
||||
listbox = $( "<div>", { "class": "ui-selectmenu" } ).insertAfter( widget.select ).popup( { theme: widget.options.overlayTheme } ),
|
||||
listbox = $( "<div>", { "class": "ui-selectmenu" } ).insertAfter( widget.select ).popup( { theme: "a" } ),
|
||||
|
||||
list = $( "<ul>", {
|
||||
"class": "ui-selectmenu-list",
|
||||
|
@ -8433,17 +8286,6 @@ $( document ).bind( "pagecreate create", function( e ) {
|
|||
// Create list from select, update state
|
||||
self.refresh();
|
||||
|
||||
if ( self._origTabIndex === undefined ) {
|
||||
self._origTabIndex = self.select.attr( "tabindex" );
|
||||
// Map undefined to false, because self._origTabIndex === undefined
|
||||
// indicates that we have not yet checked whether the select has
|
||||
// originally had a tabindex attribute, whereas false indicates that
|
||||
// we have checked the select for such an attribute, and have found
|
||||
// none present.
|
||||
if ( self._origTabIndex === undefined ) {
|
||||
self._origTabIndex = false;
|
||||
}
|
||||
}
|
||||
self.select.attr( "tabindex", "-1" ).focus(function() {
|
||||
$( this ).blur();
|
||||
self.button.focus();
|
||||
|
@ -8726,14 +8568,10 @@ $( document ).bind( "pagecreate create", function( e ) {
|
|||
});
|
||||
}
|
||||
|
||||
self.menuPage
|
||||
.one( "pageshow", function() {
|
||||
focusMenuItem();
|
||||
self.isOpen = true;
|
||||
})
|
||||
.one( "pagehide", function() {
|
||||
self.isOpen = false;
|
||||
});
|
||||
self.menuPage.one( "pageshow", function() {
|
||||
focusMenuItem();
|
||||
self.isOpen = true;
|
||||
});
|
||||
|
||||
self.menuType = "page";
|
||||
self.menuPageContent.append( self.list );
|
||||
|
@ -8808,17 +8646,12 @@ $( document ).bind( "pagecreate create", function( e ) {
|
|||
needPlaceholder = false;
|
||||
isPlaceholderItem = true;
|
||||
|
||||
// If we have identified a placeholder, record the fact that it was
|
||||
// us who have added the placeholder to the option and mark it
|
||||
// retroactively in the select as well
|
||||
if ( !option.hasAttribute( dataPlaceholderAttr ) ) {
|
||||
this._removePlaceholderAttr = true;
|
||||
}
|
||||
// If we have identified a placeholder, mark it retroactively in the select as well
|
||||
option.setAttribute( dataPlaceholderAttr, true );
|
||||
if ( o.hidePlaceholderMenuItems ) {
|
||||
classes.push( "ui-selectmenu-placeholder" );
|
||||
}
|
||||
if ( placeholder !== text ) {
|
||||
if (!placeholder) {
|
||||
placeholder = self.placeholder = text;
|
||||
}
|
||||
}
|
||||
|
@ -8864,30 +8697,6 @@ $( document ).bind( "pagecreate create", function( e ) {
|
|||
// TODO value is undefined at creation
|
||||
"aria-owns": this.menuId
|
||||
});
|
||||
},
|
||||
|
||||
_destroy: function() {
|
||||
this.close();
|
||||
|
||||
// Restore the tabindex attribute to its original value
|
||||
if ( this._origTabIndex !== undefined ) {
|
||||
if ( this._origTabIndex !== false ) {
|
||||
this.select.attr( "tabindex", this._origTabIndex );
|
||||
} else {
|
||||
this.select.removeAttr( "tabindex" );
|
||||
}
|
||||
}
|
||||
|
||||
// Remove the placeholder attribute if we were the ones to add it
|
||||
if ( this._removePlaceholderAttr ) {
|
||||
this._selectOptions().removeAttr( "data-" + $.mobile.ns + "placeholder" );
|
||||
}
|
||||
|
||||
// Remove the popup
|
||||
this.listbox.remove();
|
||||
|
||||
// Chain up
|
||||
origDestroy.apply( this, arguments );
|
||||
}
|
||||
});
|
||||
};
|
||||
|
@ -9150,13 +8959,9 @@ $( document ).bind( "pagecreate create", function( e ) {
|
|||
});
|
||||
},
|
||||
|
||||
_destroy: function() {
|
||||
var $el = this.element,
|
||||
header = $el.is( ".ui-header" );
|
||||
|
||||
$el.closest( ".ui-page" ).css( "padding-" + ( header ? "top" : "bottom" ), "" );
|
||||
$el.removeClass( "ui-header-fixed ui-footer-fixed ui-header-fullscreen ui-footer-fullscreen in out fade slidedown slideup ui-fixed-hidden" );
|
||||
$el.closest( ".ui-page" ).removeClass( "ui-page-header-fixed ui-page-footer-fixed ui-page-header-fullscreen ui-page-footer-fullscreen" );
|
||||
destroy: function() {
|
||||
this.element.removeClass( "ui-header-fixed ui-footer-fixed ui-header-fullscreen ui-footer-fullscreen in out fade slidedown slideup ui-fixed-hidden" );
|
||||
this.element.closest( ".ui-page" ).removeClass( "ui-page-header-fixed ui-page-footer-fixed ui-page-header-fullscreen ui-page-footer-fullscreen" );
|
||||
}
|
||||
|
||||
});
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -251,6 +251,27 @@ class TestSystemPlayer(TestCase):
|
|||
mocked_set_visible.assert_called_once_with(mocked_display, False)
|
||||
self.assertEqual(MediaState.Stopped, player.state)
|
||||
|
||||
def test_stop_throws_exception(self):
|
||||
"""
|
||||
Test the stop() method of the SystemPlayer when disconnect() throws an exception
|
||||
"""
|
||||
# GIVEN: A SystemPlayer instance
|
||||
player = SystemPlayer(self)
|
||||
mocked_display = MagicMock()
|
||||
mocked_display.media_player.durationChanged.disconnect.side_effect = TypeError('oops')
|
||||
|
||||
# WHEN: The stop method is called
|
||||
with patch.object(player, 'set_visible') as mocked_set_visible:
|
||||
player.stop(mocked_display)
|
||||
|
||||
# THEN: The video is stopped
|
||||
expected_block_signals_calls = [call(True), call(False)]
|
||||
self.assertEqual(expected_block_signals_calls, mocked_display.media_player.blockSignals.call_args_list)
|
||||
mocked_display.media_player.durationChanged.disconnect.assert_called_once_with()
|
||||
mocked_display.media_player.stop.assert_called_once_with()
|
||||
mocked_set_visible.assert_called_once_with(mocked_display, False)
|
||||
self.assertEqual(MediaState.Stopped, player.state)
|
||||
|
||||
def test_volume(self):
|
||||
"""
|
||||
Test the volume() method of the SystemPlayer
|
||||
|
|
Loading…
Reference in New Issue