diff options
author | ctrlaltca <ctrlaltca@gmail.com> | 2014-08-26 16:59:21 +0200 |
---|---|---|
committer | ctrlaltca <ctrlaltca@gmail.com> | 2014-08-26 16:59:21 +0200 |
commit | 74b31be9515eddfa63005d6760614badfaba9fea (patch) | |
tree | 47c952901dcb5eccd6dd8b7c6ee7e0b6bf176510 /demos/quickstart/protected/pages/ActiveControls/Samples | |
parent | 2b11341614ac4a15be697fa8acad07055154ac54 (diff) | |
parent | 0c5026b55cde5c104f10686afd8b441568175d38 (diff) |
Backports for Prado 3.2.4
Diffstat (limited to 'demos/quickstart/protected/pages/ActiveControls/Samples')
11 files changed, 82 insertions, 18 deletions
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveButton/Home.page b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveButton/Home.page index 1e030102..8482ae14 100755 --- a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveButton/Home.page +++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveButton/Home.page @@ -43,5 +43,4 @@ A button causing validation with <tt>OnCallback</tt>: </table>
-<com:TJavascriptLogger />
</com:TContent>
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCheckBox/Home.page b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCheckBox/Home.page index 139306f6..89543ef0 100755 --- a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCheckBox/Home.page +++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCheckBox/Home.page @@ -71,6 +71,5 @@ A checkbox validated by a required field validator: </table>
-<com:TJavascriptLogger />
</com:TContent>
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCustomValidator/Home.page b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCustomValidator/Home.page index 8ef69a9a..1d16235e 100755 --- a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCustomValidator/Home.page +++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveCustomValidator/Home.page @@ -16,6 +16,5 @@ Custom validator using callbacks: </td></tr>
</table>
-<com:TJavascriptLogger />
</com:TContent>
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveHyperLink/Home.page b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveHyperLink/Home.page index a3f10613..a7767e2d 100755 --- a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveHyperLink/Home.page +++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveHyperLink/Home.page @@ -66,5 +66,4 @@ Body contents </tr>
</table>
-<com:TJavascriptLogger />
</com:TContent>
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActivePager/Home.page b/demos/quickstart/protected/pages/ActiveControls/Samples/TActivePager/Home.page index e38486d1..eb5ef821 100755 --- a/demos/quickstart/protected/pages/ActiveControls/Samples/TActivePager/Home.page +++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActivePager/Home.page @@ -99,5 +99,21 @@ Choose page: Element.hide('wait') </prop:ClientSide.OnComplete> </com:TActivePager> -<com:TJavascriptLogger/> +<br/> +Use of a css class for buttons: +<com:TStyleSheet> +.greenbold_button { + background-color: #0f0; + font-weight: bold; +} +</com:TStyleSheet> +<com:TActivePager ID="Pager4" + ControlToPaginate="DataList" + PageButtonCount="3" + Mode="Numeric" + ButtonType="PushButton" + OnPageIndexChanged="pageChanged" + OnCallBack="RenderCallback" + ButtonCssClass="greenbold_button" + /> </com:TContent> diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActivePanel/Home.page b/demos/quickstart/protected/pages/ActiveControls/Samples/TActivePanel/Home.page index 360b6b0f..f3bfe843 100755 --- a/demos/quickstart/protected/pages/ActiveControls/Samples/TActivePanel/Home.page +++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActivePanel/Home.page @@ -20,5 +20,4 @@ anyway since they are placed inside the active panel. </com:TActivePanel>
</td></tr>
</table>
-<com:TJavascriptLogger />
</com:TContent>
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveTableRow/Home.page b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveTableRow/Home.page index 0b3f84fb..49b5bcb6 100755 --- a/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveTableRow/Home.page +++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TActiveTableRow/Home.page @@ -14,6 +14,5 @@ </com:TTable>
<com:TActiveLabel id="lblResult"/>
-<com:TJavascriptLogger />
</com:TContent>
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientScript/Home.page b/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientScript/Home.page index 539909a9..dfec4755 100755 --- a/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientScript/Home.page +++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientScript/Home.page @@ -7,12 +7,28 @@ </p>
<h2>Actions</h2>
-<com:TRadioButtonList ID="radio1">
- <com:TListItem Value="1" Text="alert() me of something" />
+<com:TClientScript PradoScripts="effects" />
+<com:TStyleSheet>
+ .red_background {
+ background-color: red;
+ }
+</com:TStyleSheet>
+
+<com:TRadioButtonList ID="radio1" RepeatColumns="2">
<com:TListItem Value="2" Text="toggle Checkbox 1" />
<com:TListItem Value="3" Text="hide Label 1" />
<com:TListItem Value="4" Text="show Label 1" />
- <com:TListItem Value="5" Text="focus TextBox 1" />
+ <com:TListItem Value="9" Text="focus TextBox 1" />
+ <com:TListItem Value="10" Text="scroll to CheckBox 1" />
+ <com:TListItem Value="11" Text="add red_background class to TextBox 1" />
+ <com:TListItem Value="12" Text="remove red_background class from TextBox 1" />
+ <com:TListItem Value="14" Text="set the 'disable' attribute on TextBox 1" />
+ <com:TListItem Value="15" Text="change the background color of Panel 1" />
+ <com:TListItem Value="16" Text="prepend and append some content inside Panel 1" />
+ <com:TListItem Value="17" Text="prepend and append some content outside Panel 1" />
+ <com:TListItem Value="18" Text="replace Panel 1 with some plain text" />
+ <com:TListItem Value="19" Text="remove TextBox 1" />
+ <com:TListItem Value="22" Text="trigger a click event on Panel 1" />
</com:TRadioButtonList>
<br/><com:TActiveButton ID="button1" OnCallback="buttonCallback" Text="callback!" />
@@ -32,8 +48,17 @@ <td>TextBox 1:</td>
<td><com:TTextBox ID="txt1" Text="Sample text" /></td>
</tr>
+ <tr>
+ <td>Panel 1:</td>
+ <td>
+ <com:TPanel ID="pan1" Style="width:100px;height:100px;background:green" Attributes.OnClick="alert('clicked on Panel1')" >
+ Panel contents
+ </com:TPanel>
+ </td>
+ </tr>
</table>
-<com:TJavascriptLogger />
-
+<div style="height:900px">
+Thw following space is intentionally left blank for the scrolling test
+</div>
</com:TContent>
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientScript/Home.php b/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientScript/Home.php index eeacb660..4cd655ef 100755 --- a/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientScript/Home.php +++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientScript/Home.php @@ -7,9 +7,6 @@ class Home extends TPage { switch($this->radio1->SelectedValue) { - case 1: - $this->getCallbackClient()->evaluateScript("<script> alert('something'); </script>"); - break; case 2: $this->getCallbackClient()->check($this->check1, !$this->check1->Checked); break; @@ -19,9 +16,43 @@ class Home extends TPage case 4: $this->getCallbackClient()->show($this->label1); break; - case 5: + case 9: $this->getCallbackClient()->focus($this->txt1); break; + case 10: + $this->getCallbackClient()->scrollTo($this->check1, array('duration' => 1000, 'offset' => 10)); + break; + case 11: + $this->getCallbackClient()->addCssClass($this->txt1, 'red_background'); + break; + case 12: + $this->getCallbackClient()->removeCssClass($this->txt1, 'red_background'); + break; + case 14: + $this->getCallbackClient()->setAttribute($this->txt1, 'disabled', true); + break; + case 15: + $this->getCallbackClient()->setStyle($this->pan1, array('background-color' => 'blue')); + break; + case 16: + $this->getCallbackClient()->prependContent($this->pan1, 'prepend<br/>'); + $this->getCallbackClient()->appendContent($this->pan1, '<br/>append'); + break; + case 17: + $this->getCallbackClient()->insertContentBefore($this->pan1, 'before'); + $this->getCallbackClient()->insertContentAfter($this->pan1, 'after'); + break; + case 18: + $this->getCallbackClient()->replaceContent($this->pan1, 'No more Panel 1'); + break; + case 19: + $this->getCallbackClient()->remove($this->txt1); + break; + case 22: + $this->getCallbackClient()->click($this->pan1); + // alternative + // $this->getCallbackClient()->raiseClientEvent($this->pan1, 'click'); + break; } } } diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientSide/Home.page b/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientSide/Home.page index 0d13bb90..0f94fd79 100755 --- a/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientSide/Home.page +++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackClientSide/Home.page @@ -68,6 +68,5 @@ connection error has occured. </table>
-<com:TJavascriptLogger />
</com:TContent>
diff --git a/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackOptions/Home.page b/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackOptions/Home.page index cfb041ea..8c6ccd02 100755 --- a/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackOptions/Home.page +++ b/demos/quickstart/protected/pages/ActiveControls/Samples/TCallbackOptions/Home.page @@ -72,6 +72,5 @@ The same TCallbackOptions can be shared among different controls, even of differ </td></tr>
</table>
-<com:TJavascriptLogger />
</com:TContent>
|