From c5196407a918313a8c8fd7058a3680e9d7052655 Mon Sep 17 00:00:00 2001 From: Kyle Johnson Date: Sun, 1 Sep 2013 17:50:26 -0400 Subject: [PATCH] Moved all of the Monitors HTML to elements --- web/app/View/Elements/tabs-buffers.ctp | 13 ++++++ web/app/View/Elements/tabs-control.ctp | 2 + web/app/View/Elements/tabs-general.ctp | 11 ++++++ web/app/View/Elements/tabs-misc.ctp | 21 ++++++++++ web/app/View/Elements/tabs-source.ctp | 50 ++++++++++++++++++++++++ web/app/View/Elements/tabs-timestamp.ctp | 10 +++++ web/app/View/Monitors/edit.ctp | 33 +++++++++++----- 7 files changed, 130 insertions(+), 10 deletions(-) create mode 100644 web/app/View/Elements/tabs-buffers.ctp create mode 100644 web/app/View/Elements/tabs-control.ctp create mode 100644 web/app/View/Elements/tabs-general.ctp create mode 100644 web/app/View/Elements/tabs-misc.ctp create mode 100644 web/app/View/Elements/tabs-source.ctp create mode 100644 web/app/View/Elements/tabs-timestamp.ctp diff --git a/web/app/View/Elements/tabs-buffers.ctp b/web/app/View/Elements/tabs-buffers.ctp new file mode 100644 index 000000000..173c5ec81 --- /dev/null +++ b/web/app/View/Elements/tabs-buffers.ctp @@ -0,0 +1,13 @@ +
+Form->inputs(array( + 'ImageBufferCount', + 'WarmupCount', + 'PreEventCount', + 'PostEventCount', + 'StreamReplayBuffer', + 'AlarmFrameCount', + 'legend' => false + )); +?> +
diff --git a/web/app/View/Elements/tabs-control.ctp b/web/app/View/Elements/tabs-control.ctp new file mode 100644 index 000000000..502088bfd --- /dev/null +++ b/web/app/View/Elements/tabs-control.ctp @@ -0,0 +1,2 @@ +
+
diff --git a/web/app/View/Elements/tabs-general.ctp b/web/app/View/Elements/tabs-general.ctp new file mode 100644 index 000000000..be5ae21ed --- /dev/null +++ b/web/app/View/Elements/tabs-general.ctp @@ -0,0 +1,11 @@ +
+Form->input('Name'); +echo $this->Form->input('Type', array( 'type' => 'select', 'options' => $typeoptions)); +echo $this->Form->input('Function', array('type' => 'select', 'options' => $functionoptions)); +echo $this->Form->input('Enabled', array('type' => 'checkbox')); +echo $this->Form->input('MaxFPS'); +echo $this->Form->input('AlarmMaxFPS'); +echo $this->Form->input('RefBlendPerc'); +?> +
diff --git a/web/app/View/Elements/tabs-misc.ctp b/web/app/View/Elements/tabs-misc.ctp new file mode 100644 index 000000000..49c4c7d13 --- /dev/null +++ b/web/app/View/Elements/tabs-misc.ctp @@ -0,0 +1,21 @@ +
+Form->inputs(array( + 'EventPrefix', + 'SectionLength', + 'FrameSkip', + 'FPSReportInterval', + 'DefaultView', + 'DefaultRate', + 'DefaultScale', + 'WebColour', + 'legend' => false + )); + + echo $this->Form->input('LinkedMonitors', array( + 'type' => 'checkbox', + 'options' => $linkedMonitors, + )); + +?> +
diff --git a/web/app/View/Elements/tabs-source.ctp b/web/app/View/Elements/tabs-source.ctp new file mode 100644 index 000000000..b8e45f9af --- /dev/null +++ b/web/app/View/Elements/tabs-source.ctp @@ -0,0 +1,50 @@ +
+Form->input('Protocol', array( + 'type' => 'select', + 'options' => $protocoloptions + )); + echo $this->Form->input('Method', array( + 'type' => 'select', + 'options' => $methodoptions + )); + echo $this->Form->input('Host'); + echo $this->Form->input('Port'); + echo $this->Form->input('Path'); + break; + +case 'Local': + echo $this->Form->input('Path'); + echo $this->Form->input('Method', array( + 'type' => 'select', + 'options' => $optionsMethod + )); + echo $this->Form->input('Channel', array( + 'type' => 'select', + 'options' => $channeloptions + )); + echo $this->Form->input('Format', array( + 'type' => 'select', + 'options' => $formatoptions + )); + echo $this->Form->input('Palette', array( + 'type' => 'select', + 'options' => $optionsPalette + )); + break; + +case 'File': + break; +} + +echo $this->Form->input('Colours', array( + 'type' => 'select', + 'options' => $optionsColours +)); +echo $this->Form->input('Width'); +echo $this->Form->input('Height'); + +?> +
diff --git a/web/app/View/Elements/tabs-timestamp.ctp b/web/app/View/Elements/tabs-timestamp.ctp new file mode 100644 index 000000000..c50c827de --- /dev/null +++ b/web/app/View/Elements/tabs-timestamp.ctp @@ -0,0 +1,10 @@ +
+Form->inputs(array( + 'LabelFormat', + 'LabelX', + 'LabelY', + 'legend' => false + )); +?> +
diff --git a/web/app/View/Monitors/edit.ctp b/web/app/View/Monitors/edit.ctp index a5bb9650a..5c1812497 100644 --- a/web/app/View/Monitors/edit.ctp +++ b/web/app/View/Monitors/edit.ctp @@ -1,10 +1,23 @@ -

Edit Monitor

-Form->create('Monitor'); - echo $this->Form->input('Name'); - $functionoptions = array('Modect' => 'Modect', 'Monitor' => 'Monitor', 'Record' => 'Record', 'None' => 'None', 'Nodect' => 'Nodect', 'Mocord' => 'Mocord'); - echo $this->Form->input('Function', array('type' => 'select', 'options' => $functionoptions)); - echo $this->Form->input('Enabled', array('type' => 'checkbox')); - echo $this->Form->input('Id', array('type' => 'hidden')); - echo $this->Form->end('Save Monitor'); -?> +Form->create('Monitor', array( 'inputDefaults' => array( 'legend' => false, 'fieldset' => false))); ?> +Form->input('Id', array('type' => 'hidden')); ?> +
+ + + +element('tabs-general'); ?> +element('tabs-source'); ?> +element('tabs-timestamp'); ?> +element('tabs-buffers'); ?> +element('tabs-control'); ?> +element('tabs-misc'); ?> + + +
+Form->end('Save Monitor'); ?>