r105637 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105636‎ | r105637 | r105638 >
Date:01:56, 9 December 2011
Author:tparscal
Status:deferred
Tags:
Comment:
Removed done button
Modified paths:
  • /trunk/extensions/VisualEditor/modules/es/inspectors/es.LinkInspector.js (modified) (history)
  • /trunk/extensions/VisualEditor/modules/es/styles/es.Inspector.css (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/modules/es/styles/es.Inspector.css
@@ -25,9 +25,9 @@
2626 background-position: center center;
2727 background-repeat: no-repeat;
2828 cursor: pointer;
29 - -moz-opacity: 0.25;
30 - filter:alpha(opacity=25);
31 - opacity: 0.25;
 29+ -moz-opacity: 0.75;
 30+ filter:alpha(opacity=75);
 31+ opacity: 0.75;
3232 }
3333
3434 .es-inspector-closeButton {
@@ -47,29 +47,6 @@
4848 opacity: 1;
4949 }
5050
51 -.es-inspector-doneButton {
52 - float: right;
53 - margin: 0.5em 0 0 0;
54 - padding: 0.5em 0.75em;
55 - font-size: 1em;
56 - border: solid 1px #cccccc;
57 - -webkit-border-radius: 0.5em;
58 - -moz-border-radius: 0.5em;
59 - -o-border-radius: 0.5em;
60 - border-radius: 0.5em;
61 - cursor: pointer;
62 - background: #f7fbff; /* Old browsers */
63 - /* IE9 SVG, needs conditional override of 'filter' to 'none' */
64 - background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2Y3ZmJmZiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNkZGYyZmYiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
65 - background: -moz-linear-gradient(top, #f7fbff 0%, #ddf2ff 100%); /* FF3.6+ */
66 - background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f7fbff), color-stop(100%,#ddf2ff)); /* Chrome,Safari4+ */
67 - background: -webkit-linear-gradient(top, #f7fbff 0%,#ddf2ff 100%); /* Chrome10+,Safari5.1+ */
68 - background: -o-linear-gradient(top, #f7fbff 0%,#ddf2ff 100%); /* Opera 11.10+ */
69 - background: -ms-linear-gradient(top, #f7fbff 0%,#ddf2ff 100%); /* IE10+ */
70 - background: linear-gradient(top, #f7fbff 0%,#ddf2ff 100%); /* W3C */
71 - filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f7fbff', endColorstr='#ddf2ff',GradientType=0 ); /* IE6-8 */
72 -}
73 -
7451 .es-inspector-doneButton:hover {
7552 border-color: #dddddd;
7653 }
Index: trunk/extensions/VisualEditor/modules/es/inspectors/es.LinkInspector.js
@@ -15,8 +15,6 @@
1616 this.$form = $( '<form></form>' ).appendTo( this.$ );
1717 this.$locationLabel = $( '<label>Page title</label>' ).appendTo( this.$form );
1818 this.$locationInput = $( '<input type="text">' ).appendTo( this.$form );
19 - this.$doneButton = $( '<div class="es-inspector-doneButton">Done</div>' )
20 - .appendTo( this.$ );
2119
2220 // Events
2321 var _this = this;
@@ -31,9 +29,6 @@
3230 surfaceModel.transact( tx );
3331 _this.context.closeInspector();
3432 } );
35 - this.$doneButton.click( function() {
36 - _this.close();
37 - } );
3833 };
3934
4035 /* Methods */
@@ -48,7 +43,7 @@
4944 if ( annotation.length ) {
5045 annotation = annotation[0];
5146 }
52 - if ( annotation ) {
 47+ if ( annotation && annotation.data && annotation.data.title ) {
5348 return annotation.data.title;
5449 }
5550 }
@@ -64,7 +59,7 @@
6560
6661 es.LinkInspector.prototype.onClose = function() {
6762 var title = this.$locationInput.val();
68 - if ( title === this.getTitleFromSelection() ) {
 63+ if ( title === this.getTitleFromSelection() || !title ) {
6964 return;
7065 }
7166 var surfaceView = this.context.getSurfaceView(),

Status & tagging log