diff options
Diffstat (limited to 'extensions/WikiEditor/modules/jquery.wikiEditor.toolbar.js')
-rw-r--r-- | extensions/WikiEditor/modules/jquery.wikiEditor.toolbar.js | 34 |
1 files changed, 3 insertions, 31 deletions
diff --git a/extensions/WikiEditor/modules/jquery.wikiEditor.toolbar.js b/extensions/WikiEditor/modules/jquery.wikiEditor.toolbar.js index 9024ba1d..b43dff47 100644 --- a/extensions/WikiEditor/modules/jquery.wikiEditor.toolbar.js +++ b/extensions/WikiEditor/modules/jquery.wikiEditor.toolbar.js @@ -236,28 +236,6 @@ fn: { * @param {Object} source */ doAction : function( context, action, source ) { - // Verify that this has been called from a source that's within the toolbar - // 'trackAction' defined in click tracking - if ( mw.config.get( 'wgWikiEditorToolbarClickTracking' ) && $.trackAction !== undefined && source.closest( '.wikiEditor-ui-toolbar' ).size() ) { - // Build a unique id for this action by tracking the parent rel attributes up to the toolbar level - var rels = []; - var step = source; - var i = 0; - while ( !step.hasClass( 'wikiEditor-ui-toolbar' ) ) { - if ( i > 25 ) { - break; - } - i++; - var rel = step.attr( 'rel' ); - if ( rel ) { - rels.push( step.attr( 'rel' ) ); - } - step = step.parent(); - } - rels.reverse(); - var id = rels.join( '.' ); - $.trackAction( id ); - } switch ( action.type ) { case 'replace': case 'encapsulate': @@ -300,7 +278,7 @@ fn: { var $group = $( '<div/>' ).attr( { 'class' : 'group group-' + id, 'rel' : id } ); var label = $.wikiEditor.autoMsg( group, 'label' ); if ( label ) { - $group.append( '<div class="label">' + label + '</div>' ); + $group.append( '<span class="label">' + label + '</div>' ); } var empty = true; if ( 'tools' in group ) { @@ -461,10 +439,6 @@ fn: { $(this).attr( 'rel' ), { expires: 30, path: '/' } ); - // Click tracking - if ( mw.config.get( 'wgWikiEditorToolbarClickTracking' ) && $.trackAction !== undefined ) { - $.trackAction(section + '.' + $(this).attr('rel')); - } context.fn.restoreCursorAndScrollTop(); // No dragging! event.preventDefault(); @@ -655,10 +629,6 @@ fn: { context.fn.trigger( 'resize' ); } ); } - // Click tracking - if ( mw.config.get( 'wgWikiEditorToolbarClickTracking' ) && $.trackAction !== undefined ) { - $.trackAction( $section.attr('rel') + '.' + ( show ? 'show': 'hide' ) ); - } // Save the currently visible section $.cookie( 'wikiEditor-' + $(this).data( 'context' ).instance + '-toolbar-section', @@ -776,6 +746,8 @@ fn: { var oldValue = $( 'body' ).css( 'position' ); $( 'body' ).css( 'position', 'static' ); $( 'body' ).css( 'position', oldValue ); + + context.$textarea.trigger( 'wikiEditor-toolbar-doneInitialSections' ); }, 'loop' : function( i, s ) { s.$sections.append( $.wikiEditor.modules.toolbar.fn.buildSection( s.context, s.id, s.config ) ); |