equal
deleted
inserted
replaced
110 } |
110 } |
111 }; |
111 }; |
112 |
112 |
113 /** handle clicks on "send annotation" button */ |
113 /** handle clicks on "send annotation" button */ |
114 IriSP.createAnnotationWidget.prototype.handleButtonClick = function(event) { |
114 IriSP.createAnnotationWidget.prototype.handleButtonClick = function(event) { |
115 this.selector.find(".Ldt-createAnnotation-DoubleBorder").children().hide(); |
115 var textfield = this.selector.find(".Ldt-createAnnotation-Description"); |
116 this.selector.find(".Ldt-createAnnotation-endScreen").show(); |
116 var contents = textfield.val(); |
|
117 |
|
118 if (contents === "") { |
|
119 textfield.after(IriSP.templToHTML(IriSP.createAnnotation_errorMessage_template)); |
|
120 textfield.css("background-color", "#d93c71"); |
|
121 textfield.bind("propertychange.tmp keyup.tmp input.tmp paste.tmp", IriSP.wrap(this, function() { |
|
122 var contents = textfield.val(); |
|
123 console.log(contents); |
|
124 if (contents !== "") { |
|
125 this.selector.find(".Ldt-createAnnotation-errorMessage").hide(); |
|
126 textfield.css("background-color", ""); |
|
127 textfield.unbind(".tmp"); |
|
128 } |
|
129 })); |
|
130 } else { |
|
131 this.selector.find(".Ldt-createAnnotation-DoubleBorder").children().hide(); |
|
132 this.selector.find(".Ldt-createAnnotation-endScreen").show(); |
|
133 } |
117 }; |
134 }; |