Christoffer Niska avatar Christoffer Niska committed 8ecd227

made improvements to BootPager and changed the loading image

Comments (0)

Files changed (2)

widgets/BootGridView.php

 	 */
 	public $pager = array('class'=>'bootstrap.widgets.BootPager');
 	/**
-	 * @var string the URL of the CSS file used by this detail view.
+	 * @var string the URL of the CSS file used by this grid view.
 	 * Defaults to false, meaning that no CSS will be included.
 	 */
 	public $cssFile = false;

widgets/BootPager.php

 class BootPager extends CLinkPager
 {
 	/**
+	 * @var string the text shown before page buttons. Defaults to ''.
+	 */
+	public $header = '';
+	/**
+	 * @var string the URL of the CSS file used by this pager.
+	 * Defaults to false, meaning that no CSS will be included.
+	 */
+	public $cssFile = false;
+	/**
 	 * @var boolean whether to display the first and last items.
 	 */
 	public $displayFirstAndLast = false;
 	 */
 	public function init()
 	{
-		if ($this->header === null)
-			$this->header = ''; // Bootstrap does not use a header
-
 		if ($this->nextPageLabel === null)
-			$this->nextPageLabel=Yii::t('bootstrap','Next').' →';
+			$this->nextPageLabel = Yii::t('bootstrap','Next').' →';
 
 		if ($this->prevPageLabel === null)
-			$this->prevPageLabel='← '.Yii::t('bootstrap','Previous');
+			$this->prevPageLabel = '← '.Yii::t('bootstrap','Previous');
 
 		if ($this->firstPageLabel === null)
-			$this->firstPageLabel=Yii::t('bootstrap','First');
+			$this->firstPageLabel = Yii::t('bootstrap','First');
 
 		if ($this->lastPageLabel === null)
-			$this->lastPageLabel=Yii::t('bootstrap','Last');
-
-		if ($this->cssFile === null)
-			$this->cssFile = false; // Bootstrap has its own css
+			$this->lastPageLabel = Yii::t('bootstrap','Last');
 
 		if (!isset($this->htmlOptions['class']))
 			$this->htmlOptions['class'] = ''; // would default to yiiPager
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.