From 96a7bea357389741a6687fc0706439796e2946d3 Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 1 Aug 2014 19:25:49 -0700 Subject: [PATCH 01/42] Added simple bootstrap carousel method. --- e107_handlers/form_handler.php | 81 +++++++++++++++++++++++++++++++++- 1 file changed, 80 insertions(+), 1 deletion(-) diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index 366bcecd7..529e4645c 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -180,6 +180,11 @@ class e_form $options['size'] = 7; return $this->text($name, $value, $maxlength, $options); } + + + + + /** * Render Bootstrap Tabs @@ -226,8 +231,82 @@ class e_form return $text; } + + + - + /** + * Render Bootstrap Carousel + * @param $name : A unique name + * @param $array + * @param $options : placeholder for any future options. (currently not in use) + * @example + * $array = array( + * 'slide1' => array('caption' => 'Slide 1', 'text' => 'first slide content' ), + * 'slide2' => array('caption' => 'Slide 2', 'text' => 'second slide content' ), + * 'slide3' => array('caption' => 'Slide 3', 'text' => 'third slide content' ) + * ); + */ + function carousel($name="e-carousel", $array, $options = array()) + { + + $text =' + + + '; + + return $text; + + } + + /** From 69af4f7f808607abdb7131ed14016bd51845127f Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 1 Aug 2014 21:42:03 -0700 Subject: [PATCH 02/42] Added carousel options. --- e107_handlers/form_handler.php | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index 529e4645c..ed3c68290 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -247,13 +247,31 @@ class e_form * 'slide3' => array('caption' => 'Slide 3', 'text' => 'third slide content' ) * ); */ - function carousel($name="e-carousel", $array, $options = array()) + function carousel($name="e-carousel", $array, $options = null) { + $interval = null; + $wrap = null; + $pause = null; + + if(isset($options['wrap'])) + { + $wrap = 'data-wrap="'.$options['wrap'].'"'; + } + + if(isset($options['interval'])) + { + $interval = 'data-interval="'.$options['interval'].'"'; + } + + if(isset($options['pause'])) + { + $interval = 'data-pause="'.$options['pause'].'"'; + } $text =' -