CC-5404 : colorpickers littering DOM

This commit is contained in:
Naomi 2013-10-11 13:13:30 -04:00
parent 5defb12430
commit 22d5df866c
3 changed files with 91 additions and 88 deletions

View file

@ -42,6 +42,34 @@ function openAddShowForm() {
}
}
function closeAddShowForm(event) {
event.stopPropagation();
event.preventDefault();
var $el = $("#add-show-form");
$el.hide();
windowResize();
$.get(baseUrl+"Schedule/get-form", {format:"json"}, function(json) {
//need to clean up the color picker.
$el.find("#schedule-show-style input").each(function(i, el){
var $input = $(this),
colId = $input.data("colorpickerId");
$("#"+colId).remove();
$input.removeData();
});
$el.empty().append(json.form);
setAddShowEvents();
});
makeAddShowButton();
}
function makeAddShowButton(){
$('.fc-header-left')
.append('<span class="fc-header-space"></span>')