Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -72,7 +72,7 @@ |
73 | 73 | array( 'src' => 'js/plugins/jquery.delayedBind.js', 'version' => 1 ), |
74 | 74 | array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 7 ), |
75 | 75 | array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 27 ), |
76 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 157 ), |
| 76 | + array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 158 ), |
77 | 77 | array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 36 ), |
78 | 78 | array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 52 ), |
79 | 79 | array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 19 ), |
— | — | @@ -82,10 +82,10 @@ |
83 | 83 | array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 3 ), |
84 | 84 | ), |
85 | 85 | 'combined' => array( |
86 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 300 ), |
| 86 | + array( 'src' => 'js/plugins.combined.js', 'version' => 301 ), |
87 | 87 | ), |
88 | 88 | 'minified' => array( |
89 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 300 ), |
| 89 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 301 ), |
90 | 90 | ), |
91 | 91 | ), |
92 | 92 | ); |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.js |
— | — | @@ -1848,6 +1848,10 @@ |
1849 | 1849 | if ( !wgWikiEditorEnabledModules.templateEditor ) { |
1850 | 1850 | return true; |
1851 | 1851 | } |
| 1852 | + //disable if in template namespace |
| 1853 | + if( wgNamespaceNumber == wgNamespaceIds['template']){ |
| 1854 | + return true; |
| 1855 | + } |
1852 | 1856 | // Add the templateEditor module |
1853 | 1857 | if ( $j.fn.wikiEditor ) { |
1854 | 1858 | $j( 'textarea#wpTextbox1' ).wikiEditor( 'addModule', 'templateEditor' ); |
Index: trunk/extensions/UsabilityInitiative/WikiEditor/WikiEditor.combined.min.js |
— | — | @@ -177,4 +177,5 @@ |
178 | 178 | $j('#wikieditor-toolbar-replace-success').text(u.getMsg('wikieditor-toolbar-tool-replace-success',match.length)).show();$j(this).data('offset',0);}else{var start=match.index+offset;var end=start+match[0].length;var newEnd=start+replaceStr.length;$textarea.textSelection('setSelection',{'start':start,'end':end});if(mode=='replace'){$textarea.textSelection('encapsulateSelection',{'peri':replaceStr,'replace':true}).textSelection('setSelection',{'start':start,'end':newEnd});} |
179 | 179 | $textarea.textSelection('scrollToCaretPosition');$j(this).data('offset',mode=='replace'?newEnd:end);}});},dialog:{width:500,dialogClass:'wikiEditor-toolbar-dialog',buttons:{'wikieditor-toolbar-tool-replace-button-findnext':function(e){$j(this).closest('.ui-dialog').data('dialogaction',e.target);$j(this).data('replaceCallback').call(this,'find');},'wikieditor-toolbar-tool-replace-button-replacenext':function(e){$j(this).closest('.ui-dialog').data('dialogaction',e.target);$j(this).data('replaceCallback').call(this,'replace');},'wikieditor-toolbar-tool-replace-button-replaceall':function(e){$j(this).closest('.ui-dialog').data('dialogaction',e.target);$j(this).data('replaceCallback').call(this,'replaceAll');},'wikieditor-toolbar-tool-replace-close':function(){$j(this).dialog('close');}},open:function(){$j(this).data('offset',0);$j('#wikieditor-toolbar-replace-search').focus();$j('#wikieditor-toolbar-replace-nomatch, #wikieditor-toolbar-replace-success, #wikieditor-toolbar-replace-emptysearch, #wikieditor-toolbar-replace-invalidregex').hide();if(!($j(this).data('onetimeonlystuff'))){$j(this).data('onetimeonlystuff',true);$j(this).closest('.ui-dialog').keypress(function(e){if((e.keyCode||e.which)==13){var button=$j(this).data('dialogaction')||$j(this).find('button:first');button.click();e.preventDefault();}});$j(this).closest('.ui-dialog').find('button').focus(function(){$j(this).closest('.ui-dialog').data('dialogaction',this);});} |
180 | 180 | var dialog=$j(this).closest('.ui-dialog');var that=this;$j($j(this).data('context').$iframe[0].contentWindow.document).bind('keypress.srdialog',function(e){if((e.keyCode||e.which)==13){var button=dialog.data('dialogaction')||dialog.find('button:first');button.click();e.preventDefault();}else if((e.keyCode||e.which)==27){$j(that).dialog('close');}});},close:function(){$j($j(this).data('context').$iframe[0].contentWindow.document).unbind('keypress.srdialog');$j(this).closest('.ui-dialog').data('dialogaction',false);}}}}});}});$j(document).ready(function(){if(!wgWikiEditorEnabledModules.templateEditor){return true;} |
| 181 | +if(wgNamespaceNumber==wgNamespaceIds['template']){return true;} |
181 | 182 | if($j.fn.wikiEditor){$j('textarea#wpTextbox1').wikiEditor('addModule','templateEditor');}}); |
\ No newline at end of file |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js |
— | — | @@ -593,7 +593,8 @@ |
594 | 594 | $element = $element.closest( 'p' ); |
595 | 595 | } |
596 | 596 | $element.css( 'backgroundColor', '#AACCFF' ); |
597 | | - setTimeout( function() { $element.animate( { 'backgroundColor': 'white' }, 'slow' ); }, 100 ) |
| 597 | + setTimeout( function() { $element.animate( { 'backgroundColor': 'white' }, 'slow' ); }, 100 ); |
| 598 | + setTimeout( function() { $element.css( 'backgroundColor', 'white' ); }, 1000 ); |
598 | 599 | }, |
599 | 600 | 'htmlToText': function( html ) { |
600 | 601 | // This function is slow for large inputs, so aggressively cache input/output pairs |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -7136,7 +7136,8 @@ |
7137 | 7137 | $element = $element.closest( 'p' ); |
7138 | 7138 | } |
7139 | 7139 | $element.css( 'backgroundColor', '#AACCFF' ); |
7140 | | - setTimeout( function() { $element.animate( { 'backgroundColor': 'white' }, 'slow' ); }, 100 ) |
| 7140 | + setTimeout( function() { $element.animate( { 'backgroundColor': 'white' }, 'slow' ); }, 100 ); |
| 7141 | + setTimeout( function() { $element.css( 'backgroundColor', 'white' ); }, 1000 ); |
7141 | 7142 | }, |
7142 | 7143 | 'htmlToText': function( html ) { |
7143 | 7144 | // This function is slow for large inputs, so aggressively cache input/output pairs |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -479,7 +479,7 @@ |
480 | 480 | event.preventDefault();return false;}).text($.wikiEditor.autoMsg(options,'title'))).appendTo(context.$tabs);} |
481 | 481 | if(!context.$tabs.children().size()){addTab({'name':'wikitext','titleMsg':'wikieditor-wikitext-tab'});} |
482 | 482 | addTab(options);return $('<div></div>').addClass('wikiEditor-ui-view wikiEditor-ui-view-'+options.name).hide().appendTo(context.$ui);},'highlightLine':function($element,mode){if(!$element.is('p')){$element=$element.closest('p');} |
483 | | -$element.css('backgroundColor','#AACCFF');setTimeout(function(){$element.animate({'backgroundColor':'white'},'slow');},100)},'htmlToText':function(html){if(html in context.htmlToTextMap){return context.htmlToTextMap[html];} |
| 483 | +$element.css('backgroundColor','#AACCFF');setTimeout(function(){$element.animate({'backgroundColor':'white'},'slow');},100);setTimeout(function(){$element.css('backgroundColor','white');},1000);},'htmlToText':function(html){if(html in context.htmlToTextMap){return context.htmlToTextMap[html];} |
484 | 484 | var origHTML=html;html=html.replace(/\r?\n/g,"").replace(/ /g," ").replace(/\<br[^\>]*\>\<\/p\>/gi,'</p>').replace(/\<\/p\>\s*\<p[^\>]*\>/gi,"\n").replace(/\<br[^\>]*\>/gi,"\n").replace(/\<\/p\>(\n*)\<p[^\>]*\>/gi,"$1\n").replace(/\<p[^\>]*\><p[^\>]*\>/gi,'<p>').replace(/\<\/p\><\/p\>/gi,'</p>');var leading=html.match(/^\s*/)[0];var trailing=html.match(/\s*$/)[0];html=html.substr(leading.length,html.length-leading.length-trailing.length);var $pre=$('<pre>'+html+'</pre>');$pre.find('.wikiEditor-noinclude').each(function(){$(this).remove();});$pre.find('.wikiEditor-tab').each(function(){$(this).text("\t");});$pre.find('br').each(function(){$(this).replaceWith("\n");});$pre.find('p').each(function(){var text=$(this).text();var t=new context.fn.rawTraverser(this.firstChild,0,this,$pre.get(0)).prev();while(t&&t.node.nodeName!='#text'&&t.node.nodeName!='BR'&&t.node.nodeName!='P'){t=t.prev();} |
485 | 485 | if(t){text="\n"+text;} |
486 | 486 | t=new context.fn.rawTraverser(this.lastChild,0,this,$pre.get(0)).next();while(t&&t.node.nodeName!='#text'&&t.node.nodeName!='BR'&&t.node.nodeName!='P'){t=t.next();} |