http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72245
Revision: 72245
Author: dale
Date: 2010-09-02 23:41:12 +0000 (Thu, 02 Sep 2010)
Log Message:
-----------
update mwEmbed library to use jquery ui 1.8.4
Modified Paths:
--------------
branches/MwEmbedStandAlone/loader.js
branches/MwEmbedStandAlone/modules/AddMedia/loader.js
branches/MwEmbedStandAlone/modules/AjaxCategories/mw.AjaxCategories.js
branches/MwEmbedStandAlone/modules/EmbedPlayer/loader.js
branches/MwEmbedStandAlone/modules/Sequencer/loader.js
branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerAddByUrl.js
branches/MwEmbedStandAlone/modules/TimedText/loader.js
branches/MwEmbedStandAlone/mwEmbed.js
Modified: branches/MwEmbedStandAlone/loader.js
===================================================================
--- branches/MwEmbedStandAlone/loader.js 2010-09-02 23:40:27 UTC (rev
72244)
+++ branches/MwEmbedStandAlone/loader.js 2010-09-02 23:41:12 UTC (rev
72245)
@@ -135,7 +135,7 @@
"$j.fn.hoverIntent" :
"libraries/jquery/plugins/jquery.hoverIntent.js",
"$j.fn.datePicker" :
"libraries/jquery/plugins/jquery.datePicker.js",
- "$j.ui" :
"libraries/jquery/jquery.ui/ui/ui.core.js",
+
"mw.style.ui_redmond" :
"skins/jquery.ui.themes/redmond/jquery-ui-1.7.2.css",
"mw.style.ui_darkness" :
"skins/jquery.ui.themes/darkness/jquery-ui-1.7.2.css",
@@ -146,38 +146,47 @@
"mw.style.mwCommon" : "skins/common/mw.style.mwCommon.css",
"$j.cookie" :
"libraries/jquery/plugins/jquery.cookie.js",
-
+
"$j.contextMenu" :
"libraries/jquery/plugins/jquery.contextMenu.js",
"$j.fn.suggestions" :
"libraries/jquery/plugins/jquery.suggestions.js",
"$j.fn.textSelection" :
"libraries/jquery/plugins/jquery.textSelection.js",
"$j.browserTest" :
"libraries/jquery/plugins/jquery.browserTest.js",
"$j.fn.jWizard" :
"libraries/jquery/plugins/jquery.jWizard.js",
- "$j.effects.blind" :
"libraries/jquery/jquery.ui/ui/effects.blind.js",
- "$j.effects.drop" :
"libraries/jquery/jquery.ui/ui/effects.drop.js",
- "$j.effects.pulsate" :
"libraries/jquery/jquery.ui/ui/effects.pulsate.js",
- "$j.effects.transfer" :
"libraries/jquery/jquery.ui/ui/effects.transfer.js",
- "$j.ui.droppable" :
"libraries/jquery/jquery.ui/ui/ui.droppable.js",
- "$j.ui.slider" :
"libraries/jquery/jquery.ui/ui/ui.slider.js",
- "$j.effects.bounce" :
"libraries/jquery/jquery.ui/ui/effects.bounce.js",
- "$j.effects.explode" :
"libraries/jquery/jquery.ui/ui/effects.explode.js",
- "$j.effects.scale" :
"libraries/jquery/jquery.ui/ui/effects.scale.js",
- "$j.ui.datepicker" :
"libraries/jquery/jquery.ui/ui/ui.datepicker.js",
- "$j.ui.progressbar" :
"libraries/jquery/jquery.ui/ui/ui.progressbar.js",
- "$j.ui.sortable" :
"libraries/jquery/jquery.ui/ui/ui.sortable.js",
- "$j.effects.clip" :
"libraries/jquery/jquery.ui/ui/effects.clip.js",
- "$j.effects.fold" :
"libraries/jquery/jquery.ui/ui/effects.fold.js",
- "$j.effects.shake" :
"libraries/jquery/jquery.ui/ui/effects.shake.js",
- "$j.ui.dialog" :
"libraries/jquery/jquery.ui/ui/ui.dialog.js",
- "$j.ui.resizable" :
"libraries/jquery/jquery.ui/ui/ui.resizable.js",
- "$j.ui.tabs" :
"libraries/jquery/jquery.ui/ui/ui.tabs.js",
- "$j.effects" :
"libraries/jquery/jquery.ui/ui/effects.core.js",
- "$j.effects.highlight" :
"libraries/jquery/jquery.ui/ui/effects.highlight.js",
- "$j.effects.slide" :
"libraries/jquery/jquery.ui/ui/effects.slide.js",
- "$j.ui.accordion" :
"libraries/jquery/jquery.ui/ui/ui.accordion.js",
- "$j.ui.draggable" :
"libraries/jquery/jquery.ui/ui/ui.draggable.js",
- "$j.ui.selectable" :
"libraries/jquery/jquery.ui/ui/ui.selectable.js"
-
+ "$j.ui" :
"libraries/jquery/jquery.ui/ui/jquery.ui.core.js",
+ "$j.widget" :
"libraries/jquery/jquery.ui/ui/jquery.ui.widget.js",
+
+ "$j.effects.blind" :
"libraries/jquery/jquery.ui/ui/jquery.effects.blind.js",
+ "$j.effects.bounce" :
"libraries/jquery/jquery.ui/ui/jquery.effects.bounce.js",
+ "$j.effects.clip" :
"libraries/jquery/jquery.ui/ui/jquery.effects.clip.js",
+ "$j.effects" :
"libraries/jquery/jquery.ui/ui/jquery.effects.core.js",
+ "$j.effects.drop" :
"libraries/jquery/jquery.ui/ui/jquery.effects.drop.js",
+ "$j.effects.explode" :
"libraries/jquery/jquery.ui/ui/jquery.effects.explode.js",
+ "$j.effects.fold" :
"libraries/jquery/jquery.ui/ui/jquery.effects.fold.js",
+ "$j.effects.highlight" :
"libraries/jquery/jquery.ui/ui/jquery.effects.highlight.js",
+ "$j.effects.pulsate" :
"libraries/jquery/jquery.ui/ui/jquery.effects.pulsate.js",
+ "$j.effects.scale" :
"libraries/jquery/jquery.ui/ui/jquery.effects.scale.js",
+ "$j.effects.shake" :
"libraries/jquery/jquery.ui/ui/jquery.effects.shake.js",
+ "$j.effects.slide" :
"libraries/jquery/jquery.ui/ui/jquery.effects.slide.js",
+ "$j.effects.transfer" :
"libraries/jquery/jquery.ui/ui/jquery.effects.transfer.js",
+
+ "$j.ui.accordion" :
"libraries/jquery/jquery.ui/ui/jquery.ui.accordion.js",
+ "$j.ui.autocomplete" :
"libraries/jquery/jquery.ui/ui/jquery.ui.autocomplete.js",
+ "$j.ui.button" :
"libraries/jquery/jquery.ui/ui/jquery.ui.button.js",
+ "$j.ui.datepicker" :
"libraries/jquery/jquery.ui/ui/jquery.ui.datepicker.js",
+ "$j.ui.dialog" :
"libraries/jquery/jquery.ui/ui/jquery.ui.dialog.js",
+ "$j.ui.droppable" :
"libraries/jquery/jquery.ui/ui/jquery.ui.droppable.js",
+ "$j.ui.draggable" :
"libraries/jquery/jquery.ui/ui/jquery.ui.draggable.js",
+ "$j.ui.mouse" :
"libraries/jquery/jquery.ui/ui/jquery.ui.mouse.js",
+ "$j.ui.position" :
"libraries/jquery/jquery.ui/ui/jquery.ui.position.js",
+ "$j.ui.progressbar" :
"libraries/jquery/jquery.ui/ui/jquery.ui.progressbar.js",
+ "$j.ui.resizable" :
"libraries/jquery/jquery.ui/ui/jquery.ui.resizable.js",
+ "$j.ui.selectable" :
"libraries/jquery/jquery.ui/ui/jquery.ui.selectable.js",
+ "$j.ui.slider" :
"libraries/jquery/jquery.ui/ui/jquery.ui.slider.js",
+ "$j.ui.sortable" :
"libraries/jquery/jquery.ui/ui/jquery.ui.sortable.js",
+ "$j.ui.tabs" :
"libraries/jquery/jquery.ui/ui/jquery.ui.tabs.js"
+
+
} );
// Add a special css dependency for $j.ui
Modified: branches/MwEmbedStandAlone/modules/AddMedia/loader.js
===================================================================
--- branches/MwEmbedStandAlone/modules/AddMedia/loader.js 2010-09-02
23:40:27 UTC (rev 72244)
+++ branches/MwEmbedStandAlone/modules/AddMedia/loader.js 2010-09-02
23:41:12 UTC (rev 72245)
@@ -38,7 +38,8 @@
mw.addModuleLoader( 'AddMedia.UploadForm', [
[
'mw.UploadForm',
- '$j.ui'
+ '$j.ui',
+ '$j.widget'
],
[
'$j.ui.datepicker'
@@ -58,6 +59,7 @@
'$j.ui'
], [
'$j.ui.resizable',
+ '$j.ui.mouse',
'$j.ui.draggable',
'$j.ui.dialog',
'$j.ui.tabs',
@@ -75,6 +77,7 @@
[
'$j.ui.progressbar',
'$j.ui.dialog',
+ '$j.ui.mouse',
'$j.ui.draggable'
]
];
Modified: branches/MwEmbedStandAlone/modules/AjaxCategories/mw.AjaxCategories.js
===================================================================
--- branches/MwEmbedStandAlone/modules/AjaxCategories/mw.AjaxCategories.js
2010-09-02 23:40:27 UTC (rev 72244)
+++ branches/MwEmbedStandAlone/modules/AjaxCategories/mw.AjaxCategories.js
2010-09-02 23:41:12 UTC (rev 72245)
@@ -108,7 +108,8 @@
// Make sure the suggestion plugin is loaded. Load everything
else while we're at it
mw.load(
[
- '$j.ui',
+ '$j.ui',
+ '$j.widget',
'$j.ui.dialog',
'$j.fn.suggestions'
],
Modified: branches/MwEmbedStandAlone/modules/EmbedPlayer/loader.js
===================================================================
--- branches/MwEmbedStandAlone/modules/EmbedPlayer/loader.js 2010-09-02
23:40:27 UTC (rev 72244)
+++ branches/MwEmbedStandAlone/modules/EmbedPlayer/loader.js 2010-09-02
23:41:12 UTC (rev 72245)
@@ -156,7 +156,8 @@
// Set up the embed video player class request: (include the
skin js as well)
var dependencyRequest = [
[
- '$j.ui',
+ '$j.ui',
+ '$j.widget',
'mw.EmbedPlayer',
'mw.PlayerControlBuilder',
'$j.fn.hoverIntent',
@@ -166,6 +167,7 @@
'JSON'
],
[
+ '$j.ui.mouse',
'$j.fn.menu',
'mw.style.jquerymenu',
'$j.ui.slider'
Modified: branches/MwEmbedStandAlone/modules/Sequencer/loader.js
===================================================================
--- branches/MwEmbedStandAlone/modules/Sequencer/loader.js 2010-09-02
23:40:27 UTC (rev 72244)
+++ branches/MwEmbedStandAlone/modules/Sequencer/loader.js 2010-09-02
23:41:12 UTC (rev 72245)
@@ -85,7 +85,9 @@
[
'$j.fn.layout',
+
// UI components used in the sequencer
interface:
+ '$j.ui.mouse',
'$j.ui.accordion',
'$j.ui.dialog',
'$j.ui.droppable',
Modified: branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerAddByUrl.js
===================================================================
--- branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerAddByUrl.js
2010-09-02 23:40:27 UTC (rev 72244)
+++ branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerAddByUrl.js
2010-09-02 23:41:12 UTC (rev 72245)
@@ -75,34 +75,26 @@
});
});
} else if(
titleKey.indexOf('Template:') == 0 ) {
- // get parsed page text
- var request ={
-
'action':'parse',
- 'page' :
titleKey
+ // Parse any paramters
we can find:
+ var apiProvider = '';
+ if(
mw.parseUri(provider.apiUrl ).host == 'commons.wikimedia.org' ){
+ apiProvider =
'commons'
+ } else {
+ // xxx we need
to abstract the remoteSearch driver provider logic
+ // into a
provider class
+ apiProvider =
'local';
}
- // should maybe
- mw.getJSON(
provider.apiUrl, request, function( data ){
- if( !data ||
!data.parse || !data.parse.text || !data.parse.text['*'] ){
-
$dialog.html( 'Error loading asset');
- return
;
- }
- var apiProvider
= '';
- if(
mw.parseUri( _this.getApiUrl() ).host == 'commons.wikimedia.org' ){
-
apiProvider = 'commons'
- } else {
- // xxx
we need to abstract the remoteSearch driver provider logic
- // into
a provider class
-
apiProvider = 'local';
- }
- // Get the
rendered page text:
- _this
- .sequencer
- .getAddMedia()
-
.getSmilClipFromWikiTemplate( titleKey, apiProvider, function( smilClip ){
-
_this.sequencer.getTimeline().insertSmilClipEdit( smilClip );
-
mw.closeLoaderDialog();
- });
- })
+ // Get the rendered
page text:
+ var smilClip = _this
+ .sequencer
+ .getAddMedia()
+
.getSmilClipFromWikiTemplate( titleKey, apiProvider );
+
+ // Add the smil clip to
the sequencer
+
_this.sequencer.getTimeline().insertSmilClipEdit( smilClip );
+
+ // Close the dialog
loading:
+ mw.closeLoaderDialog();
}
});
Modified: branches/MwEmbedStandAlone/modules/TimedText/loader.js
===================================================================
--- branches/MwEmbedStandAlone/modules/TimedText/loader.js 2010-09-02
23:40:27 UTC (rev 72244)
+++ branches/MwEmbedStandAlone/modules/TimedText/loader.js 2010-09-02
23:41:12 UTC (rev 72245)
@@ -81,6 +81,7 @@
mw.addModuleLoader( 'TimedText.Edit', [
[
'$j.ui',
+ '$j.widget',
'$j.fn.menu',
"mw.style.jquerymenu",
Modified: branches/MwEmbedStandAlone/mwEmbed.js
===================================================================
--- branches/MwEmbedStandAlone/mwEmbed.js 2010-09-02 23:40:27 UTC (rev
72244)
+++ branches/MwEmbedStandAlone/mwEmbed.js 2010-09-02 23:41:12 UTC (rev
72245)
@@ -1105,7 +1105,8 @@
// Build the uiRequest
var uiRequest = [ '$j.ui.dialog' ];
if( options.draggable ){
- uiRequest.push( '$j.ui.draggable' )
+ uiRequest.push( '$j.ui.mouse' )
+ uiRequest.push( '$j.ui.draggable' )
}
if( options.resizable ){
uiRequest.push( '$j.ui.resizable' );
@@ -1123,7 +1124,8 @@
// Load the dialog resources
mw.load([
[
- '$j.ui'
+ '$j.ui',
+ '$j.widget'
],
uiRequest
], function() {
@@ -1135,11 +1137,11 @@
/**
* Mobile Safari has special properties for html5 video::
*
- * NOTE: should be moved to browser detection script
+ * NOTE: should be phased out in favor of browser feature detection
script
*/
mw.isMobileSafari = function() {
// check mobile safari foce ( for debug )
- if( mw.getConfig( 'forceMobileSafari' ) ){
+ if( mw.getConfig( 'forceMobileSafari' ) ||
document.URL.indexOf('forceMobileSafari') != -1 ){
return true;
}
if ((navigator.userAgent.indexOf('iPhone') != -1) ||
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs