Index: branches/new-upload/phase3/js2/mwEmbed/libAddMedia/remoteSearchDriver.js |
— | — | @@ -991,15 +991,15 @@ |
992 | 992 | //scale up image and to swap with high res version |
993 | 993 | $j('#rsd_edit_img').animate({ |
994 | 994 | 'opacity':1, |
995 | | - 'top':'0px', |
996 | | - 'left':'0px', |
| 995 | + 'top':'5px', |
| 996 | + 'left':'5px', |
997 | 997 | 'width': maxWidth + 'px', |
998 | 998 | 'height': parseInt( tRatio * maxWidth) + 'px' |
999 | 999 | }, "slow"); // do it slow to give it a chance to finish loading the HQ version |
1000 | 1000 | |
1001 | 1001 | if( mediaType == 'image' ){ |
1002 | | - _this.loadHQImg(rObj, {'width':maxWidth}, 'rsd_edit_img', function(){ |
1003 | | - $j('.mv_img_loader').remove(); |
| 1002 | + _this.loadHQImg(rObj, {'width':maxWidth}, 'rsd_edit_img', function(){ |
| 1003 | + $j('.mv_loading_img').remove(); |
1004 | 1004 | }); |
1005 | 1005 | } |
1006 | 1006 | //also fade in the container: |
— | — | @@ -1103,7 +1103,7 @@ |
1104 | 1104 | //make sure we have the embedVideo libs: |
1105 | 1105 | mvJsLoader.embedVideoCheck( function(){ |
1106 | 1106 | js_log('append html: ' + rObj.pSobj.getEmbedHTML( rObj, {id:'embed_vid'}) ); |
1107 | | - $j('#clip_edit_disp').append( |
| 1107 | + $j('#clip_edit_disp').html( |
1108 | 1108 | rObj.pSobj.getEmbedHTML( rObj, {id:'embed_vid'}) |
1109 | 1109 | ); |
1110 | 1110 | //rewrite by id |
— | — | @@ -1247,7 +1247,8 @@ |
1248 | 1248 | |
1249 | 1249 | '</div>'+ |
1250 | 1250 | //output the rendered and non-renderd version of description for easy swiching: |
1251 | | - '</div>'); |
| 1251 | + '</div>'); |
| 1252 | + //add hover: |
1252 | 1253 | //update video tag |
1253 | 1254 | rewrite_by_id(_this.target_container + '_rsd_pv_vid'); |
1254 | 1255 | //load the preview text: |
— | — | @@ -1265,7 +1266,7 @@ |
1266 | 1267 | $j('#rsd_import_desc').html(o); |
1267 | 1268 | }); |
1268 | 1269 | }); |
1269 | | - $j(_this.target_container + ' .rsd_import_doimport').click(function(){ |
| 1270 | + $j(_this.target_container + ' .rsd_import_doimport').btnBind().click(function(){ |
1270 | 1271 | //check import mode: |
1271 | 1272 | if(_this.import_url_mode=='form'){ |
1272 | 1273 | _this.doImportSpecialPage( rObj, cir_callback ); |
— | — | @@ -1275,7 +1276,7 @@ |
1276 | 1277 | js_log("Error: import mode is not form or API (can not copy asset)"); |
1277 | 1278 | } |
1278 | 1279 | }); |
1279 | | - $j( _this.target_container + ' .rsd_import_acancel').click(function(){ |
| 1280 | + $j( _this.target_container + ' .rsd_import_acancel').btnBind().click(function(){ |
1280 | 1281 | $j('#rsd_resource_import').fadeOut("fast",function(){ |
1281 | 1282 | $j(this).remove(); |
1282 | 1283 | }); |
Index: branches/new-upload/phase3/js2/mwEmbed/libClipEdit/mvClipEdit.js |
— | — | @@ -472,36 +472,40 @@ |
473 | 473 | switch(cbType){ |
474 | 474 | case 'insert_seq': |
475 | 475 | $j(b_target).append( $j.btnHtml(gM('mv_insert_into_sequence'), 'mv_insert_sequence', 'check' ) + ' ' ) |
476 | | - .children('.mv_insert_sequence').btnBind() |
| 476 | + .children('.mv_insert_sequence') |
477 | 477 | .click(function(){ |
478 | 478 | _this.applyEdit(); |
479 | 479 | _this.controlActionsCb['insert_seq']( _this.rObj ); |
480 | 480 | }); |
| 481 | + $j('.mv_insert_sequence').btnBind(); |
481 | 482 | break; |
482 | 483 | case 'insert': |
483 | 484 | $j(b_target).append( $j.btnHtml(gM('mv_insert_image_page'), 'mv_insert_image_page', 'check' ) + ' ' ) |
484 | | - .children('.mv_insert_image_page').btnBind() |
| 485 | + .children('.mv_insert_image_page') |
485 | 486 | .click(function(){ |
486 | 487 | _this.applyEdit(); |
487 | 488 | _this.controlActionsCb['insert']( _this.rObj ); |
488 | 489 | }).show('slow'); |
| 490 | + $j('.mv_insert_image_page').btnBind(); |
489 | 491 | break; |
490 | 492 | case 'preview': |
491 | 493 | $j(b_target).append( $j.btnHtml( gM('mv_preview_insert'), 'mv_preview_insert', 'refresh') + ' ' ) |
492 | | - .children('.mv_preview_insert').btnBind() |
| 494 | + .children('.mv_preview_insert') |
493 | 495 | .click(function(){ |
494 | 496 | _this.applyEdit(); |
495 | 497 | _this.controlActionsCb['preview']( _this.rObj ); |
496 | 498 | }).show('slow'); |
| 499 | + $j('.mv_preview_insert').btnBind(); |
497 | 500 | break; |
498 | 501 | case 'cancel': |
499 | 502 | $j(b_target).append( $j.btnHtml( gM('mv_cancel_image_insert'), 'mv_cancel_img_edit', 'close') + ' ') |
500 | | - .children('.mv_cancel_img_edit').btnBind() |
| 503 | + .children('.mv_cancel_img_edit') |
501 | 504 | .click(function(){ |
502 | 505 | //no cancel action; |
503 | | - _this.controlActionsCb['cancel']( _this.rObj ); |
| 506 | + _this.controlActionsCb['cancel']( _this.rObj ); |
504 | 507 | }).show('slow'); |
505 | | - break; |
| 508 | + $j('.mv_cancel_img_edit').btnBind(); |
| 509 | + break; |
506 | 510 | } |
507 | 511 | } |
508 | 512 | }, |
Index: branches/new-upload/phase3/js2/mwEmbed/mv_embed.js |
— | — | @@ -20,7 +20,7 @@ |
21 | 21 | MV_DO_INIT=false; |
22 | 22 | } |
23 | 23 | //used to grab fresh copies of scripts. (should be changed on commit) |
24 | | -var MV_EMBED_VERSION = '1.0r16'; |
| 24 | +var MV_EMBED_VERSION = '1.0r17'; |
25 | 25 | |
26 | 26 | /* |
27 | 27 | * Configuration variables (can be set from some precceding script) |
— | — | @@ -110,13 +110,16 @@ |
111 | 111 | opt['j_replace'] = 'jquery.'; |
112 | 112 | if(!path) |
113 | 113 | path = ''; |
114 | | - for(var i in gClasses){ |
115 | | - //check if its an array: |
116 | | - if( gClasses.length ){ |
| 114 | + if(gClasses.length){ |
| 115 | + //do array loop: |
| 116 | + for(var i=0;i<gClasses.length;i++){ |
117 | 117 | //setup normal replacement of j with jquery |
118 | 118 | var jsName = ( gClasses[i].substr(0,3) == '$j.' ) ? opt['j_replace'] + gClasses[i].substr(3) : gClasses[i]; |
119 | 119 | mvClassPaths[ gClasses[i] ] = path + jsName + '.js'; |
120 | | - }else{ |
| 120 | + } |
| 121 | + }else{ |
| 122 | + //do object loop: |
| 123 | + for(var i in gClasses){ |
121 | 124 | //assume object with key:path: |
122 | 125 | mvClassPaths[i] = path + gClasses[ i ]; |
123 | 126 | } |