Commit e319d5d04685d0ce30025b5a82b1ae420b03f93f

  • avatar
  • arvind
  • Mon Jun 09 19:26:29 IST 2014
Removing left over code from the previous<a95188bbfca8e102d4ba4142deb3f73160fadab6> merge.
  
413413 //annotation.text = {}; // creating new text object - to contain comments, labels, links and tags
414414 },
415415
416 //to add the final annotation
417 //save button - event bind
418 addNewAnno: function(event){
419 var $selected = $('select option:selected').val();
420 var textInput = $('.annotorious-editor textarea').val();
421 if($('select option:selected').val() === "Tags") {
422 //this.newanno.text[$selected] = $("#tagsInput").tags().getTags();
423 }
424 else {
425 console.log($selected);
426 //this.newanno.text[$selected] = textInput;
427 }
428 // var newanno = this.newanno;
429 // anno.addAnnotation(newanno);
430 },
431 /*addNewAnno: function(event){ // function for form input UI
432 var tags = $('#tags').val();
433 var label = $('#label').val();
434 var link = $('#links').val();
435 var text = $('.annotorious-editor textarea').val();
436 var finalInput = ' Label: '+label+' Comment: '+text+' Tags: '+tags+' Links: '+link;
437 //this.annoTemplate(label, text, tags, link);
438 // this.annoTemplate(label, text, tags, link);
439 var src = $('#img-url-input').val();
440 var newanno = {'src':src, 'text':finalInput, 'shapes': [{'type':annotation.shape.type, 'geometry':{'x':annotation.shape.geometry.x, 'y':annotation.shape.geometry.y, 'width':annotation.shape.geometry.width, 'height':annotation.shape.geometry.height}},], 'context':window.location.origin};
441 console.log(newanno);
442 anno.addAnnotation(newanno);
443 },*/
444
445416 //dropdown event
446417 getFormValue: function(event) {
447418 console.log('getFormValue()');
438438 field = $selected.text().toLowerCase();
439439 self.new_anno[field] = $("#tagsInput").tags().getTags();
440440 $("#tagsInput").show();
441 // if(textInput && !($($selected).val() === "Tags")) {
442 // //annotation.text[$selected.prev().text()] = textInput;
443 // annotation.text[$($selected).val()] = textInput; // Gets the current selection from
444 // // the option menu for choosing comments, tags, etc.
445 // } else {
446 // console.log("else tags");
447 // console.log(textInput);
448 // annotation.text[$($selected).val()] = '';
449441
450442 } else {
451443 $("#tagsInput").hide();