|
|
|
@@ -262,7 +262,9 @@ |
|
|
|
this.el.find("div.brating span").click(function(){ |
|
|
|
var r = $(this).attr('data-rating'); |
|
|
|
self.data.rating = r; |
|
|
|
self.mark_dirty(); |
|
|
|
self.set_rating(r); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
this.el.find("div.brating").mouseenter(function(){ |
|
|
|
@@ -399,6 +401,7 @@ |
|
|
|
record.staff = this.get_staff(); |
|
|
|
record.client = this.get_client(); |
|
|
|
record.ack = this.get_ack(); |
|
|
|
record.rating = this.get_rating(); |
|
|
|
return record; |
|
|
|
} |
|
|
|
|
|
|
|
@@ -409,10 +412,35 @@ |
|
|
|
action: "save_job", // action |
|
|
|
record: this.get_record_from_ui(), |
|
|
|
}, function(response, status, xhr){ |
|
|
|
console.log("response for save %o", response); |
|
|
|
self.load_data(response.newdata); |
|
|
|
if (response.status=='success'){ |
|
|
|
self.load_data(response.newdata); |
|
|
|
self.mark_saved(); |
|
|
|
}else{ |
|
|
|
alert( 'error saving data, please check your network'); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
mark_dirty() //need save |
|
|
|
{ |
|
|
|
var d = this.el.find('.bsave'); |
|
|
|
d.removeClass('saved'); |
|
|
|
d.addClass('blink_me'); |
|
|
|
setTimeout(function(){ |
|
|
|
d.removeClass('blink_me'); |
|
|
|
},1000); |
|
|
|
} |
|
|
|
|
|
|
|
mark_saved() |
|
|
|
{ |
|
|
|
var d = this.el.find('.bsave'); |
|
|
|
|
|
|
|
d.addClass('blink_me'); |
|
|
|
setTimeout(function(){ |
|
|
|
d.removeClass('blink_me'); |
|
|
|
d.addClass('saved'); |
|
|
|
},1000); |
|
|
|
} |
|
|
|
}//end of class Job |
|
|
|
|
|
|
|
//global GUI summary |
|
|
|
@@ -684,6 +712,12 @@ |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(document).on('change', '.divTableRow select, .divTableRow input', function() { |
|
|
|
var job = $(this).closest('.divTable').data().job; |
|
|
|
job.mark_dirty(); |
|
|
|
}); |
|
|
|
|
|
|
|
reset_title_to_today(); |
|
|
|
/*________________________________________________________________________*/ |
|
|
|
}); |