1
0
Fork 0

blank key input documentview

This commit is contained in:
Heiko Kernbach 2013-03-14 10:55:43 +01:00
parent 59184b39bd
commit 41a7aa90d2
1 changed files with 9 additions and 2 deletions

View File

@ -15,7 +15,8 @@ var documentView = Backbone.View.extend({
"click #sourceView" : "sourceView",
"click #editFirstRow" : "editFirst",
"click #documentTableID tr" : "clicked",
"click #editSecondRow" : "editSecond"
"click #editSecondRow" : "editSecond",
"click .cancelButton" : "checkIfEmpty"
},
template: new EJS({url: '/_admin/html/js/templates/documentView.ejs'}),
@ -162,6 +163,7 @@ var documentView = Backbone.View.extend({
$.each(tableContent, function(key, val) {
if ($(val).text() === "zkey"+randomKey) {
$(val).click();
$('.jediTextarea textarea').val("");
return;
}
});
@ -301,13 +303,18 @@ var documentView = Backbone.View.extend({
cssclass : 'jediTextarea',
submitcssclass: 'btn btn-success pull-right',
cancelcssclass: 'btn btn-danger pull-right',
cancel: 'Cancel',
cancel: '<button class="cancelButton btn btn-danger pull-right">Cancel</button">',
submit: 'Save',
onblur: 'cancel',
//style: 'display: inline',
autogrow: {lineHeight: 16, minHeight: 30}
});
},
checkIfEmpty: function (e) {
console.log(e);
console.log("TEST");
var test = $('.jediTextarea button');
},
getTypedValue: function (value) {
value = value.replace(/(^\s+|\s+$)/g, '');
if (value == 'true') {