//-- 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.Burndown=function(e){return RB.Object.create({initialize:function(t){this.$=e(t),this.el=t,this.$.data("this",this),this.$.click(this.show)},setSprintId:function(e){this.sprintId=e},getSprintId:function(){return this.sprintId},show:function(t){t.preventDefault(),0===e("#charts").length&&e('<div id="charts"></div>').appendTo("body"),e("#charts").html("<div class='loading'>"+RB.i18n.generating_graph+"</div>"),e("#charts").load(RB.urlFor("show_burndown_chart",{sprint_id:e(this).data("this").sprintId,project_id:RB.constants.project_id})),e("#charts").dialog({dialogClass:"rb_dialog",height:530,width:710,position:"center",modal:!0,title:RB.i18n.burndown_graph,resizable:!1})}})}(jQuery);