Index: branches/js2-work/phase3/js/uploadWizardPage.js |
— | — | @@ -1,47 +0,0 @@ |
2 | | -/* |
3 | | - * This script is run on [[Special:Upload]]. |
4 | | - * Creates an interface for uploading files in multiple steps, hence "wizard" |
5 | | - */ |
6 | | - |
7 | | - |
8 | | -mw.ready( function() { |
9 | | - |
10 | | - // steal the edit token from the existing page |
11 | | - var token = $j( "#wpEditToken" ).val(); |
12 | | - |
13 | | - var licensingDiv = $j('<div id="upload-licensing" class="upload-section">Licensing tutorial</div>').get(0); |
14 | | - var wizardDiv = $j('<div id="upload-wizard" class="upload-section"></div>').get(0); |
15 | | - $j('#bodyContent').empty().append(licensingDiv).append(wizardDiv); |
16 | | - |
17 | | - // change title on page too -- this doesn't have to be internationalized yet since this is just for testing |
18 | | - // when it has its own page it will have a real title |
19 | | - $j('#firstHeading').html("Upload wizard"); |
20 | | - |
21 | | - // configure languages |
22 | | - // mdale does this statically, we'll do this for now since it will have about the same impact as loading another library anyway |
23 | | - |
24 | | - mw.load( 'UploadWizard.UploadWizardTest', function () { |
25 | | - |
26 | | - mw.setConfig('debug', true); |
27 | | - |
28 | | - mw.setDefaultConfig('uploadHandlerClass', null); |
29 | | - mw.setConfig('userName', wgUserName); |
30 | | - mw.setConfig('userLanguage', wgUserLanguage); |
31 | | - mw.setConfig('fileExtensions', wgFileExtensions); |
32 | | - mw.setConfig('token', token); |
33 | | - mw.setConfig('thumbnailWidth', 220); // new standard size |
34 | | - |
35 | | - // not for use with all wikis. |
36 | | - // The ISO 639 code for the language tagalog is "tl". |
37 | | - // Normally we name templates for languages by the ISO 639 code. |
38 | | - // Commons already had a template called 'tl', though. |
39 | | - // so, this workaround will cause tagalog descriptions to be saved with this template instead. |
40 | | - mw.setConfig('languageTemplateFixups', { tl: 'tgl' }); |
41 | | - |
42 | | - var uploadWizard = new mw.UploadWizard(); |
43 | | - uploadWizard.createInterface(wizardDiv); |
44 | | - |
45 | | - }); |
46 | | - |
47 | | - |
48 | | -} ); |
Index: branches/js2-work/phase3/js/specialUploadWizardPage.js |
— | — | @@ -0,0 +1,47 @@ |
| 2 | +/* |
| 3 | + * This script is run on [[Special:Upload]]. |
| 4 | + * Creates an interface for uploading files in multiple steps, hence "wizard" |
| 5 | + */ |
| 6 | + |
| 7 | + |
| 8 | +mw.ready( function() { |
| 9 | + |
| 10 | + // steal the edit token from the existing page |
| 11 | + var token = $j( "#wpEditToken" ).val(); |
| 12 | + |
| 13 | + var licensingDiv = $j('<div id="upload-licensing" class="upload-section">Licensing tutorial</div>').get(0); |
| 14 | + var wizardDiv = $j('<div id="upload-wizard" class="upload-section"></div>').get(0); |
| 15 | + $j('#bodyContent').empty().append(licensingDiv).append(wizardDiv); |
| 16 | + |
| 17 | + // change title on page too -- this doesn't have to be internationalized yet since this is just for testing |
| 18 | + // when it has its own page it will have a real title |
| 19 | + $j('#firstHeading').html("Upload wizard"); |
| 20 | + |
| 21 | + // configure languages |
| 22 | + // mdale does this statically, we'll do this for now since it will have about the same impact as loading another library anyway |
| 23 | + |
| 24 | + mw.load( 'UploadWizard.UploadWizardTest', function () { |
| 25 | + |
| 26 | + mw.setConfig('debug', true); |
| 27 | + |
| 28 | + mw.setDefaultConfig('uploadHandlerClass', null); |
| 29 | + mw.setConfig('userName', wgUserName); |
| 30 | + mw.setConfig('userLanguage', wgUserLanguage); |
| 31 | + mw.setConfig('fileExtensions', wgFileExtensions); |
| 32 | + mw.setConfig('token', token); |
| 33 | + mw.setConfig('thumbnailWidth', 220); // new standard size |
| 34 | + |
| 35 | + // not for use with all wikis. |
| 36 | + // The ISO 639 code for the language tagalog is "tl". |
| 37 | + // Normally we name templates for languages by the ISO 639 code. |
| 38 | + // Commons already had a template called 'tl', though. |
| 39 | + // so, this workaround will cause tagalog descriptions to be saved with this template instead. |
| 40 | + mw.setConfig('languageTemplateFixups', { tl: 'tgl' }); |
| 41 | + |
| 42 | + var uploadWizard = new mw.UploadWizard(); |
| 43 | + uploadWizard.createInterface(wizardDiv); |
| 44 | + |
| 45 | + }); |
| 46 | + |
| 47 | + |
| 48 | +} ); |
Property changes on: branches/js2-work/phase3/js/specialUploadWizardPage.js |
___________________________________________________________________ |
Added: svn:mergeinfo |
1 | 49 | Merged /branches/sqlite/js2/uploadWizardPage.js:r58211-58321 |
2 | 50 | Merged /branches/REL1_15/phase3/js2/uploadWizardPage.js:r51646 |
Added: svn:eol-style |
3 | 51 | + native |