r70380 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70379‎ | r70380 | r70381 >
Date:05:53, 3 August 2010
Author:dale
Status:deferred
Tags:
Comment:
* fixed bug in update of clip duration slider values
* use "this" instead of static id in default close button action
Modified paths:
  • /branches/MwEmbedStandAlone/modules/Sequencer/Sequencer.i18n.php (modified) (history)
  • /branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerAddMedia.js (modified) (history)
  • /branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerTools.js (modified) (history)
  • /branches/MwEmbedStandAlone/mwEmbed.js (modified) (history)

Diff [purge]

Index: branches/MwEmbedStandAlone/mwEmbed.js
@@ -1088,7 +1088,7 @@
10891089 var buttonMsg = options.buttons;
10901090 buttons = { };
10911091 options.buttons[ buttonMsg ] = function() {
1092 - $j( '#mwTempLoaderDialog' ).dialog( 'close' );
 1092+ $j( this ).dialog( 'close' );
10931093 }
10941094 }
10951095
Index: branches/MwEmbedStandAlone/modules/Sequencer/Sequencer.i18n.php
@@ -54,6 +54,7 @@
5555 'mwe-sequencer-url-or-search' => 'URL or search term',
5656 'mwe-sequencer-get-media' => 'Get media',
5757 'mwe-sequencer-insert-resource' => 'Insert resource into sequence',
 58+ 'mwe-sequencer-insert'=> 'Insert into sequence',
5859
5960 'mwe-sequencer-transition_in' => 'Transition in',
6061 'mwe-sequencer-transition_out' => 'Transition out',
Index: branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerAddMedia.js
@@ -56,7 +56,12 @@
5757 'icon_id' : 'plus'
5858 })
5959 .click(function(){
60 - _this.proccessRequest();
 60+ // only do the search if the user has given the search input focus
 61+ if( widgetFocus ){
 62+ _this.proccessRequest();
 63+ }
 64+ // don't follow the button link
 65+ return false;
6166 })
6267 )
6368 },
@@ -96,13 +101,28 @@
97102 * buttons include insert at end or insert after current
98103 */
99104 insertResourceDialog: function( resource ){
 105+ var buttons = {};
 106+ // insert after last selected clip ( or at end )
 107+ buttons[ gM('mwe-sequencer-insert') ] = function() {
 108+ mw.log("insert resource into sequence");
 109+ var cat = resource;
 110+ debugger;
 111+ }
 112+ // cancel
 113+ buttons[ gM('mwe-cancel') ] = function(){
 114+ $j( this ).dialog( 'close' );
 115+ };
 116+
100117 mw.addDialog({
101118 'title' : gM('mwe-sequencer-insert-resource'),
102119 'dragable' : true,
103120 'height' : 480,
104121 'width' : 640,
105122 'resizable' : true,
106 - 'content' : $j('<div />').text('import interface here')
 123+ 'content' : function(){
 124+ // add the resource on-top and trim
 125+ },
 126+ 'buttons' : buttons
107127 });
108128 }
109129 }
Index: branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerTools.js
@@ -185,12 +185,13 @@
186186 change: function( event, ui ) {
187187 if( sliderValues[0] != ui.values[0] ){
188188 var attributeChanged = 'clipBegin';
189 - sliderIndex = 0;
 189+ sliderIndex = 0;
 190+ var attributeValue = sliderToTime( ui.values[ 0 ] )
190191 } else {
191192 var attributeChanged = 'dur';
192193 sliderIndex = 1;
193 - }
194 - var attributeValue = sliderToTime( ui.values[ sliderIndex ] )
 194+ var attributeValue = sliderToTime( ui.values[ 1 ]- ui.values[0] )
 195+ }
195196 sliderValues[ sliderIndex ] = ui.values[ sliderIndex ];
196197
197198 // update start and end time:

Status & tagging log