Advertisement
pcwizz

Untitled

Oct 23rd, 2014
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. this.update = function(avEvent){
  2.                     me.avEvent.id = avEvent.id;// make sure the ids are the same
  3.                     //Deal with the messed up state of html datetime fields; I use timestamps like a real boy
  4.                     me.avEvent.start = avEvent.start === me.avEvent.start ? avEvent.start:Date.parse(me.avEvent.start);
  5.                     me.avEvent.end = avEvent.end === me.avEvent.end ? avEvent.end:Date.parse(me.avEvent.end);  
  6.                     var index = me.avEvents.indexOf(avEvent);
  7.                     if (index > -1){
  8.                         me.avEvents[index] = me.avEvent;
  9.                         me.avEvent = {};
  10.                     }
  11.                     me.avEvent.editMode = avEvent.editMode = false;
  12.             };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement