Removed done button

This commit is contained in:
Trevor Parscal 2011-12-09 01:56:19 +00:00
parent 4ea117d7a6
commit f26bec23c9
2 changed files with 5 additions and 33 deletions

View file

@ -15,8 +15,6 @@ es.LinkInspector = function( toolbar, context ) {
this.$form = $( '<form></form>' ).appendTo( this.$ );
this.$locationLabel = $( '<label>Page title</label>' ).appendTo( this.$form );
this.$locationInput = $( '<input type="text">' ).appendTo( this.$form );
this.$doneButton = $( '<div class="es-inspector-doneButton">Done</div>' )
.appendTo( this.$ );
// Events
var _this = this;
@ -31,9 +29,6 @@ es.LinkInspector = function( toolbar, context ) {
surfaceModel.transact( tx );
_this.context.closeInspector();
} );
this.$doneButton.click( function() {
_this.close();
} );
};
/* Methods */
@ -48,7 +43,7 @@ es.LinkInspector.prototype.getTitleFromSelection = function() {
if ( annotation.length ) {
annotation = annotation[0];
}
if ( annotation ) {
if ( annotation && annotation.data && annotation.data.title ) {
return annotation.data.title;
}
}
@ -64,7 +59,7 @@ es.LinkInspector.prototype.onOpen = function() {
es.LinkInspector.prototype.onClose = function() {
var title = this.$locationInput.val();
if ( title === this.getTitleFromSelection() ) {
if ( title === this.getTitleFromSelection() || !title ) {
return;
}
var surfaceView = this.context.getSurfaceView(),

View file

@ -25,9 +25,9 @@
background-position: center center;
background-repeat: no-repeat;
cursor: pointer;
-moz-opacity: 0.25;
filter:alpha(opacity=25);
opacity: 0.25;
-moz-opacity: 0.75;
filter:alpha(opacity=75);
opacity: 0.75;
}
.es-inspector-closeButton {
@ -47,29 +47,6 @@
opacity: 1;
}
.es-inspector-doneButton {
float: right;
margin: 0.5em 0 0 0;
padding: 0.5em 0.75em;
font-size: 1em;
border: solid 1px #cccccc;
-webkit-border-radius: 0.5em;
-moz-border-radius: 0.5em;
-o-border-radius: 0.5em;
border-radius: 0.5em;
cursor: pointer;
background: #f7fbff; /* Old browsers */
/* IE9 SVG, needs conditional override of 'filter' to 'none' */
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2Y3ZmJmZiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNkZGYyZmYiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
background: -moz-linear-gradient(top, #f7fbff 0%, #ddf2ff 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f7fbff), color-stop(100%,#ddf2ff)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #f7fbff 0%,#ddf2ff 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #f7fbff 0%,#ddf2ff 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #f7fbff 0%,#ddf2ff 100%); /* IE10+ */
background: linear-gradient(top, #f7fbff 0%,#ddf2ff 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f7fbff', endColorstr='#ddf2ff',GradientType=0 ); /* IE6-8 */
}
.es-inspector-doneButton:hover {
border-color: #dddddd;
}