add show button removed/readded properly.

This commit is contained in:
Naomi 2011-02-10 11:34:55 -05:00
parent b6c26a583b
commit a32550d625
3 changed files with 30 additions and 5 deletions

View file

@ -0,0 +1,25 @@
<form id="add-show-form" method="post" action="" style="display:none;">
<div id="schedule-add-show" class="tabs ui-widget ui-widget-content block-shadow alpha-block padded">
<div class="button-bar">
<button id="add-show-submit" class="right-floated">Add this show</button>
<button id="add-show-close" class="right-floated">Close</button>
</div>
<div class="clear"></div>
<div id="schedule-show-what">
<?php echo $this->what ?>
</div>
<h3 class="collapsible-header"><span class="arrow-icon"></span>When</h3>
<div id="schedule-show-when" class="collapsible-content">
<?php echo $this->when ?>
<?php echo $this->repeats ?>
</div>
<h3 class="collapsible-header"><span class="arrow-icon"></span>Who</h3>
<div id="schedule-show-who" class="collapsible-content">
<?php echo $this->who ?>
</div>
<h3 class="collapsible-header"><span class="arrow-icon"></span>Style</h3>
<div id="schedule-show-style" class="collapsible-content">
<?php echo $this->style ?>
</div>
</div>
</form>

View file

@ -123,9 +123,6 @@ function setAddShowEvents() {
$("#schedule_calendar").width(y+z+50);
$("#schedule_calendar").fullCalendar('render');
$("#add-show-form").hide();
//in full-calendar-functions.js
makeAddShowButton();
});
$("#add-show-submit")

View file

@ -15,7 +15,10 @@ function makeAddShowButton(){
var z = $("#schedule-add-show").width();
$("#schedule_calendar").width(y-z-50);
$("#schedule_calendar").fullCalendar('render');
$(this).remove();
var td = $(this).parent();
$(td).prev().remove();
$(td).remove();
});
}
@ -68,7 +71,7 @@ function viewDisplay( view ) {
}
if($("#add-show-form").length == 1 && $('.fc-header-left tbody td').length === 5) {
if(($("#add-show-form").length == 1) && ($('.fc-header-left tbody td').length == 5)) {
makeAddShowButton();
}
}