r94383 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94382‎ | r94383 | r94384 >
Date:20:52, 12 August 2011
Author:tparscal
Status:deferred
Tags:
Comment:
Added numbering functionality to list items
Modified paths:
  • /trunk/parsers/wikidom/lib/es/es.ListBlockItem.js (modified) (history)
  • /trunk/parsers/wikidom/lib/es/es.Surface.css (modified) (history)
  • /trunk/parsers/wikidom/lib/es/images/hash.png (deleted) (history)

Diff [purge]

Index: trunk/parsers/wikidom/lib/es/es.Surface.css
@@ -33,6 +33,7 @@
3434 }
3535
3636 .editSurface-listItem {
 37+ position: relative;
3738 padding: 0 0 0 1em;
3839 background-position: left 0.6em;
3940 background-repeat: no-repeat;
@@ -43,9 +44,21 @@
4445 }
4546
4647 .editSurface-listItem-number {
47 - background-image: url(images/hash.png);
 48+ /* */
4849 }
4950
 51+.editSurface-listItem-bullet .editSurface-listItem-icon {
 52+ display: none;
 53+}
 54+
 55+.editSurface-listItem-number .editSurface-listItem-icon {
 56+ position: absolute;
 57+ right: 100%;
 58+ margin-right: -0.5em;
 59+ height: 1.5em;
 60+ line-height: 1.5em;
 61+}
 62+
5063 .editSurface-listItem-level0 {
5164 margin-left: 0.5em;
5265 }
Index: trunk/parsers/wikidom/lib/es/es.ListBlockItem.js
@@ -2,10 +2,14 @@
33 es.EventEmitter.call( this );
44
55 this.content = content || new es.Content();
6 - this.$ = $( '<div class="editSurface-listItem editSurface-listItem-content"></div>' )
7 - .addClass( 'editSurface-listItem-level' + level )
8 - .addClass( 'editSurface-listItem-' + style );
9 - this.flow = new es.Flow( this.$, this.content );
 6+ this.$icon = $( '<div class="editSurface-listItem-icon"></div>' );
 7+ this.$content = $( '<div class="editSurface-listItem-content"></div>' );
 8+ this.$ = $( '<div class="editSurface-listItem"></div>' )
 9+ .append( this.$icon )
 10+ .append( this.$content );
 11+ this.setStyle( style );
 12+ this.setLevel( level );
 13+ this.flow = new es.Flow( this.$content, this.content );
1014 // Listen to render events and trigger update event upstream
1115 var listBlockItem = this;
1216 this.flow.on( 'render', function() {
@@ -13,6 +17,10 @@
1418 } );
1519 }
1620
 21+es.ListBlockItem.prototype.setNumber = function( number ) {
 22+ this.$icon.text( number + '.' );
 23+};
 24+
1725 es.ListBlockItem.prototype.setLevel = function( level ) {
1826 this.$.removeClass( 'editSurface-listItem-level' + this.level );
1927 this.level = level;
Index: trunk/parsers/wikidom/lib/es/images/hash.png
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Status & tagging log