summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorBjörn Geiger2011-10-14 09:51:18 +0200
committerBjörn Geiger2011-10-14 09:51:18 +0200
commitb0ced3676e83147f022655f757da8259617d4060 (patch)
treef615f79657f1a70f84411a4fec22c8119246db43 /application
parentkleine Korrektur (diff)
downloadpoolctrl-b0ced3676e83147f022655f757da8259617d4060.tar.gz
poolctrl-b0ced3676e83147f022655f757da8259617d4060.tar.xz
poolctrl-b0ced3676e83147f022655f757da8259617d4060.zip
kleine Korrekturen
Diffstat (limited to 'application')
-rwxr-xr-xapplication/forms/EventAdd.php18
-rwxr-xr-xapplication/forms/EventEdit.php44
2 files changed, 36 insertions, 26 deletions
diff --git a/application/forms/EventAdd.php b/application/forms/EventAdd.php
index ea04456..f6b2dc6 100755
--- a/application/forms/EventAdd.php
+++ b/application/forms/EventAdd.php
@@ -130,6 +130,12 @@ class Application_Form_EventAdd extends Zend_Form
public function init()
{
+ if(isset($this->bootoslist)) {
+ foreach($this->bootoslist as $bootos) {
+ $bootosIDs[] = $bootos->getID();
+ }
+ }
+
$this->setName('EventAdd');
$this->setMethod('post');
@@ -291,7 +297,7 @@ class Application_Form_EventAdd extends Zend_Form
}
$bootosfield->setRegisterInArrayValidator(false);
- $bootosfield->setAttrib('onchange', "bootosfieldChanged('pbs_bootosID', " . count($this->bootoslist) . ");");
+ $bootosfield->setAttrib('onchange', "bootosfieldChanged('pbs_bootosID', bootosIDs);");
$this->addElement($bootosfield);
foreach($this->configlist as $id => $bootosConfigs) {
@@ -322,10 +328,12 @@ class Application_Form_EventAdd extends Zend_Form
));
echo '<script type="text/javascript">
- addeventcategoryfieldChanged("category");
- immediateChanged("immediate");
- bootosfieldChanged("pbs_bootosID", ' . count($this->bootoslist) . ');
- $(function() {
+ addeventcategoryfieldChanged("category");
+ immediateChanged("immediate");';
+ $ids = implode(", ", $bootosIDs);
+ echo "\nbootosIDs = new Array(" . $ids . ");\n";
+ echo 'bootosfieldChanged("pbs_bootosID", bootosIDs);
+ $(function() {
$("#start").datetimepicker({
dateFormat: "mm/dd/yy",
timeFormat: "hh:mm tt",
diff --git a/application/forms/EventEdit.php b/application/forms/EventEdit.php
index a28793e..6189684 100755
--- a/application/forms/EventEdit.php
+++ b/application/forms/EventEdit.php
@@ -343,7 +343,7 @@ class Application_Form_EventEdit extends Zend_Form
}
$bootosfield->setRegisterInArrayValidator(false);
- $bootosfield->setAttrib('onchange', "bootosfieldChanged('pbs_bootosID', " . count($this->bootoslist) . ");");
+ $bootosfield->setAttrib('onchange', "bootosfieldChanged('pbs_bootosID', bootosIDs);");
$bootosfield->setValue( $this->params['pbs_bootosID']);
$this->addElement($bootosfield);
@@ -378,25 +378,27 @@ class Application_Form_EventEdit extends Zend_Form
'onclick' => 'location.href="/event/"',
));
- echo '<script type="text/javascript">
- 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>';
+ 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