r72245 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72244‎ | r72245 | r72246 >
Date:23:41, 2 September 2010
Author:dale
Status:deferred
Tags:
Comment:
update mwEmbed library to use jquery ui 1.8.4
Modified paths:
  • /branches/MwEmbedStandAlone/loader.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/AddMedia/loader.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/AjaxCategories/mw.AjaxCategories.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/EmbedPlayer/loader.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/Sequencer/loader.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerAddByUrl.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/TimedText/loader.js (modified) (history)
  • /branches/MwEmbedStandAlone/mwEmbed.js (modified) (history)

Diff [purge]

Index: branches/MwEmbedStandAlone/loader.js
@@ -135,7 +135,7 @@
136136
137137 "$j.fn.hoverIntent" : "libraries/jquery/plugins/jquery.hoverIntent.js",
138138 "$j.fn.datePicker" : "libraries/jquery/plugins/jquery.datePicker.js",
139 - "$j.ui" : "libraries/jquery/jquery.ui/ui/ui.core.js",
 139+
140140
141141 "mw.style.ui_redmond" : "skins/jquery.ui.themes/redmond/jquery-ui-1.7.2.css",
142142 "mw.style.ui_darkness" : "skins/jquery.ui.themes/darkness/jquery-ui-1.7.2.css",
@@ -146,38 +146,47 @@
147147 "mw.style.mwCommon" : "skins/common/mw.style.mwCommon.css",
148148
149149 "$j.cookie" : "libraries/jquery/plugins/jquery.cookie.js",
150 -
 150+
151151 "$j.contextMenu" : "libraries/jquery/plugins/jquery.contextMenu.js",
152152 "$j.fn.suggestions" : "libraries/jquery/plugins/jquery.suggestions.js",
153153 "$j.fn.textSelection" : "libraries/jquery/plugins/jquery.textSelection.js",
154154 "$j.browserTest" : "libraries/jquery/plugins/jquery.browserTest.js",
155155 "$j.fn.jWizard" : "libraries/jquery/plugins/jquery.jWizard.js",
156156
157 - "$j.effects.blind" : "libraries/jquery/jquery.ui/ui/effects.blind.js",
158 - "$j.effects.drop" : "libraries/jquery/jquery.ui/ui/effects.drop.js",
159 - "$j.effects.pulsate" : "libraries/jquery/jquery.ui/ui/effects.pulsate.js",
160 - "$j.effects.transfer" : "libraries/jquery/jquery.ui/ui/effects.transfer.js",
161 - "$j.ui.droppable" : "libraries/jquery/jquery.ui/ui/ui.droppable.js",
162 - "$j.ui.slider" : "libraries/jquery/jquery.ui/ui/ui.slider.js",
163 - "$j.effects.bounce" : "libraries/jquery/jquery.ui/ui/effects.bounce.js",
164 - "$j.effects.explode" : "libraries/jquery/jquery.ui/ui/effects.explode.js",
165 - "$j.effects.scale" : "libraries/jquery/jquery.ui/ui/effects.scale.js",
166 - "$j.ui.datepicker" : "libraries/jquery/jquery.ui/ui/ui.datepicker.js",
167 - "$j.ui.progressbar" : "libraries/jquery/jquery.ui/ui/ui.progressbar.js",
168 - "$j.ui.sortable" : "libraries/jquery/jquery.ui/ui/ui.sortable.js",
169 - "$j.effects.clip" : "libraries/jquery/jquery.ui/ui/effects.clip.js",
170 - "$j.effects.fold" : "libraries/jquery/jquery.ui/ui/effects.fold.js",
171 - "$j.effects.shake" : "libraries/jquery/jquery.ui/ui/effects.shake.js",
172 - "$j.ui.dialog" : "libraries/jquery/jquery.ui/ui/ui.dialog.js",
173 - "$j.ui.resizable" : "libraries/jquery/jquery.ui/ui/ui.resizable.js",
174 - "$j.ui.tabs" : "libraries/jquery/jquery.ui/ui/ui.tabs.js",
175 - "$j.effects" : "libraries/jquery/jquery.ui/ui/effects.core.js",
176 - "$j.effects.highlight" : "libraries/jquery/jquery.ui/ui/effects.highlight.js",
177 - "$j.effects.slide" : "libraries/jquery/jquery.ui/ui/effects.slide.js",
178 - "$j.ui.accordion" : "libraries/jquery/jquery.ui/ui/ui.accordion.js",
179 - "$j.ui.draggable" : "libraries/jquery/jquery.ui/ui/ui.draggable.js",
180 - "$j.ui.selectable" : "libraries/jquery/jquery.ui/ui/ui.selectable.js"
181 -
 157+ "$j.ui" : "libraries/jquery/jquery.ui/ui/jquery.ui.core.js",
 158+ "$j.widget" : "libraries/jquery/jquery.ui/ui/jquery.ui.widget.js",
 159+
 160+ "$j.effects.blind" : "libraries/jquery/jquery.ui/ui/jquery.effects.blind.js",
 161+ "$j.effects.bounce" : "libraries/jquery/jquery.ui/ui/jquery.effects.bounce.js",
 162+ "$j.effects.clip" : "libraries/jquery/jquery.ui/ui/jquery.effects.clip.js",
 163+ "$j.effects" : "libraries/jquery/jquery.ui/ui/jquery.effects.core.js",
 164+ "$j.effects.drop" : "libraries/jquery/jquery.ui/ui/jquery.effects.drop.js",
 165+ "$j.effects.explode" : "libraries/jquery/jquery.ui/ui/jquery.effects.explode.js",
 166+ "$j.effects.fold" : "libraries/jquery/jquery.ui/ui/jquery.effects.fold.js",
 167+ "$j.effects.highlight" : "libraries/jquery/jquery.ui/ui/jquery.effects.highlight.js",
 168+ "$j.effects.pulsate" : "libraries/jquery/jquery.ui/ui/jquery.effects.pulsate.js",
 169+ "$j.effects.scale" : "libraries/jquery/jquery.ui/ui/jquery.effects.scale.js",
 170+ "$j.effects.shake" : "libraries/jquery/jquery.ui/ui/jquery.effects.shake.js",
 171+ "$j.effects.slide" : "libraries/jquery/jquery.ui/ui/jquery.effects.slide.js",
 172+ "$j.effects.transfer" : "libraries/jquery/jquery.ui/ui/jquery.effects.transfer.js",
 173+
 174+ "$j.ui.accordion" : "libraries/jquery/jquery.ui/ui/jquery.ui.accordion.js",
 175+ "$j.ui.autocomplete" : "libraries/jquery/jquery.ui/ui/jquery.ui.autocomplete.js",
 176+ "$j.ui.button" : "libraries/jquery/jquery.ui/ui/jquery.ui.button.js",
 177+ "$j.ui.datepicker" : "libraries/jquery/jquery.ui/ui/jquery.ui.datepicker.js",
 178+ "$j.ui.dialog" : "libraries/jquery/jquery.ui/ui/jquery.ui.dialog.js",
 179+ "$j.ui.droppable" : "libraries/jquery/jquery.ui/ui/jquery.ui.droppable.js",
 180+ "$j.ui.draggable" : "libraries/jquery/jquery.ui/ui/jquery.ui.draggable.js",
 181+ "$j.ui.mouse" : "libraries/jquery/jquery.ui/ui/jquery.ui.mouse.js",
 182+ "$j.ui.position" : "libraries/jquery/jquery.ui/ui/jquery.ui.position.js",
 183+ "$j.ui.progressbar" : "libraries/jquery/jquery.ui/ui/jquery.ui.progressbar.js",
 184+ "$j.ui.resizable" : "libraries/jquery/jquery.ui/ui/jquery.ui.resizable.js",
 185+ "$j.ui.selectable" : "libraries/jquery/jquery.ui/ui/jquery.ui.selectable.js",
 186+ "$j.ui.slider" : "libraries/jquery/jquery.ui/ui/jquery.ui.slider.js",
 187+ "$j.ui.sortable" : "libraries/jquery/jquery.ui/ui/jquery.ui.sortable.js",
 188+ "$j.ui.tabs" : "libraries/jquery/jquery.ui/ui/jquery.ui.tabs.js"
 189+
 190+
182191 } );
183192
184193 // Add a special css dependency for $j.ui
Index: branches/MwEmbedStandAlone/mwEmbed.js
@@ -1105,7 +1105,8 @@
11061106 // Build the uiRequest
11071107 var uiRequest = [ '$j.ui.dialog' ];
11081108 if( options.draggable ){
1109 - uiRequest.push( '$j.ui.draggable' )
 1109+ uiRequest.push( '$j.ui.mouse' )
 1110+ uiRequest.push( '$j.ui.draggable' )
11101111 }
11111112 if( options.resizable ){
11121113 uiRequest.push( '$j.ui.resizable' );
@@ -1123,7 +1124,8 @@
11241125 // Load the dialog resources
11251126 mw.load([
11261127 [
1127 - '$j.ui'
 1128+ '$j.ui',
 1129+ '$j.widget'
11281130 ],
11291131 uiRequest
11301132 ], function() {
@@ -1135,11 +1137,11 @@
11361138 /**
11371139 * Mobile Safari has special properties for html5 video::
11381140 *
1139 - * NOTE: should be moved to browser detection script
 1141+ * NOTE: should be phased out in favor of browser feature detection script
11401142 */
11411143 mw.isMobileSafari = function() {
11421144 // check mobile safari foce ( for debug )
1143 - if( mw.getConfig( 'forceMobileSafari' ) ){
 1145+ if( mw.getConfig( 'forceMobileSafari' ) || document.URL.indexOf('forceMobileSafari') != -1 ){
11441146 return true;
11451147 }
11461148 if ((navigator.userAgent.indexOf('iPhone') != -1) ||
Index: branches/MwEmbedStandAlone/modules/TimedText/loader.js
@@ -81,6 +81,7 @@
8282 mw.addModuleLoader( 'TimedText.Edit', [
8383 [
8484 '$j.ui',
 85+ '$j.widget',
8586 '$j.fn.menu',
8687 "mw.style.jquerymenu",
8788
Index: branches/MwEmbedStandAlone/modules/AddMedia/loader.js
@@ -38,7 +38,8 @@
3939 mw.addModuleLoader( 'AddMedia.UploadForm', [
4040 [
4141 'mw.UploadForm',
42 - '$j.ui'
 42+ '$j.ui',
 43+ '$j.widget'
4344 ],
4445 [
4546 '$j.ui.datepicker'
@@ -58,6 +59,7 @@
5960 '$j.ui'
6061 ], [
6162 '$j.ui.resizable',
 63+ '$j.ui.mouse',
6264 '$j.ui.draggable',
6365 '$j.ui.dialog',
6466 '$j.ui.tabs',
@@ -75,6 +77,7 @@
7678 [
7779 '$j.ui.progressbar',
7880 '$j.ui.dialog',
 81+ '$j.ui.mouse',
7982 '$j.ui.draggable'
8083 ]
8184 ];
Index: branches/MwEmbedStandAlone/modules/AjaxCategories/mw.AjaxCategories.js
@@ -108,7 +108,8 @@
109109 // Make sure the suggestion plugin is loaded. Load everything else while we're at it
110110 mw.load(
111111 [
112 - '$j.ui',
 112+ '$j.ui',
 113+ '$j.widget',
113114 '$j.ui.dialog',
114115 '$j.fn.suggestions'
115116 ],
Index: branches/MwEmbedStandAlone/modules/EmbedPlayer/loader.js
@@ -156,7 +156,8 @@
157157 // Set up the embed video player class request: (include the skin js as well)
158158 var dependencyRequest = [
159159 [
160 - '$j.ui',
 160+ '$j.ui',
 161+ '$j.widget',
161162 'mw.EmbedPlayer',
162163 'mw.PlayerControlBuilder',
163164 '$j.fn.hoverIntent',
@@ -166,6 +167,7 @@
167168 'JSON'
168169 ],
169170 [
 171+ '$j.ui.mouse',
170172 '$j.fn.menu',
171173 'mw.style.jquerymenu',
172174 '$j.ui.slider'
Index: branches/MwEmbedStandAlone/modules/Sequencer/loader.js
@@ -85,7 +85,9 @@
8686 [
8787
8888 '$j.fn.layout',
 89+
8990 // UI components used in the sequencer interface:
 91+ '$j.ui.mouse',
9092 '$j.ui.accordion',
9193 '$j.ui.dialog',
9294 '$j.ui.droppable',
Index: branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerAddByUrl.js
@@ -75,34 +75,26 @@
7676 });
7777 });
7878 } else if( titleKey.indexOf('Template:') == 0 ) {
79 - // get parsed page text
80 - var request ={
81 - 'action':'parse',
82 - 'page' : titleKey
 79+ // Parse any paramters we can find:
 80+ var apiProvider = '';
 81+ if( mw.parseUri(provider.apiUrl ).host == 'commons.wikimedia.org' ){
 82+ apiProvider = 'commons'
 83+ } else {
 84+ // xxx we need to abstract the remoteSearch driver provider logic
 85+ // into a provider class
 86+ apiProvider = 'local';
8387 }
84 - // should maybe
85 - mw.getJSON( provider.apiUrl, request, function( data ){
86 - if( !data || !data.parse || !data.parse.text || !data.parse.text['*'] ){
87 - $dialog.html( 'Error loading asset');
88 - return ;
89 - }
90 - var apiProvider = '';
91 - if( mw.parseUri( _this.getApiUrl() ).host == 'commons.wikimedia.org' ){
92 - apiProvider = 'commons'
93 - } else {
94 - // xxx we need to abstract the remoteSearch driver provider logic
95 - // into a provider class
96 - apiProvider = 'local';
97 - }
98 - // Get the rendered page text:
99 - _this
100 - .sequencer
101 - .getAddMedia()
102 - .getSmilClipFromWikiTemplate( titleKey, apiProvider, function( smilClip ){
103 - _this.sequencer.getTimeline().insertSmilClipEdit( smilClip );
104 - mw.closeLoaderDialog();
105 - });
106 - })
 88+ // Get the rendered page text:
 89+ var smilClip = _this
 90+ .sequencer
 91+ .getAddMedia()
 92+ .getSmilClipFromWikiTemplate( titleKey, apiProvider );
 93+
 94+ // Add the smil clip to the sequencer
 95+ _this.sequencer.getTimeline().insertSmilClipEdit( smilClip );
 96+
 97+ // Close the dialog loading:
 98+ mw.closeLoaderDialog();
10799 }
108100
109101 });

Status & tagging log