Index: trunk/phase3/js2/mwEmbed/libAddMedia/searchLibs/mediaWikiSearch.js |
— | — | @@ -52,8 +52,8 @@ |
53 | 53 | 'url':this.cp.api_url |
54 | 54 | },function(data){ |
55 | 55 | var titleSet = {}; |
56 | | - var titleStr='' |
57 | | - var pound=''; |
| 56 | + var titleStr = '' |
| 57 | + var pound = ''; |
58 | 58 | //loop over the data and group by title |
59 | 59 | if(data.query && data.query.recentchanges){ |
60 | 60 | for(var i in data.query.recentchanges){ |
— | — | @@ -65,13 +65,14 @@ |
66 | 66 | } |
67 | 67 | } |
68 | 68 | } |
69 | | - //now run the actual query ( too bad we cant use recentchanges as a gennerator |
| 69 | + //now run the actual query ( too bad we can't use recentchanges as a generator ) |
| 70 | + //bug 20563 |
70 | 71 | do_api_req({ |
71 | 72 | 'data' : { |
72 | | - 'action':'query', |
73 | | - 'titles':titleStr, |
74 | | - 'prop':'imageinfo|revisions|categories', |
75 | | - 'iiprop':'url|mime|size', |
| 73 | + 'action' : 'query', |
| 74 | + 'titles' : titleStr, |
| 75 | + 'prop' : 'imageinfo|revisions|categories', |
| 76 | + 'iiprop' : 'url|mime|size', |
76 | 77 | 'iiurlwidth': parseInt( _this.rsd.thumb_width ), |
77 | 78 | 'rvprop':'content' |
78 | 79 | }, |
— | — | @@ -124,7 +125,7 @@ |
125 | 126 | _this.loading = false; |
126 | 127 | }); |
127 | 128 | }, |
128 | | - //same as below but returns your rObj for convience |
| 129 | + //same as below but returns your rObj for convenience |
129 | 130 | addSingleResult:function( data ){ |
130 | 131 | return this.addResults(data, true); |
131 | 132 | }, |
— | — | @@ -174,7 +175,7 @@ |
175 | 176 | 'categories':page.categories |
176 | 177 | } |
177 | 178 | }; |
178 | | - //attempt to parse out some stuff from the teplate: |
| 179 | + //attempt to parse out some stuff from the template: |
179 | 180 | var desc = rObj.desc.match(/\|Description=(([^\n]*\n)*)\|Source=/) |
180 | 181 | if( desc && desc[1] ){ |
181 | 182 | rObj.desc = $j.trim( desc[1] ); |
— | — | @@ -227,7 +228,7 @@ |
228 | 229 | return false; |
229 | 230 | } |
230 | 231 | } |
231 | | - //assuming svg or size is in range: give them requeted size |
| 232 | + //assuming svg or size is in range: give them requested size |
232 | 233 | callback({ |
233 | 234 | 'url' : baseImgUrl + '?f=' + rObj.titleKey + '&w='+ size.width, |
234 | 235 | 'width' : size.width, |
— | — | @@ -331,8 +332,8 @@ |
332 | 333 | return desc; |
333 | 334 | } |
334 | 335 | //else return the title since we could not find the desc: |
335 | | - js_log('we could not find the Description tag in :' + desc ); |
336 | | - return rObj.title; |
| 336 | + js_log('Error: No Description Tag, Using::' + desc ); |
| 337 | + return desc; |
337 | 338 | }, |
338 | 339 | parseWikiTemplate: function( text ){ |
339 | 340 | //@@todo parse wiki Template return object with properties and values |
Index: trunk/phase3/js2/mwEmbed/libAddMedia/searchLibs/archiveOrgSearch.js |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | //archive.org uses solr engine: |
3 | | -//more about solr here: |
| 3 | +//more about solr here: |
4 | 4 | //http://lucene.apache.org/solr/ |
5 | 5 | |
6 | 6 | var archiveOrgSearch = function ( iObj){ |
— | — | @@ -72,7 +72,7 @@ |
73 | 73 | 'desc' : resource.description, |
74 | 74 | 'src' : _this.dnUrl + resource.identifier+'/format=Ogg+video', |
75 | 75 | 'mime' : 'application/ogg', |
76 | | - //set the licence: (rsd is a pointer to the parent remoteSearchDriver ) |
| 76 | + //set the license: (rsd is a pointer to the parent remoteSearchDriver ) |
77 | 77 | 'license' : this.rsd.getLicenceFromUrl( resource.licenseurl ), |
78 | 78 | 'pSobj' :_this |
79 | 79 | |
Index: trunk/phase3/js2/mwEmbed/libAddMedia/seqRemoteSearchDriver.js |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | /*the sequence remote search driver |
3 | | - extends the base remote search driver with sequence specific stuff. could seperate this out into seperate lib. |
| 3 | + extends the base remote search driver with sequence specific stuff |
4 | 4 | */ |
5 | 5 | |
6 | 6 | var seqRemoteSearchDriver = function(iObj){ |
— | — | @@ -95,7 +95,7 @@ |
96 | 96 | if(tClip) |
97 | 97 | var target_order = tClip.order; |
98 | 98 | } |
99 | | - //@@todo show watting of sorts. |
| 99 | + //@@todo show wating of sorts. |
100 | 100 | |
101 | 101 | //get target order: |
102 | 102 | var cat = rObj; |
Index: trunk/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js |
— | — | @@ -443,7 +443,7 @@ |
444 | 444 | var _this = this; |
445 | 445 | //add the parent target_container if not provided or missing |
446 | 446 | if(!_this.target_container || $j(_this.target_container).length==0){ |
447 | | - $j('body').append('<div id="rsd_modal_target" style="position:absolute;top:30px;left:0px;bottom:33px;right:0px;" title="' + gM('mwe-add_media_wizard') + '" ></div>'); |
| 447 | + $j('body').append('<div id="rsd_modal_target" style="position:absolute;top:3em;left:0px;bottom:3em;right:0px;" title="' + gM('mwe-add_media_wizard') + '" ></div>'); |
448 | 448 | _this.target_container = '#rsd_modal_target'; |
449 | 449 | //js_log('appended: #rsd_modal_target' + $j(_this.target_container).attr('id')); |
450 | 450 | //js_log('added target id:' + $j(_this.target_container).attr('id')); |
— | — | @@ -1074,7 +1074,7 @@ |
1075 | 1075 | $j( _this.target_container ).find('#rsd_resource_edit').remove(); |
1076 | 1076 | //add the edit layout window with loading place holders |
1077 | 1077 | $j( _this.target_container ).append('<div id="rsd_resource_edit" '+ |
1078 | | - 'style="position:absolute;top:0px;left:0px;bottom:5px;right:4px;background-color:#FFF;">' + |
| 1078 | + 'style="position:absolute;top:0px;left:0px;bottom:0px;right:4px;background-color:#FFF;">' + |
1079 | 1079 | '<div id="clip_edit_disp" style="position:absolute;' + overflow_style + 'width:100%;height:100%;padding:5px;'+ |
1080 | 1080 | 'width:' + (maxWidth) + 'px;" >' + |
1081 | 1081 | mv_get_loading_img('position:absolute;top:30px;left:30px') + |
— | — | @@ -1123,18 +1123,14 @@ |
1124 | 1124 | 'cursor':'default', |
1125 | 1125 | 'opacity':0 |
1126 | 1126 | }); |
1127 | | - |
1128 | | - |
1129 | | - //try and keep aspect ratio for the thumbnail that we clicked: |
1130 | | - var rh = $j('#rsd_edit_img').height(); |
1131 | | - var rw = $j('#rsd_edit_img').width(); |
1132 | 1127 | |
1133 | | - var tRatio = rh / rw; |
| 1128 | + //try and keep aspect ratio for the thumbnail that we clicked: |
| 1129 | + var tRatio = rObj.orgheight / rObj.orgwidth; |
1134 | 1130 | |
1135 | 1131 | if( ! tRatio ) |
1136 | 1132 | var tRatio = 1; //set ratio to 1 if tRatio did not work. |
1137 | 1133 | |
1138 | | - //js_log('set from ' + $j('#rsd_edit_img').width() + 'x' + $j('#rsd_edit_img').height() + ' to init thumbimage to ' + maxWidth + ' x ' + parseInt( tRatio * maxWidth) ); |
| 1134 | + //js_log('set from ' + tRatio + ' to init thumbimage to ' + maxWidth + ' x ' + parseInt( tRatio * maxWidth) ); |
1139 | 1135 | //scale up image and to swap with high res version |
1140 | 1136 | $j('#rsd_edit_img').animate({ |
1141 | 1137 | 'opacity':1, |
Index: trunk/phase3/js2/mwEmbed/libSequencer/mvFirefoggRender.js |
— | — | @@ -52,7 +52,7 @@ |
53 | 53 | this.renderOptions[ i ] = default_render_options[i]; |
54 | 54 | } |
55 | 55 | } |
56 | | - //setup the application options (with defaults) |
| 56 | + //Setup the application options (with defaults) |
57 | 57 | for(var i in default_FirefoggRender_options ){ |
58 | 58 | if( iObj[ i ] ){ |
59 | 59 | this[ i ] = iObj[ i ]; |
— | — | @@ -60,8 +60,7 @@ |
61 | 61 | this[ i ] = default_FirefoggRender_options[i]; |
62 | 62 | } |
63 | 63 | } |
64 | | - //set up targets and local vars |
65 | | - |
| 64 | + //Set up targets and local vars |
66 | 65 | if( iObj.target_startRender ){ |
67 | 66 | $j(iObj.target_startRender).click(function(){ |
68 | 67 | js_log("Start render"); |
Index: trunk/phase3/js2/mwEmbed/libClipEdit/mvClipEdit.js |
— | — | @@ -27,7 +27,7 @@ |
28 | 28 | "mwe-set_in_out_points" : "Set in-out points", |
29 | 29 | "mwe-start_time" : "Start time", |
30 | 30 | "mwe-end_time" : "End time", |
31 | | - "mwe-preview_inout" : "Preview\/play in-out points" |
| 31 | + "mwe-preview_inout" : "Preview in-out points" |
32 | 32 | }); |
33 | 33 | |
34 | 34 | var default_clipedit_values = { |
Index: trunk/phase3/js2/mwEmbed/libEmbedVideo/embedVideo.js |
— | — | @@ -5,8 +5,7 @@ |
6 | 6 | loadGM({ |
7 | 7 | "mwe-loading_plugin" : "loading plugin <blink>...<\/blink>", |
8 | 8 | "mwe-select_playback" : "Set playback preference", |
9 | | - "mwe-link_back" : "Link back", |
10 | | - "mwe-error_load_lib" : "Error: JavaScript $1 was not retrievable or does not define $2", |
| 9 | + "mwe-link_back" : "Link back", |
11 | 10 | "mwe-error_swap_vid" : "Error: mv_embed was unable to swap the video tag for the mv_embed interface", |
12 | 11 | "mwe-add_to_end_of_sequence" : "Add to end of sequence", |
13 | 12 | "mwe-missing_video_stream" : "The video file for this stream is missing", |
— | — | @@ -2154,7 +2153,7 @@ |
2155 | 2154 | return this.media_element.selected_source.URLTimeEncoding; |
2156 | 2155 | }, |
2157 | 2156 | setSliderValue: function(perc, hide_progress){ |
2158 | | - if(this.controls){ |
| 2157 | + if(this.controls && $j('#mv_play_head_'+this_id).length != 0){ |
2159 | 2158 | var this_id = (this.pc)?this.pc.pp.id:this.id; |
2160 | 2159 | var val = parseInt( perc*1000 ); |
2161 | 2160 | $j('#mv_play_head_'+this_id).slider('value', val); |