Index: trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/seqRemoteSearchDriver.js |
— | — | @@ -18,14 +18,47 @@ |
19 | 19 | } |
20 | 20 | }, |
21 | 21 | addResultBindings:function(){ |
22 | | - //setup the default bindings |
| 22 | + //set up seq: |
| 23 | + var _this = this; |
| 24 | + //setup parent bindings: |
23 | 25 | this.parent_addResultBindings(); |
| 26 | + |
24 | 27 | //add an additional drag binding |
25 | | - $j('.rsd_res_item').draggable({ |
26 | | - |
| 28 | + var source_pos = null; |
| 29 | + var insert_key='na'; |
| 30 | + var clip_key =''; |
| 31 | + |
| 32 | + //@@todo support multiple tracks |
| 33 | + $j('.mv_clip_box_result').draggable({ |
| 34 | + start:function(){ |
| 35 | + source_pos = $j(this).offset(); |
| 36 | + js_log("update pos of: #clone_" + this.id + ' to l:' +source_pos.left + ' t:' + source_pos.top ); |
| 37 | + $j('#clone_' + this.id).css(source_pos); |
| 38 | + }, |
| 39 | + helper:function(){ |
| 40 | + //js_log(' should put at: ' + source_pos.left + ' ' + source_pos.right); |
| 41 | + //get source pos: |
| 42 | + //$j(this).clone().attr('id', 'clone_' + this.id).css({'z-index':'101'}).appendTo('body'); |
| 43 | + $j(this).clone().attr('id', 'clone_' + this.id).css({ |
| 44 | + 'z-index':'101', |
| 45 | + 'position':'absolute' |
| 46 | + }).appendTo('#container_track_0'); |
| 47 | + js_log('appended: ' + 'clone_' + this.id ); |
| 48 | + return $j('#clone_'+this.id).get(0); |
| 49 | + }, |
| 50 | + drag:function(e, ui){ |
| 51 | + insert_key = _this.p_seq.clipDragUpdate(ui, this); |
| 52 | + }, |
| 53 | + //do contain: |
| 54 | + containment:'#container_track_0', |
| 55 | + stop:function(){ |
| 56 | + js_log('done drag insert after: ' + insert_key); |
| 57 | + } |
27 | 58 | }); |
| 59 | + |
28 | 60 | }, |
29 | 61 | resourceEdit:function(rObj, rsdElement){ |
30 | | - |
| 62 | + //pass along for now: |
| 63 | + this.parent_resourceEdit(rObj, rsdElement); |
31 | 64 | } |
32 | 65 | } |
\ No newline at end of file |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/remoteSearchDriver.js |
— | — | @@ -102,7 +102,7 @@ |
103 | 103 | 'wiki_commons':{ |
104 | 104 | 'enabled':1, |
105 | 105 | 'checked':1, |
106 | | - 'd' :0, |
| 106 | + 'd' :1, |
107 | 107 | 'title' :'Wikipedia Commons', |
108 | 108 | 'desc' : 'Wikimedia Commons is a media file repository making available public domain '+ |
109 | 109 | 'and freely-licensed educational media content (images, sound and video clips) to all.', |
— | — | @@ -124,7 +124,7 @@ |
125 | 125 | 'metavid':{ |
126 | 126 | 'enabled':1, |
127 | 127 | 'checked':1, |
128 | | - 'd' :1, |
| 128 | + 'd' :0, |
129 | 129 | 'title' :'Metavid.org', |
130 | 130 | 'homepage':'http://metavid.org', |
131 | 131 | 'desc' : 'Metavid hosts thousands of hours of US house and senate floor proceedings', |
— | — | @@ -370,16 +370,19 @@ |
371 | 371 | drawTabs: function(){ |
372 | 372 | var _this = this; |
373 | 373 | //add the tabs to the rsd_results container: |
374 | | - var o='<div class="rsd_tabs_container" style="position:absolute;top:49px;width:100%;left:12px;height:25px;">'; |
375 | | - o+= '<ul class="rsd_cp_tabs" style="margin: 0 0 0 0;position:absolute;top:0px;padding:0;">'; //no idea why margin does not overwrite from the css |
376 | | - o+='<li id="rsd_tab_combined" ><img src="' + mv_embed_path + 'skins/'+mv_skin_name+ '/images/remote_cp/combined_tab.png"></li>'; |
| 374 | + var o='<div class="rsd_tabs_container" style="position:absolute;top:41px;width:100%;left:12px;height:25px;">'; |
| 375 | + //o+= '<ul class="rsd_cp_tabs" style="margin: 0 0 0 0;position:absolute;top:0px;padding:0;">'; //no idea why margin does not overwrite from the css |
| 376 | + //output combined tab: |
| 377 | + o+='<div id="rsd_tab_combined" class="rsd_cp_tab"><img src="' + mv_embed_path + 'skins/'+mv_skin_name+ '/images/remote_cp/combined_tab.png"></div>'; |
377 | 378 | for(var cp_id in this.content_providers){ |
378 | 379 | var cp = this.content_providers[cp_id]; |
379 | 380 | if( cp.enabled && cp.checked){ |
380 | | - var class_attr = (cp.d)?'class="rsd_selected"':''; |
381 | | - o+='<li id="rsd_tab_'+cp_id+'" ' + class_attr + '>'; |
| 381 | + var class_attr = 'class="rsd_cp_tab'; |
| 382 | + //add selected if so: |
| 383 | + class_attr+= (cp.d)?' rsd_selected"':'"'; |
| 384 | + o+='<div id="rsd_tab_'+cp_id+'" ' + class_attr + '>'; |
382 | 385 | if(cp.tab_img === true){ |
383 | | - o+='<img alt="' + cp.title +'" src="' + mv_embed_path + 'skins/' + mv_skin_name + '/images/remote_cp/' + cp_id + '_tab.png"></li>'; |
| 386 | + o+='<img alt="' + cp.title +'" src="' + mv_embed_path + 'skins/' + mv_skin_name + '/images/remote_cp/' + cp_id + '_tab.png"></div>'; |
384 | 387 | }else if(typeof cp.tab_img=='string'){ |
385 | 388 | o+='<img alt="' + cp.title +'" src="' + cp.tab_img + '"></li>'; |
386 | 389 | }else if(cp.tab_img === false){ |
— | — | @@ -390,16 +393,16 @@ |
391 | 394 | //do an upload tab if enabled: |
392 | 395 | if( this.enable_uploads ){ |
393 | 396 | var class_attr = ( this.disp_item =='upload' ) ? 'class="rsd_selected"':''; |
394 | | - o+='<li id="rsd_tab_upload" ' + class_attr + ' >'+gM('upload');+'</li>'; |
| 397 | + o+='<div id="rsd_tab_upload" ' + class_attr + ' >'+gM('upload');+'</li>'; |
395 | 398 | } |
396 | | - o+='</ul>'; |
| 399 | + //o+='</ul>'; |
397 | 400 | o+='</div>'; |
398 | 401 | //outout the resource results holder |
399 | 402 | o+='<div id="rsd_results" />'; |
400 | 403 | $j('#rsd_results_container').html(o); |
401 | 404 | |
402 | 405 | //setup bindings for tabs: |
403 | | - $j('.rsd_cp_tabs li').click(function(){ |
| 406 | + $j('.rsd_cp_tab').click(function(){ |
404 | 407 | _this.selectTab( $j(this).attr('id').replace(/rsd_tab_/, '') ); |
405 | 408 | }); |
406 | 409 | }, |
— | — | @@ -450,9 +453,10 @@ |
451 | 454 | o+='<div id="mv_result_' + rInx + '" class="mv_clip_box_result" style="' + disp + 'width:' + |
452 | 455 | _this.thumb_width + 'px;height:'+ (_this.thumb_width-20) +'px;position:relative;">'; |
453 | 456 | o+='<img title="'+rItem.title+'" class="rsd_res_item" id="res_' + rInx +'" style="width:' + _this.thumb_width + 'px;" src="' + rItem.poster + '">'; |
454 | | - //add a linkback to resource page in lower left: |
| 457 | + //add a linkback to resource page in upper right: |
455 | 458 | if(rItem.link) |
456 | | - o+='<a target="_new" style="position:absolute;top:0px;right:0px" title="' + gM('Resource Description Page') + '" href="' + rItem.link + '"><img src="' + stylepath + '/common/images/magnify-clip.png"></a>'; |
| 459 | + o+='<a target="_new" style="position:absolute;top:0px;right:0px" title="' + gM('Resource Description Page') + |
| 460 | + '" href="' + rItem.link + '"><img src="' + stylepath + '/common/images/magnify-clip.png"></a>'; |
457 | 461 | o+='</div>'; |
458 | 462 | }else if(_this.result_display_mode == 'list'){ |
459 | 463 | o+='<div id="mv_result_' + rInx + '" class="mv_clip_list_result" style="' + disp + 'width:90%">'; |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libAddMedia/mvUploader.js |
— | — | @@ -117,7 +117,7 @@ |
118 | 118 | //hard code style (since not always easy to import style sheets) |
119 | 119 | $j('body').append('<div id="dlbox-centered" class="dlbox-centered" style="display:none;'+ |
120 | 120 | 'position:fixed;background:#DDD;border:3px solid #AAA;font-size:115%;width:40%;'+ |
121 | | - 'height:300px;padding: 10px;z-index:100;bottom:40%;left:20%;" >'+ |
| 121 | + 'height:300px;padding: 10px;z-index:100;top:100px;bottom:40%;left:20%;" >'+ |
122 | 122 | '<h5>' + gM('upload-in-progress') + '</h5>' + |
123 | 123 | '<div id="fogg-pbar-container" style="border:solid thin gray;width:90%;height:15px;" >' + |
124 | 124 | '<div id="fogg-progressbar" style="background:#AAC;width:0%;height:15px;"></div>' + |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libSequencer/mvSequencer.js |
— | — | @@ -924,7 +924,7 @@ |
925 | 925 | 'time':0 |
926 | 926 | }); |
927 | 927 | //render out edit button |
928 | | - track_html+='<div class="clip_edit_button clip_edit_base"/>'; |
| 928 | + track_html+='<div class="clip_edit_button clip_edit_base clip_control"/>'; |
929 | 929 | |
930 | 930 | //render out transition edit box |
931 | 931 | track_html+='<div id="tb_' + base_id + '" style="" class="clip_trans_box"/>'; |
— | — | @@ -1076,43 +1076,7 @@ |
1077 | 1077 | handle: ":not(.clip_control)", |
1078 | 1078 | scroll:true, |
1079 | 1079 | drag:function(e, ui){ |
1080 | | - //animate re-arrange by left position: |
1081 | | - //js_log('left: '+ui.position.left); |
1082 | | - //locate clip (based on clip duration not animate) |
1083 | | - var id_parts = this.id.split('_'); |
1084 | | - var track_inx = id_parts[1]; |
1085 | | - var clip_inx = id_parts[3]; |
1086 | | - var clips = this_seq.plObj.tracks[track_inx].clips; |
1087 | | - var cur_drag_clip = clips[clip_inx]; |
1088 | | - var return_org = true; |
1089 | | - $j(this).css('zindex',10); |
1090 | | - //find out where we are inserting and set left border to solid red thick |
1091 | | - for(var k in clips){ |
1092 | | - if( ui.position.left > clips[k].left_px && |
1093 | | - ui.position.left < (clips[k].left_px + clips[k].width_px)){ |
1094 | | - if(clip_inx!=k){ |
1095 | | - //also make sure we are not where we started |
1096 | | - if(k-1!=clip_inx){ |
1097 | | - $j('#track_'+track_inx+'_clip_'+k).css('border-left', 'solid thick red'); |
1098 | | - insert_key=k; |
1099 | | - }else{ |
1100 | | - insert_key='na'; |
1101 | | - } |
1102 | | - }else{ |
1103 | | - insert_key='na'; |
1104 | | - } |
1105 | | - }else{ |
1106 | | - $j('#track_'+track_inx+'_clip_'+k).css('border-left', 'solid thin white'); |
1107 | | - } |
1108 | | - } |
1109 | | - //if greater than the last k insert after |
1110 | | - if(ui.position.left > (clips[k].left_px + clips[k].width_px) && |
1111 | | - k!=clip_inx ){ |
1112 | | - $j('#track_'+track_inx+'_clip_'+k).css('border-right', 'solid thick red'); |
1113 | | - insert_key='end'; |
1114 | | - }else{ |
1115 | | - $j('#track_'+track_inx+'_clip_'+k).css('border-right', 'solid thin white'); |
1116 | | - } |
| 1080 | + insert_key = this_seq.clipDragUpdate(ui, this); |
1117 | 1081 | }, |
1118 | 1082 | start:function(e,ui){ |
1119 | 1083 | js_log('start drag:' + this.id); |
— | — | @@ -1187,6 +1151,49 @@ |
1188 | 1152 | //debugger; |
1189 | 1153 | } |
1190 | 1154 | }, |
| 1155 | + clipDragUpdate:function( ui, clipElm){ |
| 1156 | + var this_seq = this; |
| 1157 | + |
| 1158 | + var insert_key='na'; |
| 1159 | + //animate re-arrange by left position: |
| 1160 | + //js_log('left: '+ui.position.left); |
| 1161 | + //locate clip (based on clip duration not animate) |
| 1162 | + var id_parts = clipElm.id.split('_'); |
| 1163 | + var track_inx = id_parts[1]; |
| 1164 | + var clip_inx = id_parts[3]; |
| 1165 | + var clips = this_seq.plObj.tracks[track_inx].clips; |
| 1166 | + var cur_drag_clip = clips[clip_inx]; |
| 1167 | + var return_org = true; |
| 1168 | + $j(clipElm).css('zindex',10); |
| 1169 | + //find out where we are inserting and set left border to solid red thick |
| 1170 | + for(var k in clips){ |
| 1171 | + if( ui.position.left > clips[k].left_px && |
| 1172 | + ui.position.left < (clips[k].left_px + clips[k].width_px)){ |
| 1173 | + if(clip_inx!=k){ |
| 1174 | + //also make sure we are not where we started |
| 1175 | + if(k-1!=clip_inx){ |
| 1176 | + $j('#track_'+track_inx+'_clip_'+k).css('border-left', 'solid thick red'); |
| 1177 | + insert_key=k; |
| 1178 | + }else{ |
| 1179 | + insert_key='na'; |
| 1180 | + } |
| 1181 | + }else{ |
| 1182 | + insert_key='na'; |
| 1183 | + } |
| 1184 | + }else{ |
| 1185 | + $j('#track_'+track_inx+'_clip_'+k).css('border-left', 'solid thin white'); |
| 1186 | + } |
| 1187 | + } |
| 1188 | + //if greater than the last k insert after |
| 1189 | + if(ui.position.left > (clips[k].left_px + clips[k].width_px) && |
| 1190 | + k!=clip_inx ){ |
| 1191 | + $j('#track_'+track_inx+'_clip_'+k).css('border-right', 'solid thick red'); |
| 1192 | + insert_key='end'; |
| 1193 | + }else{ |
| 1194 | + $j('#track_'+track_inx+'_clip_'+k).css('border-right', 'solid thin white'); |
| 1195 | + } |
| 1196 | + return insert_key; |
| 1197 | + }, |
1191 | 1198 | deselectClip:function( clipElm ){ |
1192 | 1199 | $j(clipElm).removeClass("mv_selected_clip"); |
1193 | 1200 | $j('#' + $j(clipElm).parent().attr("id") + '_adj').fadeOut("fast"); |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/libClipEdit/mvClipEdit.js |
— | — | @@ -59,7 +59,7 @@ |
60 | 60 | } |
61 | 61 | } |
62 | 62 | |
63 | | - //if media type was not supplied detect for resoure if possible: |
| 63 | + //if media type was not supplied detect for resource if possible: |
64 | 64 | //@@todo more advanced detection. |
65 | 65 | if(!this.media_type){ |
66 | 66 | if( this.rObj.type.indexOf("image/") === 0){ |
— | — | @@ -90,9 +90,36 @@ |
91 | 91 | //master edit types object: |
92 | 92 | //maybe we should refactor these into their own classes |
93 | 93 | //more refactor each media type should be its own class inheriting the shared baseEditType object |
94 | | - edit_types:{ |
| 94 | + edit_types:{ |
| 95 | + 'duration':{ |
| 96 | + d:1, |
| 97 | + 'media':['image','template'], |
| 98 | + 'doEdit':function( _this ){ |
| 99 | + //do clock mouse scroll duration editor |
| 100 | + $j('#sub_cliplib_ic').html('cur dur: ' + _this.rObj.dur ); |
| 101 | + } |
| 102 | + }, |
| 103 | + 'inoutpoints':{ |
| 104 | + 'd':1, |
| 105 | + 'media':['video'], |
| 106 | + 'doEdit':function( _this ){ |
| 107 | + var cat = _this.rObj |
| 108 | + //debugger; |
| 109 | + //do clock mouse scroll duration editor |
| 110 | + var end_ntp = ( _this.rObj.embed.end_ntp) ? _this.rObj.embed.end_ntp : _this.rObj.embed.getDuration(); |
| 111 | + if(!end_ntp) |
| 112 | + end_ntp = seconds2ntp( _this.rObj.dur ); |
| 113 | + $j('#sub_cliplib_ic').html( |
| 114 | + _this.getSetInOut({ |
| 115 | + 'start_ntp' : _this.rObj.embed.start_ntp, |
| 116 | + 'end_ntp' : end_ntp |
| 117 | + }) |
| 118 | + ); |
| 119 | + _this.setInOutBindings(); |
| 120 | + } |
| 121 | + }, |
95 | 122 | 'fileopts':{ |
96 | | - 'd':1, |
| 123 | + 'd':0, |
97 | 124 | 'media':['image','video','template'], |
98 | 125 | 'doEdit':function( _this ){ |
99 | 126 | var doEditHtml = function(){ |
— | — | @@ -206,33 +233,6 @@ |
207 | 234 | |
208 | 235 | } |
209 | 236 | }, |
210 | | - 'duration':{ |
211 | | - d:0, |
212 | | - 'media':['image','template'], |
213 | | - 'doEdit':function( _this ){ |
214 | | - //do clock mouse scroll duration editor |
215 | | - $j('#sub_cliplib_ic').html('cur dur: ' + _this.rObj.dur ); |
216 | | - } |
217 | | - }, |
218 | | - 'inoutpoints':{ |
219 | | - 'd':0, |
220 | | - 'media':['video'], |
221 | | - 'doEdit':function( _this ){ |
222 | | - var cat = _this.rObj |
223 | | - //debugger; |
224 | | - //do clock mouse scroll duration editor |
225 | | - var end_ntp = ( _this.rObj.embed.end_ntp) ? _this.rObj.embed.end_ntp : _this.rObj.embed.getDuration(); |
226 | | - if(!end_ntp) |
227 | | - end_ntp = seconds2ntp( _this.rObj.dur ); |
228 | | - $j('#sub_cliplib_ic').html( |
229 | | - _this.getSetInOut({ |
230 | | - 'start_ntp' : _this.rObj.embed.start_ntp, |
231 | | - 'end_ntp' : end_ntp |
232 | | - }) |
233 | | - ); |
234 | | - _this.setInOutBindings(); |
235 | | - } |
236 | | - }, |
237 | 237 | 'panzoom':{ |
238 | 238 | 'd':0, |
239 | 239 | 'media':['image','video'], |
Index: trunk/extensions/MetavidWiki/skins/mv_embed/skins/mvpcf/styles.css |
— | — | @@ -494,33 +494,47 @@ |
495 | 495 | width: 15px;height:19px; top: 0px; bottom: 0px; left: 0px; |
496 | 496 | background: transparent url(images/slider_handle_green.gif) no-repeat scroll 0% 0%; |
497 | 497 | } |
498 | | -.ui-dragSpan {filter: alpha(opacity=70); -moz-opacity: .7; background-color:#AAF; position:absolute; left: 10px; right:10px;height:19px; } |
| 498 | +.ui-dragSpan { |
| 499 | + filter: alpha(opacity=70); |
| 500 | + -moz-opacity: .7; |
| 501 | + background-color:#AAF; |
| 502 | + position:absolute; |
| 503 | + left: 10px; |
| 504 | + right:10px; |
| 505 | + height:19px; |
| 506 | +} |
499 | 507 | |
500 | | -#remote search css: |
501 | | - |
502 | | -ul.rsd_cp_tabs { |
503 | | - border-bottom:1px solid #CCCCCC; |
| 508 | +div.rsd_cp_tab_container{ |
504 | 509 | display:inline; |
505 | | - list-style-image:none; |
506 | | - list-style-position:outside; |
507 | | - list-style-type:none; |
508 | | - z-index:2; |
| 510 | + margin:0; |
| 511 | + padding:5px 2px 10px 2px; |
| 512 | + background:#F7F7F7 url(remote_search/tab-bg.png) repeat-x scroll left bottom; |
| 513 | + border:1px solid #777; |
| 514 | + margin-left:7px; |
| 515 | + cursor:pointer; |
| 516 | + float:left; |
| 517 | + width:auto; |
509 | 518 | } |
510 | | -ul.rsd_cp_tabs li.rsd_selected { |
511 | | - background:#FFFFFF none repeat scroll 0 0; |
512 | | - border-bottom:0; |
513 | | - padding-bottom:11px; |
514 | | - padding-top:12px; |
515 | | -} |
516 | | -ul.rsd_cp_tabs li { |
| 519 | +div.rsd_cp_tab { |
517 | 520 | display:inline; |
518 | 521 | margin:0; |
519 | | - padding:10px 2px 10px 2px; |
| 522 | + padding:5px 2px 10px 2px; |
520 | 523 | background:#F7F7F7 url(remote_search/tab-bg.png) repeat-x scroll left bottom; |
521 | 524 | border:1px solid #777; |
522 | 525 | margin-left:7px; |
523 | 526 | cursor:pointer; |
| 527 | + float:left; |
| 528 | + width:auto; |
| 529 | + position:relative; |
524 | 530 | } |
| 531 | + |
| 532 | +div.rsd_selected { |
| 533 | + background:#FFFFFF none repeat scroll 0 0; |
| 534 | + border-bottom:0; |
| 535 | + padding-top:6px; |
| 536 | + z-index:2; |
| 537 | +} |
| 538 | + |
525 | 539 | .rsd_results_container{ |
526 | 540 | position:absolute; |
527 | 541 | left:2px; |