r110694 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110693‎ | r110694 | r110695 >
Date:11:59, 4 February 2012
Author:ialex
Status:ok
Tags:
Comment:
svn:eol-style native
Modified paths:
  • /trunk/extensions/EducationProgram/resources/ep.ambprofile.js (modified) (history)
  • /trunk/extensions/EducationProgram/specials/SpecialAmbassadorProfile.php (modified) (history)
  • /trunk/extensions/TreeAndMenu/star.js (modified) (history)
  • /trunk/extensions/TreeAndMenu/treeandmenu.css (modified) (history)
  • /trunk/extensions/VisualEditor/contentEditable/ime.html (modified) (history)
  • /trunk/extensions/VisualEditor/contentEditable/styles/es.DocumentView.css (modified) (history)
  • /trunk/extensions/VisualEditor/contentEditable/styles/es.SurfaceView.css (modified) (history)
  • /trunk/extensions/VisualEditor/contentEditable/views/es.ToolbarView.js (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/contentEditable/styles/es.SurfaceView.css
@@ -1,27 +1,27 @@
2 -.es-surfaceView {
3 - overflow: hidden;
4 - font-size: 1em; /* to look more like MediaWiki use: 0.8em */;
5 -}
6 -
7 -.es-surfaceView-textarea {
8 - position: absolute;
9 - z-index: -1;
10 - opacity: 0;
11 - color: white;
12 - background-color: white;
13 - border: none;
14 - padding: 0;
15 - margin: 0;
16 - width: 1px;
17 -}
18 -
19 -.es-surfaceView-textarea:focus {
20 - outline: none;
21 -}
22 -
23 -.es-surfaceView-cursor {
24 - position: absolute;
25 - background-color: black;
26 - width: 1px;
27 - display: none;
28 -}
 2+.es-surfaceView {
 3+ overflow: hidden;
 4+ font-size: 1em; /* to look more like MediaWiki use: 0.8em */;
 5+}
 6+
 7+.es-surfaceView-textarea {
 8+ position: absolute;
 9+ z-index: -1;
 10+ opacity: 0;
 11+ color: white;
 12+ background-color: white;
 13+ border: none;
 14+ padding: 0;
 15+ margin: 0;
 16+ width: 1px;
 17+}
 18+
 19+.es-surfaceView-textarea:focus {
 20+ outline: none;
 21+}
 22+
 23+.es-surfaceView-cursor {
 24+ position: absolute;
 25+ background-color: black;
 26+ width: 1px;
 27+ display: none;
 28+}
Property changes on: trunk/extensions/VisualEditor/contentEditable/styles/es.SurfaceView.css
___________________________________________________________________
Added: svn:eol-style
2929 + native
Index: trunk/extensions/VisualEditor/contentEditable/styles/es.DocumentView.css
@@ -1,160 +1,160 @@
2 -.es-documentView {
3 - cursor: text;
4 - overflow: hidden;
5 - /*-webkit-user-select: none;*/
6 -}
7 -
8 -.es-headingView,
9 -.es-tableView,
10 -.es-listView,
11 -.es-preView,
12 -.es-paragraphView {
13 - margin: 1em 0;
14 - min-height: 1.5em;
15 -}
16 -
17 -.es-listItemView > .es-paragraphView {
18 - margin-left: 0;
19 - margin-right: 0;
20 -}
21 -.es-listItemView > .es-viewBranchNode-firstChild {
22 - margin: 0;
23 -}
24 -
25 -.es-preView {
26 - padding: 1em;
27 - border: 1px dashed #2F6FAB;
28 -}
29 -.es-preView > * {
30 - font-family: monospace,"Courier New";
31 -}
32 -
33 -.es-headingView-level1,
34 -.es-headingView-level2 {
35 - border-bottom: 1px solid #AAA;
36 -}
37 -
38 -.es-headingView-level1 > * {
39 - font-size: 188%;
40 - font-weight: normal;
41 -}
42 -
43 -.es-headingView-level2 > * {
44 - font-size: 150%;
45 - font-weight: normal;
46 -}
47 -
48 -.es-headingView-level3 > * {
49 - font-size: 132%;
50 - font-weight: bold;
51 -}
52 -
53 -.es-headingView-level4 > * {
54 - font-size: 116%;
55 - font-weight: bold;
56 -}
57 -
58 -.es-headingView-level5 > * {
59 - font-size: 100%;
60 - font-weight: bold;
61 -}
62 -
63 -.es-headingView-level6 > * {
64 - font-size: 80%;
65 - font-weight: bold;
66 -}
67 -
68 -.es-listItemView {
69 - position: relative;
70 -}
71 -
72 -.es-listItemView-bullet {
73 - padding-left: 1.2em;
74 -}
75 -
76 -.es-listItemView-number {
77 - padding-left: 3.2em;
78 -}
79 -
80 -.es-listItemView-icon {
81 - position: absolute;
82 - right: 100%;
83 - height: 1.5em;
84 - line-height: 1.5em;
85 -}
86 -
87 -.es-listItemView-bullet .es-listItemView-icon {
88 - background-image: url(../images/bullet-icon.png);
89 - background-position: left 0.6em;
90 - background-repeat: no-repeat;
91 - width: 5px;
92 - margin-right: -0.5em;
93 -}
94 -
95 -.es-listItemView-number .es-listItemView-icon {
96 - margin-right: -2.8em;
97 -}
98 -
99 -.es-listItemView-term {
100 - font-weight: bold;
101 -}
102 -
103 -.es-listItemView-definition .es-contentView {
104 - margin-left: 2em;
105 -}
106 -
107 -.es-listItemView-level0 {
108 - margin-left: 0;
109 -}
110 -
111 -.es-listItemView-level1 {
112 - margin-left: 2em;
113 -}
114 -
115 -.es-listItemView-level2 {
116 - margin-left: 4em;
117 -}
118 -
119 -.es-listItemView-level3 {
120 - margin-left: 6em;
121 -}
122 -
123 -.es-listItemView-level4 {
124 - margin-left: 8em;
125 -}
126 -
127 -.es-listItemView-level5 {
128 - margin-left: 10em;
129 -}
130 -
131 -.es-listItemView-level6 {
132 - margin-left: 12em;
133 -}
134 -
135 -.es-listItemView-level1.es-listItemView-number {
136 - margin-left: 4em;
137 -}
138 -
139 -.es-listItemView-level2.es-listItemView-number {
140 - margin-left: 8em;
141 -}
142 -
143 -.es-listItemView-level3.es-listItemView-number {
144 - margin-left: 12em;
145 -}
146 -
147 -.es-listItemView-level4.es-listItemView-number {
148 - margin-left: 16em;
149 -}
150 -
151 -.es-listItemView-level5.es-listItemView-number {
152 - margin-left: 18em;
153 -}
154 -
155 -.es-listItemView-level6.es-listItemView-number {
156 - margin-left: 22em;
157 -}
158 -
159 -[contenteditable="true"] {
160 - outline: none;
 2+.es-documentView {
 3+ cursor: text;
 4+ overflow: hidden;
 5+ /*-webkit-user-select: none;*/
 6+}
 7+
 8+.es-headingView,
 9+.es-tableView,
 10+.es-listView,
 11+.es-preView,
 12+.es-paragraphView {
 13+ margin: 1em 0;
 14+ min-height: 1.5em;
 15+}
 16+
 17+.es-listItemView > .es-paragraphView {
 18+ margin-left: 0;
 19+ margin-right: 0;
 20+}
 21+.es-listItemView > .es-viewBranchNode-firstChild {
 22+ margin: 0;
 23+}
 24+
 25+.es-preView {
 26+ padding: 1em;
 27+ border: 1px dashed #2F6FAB;
 28+}
 29+.es-preView > * {
 30+ font-family: monospace,"Courier New";
 31+}
 32+
 33+.es-headingView-level1,
 34+.es-headingView-level2 {
 35+ border-bottom: 1px solid #AAA;
 36+}
 37+
 38+.es-headingView-level1 > * {
 39+ font-size: 188%;
 40+ font-weight: normal;
 41+}
 42+
 43+.es-headingView-level2 > * {
 44+ font-size: 150%;
 45+ font-weight: normal;
 46+}
 47+
 48+.es-headingView-level3 > * {
 49+ font-size: 132%;
 50+ font-weight: bold;
 51+}
 52+
 53+.es-headingView-level4 > * {
 54+ font-size: 116%;
 55+ font-weight: bold;
 56+}
 57+
 58+.es-headingView-level5 > * {
 59+ font-size: 100%;
 60+ font-weight: bold;
 61+}
 62+
 63+.es-headingView-level6 > * {
 64+ font-size: 80%;
 65+ font-weight: bold;
 66+}
 67+
 68+.es-listItemView {
 69+ position: relative;
 70+}
 71+
 72+.es-listItemView-bullet {
 73+ padding-left: 1.2em;
 74+}
 75+
 76+.es-listItemView-number {
 77+ padding-left: 3.2em;
 78+}
 79+
 80+.es-listItemView-icon {
 81+ position: absolute;
 82+ right: 100%;
 83+ height: 1.5em;
 84+ line-height: 1.5em;
 85+}
 86+
 87+.es-listItemView-bullet .es-listItemView-icon {
 88+ background-image: url(../images/bullet-icon.png);
 89+ background-position: left 0.6em;
 90+ background-repeat: no-repeat;
 91+ width: 5px;
 92+ margin-right: -0.5em;
 93+}
 94+
 95+.es-listItemView-number .es-listItemView-icon {
 96+ margin-right: -2.8em;
 97+}
 98+
 99+.es-listItemView-term {
 100+ font-weight: bold;
 101+}
 102+
 103+.es-listItemView-definition .es-contentView {
 104+ margin-left: 2em;
 105+}
 106+
 107+.es-listItemView-level0 {
 108+ margin-left: 0;
 109+}
 110+
 111+.es-listItemView-level1 {
 112+ margin-left: 2em;
 113+}
 114+
 115+.es-listItemView-level2 {
 116+ margin-left: 4em;
 117+}
 118+
 119+.es-listItemView-level3 {
 120+ margin-left: 6em;
 121+}
 122+
 123+.es-listItemView-level4 {
 124+ margin-left: 8em;
 125+}
 126+
 127+.es-listItemView-level5 {
 128+ margin-left: 10em;
 129+}
 130+
 131+.es-listItemView-level6 {
 132+ margin-left: 12em;
 133+}
 134+
 135+.es-listItemView-level1.es-listItemView-number {
 136+ margin-left: 4em;
 137+}
 138+
 139+.es-listItemView-level2.es-listItemView-number {
 140+ margin-left: 8em;
 141+}
 142+
 143+.es-listItemView-level3.es-listItemView-number {
 144+ margin-left: 12em;
 145+}
 146+
 147+.es-listItemView-level4.es-listItemView-number {
 148+ margin-left: 16em;
 149+}
 150+
 151+.es-listItemView-level5.es-listItemView-number {
 152+ margin-left: 18em;
 153+}
 154+
 155+.es-listItemView-level6.es-listItemView-number {
 156+ margin-left: 22em;
 157+}
 158+
 159+[contenteditable="true"] {
 160+ outline: none;
161161 }
\ No newline at end of file
Property changes on: trunk/extensions/VisualEditor/contentEditable/styles/es.DocumentView.css
___________________________________________________________________
Added: svn:eol-style
162162 + native
Property changes on: trunk/extensions/VisualEditor/contentEditable/ime.html
___________________________________________________________________
Added: svn:eol-style
163163 + native
Index: trunk/extensions/VisualEditor/contentEditable/views/es.ToolbarView.js
@@ -1,67 +1,67 @@
2 -// ToolbarView
3 -es.ToolbarView = function( $container, surfaceView, config ) {
4 - // Inheritance TODO: Do we still need it?
5 - es.EventEmitter.call( this );
6 - if ( !surfaceView ) {
7 - return;
8 - }
9 -
10 - // References for use in closures
11 - var _this = this,
12 - $window = $( window );
13 -
14 - // Properties
15 - this.surfaceView = surfaceView;
16 - this.$ = $container;
17 - this.$groups = $( '<div class="es-toolbarGroups"></div>' ).prependTo( this.$ );
18 - this.tools = [];
19 -
20 - this.surfaceView.on( 'cursor', function( annotations, nodes ) {
21 - for( var i = 0; i < _this.tools.length; i++ ) {
22 - _this.tools[i].updateState( annotations, nodes );
23 - }
24 - } );
25 -
26 - config = [];
27 - this.config = config || [
28 - { 'name': 'history', 'items' : ['undo', 'redo'] },
29 - { 'name': 'textStyle', 'items' : ['format'] },
30 - { 'name': 'textStyle', 'items' : ['bold', 'italic', 'link', 'clear'] },
31 - { 'name': 'list', 'items' : ['number', 'bullet', 'outdent', 'indent'] }
32 - ];
33 - this.setup();
34 -};
35 -
36 -/* Methods */
37 -
38 -es.ToolbarView.prototype.getSurfaceView = function() {
39 - return this.surfaceView;
40 -};
41 -
42 -es.ToolbarView.prototype.setup = function() {
43 - for ( var i = 0; i < this.config.length; i++ ) {
44 - var $group = $( '<div>' )
45 - .addClass( 'es-toolbarGroup' )
46 - .addClass( 'es-toolbarGroup-' + this.config[i].name );
47 - if ( this.config[i].label ) {
48 - $group.append(
49 - $( '<div>' ).addClass( 'es-toolbarLabel' ).html( this.config[i].label )
50 - );
51 - }
52 -
53 - for ( var j = 0; j < this.config[i].items.length; j++ ) {
54 - var toolDefintion = es.Tool.tools[ this.config[i].items[j] ];
55 - if ( toolDefintion ) {
56 - var tool = new toolDefintion.constructor(
57 - this, toolDefintion.name, toolDefintion.title, toolDefintion.data
58 - );
59 - this.tools.push( tool );
60 - $group.append( tool.$ );
61 - }
62 - }
63 -
64 - this.$groups.append( $group );
65 - }
66 -};
67 -
68 -es.extendClass( es.ToolbarView, es.EventEmitter );
 2+// ToolbarView
 3+es.ToolbarView = function( $container, surfaceView, config ) {
 4+ // Inheritance TODO: Do we still need it?
 5+ es.EventEmitter.call( this );
 6+ if ( !surfaceView ) {
 7+ return;
 8+ }
 9+
 10+ // References for use in closures
 11+ var _this = this,
 12+ $window = $( window );
 13+
 14+ // Properties
 15+ this.surfaceView = surfaceView;
 16+ this.$ = $container;
 17+ this.$groups = $( '<div class="es-toolbarGroups"></div>' ).prependTo( this.$ );
 18+ this.tools = [];
 19+
 20+ this.surfaceView.on( 'cursor', function( annotations, nodes ) {
 21+ for( var i = 0; i < _this.tools.length; i++ ) {
 22+ _this.tools[i].updateState( annotations, nodes );
 23+ }
 24+ } );
 25+
 26+ config = [];
 27+ this.config = config || [
 28+ { 'name': 'history', 'items' : ['undo', 'redo'] },
 29+ { 'name': 'textStyle', 'items' : ['format'] },
 30+ { 'name': 'textStyle', 'items' : ['bold', 'italic', 'link', 'clear'] },
 31+ { 'name': 'list', 'items' : ['number', 'bullet', 'outdent', 'indent'] }
 32+ ];
 33+ this.setup();
 34+};
 35+
 36+/* Methods */
 37+
 38+es.ToolbarView.prototype.getSurfaceView = function() {
 39+ return this.surfaceView;
 40+};
 41+
 42+es.ToolbarView.prototype.setup = function() {
 43+ for ( var i = 0; i < this.config.length; i++ ) {
 44+ var $group = $( '<div>' )
 45+ .addClass( 'es-toolbarGroup' )
 46+ .addClass( 'es-toolbarGroup-' + this.config[i].name );
 47+ if ( this.config[i].label ) {
 48+ $group.append(
 49+ $( '<div>' ).addClass( 'es-toolbarLabel' ).html( this.config[i].label )
 50+ );
 51+ }
 52+
 53+ for ( var j = 0; j < this.config[i].items.length; j++ ) {
 54+ var toolDefintion = es.Tool.tools[ this.config[i].items[j] ];
 55+ if ( toolDefintion ) {
 56+ var tool = new toolDefintion.constructor(
 57+ this, toolDefintion.name, toolDefintion.title, toolDefintion.data
 58+ );
 59+ this.tools.push( tool );
 60+ $group.append( tool.$ );
 61+ }
 62+ }
 63+
 64+ this.$groups.append( $group );
 65+ }
 66+};
 67+
 68+es.extendClass( es.ToolbarView, es.EventEmitter );
Property changes on: trunk/extensions/VisualEditor/contentEditable/views/es.ToolbarView.js
___________________________________________________________________
Added: svn:eol-style
6969 + native
Property changes on: trunk/extensions/TreeAndMenu/star.js
___________________________________________________________________
Added: svn:eol-style
7070 + native
Property changes on: trunk/extensions/TreeAndMenu/treeandmenu.css
___________________________________________________________________
Added: svn:eol-style
7171 + native
Property changes on: trunk/extensions/EducationProgram/specials/SpecialAmbassadorProfile.php
___________________________________________________________________
Added: svn:eol-style
7272 + native
Property changes on: trunk/extensions/EducationProgram/resources/ep.ambprofile.js
___________________________________________________________________
Added: svn:eol-style
7373 + native

Status & tagging log