r57833 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57832‎ | r57833 | r57834 >
Date:19:41, 16 October 2009
Author:tparscal
Status:deferred
Tags:
Comment:
1. Changed the styling of the TOC to match the styling of the booklet indexes in the toolbar. This is in response to users thinking the links were going to take them to a different page.
2. Found an issue with using innerWidth for ellipsing, which so far seems to be working by just using width instead.
3. Adjusted the animation of the toolbar sections opening and closing - using a distance-based speed (constant delta) rather than a fixed animation length.
4. Improved makefile to only get the distribution of JSMin when you actually need it.
Modified paths:
  • /trunk/extensions/UsabilityInitiative/Makefile (modified) (history)
  • /trunk/extensions/UsabilityInitiative/css/combined.css (modified) (history)
  • /trunk/extensions/UsabilityInitiative/css/combined.min.css (modified) (history)
  • /trunk/extensions/UsabilityInitiative/css/wikiEditor.toc.css (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins.combined.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins/jquery.autoEllipse.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins/jquery.codepress.js (deleted) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.editor.js (added) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toc.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/css/wikiEditor.toc.css
@@ -21,33 +21,56 @@
2222 }
2323 .wikiEditor-ui-toc ul {
2424 padding: 0;
25 - margin: 0.5em 1em;
 25+ margin: 0;
2626 list-style: none;
2727 /* IE needs to be told in great detail how to act, or it misbehaves */
2828 list-style-image: none;
2929 list-style-position: outside;
3030 list-style-type: none;
 31+ width: 100%;
3132 }
 33+.wikiEditor-ui-toc li {
 34+ padding: 0;
 35+ margin: 0;
 36+}
3237 .wikiEditor-ui-toc ul ul {
3338 padding: 0;
3439 margin: 0;
35 - margin-left: 0.75em;
3640 margin-bottom: 0 !important;
3741 margin-top: 0 !important;
3842 list-style: none;
3943 }
40 -body.rtl .wikiEditor-ui-toc ul ul {
41 - margin-left: 0;
42 - margin-right: 0.75em;
43 -}
44 -.wikiEditor-ui-toc ul li a {
 44+.wikiEditor-ui-toc ul li div {
4545 display: block;
4646 font-size: 0.9em;
 47+ padding: 0.125em;
 48+ padding-left: 1em;
 49+ cursor: pointer;
 50+ color: #0645ad;
4751 }
48 -.wikiEditor-ui-toc ul li a.currentSelection {
49 - font-weight: bold;
 52+.wikiEditor-ui-toc ul ul li div {
 53+ padding-left: 2em;
5054 }
51 -.wikiEditor-ui-toc ul li a.section-0 {
 55+.wikiEditor-ui-toc ul ul ul li div {
 56+ padding-left: 3em;
 57+}
 58+.wikiEditor-ui-toc ul ul ul ul li div {
 59+ padding-left: 4em;
 60+}
 61+.wikiEditor-ui-toc ul ul ul ul ul li div {
 62+ padding-left: 5em;
 63+}
 64+.wikiEditor-ui-toc ul ul ul ul ul ul li div {
 65+ padding-left: 6em;
 66+}
 67+.wikiEditor-ui-toc ul li div.current {
 68+ background-color: #FAFAFA;
 69+ color: #333333;
 70+ cursor: default;
 71+}
 72+.wikiEditor-ui-toc ul li div.section-0 {
5273 font-size: 1em;
 74+ padding-top: 0.5em;
 75+ padding-bottom: 0.5em;
5376 border-bottom: solid 1px #DDDDDD;
5477 }
\ No newline at end of file
Index: trunk/extensions/UsabilityInitiative/css/combined.css
@@ -126,34 +126,57 @@
127127 }
128128 .wikiEditor-ui-toc ul {
129129 padding: 0;
130 - margin: 0.5em 1em;
 130+ margin: 0;
131131 list-style: none;
132132 /* IE needs to be told in great detail how to act, or it misbehaves */
133133 list-style-image: none;
134134 list-style-position: outside;
135135 list-style-type: none;
 136+ width: 100%;
136137 }
 138+.wikiEditor-ui-toc li {
 139+ padding: 0;
 140+ margin: 0;
 141+}
137142 .wikiEditor-ui-toc ul ul {
138143 padding: 0;
139144 margin: 0;
140 - margin-left: 0.75em;
141145 margin-bottom: 0 !important;
142146 margin-top: 0 !important;
143147 list-style: none;
144148 }
145 -body.rtl .wikiEditor-ui-toc ul ul {
146 - margin-left: 0;
147 - margin-right: 0.75em;
148 -}
149 -.wikiEditor-ui-toc ul li a {
 149+.wikiEditor-ui-toc ul li div {
150150 display: block;
151151 font-size: 0.9em;
 152+ padding: 0.125em;
 153+ padding-left: 1em;
 154+ cursor: pointer;
 155+ color: #0645ad;
152156 }
153 -.wikiEditor-ui-toc ul li a.currentSelection {
154 - font-weight: bold;
 157+.wikiEditor-ui-toc ul ul li div {
 158+ padding-left: 2em;
155159 }
156 -.wikiEditor-ui-toc ul li a.section-0 {
 160+.wikiEditor-ui-toc ul ul ul li div {
 161+ padding-left: 3em;
 162+}
 163+.wikiEditor-ui-toc ul ul ul ul li div {
 164+ padding-left: 4em;
 165+}
 166+.wikiEditor-ui-toc ul ul ul ul ul li div {
 167+ padding-left: 5em;
 168+}
 169+.wikiEditor-ui-toc ul ul ul ul ul ul li div {
 170+ padding-left: 6em;
 171+}
 172+.wikiEditor-ui-toc ul li div.current {
 173+ background-color: #FAFAFA;
 174+ color: #333333;
 175+ cursor: default;
 176+}
 177+.wikiEditor-ui-toc ul li div.section-0 {
157178 font-size: 1em;
 179+ padding-top: 0.5em;
 180+ padding-bottom: 0.5em;
158181 border-bottom: solid 1px #DDDDDD;
159182 }/* wikiEditor toolbar module */
160183
Index: trunk/extensions/UsabilityInitiative/css/combined.min.css
@@ -114,33 +114,56 @@
115115 }
116116 .wikiEditor-ui-toc ul{
117117 padding:0;
118 -margin:0.5em 1em;
 118+margin:0;
119119 list-style:none;
120120 list-style-image:none;
121121 list-style-position:outside;
122122 list-style-type:none;
 123+width:100%;
123124 }
 125+.wikiEditor-ui-toc li{
 126+padding:0;
 127+margin:0;
 128+}
124129 .wikiEditor-ui-toc ul ul{
125130 padding:0;
126131 margin:0;
127 -margin-left:0.75em;
128132 margin-bottom:0 !important;
129133 margin-top:0 !important;
130134 list-style:none;
131135 }
132 -body.rtl .wikiEditor-ui-toc ul ul{
133 -margin-left:0;
134 -margin-right:0.75em;
135 -}
136 -.wikiEditor-ui-toc ul li a{
 136+.wikiEditor-ui-toc ul li div{
137137 display:block;
138138 font-size:0.9em;
 139+padding:0.125em;
 140+padding-left:1em;
 141+cursor:pointer;
 142+color:#0645ad;
139143 }
140 -.wikiEditor-ui-toc ul li a.currentSelection{
141 -font-weight:bold;
 144+.wikiEditor-ui-toc ul ul li div{
 145+padding-left:2em;
142146 }
143 -.wikiEditor-ui-toc ul li a.section-0{
 147+.wikiEditor-ui-toc ul ul ul li div{
 148+padding-left:3em;
 149+}
 150+.wikiEditor-ui-toc ul ul ul ul li div{
 151+padding-left:4em;
 152+}
 153+.wikiEditor-ui-toc ul ul ul ul ul li div{
 154+padding-left:5em;
 155+}
 156+.wikiEditor-ui-toc ul ul ul ul ul ul li div{
 157+padding-left:6em;
 158+}
 159+.wikiEditor-ui-toc ul li div.current{
 160+background-color:#FAFAFA;
 161+color:#333333;
 162+cursor:default;
 163+}
 164+.wikiEditor-ui-toc ul li div.section-0{
144165 font-size:1em;
 166+padding-top:0.5em;
 167+padding-bottom:0.5em;
145168 border-bottom:solid 1px #DDDDDD;
146169 }
147170 .wikiEditor-ui-toolbar{
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.codepress.js
@@ -1,13 +0,0 @@
2 -/*
3 - *
4 - */
5 -(function ($) {
6 -
7 -$.fn.codePress = function() {
8 - $(this).each( function {
9 - CodePress(this)
10 - } );
11 -};
12 -
13 -
14 -})(jQuery);
\ No newline at end of file
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.autoEllipse.js
@@ -15,27 +15,24 @@
1616 if ( $text.outerWidth() > $(this).innerWidth() ) {
1717 switch ( options.position ) {
1818 case 'right':
19 - // Use binary search-like technique for
20 - // efficiency
 19+ // Use binary search-like technique for efficiency
2120 var l = 0, r = text.length;
22 - var ow, iw;
2321 do {
2422 var m = Math.ceil( ( l + r ) / 2 );
2523 $text.text( text.substr( 0, m ) + '...' );
26 - ow = $text.outerWidth();
27 - iw = $(this).innerWidth();
28 - if ( ow > iw )
 24+ if ( $text.outerWidth() > $(this).width() ) {
2925 // Text is too long
3026 r = m - 1;
31 - else
 27+ } else {
3228 l = m;
 29+ }
3330 } while ( l < r );
3431 break;
3532 case 'center':
3633 // TODO: Use binary search like for 'right'
3734 var i = [Math.round( text.length / 2 ), Math.round( text.length / 2 )];
3835 var side = 1; // Begin with making the end shorter
39 - while ( $text.outerWidth() > ( $(this).innerWidth() ) && i[0] > 0 ) {
 36+ while ( $text.outerWidth() > ( $(this).width() ) && i[0] > 0 ) {
4037 $text.text( text.substr( 0, i[0] ) + '...' + text.substr( i[1] ) );
4138 // Alternate between trimming the end and begining
4239 if ( side == 0 ) {
@@ -52,7 +49,7 @@
5350 case 'left':
5451 // TODO: Use binary search like for 'right'
5552 var r = 0;
56 - while ( $text.outerWidth() > $(this).innerWidth() && r < text.length ) {
 53+ while ( $text.outerWidth() > $(this).width() && r < text.length ) {
5754 $text.text( '...' + text.substr( r ) );
5855 r++;
5956 }
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js
@@ -463,10 +463,10 @@
464464 $(this).parent().parent().find( 'a' ).removeClass( 'current' );
465465 if ( show ) {
466466 $section.fadeIn( 'fast' );
467 - $sections.animate( { 'height': $section.outerHeight() }, 'fast' );
 467+ $sections.animate( { 'height': $section.outerHeight() }, $section.outerHeight() * 2 );
468468 $(this).addClass( 'current' );
469469 } else {
470 - $sections.animate( { 'height': 0 } );
 470+ $sections.animate( { 'height': 0 }, $section.outerHeight() * 2 );
471471 }
472472 // Click tracking
473473 if($.trackAction != undefined){
@@ -567,7 +567,7 @@
568568 s.$sections.append( $.wikiEditor.modules.toolbar.fn.buildSection( s.context, s.id, s.config ) );
569569 var $section = s.$sections.find( '.section:visible' );
570570 if ( $section.size() ) {
571 - $sections.animate( { 'height': $section.outerHeight() }, 'fast' );
 571+ $sections.animate( { 'height': $section.outerHeight() }, $section.outerHeight() * 2 );
572572 }
573573 }
574574 } );
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toc.js
@@ -1,6 +1,4 @@
2 -/**
3 - * TOC Module for wikiEditor
4 - */
 2+/* TOC Module for wikiEditor */
53 ( function( $ ) { $.wikiEditor.modules.toc = {
64
75 /**
@@ -71,7 +69,7 @@
7270 },
7371
7472 unhighlight: function( context ) {
75 - context.modules.$toc.find( 'a' ).removeClass( 'currentSelection' );
 73+ context.modules.$toc.find( 'div' ).removeClass( 'current' );
7674 },
7775 /**
7876 * Highlight the section the cursor is currently within
@@ -95,8 +93,8 @@
9694 }
9795 section = Math.max( 0, section );
9896 }
99 - var sectionLink = context.modules.$toc.find( 'a.section-' + section );
100 - sectionLink.addClass( 'currentSelection' );
 97+ var sectionLink = context.modules.$toc.find( 'div.section-' + section );
 98+ sectionLink.addClass( 'current' );
10199
102100 // Scroll the highlighted link into view if necessary
103101 var relTop = sectionLink.offset().top - context.modules.$toc.offset().top;
@@ -145,16 +143,16 @@
146144 * @param {Object} structure Structured outline
147145 */
148146 function buildList( structure ) {
149 - var list = $( '<ul />' );
 147+ var list = $( '<ul></ul>' );
150148 for ( i in structure ) {
151 - var item = $( '<li />' )
 149+ var item = $( '<li></li>' )
152150 .append(
153 - $( '<a />' )
 151+ $( '<div></div>' )
154152 .attr( 'href', '#' )
155153 .addClass( 'section-' + structure[i].index )
156154 .data( 'textbox', context.$textarea )
157155 .data( 'position', structure[i].position )
158 - .click( function( event ) {
 156+ .bind( 'mousedown', function( event ) {
159157 $(this).data( 'textbox' )
160158 .focus()
161159 .setSelection( $(this).data( 'position' ) )
@@ -235,18 +233,11 @@
236234 // Recursively build the structure and add special item for
237235 // section 0, if needed
238236 var structure = buildStructure( outline );
239 - if ( $( 'input[name=wpSection]' ).val() == '' )
 237+ if ( $( 'input[name=wpSection]' ).val() == '' ) {
240238 structure.unshift( { 'text': wgPageName.replace(/_/g, ' '), 'level': 1, 'index': 0, 'position': 0 } );
 239+ }
241240 context.modules.$toc.html( buildList( structure ) );
242 -
243 - context.modules.$toc.find( 'ul' ).css( 'width', '10em' );
244 -
245 - var links = context.modules.$toc.find( 'ul a' );
246 - // Highlighted links are wider; autoEllipse links in
247 - // highlighted state
248 - links.addClass( 'currentSelection' );
249 - links.autoEllipse( { 'position': 'right', 'tooltip': true } );
250 - links.removeClass( 'currentSelection' );
 241+ context.modules.$toc.find( 'div' ).autoEllipse( { 'position': 'right', 'tooltip': true } );
251242 // Cache the outline for later use
252243 context.data.outline = outline;
253244 }
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.editor.js
@@ -0,0 +1,202 @@
 2+/**
 3+ * TOC Module for wikiEditor
 4+ */
 5+( function( $ ) { $.wikiEditor.modules.$editor = {
 6+
 7+/**
 8+ * API accessible functions
 9+ */
 10+api: {
 11+ //
 12+},
 13+/**
 14+ *
 15+ */
 16+languages: {
 17+ csharp : 'C#',
 18+ css : 'CSS',
 19+ generic : 'Generic',
 20+ html : 'HTML',
 21+ java : 'Java',
 22+ javascript : 'JavaScript',
 23+ perl : 'Perl',
 24+ ruby : 'Ruby',
 25+ php : 'PHP',
 26+ text : 'Text',
 27+ sql : 'SQL',
 28+ vbscript : 'VBScript'
 29+},
 30+/**
 31+ * Internally used functions
 32+ */
 33+fn: {
 34+ create: function( context, config ) {
 35+ context.$textarea
 36+ .attr( 'disabled', true )
 37+ .css( 'overflow', 'hidden' );
 38+ context.modules.editor.$iframe = $( '<iframe></iframe>' )
 39+ .css( {
 40+ 'width': context.$textarea.css( 'width' ),
 41+ 'height': context.$textarea.css( 'height' ),
 42+ 'border': '1px solid gray',
 43+ 'visibility': 'hidden',
 44+ 'position': 'absolute'
 45+ });
 46+ .attr( 'frameborder', 0 )
 47+ context.$textarea
 48+ .css( 'overflow', 'auto' );
 49+
 50+
 51+ var self = document.createElement('iframe');
 52+
 53+ self.textarea = obj;
 54+ self.textarea.disabled = true;
 55+ self.textarea.style.overflow = 'hidden';
 56+
 57+ self.style.height = self.textarea.clientHeight +'px';
 58+ self.style.width = self.textarea.clientWidth +'px';
 59+ self.textarea.style.overflow = 'auto';
 60+
 61+ self.style.border = '1px solid gray';
 62+ self.frameBorder = 0; // remove IE internal iframe border
 63+ self.style.visibility = 'hidden';
 64+ self.style.position = 'absolute';
 65+
 66+
 67+ self.editor = self.contentWindow.CodePress;
 68+ self.editor.body = self.contentWindow.document.getElementsByTagName('body')[0];
 69+ self.editor.setCode(self.textarea.value);
 70+ self.setOptions();
 71+ self.editor.syntaxHighlight('init');
 72+ self.textarea.style.display = 'none';
 73+ self.style.position = 'static';
 74+ self.style.visibility = 'visible';
 75+ self.style.display = 'inline';
 76+ },
 77+ language: function( context, language ) {
 78+ if ( language != undefined ) {
 79+ if(obj) self.textarea.value = document.getElementById(obj) ? document.getElementById(obj).value : obj;
 80+ if(!self.textarea.disabled) return;
 81+ self.language = language ? language : self.getLanguage();
 82+ self.src = CodePress.path+'codepress.html?language='+self.language+'&ts='+(new Date).getTime();
 83+ if(self.attachEvent) self.attachEvent('onload',self.initialize);
 84+ else self.addEventListener('load',self.initialize,false);
 85+
 86+ var config = { "language": "generic", "engine": null };
 87+ var language = "generic"; var engine = "older";
 88+ var ua = navigator.userAgent;
 89+ var ts = (new Date).getTime(); // timestamp to avoid cache
 90+ var lh = location.href;
 91+
 92+ if(ua.match('MSIE')) engine = 'msie';
 93+ else if(ua.match('KHTML')) engine = 'khtml';
 94+ else if(ua.match('Opera')) engine = 'opera';
 95+ else if(ua.match('Gecko')) engine = 'gecko';
 96+ if(lh.match('language=')) language = lh.replace(/.*language=(.*?)(&.*)?$/,'$1');
 97+
 98+ html = '\
 99+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html>\
 100+<head><title>wikiEditor</title><meta name="description" content="wikiEditor" /><script type="text/javascript">\
 101+ <link type="text/css" href="codepress.css?ts='+ts+'" rel="stylesheet" />\
 102+ <link type="text/css" href="languages/'+language+'.css?ts='+ts+'" rel="stylesheet" id="cp-lang-style" />\
 103+ <script type="text/javascript" src="engines/'+engine+'.js?ts='+ts+'"></script>\
 104+ <script type="text/javascript" src="languages/'+language+'.js?ts='+ts+'"></script>\
 105+</head>\
 106+';
 107+
 108+<script type="text/javascript">
 109+if(engine == "msie" || engine == "gecko") document.write('<body><pre> </pre></body>');
 110+else if(engine == "opera") document.write('<body></body>');
 111+// else if(engine == "khtml") document.write('<body> </body>');
 112+</script>
 113+
 114+</html>
 115+
 116+
 117+ ';
 118+
 119+
 120+
 121+
 122+
 123+
 124+
 125+
 126+
 127+
 128+
 129+
 130+
 131+
 132+
 133+ } else {
 134+ for (language in CodePress.languages)
 135+ if(self.options.match('\\b'+language+'\\b'))
 136+ return CodePress.languages[language] ? language : 'generic';
 137+ }
 138+ },
 139+ options: function( context, options ) {
 140+ if ( options != undefined ) {
 141+ $.extend( context.modules.editor.options, options );
 142+ } else {
 143+ return context.modules.editor.options;
 144+ }
 145+ },
 146+ code: function( context, code ) {
 147+ if ( code !== undefined ) {
 148+ // Set
 149+ self.textarea.disabled ? self.editor.setCode(code) : self.textarea.value = code;
 150+ } else {
 151+ // Get
 152+ return self.textarea.disabled ? self.editor.getCode() : self.textarea.value;
 153+ }
 154+ },
 155+ // toggleReadOnly
 156+ lock: function( context ) {
 157+ self.textarea.readOnly = true;
 158+ if(self.style.display != 'none') // prevent exception on FF + iframe with display:none
 159+ self.editor.readOnly( true );
 160+ },
 161+ unlock: function( context ) {
 162+ self.textarea.readOnly = false;
 163+ if(self.style.display != 'none') // prevent exception on FF + iframe with display:none
 164+ self.editor.readOnly( false );
 165+ },
 166+ // toggleEditor
 167+ on: function( context ) {
 168+ self.textarea.disabled = true;
 169+ self.setCode(self.textarea.value);
 170+ self.editor.syntaxHighlight('init');
 171+ self.style.display = 'inline';
 172+ self.textarea.style.display = 'none';
 173+ }
 174+ off: function( context ) {
 175+ self.textarea.value = self.getCode();
 176+ self.textarea.disabled = false;
 177+ self.style.display = 'none';
 178+ self.textarea.style.display = 'inline';
 179+ }
 180+
 181+
 182+
 183+ CodePress.run = function() {
 184+ s = document.getElementsByTagName('script');
 185+ for(var i=0,n=s.length;i<n;i++) {
 186+ if(s[i].src.match('codepress.js')) {
 187+ CodePress.path = s[i].src.replace('codepress.js','');
 188+ }
 189+ }
 190+ t = document.getElementsByTagName('textarea');
 191+ for(var i=0,n=t.length;i<n;i++) {
 192+ if(t[i].className.match('codepress')) {
 193+ id = t[i].id;
 194+ t[i].id = id+'_cp';
 195+ eval(id+' = new CodePress(t[i])');
 196+ t[i].parentNode.insertBefore(eval(id), t[i]);
 197+ }
 198+ }
 199+ }
 200+
 201+}
 202+
 203+}; } ) ( jQuery );
\ No newline at end of file
Property changes on: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.editor.js
___________________________________________________________________
Name: svn:eol-style
1204 + native
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js
@@ -93,27 +93,24 @@
9494 if ( $text.outerWidth() > $(this).innerWidth() ) {
9595 switch ( options.position ) {
9696 case 'right':
97 - // Use binary search-like technique for
98 - // efficiency
 97+ // Use binary search-like technique for efficiency
9998 var l = 0, r = text.length;
100 - var ow, iw;
10199 do {
102100 var m = Math.ceil( ( l + r ) / 2 );
103101 $text.text( text.substr( 0, m ) + '...' );
104 - ow = $text.outerWidth();
105 - iw = $(this).innerWidth();
106 - if ( ow > iw )
 102+ if ( $text.outerWidth() > $(this).width() ) {
107103 // Text is too long
108104 r = m - 1;
109 - else
 105+ } else {
110106 l = m;
 107+ }
111108 } while ( l < r );
112109 break;
113110 case 'center':
114111 // TODO: Use binary search like for 'right'
115112 var i = [Math.round( text.length / 2 ), Math.round( text.length / 2 )];
116113 var side = 1; // Begin with making the end shorter
117 - while ( $text.outerWidth() > ( $(this).innerWidth() ) && i[0] > 0 ) {
 114+ while ( $text.outerWidth() > ( $(this).width() ) && i[0] > 0 ) {
118115 $text.text( text.substr( 0, i[0] ) + '...' + text.substr( i[1] ) );
119116 // Alternate between trimming the end and begining
120117 if ( side == 0 ) {
@@ -130,7 +127,7 @@
131128 case 'left':
132129 // TODO: Use binary search like for 'right'
133130 var r = 0;
134 - while ( $text.outerWidth() > $(this).innerWidth() && r < text.length ) {
 131+ while ( $text.outerWidth() > $(this).width() && r < text.length ) {
135132 $text.text( '...' + text.substr( r ) );
136133 r++;
137134 }
@@ -1986,10 +1983,10 @@
19871984 $(this).parent().parent().find( 'a' ).removeClass( 'current' );
19881985 if ( show ) {
19891986 $section.fadeIn( 'fast' );
1990 - $sections.animate( { 'height': $section.outerHeight() }, 'fast' );
 1987+ $sections.animate( { 'height': $section.outerHeight() }, $section.outerHeight() * 2 );
19911988 $(this).addClass( 'current' );
19921989 } else {
1993 - $sections.animate( { 'height': 0 } );
 1990+ $sections.animate( { 'height': 0 }, $section.outerHeight() * 2 );
19941991 }
19951992 // Click tracking
19961993 if($.trackAction != undefined){
@@ -2090,7 +2087,7 @@
20912088 s.$sections.append( $.wikiEditor.modules.toolbar.fn.buildSection( s.context, s.id, s.config ) );
20922089 var $section = s.$sections.find( '.section:visible' );
20932090 if ( $section.size() ) {
2094 - $sections.animate( { 'height': $section.outerHeight() }, 'fast' );
 2091+ $sections.animate( { 'height': $section.outerHeight() }, $section.outerHeight() * 2 );
20952092 }
20962093 }
20972094 } );
@@ -2098,9 +2095,7 @@
20992096 }
21002097
21012098 }; } )( jQuery );
2102 -/**
2103 - * TOC Module for wikiEditor
2104 - */
 2099+/* TOC Module for wikiEditor */
21052100 ( function( $ ) { $.wikiEditor.modules.toc = {
21062101
21072102 /**
@@ -2171,7 +2166,7 @@
21722167 },
21732168
21742169 unhighlight: function( context ) {
2175 - context.modules.$toc.find( 'a' ).removeClass( 'currentSelection' );
 2170+ context.modules.$toc.find( 'div' ).removeClass( 'current' );
21762171 },
21772172 /**
21782173 * Highlight the section the cursor is currently within
@@ -2195,8 +2190,8 @@
21962191 }
21972192 section = Math.max( 0, section );
21982193 }
2199 - var sectionLink = context.modules.$toc.find( 'a.section-' + section );
2200 - sectionLink.addClass( 'currentSelection' );
 2194+ var sectionLink = context.modules.$toc.find( 'div.section-' + section );
 2195+ sectionLink.addClass( 'current' );
22012196
22022197 // Scroll the highlighted link into view if necessary
22032198 var relTop = sectionLink.offset().top - context.modules.$toc.offset().top;
@@ -2245,16 +2240,16 @@
22462241 * @param {Object} structure Structured outline
22472242 */
22482243 function buildList( structure ) {
2249 - var list = $( '<ul />' );
 2244+ var list = $( '<ul></ul>' );
22502245 for ( i in structure ) {
2251 - var item = $( '<li />' )
 2246+ var item = $( '<li></li>' )
22522247 .append(
2253 - $( '<a />' )
 2248+ $( '<div></div>' )
22542249 .attr( 'href', '#' )
22552250 .addClass( 'section-' + structure[i].index )
22562251 .data( 'textbox', context.$textarea )
22572252 .data( 'position', structure[i].position )
2258 - .click( function( event ) {
 2253+ .bind( 'mousedown', function( event ) {
22592254 $(this).data( 'textbox' )
22602255 .focus()
22612256 .setSelection( $(this).data( 'position' ) )
@@ -2335,18 +2330,11 @@
23362331 // Recursively build the structure and add special item for
23372332 // section 0, if needed
23382333 var structure = buildStructure( outline );
2339 - if ( $( 'input[name=wpSection]' ).val() == '' )
 2334+ if ( $( 'input[name=wpSection]' ).val() == '' ) {
23402335 structure.unshift( { 'text': wgPageName.replace(/_/g, ' '), 'level': 1, 'index': 0, 'position': 0 } );
 2336+ }
23412337 context.modules.$toc.html( buildList( structure ) );
2342 -
2343 - context.modules.$toc.find( 'ul' ).css( 'width', '10em' );
2344 -
2345 - var links = context.modules.$toc.find( 'ul a' );
2346 - // Highlighted links are wider; autoEllipse links in
2347 - // highlighted state
2348 - links.addClass( 'currentSelection' );
2349 - links.autoEllipse( { 'position': 'right', 'tooltip': true } );
2350 - links.removeClass( 'currentSelection' );
 2338+ context.modules.$toc.find( 'div' ).autoEllipse( { 'position': 'right', 'tooltip': true } );
23512339 // Cache the outline for later use
23522340 context.data.outline = outline;
23532341 }
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js
@@ -11,10 +11,8 @@
1212 {var i=0,l=array.length,loop=opts.loop||function(){};$.whileAsync($.extend(opts,{test:function(){return i<l;},loop:function()
1313 {var val=array[i];return loop.call(val,i++,val);}}));}
1414 $.fn.eachAsync=function(opts)
15 -{$.eachAsync(this,opts);return this;}})(jQuery);(function($){$.fn.autoEllipse=function(options){$(this).each(function(){options=$.extend({'position':'center','tooltip':false},options);var text=$(this).text();var $text=$('<span />').text(text).css('whiteSpace','nowrap');$(this).empty().append($text);if($text.outerWidth()>$(this).innerWidth()){switch(options.position){case'right':var l=0,r=text.length;var ow,iw;do{var m=Math.ceil((l+r)/2);$text.text(text.substr(0,m)+'...');ow=$text.outerWidth();iw=$(this).innerWidth();if(ow>iw)
16 -r=m-1;else
17 -l=m;}while(l<r);break;case'center':var i=[Math.round(text.length/2),Math.round(text.length/2)];var side=1;while($text.outerWidth()>($(this).innerWidth())&&i[0]>0){$text.text(text.substr(0,i[0])+'...'+text.substr(i[1]));if(side==0){i[0]--;side=1;}else{i[1]++;side=0;}}
18 -break;case'left':var r=0;while($text.outerWidth()>$(this).innerWidth()&&r<text.length){$text.text('...'+text.substr(r));r++;}
 15+{$.eachAsync(this,opts);return this;}})(jQuery);(function($){$.fn.autoEllipse=function(options){$(this).each(function(){options=$.extend({'position':'center','tooltip':false},options);var text=$(this).text();var $text=$('<span />').text(text).css('whiteSpace','nowrap');$(this).empty().append($text);if($text.outerWidth()>$(this).innerWidth()){switch(options.position){case'right':var l=0,r=text.length;do{var m=Math.ceil((l+r)/2);$text.text(text.substr(0,m)+'...');if($text.outerWidth()>$(this).width()){r=m-1;}else{l=m;}}while(l<r);break;case'center':var i=[Math.round(text.length/2),Math.round(text.length/2)];var side=1;while($text.outerWidth()>($(this).width())&&i[0]>0){$text.text(text.substr(0,i[0])+'...'+text.substr(i[1]));if(side==0){i[0]--;side=1;}else{i[1]++;side=0;}}
 16+break;case'left':var r=0;while($text.outerWidth()>$(this).width()&&r<text.length){$text.text('...'+text.substr(r));r++;}
1917 break;}
2018 if(options.tooltip)
2119 $text.attr('title',text);}});};})(jQuery);(function($){$.browserTest=function(a,z){var u='unknown',x='X',m=function(r,h){for(var i=0;i<h.length;i=i+1){r=r.replace(h[i][0],h[i][1]);}
@@ -132,7 +130,7 @@
133131 return html;},buildRow:function(context,row){var html='<tr>';for(cell in row){html+='<td class="cell cell-'+cell+'" valign="top"><span>'+
134132 $.wikiEditor.autoMsg(row[cell],['html','text'])+'</span></td>';}
135133 html+='</tr>';return html;},buildCharacter:function(character,actions){if(typeof character=='string'){character={'label':character,'action':{'type':'encapsulate','options':{'pre':character}}};}else if(0 in character&&1 in character){character={'label':character[0],'action':{'type':'encapsulate','options':{'pre':character[1]}}};}
136 -if('action'in character&&'label'in character){actions[character.label]=character.action;return'<a rel="'+character.label+'" href="#">'+character.label+'</a>';}},buildTab:function(context,id,section){var selected=$.cookie('wikiEditor-'+context.instance+'-toolbar-section');return $('<span />').attr({'class':'tab tab-'+id,'rel':id}).append($('<a />').addClass(selected==id?'current':null).attr('href','#').text($.wikiEditor.autoMsg(section,'label')).data('context',context).click(function(){var $sections=$(this).data('context').$ui.find('.sections');var $section=$(this).data('context').$ui.find('.section-'+$(this).parent().attr('rel'));$(this).blur();var show=$section.css('display')=='none';$previousSections=$section.parent().find('.section:visible');$previousSections.css('position','absolute');$previousSections.fadeOut('fast',function(){$(this).css('position','relative');});$(this).parent().parent().find('a').removeClass('current');if(show){$section.fadeIn('fast');$sections.animate({'height':$section.outerHeight()},'fast');$(this).addClass('current');}else{$sections.animate({'height':0});}
 134+if('action'in character&&'label'in character){actions[character.label]=character.action;return'<a rel="'+character.label+'" href="#">'+character.label+'</a>';}},buildTab:function(context,id,section){var selected=$.cookie('wikiEditor-'+context.instance+'-toolbar-section');return $('<span />').attr({'class':'tab tab-'+id,'rel':id}).append($('<a />').addClass(selected==id?'current':null).attr('href','#').text($.wikiEditor.autoMsg(section,'label')).data('context',context).click(function(){var $sections=$(this).data('context').$ui.find('.sections');var $section=$(this).data('context').$ui.find('.section-'+$(this).parent().attr('rel'));$(this).blur();var show=$section.css('display')=='none';$previousSections=$section.parent().find('.section:visible');$previousSections.css('position','absolute');$previousSections.fadeOut('fast',function(){$(this).css('position','relative');});$(this).parent().parent().find('a').removeClass('current');if(show){$section.fadeIn('fast');$sections.animate({'height':$section.outerHeight()},$section.outerHeight()*2);$(this).addClass('current');}else{$sections.animate({'height':0},$section.outerHeight()*2);}
137135 if($.trackAction!=undefined){$.trackAction($section.attr('rel')+'.'+(show?'show':'hide'));}
138136 $.cookie('wikiEditor-'+$(this).data('context').instance+'-toolbar-section',show?$section.attr('rel'):null);return false;}));},buildSection:function(context,id,section){context.$textarea.trigger('wikiEditor-toolbar-buildSection-'+id,[section]);var selected=$.cookie('wikiEditor-'+context.instance+'-toolbar-section');var $section;switch(section.type){case'toolbar':var $section=$('<div />').attr({'class':'toolbar section section-'+id,'rel':id});if('groups'in section){for(group in section.groups){$section.append($.wikiEditor.modules.toolbar.fn.buildGroup(context,group,section.groups[group]));}}
139137 break;case'booklet':var $pages=$('<div />').addClass('pages');var $index=$('<div />').addClass('index');if('pages'in section){for(page in section.pages){$pages.append($.wikiEditor.modules.toolbar.fn.buildPage(context,page,section.pages[page]));$index.append($.wikiEditor.modules.toolbar.fn.buildBookmark(context,page,section.pages[page]));}}
@@ -140,16 +138,16 @@
141139 if($section!==null&&id!=='main'){var show=selected==id;$section.css('display',show?'block':'none');}
142140 return $section;},updateBookletSelection:function(context,id,$pages,$index){var cookie='wikiEditor-'+context.instance+'-booklet-'+id+'-page';var selected=$.cookie(cookie);var $selectedIndex=$index.find('*[rel='+selected+']');if($selectedIndex.size()==0){selected=$index.children().eq(0).attr('rel');$.cookie(cookie,selected);}
143141 $pages.children().hide();$pages.find('*[rel='+selected+']').show();$index.children().removeClass('current');$selectedIndex.addClass('current');},build:function(context,config){var $tabs=$('<div />').addClass('tabs').appendTo(context.modules.$toolbar);var $sections=$('<div />').addClass('sections').appendTo(context.modules.$toolbar);context.modules.$toolbar.append($('<div />').css('clear','both'));var sectionQueue=[];for(section in config){if(section=='main'){context.modules.$toolbar.prepend($.wikiEditor.modules.toolbar.fn.buildSection(context,section,config[section]));}else{sectionQueue.push({'$sections':$sections,'context':context,'id':section,'config':config[section]});$tabs.append($.wikiEditor.modules.toolbar.fn.buildTab(context,section,config[section]));}}
144 -$.eachAsync(sectionQueue,{'bulk':0,'end':function(){$('body').css('position','static');$('body').css('position','relative');},'loop':function(i,s){s.$sections.append($.wikiEditor.modules.toolbar.fn.buildSection(s.context,s.id,s.config));var $section=s.$sections.find('.section:visible');if($section.size()){$sections.animate({'height':$section.outerHeight()},'fast');}}});}}};})(jQuery);(function($){$.wikiEditor.modules.toc={api:{},fn:{create:function(context,config){if('$toc'in context.modules){return;}
 142+$.eachAsync(sectionQueue,{'bulk':0,'end':function(){$('body').css('position','static');$('body').css('position','relative');},'loop':function(i,s){s.$sections.append($.wikiEditor.modules.toolbar.fn.buildSection(s.context,s.id,s.config));var $section=s.$sections.find('.section:visible');if($section.size()){$sections.animate({'height':$section.outerHeight()},$section.outerHeight()*2);}}});}}};})(jQuery);(function($){$.wikiEditor.modules.toc={api:{},fn:{create:function(context,config){if('$toc'in context.modules){return;}
145143 context.modules.$toc=$('<div />').addClass('wikiEditor-ui-toc').attr('id','wikiEditor-ui-toc');var height=context.$ui.find('.wikiEditor-ui-bottom').height()
146 -context.$ui.find('.wikiEditor-ui-bottom').append(context.modules.$toc);context.modules.$toc.height(context.$ui.find('.wikiEditor-ui-bottom').height());context.modules.$toc.css({'width':'12em','marginTop':-(height)});context.$ui.find('.wikiEditor-ui-text').css(($('body.rtl').size()?'marginLeft':'marginRight'),'12em');$.wikiEditor.modules.toc.fn.build(context,config);context.$textarea.delayedBind(1000,'keyup encapsulateSelection change',function(event){var context=$(this).data('wikiEditor-context');$(this).eachAsync({bulk:0,loop:function(){$.wikiEditor.modules.toc.fn.build(context);$.wikiEditor.modules.toc.fn.update(context);}});}).bind('mouseup scrollToPosition focus keyup encapsulateSelection change',function(event){var context=$(this).data('wikiEditor-context');$(this).eachAsync({bulk:0,loop:function(){$.wikiEditor.modules.toc.fn.update(context);}});}).blur(function(){var context=$(this).data('wikiEditor-context');$.wikiEditor.modules.toc.fn.unhighlight(context);});},unhighlight:function(context){context.modules.$toc.find('a').removeClass('currentSelection');},update:function(context){$.wikiEditor.modules.toc.fn.unhighlight(context);var position=context.$textarea.getCaretPosition();var section=0;if(context.data.outline.length>0){if(!(position<context.data.outline[0].position-1)){while(section<context.data.outline.length&&context.data.outline[section].position-1<position){section++;}
 144+context.$ui.find('.wikiEditor-ui-bottom').append(context.modules.$toc);context.modules.$toc.height(context.$ui.find('.wikiEditor-ui-bottom').height());context.modules.$toc.css({'width':'12em','marginTop':-(height)});context.$ui.find('.wikiEditor-ui-text').css(($('body.rtl').size()?'marginLeft':'marginRight'),'12em');$.wikiEditor.modules.toc.fn.build(context,config);context.$textarea.delayedBind(1000,'keyup encapsulateSelection change',function(event){var context=$(this).data('wikiEditor-context');$(this).eachAsync({bulk:0,loop:function(){$.wikiEditor.modules.toc.fn.build(context);$.wikiEditor.modules.toc.fn.update(context);}});}).bind('mouseup scrollToPosition focus keyup encapsulateSelection change',function(event){var context=$(this).data('wikiEditor-context');$(this).eachAsync({bulk:0,loop:function(){$.wikiEditor.modules.toc.fn.update(context);}});}).blur(function(){var context=$(this).data('wikiEditor-context');$.wikiEditor.modules.toc.fn.unhighlight(context);});},unhighlight:function(context){context.modules.$toc.find('div').removeClass('current');},update:function(context){$.wikiEditor.modules.toc.fn.unhighlight(context);var position=context.$textarea.getCaretPosition();var section=0;if(context.data.outline.length>0){if(!(position<context.data.outline[0].position-1)){while(section<context.data.outline.length&&context.data.outline[section].position-1<position){section++;}
147145 section=Math.max(0,section);}
148 -var sectionLink=context.modules.$toc.find('a.section-'+section);sectionLink.addClass('currentSelection');var relTop=sectionLink.offset().top-context.modules.$toc.offset().top;var scrollTop=context.modules.$toc.scrollTop();var divHeight=context.modules.$toc.height();var sectionHeight=sectionLink.height();if(relTop<0)
 146+var sectionLink=context.modules.$toc.find('div.section-'+section);sectionLink.addClass('current');var relTop=sectionLink.offset().top-context.modules.$toc.offset().top;var scrollTop=context.modules.$toc.scrollTop();var divHeight=context.modules.$toc.height();var sectionHeight=sectionLink.height();if(relTop<0)
149147 context.modules.$toc.scrollTop(scrollTop+relTop);else if(relTop+sectionHeight>divHeight)
150148 context.modules.$toc.scrollTop(scrollTop+relTop+sectionHeight-divHeight);}},build:function(context){function buildStructure(outline,offset,level){if(offset==undefined)offset=0;if(level==undefined)level=1;var sections=[];for(var i=offset;i<outline.length;i++){if(outline[i].nLevel==level){var sub=buildStructure(outline,i+1,level+1);if(sub.length){outline[i].sections=sub;}
151149 sections[sections.length]=outline[i];}else if(outline[i].nLevel<level){break;}}
152150 return sections;}
153 -function buildList(structure){var list=$('<ul />');for(i in structure){var item=$('<li />').append($('<a />').attr('href','#').addClass('section-'+structure[i].index).data('textbox',context.$textarea).data('position',structure[i].position).click(function(event){$(this).data('textbox').focus().setSelection($(this).data('position')).scrollToCaretPosition(true);if(typeof $.trackAction!='undefined')
 151+function buildList(structure){var list=$('<ul></ul>');for(i in structure){var item=$('<li></li>').append($('<div></div>').attr('href','#').addClass('section-'+structure[i].index).data('textbox',context.$textarea).data('position',structure[i].position).bind('mousedown',function(event){$(this).data('textbox').focus().setSelection($(this).data('position')).scrollToCaretPosition(true);if(typeof $.trackAction!='undefined')
154152 $.trackAction('ntoc.heading');event.preventDefault();}).text(structure[i].text));if(structure[i].sections!==undefined){item.append(buildList(structure[i].sections));}
155153 list.append(item);}
156154 return list;}
@@ -161,5 +159,5 @@
162160 else if(outline[i].level<lastLevel){nLevel-=Math.max(1,lastLevel-outline[i].level);}
163161 if(nLevel<=0){nLevel=1;}
164162 outline[i].nLevel=nLevel;lastLevel=outline[i].level;}
165 -var structure=buildStructure(outline);if($('input[name=wpSection]').val()=='')
166 -structure.unshift({'text':wgPageName.replace(/_/g,' '),'level':1,'index':0,'position':0});context.modules.$toc.html(buildList(structure));context.modules.$toc.find('ul').css('width','10em');var links=context.modules.$toc.find('ul a');links.addClass('currentSelection');links.autoEllipse({'position':'right','tooltip':true});links.removeClass('currentSelection');context.data.outline=outline;}}};})(jQuery);
\ No newline at end of file
 163+var structure=buildStructure(outline);if($('input[name=wpSection]').val()==''){structure.unshift({'text':wgPageName.replace(/_/g,' '),'level':1,'index':0,'position':0});}
 164+context.modules.$toc.html(buildList(structure));context.modules.$toc.find('div').autoEllipse({'position':'right','tooltip':true});context.data.outline=outline;}}};})(jQuery);
\ No newline at end of file
Index: trunk/extensions/UsabilityInitiative/Makefile
@@ -4,30 +4,34 @@
55 # For more info on JSMin, see: http://www.crockford.com/javascript/jsmin.html
66 #
77
8 -CSS := css/suggestions.css\
9 - css/wikiEditor.css\
10 - css/wikiEditor.dialogs.css\
11 - css/wikiEditor.toc.css\
12 - css/wikiEditor.toolbar.css
 8+CSS := \
 9+ css/suggestions.css\
 10+ css/wikiEditor.css\
 11+ css/wikiEditor.dialogs.css\
 12+ css/wikiEditor.toc.css\
 13+ css/wikiEditor.toolbar.css
1314
14 -JS2 := js/js2/jquery-1.3.2.js\
15 - js/js2/jquery-ui-1.7.2.js\
16 - js/js2/js2.js
 15+JS2 := \
 16+ js/js2/jquery-1.3.2.js\
 17+ js/js2/jquery-ui-1.7.2.js\
 18+ js/js2/js2.js
1719
18 -PLUGINS := js/plugins/jquery.async.js\
19 - js/plugins/jquery.autoEllipse.js\
20 - js/plugins/jquery.browser.js\
21 - js/plugins/jquery.cookie.js\
22 - js/plugins/jquery.delayedBind.js\
23 - js/plugins/jquery.namespaceSelect.js\
24 - js/plugins/jquery.suggestions.js\
25 - js/plugins/jquery.textSelection.js\
26 - js/plugins/jquery.wikiEditor.js\
27 - js/plugins/jquery.wikiEditor.dialogs.js\
28 - js/plugins/jquery.wikiEditor.toolbar.js\
29 - js/plugins/jquery.wikiEditor.toc.js
 20+PLUGINS := \
 21+ js/plugins/jquery.async.js\
 22+ js/plugins/jquery.autoEllipse.js\
 23+ js/plugins/jquery.browser.js\
 24+ js/plugins/jquery.cookie.js\
 25+ js/plugins/jquery.delayedBind.js\
 26+ js/plugins/jquery.namespaceSelect.js\
 27+ js/plugins/jquery.suggestions.js\
 28+ js/plugins/jquery.textSelection.js\
 29+ js/plugins/jquery.wikiEditor.js\
 30+ js/plugins/jquery.wikiEditor.dialogs.js\
 31+ js/plugins/jquery.wikiEditor.toolbar.js\
 32+ js/plugins/jquery.wikiEditor.toc.js
3033
31 -all: css/combined.css\
 34+all: \
 35+ css/combined.css\
3236 css/combined.min.css\
3337 js/js2.combined.js\
3438 js/js2.combined.min.js\
@@ -43,21 +47,25 @@
4448 js/plugins.combined.js: $(PLUGINS)
4549 cat $(PLUGINS) > js/plugins.combined.js
4650
47 -js/js2.combined.min.js : js/js2.combined.js ./jsmin
48 - jsmin < js/js2.combined.js > js/js2.combined.min.js
 51+js/js2.combined.min.js : js/js2.combined.js jsmin
 52+ if [ -e ./jsmin ]; then ./jsmin < js/js2.combined.js > js/js2.combined.min.js;\
 53+ else jsmin < js/js2.combined.js > js/js2.combined.min.js; fi
4954
50 -js/plugins.combined.min.js : js/plugins.combined.js ./jsmin
51 - jsmin < js/plugins.combined.js > js/plugins.combined.min.js
 55+js/plugins.combined.min.js : js/plugins.combined.js jsmin
 56+ if [ -e ./jsmin ]; then ./jsmin < js/plugins.combined.js > js/plugins.combined.min.js;\
 57+ else jsmin < js/plugins.combined.js > js/plugins.combined.min.js; fi
5258
5359 css/combined.min.css : css/combined.css
54 - cat css/combined.css |\
55 - sed -e 's/^[ ]*//g; s/[ ]*$$//g; s/\([:{;,]\) /\1/g; s/ {/{/g; s/\/\*.*\*\///g; /^$$/d'\
 60+ cat css/combined.css | sed -e 's/^[ ]*//g; s/[ ]*$$//g; s/\([:{;,]\) /\1/g; s/ {/{/g; s/\/\*.*\*\///g; /^$$/d'\
5661 > css/combined.min.css
5762
58 -./jsmin:
59 - wget http://www.crockford.com/javascript/jsmin.c
60 - gcc jsmin.c -o jsmin
 63+jsmin:
 64+ type -P jsmin &>/dev/null || ( wget http://www.crockford.com/javascript/jsmin.c; gcc jsmin.c -o jsmin )
6165
 66+distclean: clean
 67+ rm -rf jsmin
 68+ rm -rf jsmin.c
 69+
6270 clean:
6371 rm -f js/js2.combined.*
6472 rm -f js/plugins.combined.*

Follow-up revisions

RevisionCommit summaryAuthorDate
r59204wmf-deployment: Merging usability changes from trunk...catrope18:53, 18 November 2009

Status & tagging log