PluginProbe
CSS & JavaScript Toolbox / 12.0
CSS & JavaScript Toolbox v12.0
trunk 0.3 0.8 10 10.1 11 11.2 11.3 11.4 11.5 11.6 11.7 11.8 11.9 11.9.1 12 12.0 12.0.1 12.0.3 12.0.4 12.0.5 12.0.6 12.0.7 6.0 6.0.11 All 60 releases
css-javascript-toolbox / views / blocks / new / view.php

view.php in CSS & JavaScript Toolbox 12.0, at views/blocks/new/view.php

76 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @version $ Id; view.php 21-03-2012 03:22:10 Ahmed Said $
4 */
5
6 // Diallow direct access.
7 defined('ABSPATH') or die("Access denied");
8
9 /**
10 * Get Add-New-Block view markups.
11 *
12 * The method is resposible for selecting the correct template
13 * and initialize template vars.
14 *
15 * @author Ahmed Said
16 * @version 6
17 */
18 class CJTBlocksNewView extends CJTView {
19
20 /**
21 * put your comment there...
22 *
23 * @var mixed
24 */
25 public $position;
26
27 /**
28 * Output Add New Block markups.
29 *
30 * @return void
31 */
32 public function display() {
33 $defaultValues = array('position');
34 // Get form fields default values.
35 foreach ($defaultValues as $name) {
36 if (array_key_exists($name, $_GET)) {
37 $this->$name = $_GET[$name];
38 }
39 }
40 echo $this->getTemplate('default');
41 }
42
43 /**
44 * Output JavaScript files requirred to Add-New-Block view to run.
45 *
46 * @return void
47 */
48 public static function enququeScripts() {
49 // Use related scripts.
50 self::useScripts(__CLASS__,
51 'jquery',
52 'thickbox',
53 'jquery-serialize-object',
54 'framework:js:misc:{CJT-}simple-error-dialog',
55 'views:blocks:new:public:js:{CJT-}add-new-block'
56 );
57 }
58
59 /**
60 * Output CSS files required to Add-New-Block view.
61 *
62 * @return void
63 */
64 public static function enququeStyles() {
65 // Use related styles.
66 self::useStyles(__CLASS__,
67 'thickbox',
68 'framework:css:{CJT-}error-dialog',
69 'framework:css:{CJT-}forms'
70 );
71 }
72
73 } // End class.
74
75 // Hookable!!
76 CJTBlocksNewView::define('CJTBlocksNewView');