Index: trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php |
— | — | @@ -319,7 +319,7 @@ |
320 | 320 | ); |
321 | 321 | } |
322 | 322 | # Define a setup function |
323 | | -# Add a hook to initialise the magic word |
| 323 | +# Add a hook to initialize the magic word |
324 | 324 | $wgHooks['LanguageGetMagic'][] = 'mvMagicParserFunction_Magic'; |
325 | 325 | |
326 | 326 | function mvMagicParserFunction_Magic( &$magicWords, $langCode ) { |
Index: trunk/extensions/MetavidWiki/languages/MV_Messages.php |
— | — | @@ -71,7 +71,7 @@ |
72 | 72 | |
73 | 73 | # remoteSearchDriver.js |
74 | 74 | #set to ignored for now. Messages does not appear to be final |
75 | | - 'mv_media_search' => 'Media search why test test', # do not translate or duplicate this message to other languages |
| 75 | + 'mv_media_search' => 'Media search', # do not translate or duplicate this message to other languages |
76 | 76 | 'rsd_box_layout' => 'Box layout', |
77 | 77 | 'rsd_list_layout' => 'List layout', |
78 | 78 | #set to ignored for now. Messages does not appear to be final |
— | — | @@ -81,6 +81,15 @@ |
82 | 82 | 'upload' => 'Upload', |
83 | 83 | 'rsd_layout' => 'Layout:', |
84 | 84 | 'rsd_resource_edit' => 'Edit resource:', |
| 85 | + 'resource_description_page'=> "Resource Description Page", |
| 86 | + |
| 87 | + 'cc_title' => 'Creative Commons', |
| 88 | + 'cc_by_title' => 'Attribution', |
| 89 | + 'cc_nc_title' => 'Noncommercial', |
| 90 | + 'cc_nd_title' => 'No Derivative Works', |
| 91 | + 'cc_sa_title' => 'Share Alike', |
| 92 | + 'cc_pd_title' => 'Public Domain', |
| 93 | + |
85 | 94 | |
86 | 95 | # mvClipEdit.js |
87 | 96 | 'mv_crop' => 'Crop image', |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/styles.css |
— | — | @@ -559,6 +559,15 @@ |
560 | 560 | #rsd_resource_edit{ |
561 | 561 | z-index:2; |
562 | 562 | } |
| 563 | +.rsd_license{ |
| 564 | + position:absolute; |
| 565 | + bottom:0px; |
| 566 | + left:0px; |
| 567 | + width:100%; |
| 568 | +} |
| 569 | +.rsd_license img{ |
| 570 | + float:left; |
| 571 | +} |
563 | 572 | .mv_clip_box_result{ |
564 | 573 | padding:10px; |
565 | 574 | float:left; |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js |
— | — | @@ -643,13 +643,26 @@ |
644 | 644 | // quicktime |
645 | 645 | if ( this.testActiveX( 'QuickTimeCheckObject.QuickTimeCheck.1' ) ) |
646 | 646 | this.players.addPlayer(quicktimeActiveXPlayer); |
647 | | - } |
| 647 | + } |
| 648 | + // <video> element |
| 649 | + if ( typeof HTMLVideoElement == 'object' // Firefox, Safari |
| 650 | + || typeof HTMLVideoElement == 'function' ) // Opera |
| 651 | + { |
| 652 | + //do another test for safari: |
| 653 | + if( this.safari ){ |
| 654 | + var dummyvid = document.createElement("video"); |
| 655 | + if (dummyvid.canPlayType("video/ogg;codecs=\"theora,vorbis\"") == "probably") |
| 656 | + { |
| 657 | + this.players.addPlayer( videoElementPlayer ); |
| 658 | + } else { |
| 659 | + /* could add some user nagging to install the xiph qt */ |
| 660 | + } |
| 661 | + }else{ |
| 662 | + this.players.addPlayer( videoElementPlayer ); |
| 663 | + } |
| 664 | + } |
| 665 | + |
648 | 666 | |
649 | | - // <video> element (should not need to be attached to the dom to test)( |
650 | | - var v = document.createElement("video"); |
651 | | - if( v.play ) |
652 | | - this.players.addPlayer( videoElementPlayer ); |
653 | | - |
654 | 667 | // Mozilla plugins |
655 | 668 | if( navigator.mimeTypes && navigator.mimeTypes.length > 0) { |
656 | 669 | for ( var i = 0; i < navigator.mimeTypes.length; i++ ) { |
— | — | @@ -1011,19 +1024,22 @@ |
1012 | 1025 | */ |
1013 | 1026 | //simple url re-writer for standard temporal and size request urls: |
1014 | 1027 | function getURLParamReplace( url, opt ){ |
1015 | | - var pSrc = parseUri(url); |
| 1028 | + var pSrc = parseUri( url ); |
1016 | 1029 | if(pSrc.protocol != '' ){ |
1017 | 1030 | var new_url = pSrc.protocol +'://'+ pSrc.authority + pSrc.path +'?'; |
1018 | 1031 | }else{ |
1019 | 1032 | var new_url = pSrc.path +'?'; |
1020 | 1033 | } |
1021 | 1034 | var amp = ''; |
1022 | | - for(var i in pSrc.queryKey, function(key, val){ |
| 1035 | + for(var key in pSrc.queryKey){ |
| 1036 | + var val = pSrc.queryKey[ key ]; |
| 1037 | + //do override if requested |
1023 | 1038 | if( opt[ key ] ) |
1024 | 1039 | val = opt[ key ]; |
1025 | 1040 | new_url+= amp + key + '=' + val; |
1026 | 1041 | amp = '&'; |
1027 | | - }); |
| 1042 | + }; |
| 1043 | + |
1028 | 1044 | return new_url; |
1029 | 1045 | } |
1030 | 1046 | |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/i18n/README |
— | — | @@ -1,51 +1,5 @@ |
2 | 2 | This _short_ document outlines the plan for internationalization support for stand alone |
3 | 3 | javascript libraries being integrated into mediaWiki. |
4 | 4 | |
5 | | -A key piece is of this system is the script_loader. |
6 | | - |
7 | | -For static usage every script file should have an associative text js language file: |
8 | | -mv_embed.en.js |
9 | | -mv_embed.es.js |
10 | | -mv_embed.fn.js |
11 | | - |
12 | | -libSequencer_mv_sequencer.en.js |
13 | | -libSequencer_mv_sequencer.es.js |
14 | | - |
15 | | -These static files will be updated via mediaWikis translation system. |
16 | | - |
17 | | - |
18 | | -These static files will be combined with the server side load script so that the language segment |
19 | | -is requested at the same time the script is included. It won't result in a separate request because |
20 | | -script_loader.php will combine the files. |
21 | | - |
22 | | -script_loader.php arguments: |
23 | | -@uid _string the unique id to ensure fresh copy of the scripts |
24 | | -@sl _string the list of scripts with relative paths |
25 | | -@debug _boolean if debug is "ON" don't send out minimised code |
26 | | -the javascript should read this param on Document.URL and not group requests for ease of debuging. |
27 | | - |
28 | | - |
29 | | -script_loader.php will take a set of scripts as arguments ie: |
30 | | -http://server.com/script_loader.php?uid=SVN_Version_Number&sl=/mv_embed/mv_embed.js,mv_embed.en.js,/jQuery/jquery.js |
31 | | - |
32 | | -It will minimise the scripts (strip comments and a custom stip of debug statements ie js_log('msg') |
33 | | -can use: http://code.google.com/p/jsmin-php/ for minimisation. |
34 | | - |
35 | | -Features: |
36 | | -script_loader will concatenate all the minimised code from the requested set of scripts. |
37 | | - |
38 | | -script_loader will send appropriate http cache headers. |
39 | | - Can expire _never_ since we send unique SVN version id to force updates. |
40 | | - This will integrate with the squid proxy setup so the minimisation just |
41 | | - happens on fresh requests |
42 | | - |
43 | | -script_loader will read the client accept header and send out gziped or not. |
44 | | - |
45 | | -MediaWiki specific Features: |
46 | | - |
47 | | -We will want pass the il8n off to mediaWikis existing internationalization infastructure. |
48 | | -MediaWiki should parse the il8n js file and check mediaWikis message space for any language variables. |
49 | | -Yes this does result in all js_variables being stored twice. |
50 | | - |
51 | | -But will have the advantage of being a stand alone solution for media remixing and should enable |
52 | | -wider participation in development. |
| 5 | +A key piece is of this system is the script_loader. mvwScriptLoader.php |
| 6 | +for more info see: http://www.mediawiki.org/wiki/Extension:ScriptLoader |
\ No newline at end of file |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/remoteSearchDriver.js |
— | — | @@ -7,7 +7,7 @@ |
8 | 8 | metavid |
9 | 9 | and archive.org |
10 | 10 | */ |
11 | | -loadGM( { "mv_media_search" : "Media Search why test test", |
| 11 | +loadGM( { "mv_media_search" : "Media Search", |
12 | 12 | "rsd_box_layout" : "Box layout", |
13 | 13 | "rsd_list_layout" : "List Layout", |
14 | 14 | "rsd_results_desc" : "Results ", |
— | — | @@ -15,7 +15,15 @@ |
16 | 16 | "rsd_results_prev" : "previous ", |
17 | 17 | "upload" : "Upload", |
18 | 18 | "rsd_layout" : "Layout:", |
19 | | - "rsd_resource_edit" : "Edit Resource:" |
| 19 | + "rsd_resource_edit" : "Edit Resource:", |
| 20 | + "resource_description_page": "Resource Description Page", |
| 21 | + |
| 22 | + "cc_title": "Creative Commons", |
| 23 | + "cc_by_title": "Attribution", |
| 24 | + "cc_nc_title": "Noncommercial", |
| 25 | + "cc_nd_title": "No Derivative Works", |
| 26 | + "cc_sa_title": "Share Alike", |
| 27 | + "cc_pd_title": "Public Domain" |
20 | 28 | }); |
21 | 29 | |
22 | 30 | var default_remote_search_options = { |
— | — | @@ -65,7 +73,7 @@ |
66 | 74 | 'advanced_search':{ |
67 | 75 | 'title': 'Advanced Options' |
68 | 76 | } |
69 | | - }, |
| 77 | + }, |
70 | 78 | content_providers:{ |
71 | 79 | /*content_providers documentation: |
72 | 80 | @enabled: whether the search provider can be selected |
— | — | @@ -157,6 +165,71 @@ |
158 | 166 | 'tab_img':true |
159 | 167 | } |
160 | 168 | }, |
| 169 | + //define the licenses |
| 170 | + // ... this will get complicated quick... |
| 171 | + // (just look at complexity for creative commons without exessive "duplicate data") |
| 172 | + // ie cc_by could be "by/3.0/us/" or "by/2.1/jp/" to infinitum... |
| 173 | + // some complexity should be negated by license equivalances. |
| 174 | + |
| 175 | + // but we will have to abstract into another class let content providers provide license urls |
| 176 | + // and we have to clone the license object and allow local overrides |
| 177 | + |
| 178 | + licenses:{ |
| 179 | + //for now only support creative commons type licenses |
| 180 | + //used page: http://creativecommons.org/licenses/ |
| 181 | + 'cc':{ |
| 182 | + 'base_img_url':'http://upload.wikimedia.org/wikipedia/commons/thumb/', |
| 183 | + 'base_license_url': 'http://creativecommons.org/licenses/', |
| 184 | + 'licenses':{ |
| 185 | + 'by':'by/3.0/', |
| 186 | + 'by-sa':'by-sa/3.0/', |
| 187 | + 'by-nc-nd':'by-nc-nd/3.0/', |
| 188 | + 'by-nc':'by-nc/3.0/', |
| 189 | + 'by-nc-sa':'by-nc-sa/3.0/', |
| 190 | + 'by-sa':'by-nc/3.0', |
| 191 | + 'pd':'publicdomain/' |
| 192 | + }, |
| 193 | + 'license_img':{ |
| 194 | + 'by':{ |
| 195 | + 'im':'1/11/Cc-by_new_white.svg/20px-Cc-by_new_white.svg.png', |
| 196 | + }, |
| 197 | + 'nc':{ |
| 198 | + 'im':'2/2f/Cc-nc_white.svg/20px-Cc-nc_white.svg.png', |
| 199 | + }, |
| 200 | + 'nd':{ |
| 201 | + 'im':'b/b3/Cc-nd_white.svg/20px-Cc-nd_white.svg.png', |
| 202 | + }, |
| 203 | + 'sa':{ |
| 204 | + 'im':'d/df/Cc-sa_white.svg/20px-Cc-sa_white.svg.png', |
| 205 | + }, |
| 206 | + 'pd':{ |
| 207 | + 'im':'5/51/Cc-pd-new_white.svg/20px-Cc-pd-new_white.svg.png', |
| 208 | + } |
| 209 | + } |
| 210 | + } |
| 211 | + }, |
| 212 | + getlicenseImgSet:function( license_key ){ |
| 213 | + if( typeof( this.licenses.cc.licenses[ license_key ]) == 'undefined') |
| 214 | + return js_error('only cc licencs presently supported, could not find:' + license_key); |
| 215 | + //set the current license pointer: |
| 216 | + var cl = this.licenses.cc; |
| 217 | + var title = gM('cc_title'); |
| 218 | + var imgs = ''; |
| 219 | + var license_set = license_key.split('-'); |
| 220 | + for(var i=0;i < license_set.length; i++){ |
| 221 | + lkey = license_set[i]; |
| 222 | + title += gM( lkey + '_desc'); |
| 223 | + imgs +='<img width="20" src="' + cl.base_img_url + |
| 224 | + cl.license_img[ lkey ].im + '">'; |
| 225 | + } |
| 226 | + js_log('output images: '+ imgs); |
| 227 | + return '<div class="rsd_license" title="'+ title + '" >' + |
| 228 | + '<a target="_new" href="'+ cl.base_license_url + cl.licenses[ lkey ] + |
| 229 | + '" title="' + title + '">'+ |
| 230 | + imgs + |
| 231 | + '</a>'+ |
| 232 | + '</div>'; |
| 233 | + }, |
161 | 234 | //some default layout values: |
162 | 235 | thumb_width : 80, |
163 | 236 | image_edit_width : 600, |
— | — | @@ -469,14 +542,21 @@ |
470 | 543 | rItem.poster = mv_embed_path + 'skins/' + mv_skin_name + |
471 | 544 | '/images/sound_music_icon-80.png'; |
472 | 545 | } |
| 546 | + //get a thumb with proper resolution transform if possible: |
473 | 547 | o+='<img title="'+rItem.title+'" class="rsd_res_item" id="res_' + rInx + |
474 | | - '" style="width:' + _this.thumb_width + 'px;" src="' + rItem.poster + '">'; |
| 548 | + '" style="width:' + _this.thumb_width + 'px;" src="' + |
| 549 | + cp.sObj.getImageTransform( rItem, {'width':_this.thumb_width } ) |
| 550 | + + '">'; |
475 | 551 | //add a linkback to resource page in upper right: |
476 | 552 | if( rItem.link ) |
477 | 553 | o+='<a target="_new" style="position:absolute;top:0px;right:0px" title="' + |
478 | | - gM('Resource Description Page') + |
| 554 | + gM('resource_description_page') + |
479 | 555 | '" href="' + rItem.link + '"><img src="' + stylepath + |
480 | 556 | '/common/images/magnify-clip.png"></a>'; |
| 557 | + //add license icons if present |
| 558 | + if( rItem.license ){ |
| 559 | + o+= _this.getlicenseImgSet( rItem.license ); |
| 560 | + } |
481 | 561 | o+='</div>'; |
482 | 562 | }else if(_this.result_display_mode == 'list'){ |
483 | 563 | o+='<div id="mv_result_' + rInx + '" class="mv_clip_list_result" style="' + disp + 'width:90%">'; |
— | — | @@ -737,11 +817,11 @@ |
738 | 818 | |
739 | 819 | base_resource_desc+='}}'; |
740 | 820 | |
741 | | - //add in licence template tag: |
742 | | - if( rObj.licence_template_tag ) |
| 821 | + //add in license template tag: |
| 822 | + if( rObj.license_template_tag ) |
743 | 823 | base_resource_desc += "\n" + |
744 | 824 | '== [[Commons:Copyright tags|Licensing]]: ==' +"\n"+ |
745 | | - '{{' + rObj.licence_template_tag + '}}'; |
| 825 | + '{{' + rObj.license_template_tag + '}}'; |
746 | 826 | |
747 | 827 | $j('#rsd_resource_import').remove();//remove any old resource imports |
748 | 828 | //@@ show user dialog to import the resource |
— | — | @@ -1158,10 +1238,14 @@ |
1159 | 1239 | _this.num_results++; |
1160 | 1240 | }); |
1161 | 1241 | }, |
1162 | | - //by default just return the existing image: |
| 1242 | + //by default just return the existing image with callback |
1163 | 1243 | getImageObj:function( rObj, size, callback){ |
1164 | 1244 | callback( {'url':rObj.poster} ); |
1165 | 1245 | }, |
| 1246 | + //by default just return the poster (clients can overide) |
| 1247 | + getImageTransform:function(rObj, opt){ |
| 1248 | + return rObj.poster; |
| 1249 | + }, |
1166 | 1250 | getEmbedObjParsedInfo:function(rObj, eb_id){ |
1167 | 1251 | return rObj; |
1168 | 1252 | }, |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/searchLibs/solrArchiveSearch.js |
— | — | @@ -1,7 +1,6 @@ |
2 | 2 | //archive.org uses solr engine: |
3 | 3 | //more about solr here: |
4 | 4 | //http://lucene.apache.org/solr/ |
5 | | - |
6 | 5 | //if we ever have another remote repository using solr we could abstract thouse pieces into a seperate lib |
7 | 6 | |
8 | 7 | var solrArchiveSearch = function ( initObj){ |
— | — | @@ -26,7 +25,8 @@ |
27 | 26 | js_log('f:getSearchResults for:' + $j('#rsd_q').val() ); |
28 | 27 | //build the query var |
29 | 28 | var q = $j('#rsd_q').val(); |
30 | | - //@@todo check advanced options: |
| 29 | + //@@todo check advanced options: include audio and images media types |
| 30 | + //for now force (Ogg video) & a creativecommons license |
31 | 31 | q+=' format:(Ogg video)'; |
32 | 32 | q+=' licenseurl:(http\\:\\/\\/creativecommons\\.org*)'; |
33 | 33 | var reqObj = { |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/searchLibs/metavidSearch.js |
— | — | @@ -49,6 +49,10 @@ |
50 | 50 | rObj['start_time'] = proe.queryKey['t'].split('/')[0]; |
51 | 51 | rObj['end_time'] = proe.queryKey['t'].split('/')[1]; |
52 | 52 | rObj['stream_name'] = proe.queryKey['stream_name']; |
| 53 | + |
| 54 | + //all metavid content is public domain: |
| 55 | + rObj['license'] = 'pd'; |
| 56 | + |
53 | 57 | //transform the title into a wiki_safe title: |
54 | 58 | //rObj['titleKey'] = proe.queryKey['stream_name'] + '_' + rObj['start_time'].replace(/:/g,'.') + '_' + rObj['end_time'].replace(/:/g,'.') + '.ogg'; |
55 | 59 | rObj['titleKey'] = proe.queryKey['stream_name'] + '/' + rObj['start_time'] + '/' + rObj['end_time'] + '__.ogg'; |
— | — | @@ -73,23 +77,18 @@ |
74 | 78 | return '<video ' + id_attr + ' roe="' + rObj['roe_url'] + '"></video>'; |
75 | 79 | } |
76 | 80 | }, |
77 | | - getImageObj:function( rObj, size, callback ){ |
78 | | - var pUrl = parseURI( rObj.poster ); |
79 | | - //per Mv_StreamImage.php page |
80 | | - var imgurl = ''; |
81 | | - |
82 | | - if( size.width <= 80 ){ |
83 | | - imgurl = getURLParamReplace( rObj.poster, { 't' : "icon" } ) |
84 | | - }else if( size.width <= 160 ){ |
85 | | - imgurl = getURLParamReplace( rObj.poster, { 't' : "small" } ) |
86 | | - }else if( size.width <= 320 ){ |
87 | | - imgurl = getURLParamReplace( rObj.poster, { 't' : 'medium' } ) |
88 | | - }else if( size.width <= 512 ){ |
89 | | - imgurl = getURLParamReplace( rObj.poster, { 't' : 'large' } ) |
| 81 | + getImageTransform:function( rObj, opt ){ |
| 82 | + if( opt.width <= 80 ){ |
| 83 | + return getURLParamReplace( rObj.poster, { 'size' : "icon" } ) |
| 84 | + }else if( opt.width <= 160 ){ |
| 85 | + return getURLParamReplace( rObj.poster, { 'size' : "small" } ) |
| 86 | + }else if( opt.width <= 320 ){ |
| 87 | + return getURLParamReplace( rObj.poster, { 'size' : 'medium' } ) |
| 88 | + }else if( opt.width <= 512 ){ |
| 89 | + return getURLParamReplace( rObj.poster, { 'size' : 'large' } ) |
90 | 90 | }else{ |
91 | | - imgurl = getURLParamReplace( rObj.poster, { 't' : 'full' } ) |
92 | | - } |
93 | | - callback( imgurl ); |
| 91 | + return getURLParamReplace( rObj.poster, { 'size' : 'full' } ) |
| 92 | + } |
94 | 93 | }, |
95 | 94 | getEmbedObjParsedInfo:function(rObj, eb_id){ |
96 | 95 | var sources = $j('#'+eb_id).get(0).media_element.getSources(); |
— | — | @@ -113,7 +112,7 @@ |
114 | 113 | var year_full = (dParts[3].length==2)?'20'+dParts[3].toString():dParts[3]; |
115 | 114 | d.setFullYear(year_full, dParts[1]-1, dParts[2]); |
116 | 115 | rObj['date'] = d.toDateString(); |
117 | | - rObj['licence_template_tag']='PD-USGov'; |
| 116 | + rObj['license_template_tag']='PD-USGov'; |
118 | 117 | //update based on new start time: |
119 | 118 | js_log('url is: ' + rObj.src + ' ns: ' + rObj.start_time + ' ne:' + rObj.end_time); |
120 | 119 | |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/mvFirefogg.js |
— | — | @@ -77,7 +77,8 @@ |
78 | 78 | this.enabled=true; |
79 | 79 | |
80 | 80 | //make sure file is "checked" |
81 | | - $j( '#wpSourceTypeFile' ).get(0).checked = true; |
| 81 | + if($j( '#wpSourceTypeFile' ).length != 0) |
| 82 | + $j( '#wpSourceTypeFile' ).get(0).checked = true; |
82 | 83 | |
83 | 84 | //hide normal file upload stuff |
84 | 85 | $j( '#wg-base-upload' ).hide(); |
— | — | @@ -284,10 +285,10 @@ |
285 | 286 | _this.formData[ 'action' ] = 'submit'; |
286 | 287 | |
287 | 288 | //send to the post url: |
288 | | - js_log('sending form data to : ' + _this.editForm.action); |
289 | | - for(var fk in _this.formData){ |
290 | | - js_log(fk + ' : ' + _this.formData[fk]); |
291 | | - } |
| 289 | + //js_log('sending form data to : ' + _this.editForm.action); |
| 290 | + //for(var fk in _this.formData){ |
| 291 | + // js_log(fk + ' : ' + _this.formData[fk]); |
| 292 | + //} |
292 | 293 | _this.fogg.post( _this.editForm.action, 'wpUploadFile', JSON.stringify( _this.formData ) ); |
293 | 294 | |
294 | 295 | //update upload status: |
— | — | @@ -305,7 +306,7 @@ |
306 | 307 | //setup a local function for timed callback: |
307 | 308 | var uploadStatus = function(){ |
308 | 309 | var status = _this.fogg.status(); |
309 | | - js_log(' up stats: ' + status + ' p:' + _this.fogg.progress() + ' state: '+ _this.fogg.state + ' result page:' + _this.fogg.responseText); |
| 310 | + //js_log(' up stats: ' + status + ' p:' + _this.fogg.progress() + ' state: '+ _this.fogg.state + ' result page:' + _this.fogg.responseText); |
310 | 311 | |
311 | 312 | //update progress bar |
312 | 313 | _this.fogg_update_progress( _this.fogg.progress() ); |
— | — | @@ -319,13 +320,15 @@ |
320 | 321 | js_log( 'firefogg:upload done: '); |
321 | 322 | //if in "post" upload mode read the html response (should be depricated): |
322 | 323 | if( _this.upload_mode == 'post' ) { |
| 324 | + var pstatus = JSON.parse( _this.fogg.uploadstatus() ); |
323 | 325 | //js_log( 'done upload response is: ' + cat["responseText"] ); |
324 | | - _this.procPageResponse( JSON.parse( _this.fogg.uploadstatus() )["responseText"] ); |
| 326 | + _this.procPageResponse( pstatus["responseText"] ); |
325 | 327 | }else if( _this.upload_mode == 'chunks'){ |
326 | 328 | //should have an json result: |
327 | | - var foo = _this; |
328 | | - var cat = _JSON.parse( _this.fogg.uploadstatus() ); |
329 | | - debugger; |
| 329 | + js_error('chunks upload not yet supported'); |
| 330 | + //var foo = _this; |
| 331 | + //var cat = _JSON.parse( _this.fogg.uploadstatus() ); |
| 332 | + //debugger; |
330 | 333 | |
331 | 334 | } |
332 | 335 | }else{ |
— | — | @@ -350,7 +353,7 @@ |
351 | 354 | _this.upload_done_action(); |
352 | 355 | } |
353 | 356 | }else{ |
354 | | - js_log( 'upload page error: did not find: ' +sstring + ' in ' + "\n" + result_page ); |
| 357 | + //js_log( 'upload page error: did not find: ' +sstring + ' in ' + "\n" + result_page ); |
355 | 358 | var error_txt = 'Unkown error'; |
356 | 359 | var form_txt = ''; |
357 | 360 | if( !result_page ){ |