//-- copyright
// Copyright (C)2013-2014 the OpenProject Foundation (OPF)
// Copyright (C)2011 Stephan Eckardt, Tim Felgentreff, Marnen Laibow-Koser, Sandro Munda
// Copyright (C)2010-2011 friflaj
// Copyright (C)2010 Maxime Guilbot, Andrew Vit, Joakim Kolsjö, ibussieres, Daniel Passos, Jason Vasquez, jpic, Emiliano Heyns
// Copyright (C)2009-2010 Mark Maglana
// Copyright (C)2009 Joe Heck, Nate Lowrie
// The copyright follows:
// Copyright (C) 2010-2011 - Emiliano Heyns, Mark Maglana, friflaj
// Copyright (C) 2011 - Jens Ulferts, Gregor Schmidt - Finn GmbH - Berlin, Germany
// See doc/COPYRIGHT.rdoc for more details.
RB.Impediment=function(e){return RB.Object.create(RB.Task,{initialize:function(t){var i;this.$=i=e(t),this.el=t,i.addClass("impediment"),i.data("this",this),i.find(".editable").live("mouseup",this.handleClick)},saveDirectives:function(){var e,t,i,n,s;return e=this.$,t=this.$.prev(),i=e.parent("td").first().attr("id").split("_")[1],n=e.find(".editor").serialize()+"&is_impediment=true"+"&fixed_version_id="+RB.constants.sprint_id+"&status_id="+i+"&prev="+(1===t.length?t.data("this").getID():"")+(this.isNew()?"":"&id="+e.children(".id").text()),this.isNew()?s=RB.urlFor("create_impediment",{sprint_id:RB.constants.sprint_id}):(s=RB.urlFor("update_impediment",{id:this.getID(),sprint_id:RB.constants.sprint_id}),n+="&_method=put"),{url:s,data:n}}})}(jQuery);