r60337 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60336‎ | r60337 | r60338 >
Date:20:17, 23 December 2009
Author:dale
Status:deferred
Tags:
Comment:
* comment updates
Modified paths:
  • /branches/js2-work/phase3/js/mwEmbed/mwEmbed.js (modified) (history)

Diff [purge]

Index: branches/js2-work/phase3/js/mwEmbed/mwEmbed.js
@@ -1308,7 +1308,7 @@
13091309 if( !data['format'] )
13101310 data['format'] = 'json';
13111311
1312 - mw.log("run getJSON: " + url + ' data: ' + data['action'] + ' apiPost: ' +mw.getConfig( 'apiPostActions' ) );
 1312+ mw.log("run getJSON: " + url + ' data: ' + data['action'] );
13131313
13141314 if( $j.inArray( data['action'], mw.getConfig( 'apiPostActions' ) ) != -1 ){
13151315 if( ! mw.isLocalDomain( url ) ){
@@ -1421,17 +1421,21 @@
14221422 }
14231423
14241424 /**
1425 - * add a dialog window:
 1425+ * Add a dialog window:
 1426+ * @param {String} title Title string for the dialog
 1427+ * @param {String} msg_txt String to be inserted in msg box
 1428+ * @param {Mixed} buttons A button object for the dialog
 1429+ * Can be 'ok' for oky button.
14261430 */
1427 - mw.addDialog = function ( title, msg_txt, btn ) {
 1431+ mw.addDialog = function ( title, msg_txt, buttons ) {
14281432 $j( '#mwe_tmp_loader' ).remove();
1429 - // append the style free loader ontop:
 1433+ // Append the style free loader ontop:
14301434 $j( 'body' ).append( '<div id="mwe_tmp_loader" style="display:none" title="' + title + '" >' +
14311435 msg_txt +
14321436 '</div>' );
14331437 // special btn == ok gives empty give a single "oky" -> "close"
1434 - if ( btn == 'ok' ) {
1435 - btn[ gM( 'mwe-ok' ) ] = function() {
 1438+ if ( buttons == 'ok' ) {
 1439+ buttons[ gM( 'mwe-ok' ) ] = function() {
14361440 $j( '#mwe_tmp_loader' ).close();
14371441 }
14381442 }
@@ -1445,12 +1449,12 @@
14461450 ]
14471451 ], function() {
14481452 $j( '#mwe_tmp_loader' ).dialog( {
1449 - bgiframe: true,
1450 - draggable: false,
1451 - resizable: false,
1452 - modal: true,
1453 - width:400,
1454 - buttons: btn
 1453+ 'bgiframe': true,
 1454+ 'draggable': false,
 1455+ 'resizable': false,
 1456+ 'modal': true,
 1457+ 'width':400,
 1458+ 'buttons': buttons
14551459 } );
14561460 } );
14571461 }

Status & tagging log