Index: trunk/extensions/VisualEditor/modules/es/styles/es.Inspector.css |
— | — | @@ -25,9 +25,9 @@ |
26 | 26 | background-position: center center; |
27 | 27 | background-repeat: no-repeat; |
28 | 28 | 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; |
32 | 32 | } |
33 | 33 | |
34 | 34 | .es-inspector-closeButton { |
— | — | @@ -47,29 +47,6 @@ |
48 | 48 | opacity: 1; |
49 | 49 | } |
50 | 50 | |
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 | | - |
74 | 51 | .es-inspector-doneButton:hover { |
75 | 52 | border-color: #dddddd; |
76 | 53 | } |
Index: trunk/extensions/VisualEditor/modules/es/inspectors/es.LinkInspector.js |
— | — | @@ -15,8 +15,6 @@ |
16 | 16 | this.$form = $( '<form></form>' ).appendTo( this.$ ); |
17 | 17 | this.$locationLabel = $( '<label>Page title</label>' ).appendTo( this.$form ); |
18 | 18 | this.$locationInput = $( '<input type="text">' ).appendTo( this.$form ); |
19 | | - this.$doneButton = $( '<div class="es-inspector-doneButton">Done</div>' ) |
20 | | - .appendTo( this.$ ); |
21 | 19 | |
22 | 20 | // Events |
23 | 21 | var _this = this; |
— | — | @@ -31,9 +29,6 @@ |
32 | 30 | surfaceModel.transact( tx ); |
33 | 31 | _this.context.closeInspector(); |
34 | 32 | } ); |
35 | | - this.$doneButton.click( function() { |
36 | | - _this.close(); |
37 | | - } ); |
38 | 33 | }; |
39 | 34 | |
40 | 35 | /* Methods */ |
— | — | @@ -48,7 +43,7 @@ |
49 | 44 | if ( annotation.length ) { |
50 | 45 | annotation = annotation[0]; |
51 | 46 | } |
52 | | - if ( annotation ) { |
| 47 | + if ( annotation && annotation.data && annotation.data.title ) { |
53 | 48 | return annotation.data.title; |
54 | 49 | } |
55 | 50 | } |
— | — | @@ -64,7 +59,7 @@ |
65 | 60 | |
66 | 61 | es.LinkInspector.prototype.onClose = function() { |
67 | 62 | var title = this.$locationInput.val(); |
68 | | - if ( title === this.getTitleFromSelection() ) { |
| 63 | + if ( title === this.getTitleFromSelection() || !title ) { |
69 | 64 | return; |
70 | 65 | } |
71 | 66 | var surfaceView = this.context.getSurfaceView(), |