summaryrefslogtreecommitdiffstats
path: root/application/views/scripts
diff options
context:
space:
mode:
authorsebastian wagner2011-09-14 15:10:45 +0200
committersebastian wagner2011-09-14 15:10:45 +0200
commit2dcb3de5f0b1a1ab6eff617cbd829478fbe4558d (patch)
tree4d29002ade55e7e7fc3d6bb2077a407f4d91c819 /application/views/scripts
parentqtip fixed (diff)
downloadpoolctrl-2dcb3de5f0b1a1ab6eff617cbd829478fbe4558d.tar.gz
poolctrl-2dcb3de5f0b1a1ab6eff617cbd829478fbe4558d.tar.xz
poolctrl-2dcb3de5f0b1a1ab6eff617cbd829478fbe4558d.zip
reportButton added
Diffstat (limited to 'application/views/scripts')
-rwxr-xr-xapplication/views/scripts/event/index.phtml41
1 files changed, 38 insertions, 3 deletions
diff --git a/application/views/scripts/event/index.phtml b/application/views/scripts/event/index.phtml
index 30b55d6..c39a162 100755
--- a/application/views/scripts/event/index.phtml
+++ b/application/views/scripts/event/index.phtml
@@ -37,12 +37,14 @@ var poolIDtmp;
event.selected = false;
selectedEvent = null;
eventColor.ev.borderColor = eventColor.color;
+ //$('#eventReportButton').hide();
}
event.selected = true;
selectedEvent = event;
eventColor.ev = event;
eventColor.color = event.borderColor;
event.borderColor = 'black';
+ //$('#eventReportButton').show();
$('#calendar').fullCalendar("rerenderEvents");
}
@@ -448,10 +450,13 @@ var poolIDtmp;
$('.fc-header-center').append('<span id="shutdown" class="fc-button fc-state-default fc-corner-right fc-state-active"><span class="fc-button-inner"><span class="fc-button-content">Shutdown</span><span class="fc-button-effect"><span></span></span></span></span>');
// PoolSelectBox
- $('.fc-header-left').append('<form name="PoolSelectForm"><select id="poolselectbox" name="PoolSelectbox" onclick="setPoolIDtmp()" onChange="fetchPoolEvents();"><option value="default" >Please choose a Pool</option></select></form>');
+ $('.fc-header-left').append('<form name="PoolSelectForm"><select id="poolselectbox" name="PoolSelectbox" onclick="setPoolIDtmp()" onChange="fetchPoolEvents();"><option value="default" >Please choose a Pool</option></select></form>');
- // Add Button
- $('.fc-header-right').append('<span id="addEvent" class="fc-button fc-state-default fc-state-hover"><span class="fc-button-inner"><span class="fc-button-content">Add Event</span><span class="fc-button-effect"><span></span></span></span></span>');
+ // Add Button
+ $('.fc-header-right').append('<span id="addEvent" class="fc-button fc-state-default fc-state-hover"><span class="fc-button-inner"><span class="fc-button-content">Add Event</span><span class="fc-button-effect"><span></span></span></span></span>');
+
+ // EventReport Button [style=display:none;]
+ $('.fc-header-center').append('<span id="eventReportButton" class="fc-button fc-state-default fc-state-hover"><span class="fc-button-inner"><span class="fc-button-content">Report</span><span class="fc-button-effect"><span></span></span></span></span>');
// Change Button-Style
$("#lecture").click(function(){
@@ -498,6 +503,31 @@ var poolIDtmp;
$("#addEvent").click(function(){
addEvent();
});
+
+ $("#eventReportButton").click(function(){
+ if(selectedEvent != null) {
+ self.location="/event/showreports/eventID/" + selectedEvent.id;
+ } else {
+ $(function() {
+ $( "#eventReportButtonDialog" ).dialog({
+ autoOpen: false,
+ width: 600,
+ modal: true,
+ title: "ERROR",
+ buttons: {
+ "OK": function() {
+ $(this).dialog("close");
+ }
+ },
+ open: function () {
+ $(".ui-dialog-titlebar-close").hide();
+ $(this).parents(".ui-dialog:first").find(".ui-dialog-titlebar").addClass("ui-state-error");
+ }
+ });
+ });
+ $( "#eventReportButtonDialog" ).dialog('open');
+ }
+ });
// initialize noPoolSelectedDialog
$(function() {
@@ -557,6 +587,11 @@ selected one?</p>
<p>Are you sure to add this Event?</p>
</div>
+<!-- eventReportButton -->
+<div id="eventReportButtonDialog" style="display: none">
+<p>Please choose an Event first!</p>
+</div>
+
<!-- eventResize boot -->
<div id="eventResizeBootDialog" style="display: none">
<p>You canĀ“t change the EndTime of a Boot Event!</p>