r44921 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44920‎ | r44921 | r44922 >
Date:04:16, 23 December 2008
Author:dale
Status:deferred
Tags:
Comment:
remote search & insert wizard updates
some js refactoring
Modified paths:
  • /trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_OggHandler.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_StreamImage.php (modified) (history)
  • /trunk/extensions/MetavidWiki/maintenance/metavid2mvWiki.inc.php (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/external_media_wizard.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_common.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedObj/mv_flashEmbed.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/libRemoteMediaSearch/mv_remote_media_search.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/libSequencer/mv_clipedit.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/slider_handle.gif (added) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/slider_handle_green.gif (added) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/slider_handle_red.gif (added) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/styles.css (modified) (history)
  • /trunk/extensions/MetavidWiki/skins/mv_stream.js (modified) (history)

Diff [purge]

Index: trunk/extensions/MetavidWiki/maintenance/metavid2mvWiki.inc.php
@@ -591,7 +591,7 @@
592592 return $out;
593593 }
594594 function do_bill_insert( $bill_key ) {
595 - print "not yet implemented\n";
 595+ //grab bill list with categories from govtrack
596596 }
597597 function do_people_insert( $doInterestLookup = false, $forcePerson = '', $force = false ) {
598598 global $valid_attributes, $states_ary;
Index: trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php
@@ -306,8 +306,7 @@
307307
308308 $wgOut->addScript( "<script type=\"{$wgJsMimeType}\" src=\"{$mvgScriptPath}/skins/mv_embed/mv_embed.js?{$unique_req_param}\"></script>" );
309309 $wgOut->addScript( "<script type=\"{$wgJsMimeType}\" src=\"{$mvgScriptPath}/skins/mv_allpages.js?{$unique_req_param}\"></script>" );
310 - $wgOut->addScript( "<script type=\"{$wgJsMimeType}\" src=\"{$mvgScriptPath}/skins/mv_search.js?{$unique_req_param}\"></script>" );
311 - $wgOut->addScript( "<script type=\"{$wgJsMimeType}\" src=\"{$mvgScriptPath}/skins/mv_common.js?{$unique_req_param}\"></script>" );
 310+ $wgOut->addScript( "<script type=\"{$wgJsMimeType}\" src=\"{$mvgScriptPath}/skins/mv_search.js?{$unique_req_param}\"></script>" );
312311
313312 //temp for testing:
314313 if( $mvgJSDebug )
Index: trunk/extensions/MetavidWiki/includes/MV_StreamImage.php
@@ -115,6 +115,9 @@
116116 list( $im_width, $im_height, $ext ) = MV_StreamImage::getSizeType( $req_size );
117117 if ( $ext == 'jpg' )header( "Content-type: image/jpeg" );
118118 if ( $ext == 'png' )header( "Content-type: image/png" );
 119+ //set out a long expire:
 120+ //keep in the cache for a 90 days:
 121+ header('Expires: ' . gmdate('D, d M Y H:i:s', time()+90*24*60*60) . ' GMT');
119122 // print "img path: $img_path";
120123 // @@todo a redirect to real image (will serv from cache that way)
121124 if ( is_file( $img_path ) ) {
Index: trunk/extensions/MetavidWiki/includes/MV_OggHandler.php
@@ -1,9 +1,7 @@
22 <?php
33 /*
44 * class to override oggHandler for compatibility/feature enhancement with metavid
5 - *
6 - * primararly does the following:
7 - * changes
 5+ *
86 */
97
108 class mvOggHandler extends OggHandler{
Index: trunk/extensions/MetavidWiki/skins/mv_common.js
@@ -5,197 +5,8 @@
66 * adds adjustment hooks
77 * @mvd_id set to the mvd_id
88 */
9 -function add_adjust_hooks(mvd_id, track_dur, targets){
10 - if(track_dur)track_dur=parseInt(track_dur);
11 - js_log('add_adjust_hooks: ' + mvd_id + ' td: '+ track_dur);
12 -
13 - /*var base_targets = new Array('mv_end_hr', 'mv_start_hr', 'track_target' );
14 -
15 - if( typeof targets == 'object'){
16 - for(var i in targets){
17 -
18 - }
19 - }else{
20 -
21 - }*/
22 -
23 - //if options are unset populate functions:
24 - //add mouse over end time frame highlight
25 - $j('#mv_end_hr_'+mvd_id).hoverIntent({interval:200,over:function(){
26 - //js_log('pre style: ' + $j(this).css('border'));
27 - $j(this).css('border','solid red');
28 - do_video_time_update( $j('#mv_end_hr_'+mvd_id).val(), $j('#mv_end_hr_'+mvd_id).val() );
29 - },out:function(){
30 - $j(this).css('border','solid black thin');
31 - do_video_time_update($j('#mv_start_hr_'+mvd_id).val(), $j('#mv_end_hr_'+mvd_id).val() );
32 - }});
33 - //add onchange js hooks:
34 - $j('.mv_adj_hr').change(function(){
35 - //preserve track duration for nav and seq:
36 - //ie seems to crash so no interface updates for IE for the time being
37 - if(!$j.browser.msie){
38 - if(mvd_id=='nav'||mvd_id=='seq'){
39 - add_adjust_hooks(mvd_id, track_dur);
40 - }else{
41 - add_adjust_hooks(mvd_id)
42 - }
43 - }
44 - //update the video time for onChange
45 - do_video_time_update($j('#mv_start_hr_'+mvd_id).val(), $j('#mv_end_hr_'+mvd_id).val() );
46 - });
47 - //read the ntp time from the fields
48 - var start_sec = ntp2seconds( $j('#mv_start_hr_'+mvd_id).val() );
49 - var end_sec = ntp2seconds( $j('#mv_end_hr_'+mvd_id).val() );
50 - js_log('start_sec:'+start_sec + ' end: ' + end_sec);
51 - if(start_sec > end_sec){
52 - js_log('start > end : ' + start_sec + ' > ' + end_sec);
53 - //update end time to start_time + 1 second
54 - end_sec = parseInt(start_sec+1);
55 - $j('#mv_end_hr_'+mvd_id).val(seconds2ntp(end_sec));
56 - }
579
58 - var duration = end_sec - start_sec;
59 - //set the track duration as 2 min or 2*duration (whatever is longer)
60 - if(!track_dur)
61 - var track_dur = (duration*2<120)?120:duration*2;
6210
63 - //set the base offset
64 - if(start_sec==0){
65 - var base_offset = 0
66 - }else{
67 - //make sure we won't go into negative with a 1/4 track offset
68 - //alert('wtf:s:' + start_sec + '-' + (track_dur*.25) );
69 - var base_offset= start_sec-(track_dur*.25);
70 - //alert('wtf: '+ base_offset);
71 - if(base_offset < 0)
72 - base_offset=0;
73 - //js_log('set base offset: '+track_dur +'* .25 = '+ parseInt(base_offset) );
74 - }
75 - js_log('BASE OFFSET: '+ base_offset);
76 - //set the base offset / track_dur interface vars:
77 - $j('#track_time_start_'+mvd_id).html( seconds2ntp(base_offset) );
78 - $j('#track_time_end_'+mvd_id).html( seconds2ntp( base_offset+track_dur ));
79 -
80 - //set up start /end slider values:
81 - var slider_start = (start_sec - base_offset) / track_dur;
82 - var slider_end = (end_sec - base_offset) / track_dur;
83 - var slider_dur = slider_end -slider_start;
84 - //clear out the existing effect if present
85 - //if(mv_sliders[mvd_id])mv_sliders[mvd_id].dispose();
86 -
87 - //update the slider values (left right)
88 - track_width = $j('#container_track_'+mvd_id).width();
89 -
90 - js_log('start: '+ slider_start + ' =' + (slider_start*track_width) +
91 - ' se:'+ slider_end + ' =' + (slider_end*track_width) +
92 - ' width would be: :' + Math.round((slider_end*track_width)-(slider_start*track_width)));
93 -
94 - //if re-size width less than width of image bump it up:
95 - var resize_width = Math.round((slider_end*track_width)-(slider_start*track_width));
96 - if(resize_width<17)resize_width=17;
97 -
98 - $j('#resize_'+mvd_id).css({
99 - left:Math.round(slider_start*track_width)+'px',
100 - width: resize_width+'px'
101 - });
102 - js_log("track width: " + $j('#container_track_'+mvd_id).width() +
103 - ' slider_width: ' + $j('#resize_'+mvd_id).width());
104 - //add an additional flag
105 - var cur_handle = '';
106 - $j('.ui-resizable-handle').mousedown( function(){
107 - js_log('hid: ' + this.id);
108 - cur_handle = this.id;
109 - });
110 - org_start = org_end ='';
111 - //jQuery slider:
112 - $j('#resize_'+mvd_id).resizable({
113 - minWidth: 10,
114 - maxWidth: $j('#resize_'+mvd_id).width(),
115 - minHeight: 20,
116 - maxHeight: 20,
117 - handles: {
118 - e: '.ui-resizable-e',
119 - w: '.ui-resizable-w'
120 - },
121 - start: function(e,ui) {
122 - mv_lock_vid_updates=true;
123 - org_start = $j('#mv_start_hr_'+mvd_id).val();
124 - org_end = $j('#mv_end_hr_'+mvd_id).val();
125 - //js_log("org maxWidth: " + ui.options.maxWidth);
126 - right_x = ( $j('#resize_'+mvd_id).position().left+
127 - $j('#resize_'+mvd_id).width()
128 - );
129 - /*js_log('left:' + $j('#resize_'+mvd_id).position().left + ' width: '+
130 - * $j('#resize_'+mvd_id).width() + ' right_x:'+ right_x);
131 - */
132 - if(cur_handle.indexOf('handle1')!=-1){
133 - ui.options.maxWidth= right_x;
134 - }else{
135 - ui.options.maxWidth= (
136 - $j('#container_track_'+mvd_id).width() -
137 - $j('#resize_'+mvd_id).position().left
138 - );
139 - }
140 - js_log("updated maxWidth: " + ui.options.maxWidth);
141 - //js_log('grabbed: ' + e.explicitOriginalTarget.id);
142 - //console.log('start ', ui);
143 - },
144 - stop: function(e,ui) {
145 - mv_lock_vid_updates=false;
146 - //console.log('stop ', ui);
147 - //return the non-adjusted to its original value:
148 - if(cur_handle.indexOf('handle1')!=-1){
149 - $j('#mv_end_hr_'+mvd_id).val(org_end);
150 - }else{
151 - $j('#mv_start_hr_'+mvd_id).val(org_start);
152 - }
153 - //update the clip
154 - do_video_time_update($j('#mv_start_hr_'+mvd_id).val(), $j('#mv_end_hr_'+mvd_id).val() );
155 - },
156 - resize: function(e,ui) {
157 - base_offset = ntp2seconds( $j('#track_time_start_'+mvd_id).html());
158 - mv_slider_update_stats(mvd_id);
159 - }
160 - });
161 - $j('#dragSpan_'+mvd_id).css('cursor','move');
162 - $j('#resize_'+mvd_id).draggable({
163 - axis:'x',
164 - containment:'parent',
165 - handle: "#dragSpan_"+mvd_id,
166 - drag:function(e, ui){
167 - mv_slider_update_stats(mvd_id, true);
168 - },
169 - stop:function(e,ui){
170 - $j('#resize_'+mvd_id).css('top', 0);
171 - //if in seq mode:update the clip
172 - if(mvd_id=='seq')do_video_time_update($j('#mv_start_hr_'+mvd_id).val(), $j('#mv_end_hr_'+mvd_id).val() );
173 - }
174 - });
175 - //store the necessary values in the slider obj
176 - //mv_sliders[mvd_id]['base_offset']=base_offset;
177 - //mv_sliders[mvd_id]['track_dur']=track_dur;
178 - function mv_slider_update_stats(mvd_id, drag){
179 - var update_start=update_end=false;
180 - //only update the side we are dragging:
181 - if(cur_handle.indexOf('handle1')!=-1){
182 - update_start=true;
183 - }else{
184 - update_end=true;
185 - }
186 - if(drag)update_end=update_start=true;
187 - if(update_end){
188 - var end_time = base_offset + (track_dur *(($j('#resize_'+mvd_id).position().left +
189 - $j('#resize_'+mvd_id).width()) /
190 - $j('#container_track_'+mvd_id).width()));
191 - if(end_time>(track_dur+base_offset))end_time=track_dur+base_offset;
192 - $j('#mv_end_hr_'+mvd_id).val( seconds2ntp(end_time) );
193 - }
194 - if(update_start)
195 - $j('#mv_start_hr_'+mvd_id).val( seconds2ntp(base_offset + (track_dur *($j('#resize_'+mvd_id).position().left /
196 - $j('#container_track_'+mvd_id).width()) ) ));
197 - }
198 -}
199 -
20011 //alert(typeof js_log);
20112 //logging:
20213 function js_log(string){
Index: trunk/extensions/MetavidWiki/skins/mv_stream.js
@@ -60,9 +60,10 @@
6161 //:hoverIntent
6262 //http://cherne.net/brian/resources/jquery.hoverIntent.html
6363 mvJsLoader.doLoad({
64 - '$j.autocomplete':'jquery/plugins/jquery.autocomplete.js',
65 - '$j.fn.hoverIntent':'jquery/plugins/jquery.hoverIntent.js',
66 - '$j.ui.resizable':'jquery/jquery.ui-1.5.2/ui/minified/ui.resizable.min.js'
 64+ '$j.autocomplete' : 'jquery/plugins/jquery.autocomplete.js',
 65+ '$j.fn.hoverIntent' : 'jquery/plugins/jquery.hoverIntent.js',
 66+ '$j.ui.resizable' : 'jquery/jquery.ui-1.5.2/ui/minified/ui.resizable.min.js',
 67+ 'mvClipEdit' : 'libSequencer/mv_clipedit.js'
6768 },function(){
6869 //now extend draggable
6970 mvJsLoader.doLoad({
@@ -1012,47 +1013,6 @@
10131014 });
10141015 }
10151016 }
1016 -function do_video_time_update(start_time, end_time, mvd_id) {
1017 - if(mv_lock_vid_updates==false){
1018 - //update the vid title:
1019 - $j('#mv_videoPlayerTime').html( start_time + ' to ' + end_time );
1020 - var ebvid = $j('#embed_vid').get(0);
1021 - if(ebvid.isPaused())
1022 - ebvid.stop();
1023 - $j('#embed_vid').get(0).updateVideoTime(start_time, end_time);
1024 - do_update_thumb(mvd_id, start_time);
1025 - }
1026 -}
1027 -function do_update_thumb(mvd_id, start_time){
1028 - //set via mvd
1029 - if(mvd_id){
1030 - if($j('#mv_fd_mvd_'+mvd_id).attr('image_url')!=$j('#embed_vid').get(0).thumbnail){
1031 - $j('#embed_vid').get(0).updateThumbnail($j('#mv_fd_mvd_'+mvd_id).attr('image_url'));
1032 - return ;
1033 - }
1034 - }
1035 - //else set via org_thum_src
1036 - if( $j('#embed_vid').get(0).org_thum_src.indexOf('?')!=-1){
1037 - var url = $j('#embed_vid').get(0).org_thum_src.split('?');
1038 - var args = Array();
1039 - var arg_parts = url[1].split('&');
1040 - for(i in arg_parts){
1041 - var tmp = arg_parts[i].split('=');
1042 - args[tmp[0]]=tmp[1];
1043 - }
1044 - var new_thumb = url[0]+'?';
1045 - for(k in args){
1046 - var v = args[k];
1047 - if(k!='t'){
1048 - new_thumb+=k+'='+v+'&';
1049 - }
1050 - }
1051 - new_thumb+= 't='+ start_time;
1052 - //js_log("new thumb:" + new_thumb);
1053 - if(new_thumb!=$j('#embed_vid').get(0).thumbnail)
1054 - $j('#embed_vid').get(0).updateThumbnail(new_thumb);
1055 - }
1056 -}
10571017 function mv_tool_disp(tool_id){
10581018 //set content to loading
10591019 $j('#mv_tool_cont').html( getMsg('loading_txt') );
@@ -1089,7 +1049,7 @@
10901050 //run any request javascript call backs
10911051 //do per tool post-req js actions:
10921052 switch(tool_id){
1093 - case 'navigate':
 1053+ /*case 'navigate':
10941054 //set the content payload
10951055 $j('#mv_tool_cont').html( mv_result['innerHTML']);
10961056 eval(mv_result['js_eval']);
@@ -1099,7 +1059,7 @@
11001060 '/'+$j('#mv_end_hr_nav').val();
11011061 });
11021062 add_adjust_hooks('nav', end_time);
1103 - break;
 1063+ break;*/
11041064 case 'search':
11051065 //load search.js ... @@todo cleanup path
11061066 mvJsLoader.doLoad({
Index: trunk/extensions/MetavidWiki/skins/external_media_wizard.js
@@ -9,6 +9,7 @@
1010 },
1111 'metavid':{
1212 'local':true //this will change the output from [[embed:StreamName]] to [[remoteEmbed:roe_url]]
 13+ // you will need to run the mv remoteEmbed extension.
1314 }
1415 }
1516 var wg_local_wiki_api_url = wgServer + wgScriptPath + '/api.php';
@@ -37,7 +38,7 @@
3839 //show the loading screen:
3940 var body_elm = document.getElementsByTagName("body")[0];
4041 body_elm.innerHTML = body_elm.innerHTML + ''+
41 - '<div id="modalbox" style="background:#DDD;border:3px solid #666666;'+
 42+ '<div id="modalbox" style="background:#DDD;border:3px solid #666666;font-size:115%;'+
4243 'top:30px;left:20px;right:20px;bottom:30px;position:fixed;z-index:100;">'+
4344
4445 'loading external media wizard<blink>...</blink>'+
@@ -71,9 +72,10 @@
7273 'target_id':'modalbox',
7374 'profile':'mediawiki_edit',
7475 'target_textbox': 'wpTextbox1',
75 - 'caret_pos':caret_pos,
 76+ 'caret_pos':caret_pos,
7677 //note selections in the textbox will take over the default query
7778 'default_query': wgTitle,
 79+ 'target_title':wgPageName,
7880 'cpconfig':wg_content_proivers_config,
7981 'local_wiki_api_url': wg_local_wiki_api_url
8082 });
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libSequencer/mv_clipedit.js
@@ -38,18 +38,101 @@
3939 }
4040 }
4141 //check the media_type:
42 - js_log('mvClipEdit:: media type:' + this.media_type + 'base width: ' + rObj.width + ' bh: ' + rObj.height);
 42+ js_log('mvClipEdit:: media type:' + this.media_type + 'base width: ' + this.rObj.width + ' bh: ' + this.rObj.height);
4343
44 -
4544 //could seperate out into media Types objects for now just call method
4645 if(this.media_type == 'image'){
4746 this.setUpImageCtrl();
48 - }else if(this.media_type=='jpeg'){
 47+ }else if(this.media_type=='video'){
4948 this.setUpVideoCtrl();
5049 }
5150 },
 51+ setUpVideoCtrl:function(){
 52+ js_log('setUpVideoCtrl:f');
 53+ var eb = $j('#embed_vid').get(0);
 54+ //turn on preview to avoid onDone actions
 55+ eb.preview_mode = true;
 56+
 57+ $j('#'+this.control_ct).html(
 58+ '<h3>Edit Video Tools:</h3>' +
 59+ '<strong>Set in-out points</strong>'+
 60+ '<table border="0" style="background: transparent; width:94%;height:50px;">'+
 61+ '<tbody><tr><td width="40">'+
 62+ '<span style="font-size: small;" id="track_time_start_rsd">' + eb.start_ntp +'</span>'+
 63+ '</td><td><div style="border: 1px solid black; width: 100%; height: 5px; background-color: #888;" '+
 64+ 'id="container_track_rsd">'+
 65+ '<div id="resize_rsd" class="ui-resizable ui-draggable">'+
 66+
 67+ '<div class="ui-resizable-w ui-resizable-handle"'+
 68+ ' id="handle1_rsd" unselectable="on"/>'+
 69+
 70+ '<div class="ui-resizable-e ui-resizable-handle" '+
 71+ ' id="handle2_rsd" unselectable="on"/>'+
 72+
 73+ '<div class="ui-dragSpan" id="dragSpan_rsd" style="cursor: move;"/>'+
 74+ '</div>'+
 75+ '</div>'+
 76+ '</td><td width="50">'+
 77+ '<span style="font-size: small;" id="track_time_end_rsd">'+ eb.end_ntp +'</span>'+
 78+ '</td></tr></tbody>'+
 79+ '</table>'+
 80+ '<span style="float: left;">'+
 81+ '<label class="mv_css_form" for="mv_start_hr_rsd"><i>Start time:</i></label>'+
 82+ '<input id="mv_start_hr_rsd" class="mv_adj_hr" name="mv_start_hr_rsd" value="' + eb.start_ntp + '" maxlength="8" size="8"/>'+
 83+ '</span>'+
 84+ '<span style="float: left;">'+
 85+ '<label for="mv_end_hr_rsd" class="mv_css_form"><i>End time:</i></label>'+
 86+ '<input name="mv_end_hr_rsd" id="mv_end_hr_rsd" value="' + eb.end_ntp + '" maxlength="8" size="8" class="mv_adj_hr"/>'+
 87+ '</span>'+
 88+ '<div style="clear: both;"/>'+
 89+ '<input id="mv_preview_clip" type="button" value="Preview In-out points">'+
 90+ this.getInsertControl()
 91+ );
 92+ //setup bindings:
 93+ add_adjust_hooks('rsd');
 94+
 95+ $j('#mv_preview_clip').click(function(){
 96+ $j('#embed_vid').get(0).stop();
 97+ $j('#embed_vid').get(0).play();
 98+ });
 99+
 100+ this.applyInsertControlBindings();
 101+ },
 102+ getInsertControl:function(){
 103+ return '<h3>Inline Caption Description</h3>'+
 104+ '<textarea style="width:300px;" id="mv_inline_img_desc" rows="4" cols="30"></textarea><br>'+
 105+ '<h3>Actions</h3>'+
 106+ '<input type="button" class="mv_insert_image_page" value="' + getMsg('mv_insert_image_page') + '"> '+
 107+ '<input type="button" style="font-weight:bold" class="mv_preview_insert" value="' + getMsg('mv_preview_insert')+ '"> '+
 108+ '<a href="#" class="mv_cancel_img_edit" title="' + getMsg('mv_cancel_image_insert')+'">' + getMsg('mv_cancel_image_insert') + '</a> ';
 109+ },
 110+ applyEdit:function(){
 111+ if(this.media_type == 'image'){
 112+ this.applyCrop();
 113+ }else if(this.media_type == 'video'){
 114+ this.applyVideoAdj();
 115+ }
 116+ },
 117+ applyInsertControlBindings:function(){
 118+ var _this = this;
 119+ $j('.mv_insert_image_page').click(function(){
 120+ _this.applyEdit();
 121+ //copy over the desc text to the resource object
 122+ rObj['inlineDesc']= $j('#mv_inline_img_desc').val();
 123+ _this.p_rsdObj.insertResource( _this.rObj );
 124+ });
 125+ $j('.mv_preview_insert').click(function(){
 126+ _this.applyEdit();
 127+ //copy over the desc text to the resource object
 128+ _this.rObj['inlineDesc']= $j('#mv_inline_img_desc').val();
 129+ _this.p_rsdObj.previewResource( _this.rObj );
 130+ });
 131+ $j('.mv_cancel_img_edit').click( function(){
 132+ $j('#' + _this.parent_ct).fadeOut("fast");
 133+ });
 134+ },
52135 setUpImageCtrl:function(){
53 - var _this = this;
 136+ var _this = this;
54137 //by default apply Crop tool
55138 $j('#'+this.control_ct).html(
56139 '<h3>Edit tools</h3>' +
@@ -63,17 +146,11 @@
64147 '<a href="#" class="mv_scale_msg">' + getMsg('mv_scale') + '</a><br>'+
65148 '<a href="#" style="display:none" class="mv_apply_scale">' + getMsg('mv_apply_scale') + '</a> '+
66149 '<a href="#" style="display:none" class="mv_rest_scale">' + getMsg('mv_reset_scale') + '</a> '+
67 -
68 - '<h3>Inline Caption Description</h3>'+
69 - '<textarea id="mv_img_desc" rows="4" cols="30"></textarea><br>'+
70 - '<h3>Actions</h3>'+
71 - '<input type="button" class="mv_insert_image_page" value="' + getMsg('mv_insert_image_page') + '"> '+
72 - '<input type="button" style="font-weight:bold" class="mv_preview_insert" value="' + getMsg('mv_preview_insert')+ '"> '+
73 - '<a href="#" class="mv_cancel_img_edit" title="' + getMsg('mv_cancel_image_insert')+'">' + getMsg('mv_cancel_image_insert') + '</a> '
 150+ _this.getInsertControl()
74151 );
75152 //add bidings:
76153 $j('#mv_crop_button,.mv_crop_msg,.mv_apply_crop').click(function(){
77 - js_log('click:mv_crop_button: base width: ' + rObj.width + ' bh: ' + rObj.height);
 154+ js_log('click:mv_crop_button: base width: ' + _this.rObj.width + ' bh: ' + _this.rObj.height);
78155 if($j('#mv_crop_button').hasClass('mv_crop_button_selected')){
79156 _this.applyCrop();
80157 }else{
@@ -86,24 +163,17 @@
87164 $j('.mv_crop_msg').show();
88165 $j('#mv_crop_button').removeClass('mv_crop_button_selected').addClass('mv_crop_button_base').attr('title',getMsg('mv_crop'));
89166 _this.rObj.crop=null;
90 - $j('#'+_this.clip_disp_ct ).empty().html(
91 - '<img src="'+ _this.rObj.url + '" id="rsd_edit_img">'
92 - )
93 - });
94 - $j('.mv_insert_image_page').click(function(){
95 - _this.applyCrop();
96 - //have the (parent remote search object) do the insert
97 - _this.p_rsdObj.insertResource( rObj );
98 - });
99 - $j('.mv_preview_insert').click(function(){
100 - _this.applyCrop();
101 - //copy over the desc text to the resouce object
102 - _this.p_rsdObj.previewResource( rObj );
103 - });
104 - $j('.mv_cancel_img_edit').click( function(){
105 - $j('#' + _this.parent_ct).fadeOut("fast");
106 - });
 167+ $j('#' + _this.clip_disp_ct ).empty().html(
 168+ '<img src="' + _this.rObj.url + '" id="rsd_edit_img">'
 169+ );
 170+ });
 171+ this.applyInsertControlBindings();
107172 },
 173+ applyVideoAdj:function(){
 174+ //update video related keys
 175+ _this.rObj['titleKey'] = 'Stream:';
 176+ _this.rObj['start_time'] = '';
 177+ },
108178 applyCrop:function(){
109179 var _this = this;
110180 $j('.mv_apply_crop').hide();
@@ -135,11 +205,201 @@
136206 js_log('on select:' + c.x +','+ c.y+','+ c.x2+','+ c.y2+','+ c.w+','+ c.h);
137207 _this.rObj.crop = c;
138208 },
139 - onChange: function(c){
140 - }
 209+ onChange: function(c){
 210+ }
141211 });
142 - },
143 - setUpVideoCtrl:function(){
144 -
145212 }
 213+}
 214+// mv_lock_vid_updates defeined in mv_stream.js (we need further refactoring)
 215+if(typeof mv_lock_vid_updates == 'undefined')
 216+ mv_lock_vid_updates= false;
 217+
 218+function add_adjust_hooks(mvd_id){
 219+ js_log('add_adjust_hooks: ' + mvd_id );
 220+ //if options are unset populate functions:
 221+ //add mouse over end time frame highlight
 222+ $j('#mv_end_hr_'+mvd_id).hoverIntent({interval:200,over:function(){
 223+ //js_log('pre style: ' + $j(this).css('border'));
 224+ $j(this).css('border','solid red');
 225+ do_video_time_update( $j('#mv_end_hr_'+mvd_id).val(), $j('#mv_end_hr_'+mvd_id).val() );
 226+ },out:function(){
 227+ $j(this).css('border','solid black thin');
 228+ do_video_time_update($j('#mv_start_hr_'+mvd_id).val(), $j('#mv_end_hr_'+mvd_id).val() );
 229+ }});
 230+ //add onchange js hooks:
 231+ $j('.mv_adj_hr').change(function(){
 232+ //preserve track duration for nav and seq:
 233+ //ie seems to crash so no interface updates for IE for the time being
 234+ if(!$j.browser.msie){
 235+ if(mvd_id=='nav'||mvd_id=='seq'){
 236+ add_adjust_hooks(mvd_id);
 237+ }else{
 238+ add_adjust_hooks(mvd_id)
 239+ }
 240+ }
 241+ //update the video time for onChange
 242+ do_video_time_update($j('#mv_start_hr_'+mvd_id).val(), $j('#mv_end_hr_'+mvd_id).val() );
 243+ });
 244+ //read the ntp time from the fields
 245+ var start_sec = ntp2seconds( $j('#mv_start_hr_'+mvd_id).val() );
 246+ var end_sec = ntp2seconds( $j('#mv_end_hr_'+mvd_id).val() );
 247+ js_log('start_sec:'+start_sec + ' end: ' + end_sec);
 248+ if(start_sec > end_sec){
 249+ js_log('start > end : ' + start_sec + ' > ' + end_sec);
 250+ //update end time to start_time + 1 second
 251+ end_sec = parseInt(start_sec+1);
 252+ $j('#mv_end_hr_'+mvd_id).val(seconds2ntp(end_sec));
 253+ }
 254+
 255+ var duration = end_sec - start_sec;
 256+ //set the track duration as 2 min or 2*duration (whatever is longer)
 257+ var track_dur = (duration*2<120)?120:duration*2;
 258+
 259+ //set the base offset
 260+ if(start_sec==0){
 261+ var base_offset = 0
 262+ }else{
 263+ //make sure we won't go into negative with a 1/4 track offset
 264+ //alert('wtf:s:' + start_sec + '-' + (track_dur*.25) );
 265+ var base_offset= start_sec-(track_dur*.25);
 266+ //alert('wtf: '+ base_offset);
 267+ if(base_offset < 0)
 268+ base_offset=0;
 269+ //js_log('set base offset: '+track_dur +'* .25 = '+ parseInt(base_offset) );
 270+ }
 271+ js_log('BASE OFFSET: '+ base_offset);
 272+ //set the base offset / track_dur interface vars:
 273+ $j('#track_time_start_'+mvd_id).html( seconds2ntp(base_offset) );
 274+ $j('#track_time_end_'+mvd_id).html( seconds2ntp( base_offset+track_dur ));
 275+
 276+ //set up start /end slider values:
 277+ var slider_start = (start_sec - base_offset) / track_dur;
 278+ var slider_end = (end_sec - base_offset) / track_dur;
 279+ var slider_dur = slider_end -slider_start;
 280+ //clear out the existing effect if present
 281+ //if(mv_sliders[mvd_id])mv_sliders[mvd_id].dispose();
 282+
 283+ //update the slider values (left right)
 284+ track_width = $j('#container_track_'+mvd_id).width();
 285+
 286+ js_log('start: '+ slider_start + ' =' + (slider_start*track_width) +
 287+ ' se:'+ slider_end + ' =' + (slider_end*track_width) +
 288+ ' width would be: :' + Math.round((slider_end*track_width)-(slider_start*track_width)));
 289+
 290+ //if re-size width less than width of image bump it up:
 291+ var resize_width = Math.round((slider_end*track_width)-(slider_start*track_width));
 292+ if(resize_width<17)resize_width=17;
 293+
 294+ $j('#resize_'+mvd_id).css({
 295+ left:Math.round(slider_start*track_width)+'px',
 296+ width: resize_width+'px'
 297+ });
 298+ js_log("track width: " + $j('#container_track_'+mvd_id).width() +
 299+ ' slider_width: ' + $j('#resize_'+mvd_id).width());
 300+ //add an additional flag
 301+ var cur_handle = '';
 302+ $j('.ui-resizable-handle').mousedown( function(){
 303+ js_log('hid: ' + this.id);
 304+ cur_handle = this.id;
 305+ });
 306+ org_start = org_end ='';
 307+ //jQuery slider:
 308+ $j('#resize_'+mvd_id).resizable({
 309+ minWidth: 10,
 310+ maxWidth: $j('#resize_'+mvd_id).width(),
 311+ minHeight: 20,
 312+ maxHeight: 20,
 313+ handles: {
 314+ e: '.ui-resizable-e',
 315+ w: '.ui-resizable-w'
 316+ },
 317+ start: function(e,ui) {
 318+ mv_lock_vid_updates=true;
 319+ org_start = $j('#mv_start_hr_'+mvd_id).val();
 320+ org_end = $j('#mv_end_hr_'+mvd_id).val();
 321+ //js_log("org maxWidth: " + ui.options.maxWidth);
 322+ right_x = ( $j('#resize_'+mvd_id).position().left+
 323+ $j('#resize_'+mvd_id).width()
 324+ );
 325+ /*js_log('left:' + $j('#resize_'+mvd_id).position().left + ' width: '+
 326+ * $j('#resize_'+mvd_id).width() + ' right_x:'+ right_x);
 327+ */
 328+ if(cur_handle.indexOf('handle1')!=-1){
 329+ ui.options.maxWidth= right_x;
 330+ }else{
 331+ ui.options.maxWidth= (
 332+ $j('#container_track_'+mvd_id).width() -
 333+ $j('#resize_'+mvd_id).position().left
 334+ );
 335+ }
 336+ js_log("updated maxWidth: " + ui.options.maxWidth);
 337+ //js_log('grabbed: ' + e.explicitOriginalTarget.id);
 338+ //console.log('start ', ui);
 339+ },
 340+ stop: function(e,ui) {
 341+ mv_lock_vid_updates=false;
 342+ //console.log('stop ', ui);
 343+ //return the non-adjusted to its original value:
 344+ if(cur_handle.indexOf('handle1')!=-1){
 345+ $j('#mv_end_hr_'+mvd_id).val(org_end);
 346+ }else{
 347+ $j('#mv_start_hr_'+mvd_id).val(org_start);
 348+ }
 349+ //update the clip
 350+ do_video_time_update($j('#mv_start_hr_'+mvd_id).val(), $j('#mv_end_hr_'+mvd_id).val() );
 351+ },
 352+ resize: function(e,ui) {
 353+ base_offset = ntp2seconds( $j('#track_time_start_'+mvd_id).html());
 354+ mv_slider_update_stats(mvd_id);
 355+ }
 356+ });
 357+ $j('#dragSpan_'+mvd_id).css('cursor','move');
 358+ $j('#resize_'+mvd_id).draggable({
 359+ axis:'x',
 360+ containment:'parent',
 361+ handle: "#dragSpan_"+mvd_id,
 362+ drag:function(e, ui){
 363+ mv_slider_update_stats(mvd_id, true);
 364+ },
 365+ stop:function(e,ui){
 366+ $j('#resize_'+mvd_id).css('top', 0);
 367+ do_video_time_update($j('#mv_start_hr_'+mvd_id).val(), $j('#mv_end_hr_'+mvd_id).val() );
 368+ }
 369+ });
 370+ //store the necessary values in the slider obj
 371+ //mv_sliders[mvd_id]['base_offset']=base_offset;
 372+ //mv_sliders[mvd_id]['track_dur']=track_dur;
 373+ function mv_slider_update_stats(mvd_id, drag){
 374+ var update_start=update_end=false;
 375+ //only update the side we are dragging:
 376+ if(cur_handle.indexOf('handle1')!=-1){
 377+ update_start=true;
 378+ }else{
 379+ update_end=true;
 380+ }
 381+ if(drag)update_end=update_start=true;
 382+ if(update_end){
 383+ var end_time = base_offset + (track_dur *(($j('#resize_'+mvd_id).position().left +
 384+ $j('#resize_'+mvd_id).width()) /
 385+ $j('#container_track_'+mvd_id).width()));
 386+ if(end_time>(track_dur+base_offset))end_time=track_dur+base_offset;
 387+ $j('#mv_end_hr_'+mvd_id).val( seconds2ntp(end_time) );
 388+ }
 389+ if(update_start)
 390+ $j('#mv_start_hr_'+mvd_id).val( seconds2ntp(base_offset + (track_dur *($j('#resize_'+mvd_id).position().left /
 391+ $j('#container_track_'+mvd_id).width()) ) ));
 392+ }
 393+}
 394+function do_video_time_update(start_time, end_time, mvd_id) {
 395+ js_log('do_video_time_update: ' +start_time + end_time);
 396+ if(mv_lock_vid_updates==false){
 397+ //update the vid title:
 398+ $j('#mv_videoPlayerTime').html( start_time + ' to ' + end_time );
 399+ var ebvid = $j('#embed_vid').get(0);
 400+ if(ebvid.isPaused())
 401+ ebvid.stop();
 402+ $j('#embed_vid').get(0).updateVideoTime(start_time, end_time);
 403+ js_log('update thumb: '+ start_time);
 404+ ebvid.updateThumbTimeNTP( start_time );
 405+ }
146406 }
\ No newline at end of file
Index: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/slider_handle_red.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/slider_handle_red.gif
___________________________________________________________________
Added: svn:mime-type
147407 + application/octet-stream
Index: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/slider_handle_green.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/slider_handle_green.gif
___________________________________________________________________
Added: svn:mime-type
148408 + application/octet-stream
Index: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/slider_handle.gif
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/images/slider_handle.gif
___________________________________________________________________
Added: svn:executable
149409 + *
Added: svn:mime-type
150410 + application/octet-stream
Index: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/styles.css
@@ -311,7 +311,7 @@
312312 width: 183px;
313313 overflow: hidden;
314314 position: absolute;
315 - z-index: 2;
 315+ z-index: 100;
316316 /* margin: 0 0 0 230px;*/
317317 }
318318 *:first-child+html .videoOptions {margin-top: -20px;}
@@ -484,23 +484,30 @@
485485 #resizable css:
486486 .ui-resizable-handle { position: absolute; background: #ddd; display: none; }
487487 .ui-resizable .ui-resizable-handle { display: block }
488 -.ui-resizable-e { z-index:5; position:absolute; cursor: e-resize; width: 15px;height:19px; top: 0px; bottom: 0px; right: 0px;}
489 -.ui-resizable-w { z-index:5; position:absolute; cursor: w-resize; width: 15px;height:19px; top: 0px; bottom: 0px; left: 0px;}
 488+.ui-resizable-e { z-index:5; position:absolute; cursor: e-resize;
 489+ width: 15px;height:19px; top: 0px; bottom: 0px; right: 0px;
 490+ background: transparent url(images/slider_handle_red.gif) no-repeat scroll 0% 0%;
 491+}
 492+.ui-resizable-w { z-index:5; position:absolute; cursor: w-resize;
 493+ width: 15px;height:19px; top: 0px; bottom: 0px; left: 0px;
 494+ background: transparent url(images/slider_handle_green.gif) no-repeat scroll 0% 0%;
 495+}
490496 .ui-dragSpan {filter: alpha(opacity=70); -moz-opacity: .7; background-color:#AAF; position:absolute; left: 10px; right:10px;height:19px; }
491497
492498 #remote search css:
 499+
493500 ul.rsd_cp_tabs {
494501 border-bottom:1px solid #CCCCCC;
495502 display:inline;
496503 list-style-image:none;
497504 list-style-position:outside;
498505 list-style-type:none;
499 - z-index:2;
 506+ z-index:2;
500507 }
501508 ul.rsd_cp_tabs li.rsd_selected {
502509 background:#FFFFFF none repeat scroll 0 0;
503510 border-bottom:0;
504 - padding-bottom:1px;
 511+ padding-bottom:7px;
505512 padding-top:12px;
506513 top:40px;
507514 }
@@ -510,7 +517,7 @@
511518 padding:10px 0 0;
512519 background:#F7F7F7 url(remote_search/tab-bg.png) repeat-x scroll left bottom;
513520 border:1px solid #777;
514 - padding-bottom:0;
 521+ padding-bottom:6px;
515522 margin-left:7px;
516523 cursor:pointer;
517524 }
@@ -575,3 +582,18 @@
576583 .mv_scale_button_selected{
577584 background-image: url('images/stock-tool-button-scale_over.png');
578585 }
 586+.mv_loading_img{
 587+ width:32px;
 588+ height:32px;
 589+ display:inline;
 590+ padding:0px;
 591+ position:absolute;
 592+ background-image: url('images/loading_ani.gif');
 593+}
 594+.mv_loading_bar_img{
 595+ width:220px;
 596+ height:19px;
 597+ display:inline;
 598+ position:absolute;
 599+ background-image: url('images/loading_bar_ani.gif');
 600+}
\ No newline at end of file
Index: trunk/extensions/MetavidWiki/skins/mv_embed/mv_embed.js
@@ -136,8 +136,7 @@
137137 function mv_get_loading_img( style , class ){
138138 var style_txt = (style)?style:'';
139139 var class_attr = (class)?'class="'+class+'"':'class="mv_loading_img"';
140 - return '<img '+class_attr+' style="' + style +'" src="'+
141 - mv_embed_path + 'skins/' + mv_skin_name + '/images/loading_ani.gif">';
 140+ return '<div '+class_attr+' style="' + style +'"></div>';
142141 }
143142
144143 /* the base video control JSON object with default attributes
@@ -213,7 +212,8 @@
214213 pc:null, //used to store pointer to parent clip (when in playlist mode)
215214 load_libs:function( callback , target_id){
216215 //js_log('f:load_libs: '+callback);
217 - if(callback)this.load_callback = callback;
 216+ if( callback )this.load_callback = callback;
 217+
218218 //if libs are already loaded jump directly to the callback
219219 if(this.libs_loaded){
220220 mvEmbed.init( target_id );
@@ -272,7 +272,7 @@
273273 //js_log('f:check_init_done '+ is_ready + ' ' + cur_vid.load_error + ' rtp: '+ cur_vid.ready_to_play);
274274 if( !is_ready ){
275275 //js_log('some ' + global_player_list + ' not ready');
276 - setTimeout( 'mvEmbed.check_init_done()', 250 );
 276+ setTimeout( 'mvEmbed.check_init_done()', 50 );
277277 }else{
278278 //call the callback:
279279 if(typeof this.load_callback == 'function')
@@ -993,10 +993,10 @@
994994 /*
995995 * this function allows for targeted rewriting
996996 */
997 -function rewrite_by_id( vid_id ){
 997+function rewrite_by_id( vid_id, ready_callback ){
998998 js_log('f:rewrite_by_id: ' + vid_id);
999999 //force a recheck of the dom for playlist or video element:
1000 - mvEmbed.load_libs( vid_id );
 1000+ mvEmbed.load_libs( ready_callback, vid_id );
10011001 }
10021002
10031003
@@ -1033,7 +1033,7 @@
10341034 var loadPlaylistLib=false;
10351035 //set up the jQuery selector:
10361036 var j_selector = 'video,playlist';
1037 - if( force_id!=null )
 1037+ if( force_id !=null )
10381038 var j_selector = '#'+force_id;
10391039
10401040 //process selected elements:
@@ -1271,7 +1271,7 @@
12721272 * @param {String} end_time in NTP format
12731273 */
12741274 updateSrcTime:function (start_ntp, end_ntp){
1275 - js_log("f:updateSrcTime: "+ start_ntp+'/'+ end_ntp + ' from org: ' + this.start_ntp+ '/'+this.end_ntp);
 1275+ //js_log("f:updateSrcTime: "+ start_ntp+'/'+ end_ntp + ' from org: ' + this.start_ntp+ '/'+this.end_ntp);
12761276 //js_log("pre uri:" + this.src);
12771277 //if we have time we can use:
12781278 if( this.supports_url_time_encoding ){
@@ -1386,7 +1386,7 @@
13871387 this.start_offset = 0;
13881388 this.start_ntp = seconds2ntp(this.start_offset);
13891389 }
1390 - js_log('f:parseURLDuration() for:' + this.src + ' d:' + this.duration);
 1390+ //js_log('f:parseURLDuration() for:' + this.src + ' d:' + this.duration);
13911391 },
13921392 /** Attempts to detect the type of a media file based on the URI.
13931393 @param {String} uri URI of the media file.
@@ -2266,7 +2266,11 @@
22672267 'width:' + options.width + 'px">' +
22682268 '</div>';
22692269 },
 2270+ updateThumbTimeNTP:function( time){
 2271+ this.updateThumbTime( ntp2seconds(time) - parseInt(this.start_offset) );
 2272+ },
22702273 updateThumbTime:function( float_sec ){
 2274+ js_log('updateThumbTime:'+float_sec);
22712275 var _this = this;
22722276 if( typeof this.org_thum_src=='undefined' ){
22732277 this.org_thum_src = this.media_element.getThumbnailURL();
@@ -2285,6 +2289,7 @@
22862290 },
22872291 //updates the thumbnail if the thumbnail is being displayed
22882292 updateThumbnail : function(src, quick_switch){
 2293+ js_log('update thumb: ' + src);
22892294 //make sure we don't go to the same url if we are not already updating:
22902295 if( !this.thumbnail_updating && $j('#img_thumb_'+this.id).attr('src')== src )
22912296 return false;
@@ -2427,7 +2432,7 @@
24282433 //@@todo support position config
24292434 var loc = $j(this).position();
24302435 if($j('#metaBox_'+this.id).length==0){
2431 - $j(this).after('<div style="position:absolute;z-index:' + ($j(this).css("zindex") + 1) + ';'+
 2436+ $j(this).after('<div style="position:absolute;z-index:10;'+
24322437 'top:' + (loc.top) + 'px;' +
24332438 'left:' + (parseInt( loc.left ) + parseInt(this.width) + 10 )+'px;' +
24342439 'height:'+ parseInt( this.height )+'px;width:400px;' +
@@ -2673,15 +2678,6 @@
26742679 $j('#'+this_id).get(0).play();
26752680 });
26762681 },
2677 - /*play_or_pause: function(){
2678 - js_log('embed:f:play_or_pause');
2679 - //check state and set play or pause
2680 - if(this.paused){
2681 - this.play();
2682 - }else{
2683 - this.pause();
2684 - }
2685 - },*/
26862682 /*
26872683 * base embed stop (can be overwritten by the plugin)
26882684 */
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libEmbedObj/mv_flashEmbed.js
@@ -1643,14 +1643,16 @@
16441644 pause : function()
16451645 {
16461646 this.getFLA();
1647 - this.parent_pause();
1648 - if(this.fla){
1649 - js_log("Flash:Pause: " + this.fla.isPaused() );
1650 - if( this.fla['pause'] ){
1651 - if( ! this.fla.isPaused() ){
1652 - js_log('calling plugin pause');
1653 - this.fla.pause();
1654 - }
 1647+ if(!this.thumbnail_disp){
 1648+ this.parent_pause();
 1649+ if(this.fla){
 1650+ js_log("Flash:Pause: " + this.fla.isPaused() );
 1651+ if( this.fla['pause'] ){
 1652+ if( ! this.fla.isPaused() ){
 1653+ js_log('calling plugin pause');
 1654+ this.fla.pause();
 1655+ }
 1656+ }
16551657 }
16561658 }
16571659 },
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libRemoteMediaSearch/mv_remote_media_search.js
@@ -23,12 +23,15 @@
2424
2525 'caret_pos':null,
2626 'local_wiki_api_url':null,
 27+ 'target_title':null,
2728
2829 'target_textbox':null,
2930 'instance_name': null, //a globally accessible callback instance name
3031 'default_query':'', //default search query
3132 //specific to sequence profile
32 - 'p_seq':null
 33+ 'p_seq':null,
 34+ 'cFileNS':'Image' //what is the cannonical namespace for images
 35+ //@@todo (should be able to get that from the api in the future)
3336 }
3437 var remoteSearchDriver = function(initObj){
3538 return this.init( initObj );
@@ -69,28 +72,33 @@
7073 'wiki_commons':{
7174 'enabled':1,
7275 'checked':1,
73 - 'd' :1,
 76+ 'd' :0,
7477 'title' :'Wikipedia Commons',
7578 'desc' : 'Wikimedia Commons is a media file repository making available public domain '+
7679 'and freely-licensed educational media content (images, sound and video clips) to all.',
7780 'homepage': 'http://commons.wikimedia.org/wiki/Main_Page',
7881 'api_url':'http://commons.wikimedia.org/w/api.php',
79 - 'lib' :'mediaWiki',
80 - 'search_title':false, //disable title search
 82+ 'lib' :'mediaWiki',
8183 'local' :false,
82 - 'resource_prefix': 'WC_' //prefix on imported resources (not applicable if the repository is local)
 84+ 'resource_prefix': 'WC_', //prefix on imported resources (not applicable if the repository is local)
 85+
 86+ //specific to wiki comons config:
 87+ 'search_title':false //disable title search
8388 },
8489 'metavid':{
8590 'enabled':1,
8691 'checked':1,
87 - 'd' :0,
 92+ 'd' :1,
8893 'title' :'Metavid.org',
8994 'homepage':'http://metavid.org',
9095 'desc' : 'Metavid hosts thousands of hours of US house and senate floor proceedings',
91 - 'api_url':'http://localhost/wiki/index.php?title=Special:MvExportSearch',
 96+ 'api_url':'http://metavid.org/w/index.php?title=Special:MvExportSearch',
9297 'lib' : 'metavid',
93 - 'local' :false,
94 - 'resource_prefix': 'MV_' //what prefix to use on imported resources
 98+ 'local' :false, //if local set to true we can use local
 99+ 'resource_prefix': 'MV_', //what prefix to use on imported resources
 100+
 101+ 'local_copy': true //if local_copy set to true if we should download assets
 102+ //(else just remote embed copy)
95103 },
96104 'archive_org':{
97105 'enabled':0,
@@ -141,12 +149,12 @@
142150 getTexboxSelection:function(){
143151 if(this.caret_pos.s && this.caret_pos.e &&
144152 (this.caret_pos.s != this.caret_pos.e))
145 - this.default_query = caret_pos.text.substring(this.caret_pos.s, this.caret_pos.e).replace(/ /g, '\xa0') || '\xa0'
 153+ this.default_query = this.caret_pos.text.substring(this.caret_pos.s, this.caret_pos.e).replace(/ /g, '\xa0') || '\xa0'
146154 },
147155 //sets up the initial html interface
148156 init_interface_html:function(){
149157 var out = '<div class="rsd_control_container" style="width:100%">' +
150 - '<table style="width:100%">' +
 158+ '<table style="width:100%;background-color:transparent;">' +
151159 '<tr>'+
152160 '<td style="width:110px">'+
153161 '<h3> Media Search </h3>'+
@@ -197,11 +205,8 @@
198206 var _this = this;
199207 js_log("add_interface_bindings:");
200208 //setup for this.main_search_options:
201 - $j('#mso_cancel').click(function(){
202 - $j('#modalbox').fadeOut("normal",function(){
203 - $j(this).remove();
204 - $j('#mv_overlay').remove();
205 - });
 209+ $j('#mso_cancel').click(function(){
 210+ _this.closeAll();
206211 });
207212
208213 $j('#mso_selprovider,#mso_selprovider_close').click(function(){
@@ -229,8 +234,8 @@
230235 var _this = this;
231236 //set loading div:
232237 $j('#rsd_results').append('<div style="position:absolute;top:0px;left:0px;height:100%;width:100%;'+
233 - 'background-color:#FFF;margin:30px">' +
234 - mv_get_loading_img('padding:30px') +
 238+ 'background-color:#FFF;">' +
 239+ mv_get_loading_img('top:30px;left:30px') +
235240 '</div>');
236241 //get a remote search object for each search provider and run the search
237242 for(var cp_id in this.content_providers){
@@ -272,7 +277,7 @@
273278 drawTabs: function(){
274279 var _this = this;
275280 //add the tabs to the rsd_results container:
276 - var o= '<ul class="rsd_cp_tabs" style="margin-bottom:2px;">'; //no idea why margin-bottom does not work in the css file
 281+ var o= '<ul class="rsd_cp_tabs" style="margin: 1em 0 0 1em;position:absolute;top:42px;padding:0;">'; //no idea why margin does not overwrite from the css
277282 o+='<li id="rsd_tab_combined" ><img src="' + mv_embed_path + 'skins/'+mv_skin_name+ '/remote_search/combined_tab.png"></li>';
278283 for(var cp_id in this.content_providers){
279284 var cp = this.content_providers[cp_id];
@@ -308,7 +313,7 @@
309314 return false;
310315 },
311316 drawOutputResults: function(){
312 - js_log('f:drawOutputResults');
 317+ js_log('f:drawOutputResults');
313318 var _this = this;
314319 var o='';
315320 $j('#rsd_results').empty();
@@ -344,29 +349,42 @@
345350 this.addResultBindings();
346351 },
347352 addResultBindings:function(){
348 - var _this = this;
 353+ var _this = this;
349354 $j('.mv_clip_box_result').hover(function(){
350355 $j(this).addClass('mv_clip_box_result_over');
351356 },function(){
352357 $j(this).removeClass('mv_clip_box_result_over');
353 - });
 358+ });
354359 //resource click action: (bring up the resource editor)
355360 $j('.rsd_res_item').click(function(){
356361 //get the resource obj:
357 - rObj = _this.getResourceFromId( this.id );
 362+ var rObj = _this.getResourceFromId( this.id );
358363 //remove any existing resource edit interface:
359 - $j('#rsd_resource_edit').remove();
 364+ $j('#rsd_resource_edit').remove();
 365+
 366+ //set the media type:
 367+ if(rObj.mime.indexOf('image')!=-1){
 368+ //set width to default image_edit_width
 369+ var maxWidth = _this.image_edit_width;
 370+ var mediaType = 'image';
 371+ }else{
 372+ //set to default video size:
 373+ var maxWidth = _this.video_edit_width;
 374+ var mediaType = 'video';
 375+ }
 376+ //so that transcripts show ontop
 377+ var overflow_style = ( mediaType =='video' )?'':'overflow:auto;';
360378 //append to the top level of model window:
361379 $j( '#'+ _this.target_id ).append('<div id="rsd_resource_edit" '+
362380 'style="position:absolute;top:0px;left:0px;width:100%;height:100%;background-color:#FFF;">' +
363381 '<h3 style="margin:4px;">' + getMsg('rsd_resource_edit') + ' ' + rObj.title +'</h3>'+
364 - '<div id="clip_edit_disp" style="position:absolute;top:30px;left:0px;bottom:0px;'+
365 - 'width:' + (_this.image_edit_width+30) + 'px;overflow:auto;" >' +
 382+ '<div id="clip_edit_disp" style="position:absolute;'+overflow_style+'top:30px;left:0px;bottom:0px;'+
 383+ 'width:' + (maxWidth + 30) + 'px;" >' +
366384 mv_get_loading_img('position:absolute;top:30px;left:30px', 'mv_img_loader') +
367385 '</div>'+
368386 '<div id="clip_edit_ctrl" style="position:absolute;border:solid thin blue;'+
369 - 'top:30px;left:' + (_this.image_edit_width+30) +'px;bottom:0px;right:0px;">'+
370 - mv_get_loading_img('padding:30px') +
 387+ 'top:30px;left:' + (maxWidth+30) +'px;bottom:0px;right:0px;">'+
 388+ mv_get_loading_img() +
371389 '</div>'+
372390 '</div>');
373391 $j('#rsd_resource_edit').css('opacity',0);
@@ -380,15 +398,7 @@
381399 'left':'20%',
382400 'opacity':0
383401 });
384 - if(rObj.mime.indexOf('image')!=-1){
385 - //set width to default image_edit_width
386 - var maxWidth = _this.image_edit_width;
387 - var mediaType = 'image';
388 - }else{
389 - //set to default video size:
390 - var maxWidth = _this.video_edit_width;
391 - var mediaType = 'video';
392 - }
 402+
393403 //assume we keep aspect ratio for the thumbnail that we clicked:
394404 var tRatio = $j(this).height() / $j(this).width();
395405 if( ! tRatio )
@@ -436,7 +446,7 @@
437447 js_log('using req size: ' + imObj.width + 'x' + imObj.height);
438448 $j('#'+target_img_id).animate( {'width':imObj.width+'px', 'height' : imObj.height + 'px'});
439449 }
440 - //don't swap it in untill its loaded:
 450+ //don't swap it in until its loaded:
441451 var img = new Image();
442452 // load the image image:
443453 $j(img).load(function () {
@@ -457,23 +467,32 @@
458468 'clip_disp_ct':'clip_edit_disp',
459469 'control_ct': 'clip_edit_ctrl',
460470 'media_type': mediaType,
461 - 'p_rsdObj': _this
462 -
 471+ 'p_rsdObj': _this
463472 };
464473 var loadLibs = {'mvClipEdit':'libSequencer/mv_clipedit.js'};
465474 if( mediaType == 'image'){
466475 //load the croping library:
467476 loadLibs['$j.Jcrop']='jquery/plugins/Jcrop/js/jquery.Jcrop.js';
468477 //@@todo integrate css calls into mvJsLoader or move jcrop css
469 - loadExternalCss( mv_embed_path + 'jquery/plugins/Jcrop/css/jquery.Jcrop.css');
470 - }
471 - //load the library:
472 - mvJsLoader.doLoad( loadLibs,
473 - function(){
474 - js_log('done loading libs: mvClipEdit + Jcrop');
 478+ loadExternalCss( mv_embed_path + 'jquery/plugins/Jcrop/css/jquery.Jcrop.css');
 479+ //display the mvClipEdit obj once we are done loading:
 480+ mvJsLoader.doLoad( loadLibs,function(){
475481 //run the image clip tools
476482 _this.cEdit = new mvClipEdit( mvClipInit );
477 - });
 483+ });
 484+ }
 485+ if( mediaType == 'video'){
 486+ $j('#clip_edit_disp').append('<video id="embed_vid" roe="'+ rObj['roe_url']+'"></video>');
 487+ //rewrite by id hanldes getting any libs we are missing:
 488+ rewrite_by_id('embed_vid',function(){
 489+ //add the resizable to the doLoad request:
 490+ loadLibs['$j.ui.resizable'] = 'jquery/jquery.ui-1.5.2/ui/minified/ui.resizable.min.js',
 491+ mvJsLoader.doLoad( loadLibs,function(){
 492+ //run the image clip tools
 493+ _this.cEdit = new mvClipEdit( mvClipInit );
 494+ });
 495+ });
 496+ }
478497 },
479498 checkImportResource:function( rObj, cir_callback){
480499 //check if the resource is "locally accesible"
@@ -485,23 +504,25 @@
486505 var cp = rObj.pSobj.cp;
487506
488507 //first check if the resource is not already on this wiki:
489 - //@@todo get the File Msg
490 - var cFileNS= 'Image'
491 - var target_resource_title = cp.resource_prefix + rObj.titleKey.substr( cFileNS.length + 1 );
492 - reqObj={'action':'query', titles: cFileNS + ':' + target_resource_title + '|' + rObj.titleKey};
 508+ //@@todo get the File/Image namespace name:
 509+ rObj.target_resource_title = rObj.titleKey.replace(/File:|Image:/,'');
 510+
 511+ reqObj={'action':'query', titles: _this.cFileNS + ':' + rObj.target_resource_title + '|' + rObj.titleKey};
493512 do_api_req( reqObj, this.local_wiki_api_url, function(data){
494513 var found_title = false;
495514 for(var i in data.query.pages){
496 - if(i>0)
497 - found_title=true;
 515+ if( i != '-1' && i != '-2' ){
 516+ js_log('found title: ' + i + ':' + data.query.pages[i]['title']);
 517+ found_title=data.query.pages[i]['title'];
 518+ }
498519 }
499520 if( found_title ){
 521+ js_log("checkImportResource:found title:" + found_title);
500522 //resource is already present (or resource with same name is already present)
501 - js_log("checkImportResource:resource is already present: {"+
502 - cp.resource_prefix + '}' + rObj.titleKey);
 523+ rObj.target_resource_title = found_title.replace(/File:|Image:/,'');
503524 cir_callback( rObj );
504525 }else{
505 - js_log("resource not present: update:"+ cFileNS + ':' + target_resource_title);
 526+ js_log("resource not present: update:"+ _this.cFileNS + ':' + rObj.target_resource_title);
506527
507528 //setup the resource description from resource description:
508529 var base_resource_desc = '{{Information '+"\n"+
@@ -538,7 +559,7 @@
539560 '<div id="rds_edit_import_container" style="position:absolute;left:50%;' +
540561 'bottom:0px;top:30px;right:0px;overflow:auto;">'+
541562 '<strong>Local Resource Title:</strong><br>'+
542 - '<input type="text" size="30" value="' + target_resource_title + '" readonly="true"><br>'+
 563+ '<input type="text" size="30" value="' + rObj.target_resource_title + '" readonly="true"><br>'+
543564 '<strong>Edit WikiText Resource Description:</strong>(will be replaced by forms soon)'+
544565 '<textarea id="rsd_import_ta" id="mv_img_desc" rows="8" cols="50">'+
545566 base_resource_desc +
@@ -552,7 +573,7 @@
553574 //output the rendered and non-renderd version of description for easy swiching:
554575 '</div>');
555576 //load the preview text:
556 - _this.getParsedWikiText( base_resource_desc, cFileNS +':'+ target_resource_title, function( o ){
 577+ _this.getParsedWikiText( base_resource_desc, _this.cFileNS +':'+ rObj.target_resource_title, function( o ){
557578 $j('#rsd_import_desc').html(o);
558579 });
559580 //add bidings:
@@ -561,14 +582,14 @@
562583 mv_get_loading_img()
563584 );
564585 //load the preview text:
565 - _this.getParsedWikiText( $j('#rsd_import_ta').val(), cFileNS +':'+ target_resource_title, function( o ){
 586+ _this.getParsedWikiText( $j('#rsd_import_ta').val(), _this.cFileNS +':'+ rObj.target_resource_title, function( o ){
566587 js_log('got updated preivew: '+ o);
567588 $j('#rsd_import_desc').html(o);
568589 });
569590 });
570591 $j('#rsd_import_doimport').click(function(){
571592 //replace the parent with progress bar:
572 - $j('rsd_resource_import').html(
 593+ $j('#rsd_resource_import').html(
573594 '<h3>Importing asset</h3>'+
574595 mv_get_loading_img()
575596 );
@@ -592,41 +613,46 @@
593614 var postVars = {
594615 'wpSourceType' :'web',
595616 'wpUploadFileURL' : rObj.url,
596 - 'wpDestFile' : target_resource_title,
 617+ 'wpDestFile' : rObj.target_resource_title,
597618 'wpUploadDescription':$j('#rsd_import_ta').val(),
598619 'wpWatchthis' : $j('#wpWatchthis').val(),
599620 'wpUpload' : 'Upload file'
600621 }
601622 //set to uploading:
602623 $j('#rsd_resource_import').append('<div id="rsd_import_progress"'+
603 - 'style="position:abolute;top:0px;"'+
 624+ 'style="position:absolute;top:0px;'+
604625 'left:0px;width:100%;height:100%;'+
605 - 'z-index:4;background:#555;">'+
606 - '<div style="left:30%;right:30%">Importing Asset' +
607 - mv_get_loading_img() +
608 - '</dvi>'+
 626+ 'z-index:5;background:#FFF;overflow:auto;">'+
 627+ '<div style="position:absolute;left:30%;right:30%"><h3>Importing Asset</h3><br>' +
 628+ mv_get_loading_img('','mv_loading_bar_img') +
 629+ '</div>'+
609630 '</div>'
610 - );
 631+ );
 632+ $j.post(wgArticlePath.replace(/\$1/,'Special:Upload'),
 633+ postVars,
 634+ function(data){
 635+ //@@todo this will be replaced once we add upload image support to the api.
611636
612 - $j.ajax({
613 - type:"POST",
614 - url: wgArticlePath.replace(/\$1/,'Special:Upload'),
615 - data: postVars,
616 - sucess:function(data, textStatus){
617 - js_log('success in uploading: '+target_resource_title +' textStatus:'+ textStatus);
618 - //cir_callback with pointer to local resource:
619 - cObj.target_resource_title = target_resource_title;
620 - cir_callback( rObj )
621 - },
622 - error:function(XMLHttpRequest, textStatus, errorThrown){
623 - js_log('error httpReq:' + ' status:' + XMLHttpRequest.status)
624 - },
625 - complete:function(XMLHttpRequest, textStatus){
626 - js_log('completed request:' + textStatus + ' status:'+ XMLHttpRequest.status);
627 - rObj.target_resource_title = target_resource_title;
628 - cir_callback( rObj )
 637+ //very basic test to see if we got passed to the image page:
 638+ //@@todo more normalization stuff
 639+ var sstring ='var wgPageName = "' + _this.cFileNS + ':' + rObj.target_resource_title.replace(/ /g,'_') +'"';
 640+ if(data.indexOf( sstring ) !=-1){
 641+ js_log('found: ' + sstring);
 642+ $j('#rsd_resource_import').remove();
 643+ cir_callback( rObj );
 644+ }else{
 645+ js_log("Error or warning: (did not find: \"" + sstring + ' in output' );
 646+ $j('#rsd_resource_import').html(
 647+ '<b>error importing asset (we should have better error handling soon)</b><br>'+
 648+ '<a href="#" id="rsd_import_error" >Cancel import</a>'
 649+ );
 650+ $j('#rsd_import_error').click(function(){
 651+ $j('#rsd_resource_import').remove();
 652+ });
 653+ }
 654+
629655 }
630 - });
 656+ );
631657 }
632658 }
633659 });
@@ -646,16 +672,29 @@
647673 this.checkImportResource( rObj, function(){
648674 //put another window ontop:
649675 $j( '#'+ _this.target_id ).append('<div id="rsd_resource_preview" '+
650 - 'style="position:absolute;top:0px;left:0px;width:100%;height:100%;background-color:#FFF;">' +
651 - '<h3>preview resource: ' + rObj.title + '</h3>'+
652 - '<div id="rsd_preview_display" style="position:absolute;width:100%;bottom:30px;>'+
653 - mv_get_loading_img('position:absolute;top:30px;left:30px', 'mv_img_loader') +
654 - '</div>'+
655 - '<div id="rsd_preview_control" style="position:absolute;width:60%;left:40%;bottom:0px;height:30px;">'+
656 - '<input type="button" id="preview_do_insert" value="Do Insert">'+
657 - '<a href="#" id="preview_close">Close Preview</a>'+
658 - '</div>'+
 676+ 'style="position:absolute;z-index:4;top:0px;left:0px;width:100%;height:100%;background-color:#FFF;">' +
 677+ '<h3>preview insert of resource: ' + rObj.title + '</h3>'+
 678+ '<div id="rsd_preview_display" style="position:absolute;width:100%;top:30px;bottom:30px;overflow:auto;">' +
 679+ mv_get_loading_img('top:30px;left:30px') +
 680+ '</div>' +
 681+ '<div id="rsd_preview_control" style="position:absolute;width:60%;left:40%;bottom:0px;height:30px;">' +
 682+ '<input type="button" id="preview_do_insert" value="Do Insert">' +
 683+ '<a href="#" id="preview_close">Do More Modification</a>' +
 684+ '</div>' +
659685 '</div>');
 686+ //do a page preview given the original page text, insert point
 687+ js_log('insert at: ' + _this.caret_pos.s + "\n" + rObj.pSobj.getEmbedWikiText( rObj ) );
 688+
 689+ //update the preview_wtext
 690+ _this.preview_wtext = _this.caret_pos.text.substring(0, _this.caret_pos.s) +
 691+ rObj.pSobj.getEmbedWikiText( rObj ) +
 692+ _this.caret_pos.text.substring( _this.caret_pos.s );
 693+
 694+ _this.getParsedWikiText(_this.preview_wtext, _this.target_title,
 695+ function(phtml){
 696+ $j('#rsd_preview_display').html( phtml );
 697+ }
 698+ );
660699 //add bindings:
661700 $j('#preview_do_insert').click(function(){
662701 _this.insertResource( rObj );
@@ -675,8 +714,15 @@
676715 });
677716 },
678717 insertResource:function( rObj){
679 -
 718+ $j('#'+this.target_textbox).val( this.preview_wtext );
 719+ this.closeAll();
680720 },
 721+ closeAll:function( rObj ){
 722+ $j('#modalbox').fadeOut("normal",function(){
 723+ $j(this).remove();
 724+ $j('#mv_overlay').remove();
 725+ });
 726+ },
681727 setResultBarControl:function( ){
682728 var _this = this;
683729 var box_dark_url = mv_embed_path + 'skins/' + mv_skin_name + '/images/box_layout_icon_dark.png';
@@ -824,13 +870,15 @@
825871 }
826872 }
827873 }
828 - //add pointer to parent serach obj:
 874+ //force a mime type for now.. in the future generalize for other RSS feeds
 875+ rObj['mime'] = 'video/ogg';
 876+ //add pointer to parent search obj:
829877 rObj['pSobj'] = _this;
830878 //add the result to the result set:
831879 _this.resultsObj[inx] = rObj;
832880 });
833881 },
834 - //by default just retrun the existing image:
 882+ //by default just return the existing image:
835883 getImageObj:function( rObj, size, callback){
836884 callback( {'url':rObj.poster} );
837885 }
@@ -856,13 +904,7 @@
857905 this['parent_'+i] = baseSearch[i];
858906 }
859907 }
860 - },
861 - getImageObj:function( rObj, size, callback ){
862 - js_log('metavidSearch:getImageObj:'+size + ' s:' + size );
863 - //metavid uses a dynamic image request url:
864 - var pparts = this.parseURI( rObj.poster );
865 - callback( {'url':rObj.poster} );
866 - },
 908+ },
867909 getSearchResults:function(){
868910 var _this = this;
869911 //start loading:
@@ -880,6 +922,11 @@
881923 do_request(url, function(data){
882924 //should have an xml rss data object:
883925 _this.addRSSData( data , url );
 926+ //do some metavid specific pos proccessing:
 927+ for(var i in _this.resultsObj){
 928+ var rObj = _this.resultsObj[i];
 929+ }
 930+
884931 //done loading:
885932 _this.loading=0;
886933 });
@@ -1028,24 +1075,33 @@
10291076 js_log('ERROR:unsupored mime type: ' + rObj.mime);
10301077 },
10311078 //returns the inline wikitext for insertion (template based crops for now)
1032 - getEmbedWikiText: function( rObj , callback ){
 1079+ getEmbedWikiText: function( rObj ){
10331080 //set default layout to right justified
10341081 var layout = ( rObj.layout)? rObj.layout:"right"
10351082 //if crop is null do simple output:
1036 - if( rObj.crop == null)
1037 - callback( '[[' + rObj.titleKey + '|layout' + '|'+rObj.width + 'px|' + rObj.inlineDesc + ']]' );
1038 -
 1083+ if( rObj.crop == null){
 1084+ var o= '[[' + this.rsd.cFileNS + ':' + rObj.target_resource_title + '|thumb|'+layout;
 1085+
 1086+ if(rObj.target_width)
 1087+ o+='|' + rObj.target_width + 'px';
 1088+
 1089+ if( rObj.inlineDesc )
 1090+ o+='|' + rObj.inlineDesc;
 1091+
 1092+ o+=']]';
 1093+ return o;
 1094+ }
10391095 //using the preview crop template: http://en.wikipedia.org/wiki/Template:Preview_Crop
10401096 //should be replaced with server side cropping
1041 - callback( '{{Preview Crop '+
1042 -'|Image = ' + rObj.titleKey + "\n" +
1043 -'|bSize = ' + rObj.width + "\n" +
1044 -'|cWidth = ' + rObj.crop.w + "\n" +
1045 -'|cHeight = ' + rObj.crop.h + "\n" +
1046 -'|oTop = ' + rObj.crop.y + "\n" +
1047 -'|oLeft = ' + rObj.crop.x + "\n" +
1048 -'|Location =' + layout + "\n" +
1049 -'|Description =' + rObj.inlineDesc + "\n" +
1050 -'}}');
 1097+ return '{{Preview Crop ' + "\n" +
 1098+ '|Image = ' + rObj.target_resource_title + "\n" +
 1099+ '|bSize = ' + rObj.width + "\n" +
 1100+ '|cWidth = ' + rObj.crop.w + "\n" +
 1101+ '|cHeight = ' + rObj.crop.h + "\n" +
 1102+ '|oTop = ' + rObj.crop.y + "\n" +
 1103+ '|oLeft = ' + rObj.crop.x + "\n" +
 1104+ '|Location =' + layout + "\n" +
 1105+ '|Description =' + rObj.inlineDesc + "\n" +
 1106+ '}}';
10511107 }
10521108 }
\ No newline at end of file

Status & tagging log