Index: trunk/phase3/js2/mwEmbed/libAddMedia/mvFirefogg.js |
— | — | @@ -25,7 +25,7 @@ |
26 | 26 | |
27 | 27 | var default_firefogg_options = { |
28 | 28 | //what to do when finished uploading |
29 | | - 'upload_done_action':'redirect', |
| 29 | + 'done_upload_cb':false, |
30 | 30 | //if firefoog is enabled |
31 | 31 | 'fogg_enabled':false, |
32 | 32 | //the api url to upload to |
— | — | @@ -476,7 +476,8 @@ |
477 | 477 | get_mw_token( |
478 | 478 | 'File:'+ _this.formData['wpDestFile'], |
479 | 479 | _this.api_url, |
480 | | - function( eToken ){ |
| 480 | + function( eToken ){ |
| 481 | + if(eToken==) |
481 | 482 | _this.etoken = eToken; |
482 | 483 | _this.doChunkWithFormData(); |
483 | 484 | } |
— | — | @@ -631,9 +632,18 @@ |
632 | 633 | buttons[gM('go-to-resource')] = function(){ |
633 | 634 | window.location = _this.fogg.resultUrl; |
634 | 635 | } |
635 | | - var go_to_url_txt = gM('go-to-resource'); |
636 | | - //should have an json result: |
637 | | - _this.updateProgressWin( gM('successfulupload'), gM( 'mv_upload_done', _this.fogg.resultUrl),buttons); |
| 636 | + var go_to_url_txt = gM('go-to-resource'); |
| 637 | + if( typeof _this.done_upload_cb == 'function' ){ |
| 638 | + //if done action return 'true' |
| 639 | + if( _this.done_upload_cb() ){ |
| 640 | + //update status |
| 641 | + _this.updateProgressWin( gM('successfulupload'), gM( 'mv_upload_done', _this.fogg.resultUrl),buttons); |
| 642 | + }else{ |
| 643 | + //if done action returns 'false' //close progress window |
| 644 | + this.action_done = true; |
| 645 | + $j('#upProgressDialog').dialog('close'); |
| 646 | + } |
| 647 | + } |
638 | 648 | }else{ |
639 | 649 | //done state with error? ..not really possible given how firefogg works |
640 | 650 | js_log(" upload done, in chunks mode, but no resultUrl!"); |
— | — | @@ -682,14 +692,14 @@ |
683 | 693 | _this.updateProgressWin( gM('mv_upload_completed'), result_txt ); |
684 | 694 | |
685 | 695 | if( result_page && result_page.toLowerCase().indexOf( sstring.toLowerCase() ) != -1){ |
686 | | - js_log( 'upload done got redirect found: ' + sstring + ' r:' + _this.upload_done_action ); |
687 | | - if( _this.upload_done_action == 'redirect' ){ |
| 696 | + js_log( 'upload done got redirect found: ' + sstring + ' r:' + _this.done_upload_cb ); |
| 697 | + if( _this.done_upload_cb == 'redirect' ){ |
688 | 698 | $j( '#dlbox-centered' ).html( '<h3>Upload Completed:</h3>' + result_txt + '<br>' + form_txt); |
689 | 699 | window.location = wgArticlePath.replace( /\$1/, 'File:' + _this.formData['wpDestFile'] ); |
690 | 700 | }else{ |
691 | 701 | //check if the add_done_action is a callback: |
692 | | - if( typeof _this.upload_done_action == 'function' ) |
693 | | - _this.upload_done_action(); |
| 702 | + if( typeof _this.done_upload_cb == 'function' ) |
| 703 | + _this.done_upload_cb(); |
694 | 704 | } |
695 | 705 | }else{ |
696 | 706 | //js_log( 'upload page error: did not find: ' +sstring + ' in ' + "\n" + result_page ); |
Index: trunk/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js |
— | — | @@ -577,18 +577,25 @@ |
578 | 578 | $j('#tab-upload').html( gM('rsd_config_error', 'bad_api_url') ); |
579 | 579 | return false; |
580 | 580 | } |
581 | | - //output the form |
582 | | - mvJsLoader.doLoad(['$j.fn.simpleUploadForm'],function(){ |
583 | | - //set the form action based on domain: |
584 | | - if( parseUri( document.URL ).host == parseUri( _this.upload_api_target ).host ){ |
| 581 | + //output the form |
| 582 | + //set the form action based on domain: |
| 583 | + if( parseUri( document.URL ).host == parseUri( _this.upload_api_target ).host ){ |
| 584 | + mvJsLoader.doLoad(['$j.fn.simpleUploadForm'],function(){ |
585 | 585 | //deal with the api form upload form directly: |
586 | 586 | $j('#tab-upload').simpleUploadForm({ |
587 | | - "api_target" : _this.upload_api_target |
| 587 | + "api_target" : _this.upload_api_target , |
| 588 | + "ondone_cb" : function( resultData ){ |
| 589 | + var cat = resultData; |
| 590 | + debugger; |
| 591 | + return false; |
| 592 | + } |
588 | 593 | }) |
589 | | - }else{ |
590 | | - //setup the proxy |
591 | | - } |
592 | | - }); |
| 594 | + }); |
| 595 | + }else{ |
| 596 | + //setup the proxy |
| 597 | + js_log('do proxy:: ' + parseUri( _this.upload_api_target ).host); |
| 598 | + $j('#tab-upload').html('proxy upload not yet ready'); |
| 599 | + } |
593 | 600 | }, |
594 | 601 | runSearch: function(){ |
595 | 602 | js_log("f:runSearch::" + this.disp_item); |
— | — | @@ -1352,8 +1359,7 @@ |
1353 | 1360 | mvJsLoader.doLoad([ |
1354 | 1361 | 'mvBaseUploadInterface', |
1355 | 1362 | '$j.ui.progressbar' |
1356 | | - ],function(){ |
1357 | | - |
| 1363 | + ],function(){ |
1358 | 1364 | //initicate a download similar to url copy: |
1359 | 1365 | myUp = new mvBaseUploadInterface({ |
1360 | 1366 | 'api_url' : _this.local_wiki_api_url, |
— | — | @@ -1363,7 +1369,9 @@ |
1364 | 1370 | //close up the rsd_resource_import |
1365 | 1371 | $j('#rsd_resource_import').remove(); |
1366 | 1372 | //run the parent callback: |
1367 | | - cir_callback(); |
| 1373 | + cir_callback(); |
| 1374 | + //return false to avoid BaseUploadInterface done actions |
| 1375 | + return false; |
1368 | 1376 | } |
1369 | 1377 | }); |
1370 | 1378 | //set the edit token if we have it handy |
Index: trunk/phase3/js2/mwEmbed/libAddMedia/simpleUploadForm.js |
— | — | @@ -11,13 +11,15 @@ |
12 | 12 | "licence_cc-by-sa" : "Creative Commons Share Alike (3.0)", |
13 | 13 | "upload" : "Upload File", |
14 | 14 | "destfilename" : "Destination filename:", |
15 | | - "summary" : "Summary" |
| 15 | + "summary" : "Summary", |
| 16 | + "error_not_loggedin" : "You don't appear to be logged in or don't have upload privlages." |
16 | 17 | }); |
17 | 18 | |
18 | 19 | var default_form_options = { |
19 | 20 | 'enable_fogg' : true, |
20 | 21 | 'licence_options':['cc-by-sa'], |
21 | | - 'api_target' : false |
| 22 | + 'api_target' : false, |
| 23 | + 'ondone_cb' : null |
22 | 24 | }; |
23 | 25 | |
24 | 26 | (function($) { |
— | — | @@ -32,55 +34,66 @@ |
33 | 35 | if(!opt.api_target){ |
34 | 36 | $(this.selector).html('Error: Missing api target'); |
35 | 37 | return false; |
36 | | - } |
37 | | - |
| 38 | + } |
38 | 39 | |
39 | 40 | //@@todo this is just a proof of concept |
40 | 41 | //much todo to improved this web form |
41 | | - var o = '<div style="margin: 0 auto;">'+ |
42 | | - '<form id="suf-upload" enctype="multipart/form-data" action="" method="post">' + |
43 | | - '<label for="wpUploadFile">' + gM('select_file') + '</label><br>'+ |
44 | | - '<input type="file" style="display: inline;" name="wpUploadFile" id="wpUploadFile" size="10"/><br>' + |
45 | | - '<label for="wpDestFile">' +gM('destfilename') + '</label><br>'+ |
46 | | - '<input type="text" id="wpDestFile" name="wpDestFile" size="30" /><br>'+ |
47 | | - '<label for="wpUploadDescription">' + gM('summary') + ':</label><br>' + |
48 | | - '<textarea cols="30" rows="3" id="wpUploadDescription" name="wpUploadDescription" tabindex="3"/><br>'+ |
49 | | - gM('select_ownwork') + '<br>' + |
50 | | - '<input type="checkbox" id="wpLicence" name="wpLicence" value="cc-by-sa">' + gM('licence_cc-by-sa') + '<br>' + |
51 | | - |
52 | | - '<input type="submit" accesskey="s" value="' + gM('upload') + '" name="wpUploadBtn" id="wpUploadBtn" tabindex="9"/>' + |
53 | | - //close the form and div |
54 | | - '</form></div>'; |
| 42 | + get_mw_token('File:MyRandomFileTokenCheck', opt.api_target, function(eToken){ |
| 43 | + debugger; |
| 44 | + if( !eToken || eToken == '+\\' ){ |
| 45 | + $(this.selector).html( gM('error_not_loggedin') ); |
| 46 | + return false; |
| 47 | + } |
55 | 48 | |
56 | | - //set the target with the form output: |
57 | | - $(this.selector).html( o ); |
58 | | - //by default dissable: |
59 | | - $j('#wpUploadBtn').attr('disabled', 'disabled'); |
60 | | - |
61 | | - //set up basic binding: |
62 | | - $j('#wpLicence').click(function(){ |
63 | | - if( $j(this).is(':checked') ){ |
64 | | - $j('#wpUploadBtn').removeAttr('disabled'); |
65 | | - }else{ |
66 | | - $j('#wpUploadBtn').attr('disabled', 'disabled'); |
67 | | - } |
68 | | - }); |
| 49 | + var o = '<div style="margin: 0 auto;width:450px;">'+ |
| 50 | + '<form id="suf-upload" enctype="multipart/form-data" action="" method="post">' + |
| 51 | + '<label for="wpUploadFile">' + gM('select_file') + '</label><br>'+ |
| 52 | + '<input type="file" style="display: inline;" name="wpUploadFile" id="wpUploadFile" size="10"/><br>' + |
| 53 | + '<label for="wpDestFile">' +gM('destfilename') + '</label><br>'+ |
| 54 | + '<input type="text" id="wpDestFile" name="wpDestFile" size="30" /><br>'+ |
| 55 | + '<label for="wpUploadDescription">' + gM('summary') + ':</label><br>' + |
| 56 | + '<textarea cols="30" rows="3" id="wpUploadDescription" name="wpUploadDescription" tabindex="3"/><br>'+ |
| 57 | + gM('select_ownwork') + '<br>' + |
| 58 | + '<input type="checkbox" id="wpLicence" name="wpLicence" value="cc-by-sa">' + gM('licence_cc-by-sa') + '<br>' + |
| 59 | + |
| 60 | + '<input type="submit" accesskey="s" value="' + gM('upload') + '" name="wpUploadBtn" id="wpUploadBtn" tabindex="9"/>' + |
| 61 | + //close the form and div |
| 62 | + '</form></div>'; |
| 63 | + |
| 64 | + //set the target with the form output: |
| 65 | + $( this.selector ).html( o ); |
| 66 | + //by default dissable: |
| 67 | + $j('#wpUploadBtn').attr('disabled', 'disabled'); |
69 | 68 | |
70 | | - //set up the binding per the config |
71 | | - if( opt.enable_fogg ){ |
72 | | - $j('#wpUploadFile').firefogg({ |
73 | | - //an api url (we won't submit directly to action of the form) |
74 | | - 'api_url' : opt.api_target, |
75 | | - 'form_rewrite': true, |
76 | | - 'target_edit_from' : '#suf-upload', |
77 | | - 'new_source_cb' : function( orgFilename, oggName ){ |
78 | | - $j('#wpDestFile').val( oggName ); |
79 | | - //@@TODO: |
80 | | - //mwUploadHelper.doDestCheck(); |
81 | | - } |
82 | | - }); |
83 | | - }else{ |
84 | | - //simple web form rewrite |
85 | | - } |
| 69 | + //set up basic binding: |
| 70 | + $j('#wpLicence').click(function(){ |
| 71 | + if( $j(this).is(':checked') ){ |
| 72 | + $j('#wpUploadBtn').removeAttr('disabled'); |
| 73 | + }else{ |
| 74 | + $j('#wpUploadBtn').attr('disabled', 'disabled'); |
| 75 | + } |
| 76 | + }); |
| 77 | + |
| 78 | + if(typeof opt.ondone_cb == 'undefined') |
| 79 | + opt.ondone_cb = false; |
| 80 | + |
| 81 | + //set up the binding per the config |
| 82 | + if( opt.enable_fogg ){ |
| 83 | + $j('#wpUploadFile').firefogg({ |
| 84 | + //an api url (we won't submit directly to action of the form) |
| 85 | + 'api_url' : opt.api_target, |
| 86 | + 'form_rewrite': true, |
| 87 | + 'target_edit_from' : '#suf-upload', |
| 88 | + 'new_source_cb' : function( orgFilename, oggName ){ |
| 89 | + $j('#wpDestFile').val( oggName ); |
| 90 | + //@@TODO: |
| 91 | + //mwUploadHelper.doDestCheck(); |
| 92 | + }, |
| 93 | + 'done_upload_cb' : opt.ondone_cb |
| 94 | + }); |
| 95 | + }else{ |
| 96 | + //simple web form rewrite |
| 97 | + } |
| 98 | + }); |
86 | 99 | } |
87 | 100 | })(jQuery); |
\ No newline at end of file |
Index: trunk/phase3/js2/mwEmbed/libAddMedia/mvBaseUploadInterface.js |
— | — | @@ -31,6 +31,7 @@ |
32 | 32 | "ignorewarning" : "Ignore warning and save file anyway", |
33 | 33 | "file-thumbnail-no" : "The filename begins with <b><tt>$1</tt></b>", |
34 | 34 | "go-to-resource" : "Go to Resource Page", |
| 35 | + "upload-misc-error" : "Unknown upload error", |
35 | 36 | |
36 | 37 | "wgfogg_waring_bad_extension" : "You have selected a file with an unsuported extension (<a href=\"http://commons.wikimedia.org/wiki/Commons:Firefogg#Supported_File_Types\">more information</a>).", |
37 | 38 | |
— | — | @@ -696,7 +697,7 @@ |
697 | 698 | }; |
698 | 699 | return cancelBtn; |
699 | 700 | }, |
700 | | - cancel_action:function(dlElm){ |
| 701 | + cancel_action : function( dlElm ){ |
701 | 702 | //confirm: |
702 | 703 | if( confirm( gM('mv-cancel-confim') )){ |
703 | 704 | //@@todo (cancel the encode / upload) |
Index: trunk/phase3/js2/mwEmbed/libSequencer/mvPlayList.js |
— | — | @@ -2,10 +2,13 @@ |
3 | 3 | * the mvPlayList object code |
4 | 4 | * only included if playlist object found |
5 | 5 | * |
6 | | - * part of mv_embed: |
7 | | - * http://metavid.org/wiki/index.php/Mv_embed |
| 6 | + * part of mwEmbed media projects see: |
| 7 | + * http://www.mediawiki.org/wiki/Media_Projects_Overview |
| 8 | + * |
| 9 | + * @author: Michael Dale mdale@wikimedia.org |
| 10 | + * @license GPL2 |
8 | 11 | */ |
9 | | -var mv_default_playlist_attributes = { |
| 12 | +var mv_default_playlist_attributes = { |
10 | 13 | //playlist attributes : |
11 | 14 | "id":null, |
12 | 15 | "title":null, |
— | — | @@ -27,6 +30,7 @@ |
28 | 31 | //globals: |
29 | 32 | //10 possible colors for clips: (can be in hexadecimal) |
30 | 33 | var mv_clip_colors = new Array('aqua', 'blue', 'fuchsia', 'green', 'lime', 'maroon', 'navy', 'olive', 'purple', 'red'); |
| 34 | + |
31 | 35 | //the base url for requesting stream metadata |
32 | 36 | if(typeof wgServer=='undefined'){ |
33 | 37 | var defaultMetaDataProvider = 'http://metavid.org/overlay/archive_browser/export_cmml?stream_name='; |
— | — | @@ -1980,8 +1984,9 @@ |
1981 | 1985 | 'fill', |
1982 | 1986 | 'dur', |
1983 | 1987 | 'title', |
1984 | | - |
| 1988 | + //some custom attributes: |
1985 | 1989 | 'uri', |
| 1990 | + 'durationHint', |
1986 | 1991 | 'poster' |
1987 | 1992 | ); |
1988 | 1993 | /* extension to mvClip to support smil properties */ |
— | — | @@ -2039,7 +2044,10 @@ |
2040 | 2045 | } |
2041 | 2046 | //parse duration / begin times: |
2042 | 2047 | if( this.dur ) |
2043 | | - this.dur = smilParseTime( this.dur ); |
| 2048 | + this.dur = smilParseTime( this.dur ); |
| 2049 | + //parse the media duration hint ( the source media length) |
| 2050 | + if( this.durationHint ) |
| 2051 | + this.durationHint = smilParseTime( this.durationHint ); |
2044 | 2052 | |
2045 | 2053 | //conform type to vido/ogg: |
2046 | 2054 | if( this.type == 'application/ogg' ) |
— | — | @@ -2077,7 +2085,7 @@ |
2078 | 2086 | if( this.dur ) |
2079 | 2087 | return this.dur; |
2080 | 2088 | return this.embed.getDuration(); |
2081 | | - }, |
| 2089 | + }, |
2082 | 2090 | //gets the duration of the clip subracting transitions |
2083 | 2091 | getSoloDuration:function(){ |
2084 | 2092 | var fulldur = this.getDuration(); |
— | — | @@ -2087,6 +2095,13 @@ |
2088 | 2096 | |
2089 | 2097 | //js_log("getSoloDuration:: td: " + this.getDuration() + ' sd:' + fulldur); |
2090 | 2098 | return fulldur; |
| 2099 | + }, |
| 2100 | + //gets the duration of the original media asset (usefull for bounding setting of in-out-points) |
| 2101 | + getSourceDuration:function(){ |
| 2102 | + if( this.durationHint ) |
| 2103 | + return this.durationHint; |
| 2104 | + //if we have no source duration just return the media dur: |
| 2105 | + return this.getDuration(); |
2091 | 2106 | } |
2092 | 2107 | } |
2093 | 2108 | /* |
Index: trunk/phase3/js2/mwEmbed/libClipEdit/colorpicker/js/colorpicker.js |
— | — | @@ -6,7 +6,6 @@ |
7 | 7 | * Dual licensed under the MIT and GPL licenses |
8 | 8 | * |
9 | 9 | */ |
10 | | - |
11 | 10 | (function ($) { |
12 | 11 | var ColorPicker = function () { |
13 | 12 | var |
Index: trunk/phase3/js2/mwEmbed/mwHostProxy.html |
— | — | @@ -0,0 +1,43 @@ |
| 2 | +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
| 3 | +"http://www.w3.org/TR/html4/loose.dtd"> |
| 4 | +<html> |
| 5 | +<head> |
| 6 | + <title></title> |
| 7 | + <script type="text/javascript"> |
| 8 | + /* |
| 9 | + XDCommsChild - Cross Domain Communication, Child Object. |
| 10 | + |
| 11 | + Create this in the child window with the address of the xdomaincomms.html file on the same domain as the parent window |
| 12 | + */ |
| 13 | + var XDCommsChild = function(xdomaincommsAddress) { |
| 14 | + this.xdomaincommsAddress = xdomaincommsAddress; |
| 15 | + |
| 16 | + this.isIe = isInternetExplorer(); |
| 17 | + |
| 18 | + if (isIe) { |
| 19 | + // need hidden frame for communication. IE8 is supposed to support postMessage, but I can't get it to work properly |
| 20 | + document.writeln("") |
| 21 | + } |
| 22 | + |
| 23 | + this.postBack = function(data) { |
| 24 | + if (isIe) { |
| 25 | + // this method tested against IE6,7 & 8 |
| 26 | + window.open(this.xdomaincommsAddress + '#data=' + data, 'xdcomms'); // MUST use window.open. frame.src or frame.location both fail |
| 27 | + } else { |
| 28 | + // for everything else - tested against Firefox 3, Chrome, Safari |
| 29 | + window.opener.postMessage(data, '*'); // should really restrict the domain data can come from here |
| 30 | + } |
| 31 | + } |
| 32 | + |
| 33 | + this.postBackAndCloseWindow = function(data){ |
| 34 | + this.postBack(data); |
| 35 | + setTimeout("window.close()", 200); // need to use a timeout to make sure the javascript in the frame has executed if we are using that communication model |
| 36 | + } |
| 37 | + } |
| 38 | + </script> |
| 39 | +</head> |
| 40 | +<body> |
| 41 | +<h3> This file should be inclued by external sites that want to be proxied: </h3> |
| 42 | +</body> |
| 43 | +</html> |
| 44 | + |
Index: trunk/phase3/js2/mwEmbed/php/languages/mwEmbed.i18n.php |
— | — | @@ -41,6 +41,7 @@ |
42 | 42 | 'ignorewarning' => 'Ignore warning and save file anyway', |
43 | 43 | 'file-thumbnail-no' => 'The filename begins with <b><tt>$1</tt></b>', |
44 | 44 | 'go-to-resource' => 'Go to Resource Page', |
| 45 | + 'upload-misc-error' => 'Unknown upload error', |
45 | 46 | 'wgfogg_waring_bad_extension' => 'You have selected a file with an unsuported extension (<a href="http://commons.wikimedia.org/wiki/Commons:Firefogg#Supported_File_Types">more information</a>).', |
46 | 47 | 'cancel-button' => 'Cancel', |
47 | 48 | 'ok-button' => 'OK', |
Index: trunk/phase3/js2/mwEmbed/mv_embed.js |
— | — | @@ -232,8 +232,9 @@ |
233 | 233 | |
234 | 234 | //depencency mapping for css files for self contained included plugins: |
235 | 235 | lcCssPath({ |
236 | | - '$j.Jcrop' : 'libClipEdit/Jcrop/css/jquery.Jcrop.css', |
237 | | - '$j.fn.ColorPicker': 'libClipEdit/colorpicker/css/colorpicker.css' |
| 236 | + '$j.ui' : 'jquery/' + jQueryUiVN + '.custom.css', |
| 237 | + '$j.Jcrop' : 'libClipEdit/Jcrop/css/jquery.Jcrop.css', |
| 238 | + '$j.fn.ColorPicker' : 'libClipEdit/colorpicker/css/colorpicker.css' |
238 | 239 | }) |
239 | 240 | |
240 | 241 | /** |
— | — | @@ -1191,7 +1192,7 @@ |
1192 | 1193 | //prepend json_ to feed_format if not already requesting json format |
1193 | 1194 | if( req_url.indexOf("feed_format=")!=-1 && req_url.indexOf("feed_format=json")==-1) |
1194 | 1195 | req_url = req_url.replace(/feed_format=/, 'feed_format=json_'); |
1195 | | - loadExternalJs(req_url+'&cb=mv_jsdata_cb&cb_inx='+(global_req_cb.length-1)); |
| 1196 | + loadExternalJs( req_url + '&cb=mv_jsdata_cb&cb_inx=' + (global_req_cb.length-1)); |
1196 | 1197 | } |
1197 | 1198 | } |
1198 | 1199 | |
— | — | @@ -1238,7 +1239,7 @@ |
1239 | 1240 | global_req_cb[response['cb_inx']]( response['pay_load'] ); |
1240 | 1241 | } |
1241 | 1242 | //load external js via dom injection |
1242 | | -function loadExternalJs( url ){ |
| 1243 | +function loadExternalJs( url, callback ){ |
1243 | 1244 | js_log('load js: '+ url); |
1244 | 1245 | //if(window['$j']) //use jquery call: |
1245 | 1246 | /*$j.ajax({ |
— | — | @@ -1251,11 +1252,13 @@ |
1252 | 1253 | var e = document.createElement("script"); |
1253 | 1254 | e.setAttribute('src', url); |
1254 | 1255 | e.setAttribute('type',"text/javascript"); |
| 1256 | + /*if(callback) |
| 1257 | + e.onload = callback; |
| 1258 | + */ |
1255 | 1259 | //e.setAttribute('defer', true); |
1256 | | - document.getElementsByTagName("head")[0].appendChild(e); |
| 1260 | + document.getElementsByTagName("head")[0].appendChild(e); |
1257 | 1261 | // } |
1258 | 1262 | } |
1259 | | - |
1260 | 1263 | function styleSheetPresent(url){ |
1261 | 1264 | style_elements = document.getElementsByTagName('link'); |
1262 | 1265 | if( style_elements.length > 0) { |
Index: trunk/phase3/js2/mwApiProxy.html |
— | — | @@ -0,0 +1,31 @@ |
| 2 | +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
| 3 | +"http://www.w3.org/TR/html4/loose.dtd"> |
| 4 | +<html> |
| 5 | +<head> |
| 6 | + <title>Javascript Api Proxy</title> |
| 7 | + <style type="text/css"> |
| 8 | + body{ |
| 9 | + font-size:80%; |
| 10 | + } |
| 11 | + img { |
| 12 | + border:medium none; |
| 13 | + } |
| 14 | + </style> |
| 15 | + <script type="text/javascript"> |
| 16 | + var domainList = [ |
| 17 | + '127.0.0.1' |
| 18 | + ]; |
| 19 | + </script> |
| 20 | +</head> |
| 21 | +<body> |
| 22 | +<h3> This file proxies api and html output for source domains: </h3> |
| 23 | +<div id="domainList"></div> |
| 24 | + <script type="text/javascript"> |
| 25 | + var o=''; |
| 26 | + for( var i in domainList){ |
| 27 | + o+='<br><i>'+ domainList[i] + '</i>'; |
| 28 | + } |
| 29 | + </script> |
| 30 | +</body> |
| 31 | +</html> |
| 32 | + |
Index: trunk/phase3/js2/editPage.js |
— | — | @@ -32,8 +32,8 @@ |
33 | 33 | ); |
34 | 34 | |
35 | 35 | //add to new toolbar (need to use api) |
36 | | - //$j('[rel=insert] .tool-file').addMediaWiz( |
37 | | - // mwAddMediaConfig |
38 | | - //); |
| 36 | + /*$j('[rel=insert] tool-file').addMediaWiz( |
| 37 | + mwAddMediaConfig |
| 38 | + );*/ |
39 | 39 | } |
40 | 40 | } |