summaryrefslogtreecommitdiff
path: root/framework/Web/UI/ActiveControls/TActivePager.php
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2014-01-06 22:41:46 +0100
committerDavid <ottodavid@gmx.net>2014-08-21 17:20:54 +0200
commitfc0db15ebce101602fb1cbfa8f6a5cc0f8b58be4 (patch)
tree80fff53aa0d9c60612bc2ca690a46194e9c160cf /framework/Web/UI/ActiveControls/TActivePager.php
parent48577f63f414dc3078abc4bdc93bde932fe666a6 (diff)
Happy 2014!
(cherry picked from commit 7915cde127eba2a5143fd45c6b32e81ad91bdfae) Conflicts: framework/Data/Common/Mssql/TMssqlMetaData.php framework/Data/Common/Mysql/TMysqlMetaData.php framework/Data/Common/Oracle/TOracleMetaData.php framework/Data/Common/Pgsql/TPgsqlMetaData.php framework/Data/Common/Sqlite/TSqliteMetaData.php framework/Data/Common/TDbMetaData.php framework/Web/UI/ActiveControls/TCallbackClientScript.php framework/Web/UI/JuiControls/TJuiAutoComplete.php framework/Web/UI/JuiControls/TJuiControlAdapter.php framework/Web/UI/JuiControls/TJuiDraggable.php framework/Web/UI/JuiControls/TJuiDroppable.php framework/Web/UI/JuiControls/TJuiResizable.php framework/Web/UI/JuiControls/TJuiSelectable.php framework/Web/UI/JuiControls/TJuiSortable.php framework/Wsat/TWsatARGenerator.php framework/Wsat/TWsatService.php framework/Wsat/pages/TWsatGenerateAR.php framework/Wsat/pages/TWsatHome.php framework/Wsat/pages/TWsatLogin.php framework/Wsat/pages/TWsatScaffolding.php
Diffstat (limited to 'framework/Web/UI/ActiveControls/TActivePager.php')
-rw-r--r--framework/Web/UI/ActiveControls/TActivePager.php46
1 files changed, 23 insertions, 23 deletions
diff --git a/framework/Web/UI/ActiveControls/TActivePager.php b/framework/Web/UI/ActiveControls/TActivePager.php
index 7dcd3212..a5d629ea 100644
--- a/framework/Web/UI/ActiveControls/TActivePager.php
+++ b/framework/Web/UI/ActiveControls/TActivePager.php
@@ -4,7 +4,7 @@
*
* @author "gevik" (forum contributor) and Christophe Boulain (Christophe.Boulain@gmail.com)
* @link http://www.pradosoft.com/
- * @copyright Copyright &copy; 2005-2013 PradoSoft
+ * @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
* @version $Id: TActivePager.php 3245 2013-01-07 20:23:32Z ctrlaltca $
* @package System.Web.UI.ActiveControls
@@ -17,13 +17,13 @@ Prado::using('System.Web.UI.ActiveControls.TActiveControlAdapter');
/**
* TActivePager is the active control counter part of TPager.
- *
+ *
* When a page change is requested, TActivePager raises a callback instead of the
* traditional postback.
*
* The {@link onCallback OnCallback} event is raised during a callback request
* and it is raise <b>after</b> the {@link onPageIndexChanged OnPageIndexChanged} event.
- *
+ *
* @author "gevik" (forum contributor) and Christophe Boulain (Christophe.Boulain@gmail.com)
* @version $Id: TActivePager.php 3245 2013-01-07 20:23:32Z ctrlaltca $
* @package System.Web.UI.ActiveControls
@@ -41,7 +41,7 @@ class TActivePager extends TPager implements IActiveControl, ICallbackEventHandl
parent::__construct();
$this->setAdapter(new TActiveControlAdapter($this));
}
-
+
/**
* @return TBaseActiveControl standard active control options.
*/
@@ -60,11 +60,11 @@ class TActivePager extends TPager implements IActiveControl, ICallbackEventHandl
/**
* Raises the callback event. This method is required by {@link
- * ICallbackEventHandler} interface.
+ * ICallbackEventHandler} interface.
* This method is mainly used by framework and control developers.
* @param TCallbackEventParameter the event parameter
*/
-
+
public function raiseCallbackEvent($param)
{
$this->onCallback($param);
@@ -82,7 +82,7 @@ class TActivePager extends TPager implements IActiveControl, ICallbackEventHandl
{
$this->raiseEvent('OnCallback', $this, $param);
}
-
+
/**
* Builds a dropdown list pager
* Override parent implementation to build Active dropdown lists.
@@ -90,25 +90,25 @@ class TActivePager extends TPager implements IActiveControl, ICallbackEventHandl
protected function buildListPager()
{
$list=new TActiveDropDownList;
-
+
$list->getAdapter()->getBaseActiveControl()->setClientSide(
$this->getClientSide()
);
-
+
$this->getControls()->add($list);
$list->setDataSource(range(1,$this->getPageCount()));
$list->dataBind();
$list->setSelectedIndex($this->getCurrentPageIndex());
$list->setAutoPostBack(true);
$list->attachEventHandler('OnSelectedIndexChanged',array($this,'listIndexChanged'));
- $list->attachEventHandler('OnCallback', array($this, 'handleCallback'));
- }
-
+ $list->attachEventHandler('OnCallback', array($this, 'handleCallback'));
+ }
+
/**
* Creates a pager button.
* Override parent implementation to create, depending on the button type, a TActiveLinkButton,
* a TActiveButton or a TActiveImageButton may be created.
- *
+ *
* @param string button type, either LinkButton or PushButton
* @param boolean whether the button should be enabled
* @param string caption of the button
@@ -144,28 +144,28 @@ class TActivePager extends TPager implements IActiveControl, ICallbackEventHandl
if(!$enabled)
$button->setEnabled(false);
}
-
+
if($buttonType===TPagerButtonType::ImageButton)
{
$button->ImageUrl = $text;
}
-
+
$button->setText($text);
$button->setCommandName($commandName);
$button->setCommandParameter($commandParameter);
$button->setCausesValidation(false);
-
- $button->attachEventHandler('OnCallback', array($this, 'handleCallback'));
+
+ $button->attachEventHandler('OnCallback', array($this, 'handleCallback'));
$button->getAdapter()->getBaseActiveControl()->setClientSide(
$this->getClientSide()
);
-
+
return $button;
}
-
+
/**
* Event handler to the OnCallback active buttons or active dropdownlist.
- * This handler will raise the {@link onCallback OnCallback} event
+ * This handler will raise the {@link onCallback OnCallback} event
*
* @param mixed $sender
* @param TCallbackEventParameter $param
@@ -181,14 +181,14 @@ class TActivePager extends TPager implements IActiveControl, ICallbackEventHandl
{
$control->render($param->getNewWriter());
// FIXME : With some very fast machine, the getNewWriter() consecutive calls are in the same microsecond, resulting
- // of getting the same boundaries in ajax response. Wait 1 microsecond to avoid this.
+ // of getting the same boundaries in ajax response. Wait 1 microsecond to avoid this.
usleep(1);
}
}
// Raise callback event
$this->onCallback($param);
- }
-
+ }
+
public function render ($writer)
{
if($this->getHasPreRendered())