http://www.mediawiki.org/wiki/Special:Code/MediaWiki/73410
Revision: 73410
Author: dale
Date: 2010-09-20 20:42:13 +0000 (Mon, 20 Sep 2010)
Log Message:
-----------
Some code cleanup fixed mw.log removal error
Modified Paths:
--------------
branches/MwEmbedStandAlone/.project
branches/MwEmbedStandAlone/ResourceLoader.php
branches/MwEmbedStandAlone/libraries/jquery/jquery.ui/ui/jquery.ui.widget.js
branches/MwEmbedStandAlone/localSettings.js
branches/MwEmbedStandAlone/modules/AddMedia/loader.js
branches/MwEmbedStandAlone/modules/AddMedia/mw.UploadHandler.js
branches/MwEmbedStandAlone/modules/EmbedPlayer/loader.js
branches/MwEmbedStandAlone/modules/Sequencer/loader.js
branches/MwEmbedStandAlone/modules/TimedText/loader.js
branches/MwEmbedStandAlone/mwEmbed.js
branches/MwEmbedStandAlone/remotes/mediaWiki.js
Removed Paths:
-------------
branches/MwEmbedStandAlone/modules/UploadWizard/
Modified: branches/MwEmbedStandAlone/.project
===================================================================
--- branches/MwEmbedStandAlone/.project 2010-09-20 20:33:45 UTC (rev 73409)
+++ branches/MwEmbedStandAlone/.project 2010-09-20 20:42:13 UTC (rev 73410)
@@ -6,6 +6,11 @@
</projects>
<buildSpec>
<buildCommand>
+
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
@@ -28,5 +33,6 @@
</buildSpec>
<natures>
<nature>org.eclipse.php.core.PHPNature</nature>
+ <nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
</projectDescription>
Modified: branches/MwEmbedStandAlone/ResourceLoader.php
===================================================================
--- branches/MwEmbedStandAlone/ResourceLoader.php 2010-09-20 20:33:45 UTC
(rev 73409)
+++ branches/MwEmbedStandAlone/ResourceLoader.php 2010-09-20 20:42:13 UTC
(rev 73410)
@@ -218,8 +218,8 @@
* @return String javascript to tell mwEmbed that the requested
resource set is loaded
*/
static private function getOnDoneCallback( ){
- return 'if(typeof mw !=\'undefined\' &&
mw.loadDone){mw.loadDone(\'' .
- htmlspecialchars( self::$rawClassList ) . '\');};';
+ return "\n" . 'if( typeof mw !=\'undefined\' && mw.loadDone ){
mw.loadDone(\'' .
+ htmlspecialchars( self::$rawClassList ) . '\')};';
}
/**
Modified:
branches/MwEmbedStandAlone/libraries/jquery/jquery.ui/ui/jquery.ui.widget.js
===================================================================
---
branches/MwEmbedStandAlone/libraries/jquery/jquery.ui/ui/jquery.ui.widget.js
2010-09-20 20:33:45 UTC (rev 73409)
+++
branches/MwEmbedStandAlone/libraries/jquery/jquery.ui/ui/jquery.ui.widget.js
2010-09-20 20:42:13 UTC (rev 73410)
@@ -7,7 +7,7 @@
*
* http://docs.jquery.com/UI/Widget
*/
-(function( $, undefined ) {
+(function( $ ) {
var _remove = $.fn.remove;
@@ -90,7 +90,7 @@
methodValue = instance && $.isFunction(
instance[options] ) ?
instance[ options ].apply(
instance, args ) :
instance;
- if ( methodValue !== instance && methodValue
!== undefined ) {
+ if ( methodValue !== instance && methodValue
!== 'undefined' ) {
returnValue = methodValue;
return false;
}
@@ -173,7 +173,7 @@
}
if (typeof key === "string" ) {
- if ( value === undefined ) {
+ if ( value === 'undefined' ) {
return this.options[ key ];
}
options = {};
Modified: branches/MwEmbedStandAlone/localSettings.js
===================================================================
--- branches/MwEmbedStandAlone/localSettings.js 2010-09-20 20:33:45 UTC (rev
73409)
+++ branches/MwEmbedStandAlone/localSettings.js 2010-09-20 20:42:13 UTC (rev
73410)
@@ -3,7 +3,7 @@
*
* This file is automatically included in any resourceLoader or mwEmbed.js
request
*
-* You can put any mw.setConfig('moduleOption', value ) calls in here.
+* You can put any mw.setConfig('ModuleName.Option', value ) calls in here.
*
* In a fresh svn checkout this file will always be empty.
*/
Modified: branches/MwEmbedStandAlone/modules/AddMedia/loader.js
===================================================================
--- branches/MwEmbedStandAlone/modules/AddMedia/loader.js 2010-09-20
20:33:45 UTC (rev 73409)
+++ branches/MwEmbedStandAlone/modules/AddMedia/loader.js 2010-09-20
20:42:13 UTC (rev 73410)
@@ -39,7 +39,8 @@
[
'mw.UploadForm',
'$j.ui',
- '$j.widget'
+ '$j.widget',
+ '$j.ui.mouse'
],
[
'$j.ui.datepicker'
@@ -75,12 +76,12 @@
'mw.UploadHandler',
'mw.UploadInterface',
'$j.ui',
+ '$j.ui.mouse',
'$j.widget'
],
[
'$j.ui.progressbar',
- '$j.ui.position',
- '$j.ui.mouse',
+ '$j.ui.position',
'$j.ui.dialog',
'$j.ui.draggable'
]
Modified: branches/MwEmbedStandAlone/modules/AddMedia/mw.UploadHandler.js
===================================================================
--- branches/MwEmbedStandAlone/modules/AddMedia/mw.UploadHandler.js
2010-09-20 20:33:45 UTC (rev 73409)
+++ branches/MwEmbedStandAlone/modules/AddMedia/mw.UploadHandler.js
2010-09-20 20:42:13 UTC (rev 73410)
@@ -85,12 +85,12 @@
// Update the selecto to include pointer to upload handler
var selectorElement = $j( this.selector ).get( 0 );
selectorElement[ 'uploadHandler' ] = myUpload;
- }
+ };
} )( jQuery );
mw.UploadHandler = function( options ) {
return this.init( options );
-}
+};
mw.UploadHandler.prototype = {
@@ -232,7 +232,7 @@
'name': 'comment',
'type' : 'hidden'
})
- )
+ );
}
var uploadDesc = _this.getUploadDescription();
@@ -305,7 +305,7 @@
} else if ( _this.upload_mode == 'autodetect' ) {
mw.log( 'detectUploadMode::' + _this.upload_mode + '
api:' + _this.apiUrl );
if( !_this.apiUrl ) {
- mw.log( 'Error: can\'t autodetect mode without
api url' );
+ mw.log( 'Error: cant autodetect mode without
api url' );
return;
}
@@ -398,7 +398,7 @@
'name' : "action",
'value' : "upload"
})
- )
+ );
}
// Add JSON response format (jsonfm so that IE does not prompt
save dialog box on iframe result )
@@ -410,7 +410,7 @@
'name' : "format",
'value' : "jsonfm"
})
- )
+ );
}
// Map a new hidden form
@@ -504,7 +504,7 @@
'comment' : this.getUploadDescription(),
'watch' : ( $j( '#wpWatchthis' ).is( ':checked' ) )
? 'true' : 'false',
'ignorewarnings': ($j('#wpIgnoreWarning' ).is(
':checked' ) ) ? 'true' : 'false'
- }
+ };
this.doHttpUpload( httpUpConf );
},
@@ -771,7 +771,7 @@
if ( apiRes.upload && apiRes.upload.imageinfo &&
apiRes.upload.imageinfo.descriptionurl ) {
// Call the completion callback if available.
if ( typeof _this.doneUploadCb == 'function' ) {
- _this.doneUploadCb( apiRes )
+ _this.doneUploadCb( apiRes );
// Close the ui
_this.ui.close();
return true;
@@ -833,7 +833,7 @@
_this.processApiResult( data );
} );
} else {
- mw.log( 'No session key re-sending upload' )
+ mw.log( 'No session key re-sending upload' );
//Do a stashed upload
$j( '#wpIgnoreWarning' ).attr( 'checked', true );
$j( _this.form ).submit();
@@ -876,7 +876,7 @@
this.editToken = $j("form[name='token']").val();
}
if( !this.editToken ){
- mw.log("Error: can not find edit token ")
+ mw.log("Error: can not find edit token ");
return false;
}
return this.editToken;
@@ -948,14 +948,14 @@
if ( !data || !data.query || !data.query.pages ) {
// Ignore a null result
- mw.log(" No data in DestCheck result")
+ mw.log(" No data in DestCheck result");
return;
}
if ( data.query.pages[-1] ) {
// No conflict found
- mw.log(" No pages in DestCheck result")
- return;
+ mw.log(" No pages in DestCheck result");
+ return false;
}
for ( var page_id in data.query.pages ) {
if ( !data.query.pages[ page_id ].imageinfo ) {
@@ -966,7 +966,7 @@
if ( data.query.normalized ) {
var ntitle =
data.query.normalized[0].to;
} else {
- var ntitle = data.query.pages[ page_id
].title
+ var ntitle = data.query.pages[ page_id
].title;
}
var img = data.query.pages[ page_id
].imageinfo[0];
@@ -983,7 +983,7 @@
.attr( linkAttr )
.text( ntitle )
)
- )
+ );
var $imageLink = $j('<a />')
.addClass( 'image' )
@@ -1039,5 +1039,6 @@
);
}
} );
- }
+ };
+
})( jQuery );
Modified: branches/MwEmbedStandAlone/modules/EmbedPlayer/loader.js
===================================================================
--- branches/MwEmbedStandAlone/modules/EmbedPlayer/loader.js 2010-09-20
20:33:45 UTC (rev 73409)
+++ branches/MwEmbedStandAlone/modules/EmbedPlayer/loader.js 2010-09-20
20:42:13 UTC (rev 73410)
@@ -176,11 +176,11 @@
'$j.cookie',
// Add JSON lib if browsers does not define
"JSON" natively
'JSON',
- '$j.ui',
- '$j.widget'
+ '$j.ui',
+ '$j.widget',
+ '$j.ui.mouse'
],
- [
- '$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-20
20:33:45 UTC (rev 73409)
+++ branches/MwEmbedStandAlone/modules/Sequencer/loader.js 2010-09-20
20:42:13 UTC (rev 73410)
@@ -87,9 +87,9 @@
'$j.fn.layout',
- // UI components used in the sequencer
interface:
- '$j.ui.mouse',
+ // UI components used in the sequencer
interface:
'$j.widget',
+ '$j.ui.mouse',
'$j.ui.position',
'$j.ui.accordion',
'$j.ui.dialog',
Modified: branches/MwEmbedStandAlone/modules/TimedText/loader.js
===================================================================
--- branches/MwEmbedStandAlone/modules/TimedText/loader.js 2010-09-20
20:33:45 UTC (rev 73409)
+++ branches/MwEmbedStandAlone/modules/TimedText/loader.js 2010-09-20
20:42:13 UTC (rev 73410)
@@ -82,6 +82,7 @@
[
'$j.ui',
'$j.widget',
+ '$j.ui.mouse',
'$j.ui.position',
'$j.fn.menu',
"mw.style.jquerymenu",
Modified: branches/MwEmbedStandAlone/mwEmbed.js
===================================================================
--- branches/MwEmbedStandAlone/mwEmbed.js 2010-09-20 20:33:45 UTC (rev
73409)
+++ branches/MwEmbedStandAlone/mwEmbed.js 2010-09-20 20:42:13 UTC (rev
73410)
@@ -1,6 +1,6 @@
// Add support for html5 / mwEmbed elements to browsers that do not support
the elements natively
// For discussion and comments, see: http://ejohn.org/blog/html5-shiv/
-'video audio source track'.replace(/\w+/g, function(n){
document.createElement(n) });
+'video audio source track'.replace(/\w+/g, function(n){
document.createElement(n); });
/**
* @license
@@ -41,7 +41,7 @@
*/
( function( mw ) {
// The version of mwEmbed
- mw.version = MW_EMBED_VERSION
+ mw.version = MW_EMBED_VERSION;
// List valid skins here:
mw.validSkins = [ 'mvpcf', 'kskin' ];
@@ -89,7 +89,7 @@
} else {
mwConfig[ name ] = value;
}
- }
+ };
/**
* Set a default config value Will only update configuration if no
value is
@@ -112,7 +112,7 @@
if( typeof mwConfig[ name ] == 'undefined') {
mwConfig[ name ] = value;
}
- }
+ };
/**
* Getter for configuration values
@@ -126,7 +126,7 @@
if( mwConfig[ name ] )
return mwConfig[ name ];
return false;
- }
+ };
/**
* Loads the mwUserConfig from a cookie.
@@ -161,7 +161,7 @@
callback();
}
});
- }
+ };
/**
* Save a user configuration var to a cookie & local global variable
Loads
@@ -182,7 +182,7 @@
// Update the cookie ( '$j.cookie' & 'JSON' should already be
loaded )
$j.cookie( 'mwUserConfig', JSON.stringify( mwUserConfig ) );
- }
+ };
/**
* Save a user configuration var to a cookie & local global variable
@@ -196,7 +196,7 @@
if( mwUserConfig[ name ] )
return mwUserConfig[ name ];
return false;
- }
+ };
/**
* Add a hook system for a target object / interface
@@ -225,8 +225,8 @@
if( ! this.hooks[ hookName ] ) {
this.hooks[ hookName ] = [ ];
}
- this.hooks[ hookName ].push( hookFunction )
- }
+ this.hooks[ hookName ].push( hookFunction );
+ };
/**
* Runs all the hooks by a given name with reference to the
host object
@@ -246,8 +246,8 @@
}
}
}
- }
- }
+ };
+ };
// Add hooks system to the core "mw" object
mw.addHookSystem( mw );
@@ -348,7 +348,7 @@
instanceCallback( loadRequest );
instanceCallback = null;
}
- }
+ };
// Check for empty loadRequest ( directly return the
callback )
if( mw.isEmpty( loadRequest ) ) {
@@ -564,7 +564,7 @@
if( this.getResourcePath( loadName ) ) {
// Check if not already in request
queue and not defined in global namespace
if( !mw.isset( loadName ) && !
uniqueResourceName[ loadName] ){
- groupClassKey += coma + loadName
+ groupClassKey += coma +
loadName;
coma = ',';
// Check for style sheet
dependencies
@@ -659,7 +659,7 @@
_this.moduleLoadQueue[moduleName].functionQueue.shift()();
}
}
- }
+ };
// Check for single request or javascript debug based
loading:
if( !mw.getResourceLoaderPath() || mw.getConfig(
'loader.groupStrategy' ) == 'single' ){
@@ -731,7 +731,7 @@
}
}
runModuleFunctionQueue();
- }
+ };
// Local instance of load requests to retain
resourceSet
// context:
var localLoadCallInstance = function(
moduleName, resourceSet ){
@@ -739,7 +739,7 @@
_this.moduleLoadQueue[
moduleName ].loaded = true;
checkModulesDone();
});
- }
+ };
// Load the shared resources
mw.load( sharedResourceList, function(){
@@ -923,10 +923,10 @@
*/
getResourcePath: function( resourceName ) {
if( this.resourcePaths[ resourceName ] )
- return this.resourcePaths[ resourceName ]
+ return this.resourcePaths[ resourceName ];
return false;
}
- }
+ };
/**
* Load done callback for script loader
@@ -969,7 +969,7 @@
mw.setLoadDoneCB = function( requestName, callback ) {
// If the requestName is already done loading just callback
if( mwLoadDoneCB[ requestName ] == 'done' ) {
- callback( requestName )
+ callback( requestName );
}
// Setup the function queue if unset
if( typeof mwLoadDoneCB[ requestName ] != 'object' ) {
@@ -990,32 +990,32 @@
*/
mw.load = function( loadRequest, callback ) {
return mw.loader.load( loadRequest, callback );
- }
+ };
/**
* Add module entry point: Adds a module to the mwLoader object
*/
mw.addModuleLoader = function ( name, loaderFunction ) {
return mw.loader.addModuleLoader( name, loaderFunction );
- }
+ };
/**
* Add Class File Paths entry point:
*/
mw.addResourcePaths = function ( resourceSet ) {
return mw.loader.addResourcePaths( resourceSet );
- }
+ };
mw.addStyleResourceDependency = function ( resourceSet ) {
return mw.loader.addStyleResourceDependency( resourceSet );
- }
+ };
/**
* Get Class File Path entry point:
*/
mw.getResourcePath = function( resourceName ) {
return mw.loader.getResourcePath( resourceName );
- }
+ };
/**
@@ -1040,7 +1040,7 @@
.html()
});
return $dialog;
- }
+ };
/**
* Close the loader dialog created with addLoaderDialog
@@ -1056,7 +1056,7 @@
$j( '#mwTempLoaderDialog' )
.dialog( 'destroy' );
} , 10);
- }
+ };
/**
* Add a (temporary) dialog window:
@@ -1086,7 +1086,7 @@
}, options );
if( ! options.title || ! options.content ){
- mw.log("Error: mwEmbed addDialog missing required
options ( title, content ) ")
+ mw.log("Error: mwEmbed addDialog missing required
options ( title, content ) ");
return ;
}
@@ -1104,8 +1104,8 @@
// Build the uiRequest
var uiRequest = [ '$j.ui.dialog' ];
if( options.draggable ){
- uiRequest.push( '$j.ui.mouse' )
- uiRequest.push( '$j.ui.draggable' )
+ uiRequest.push( '$j.ui.mouse' );
+ uiRequest.push( '$j.ui.draggable' );
}
if( options.resizable ){
uiRequest.push( '$j.ui.resizable' );
@@ -1117,7 +1117,7 @@
buttons = { };
options.buttons[ buttonMsg ] = function() {
$j( this ).dialog( 'close' );
- }
+ };
}
// Load the dialog resources
@@ -1125,6 +1125,7 @@
[
'$j.ui',
'$j.widget',
+ '$j.ui.mouse',
'$j.ui.position'
],
uiRequest
@@ -1141,7 +1142,7 @@
}); */
} );
return $j( '#mwTempLoaderDialog' );
- }
+ };
/**
* Mobile HTML5 has special properties for html5 video::
@@ -1226,13 +1227,13 @@
// If the object is defined ( or we are done loading from a
callback )
if ( mw.isset( objectName ) || mwLoadDoneCB[ objectName ] ==
'done' ) {
- callback( objectName )
+ callback( objectName );
}else{
setTimeout( function( ) {
mw.waitForObject( objectName, callback,
_callNumber);
}, 25);
}
- }
+ };
/**
* Check if an object is empty or if its an empty string.
@@ -1258,7 +1259,7 @@
// Else object is empty:
return true;
- }
+ };
/**
* Log a string msg to the console
@@ -1296,7 +1297,7 @@
log_elm.scrollTop = log_elm.scrollHeight;
}*/
}
- }
+ };
// Setup the local mwOnLoadFunctions array:
var mwOnLoadFunctions = [];
@@ -1324,7 +1325,7 @@
// If mwReadyFlag is already "true" issue the callback
directly:
callback();
}
- }
+ };
/**
* Runs all the queued functions called by mwEmbedSetup
@@ -1347,7 +1348,7 @@
// Once we have run all the queued functions
mw.loader.runModuleLoadQueue();
- }
+ };
/**
@@ -1367,7 +1368,7 @@
if( callback ) {
callback( scriptRequest );
}
- }
+ };
// Set the base url based scriptLoader availability & type of
// scriptRequest
// ( presently script loader only handles "classes" not
relative urls:
@@ -1397,7 +1398,7 @@
mw.log( 'mw.getScript: ' + url );
}
- // If jQuery is available and debug is off load the scirpt via
jQuery
+ // If jQuery is available and debug is off load the script via
jQuery
// ( will use XHR if on same domain )
if( mw.isset( 'window.jQuery' )
&& mw.getConfig( 'debug' ) === false
@@ -1564,7 +1565,7 @@
mwpath = mw.absoluteUrl( mwpath ) ;
}
return mwpath;
- }
+ };
/**
* Get Script loader path
@@ -1581,7 +1582,7 @@
return src.split('?')[0];
}
return false;
- }
+ };
/**
* Given a float number of seconds, returns npt format response. (
ignore
@@ -1599,7 +1600,7 @@
return '0:00:00';
}
- var tm = mw.seconds2Measurements( sec )
+ var tm = mw.seconds2Measurements( sec );
// Round the number of seconds to the required number of
significant
// digits
@@ -1612,7 +1613,7 @@
tm.seconds = '0' + tm.seconds;
}
if( tm.hours == 0 ){
- hoursStr = ''
+ hoursStr = '';
} else {
if ( tm.minutes < 10 )
tm.minutes = '0' + tm.minutes;
@@ -1620,7 +1621,7 @@
hoursStr = tm.hours + ":";
}
return hoursStr + tm.minutes + ":" + tm.seconds;
- }
+ };
/**
* Given seconds return array with 'days', 'hours', 'min', 'seconds'
@@ -1630,12 +1631,12 @@
*/
mw.seconds2Measurements = function ( sec ){
var tm = {};
- tm.days = Math.floor( sec / ( 3600 * 24 ) )
+ tm.days = Math.floor( sec / ( 3600 * 24 ) );
tm.hours = Math.floor( sec / 3600 );
tm.minutes = Math.floor( ( sec / 60 ) % 60 );
tm.seconds = sec % 60;
return tm;
- }
+ };
/**
* Take hh:mm:ss,ms or hh:mm:ss.ms input, return the number of seconds
@@ -1671,7 +1672,7 @@
sec = sec.replace( /,\s?/, '.' );
// Return seconds float
return parseInt( hour * 3600 ) + parseInt( min * 60 ) +
parseFloat( sec );
- }
+ };
// Local mwEmbedSrc variable ( for cache of mw.getMwEmbedSrc )
var mwEmbedSrc = null;
@@ -1708,7 +1709,7 @@
}
mw.log( 'Error: getMwEmbedSrc failed to get script path' );
return false;
- }
+ };
// Local mwUrlParam variable ( for cache of mw.getUrlParam )
var mwUrlParam = null;
@@ -1725,7 +1726,7 @@
var req_param = '';
// If we already have a URI, add it to the param request:
- var urid = mw.parseUri( mwEmbedSrc ).queryKey['urid']
+ var urid = mw.parseUri( mwEmbedSrc ).queryKey['urid'];
// If we're in debug mode, get a fresh unique request key and
pass on
// "debug" param
@@ -1750,7 +1751,7 @@
// Update the local cache and return the value
mwUrlParam = req_param;
return mwUrlParam;
- }
+ };
/**
* Replace url parameters via newParams key value pairs
@@ -1783,7 +1784,7 @@
amp = '&';
}
return new_url;
- }
+ };
/**
* parseUri 1.2.2 (c) Steven Levithan <stevenlevithan.com> MIT License
@@ -1904,7 +1905,7 @@
'"' : """,
'<' : "<",
'>' : ">"
- }
+ };
for( var i in replaceMap ){
text = text.split(i).join( replaceMap[i]);
}
@@ -1963,7 +1964,7 @@
// Set the User language
if( typeof wgUserLanguage !=
'undefined' && mw.isValidLang( wgUserLanguage) ) {
- mw.setConfig( 'userLanguage',
wgUserLanguage )
+ mw.setConfig( 'userLanguage',
wgUserLanguage );
}else{
// Grab it from the included url
var langKey = mw.parseUri(
mw.getMwEmbedSrc() ).queryKey['uselang'];
@@ -2037,7 +2038,7 @@
hasUiCss = true;
return true;
}
- })
+ });
} );
// Check all the "style" nodes for @import for sheet name
// xxx Note: we could do this a bit cleaner with regEx
@@ -2053,7 +2054,7 @@
});
});
return hasUiCss;
- }
+ };
/**
* Loads the core mwEmbed "loader.js" file config
@@ -2074,7 +2075,7 @@
// Check if we are using a static package ( mwEmbed path
includes
// -static )
- if( mw.isStaticPackge() ){
+ if( mw.isStaticPackge() ){
callback();
return ;
}
@@ -2082,7 +2083,7 @@
// Add the Core loader to the request
// The follow code is ONLY RUN in debug / raw file mode
mw.load( 'loader.js', callback );
- }
+ };
/**
* Checks if the javascript is a static package ( not using resource
loader )
@@ -2096,7 +2097,7 @@
return true;
}
return false;
- }
+ };
/**
* Check for resource loader module loaders, and localization files
@@ -2186,18 +2187,18 @@
// Set the mwModuleLoaderCheckFlag flag to true
mwModuleLoaderCheckFlag = true;
callback();
- }
+ };
if( mw.getConfig( 'LoadLocalSettings') != true ){
continueCallback();
return;
}
- mw.log("Load loacal settings")
+ mw.log("Load loacal settings");
mw.load( 'localSettings.js', function(){
continueCallback();
- })
+ });
}
- }
+ };
/**
* Checks if a css style rule exists
@@ -2218,9 +2219,9 @@
var rules = null;
try{
if ( document.styleSheets[i].cssRules )
- rules = document.styleSheets[i].cssRules
+ rules =
document.styleSheets[i].cssRules;
else if (document.styleSheets[0].rules)
- rules = document.styleSheets[i].rules
+ rules = document.styleSheets[i].rules;
for(var j=0 ; j < rules.length ; j++ ) {
var rule = rules[j].selectorText;
if( rule && rule.indexOf( styleRule )
!= -1 ) {
@@ -2232,7 +2233,7 @@
}
}
return false;
- }
+ };
// Flag to register the domReady has been called
var mwDomReadyFlag = false;
@@ -2260,7 +2261,7 @@
setTimeout(function(){
mw.setupMwEmbed();
},1);
- }
+ };
/**
* A version comparison utility function Handles version of types
@@ -2277,7 +2278,7 @@
* version is less than minVersion
*/
mw.versionIsAtLeast = function( minVersion, clientVersion ) {
- var minVersionParts = minVersion.split('.')
+ var minVersionParts = minVersion.split('.');
var clientVersionParts = clientVersion.split('.');
for( var i =0; i < minVersionParts.length; i++ ) {
if( parseInt( clientVersionParts[i] ) > parseInt(
minVersionParts[i] ) ) {
@@ -2289,7 +2290,7 @@
}
// Same version:
return true;
- }
+ };
/**
* Runs all the triggers on a given object with a single "callback"
@@ -2337,7 +2338,7 @@
callback();
}
} );
- }
+ };
/**
* Utility jQuery bindings Setup after jQuery is available ).
*/
@@ -2373,7 +2374,7 @@
* rotations == 360 ) { rotations = 0; }
rotations += 5; }, 25); }
*/
return this;
- }
+ };
/**
* Add an absolute overlay spinner useful for cases
where the
* element does not display child elements, ( images,
video )
@@ -2399,7 +2400,7 @@
});
$j('body').append( $spinner );
return $spinner;
- }
+ };
/**
* dragDrop file loader
@@ -2412,7 +2413,7 @@
$j( _this.selector
).dragDropFile();
} );
}
- }
+ };
/**
* Shortcut to a themed button Should be depreciated
for $.button
@@ -2455,11 +2456,11 @@
.addClass( 'ui-state-default
ui-corner-all ui-icon_link' );
// Add css if set:
if( options.css ) {
- $button.css( options.css )
+ $button.css( options.css );
}
if( options['class'] ) {
- $button.addClass( options['class'] )
+ $button.addClass( options['class'] );
}
@@ -2485,7 +2486,7 @@
function() {
$j( this ).removeClass(
'ui-state-hover' );
}
- )
+ );
return this;
};
@@ -2514,7 +2515,7 @@
};
} )( $j );
- }
+ };
} )( window.mw );
@@ -2529,7 +2530,7 @@
function runMwDomReady(){
mwDomIsReady = true;
if( mw.domReady ){
- mw.domReady()
+ mw.domReady();
}
}
// Check if already ready:
Modified: branches/MwEmbedStandAlone/remotes/mediaWiki.js
===================================================================
--- branches/MwEmbedStandAlone/remotes/mediaWiki.js 2010-09-20 20:33:45 UTC
(rev 73409)
+++ branches/MwEmbedStandAlone/remotes/mediaWiki.js 2010-09-20 20:42:13 UTC
(rev 73410)
@@ -4,7 +4,7 @@
*/
var urlparts = getRemoteEmbedPath();
var mwEmbedHostPath = urlparts[0];
-var mwRemoteVersion = 'r147';
+var mwRemoteVersion = 'r148';
var mwUseScriptLoader = true;
// Log the mwRemote version makes it easy to debug cache issues
@@ -35,9 +35,9 @@
mwUseScriptLoader = false;
}
-//mwReqParam['debug'] = false;
-//mwUseScriptLoader = true;
-//mwRemoteVersion = Math.random();
+mwReqParam['debug'] = false;
+mwUseScriptLoader = true;
+mwRemoteVersion = Math.random();
// Setup up some globals to wrap mwEmbed mw.ready and mw.setConfig functions
@@ -191,11 +191,12 @@
var libraries = [];
scriptName = 'uploadPage.js';
libraries = [
- 'mw.UploadHandler',
+
'mw.UploadInterface',
- 'mw.Firefogg',
+ 'mw.Firefogg',
'$j.ui',
'$j.widget',
+ '$j.ui.mouse',
'$j.ui.position',
'$j.ui.progressbar',
'$j.ui.dialog',
@@ -598,12 +599,20 @@
// Add requested classSet to scriptLoader request
for( var i=0; i < classSet.length; i++ ){
var cName = classSet[i];
+ // always include our version of the library ( too many
crazy conflicts with old library versions )
+ rurl += ',' + cName;
+ /*
if( !mwCheckObjectPath( cName ) ){
- rurl += ',' + cName;
- }
+
+ } else {
+ // Check for old version of jquery ui components
+ if( $j.ui.version == '1.7.1' ){
+ if(cName.indexOf('$j.ui') != -1 ){
+ rurl += ',' + cName;
+ }
+ }
+ }*/
}
- // force add our updated version of $j.cookie
- rurl +=',$j.cookie';
// Add the remaining arguments
rurl += '&' + mwGetReqArgs();
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs