OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/assets/javascripts/sprint.js

53 lines
1.1 KiB

/***************************************
SPRINT
***************************************/
RB.Sprint = RB.Object.create(RB.Model, RB.EditableInplace, {
initialize: function(el){
var j; // This ensures that we use a local 'j' variable, not a global one.
var self = this;
this.$ = j = $(el);
this.el = el;
// Associate this object with the element for later retrieval
j.data('this', this);
j.find(".editable").bind('mouseup', this.handleClick);
},
beforeSave: function(){
// Do nothing
},
getType: function(){
return "Sprint";
},
markIfClosed: function(){
// Do nothing
},
refreshed: function(){
// We have to do this since .live() does not work for some reason
j.find(".editable").bind('mouseup', this.handleClick);
},
saveDirectives: function(){
var j = this.$;
var data = j.find('.editor').serialize() + "&_method=put";
var url = RB.urlFor('update_sprint', { id: this.getID() });
return {
url : url,
data: data
}
},
beforeSaveDragResult: function(){
// Do nothing
}
});