r104766 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104765‎ | r104766 | r104767 >
Date:22:44, 30 November 2011
Author:tparscal
Status:deferred
Tags:
Comment:
Fixed floating issues with toolbar
Modified paths:
  • /trunk/extensions/VisualEditor/demo/index.html (modified) (history)
  • /trunk/extensions/VisualEditor/modules/es/views/es.ToolbarView.js (modified) (history)
  • /trunk/extensions/VisualEditor/modules/sandbox/sandbox.css (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/demo/index.html
@@ -61,7 +61,6 @@
6262 <body>
6363 <div id="es-base">
6464 <div id="es-toolbar" class="es-toolbar">
65 - <div style="clear:both"></div>
6665 <div id="es-toolbar-shadow"></div>
6766 </div>
6867 <div id="es-panes">
@@ -75,7 +74,6 @@
7675 <div id="es-preview-render" class="es-preview es-render"></div>
7776 <div id="es-preview-history" class="es-preview es-history"></div>
7877 </div>
79 - <div style="clear:both"></div>
8078 </div>
8179 </div>
8280
Index: trunk/extensions/VisualEditor/modules/es/views/es.ToolbarView.js
@@ -7,8 +7,9 @@
88 $window = $( window );
99
1010 this.surfaceView = surfaceView;
11 - this.$spacer = $('<div>');
 11+ this.$spacer = $('<div></div>');
1212 this.$ = $container;
 13+ this.$groups = $( '<div class="es-toolbarGroups"></div>' ).prependTo( this.$ );
1314 this.$.after( this.$spacer );
1415
1516 /*
@@ -52,7 +53,7 @@
5354 es.ToolbarView.tools = {};
5455
5556 es.ToolbarView.prototype.setup = function() {
56 - for ( var i = this.config.length - 1; i >= 0; i-- ) {
 57+ for ( var i = 0; i < this.config.length; i++ ) {
5758 var $group = $( '<div>' )
5859 .addClass( 'es-toolbarGroup' )
5960 .addClass( 'es-toolbarGroup-' + this.config[i].name )
@@ -65,7 +66,7 @@
6667 $group.append( tool.$ );
6768 }
6869
69 - this.$.prepend( $group );
 70+ this.$groups.append( $group );
7071 }
7172 };
7273
Index: trunk/extensions/VisualEditor/modules/sandbox/sandbox.css
@@ -46,6 +46,14 @@
4747 .es-showData #es-editor {
4848 border-right: solid 1px #cccccc;
4949 }
 50+.es-toolbarGroups:after,
 51+.es-toolbarGroup:after {
 52+ content: ".";
 53+ display: block;
 54+ height: 0;
 55+ clear: both;
 56+ visibility: hidden;
 57+}
5058 .es-toolbarGroup {
5159 float: left;
5260 padding: 0.25em;

Status & tagging log