Index: branches/MwEmbedStandAlone/modules/Sequencer/mw.SequencerMenu.js |
— | — | @@ -50,7 +50,7 @@ |
51 | 51 | }, |
52 | 52 | 'condition': function( _this ){ |
53 | 53 | // Only display if no server is defined: |
54 | | - return !( _this.sequencer.getServer().isConfigured() ) |
| 54 | + return !( _this.sequencer.getServer().isConfigured() ); |
55 | 55 | } |
56 | 56 | }, |
57 | 57 | 'publish': { |
— | — | @@ -60,22 +60,19 @@ |
61 | 61 | }, |
62 | 62 | 'condition': function( _this ){ |
63 | 63 | // Only display if publishing server is present |
64 | | - return ( _this.sequencer.getServer().isConfigured() ) |
| 64 | + return ( _this.sequencer.getServer().isConfigured() ); |
65 | 65 | } |
66 | 66 | }, |
67 | 67 | 'help_divider': 'divider', |
68 | 68 | 'help': { |
69 | 69 | 'icon' : 'info', |
70 | | - 'action' : function(){ |
71 | | - // follow link to |
72 | | - //$j( this ).attr('href', ) |
73 | | - } |
| 70 | + 'href' : 'http://commons.wikimedia.org/wiki/Commons:Sequencer' |
74 | 71 | }, |
75 | 72 | 'exit_divider': 'divider', |
76 | 73 | 'exit' : { |
77 | 74 | 'icon' : 'power', |
78 | 75 | 'action' : function( _this ){ |
79 | | - mw.log( 'check for save') |
| 76 | + mw.log( 'check for save'); |
80 | 77 | _this.sequencer.getActionsSequence().exit(); |
81 | 78 | } |
82 | 79 | } |
— | — | @@ -157,10 +154,10 @@ |
158 | 155 | showSpeed: 100, |
159 | 156 | createMenuCallback: function(){ |
160 | 157 | // Sync the disabled enabled state to menu |
161 | | - _this.syncMenuState( menuKey ) |
| 158 | + _this.syncMenuState( menuKey ); |
162 | 159 | } |
163 | 160 | }) |
164 | | - ) |
| 161 | + ); |
165 | 162 | } |
166 | 163 | drawTopMenu( menuKey ); |
167 | 164 | } |
— | — | @@ -202,7 +199,7 @@ |
203 | 200 | 'http://wikimedia.org' |
204 | 201 | ) |
205 | 202 | ) |
206 | | - ) |
| 203 | + ); |
207 | 204 | } |
208 | 205 | }, |
209 | 206 | /** |
— | — | @@ -217,7 +214,7 @@ |
218 | 215 | mw.log('sync: ' + menuItemKey + ' in-dom:' + $menuItem.length + ' isd:' + isDisabled); |
219 | 216 | if( $menuItem.hasClass( 'disabled') ){ |
220 | 217 | if( ! isDisabled ){ |
221 | | - $menuItem.removeClass( 'disabled' ) |
| 218 | + $menuItem.removeClass( 'disabled' ); |
222 | 219 | } |
223 | 220 | } else { |
224 | 221 | if( isDisabled ){ |
— | — | @@ -226,7 +223,9 @@ |
227 | 224 | } |
228 | 225 | } |
229 | 226 | }, |
230 | | - /* return a top menuItem with all its associated menuItems */ |
| 227 | + /** |
| 228 | + * Return a top menuItem with all its associated menuItems |
| 229 | + */ |
231 | 230 | getMenuSet: function( menuKey ){ |
232 | 231 | var _this = this; |
233 | 232 | var menuConfig = this.menuConfig; |
— | — | @@ -261,7 +260,7 @@ |
262 | 261 | // Do a normal menu item include: |
263 | 262 | $menu.append( |
264 | 263 | _this.getMenuItem( menuKey, menuItemKey ) |
265 | | - ) |
| 264 | + ); |
266 | 265 | } |
267 | 266 | return $menu; |
268 | 267 | }, |
— | — | @@ -275,23 +274,27 @@ |
276 | 275 | menuItem.icon, |
277 | 276 | function(){ |
278 | 277 | if( typeof menuItem.action == 'function'){ |
279 | | - menuItem.action( _this ); |
280 | | - return ; |
| 278 | + return menuItem.action( _this ); |
281 | 279 | } |
282 | | - mw.log( "Error:: SequencerMenu:: no action item for " + menuKey + '-' + menuItemKey ); |
| 280 | + return true; |
283 | 281 | } |
284 | 282 | ); |
285 | 283 | |
| 284 | + // Check if the menu item has a direct link: |
| 285 | + if( menuItem.href ) { |
| 286 | + $li.find('a').attr({ 'href' : menuItem.href, 'target' : '_new' } ); |
| 287 | + } |
| 288 | + |
286 | 289 | if( menuItem.disabled === true ){ |
287 | 290 | $li.addClass( 'disabled' ); |
288 | 291 | } |
289 | 292 | |
290 | 293 | // Set the ID for easy reference |
291 | | - $li.attr( 'id', _this.getMenuItemId( menuKey, menuItemKey ) ) |
| 294 | + $li.attr( 'id', _this.getMenuItemId( menuKey, menuItemKey ) ); |
292 | 295 | |
293 | 296 | // Set the tooltip / title if provided |
294 | 297 | if( mw.Language.isMsgKeyDefined( 'mwe-sequencer-menu-' + menuKey + '-' + menuItemKey + '-desc' ) ){ |
295 | | - $li.attr( 'title', gM('mwe-sequencer-menu-' + menuKey + '-' + menuItemKey + '-desc') ) |
| 298 | + $li.attr( 'title', gM('mwe-sequencer-menu-' + menuKey + '-' + menuItemKey + '-desc') ); |
296 | 299 | } |
297 | 300 | |
298 | 301 | return $li; |
Index: branches/MwEmbedStandAlone/modules/Sequencer/mw.Sequencer.js |
— | — | @@ -4,7 +4,7 @@ |
5 | 5 | |
6 | 6 | mw.includeAllModuleMessages(); |
7 | 7 | |
8 | | -/* |
| 8 | +/** |
9 | 9 | * Setup the sequencer jQuery binding: |
10 | 10 | */ |
11 | 11 | |
— | — | @@ -17,7 +17,7 @@ |
18 | 18 | } |
19 | 19 | var seqContainer = $j( this.selector ).get(0); |
20 | 20 | |
21 | | - // Support jquery ui style 'destroy' call |
| 21 | + // Support jQuery ui style 'destroy' call |
22 | 22 | if( options == 'destroy' ){ |
23 | 23 | if( seqContainer['sequencer'] ) |
24 | 24 | delete seqContainer['sequencer']; |
— | — | @@ -41,10 +41,10 @@ |
42 | 42 | // Draw the sequencer UI |
43 | 43 | seqContainer['sequencer'].drawUI(); |
44 | 44 | |
45 | | - // Return the sequence jquery object |
| 45 | + // Return the sequence jQuery object |
46 | 46 | return this; |
47 | 47 | |
48 | | - } |
| 48 | + }; |
49 | 49 | } )( jQuery ); |
50 | 50 | |
51 | 51 | //Wrap in mw closure to avoid global leakage |
— | — | @@ -62,7 +62,7 @@ |
63 | 63 | 'addMedia': null, |
64 | 64 | 'onExitCallback' : null, |
65 | 65 | 'videoAspect' : '4:3' |
66 | | -} |
| 66 | +}; |
67 | 67 | mw.Sequencer = function( options ) { |
68 | 68 | return this.init( options ); |
69 | 69 | }; |
— | — | @@ -83,7 +83,7 @@ |
84 | 84 | if( typeof options[ optionName] != 'undefined'){ |
85 | 85 | this.options[optionName] = options[ optionName] ; |
86 | 86 | } else { |
87 | | - this.options[optionName] = mw_sequenceedit_default_options[ optionName ] |
| 87 | + this.options[optionName] = mw_sequenceedit_default_options[ optionName ]; |
88 | 88 | } |
89 | 89 | } |
90 | 90 | |
— | — | @@ -92,7 +92,7 @@ |
93 | 93 | this.smilSource = options.smilSource; |
94 | 94 | } |
95 | 95 | if( this.options.interfaceContainer ){ |
96 | | - this.interfaceContainer = this.options.interfaceContainer |
| 96 | + this.interfaceContainer = this.options.interfaceContainer; |
97 | 97 | } |
98 | 98 | |
99 | 99 | // For style properties assign top level mwe-sequencer class |
— | — | @@ -102,7 +102,7 @@ |
103 | 103 | |
104 | 104 | getOption: function( optionName ){ |
105 | 105 | if( this.options[ optionName ]){ |
106 | | - return this.options[ optionName ] |
| 106 | + return this.options[ optionName ]; |
107 | 107 | } |
108 | 108 | return false; |
109 | 109 | }, |
— | — | @@ -148,7 +148,7 @@ |
149 | 149 | // Add the ui layout |
150 | 150 | this.getContainer().html( |
151 | 151 | this.getUiLayout() |
152 | | - ) |
| 152 | + ); |
153 | 153 | |
154 | 154 | // Once the layout is in the dom setup resizableLayout "layout" options |
155 | 155 | this.applyLayoutBindings(); |
— | — | @@ -180,7 +180,7 @@ |
181 | 181 | if( _this.getOption( 'newSequence' ) ){ |
182 | 182 | _this.smilSource = _this.getDataUrl( _this.getNewSmilXML() ); |
183 | 183 | } else { |
184 | | - mw.log( "Load smil source from server" ) |
| 184 | + mw.log( "Load smil source from server" ); |
185 | 185 | // Load from the server |
186 | 186 | _this.getServer().getSmilXml( function( smilXml ){ |
187 | 187 | // xxx should parse the sequence data |
— | — | @@ -188,14 +188,14 @@ |
189 | 189 | smilXml = _this.getNewSmilXML(); |
190 | 190 | } |
191 | 191 | _this.smilSource = _this.getDataUrl( smilXml ); |
192 | | - callback( _this.smilSource ) |
193 | | - }) |
| 192 | + callback( _this.smilSource ); |
| 193 | + }); |
194 | 194 | // Wait for server to return smil source |
195 | 195 | return ; |
196 | 196 | } |
197 | 197 | } |
198 | 198 | // return the smilSource |
199 | | - callback( _this.smilSource ) |
| 199 | + callback( _this.smilSource ); |
200 | 200 | }, |
201 | 201 | getDataUrl: function( xmlString ){ |
202 | 202 | if( ! xmlString ){ |
— | — | @@ -292,7 +292,7 @@ |
293 | 293 | if( ! this.addByUri ){ |
294 | 294 | this.addByUri = new mw.SequencerAddByUri( this ); |
295 | 295 | } |
296 | | - return this.addByUri |
| 296 | + return this.addByUri; |
297 | 297 | }, |
298 | 298 | getKeyBindings:function(){ |
299 | 299 | if( ! this.keyBindings ){ |
Index: branches/MwEmbedStandAlone/modules/Sequencer/Sequencer.i18n.php |
— | — | @@ -108,6 +108,10 @@ |
109 | 109 | 'mwe-sequencer-menu-sequence-publish' => 'Publish', |
110 | 110 | 'mwe-sequencer-menu-sequence-publish-desc' => 'Publish sequence', |
111 | 111 | 'mwe-sequencer-menu-sequence-renderdisk' => 'Render to disk', |
| 112 | + |
| 113 | + 'mwe-sequencer-menu-sequence-help' => 'Help', |
| 114 | + 'mwe-sequencer-menu-sequence-help-desc' => 'Sequencer help page', |
| 115 | + |
112 | 116 | 'mwe-sequencer-menu-sequence-exit' => 'Exit', |
113 | 117 | 'mwe-sequencer-menu-sequence-exit-desc' => 'Exit the sequencer', |
114 | 118 | 'mwe-sequencer-confirm-exit' => 'Are you sure you want to exit?', |
Index: branches/MwEmbedStandAlone/modules/SmilPlayer/mw.SmilLayout.js |
— | — | @@ -522,30 +522,23 @@ |
523 | 523 | }); |
524 | 524 | }); |
525 | 525 | // Switch any named font-size attribute to em |
526 | | - /*$htmlLayout.find('[style]').each( function(inx, node){ |
527 | | - if( $j(node).css('font-size') ){ |
| 526 | + $htmlLayout.find('[style]').each( function(inx, node){ |
| 527 | + if( $j(node).css('font-size') ){ |
528 | 528 | if( _this.emFontSizeMap[ $j(node).css('font-size') ] ){ |
529 | 529 | $j(node).css('font-size', _this.emFontSizeMap[ $j(node).css('font-size') ] ); |
530 | | - } else { |
531 | | - //@@ todo translate absolute pixle size to relative |
| 530 | + } else if( $j(node).css('font-size').indexOf('px') != -1 ) { |
| 531 | + // Translate absolute pixel size to relative |
| 532 | + $j(node).css('font-size', |
| 533 | + ( ( fontScalePercent * .5 ) * parseFloat( $j(node).css('font-size') ) ) + 'px' |
| 534 | + ); |
532 | 535 | } |
533 | 536 | } |
534 | | - });*/ |
535 | | - // Switch any named font-size attribute to relative pixle size |
536 | | - $htmlLayout.find('[style]').each( function(inx, node){ |
537 | | - if( $j(node).css('font-size') ){ |
538 | | - $j(node).css('font-size', |
539 | | - ( fontScalePercent * parseFloat( $j(node).css('font-size') ) ) + 'px' |
540 | | - ); |
541 | | - } |
542 | | - }) |
| 537 | + }); |
543 | 538 | |
544 | 539 | // Strip any links for thumbs of player |
545 | 540 | $htmlLayout.find('a').attr('href', '#'); |
546 | 541 | } |
547 | | - |
548 | | - |
549 | | - |
| 542 | + |
550 | 543 | // Return the cdata |
551 | 544 | return $j('<div />') |
552 | 545 | // Wrap in font-size percentage relative to virtual size |
Index: branches/MwEmbedStandAlone/libraries/jquery/plugins/jquery.menu/jquery.menu.js |
— | — | @@ -35,13 +35,13 @@ |
36 | 36 | var $li = $j( '<li>' ).append( |
37 | 37 | $j('<a>') |
38 | 38 | .attr('href', '#') |
39 | | - .click( callback ) |
40 | | - ) |
| 39 | + .click( callback ) |
| 40 | + ); |
41 | 41 | if( icon ) { |
42 | 42 | $li.find( 'a' ).append( |
43 | 43 | $j('<span style="float:left;"></span>') |
44 | 44 | .addClass( 'ui-icon ui-icon-' + icon ) |
45 | | - ) |
| 45 | + ); |
46 | 46 | } |
47 | 47 | $li.find( 'a' ).append( $j('<span>').text( string ) ); |
48 | 48 | //mw.log(' li html: ' + $j('<div>').append( $li ).html() ); |