summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Geiger2011-10-14 13:28:03 +0200
committerBjörn Geiger2011-10-14 13:28:03 +0200
commitf872fa5c2be8a459e6a3bddb99fc8f71a84d8930 (patch)
tree218a5394eb6ef4eb70b05c361fd6006dbca8a3bb
parentKleinen Fehler behoben (diff)
downloadpoolctrl-f872fa5c2be8a459e6a3bddb99fc8f71a84d8930.tar.gz
poolctrl-f872fa5c2be8a459e6a3bddb99fc8f71a84d8930.tar.xz
poolctrl-f872fa5c2be8a459e6a3bddb99fc8f71a84d8930.zip
js korrigiert
-rwxr-xr-xapplication/forms/EventAdd.php34
-rwxr-xr-xapplication/forms/EventEdit.php23
-rwxr-xr-xapplication/views/scripts/event/add.phtml32
-rwxr-xr-xapplication/views/scripts/event/edit.phtml31
4 files changed, 63 insertions, 57 deletions
diff --git a/application/forms/EventAdd.php b/application/forms/EventAdd.php
index 23ec769..09f96d6 100755
--- a/application/forms/EventAdd.php
+++ b/application/forms/EventAdd.php
@@ -130,18 +130,6 @@ class Application_Form_EventAdd extends Zend_Form
public function init()
{
- if(isset($this->bootoslist)) {
- foreach($this->bootoslist as $bootos) {
- $bootosIDs[] = $bootos->getID();
- }
- }
-
- echo "<script type=\"text/javascript\">\n";
- $ids = implode(", ", $bootosIDs);
- echo "bootosIDs = new Array(" . $ids . ");\n";
- echo "bootosfieldChanged(\"pbs_bootosID\", bootosIDs);\n";
- echo "</script>";
-
$this->setName('EventAdd');
$this->setMethod('post');
@@ -332,27 +320,5 @@ class Application_Form_EventAdd extends Zend_Form
'label' => 'Cancel',
'onclick' => 'location.href="/event/"',
));
-
- echo '<script type="text/javascript">
- addeventcategoryfieldChanged("category");
- immediateChanged("immediate");
- $(function() {
- $("#start").datetimepicker({
- dateFormat: "mm/dd/yy",
- timeFormat: "hh:mm tt",
- ampm: true
- });
- $("#end").datetimepicker({
- dateFormat: "mm/dd/yy",
- timeFormat: "hh:mm tt",
- ampm: true
- });
- $("#repeatdate").datetimepicker({
- dateFormat: "mm/dd/yy",
- timeFormat: "hh:mm tt",
- ampm: true
- });
- });
- </script>';
}
} \ No newline at end of file
diff --git a/application/forms/EventEdit.php b/application/forms/EventEdit.php
index 6189684..c223527 100755
--- a/application/forms/EventEdit.php
+++ b/application/forms/EventEdit.php
@@ -377,28 +377,5 @@ class Application_Form_EventEdit extends Zend_Form
'label' => 'Cancel',
'onclick' => 'location.href="/event/"',
));
-
- echo '<script type="text/javascript">';
- $ids = implode(", ", $bootosIDs);
- echo "\nbootosIDs = new Array(" . $ids . ");\n";
- echo 'bootosfieldChanged("pbs_bootosID", ' . count($this->bootoslist) . ');
- $(function() {
- $("#start").datetimepicker({
- dateFormat: "mm/dd/yy",
- timeFormat: "hh:mm tt",
- ampm: true
- });
- $("#end").datetimepicker({
- dateFormat: "mm/dd/yy",
- timeFormat: "hh:mm tt",
- ampm: true
- });
- $("#repeatdate").datetimepicker({
- dateFormat: "mm/dd/yy",
- timeFormat: "hh:mm tt",
- ampm: true
- });
- });
- </script>';
}
} \ No newline at end of file
diff --git a/application/views/scripts/event/add.phtml b/application/views/scripts/event/add.phtml
index 8f06093..64fcc32 100755
--- a/application/views/scripts/event/add.phtml
+++ b/application/views/scripts/event/add.phtml
@@ -1,5 +1,37 @@
<h1>Add Event</h1>
<?php
$this->addForm->setAction($this->url());
+$this->bootoslist = $this->addForm->getBootoslist();
+if(isset($this->bootoslist)) {
+ foreach($this->bootoslist as $bootos) {
+ $bootosIDs[] = $bootos->getID();
+ }
+}
+echo "<script type=\"text/javascript\">";
+$ids = implode(", ", $bootosIDs);
+echo "var bootosIDs = new Array(" . $ids . ");\n";
+echo "bootosfieldChanged(\"pbs_bootosID\", bootosIDs);\n";
+echo "</script>";
echo $this->addForm;
+echo '<script type="text/javascript">
+ addeventcategoryfieldChanged("category", bootosIDs);
+ immediateChanged("immediate");
+ $(function() {
+ $("#start").datetimepicker({
+ dateFormat: "mm/dd/yy",
+ timeFormat: "hh:mm tt",
+ ampm: true
+ });
+ $("#end").datetimepicker({
+ dateFormat: "mm/dd/yy",
+ timeFormat: "hh:mm tt",
+ ampm: true
+ });
+ $("#repeatdate").datetimepicker({
+ dateFormat: "mm/dd/yy",
+ timeFormat: "hh:mm tt",
+ ampm: true
+ });
+ });
+ </script>';
?> \ No newline at end of file
diff --git a/application/views/scripts/event/edit.phtml b/application/views/scripts/event/edit.phtml
index b474b40..fa5a5f2 100755
--- a/application/views/scripts/event/edit.phtml
+++ b/application/views/scripts/event/edit.phtml
@@ -1,5 +1,36 @@
<h1>Edit Event</h1>
<?php
$this->editForm->setAction($this->url());
+$this->bootoslist = $this->addForm->getBootoslist();
+if(isset($this->bootoslist)) {
+ foreach($this->bootoslist as $bootos) {
+ $bootosIDs[] = $bootos->getID();
+ }
+}
+
+echo "<script type=\"text/javascript\">";
+$ids = implode(", ", $bootosIDs);
+echo "bootosIDs = new Array(" . $ids . ");\n";
+echo "bootosfieldChanged(\"pbs_bootosID\", bootosIDs);\n";
+echo "</script>";
echo $this->editForm;
+echo '<script type="text/javascript">
+ $(function() {
+ $("#start").datetimepicker({
+ dateFormat: "mm/dd/yy",
+ timeFormat: "hh:mm tt",
+ ampm: true
+ });
+ $("#end").datetimepicker({
+ dateFormat: "mm/dd/yy",
+ timeFormat: "hh:mm tt",
+ ampm: true
+ });
+ $("#repeatdate").datetimepicker({
+ dateFormat: "mm/dd/yy",
+ timeFormat: "hh:mm tt",
+ ampm: true
+ });
+ });
+ </script>';
?> \ No newline at end of file