http://www.mediawiki.org/wiki/Special:Code/MediaWiki/73580

Revision: 73580
Author:   dale
Date:     2010-09-22 22:53:54 +0000 (Wed, 22 Sep 2010)

Log Message:
-----------
have user input go directly to smil xml ( instead of wrapped by the slider ui ) 

Modified Paths:
--------------
    branches/MwEmbedStandAlone/modules/Sequencer/tools/mw.SequencerTools.js

Modified: 
branches/MwEmbedStandAlone/modules/Sequencer/tools/mw.SequencerTools.js
===================================================================
--- branches/MwEmbedStandAlone/modules/Sequencer/tools/mw.SequencerTools.js     
2010-09-22 22:45:25 UTC (rev 73579)
+++ branches/MwEmbedStandAlone/modules/Sequencer/tools/mw.SequencerTools.js     
2010-09-22 22:53:54 UTC (rev 73580)
@@ -254,7 +254,7 @@
                                        'dur' : {
                                                'value' : '0:02',
                                                'editType' : 'time'
-                                       },
+                                       }
                                },
                                'fadeColor':{
                                        'extends':'fade',
@@ -886,9 +886,7 @@
                                }
                                
                                
-                               var onInputChange = function( sliderIndex, 
timeValue ){
-                                       // Register the change
-                                       
_this.editWidgets.trimTimeline.onChange( _this, smilElement );
+                               var onInputChange = function( sliderIndex, 
timeValue ){ 
                                        // Update the slider
                                        if( fullClipDuration ){
                                                $j('#'+_this.sequencer.id + 
'_trimTimeline' )
@@ -898,6 +896,17 @@
                                                                        
timeToSlider( timeValue )
                                                        );                      
                
                                        }
+                                       // Directly update the smil xml from 
the user Input
+                                       if( sliderIndex == 0 ){
+                                               // Update clipBegin 
+                                               
_this.editableTypes['time'].update( _this, smilElement, 'clipBegin',  timeValue 
);
+                                       } else {                                
        
+                                               // Update dur
+                                               
_this.editableTypes['time'].update( _this, smilElement, 'dur',   timeValue );
+                                       }
+                                       
+                                       // Register the change
+                                       
_this.editWidgets.trimTimeline.onChange( _this, smilElement );
                                }
                                
                                // Add a trim binding:                          
 
@@ -910,7 +919,7 @@
                                 $j('#' + _this.getEditToolInputId( 'trim', 
'dur') ) 
                                .change( function(){                    
                                        var timeValue = smil.parseTime(  
$j(this).val() ) + 
-                                        smil.parseTime( $j('#' + 
_this.getEditToolInputId( 'trim', 'clipBegin') ).val() );
+                                       smil.parseTime( $j('#' + 
_this.getEditToolInputId( 'trim', 'clipBegin') ).val() );
                                        onInputChange( 1, timeValue );
                                });
                                 



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to