Index: branches/js2-work/phase3/js/mwEmbed/tests/testLang.html |
— | — | @@ -8,7 +8,6 @@ |
9 | 9 | } |
10 | 10 | </style> |
11 | 11 | <script type="text/javascript" > |
12 | | -var scriptLoaderURID = 't17'; |
13 | 12 | //for just setting one or two to test at a time for debug |
14 | 13 | //var langKeyDebug = [ 'lt' ]; //pl |
15 | 14 | var langKeyDebug = mw.getConfig( 'languageCodeList' ); |
— | — | @@ -41,7 +40,7 @@ |
42 | 41 | var langName = 'Language' + langKey.substr(0,1).toUpperCase() + langKey.substr( 1,langKey.length ); |
43 | 42 | $j.getScript( '../includes/languages/classes/' + langName + '.js' , function(){ |
44 | 43 | // Get the current language mw.testLang js |
45 | | - $j.getScript( '../../../mwScriptLoader.php?class=mw.testLang&debug=true&urid='+ scriptLoaderURID +'&uselang='+langKey, function(){ |
| 44 | + $j.getScript( '../../../mwScriptLoader.php?class=mw.testLang&debug=true&uselang='+langKey, function(){ |
46 | 45 | var o=''; |
47 | 46 | o+='<tr><td colspan="6" height="20" style="font-size:large"><b>Lang:' + langKey + '</b></td></tr>'; |
48 | 47 | //now for each langage msg: |
— | — | @@ -83,7 +82,8 @@ |
84 | 83 | 'meta' : 'allmessages', |
85 | 84 | 'ammessages' : mKey, |
86 | 85 | 'amlang' : langKey, |
87 | | - 'amarg' : msgparam |
| 86 | + 'amargs' : msgparam, |
| 87 | + 'amenableparser' : true |
88 | 88 | }; |
89 | 89 | mw.getJSON('../../../api.php', request, function( data ) { |
90 | 90 | var t = '#'+ tkey; |
Index: branches/js2-work/phase3/js/mwEmbed/tests/Add_Media_Wizard.html |
— | — | @@ -11,23 +11,24 @@ |
12 | 12 | border:medium none; |
13 | 13 | } |
14 | 14 | </style> |
15 | | - <!-- |
| 15 | + |
16 | 16 | <script type="text/javascript" src="../mwEmbed.js?debug=true"></script> |
17 | | - --> |
18 | | - |
| 17 | + |
| 18 | + <!-- |
19 | 19 | <script type="text/javascript" src="../jsScriptLoader.php?uselang=en&class=window.jQuery,mwEmbed,mw.RemoteSearchDriver,$j.ui,$j.ui.resizable,$j.ui.draggable,$j.ui.dialog,$j.ui.tabs,$j.ui.sortable,$j.cookie,baseRemoteSearch&urid=1257728132531&debug=true"></script> |
| 20 | + --> |
20 | 21 | |
21 | 22 | <script type="text/javascript"> |
22 | 23 | mw.ready( function(){ |
23 | | - mw.load( 'AddMedia.addMediaWizard', function(){ |
24 | | - |
| 24 | + mw.load( 'AddMedia.addMediaWizard', function(){ |
25 | 25 | $j('#add_media_link').addMediaWizard( { |
26 | 26 | 'profile' : 'html_edit', |
27 | 27 | 'target_textbox' : '#wpTextbox1', |
28 | 28 | 'target_render_area' : '#inline_append', |
29 | 29 | 'import_url_mode' : 'remote_link', |
30 | 30 | 'remote_insert_description' : true, |
31 | | - //note selections in the textbox will take over the default query |
| 31 | + |
| 32 | + // Note selections in the textbox will take over the default query |
32 | 33 | 'default_query' : 'fish', |
33 | 34 | |
34 | 35 | //we only enabled commons |
Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/searchLibs/kalturaSearch.js |
— | — | @@ -267,11 +267,11 @@ |
268 | 268 | _this.resultsObj = {}; |
269 | 269 | this.num_results = 0; |
270 | 270 | |
271 | | - for ( var resource_id in data ) { |
272 | | - var result = data[ resource_id ]; |
| 271 | + for ( var result_id in data ) { |
| 272 | + var result = data[ result_id ]; |
273 | 273 | |
274 | 274 | // Skip the resource if the license is not compatible |
275 | | - if( result.license_url && ! _this.rsd.checkCompatibleLicense( resource.licenseurl ) ){ |
| 275 | + if( result.license_url && ! _this.rsd.checkCompatibleLicense( result.license_url ) ){ |
276 | 276 | continue; |
277 | 277 | } |
278 | 278 | |
— | — | @@ -289,7 +289,7 @@ |
290 | 290 | } |
291 | 291 | |
292 | 292 | this.num_results++; |
293 | | - _this.resultsObj[ resource_id ] = result; |
| 293 | + _this.resultsObj[ result_id ] = result; |
294 | 294 | |
295 | 295 | } |
296 | 296 | } |
Index: branches/js2-work/phase3/js/mwEmbed/modules/AddMedia/mw.RemoteSearchDriver.js |
— | — | @@ -79,7 +79,7 @@ |
80 | 80 | /** |
81 | 81 | * default_remote_search_options |
82 | 82 | * |
83 | | -* Options for initialising the remote search driver |
| 83 | +* Options for initializing the remote search driver |
84 | 84 | */ |
85 | 85 | var default_remote_search_options = { |
86 | 86 | |
— | — | @@ -157,9 +157,9 @@ |
158 | 158 | |
159 | 159 | $.addMediaWizard = function( options ){ |
160 | 160 | $.fn.addMediaWizard ( options, function( amwObj ) { |
161 | | - // do the add-media-wizard display |
| 161 | + // Do the add-media-wizard display |
162 | 162 | amwObj.createUI(); |
163 | | - } ) |
| 163 | + } ); |
164 | 164 | } |
165 | 165 | |
166 | 166 | } )( jQuery ); |
— | — | @@ -658,9 +658,10 @@ |
659 | 659 | createUI: function() { |
660 | 660 | var _this = this; |
661 | 661 | this.clearTextboxCache(); |
662 | | - |
| 662 | + |
663 | 663 | // Setup the parent container (if not already created) |
664 | | - if( $j( _this.target_container ).length == 0 ){ |
| 664 | + mw.log(" looking for: " + _this.target_container); |
| 665 | + if( !_this.target_container || $j( _this.target_container ).length == 0 ){ |
665 | 666 | this.createDialogContainer(); |
666 | 667 | }else{ |
667 | 668 | // Empty out the target |
— | — | @@ -835,10 +836,8 @@ |
836 | 837 | * Sets up the initial html interface |
837 | 838 | */ |
838 | 839 | initDialog: function() { |
839 | | - mw.log( 'initDialog' ); |
840 | | - var _this = this; |
841 | 840 | mw.log( 'f::initDialog' ); |
842 | | - |
| 841 | + var _this = this; |
843 | 842 | var $mainContainer = $j( this.target_container ); |
844 | 843 | |
845 | 844 | var $controlContainer = this.createControlContainer(); |