summaryrefslogtreecommitdiffstats
path: root/application/views/scripts/event/index.phtml
diff options
context:
space:
mode:
authorSebastian Wagner2011-09-05 14:06:49 +0200
committerSebastian Wagner2011-09-05 14:06:49 +0200
commit6615fe611df43299e4b19b2130bfb57a28c0cc28 (patch)
treef472c01682aea93c48c2a9071683a3075a8cf926 /application/views/scripts/event/index.phtml
parentsome clean up (diff)
downloadpoolctrl-6615fe611df43299e4b19b2130bfb57a28c0cc28.tar.gz
poolctrl-6615fe611df43299e4b19b2130bfb57a28c0cc28.tar.xz
poolctrl-6615fe611df43299e4b19b2130bfb57a28c0cc28.zip
eventResize- and eventDrop Function added
Diffstat (limited to 'application/views/scripts/event/index.phtml')
-rw-r--r--application/views/scripts/event/index.phtml201
1 files changed, 119 insertions, 82 deletions
diff --git a/application/views/scripts/event/index.phtml b/application/views/scripts/event/index.phtml
index 90e1ef0..f4efc20 100644
--- a/application/views/scripts/event/index.phtml
+++ b/application/views/scripts/event/index.phtml
@@ -1,26 +1,26 @@
<head>
- <title>Pool Control</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>Pool Control</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
-<h1>Pool Control</h1>
-
+<h1>Pool Control</h1>
+
<?php echo $this->formButton('addEvent', 'Add Event', array(
'onclick' => 'self.location="/event/add/"',
'class' => 'addbutton'))
?>
-<form name="PoolSelectForm">
- <select name="PoolSelectbox" onChange="deselectAll();selectPool();">
- <option> Please choose a Pool </option>
-<?php if(count($this->poollist)>0){
- foreach($this->poollist as $pool => $p){
+<form name="PoolSelectForm"><select name="PoolSelectbox"
+ onChange="deselectAll();selectPool();">
+ <option>Please choose a Pool</option>
+ <?php if(count($this->poollist)>0){
+ foreach($this->poollist as $pool => $p){
echo "<option value='" . $p->getID() . "'>" . $p->getTitle() . "</option>";
- }
-} else echo '<option> No Pools </option>';?>
- </select>
-</form>
+ }
+ } else echo '<option> No Pools </option>';?>
+</select></form>
-<div id='calendar' style='margin:3em 0;font-size:13px'></div>
+<div
+ id='calendar' style='margin: 3em 0; font-size: 13px'></div>
<script type="text/javascript">
@@ -56,10 +56,6 @@ var lastview;
}
}
- function checkEventTypes() {
-
- }
-
function iniCalendar() {
var calendar = $('#calendar').fullCalendar({
@@ -97,6 +93,56 @@ var lastview;
'\nParticipants ' + calEvent.participants);
},
+ eventResize: function(event,dayDelta,minuteDelta,revertFunc) {
+
+ alert(
+ "The end date of " + event.title + " has been moved " +
+ dayDelta + " days and " +
+ minuteDelta + " minutes."
+ );
+
+ if (!confirm("Is this correct?")) {
+ revertFunc();
+ }else{
+ var eventID = evnet.id;
+ var newStart = event.start;
+ var newEnd = event.end;
+ alert("Event: " + eventID + "\n" +
+ "New start: " + newStart + "\n" +
+ "New end: " + newEnd);
+
+
+ }
+
+ },
+
+ eventDrop: function(event,dayDelta,minuteDelta,allDay,revertFunc) {
+
+ alert(
+ event.title + " was moved " +
+ dayDelta + " days and " +
+ minuteDelta + " minutes."
+ );
+
+ if (allDay) {
+ alert("Event is now all-day");
+ }else{
+ alert("Event has a time-of-day");
+ }
+
+ if (!confirm("Are you sure about this change?")) {
+ revertFunc();
+ }else{
+ var eventID = evnet.id;
+ var newStart = event.start;
+ var newEnd = event.end;
+ alert("Event: " + eventID + "\n" +
+ "New start: " + newStart + "\n" +
+ "New end: " + newEnd);
+ }
+
+ },
+
eventRender: function(event, element) {
},
@@ -120,83 +166,74 @@ var lastview;
</script>
<br />
<br />
-<div class='listelement'>
-<?php
+<div class='listelement'><?php
if(count($this->eventlist)>0) {
-?>
-
-<?php
+ ?> <?php
foreach ($this->poollist as $pool):?>
- <div id='pool<?php echo $pool->getID(); ?>' style='display:none;' >
- <h2><?php echo $pool->getTitle(); ?></h2>
- <?php if(!isset($this->eventlist[$pool->getID()])) {
- echo "This Pool hasn't events yet";
- } else { ?>
- <?php $poolEvents = $this->eventlist[$pool->getID()]; ?>
- <?php foreach ($poolEvents as $event): ?>
- <div class='element'>
- <div class='content'>
- <div class='actions'>
- <a href="<?php echo $this->url(
+<div id='pool<?php echo $pool->getID(); ?>' style='display: none;'>
+<h2><?php echo $pool->getTitle(); ?></h2>
+ <?php if(!isset($this->eventlist[$pool->getID()])) {
+ echo "This Pool hasn't events yet";
+ } else { ?> <?php $poolEvents = $this->eventlist[$pool->getID()]; ?> <?php foreach ($poolEvents as $event): ?>
+<div class='element'>
+<div class='content'>
+<div class='actions'><a
+ href="<?php echo $this->url(
array(
'controller' => 'event',
'action' => 'edit',
'eventID' => $event['eventID']
),
'default',
- true);?>"><img src='/media/img/edit.png' alt='Edit Group' /></a>
- <a href="<?php echo $this->url(
+ true);?>"><img src='/media/img/edit.png' alt='Edit Group' /></a> <a
+ href="<?php echo $this->url(
array(
'controller' => 'event',
'action' => 'delete',
'eventID' => $event['eventID']
),
'default',
- true);?>"><img src='/media/img/delete.png' alt='Delete Group' /></a>
- </div>
- <div class='title'><?php echo $event['title']; ?></div>
- <?php if($event['category']) {
- ?>
- <div class='subtitle'><?php echo $event['category']; ?></div>
- <?php
- } else {
- ?>
- <div class='subtitle'>&nbsp;</div>
- <?php
- }
- ?>
- <div class='details'><label>Start Time:</label>
- <div class='item'><?php echo date ('d F Y - H:i', strtotime($event['start'])); ?>&nbsp;</div>
- </div>
- <div class='details'><label>End Time:</label>
- <div class='item'><?php echo date ('d F Y - H:i', strtotime($event['end'])); ?>&nbsp;</div>
- </div>
- <div class='details'><label>Participants:</label>
- <div class='item'><?php echo $event['participants']; ?>&nbsp;</div>
- </div>
- <div class='details'><label>Membership:</label>
- <div class='item'><?php echo $event['pbs_person_name']; ?>&nbsp;</div>
- </div>
- <div class='details'><label>BootOs:</label>
- <div class='item'><?php echo $event['pbs_bootos_title']; ?>&nbsp;</div>
- </div>
- <div class='details'><label>Repeat:</label>
- <div class='item'><?php if($event['repeat']) echo 'yes'; else echo 'no'; ?>&nbsp;</div>
- </div>
- <div class='details'><label>Immediate:</label>
- <div class='item'><?php if($event['immediate']) echo 'yes'; else echo 'no'; ?>&nbsp;</div>
- </div>
- <div class='details'><label>Note:</label>
- <div class='item'><?php echo $event['note']; ?>&nbsp;</div>
- </div>
- </div>
- </div>
- <div class='clear'></div>
- <?php endforeach ?>
- <?php } ?>
- </div>
- <?php endforeach ?>
-<?php } ?>
+ true);?>"><img src='/media/img/delete.png' alt='Delete Group' /></a>
+</div>
+<div class='title'><?php echo $event['title']; ?></div>
+ <?php if($event['category']) {
+ ?>
+<div class='subtitle'><?php echo $event['category']; ?></div>
+ <?php
+ } else {
+ ?>
+<div class='subtitle'>&nbsp;</div>
+ <?php
+ }
+ ?>
+<div class='details'><label>Start Time:</label>
+<div class='item'><?php echo date ('d F Y - H:i', strtotime($event['start'])); ?>&nbsp;</div>
+</div>
+<div class='details'><label>End Time:</label>
+<div class='item'><?php echo date ('d F Y - H:i', strtotime($event['end'])); ?>&nbsp;</div>
+</div>
+<div class='details'><label>Participants:</label>
+<div class='item'><?php echo $event['participants']; ?>&nbsp;</div>
+</div>
+<div class='details'><label>Membership:</label>
+<div class='item'><?php echo $event['pbs_person_name']; ?>&nbsp;</div>
</div>
+<div class='details'><label>BootOs:</label>
+<div class='item'><?php echo $event['pbs_bootos_title']; ?>&nbsp;</div>
+</div>
+<div class='details'><label>Repeat:</label>
+<div class='item'><?php if($event['repeat']) echo 'yes'; else echo 'no'; ?>&nbsp;</div>
+</div>
+<div class='details'><label>Immediate:</label>
+<div class='item'><?php if($event['immediate']) echo 'yes'; else echo 'no'; ?>&nbsp;</div>
+</div>
+<div class='details'><label>Note:</label>
+<div class='item'><?php echo $event['note']; ?>&nbsp;</div>
+</div>
+</div>
+</div>
+<div class='clear'></div>
+<?php endforeach ?> <?php } ?></div>
+<?php endforeach ?> <?php } ?></div>
+<br />
<br />
-<br /> \ No newline at end of file