src/js/widgets/createAnnotationWidget.js
branchpopcorn-port
changeset 571 a471ef7efc0e
parent 570 244f04a9af85
child 575 8f483e430f51
equal deleted inserted replaced
570:244f04a9af85 571:a471ef7efc0e
   127   if (contents === "") {
   127   if (contents === "") {
   128   
   128   
   129     if (this.selector.find(".Ldt-createAnnotation-errorMessage").length === 0) {
   129     if (this.selector.find(".Ldt-createAnnotation-errorMessage").length === 0) {
   130       this.selector.find(".Ldt-createAnnotation-Container")
   130       this.selector.find(".Ldt-createAnnotation-Container")
   131                    .after(IriSP.templToHTML(IriSP.createAnnotation_errorMessage_template));
   131                    .after(IriSP.templToHTML(IriSP.createAnnotation_errorMessage_template));
   132       textfield.css("background-color", "#d93c71");
   132       textfield.css("background-color", "#d93c71");      
   133         
   133     } else {
       
   134       this.selector.find(".Ldt-createAnnotation-errorMessage").show();
       
   135     }
   134       // use namespaced events to be able to unbind them quickly and without unbinding
   136       // use namespaced events to be able to unbind them quickly and without unbinding
   135       // the other event handlers.
   137       // the other event handlers.
   136       textfield.bind("js_mod.tmp propertychange.tmp keyup.tmp input.tmp paste.tmp", IriSP.wrap(this, function() {
   138       textfield.bind("js_mod.tmp propertychange.tmp keyup.tmp input.tmp paste.tmp", IriSP.wrap(this, function() {
   137                       var contents = textfield.val();
   139                       var contents = textfield.val();
   138                       console.log(contents);
   140                       console.log(contents);
   140                         this.selector.find(".Ldt-createAnnotation-errorMessage").hide();
   142                         this.selector.find(".Ldt-createAnnotation-errorMessage").hide();
   141                         textfield.css("background-color", "");
   143                         textfield.css("background-color", "");
   142                         textfield.unbind(".tmp");
   144                         textfield.unbind(".tmp");
   143                       }
   145                       }
   144                    }));
   146                    }));
   145     }
       
   146   } else {
   147   } else {
   147     this.selector.find(".Ldt-createAnnotation-DoubleBorder").children().hide();
   148     this.selector.find(".Ldt-createAnnotation-DoubleBorder").children().hide();
   148     
   149     
   149     if (this.cinecast_version) {
   150     if (this.cinecast_version) {
   150       this.selector.find(".Ldt-createAnnotation-Title").parent().show();      
   151       this.selector.find(".Ldt-createAnnotation-Title").parent().show();