From 918ed9fd995cc3e958bb0d48c8d234717facf181 Mon Sep 17 00:00:00 2001 From: tof <> Date: Tue, 4 Sep 2007 08:56:24 +0000 Subject: Merge TSlider component from 3.2-dev branch. --- .../pages/Controls/Samples/TSlider/Home.page | 40 ++++++++++++++++ .../pages/Controls/Samples/TSlider/Home.php | 19 ++++++++ .../protected/pages/Controls/Slider.page | 55 ++++++++++++++++++++++ .../protected/pages/Controls/Standard.page | 4 ++ 4 files changed, 118 insertions(+) create mode 100644 demos/quickstart/protected/pages/Controls/Samples/TSlider/Home.page create mode 100644 demos/quickstart/protected/pages/Controls/Samples/TSlider/Home.php create mode 100644 demos/quickstart/protected/pages/Controls/Slider.page (limited to 'demos/quickstart/protected/pages/Controls') diff --git a/demos/quickstart/protected/pages/Controls/Samples/TSlider/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TSlider/Home.page new file mode 100644 index 00000000..7670f9d3 --- /dev/null +++ b/demos/quickstart/protected/pages/Controls/Samples/TSlider/Home.page @@ -0,0 +1,40 @@ + +

TSlider Sample

+ + + + + + + +
+Simple horizontal slider, with no events handler attached + + + + +
+Horizontal slider from -50 to 50, with image handle, Javascript 'onSlide' handler, ServerSide 'onSliderChanged' handler, initial value and autopostback=true + + + + $('slider2value').innerHTML = value; + + +Value : <%=$this->slider2->value%> + + +
+Vertical slider from 0 to 1, with image handle, Javascript 'onSlide' handler, ServerSide 'onSliderChanged' handler, StepSize, and no autopostback + + + + $('slider3value').innerHTML = value; + + +Value : <%=$this->slider3->value%> + + + +
+
\ No newline at end of file diff --git a/demos/quickstart/protected/pages/Controls/Samples/TSlider/Home.php b/demos/quickstart/protected/pages/Controls/Samples/TSlider/Home.php new file mode 100644 index 00000000..4b9b61b9 --- /dev/null +++ b/demos/quickstart/protected/pages/Controls/Samples/TSlider/Home.php @@ -0,0 +1,19 @@ +slider1Result->setText('Slider Value : '.$this->slider1->getValue()); + } + + public function slider2Changed ($sender, $param) + { + $this->slider2Result->setText('onSliderChanged, Value : '.$sender->getValue()); + } + + public function slider3Changed ($sender, $param) + { + $this->slider3Result->setText('onSliderChanged, Value : '.$sender->getValue()); + } +} +?> \ No newline at end of file diff --git a/demos/quickstart/protected/pages/Controls/Slider.page b/demos/quickstart/protected/pages/Controls/Slider.page new file mode 100644 index 00000000..d71c28a0 --- /dev/null +++ b/demos/quickstart/protected/pages/Controls/Slider.page @@ -0,0 +1,55 @@ + + +

TSlider

+ + +

+TSlider displays a slider for numeric input purpose. A slider consists of a track +which define the range of possible value, and a handle which can slide on the track, to select +a value in the range. The track can be either Horizontal or Vertical, depending of the Direction +property. By default, it's horizontal. +

+

+The range boundaries are defined by MinValue and MaxValue properties. +The default range is from 0 to 100. +The StepSize property can be used to define the step between 2 values inside the range. +Notice that this step will be recomputed if there is more than 200 values between the range boundaries. +You can also provide the allowed values by setting the Values array. +

+ +

+The handle sub-properties can be accessed by Handle property. You can also provide your own control +for the handle, using HandleClass property. Note that this class must be a subclass of +TSliderHandle +

+ +

+The TSlider control can be easily customized using CssClasses. You can provide your own css file, using the +CssUrl property. +The css class for TSlider can be set by the CssClass property. Defaults values are 'hslider' for +an Horizontal slider, or 'vslider' for a Vertical one. +The css class for the Handle can be set by the Handle.CssClass subproperty. Defaults is 'handle', which just +draw a red block as a cursor. 'handle-image' css class is also provided for your convenience, which display an image +as the handle. +

+ +

+If AutoPostBack property is true, postback is performed as soon as the value changed. +

+ +

+TSlider raises the onValueChanged event when the value of the slider has changed during postback. +

+ +

+You can also attach ClientSide javascript events handler to the slider : +

+

+ + + +
$Id$
\ No newline at end of file diff --git a/demos/quickstart/protected/pages/Controls/Standard.page b/demos/quickstart/protected/pages/Controls/Standard.page index 7d961a84..2b8dd7ab 100644 --- a/demos/quickstart/protected/pages/Controls/Standard.page +++ b/demos/quickstart/protected/pages/Controls/Standard.page @@ -119,6 +119,10 @@ TSafeHtml displays its body content with assurance that the content contain no harmful code (such as XSS). +
  • + TSlider represents a Slider control +
  • +
  • TStatements accepts a few PHP statements and displays their standard output on the Web page.
  • -- cgit v1.2.3