| 1 |
<?php |
| 2 |
/** |
| 3 |
* |
| 4 |
*/ |
| 5 |
|
| 6 |
// No direct access allowed. |
| 7 |
defined('ABSPATH') or die("Access denied"); |
| 8 |
|
| 9 |
/** |
| 10 |
* |
| 11 |
*/ |
| 12 |
class CJTSettingsManagerView extends CJTView { |
| 13 |
|
| 14 |
/** |
| 15 |
* put your comment there... |
| 16 |
* |
| 17 |
* @var mixed |
| 18 |
*/ |
| 19 |
protected $pages = array(); |
| 20 |
|
| 21 |
/** |
| 22 |
* put your comment there... |
| 23 |
* |
| 24 |
* @var mixed |
| 25 |
*/ |
| 26 |
public $settings = null; |
| 27 |
|
| 28 |
/** |
| 29 |
* put your comment there... |
| 30 |
* |
| 31 |
*/ |
| 32 |
public function __construct($info) { |
| 33 |
parent::__construct($info); |
| 34 |
// Define setting pages. |
| 35 |
$this->pages = array( |
| 36 |
array('name' => 'uninstall', 'displayName' => cssJSToolbox::getText('Uninstall')), |
| 37 |
array('name' => 'metabox', 'displayName' => cssJSToolbox::getText('MetaBox')), |
| 38 |
); |
| 39 |
} |
| 40 |
|
| 41 |
/** |
| 42 |
* put your comment there... |
| 43 |
* |
| 44 |
* |
| 45 |
*/ |
| 46 |
protected function enqueueScripts() { |
| 47 |
// Use related scripts. |
| 48 |
self::useScripts(__CLASS__, |
| 49 |
'jquery-ui-tabs', |
| 50 |
'jquery-serialize-object', |
| 51 |
'thickbox', |
| 52 |
'views:settings:manager:public:js:{CJT-}settings' |
| 53 |
); |
| 54 |
} |
| 55 |
|
| 56 |
/** |
| 57 |
* put your comment there... |
| 58 |
* |
| 59 |
*/ |
| 60 |
protected function enqueueStyles() { |
| 61 |
// Use related styles. |
| 62 |
self::useStyles(__CLASS__, |
| 63 |
'framework:css:{CJT-}forms', |
| 64 |
'framework:css:jquery-ui-1.8.21.custom', |
| 65 |
'views:settings:manager:public:css:{CJT-}default' |
| 66 |
); |
| 67 |
} |
| 68 |
|
| 69 |
/** |
| 70 |
* put your comment there... |
| 71 |
* |
| 72 |
* @param mixed $name |
| 73 |
*/ |
| 74 |
public function getPage($name, $params = array()) { |
| 75 |
$path = "pages/{$name}"; |
| 76 |
return $this->getTemplate($path, $params); |
| 77 |
} |
| 78 |
|
| 79 |
} // End class. |
| 80 |
|
| 81 |
// Hookable!! |
| 82 |
CJTSettingsManagerView::define('CJTSettingsManagerView'); |