| 1 |
<?php |
| 2 |
/** |
| 3 |
* @version $ Id; ?FILE_NAME ?DATE ?TIME ?AUTHOR $ |
| 4 |
*/ |
| 5 |
|
| 6 |
// Disallow direct access. |
| 7 |
defined('ABSPATH') or die("Access denied"); |
| 8 |
|
| 9 |
/** |
| 10 |
* |
| 11 |
* DESCRIPTION |
| 12 |
* |
| 13 |
* @author ?? |
| 14 |
* @version ?? |
| 15 |
*/ |
| 16 |
class CJTTemplatesManagerView extends CJTView { |
| 17 |
|
| 18 |
/** |
| 19 |
* put your comment there... |
| 20 |
* |
| 21 |
* @var mixed |
| 22 |
*/ |
| 23 |
protected $items = null; |
| 24 |
|
| 25 |
/** |
| 26 |
* put your comment there... |
| 27 |
* |
| 28 |
*/ |
| 29 |
public function display($tpl = null) { |
| 30 |
// Query templates list. |
| 31 |
$this->items = $this->getModel()->getItems(); |
| 32 |
// Display the view. |
| 33 |
echo $this->getTemplate($tpl); |
| 34 |
} |
| 35 |
|
| 36 |
/** |
| 37 |
* put your comment there... |
| 38 |
* |
| 39 |
*/ |
| 40 |
protected function enqueueScripts() { |
| 41 |
// Import dependencies scripts! |
| 42 |
self::useScripts(__CLASS__, |
| 43 |
'jquery', |
| 44 |
'jquery-serialize-object', |
| 45 |
'thickbox', |
| 46 |
'views:templates:manager:public:js:{CJT_TEMPLATES-}manager' |
| 47 |
); |
| 48 |
} |
| 49 |
|
| 50 |
/** |
| 51 |
* put your comment there... |
| 52 |
* |
| 53 |
*/ |
| 54 |
protected function enqueueStyles() { |
| 55 |
// Import dependencies styles! |
| 56 |
self::useStyles(__CLASS__, |
| 57 |
'wp-admin', |
| 58 |
'colors-fresh', |
| 59 |
'thickbox', |
| 60 |
'framework:css:{CJT-}forms', |
| 61 |
'views:templates:manager:public:css:{CJT-}default' |
| 62 |
); |
| 63 |
} |
| 64 |
|
| 65 |
} // End class. |
| 66 |
|
| 67 |
// Hookable!! |
| 68 |
CJTTemplatesManagerView::define('CJTTemplatesManagerView'); |