summaryrefslogtreecommitdiff
path: root/demos/quickstart
diff options
context:
space:
mode:
Diffstat (limited to 'demos/quickstart')
-rw-r--r--demos/quickstart/protected/pages/Advanced/Scripts3.page66
-rw-r--r--demos/quickstart/protected/pages/Advanced/es/Scripts3.page52
-rw-r--r--demos/quickstart/protected/pages/Advanced/id/Scripts3.page49
3 files changed, 11 insertions, 156 deletions
diff --git a/demos/quickstart/protected/pages/Advanced/Scripts3.page b/demos/quickstart/protected/pages/Advanced/Scripts3.page
index 416df4f8..3f41abe1 100644
--- a/demos/quickstart/protected/pages/Advanced/Scripts3.page
+++ b/demos/quickstart/protected/pages/Advanced/Scripts3.page
@@ -24,8 +24,17 @@ The available packaged libraries included in Prado are
<li><tt>ajax</tt> : ajax and callback related based on Prototype</li>
<li><tt>validator</tt> : validation</li>
<li><tt>logger</tt> : javascript logger and object browser</li>
- <li><tt>datepicker</tt> : datepicker</li>
- <li><tt>colorpicker</tt> : colorpicker</li>
+ <li><tt>datepicker</tt> : datepicker control</li>
+ <li><tt>colorpicker</tt> : colorpicker control</li>
+ <li><tt>dragdrop</tt> : basic support for "drag and drop" control</li>
+ <li><tt>dragdropextra</tt> : extra support for "drag and drop" controls</li>
+ <li><tt>slider</tt> : slider control</li>
+ <li><tt>keyboard</tt> : software keyboard control</li>
+ <li><tt>tabpanel</tt> : tabpanel control</li>
+ <li><tt>activedatepicker</tt> : ajax version of the datepicker control</li>
+ <li><tt>activefileupload</tt> : ajax version of the fileupload control</li>
+ <li><tt>accordion</tt> : accordion control</li>
+ <li><tt>htmlarea</tt> : tinymce control</li>
</ul>
<p id="850761" class="block-content">The dependencies for each library are automatically resolved. Components
@@ -35,57 +44,4 @@ and its dependencies will be automatically included on the page.</p>
<p id="850762" class="block-content">See <a href="?page=Controls.ClientScript">TClientScript</a> for options of adding
your custom Javascript code to the page.</p>
-
-<h2 id="176028">Publishing Javascript Libraries as Assets</h2>
-<com:SinceVersion Version="3.1b" />
-<p class="block-content">Use <a href="?page=Controls.ClientScriptLoader">TClientScriptLoader</a> to publish and combine multiple existing javascript files (e.g. javascript libraries distributed with Prado or otherwise)
-as packages.</p> For greater control on what and when to publish, use the
-<tt>registerJavascriptPackages($base, $packages, $debug=null, $gzip=true)</tt>
-method in the <tt>TClientScriptManager</tt> class, which an instance can be obtained
-using <tt>$this->getPage()->getClientScript()</tt> or its equivalents.
-For example, if multiple controls will use the same set of javascript libraries,
-write a class to handle the registration of packages required by those controls.
-</p>
-<com:TTextHighlighter Language="php" CssClass="source block-content">
-class MyJavascriptLib extends TComponent
-{
- private $_packages=array(); //keep track of all registrations
-
- private $_manager;
-
- protected function __construct(TPage $owner)
- {
- $this->_manager = $owner->getClientScript();
- $owner->onPreRenderComplete = array($this, 'registerScriptLoader');
- }
-
- public static function registerPackage(TControl $control, $name)
- {
- static $instance;
- if($instance===null)
- $instance=new self($control->getPage());
- $instance->_packages[$name]=true;
- }
-
- protected function registerScriptLoader()
- {
- $dir = dirname(__FILE__).'/myscripts'; //contains my javascript files
- $scripts = array_keys($this->_packages);
- $url = $this->_manager->registerJavascriptPackages($dir, $scripts);
- $this->_manager->registerScriptFile($url,$url);
- }
-}
-
-// example control class using the javascript packages
-class TestComp extends TControl
-{
- public function onPreRender($param)
- {
- parent::onPreRender($param);
- MyJavascriptLib::registerPackage($this,'package1');
- }
-}
-</com:TTextHighlighter>
-
-
</com:TContent>
diff --git a/demos/quickstart/protected/pages/Advanced/es/Scripts3.page b/demos/quickstart/protected/pages/Advanced/es/Scripts3.page
index 416df4f8..37885abb 100644
--- a/demos/quickstart/protected/pages/Advanced/es/Scripts3.page
+++ b/demos/quickstart/protected/pages/Advanced/es/Scripts3.page
@@ -36,56 +36,4 @@ and its dependencies will be automatically included on the page.</p>
<p id="850762" class="block-content">See <a href="?page=Controls.ClientScript">TClientScript</a> for options of adding
your custom Javascript code to the page.</p>
-<h2 id="176028">Publishing Javascript Libraries as Assets</h2>
-<com:SinceVersion Version="3.1b" />
-<p class="block-content">Use <a href="?page=Controls.ClientScriptLoader">TClientScriptLoader</a> to publish and combine multiple existing javascript files (e.g. javascript libraries distributed with Prado or otherwise)
-as packages.</p> For greater control on what and when to publish, use the
-<tt>registerJavascriptPackages($base, $packages, $debug=null, $gzip=true)</tt>
-method in the <tt>TClientScriptManager</tt> class, which an instance can be obtained
-using <tt>$this->getPage()->getClientScript()</tt> or its equivalents.
-For example, if multiple controls will use the same set of javascript libraries,
-write a class to handle the registration of packages required by those controls.
-</p>
-<com:TTextHighlighter Language="php" CssClass="source block-content">
-class MyJavascriptLib extends TComponent
-{
- private $_packages=array(); //keep track of all registrations
-
- private $_manager;
-
- protected function __construct(TPage $owner)
- {
- $this->_manager = $owner->getClientScript();
- $owner->onPreRenderComplete = array($this, 'registerScriptLoader');
- }
-
- public static function registerPackage(TControl $control, $name)
- {
- static $instance;
- if($instance===null)
- $instance=new self($control->getPage());
- $instance->_packages[$name]=true;
- }
-
- protected function registerScriptLoader()
- {
- $dir = dirname(__FILE__).'/myscripts'; //contains my javascript files
- $scripts = array_keys($this->_packages);
- $url = $this->_manager->registerJavascriptPackages($dir, $scripts);
- $this->_manager->registerScriptFile($url,$url);
- }
-}
-
-// example control class using the javascript packages
-class TestComp extends TControl
-{
- public function onPreRender($param)
- {
- parent::onPreRender($param);
- MyJavascriptLib::registerPackage($this,'package1');
- }
-}
-</com:TTextHighlighter>
-
-
</com:TContent>
diff --git a/demos/quickstart/protected/pages/Advanced/id/Scripts3.page b/demos/quickstart/protected/pages/Advanced/id/Scripts3.page
index d2ce269b..b313e7fc 100644
--- a/demos/quickstart/protected/pages/Advanced/id/Scripts3.page
+++ b/demos/quickstart/protected/pages/Advanced/id/Scripts3.page
@@ -32,53 +32,4 @@ Sebagai contoh, jika Anda menambah komponen <tt>TDatePicker</tt> pada halaman, <
<p id="850762" class="block-content">Lihat <a href="?page=Controls.ClientScript">TClientScript</a> untuk opsi penambahan kode Javascript kustom Anda ke halaman.</p>
-<h2 id="176028">Menerbitkan Librari Javascript sebagai Assets</h2>
-<com:SinceVersion Version="3.1b" />
-<p class="block-content">Gunakan <a href="?page=Controls.ClientScriptLoader">TClientScriptLoader</a> untuk menerbitkan dan menggabung file javascript yang sudah ada (misalnya librari javascript yang didistribusikan dengan Prado atau sebaliknya) sebagai paket.</p> Untuk kontrol yang lebih besar pada apa dan kapan untuk menerbitkan, gunakan metode
-<tt>registerJavascriptPackages($base, $packages, $debug=null, $gzip=true)</tt>
-dalam kelas <tt>TClientScriptManager</tt>, yang turunannya bisa diperoleh dengan <tt>$this->getPage()->getClientScript()</tt> atau persamaannya.
-Sebagai contoh, jika multipel kontrol akan memakai set librari javascript yang sama, tulis sebuah kelas untuk menangani registrasi paket yang diperlukan oleh kontrol tersebut.
-</p>
-<com:TTextHighlighter Language="php" CssClass="source block-content">
-class MyJavascriptLib extends TComponent
-{
- private $_packages=array(); //perlihara seluruh registrasi
-
- private $_manager;
-
- protected function __construct(TPage $owner)
- {
- $this->_manager = $owner->getClientScript();
- $owner->onPreRenderComplete = array($this, 'registerScriptLoader');
- }
-
- public static function registerPackage(TControl $control, $name)
- {
- static $instance;
- if($instance===null)
- $instance=new self($control->getPage());
- $instance->_packages[$name]=true;
- }
-
- protected function registerScriptLoader()
- {
- $dir = dirname(__FILE__).'/myscripts'; //berisi file javascript
- $scripts = array_keys($this->_packages);
- $url = $this->_manager->registerJavascriptPackages($dir, $scripts);
- $this->_manager->registerScriptFile($url,$url);
- }
-}
-
-// contoh kelas kontrol menggunakan paket javascript
-class TestComp extends TControl
-{
- public function onPreRender($param)
- {
- parent::onPreRender($param);
- MyJavascriptLib::registerPackage($this,'package1');
- }
-}
-</com:TTextHighlighter>
-
-
</com:TContent>