CSS & JavaScript Toolbox - Version 6.1

Version Description

  • Enhance: Initially don't load Block assignment panel items: Speed up Blocks page loading time when its initially opened, also affect the browser performance as the items is not loaded or rendered before its required.
  • Enhance: Initially don't load Block code for the closed/minimised Blocks: Loading those Blocks will be done through AJAX once the Block is opened by user.
  • Enhance: The ability to 'Cancel' revision mode and get back to the normal mode without refreshing the whole page.
  • Update: Animate Block 'Save' button for not-saved Blocks.
  • Update: The Assignment-Panel is now Loads the assigned items only when enter the revision and backup modes.
  • Update: Set assignment-Panel Advanced-TAB as the default active TAB.
  • Add: Few helper links to the CJT official website at the top of the Blocks page.
  • Fix: Block 'Save' and 'Save All Changes' buttons are stay enabled after updating Block Assignment-Panel items and revert them back again. The buttons is enabled even if the Block content has not been changed.
Download this release

Release Info

Developer xpointer
Plugin Icon 128x128 CSS & JavaScript Toolbox
Version 6.1
Comparing to
See all releases

Code changes from version 6.0.15 to 6.1

Files changed (65) hide show
  1. autoload.inc.php +21 -0
  2. controllers/block-ajax.php +42 -1
  3. controllers/block.php +40 -0
  4. controllers/blocks-ajax.php +1 -3
  5. css-js-toolbox.php +7 -3
  6. framework/autoload/loader.php +154 -0
  7. framework/css/toolbox.css +11 -6
  8. framework/js/ui/jquery.toolbox/jquery.toolbox.js +18 -0
  9. locals/languages/css-javascript-toolbox-en_US.mo +0 -0
  10. locals/languages/css-javascript-toolbox-en_US.po +330 -343
  11. models/block.php +57 -0
  12. models/block/assignmentpanel/auxiliary.php +28 -0
  13. models/block/assignmentpanel/auxiliarybase.php +91 -0
  14. models/block/assignmentpanel/auxiliarypinned.php +40 -0
  15. models/block/assignmentpanel/base.php +194 -0
  16. models/block/assignmentpanel/helpers/auxiliary.php +76 -0
  17. models/block/assignmentpanel/helpers/hierarchical.php +113 -0
  18. models/block/assignmentpanel/post.php +63 -0
  19. models/block/assignmentpanel/postbase.php +53 -0
  20. models/block/assignmentpanel/postpinned.php +69 -0
  21. models/block/assignmentpanel/taxonomy.php +60 -0
  22. models/block/assignmentpanel/taxonomybase.php +58 -0
  23. models/block/assignmentpanel/taxonomypinned.php +67 -0
  24. models/block/assignmentpanel/wordpress.php +33 -0
  25. models/blocks.php +4 -4
  26. models/setup.php +1 -1
  27. readme.txt +29 -17
  28. tables/block-pins.php +23 -12
  29. tables/blocks.php +5 -3
  30. views/backups/manager/public/css/backups.css +1 -1
  31. views/blocks/block/public/css/block.css +21 -2
  32. views/blocks/block/public/images/toolbox/cancel-restore.png +0 -0
  33. views/blocks/block/public/images/toolbox/restore.png +0 -0
  34. views/blocks/block/public/images/toolbox/save.gif +0 -0
  35. views/blocks/block/public/js/block/block.js +154 -206
  36. views/blocks/block/public/js/blockproperty/blockproperty.js +124 -0
  37. views/blocks/block/public/js/jquery.block/jquery.block.js +150 -91
  38. views/blocks/block/public/js/optional/revision/revision.js +212 -0
  39. views/blocks/block/tmpl/edit.html.tmpl +11 -3
  40. views/blocks/block/view.php +2 -0
  41. views/blocks/cjt-block/public/css/block.css +81 -20
  42. views/blocks/cjt-block/public/images/pages-panel/pagination.png +0 -0
  43. views/blocks/cjt-block/public/js/block/block.js +51 -0
  44. views/blocks/cjt-block/public/js/blockproperty/blockproperty.js +144 -0
  45. views/blocks/cjt-block/public/js/jquery.assignpanel/jquery.assignpanel.js +578 -0
  46. views/blocks/cjt-block/public/js/jquery.block/jquery.block.js +14 -30
  47. views/blocks/cjt-block/public/js/optional/pagination.list/pagination.list.js +118 -0
  48. views/blocks/cjt-block/public/js/optional/revision/revision.js +96 -0
  49. views/blocks/cjt-block/tmpl/default.html.tmpl +1 -1
  50. views/blocks/cjt-block/tmpl/templates/assign-panel/default.html.tmpl +55 -0
  51. views/blocks/cjt-block/tmpl/templates/assign-panel/templates/advanced.html.tmpl +10 -0
  52. views/blocks/cjt-block/tmpl/templates/assign-panel/templates/auxiliarity.html.tmpl +18 -0
  53. views/blocks/cjt-block/tmpl/templates/assign-panel/templates/custom-posts.html.tmpl +53 -0
  54. views/blocks/cjt-block/tmpl/templates/assign-panel/templates/inputs-list.html.tmpl +11 -0
  55. views/blocks/cjt-block/tmpl/templates/assign-panel/templates/objects-list.html.tmpl +9 -0
  56. views/blocks/cjt-block/tmpl/templates/assign-panel/templates/tab.html.tmpl +33 -0
  57. views/blocks/cjt-block/view.php +6 -1
  58. views/blocks/manager/public/css/blocks.css +4 -3
  59. views/blocks/manager/public/images/CSS_JS_Toolbox_Icon.png +0 -0
  60. views/blocks/manager/public/js/blocks/blocks.js +12 -0
  61. views/blocks/manager/tmpl/blocks.html.tmpl +20 -9
  62. views/blocks/revisions/public/js/revisions/revisions.js +1 -1
  63. views/setup/activation-form/public/css/default.css +3 -1
  64. views/setup/activation-form/public/js/default/default.js +0 -8
  65. views/setup/activation-form/public/js/default/default.localization.php +5 -0
autoload.inc.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ */
5
+
6
+ // NOTE: NOT ALL CLASSED IS AUTOLOADED YET! ONLY FEW CLASSES
7
+ // IS AUTOLOADED. ONLY CLASSES WITH NAME MAPPED TO TE PHYSICAL PATH
8
+ // IS AUTOLOADED!!
9
+ require_once CJTOOLBOX_FRAMEWORK . '/autoload/loader.php';
10
+ $CJTAutoLoad = CJT_Framework_Autoload_Loader::autoLoad('CJT', CJTOOLBOX_PATH);
11
+
12
+ // Old class maps.
13
+ // Only commonly-used classed will be mapped here.
14
+ $map = $CJTAutoLoad->map();
15
+
16
+ // xTable class
17
+ $map->offsetSet('CJTxTable', 'framework/db/mysql/xtable.inc.php');
18
+ $map->offsetSet('CJTTable', 'framework/db/mysql/table.inc.php');
19
+ $map->offsetSet('CJTBlockPinsTable', 'tables/block-pins.php');
20
+ $map->offsetSet('CJTBlockModel', 'models/block.php');
21
+ $map->offsetSet('CJTBlocksModel', 'models/blocks.php');
controllers/block-ajax.php CHANGED
@@ -33,8 +33,21 @@ class CJTBlockAjaxController extends CJTAjaxController {
33
  add_action('wp_ajax_cjtoolbox_get_revisions', array(&$this, '_doAction'));
34
  // Redirects
35
  $this->registryAction('getBlockBy');
 
 
36
  }
 
37
 
 
 
 
 
 
 
 
 
 
 
38
  /**
39
  * put your comment there...
40
  *
@@ -70,11 +83,17 @@ class CJTBlockAjaxController extends CJTAjaxController {
70
  * @deprecated All will be moved to other controllers in the future versions.
71
  */
72
  public function getRevisionAction() {
 
73
  $model = $this->getModel('blocks');
74
  // Get request parameters.
75
  $revision['id'] = filter_input(INPUT_GET, 'id', FILTER_SANITIZE_NUMBER_INT);
76
- $revision['fields'] = array('id', 'code', 'pinPoint', 'links', 'expressions');
77
  $revision = $model->getBlock($revision['id'], array(), $revision['fields']);
 
 
 
 
 
78
  $this->response = $revision;
79
  }
80
 
@@ -106,6 +125,28 @@ class CJTBlockAjaxController extends CJTAjaxController {
106
  $this->response = $view->getTemplate('default');
107
  }
108
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
109
  /**
110
  * Update exists block property value.
111
  *
33
  add_action('wp_ajax_cjtoolbox_get_revisions', array(&$this, '_doAction'));
34
  // Redirects
35
  $this->registryAction('getBlockBy');
36
+ $this->registryAction('getAPOP');
37
+ $this->registryAction('restoreRevision');
38
  }
39
+
40
 
41
+ /**
42
+ * put your comment there...
43
+ *
44
+ * @deprecated this is just a redirect to the CJTBlockContoller::getAction().
45
+ */
46
+ protected function getAPOPAction() {
47
+ // Pass to CJTBlockController!
48
+ $this->redirect('block');
49
+ }
50
+
51
  /**
52
  * put your comment there...
53
  *
83
  * @deprecated All will be moved to other controllers in the future versions.
84
  */
85
  public function getRevisionAction() {
86
+ // Initialize
87
  $model = $this->getModel('blocks');
88
  // Get request parameters.
89
  $revision['id'] = filter_input(INPUT_GET, 'id', FILTER_SANITIZE_NUMBER_INT);
90
+ $revision['fields'] = array('id', 'code', 'links', 'expressions');
91
  $revision = $model->getBlock($revision['id'], array(), $revision['fields']);
92
+ // Discard Pins.
93
+ $revision->pages = false;
94
+ $revision->posts = false;
95
+ $revision->categories = false;
96
+ // Return revision.
97
  $this->response = $revision;
98
  }
99
 
125
  $this->response = $view->getTemplate('default');
126
  }
127
 
128
+ /**
129
+ * put your comment there...
130
+ *
131
+ */
132
+ protected function restoreRevisionAction() {
133
+ // Initialize.
134
+ $mdlBlocks = new CJTBlocksModel();
135
+ // Get revision ID.
136
+ $rId = (int) $_GET['rid'];
137
+ $bId = (int) $_GET['bid'];
138
+ // Restore revision
139
+ // 1. Query revision block (only restore fields).
140
+ // 2. Change the id to the original id.
141
+ // 3. Update the block as the original block.
142
+ $revisionBlock = $mdlBlocks->getBlock($rId, array(), array('id', 'code', 'pinPoint', 'links', 'expressions'));
143
+ $revisionBlock->id = $bId;
144
+ $mdlBlocks->update($revisionBlock, true);
145
+ $mdlBlocks->save();
146
+ // Return TRUE.
147
+ $this->response = true;
148
+ }
149
+
150
  /**
151
  * Update exists block property value.
152
  *
controllers/block.php CHANGED
@@ -33,6 +33,7 @@ class CJTBlockController extends CJTAjaxController {
33
  parent::__construct();
34
  // Actions!
35
  $this->registryAction('getBlockBy');
 
36
  }
37
 
38
  /**
@@ -49,4 +50,43 @@ class CJTBlockController extends CJTAjaxController {
49
  $this->response = array_intersect_key((array) $this->model->getBlockBy(), $returns);
50
  }
51
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  } // End class.
33
  parent::__construct();
34
  // Actions!
35
  $this->registryAction('getBlockBy');
36
+ $this->registryAction('getAPOP');
37
  }
38
 
39
  /**
50
  $this->response = array_intersect_key((array) $this->model->getBlockBy(), $returns);
51
  }
52
 
53
+ /**
54
+ * Get assigment panel objects page.
55
+ *
56
+ */
57
+ public function getAPOPAction() {
58
+ // Read inputs.
59
+ $iPerPage = (int) $_GET['iPerPage'];
60
+ $blockId = (int) $_GET['block'];
61
+ $oTypeParams = $_GET['typeParams'];
62
+ $offset = $_GET['index'];
63
+ $assignedOnly = ($_GET['assignedOnly'] == 'false') ? false : true;
64
+ $initialize = ($_GET['initialize'] == 'false') ? false : true;
65
+ // Get the corresponding type object
66
+ // for handling the request.
67
+ $typeName = $oTypeParams['targetType'];
68
+ /**
69
+ * put your comment there...
70
+ *
71
+ * @var CJT_Models_Block_Assignmentpanel_Base
72
+ */
73
+ $typeObject = CJT_Models_Block_Assignmentpanel_Base
74
+ ::getInstance($assignedOnly,
75
+ $typeName,
76
+ $offset,
77
+ $iPerPage,
78
+ $blockId,
79
+ $oTypeParams);
80
+ // Fetch next page.
81
+ $items = $typeObject->getItems();
82
+ // Return result
83
+ $this->response['count'] = count($items);
84
+ $this->response['items'] = $items;
85
+ // Return count only when the list is activated for
86
+ // the first time.
87
+ if ($initialize) {
88
+ $this->response['total'] = $typeObject->getTotalCount();
89
+ }
90
+ }
91
+
92
  } // End class.
controllers/blocks-ajax.php CHANGED
@@ -171,8 +171,6 @@ class CJTBlocksAjaxController extends CJTAjaxController {
171
  */
172
  public function saveBlocksAction() {
173
  $response = array();
174
- // Single block model class.
175
- require_once CJTOOLBOX_MODELS_PATH . '/block.php';
176
  // Blocks are sent ins single array list.
177
  $blocksToSave = filter_input(INPUT_POST, 'blocks', FILTER_UNSAFE_RAW, FILTER_REQUIRE_ARRAY);
178
  $calculatePinPoint = (bool) filter_input(INPUT_POST, 'calculatePinPoint', FILTER_SANITIZE_NUMBER_INT);
@@ -185,7 +183,7 @@ class CJTBlocksAjaxController extends CJTAjaxController {
185
  $blockData = (object) $postedblockPartialData;
186
  $blockData->id = $id;
187
  // Recalculate pinPoint field value.
188
- !$calculatePinPoint or CJTBlockModel::calculateBlockPinPoint($blockData);
189
  // Create block revision.
190
  !$createRevision or $this->model->addRevision($id);
191
  // Set lastModified field to current time.
171
  */
172
  public function saveBlocksAction() {
173
  $response = array();
 
 
174
  // Blocks are sent ins single array list.
175
  $blocksToSave = filter_input(INPUT_POST, 'blocks', FILTER_UNSAFE_RAW, FILTER_REQUIRE_ARRAY);
176
  $calculatePinPoint = (bool) filter_input(INPUT_POST, 'calculatePinPoint', FILTER_SANITIZE_NUMBER_INT);
183
  $blockData = (object) $postedblockPartialData;
184
  $blockData->id = $id;
185
  // Recalculate pinPoint field value.
186
+ !$calculatePinPoint or (CJTBlockModel::arrangePins($blockData) && CJTBlockModel::calculateBlockPinPoint($blockData));
187
  // Create block revision.
188
  !$createRevision or $this->model->addRevision($id);
189
  // Set lastModified field to current time.
css-js-toolbox.php CHANGED
@@ -3,9 +3,10 @@
3
  Plugin Name: CSS & JavaScript Toolbox
4
  Plugin URI: http://css-javascript-toolbox.com/css-javascript-toolbox-free
5
  Description: CJT Plugin for WordPress to easily add custom CSS and JavaScript to individual pages
6
- Version: 6.0.15
7
  Author: Wipeout Media
8
  Author URI: http://css-javascript-toolbox.com/
 
9
 
10
  Copyright (c) 2011, Wipeout Media.
11
  This program is free software; you can redistribute it and/or
@@ -36,7 +37,7 @@ define('CJTOOLBOX_PLUGIN_FILE', __FILE__);
36
  define('CJTOOLBOX_NAME', plugin_basename(dirname(__FILE__)));
37
 
38
  /** CJT Text Domain used for localize texts */
39
- define('CJTOOLBOX_TEXT_DOMAIN', CJTOOLBOX_NAME);
40
 
41
  /** */
42
  define('CJTOOLBOX_LANGUAGES', CJTOOLBOX_NAME . '/locals/languages/');
@@ -53,6 +54,9 @@ define('CJTOOLBOX_ACCESS_POINTS', CJTOOLBOX_PATH . '/access.points');
53
  /** Frmaework path */
54
  define('CJTOOLBOX_FRAMEWORK', CJTOOLBOX_INCLUDE_PATH); // Alias to include path!
55
 
 
 
 
56
  // Import dependencies
57
  require_once CJTOOLBOX_FRAMEWORK . '/php/includes.class.php';
58
  require_once CJTOOLBOX_FRAMEWORK . '/events/definition.class.php';
@@ -91,7 +95,7 @@ class CJTPlugin extends CJTHookableClass {
91
  /**
92
  *
93
  */
94
- const VERSION = '6.0.15 CE';
95
 
96
  /**
97
  *
3
  Plugin Name: CSS & JavaScript Toolbox
4
  Plugin URI: http://css-javascript-toolbox.com/css-javascript-toolbox-free
5
  Description: CJT Plugin for WordPress to easily add custom CSS and JavaScript to individual pages
6
+ Version: 6.1
7
  Author: Wipeout Media
8
  Author URI: http://css-javascript-toolbox.com/
9
+ License:
10
 
11
  Copyright (c) 2011, Wipeout Media.
12
  This program is free software; you can redistribute it and/or
37
  define('CJTOOLBOX_NAME', plugin_basename(dirname(__FILE__)));
38
 
39
  /** CJT Text Domain used for localize texts */
40
+ define('CJTOOLBOX_TEXT_DOMAIN', CJTOOLBOX_NAME);
41
 
42
  /** */
43
  define('CJTOOLBOX_LANGUAGES', CJTOOLBOX_NAME . '/locals/languages/');
54
  /** Frmaework path */
55
  define('CJTOOLBOX_FRAMEWORK', CJTOOLBOX_INCLUDE_PATH); // Alias to include path!
56
 
57
+ // Class Autoload Added @since 6.2.
58
+ require 'autoload.inc.php';
59
+
60
  // Import dependencies
61
  require_once CJTOOLBOX_FRAMEWORK . '/php/includes.class.php';
62
  require_once CJTOOLBOX_FRAMEWORK . '/events/definition.class.php';
95
  /**
96
  *
97
  */
98
+ const VERSION = '6.1 CE';
99
 
100
  /**
101
  *
framework/autoload/loader.php ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ */
5
+
6
+
7
+ // Disallow direct access.
8
+ defined('ABSPATH') or die("Access denied");
9
+
10
+ /**
11
+ * Auto load CJT classes.
12
+ *
13
+ * @since 6.2
14
+ */
15
+ class CJT_Framework_Autoload_Loader {
16
+
17
+ /**
18
+ * put your comment there...
19
+ *
20
+ * @var mixed
21
+ */
22
+ protected $map;
23
+
24
+ /**
25
+ * put your comment there...
26
+ *
27
+ * @var mixed
28
+ */
29
+ protected $path = null;
30
+
31
+ /**
32
+ * put your comment there...
33
+ *
34
+ * @var mixed
35
+ */
36
+ protected $prefix = null;
37
+
38
+ /**
39
+ * put your comment there...
40
+ *
41
+ * @param mixed $prefix
42
+ * @param mixed $path
43
+ * @return CJT_Autoload
44
+ */
45
+ public function __construct($prefix, $path) {
46
+ // Initialize.
47
+ $this->prefix = $prefix;
48
+ $this->path = $path;
49
+ $this->map = new ArrayObject(array());
50
+ // Resgister SPL auto load function.
51
+ spl_autoload_register(array($this, 'loadClass'));
52
+ }
53
+
54
+
55
+ /**
56
+ * put your comment there...
57
+ *
58
+ * @param mixed $prefix
59
+ * @param mixed $path
60
+ */
61
+ public static function autoLoad($prefix = null, $path = null) {
62
+ // Hold all auto load instances.
63
+ static $instances = array();
64
+ // Identify instances by prefixes!
65
+ if (!isset($instances[$prefix])) {
66
+ $instances[$prefix] = new CJT_Framework_Autoload_Loader($prefix, $path);
67
+ }
68
+ return $instances[$prefix];
69
+ }
70
+
71
+ /**
72
+ * put your comment there...
73
+ *
74
+ * @param mixed $clsName
75
+ */
76
+ public function getClassComponent($clsName) {
77
+ // Initialize.
78
+ $component = (object) array();
79
+ // Lowerize!
80
+ $clsName = strtolower($clsName);
81
+ // Get class frags by gettign all names between _ character.
82
+ $fragments = explode('_', $clsName);
83
+ // Get components / exclude the prefix @ index [0].
84
+ // Name.
85
+ $component->name = $fragments[1];
86
+ // Get path (after the prefix and just before the name!).
87
+ $component->path = array();
88
+ for ($frag = 1; $frag < (count($fragments) - 1); $frag++) {
89
+ $component->path[] = $fragments[$frag] ;
90
+ }
91
+ $component->path = join(DIRECTORY_SEPARATOR, $component->path);
92
+ // Name
93
+ $component->name = end($fragments);
94
+ // Fulle absolute path.
95
+ return $component;
96
+ }
97
+
98
+ /**
99
+ * put your comment there...
100
+ *
101
+ * @param mixed $classInfo
102
+ */
103
+ public function getClassAbsolutePath($classInfo) {
104
+ // fullpath = abspath + classpath + classname + .php
105
+ $fullPath = $this->path . DIRECTORY_SEPARATOR .
106
+ $classInfo->path . DIRECTORY_SEPARATOR . $classInfo->name . '.php';
107
+ return $fullPath;
108
+ }
109
+
110
+ /**
111
+ * put your comment there...
112
+ *
113
+ * @param mixed $name
114
+ */
115
+ public function getClassFile($name, $file) {
116
+ // Get class component.
117
+ $component = $this->getClassComponent($name);
118
+ // Get class absolute path.
119
+ $path = $this->path . DIRECTORY_SEPARATOR . $component->path;
120
+ return $path . DIRECTORY_SEPARATOR . $file;
121
+ }
122
+
123
+ /**
124
+ * put your comment there...
125
+ *
126
+ * @param mixed $class
127
+ */
128
+ public function loadClass($class) {
129
+ $classFile = '';
130
+ // First, check the map!
131
+ if ($this->map()->offsetExists($class)) {
132
+ $classMappedPath = $this->map()->offsetGet($class);
133
+ $classFile = $this->path . DIRECTORY_SEPARATOR . $classMappedPath;
134
+ }
135
+ // Any class start with our prefix should be auto loaded!
136
+ else if (strpos($class, "{$this->prefix}_") === 0) {
137
+ // Get class paths.
138
+ $classFile = $this->getClassAbsolutePath($this->getClassComponent($class));
139
+ }
140
+ // Whatever a class file is set, import it!
141
+ if ($classFile) {
142
+ require $classFile;
143
+ }
144
+ }
145
+
146
+ /**
147
+ * put your comment there...
148
+ *
149
+ */
150
+ public function map() {
151
+ return $this->map;
152
+ }
153
+
154
+ } // End class.
framework/css/toolbox.css CHANGED
@@ -39,7 +39,7 @@
39
  border-bottom-left-radius: 3px;
40
  }
41
  .cjt-toolbox .icons-group .popup-menu a.cjt-tb-text-link {
42
- width: 100%;
43
  background-position-x: left;
44
  padding-left: 35px;
45
  padding-top: 6px;
@@ -58,13 +58,18 @@
58
  color: #6C6B6B;
59
  }
60
  .cjt-toolbox a.cjt-tb-link:hover {
61
- opacity : 0.8;
62
- filter:alpha(opacity = 80%);
63
  }
 
64
  .cjt-toolbox a.cjttbs-disabled:hover {
 
 
 
 
 
 
65
  opacity : 1;
66
  filter:alpha(opacity = 100%);
67
  }
68
- .cjt-toolbox a.cjttbs-loading {
69
- background: url(images/loading.gif) center no-repeat !important;
70
- }
39
  border-bottom-left-radius: 3px;
40
  }
41
  .cjt-toolbox .icons-group .popup-menu a.cjt-tb-text-link {
42
+ width: auto;
43
  background-position-x: left;
44
  padding-left: 35px;
45
  padding-top: 6px;
58
  color: #6C6B6B;
59
  }
60
  .cjt-toolbox a.cjt-tb-link:hover {
61
+ opacity : 0.7;
62
+ filter:alpha(opacity = 70%);
63
  }
64
+ .cjt-toolbox a.cjttbs-disabled,
65
  .cjt-toolbox a.cjttbs-disabled:hover {
66
+ opacity : 0.4;
67
+ filter:alpha(opacity = 4%);
68
+ }
69
+
70
+ .cjt-toolbox a.cjttbs-loading,
71
+ .cjt-toolbox a.cjttbs-loading:hover {
72
  opacity : 1;
73
  filter:alpha(opacity = 100%);
74
  }
75
+ .cjt-toolbox a.cjttbs-loading{background: url(images/loading.gif) center no-repeat !important;}
 
 
framework/js/ui/jquery.toolbox/jquery.toolbox.js CHANGED
@@ -113,6 +113,8 @@ var CJTToolBoxNS = new (function ($) {
113
  this.jButton.addClass(this.toolbox.params.disabledClass);
114
  this.enabled = false;
115
  }
 
 
116
  }
117
 
118
  /**
@@ -521,6 +523,8 @@ var CJTToolBoxNS = new (function ($) {
521
  button.enable(enabled);
522
  }, this)
523
  );
 
 
524
  },
525
 
526
  /**
@@ -544,6 +548,20 @@ var CJTToolBoxNS = new (function ($) {
544
  CJTToolBox.add(name, data);
545
  }
546
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
547
  }
548
 
549
  }; // End Toolbox class.
113
  this.jButton.addClass(this.toolbox.params.disabledClass);
114
  this.enabled = false;
115
  }
116
+ // Chaining.
117
+ return this;
118
  }
119
 
120
  /**
523
  button.enable(enabled);
524
  }, this)
525
  );
526
+ // Chaining.
527
+ return this;
528
  },
529
 
530
  /**
548
  CJTToolBox.add(name, data);
549
  }
550
  )
551
+ },
552
+
553
+ /**
554
+ *
555
+ */
556
+ remove : function(name) {
557
+ // Get button.
558
+ var button = this.buttons[name];
559
+ // Remove button node.
560
+ button.jButton.remove();
561
+ // Delete from buttons list.
562
+ delete this.buttons[name];
563
+ // Chaining.
564
+ return this;
565
  }
566
 
567
  }; // End Toolbox class.
locals/languages/css-javascript-toolbox-en_US.mo CHANGED
Binary file
locals/languages/css-javascript-toolbox-en_US.po CHANGED
@@ -1,37 +1,36 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: CSS & Javascript Toolbox V6\n"
4
- "POT-Creation-Date: 2013-03-13 23:12+0200\n"
5
- "PO-Revision-Date: 2013-03-13 23:12+0200\n"
6
  "Last-Translator: \n"
7
  "Language-Team: CJT <development@css-javascript-toolbox.com>\n"
8
  "Language: English\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.5.5\n"
13
  "X-Poedit-KeywordsList: getText\n"
14
  "X-Poedit-Basepath: .\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
- "X-Poedit-SearchPath-0: E:\\local-server\\www\\css-javascript-toolbox\\6.0-CE"
17
- "\\3.5\\wp-content\\plugins\\css-javascript-toolbox\n"
18
 
19
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/access.points/extensions.accesspoint.php:53
20
  msgid "Extensions"
21
  msgstr ""
22
 
23
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/access.points/manage.accesspoint.php:44
24
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/access.points/manage.accesspoint.php:45
25
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/tmpl/default.html.tmpl:28
26
  msgid "CSS & Javascript Toolbox"
27
  msgstr ""
28
 
29
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/controllers/blocks-coupling.php:494
30
  msgid ""
31
- "Shortcode Type is not supported!! Only (block) type is currently available!!!"
32
  msgstr ""
33
 
34
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/framework/js/ajax/cjt-server/cjt-server.localization.php:13
35
  msgid ""
36
  "Unhandled error has been detected while processing the background request! \n"
37
  "\tas the error is not handled we cannot tell if the previous operation is "
@@ -43,7 +42,7 @@ msgid ""
43
  "\tWould you like to check the error details?"
44
  msgstr ""
45
 
46
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/framework/js/ajax/cjt-server/cjt-server.localization.php:17
47
  msgid ""
48
  "Its heighly recomended to send us the error details so we can enahce CJT "
49
  "products!\n"
@@ -52,154 +51,210 @@ msgid ""
52
  "\tWould you like to close the form?"
53
  msgstr ""
54
 
55
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/framework/js/misc/simple-error-dialog/simple-error-dialog.localization.php:13
56
  msgid "Submission Error!"
57
  msgstr ""
58
 
59
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/locals/strings.inc.php:9
60
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/block/tmpl/templates/toolbox.html.tmpl:15
61
  msgid "javascript"
62
  msgstr "Javascript"
63
 
64
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/locals/strings.inc.php:10
65
  msgid "css"
66
  msgstr "CSS"
67
 
68
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/locals/strings.inc.php:11
69
  msgid "html"
70
  msgstr "HTML"
71
 
72
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/locals/strings.inc.php:12
73
  msgid "php"
74
  msgstr "PHP"
75
 
76
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/backups/manager/public/js/backups/backups.localization.php:11
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
  msgid "Backup name cannot be null!"
78
  msgstr ""
79
 
80
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/backups/manager/public/js/backups/backups.localization.php:12
81
  msgid "Would you like to delete \"{BACKUP-NAME}\" backup?"
82
  msgstr ""
83
 
84
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/block/view.php:119
85
  msgid "Click to update Block name"
86
  msgstr ""
87
 
88
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/block/public/js/jquery.block/jquery.block.localization.php:13
89
  msgid "Block revisions"
90
  msgstr ""
91
 
92
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/block/public/js/jquery.block/jquery.block.localization.php:14
93
  msgid "CJT-Block Info"
94
  msgstr ""
95
 
96
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/block/public/js/jquery.block/jquery.block.localization.php:15
97
  #, php-format
98
  msgid "Are you sure you want to delete this (%s) code block?"
99
  msgstr ""
100
 
101
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/block/public/js/jquery.block/jquery.block.localization.php:16
102
  msgid "Deactivate (turn off) code block"
103
  msgstr ""
104
 
105
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/block/public/js/jquery.block/jquery.block.localization.php:17
106
  msgid "Activate (turn on) code block"
107
  msgstr ""
108
 
109
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/block/public/js/jquery.block/jquery.block.localization.php:18
110
  msgid "Set output location hook to footer"
111
  msgstr ""
112
 
113
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/block/public/js/jquery.block/jquery.block.localization.php:19
114
  msgid "Set output location hook to header"
115
  msgstr ""
116
 
117
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/block/public/js/jquery.block/jquery.block.localization.php:20
118
  msgid "Block name cannot be empty!"
119
  msgstr ""
120
 
121
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/public/js/blocks-page/blocks-page.localization.php:13
122
  msgid "Create New Code Block"
123
  msgstr ""
124
 
125
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/public/js/blocks-page/blocks-page.localization.php:14
126
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/toolbox.html.tmpl:32
127
  msgid "Backups"
128
  msgstr ""
129
 
130
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/public/js/blocks-page/blocks-page.localization.php:15
131
  msgid "Restoring blocks backup will result in losing all the current blocks."
132
  msgstr ""
133
 
134
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/public/js/blocks-page/blocks-page.localization.php:15
135
  msgid "Are you sure, you'd like to continue?"
136
  msgstr ""
137
 
138
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/public/js/blocks-page/blocks-page.localization.php:16
139
  msgid "Backup could not be restored"
140
  msgstr ""
141
 
142
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/public/js/blocks-page/blocks-page.localization.php:17
143
  #, php-format
144
  msgid "You're about to delete %d code block(s)."
145
  msgstr ""
146
 
147
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/public/js/blocks-page/blocks-page.localization.php:18
148
  msgid "Are you sure you want to delete all code blocks?"
149
  msgstr ""
150
 
151
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/public/js/blocks-page/blocks-page.localization.php:19
152
  msgid "Are you sure you want to delete all the empty code blocks?"
153
  msgstr ""
154
 
155
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/public/js/blocks-page/blocks-page.localization.php:20
156
  msgid "The changes you made will be lost if you navigate away from this page."
157
  msgstr ""
158
 
159
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/public/js/blocks-page/blocks-page.localization.php:21
160
  msgid "There is no blocks to delete!"
161
  msgstr ""
162
 
163
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/new/public/js/add-new-block/add-new-block.localization.php:13
164
  msgid "block"
165
  msgstr ""
166
 
167
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/new/public/js/add-new-block/add-new-block.localization.php:14
168
  msgid "code block"
169
  msgstr ""
170
 
171
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/extensions/plugins-list/public/js/default/default.localization.php:13
172
  msgid "CJT Extension License Activation Form"
173
  msgstr ""
174
 
175
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/extensions/plugins-list/public/js/extensions/extensions.localization.php:13
176
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/extensions/plugins-list/public/js/plugins/plugins.localization.php:13
177
  msgid "CJT Extensions"
178
  msgstr ""
179
 
180
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/installer/install/public/js/default/default.localization.php:13
181
  msgid "Start"
182
  msgstr ""
183
 
184
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/installer/install/public/js/default/default.localization.php:14
185
  msgid "Installation Completed ... Click Start button and have fun!!!"
186
  msgstr ""
187
 
188
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/installer/install/public/js/default/default.localization.php:15
189
  msgid ""
190
  "The installation process would just take several minutes!\n"
191
  "\n"
192
  "\tWould you like to start the installation process?"
193
  msgstr ""
194
 
195
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/installer/notice/public/js/default/default.localization.php:13
196
  msgid ""
197
  "The notice message wont displayed again! You still can install/upgrade the "
198
  "Plugin by going to the manage blocks page. Would you really like to dismis "
199
  "this notice?"
200
  msgstr ""
201
 
202
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/public/js/default/default.localization.php:13
 
 
 
 
203
  msgid ""
204
  "External request need to be made to to css-javascript-toolbox offical web "
205
  "site! The operation will take an effect once its successed! You can always "
@@ -209,7 +264,7 @@ msgid ""
209
  "\t\t\t\t\t\t\tAre you sure would you like to process?"
210
  msgstr ""
211
 
212
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/public/js/default/default.localization.php:15
213
  msgid ""
214
  "External request need to be made to to css-javascript-toolbox offical web "
215
  "site! The operation will take an effect once its successed! You can always "
@@ -219,7 +274,7 @@ msgid ""
219
  "\t\t\t\t\t\t\tAre you sure would you like to process?"
220
  msgstr ""
221
 
222
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/public/js/default/default.localization.php:17
223
  msgid ""
224
  "The reset operation will clear the license fields and clear component "
225
  "license cache! This is really great once you need to stop using a previously "
@@ -228,341 +283,329 @@ msgid ""
228
  "anytime later!"
229
  msgstr ""
230
 
231
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/public/js/default/default.localization.php:19
232
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/new/tmpl/default.html.tmpl:28
233
  msgid "Activate"
234
  msgstr ""
235
 
236
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/public/js/default/default.localization.php:20
237
  msgid "Deactivate"
238
  msgstr ""
239
 
240
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/public/js/default/default.localization.php:22
241
  msgid "Activating Key"
242
  msgstr ""
243
 
244
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/public/js/default/default.localization.php:23
245
  msgid "Deactivating key"
246
  msgstr ""
247
 
248
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/public/js/default/default.localization.php:24
249
  msgid "Checking Key"
250
  msgstr ""
251
 
252
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/public/js/default/default.localization.php:25
 
 
 
 
 
 
 
 
253
  msgid "Reseting License Information"
254
  msgstr ""
255
 
256
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/public/js/default/default.localization.php:27
257
  msgid "Invalid"
258
  msgstr ""
259
 
260
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/public/js/default/default.localization.php:28
261
  msgid "Valid"
262
  msgstr ""
263
 
264
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/public/js/default/default.localization.php:29
265
  msgid "Error"
266
  msgstr ""
267
 
268
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/public/js/default/default.localization.php:30
269
  msgid "Activated"
270
  msgstr ""
271
 
272
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/public/js/default/default.localization.php:31
273
  msgid "Deactivated"
274
  msgstr ""
275
 
276
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/public/js/default/default.localization.php:32
277
  msgid "Reseted"
278
  msgstr ""
279
 
280
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/public/js/default/default.localization.php:34
281
  msgid "License key is activate! Thank you!"
282
  msgstr ""
283
 
284
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/public/js/default/default.localization.php:35
285
  msgid "License Cache has been reseted!"
286
  msgstr ""
287
 
288
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/public/js/default/default.localization.php:37
289
  msgid "License key is activated!"
290
  msgstr ""
291
 
292
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/public/js/default/default.localization.php:38
293
  msgid "Could not activate the provided license key!"
294
  msgstr ""
295
 
296
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/public/js/default/default.localization.php:39
297
  msgid "Could not activate License Key due to the server error!"
298
  msgstr ""
299
 
300
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/public/js/default/default.localization.php:41
301
  msgid "The license key is deactivated!"
302
  msgstr ""
303
 
304
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/public/js/default/default.localization.php:42
305
  msgid "Could not deactivate the provided license key!"
306
  msgstr ""
307
 
308
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/public/js/default/default.localization.php:43
309
  msgid "Could not deactivate License Key due to the server error!"
310
  msgstr ""
311
 
312
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/public/js/default/default.localization.php:45
313
  msgid "The ckeck operation detects that the provided key is a valid key!"
314
  msgstr ""
315
 
316
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/public/js/default/default.localization.php:46
317
  msgid "The check operation detects that the provided key is an invalid key!"
318
  msgstr ""
319
 
320
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/public/js/default/default.localization.php:47
321
  msgid "Could not check License Key due to the server error!"
322
  msgstr ""
323
 
324
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/public/js/default/default.localization.php:49
 
 
 
 
 
 
 
 
 
 
 
 
325
  msgid "Reset"
326
  msgstr ""
327
 
328
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/public/js/default/default.localization.php:51
329
  msgid "Invalid License name!"
330
  msgstr ""
331
 
332
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/public/js/default/default.localization.php:52
333
  msgid "Invalid License key!"
334
  msgstr ""
335
 
336
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/public/js/default/default.localization.php:53
337
  msgid "Component name is absolute!!! Invalid Request Specified!!!"
338
  msgstr ""
339
 
340
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/backups/manager/tmpl/form.html.tmpl:6
341
  msgid ""
342
  "Write backup name and click Backup button to create backup from current "
343
  "blocks"
344
  msgstr ""
345
 
346
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/backups/manager/tmpl/list.html.tmpl:3
347
  msgid ""
348
  "There is no backups available! You can start creating new backups from the "
349
  "form above."
350
  msgstr ""
351
 
352
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/backups/manager/tmpl/single-backup.html.tmpl:16
353
  msgid "By"
354
  msgstr ""
355
 
356
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/block/tmpl/edit.html.tmpl:12
357
  msgid "Cancel editing code block title"
358
  msgstr ""
359
 
360
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/block/tmpl/edit.html.tmpl:13
361
  msgid "Save code block title"
362
  msgstr ""
363
 
364
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/block/tmpl/templates/toolbox.html.tmpl:9
365
  msgid "Show code block information"
366
  msgstr ""
367
 
368
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/block/tmpl/templates/toolbox.html.tmpl:11
369
  msgid "Set editing language for syntax highlighting"
370
  msgstr ""
371
 
372
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/block/tmpl/templates/toolbox.html.tmpl:13
373
  msgid "Set editing language to CSS"
374
  msgstr ""
375
 
376
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/block/tmpl/templates/toolbox.html.tmpl:13
377
  msgid "Cascading Style Sheets"
378
  msgstr ""
379
 
380
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/block/tmpl/templates/toolbox.html.tmpl:14
381
  msgid "Set editing language to HTML"
382
  msgstr ""
383
 
384
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/block/tmpl/templates/toolbox.html.tmpl:14
385
  msgid "Hyper Text Markup Language"
386
  msgstr ""
387
 
388
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/block/tmpl/templates/toolbox.html.tmpl:15
389
  msgid "Set editing language to JavaScript"
390
  msgstr ""
391
 
392
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/block/tmpl/templates/toolbox.html.tmpl:16
393
  msgid "Set editing language to PHP"
394
  msgstr ""
395
 
396
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/block/tmpl/templates/toolbox.html.tmpl:16
397
  msgid "PHP: Hypertext Preprocessor"
398
  msgstr ""
399
 
400
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/block/tmpl/templates/toolbox.html.tmpl:19
401
  msgid "Edit code block title. Click Save to take affect"
402
  msgstr ""
403
 
404
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/block/tmpl/templates/toolbox.html.tmpl:20
405
  msgid "View and restore code block revisions"
406
  msgstr ""
407
 
408
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/block/tmpl/templates/toolbox.html.tmpl:21
409
  msgid "Delete code block"
410
  msgstr ""
411
 
412
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/block/tmpl/templates/toolbox.html.tmpl:25
413
  msgid "Save changes to code block"
414
  msgstr ""
415
 
416
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/block/tmpl/templates/toolbox.html.tmpl:25
417
  msgid "Save"
418
  msgstr ""
419
 
420
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/cjt-block/tmpl/templates/objects-panel.html.tmpl:9
421
  msgid "Pages"
422
  msgstr ""
423
 
424
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/cjt-block/tmpl/templates/objects-panel.html.tmpl:10
425
  msgid "Posts"
426
  msgstr ""
427
 
428
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/cjt-block/tmpl/templates/objects-panel.html.tmpl:11
429
- msgid "Custom Posts"
430
  msgstr ""
431
 
432
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/cjt-block/tmpl/templates/objects-panel.html.tmpl:12
433
- msgid "Categories"
434
  msgstr ""
435
 
436
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/cjt-block/tmpl/templates/objects-panel.html.tmpl:13
437
  msgid "Auxiliary"
438
  msgstr ""
439
 
440
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/cjt-block/tmpl/templates/objects-panel.html.tmpl:14
441
  msgid "Advanced"
442
  msgstr ""
443
 
444
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/cjt-block/tmpl/templates/objects-panel.html.tmpl:62
445
- msgid "There are no Custom Posts Defined yet!"
446
- msgstr ""
447
-
448
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/cjt-block/tmpl/templates/objects-panel.html.tmpl:86
449
- msgid "Front Page"
450
- msgstr ""
451
-
452
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/cjt-block/tmpl/templates/objects-panel.html.tmpl:90
453
- msgid "Blog Index"
454
- msgstr ""
455
-
456
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/cjt-block/tmpl/templates/objects-panel.html.tmpl:91
457
- msgid "All Posts"
458
- msgstr ""
459
-
460
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/cjt-block/tmpl/templates/objects-panel.html.tmpl:92
461
- msgid "All Pages"
462
- msgstr ""
463
-
464
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/cjt-block/tmpl/templates/objects-panel.html.tmpl:93
465
- msgid "All Categories"
466
- msgstr ""
467
-
468
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/cjt-block/tmpl/templates/objects-panel.html.tmpl:94
469
- msgid "Recent Posts"
470
- msgstr ""
471
-
472
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/cjt-block/tmpl/templates/objects-panel.html.tmpl:95
473
- msgid "Entire Website"
474
  msgstr ""
475
 
476
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/cjt-block/tmpl/templates/objects-panel.html.tmpl:96
477
- msgid "Website Backend"
478
  msgstr ""
479
 
480
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/cjt-block/tmpl/templates/objects-panel.html.tmpl:97
481
- msgid "Search Pages"
482
  msgstr ""
483
 
484
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/cjt-block/tmpl/templates/objects-panel.html.tmpl:98
485
- msgid "All Archives"
486
  msgstr ""
487
 
488
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/cjt-block/tmpl/templates/objects-panel.html.tmpl:99
489
- msgid "Tag Archives"
490
  msgstr ""
491
 
492
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/cjt-block/tmpl/templates/objects-panel.html.tmpl:100
493
- msgid "Author Archives"
494
  msgstr ""
495
 
496
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/cjt-block/tmpl/templates/objects-panel.html.tmpl:101
497
- msgid "Attachment Pages"
498
  msgstr ""
499
 
500
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/cjt-block/tmpl/templates/objects-panel.html.tmpl:102
501
- msgid "404 Error"
 
502
  msgstr ""
503
 
504
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/cjt-block/tmpl/templates/objects-panel.html.tmpl:116
505
- msgid "One URL per line"
506
  msgstr ""
507
 
508
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/cjt-block/tmpl/templates/objects-panel.html.tmpl:116
509
- msgid "URLs"
510
  msgstr ""
511
 
512
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/cjt-block/tmpl/templates/objects-panel.html.tmpl:120
513
- msgid "One Expression per line"
514
  msgstr ""
515
 
516
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/cjt-block/tmpl/templates/objects-panel.html.tmpl:120
517
- msgid "Expressions"
518
  msgstr ""
519
 
520
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/info/tmpl/default.html.tmpl:3
521
- msgid "ID"
522
  msgstr ""
523
 
524
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/info/tmpl/default.html.tmpl:4
525
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/new/tmpl/default.html.tmpl:24
526
- msgid "Name"
527
  msgstr ""
528
 
529
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/info/tmpl/default.html.tmpl:5
530
- msgid "Author"
531
  msgstr ""
532
 
533
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/info/tmpl/default.html.tmpl:6
534
- msgid "Date Created"
535
  msgstr ""
536
 
537
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/info/tmpl/default.html.tmpl:7
538
- msgid "Last Modified"
539
  msgstr ""
540
 
541
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/info/tmpl/default.html.tmpl:8
542
- msgid "Shortcode"
543
  msgstr ""
544
 
545
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/blocks.html.tmpl:11
546
- msgid "CSS & Javascript Toolbox V6 CE"
547
  msgstr ""
548
 
549
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/blocks.html.tmpl:13
550
  msgid "Need Help?"
551
  msgstr ""
552
 
553
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/blocks.html.tmpl:13
554
- msgid "CJT User Manual"
555
- msgstr ""
556
-
557
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/blocks.html.tmpl:15
558
- msgid "Need Examples?"
559
  msgstr ""
560
 
561
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/blocks.html.tmpl:15
562
- msgid "CJT Script Examples"
563
  msgstr ""
564
 
565
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/blocks.html.tmpl:26
566
  msgid ""
567
  "You have now restored the code blocks from the current backup. Nothing is "
568
  "saved until you click \"Restore\" button. To revert back to the previous "
@@ -570,144 +613,148 @@ msgid ""
570
  "button."
571
  msgstr ""
572
 
573
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/blocks.html.tmpl:39
574
  msgid "Warning!"
575
  msgstr ""
576
 
577
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/blocks.html.tmpl:39
578
  msgid ""
579
  "Please make sure to validate added CSS &amp; JavaScript codes, the plugin "
580
  "doesn't do that for you!"
581
  msgstr ""
582
 
583
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/toolbox.html.tmpl:3
584
  msgid "Add new code block"
585
  msgstr ""
586
 
587
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/toolbox.html.tmpl:3
588
  msgid "New Code Block"
589
  msgstr ""
590
 
591
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/toolbox.html.tmpl:4
592
  msgid "Save changes to all code blocks"
593
  msgstr ""
594
 
595
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/toolbox.html.tmpl:4
596
  msgid "Save All Changes"
597
  msgstr ""
598
 
599
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/toolbox.html.tmpl:5
600
  msgid "Cancel backup restoring"
601
  msgstr ""
602
 
603
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/toolbox.html.tmpl:5
604
  msgid "Cancel Restore"
605
  msgstr ""
606
 
607
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/toolbox.html.tmpl:6
608
  msgid "Save restored Backup"
609
  msgstr ""
610
 
611
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/toolbox.html.tmpl:6
612
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/revisions/tmpl/default.html.tmpl:27
613
  msgid "Restore"
614
  msgstr ""
615
 
616
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/toolbox.html.tmpl:9
617
  msgid "Tools for block state (batch)"
618
  msgstr ""
619
 
620
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/toolbox.html.tmpl:11
621
  msgid "Activate (turn on) all code blocks"
622
  msgstr ""
623
 
624
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/toolbox.html.tmpl:11
625
  msgid "Activate All"
626
  msgstr ""
627
 
628
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/toolbox.html.tmpl:13
629
  msgid "Deactivate (turn off) all code blocks"
630
  msgstr ""
631
 
632
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/toolbox.html.tmpl:13
633
  msgid "Deactivate All"
634
  msgstr ""
635
 
636
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/toolbox.html.tmpl:15
637
  msgid "Switch current state for all code blocks"
638
  msgstr ""
639
 
640
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/toolbox.html.tmpl:15
641
  msgid "Revert State"
642
  msgstr ""
643
 
644
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/toolbox.html.tmpl:18
645
  msgid "Tools for location hook (batch)"
646
  msgstr ""
647
 
648
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/toolbox.html.tmpl:20
649
  msgid "Set output location hook to footer for all code blocks"
650
  msgstr ""
651
 
652
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/toolbox.html.tmpl:20
653
  msgid "Footer all"
654
  msgstr ""
655
 
656
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/toolbox.html.tmpl:22
657
  msgid "Set output location hook to header for all code blocks"
658
  msgstr ""
659
 
660
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/toolbox.html.tmpl:22
661
  msgid "Header all"
662
  msgstr ""
663
 
664
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/toolbox.html.tmpl:26
665
  msgid "Tools for block cleanup and backup"
666
  msgstr ""
667
 
668
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/toolbox.html.tmpl:28
669
  msgid "Delete all code blocks"
670
  msgstr ""
671
 
672
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/toolbox.html.tmpl:28
673
  msgid "Delete all"
674
  msgstr ""
675
 
676
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/toolbox.html.tmpl:30
677
  msgid "Delete only empty code blocks"
678
  msgstr ""
679
 
680
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/toolbox.html.tmpl:30
681
  msgid "Delete Empty"
682
  msgstr ""
683
 
684
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/toolbox.html.tmpl:32
685
  msgid "Backup Manager - Create, restore, or delete backups"
686
  msgstr ""
687
 
688
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/toolbox.html.tmpl:36
 
 
 
 
689
  msgid "Maximise all code blocks"
690
  msgstr ""
691
 
692
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/toolbox.html.tmpl:37
693
  msgid "Minimise all code blocks"
694
  msgstr ""
695
 
696
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/help/intro.html.tmpl:10
697
  msgid "Welcome to the CSS & JavaScript Toolbox dashboard"
698
  msgstr ""
699
 
700
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/help/intro.html.tmpl:11
701
  msgid ""
702
- "Since you do not have any code blocks active, you can either: create a new "
703
- "code block or create a new code template."
704
  msgstr ""
705
 
706
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/help/intro.html.tmpl:12
707
  msgid "Create a new Code Block"
708
  msgstr ""
709
 
710
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/help/intro.html.tmpl:13
711
  msgid ""
712
  "You can add a new code block by clicking the New Code Block button. Once "
713
  "your code block has been added, simply choose the editor you wish to work "
@@ -721,197 +768,139 @@ msgid ""
721
  "assigned webpage."
722
  msgstr ""
723
 
724
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/help/intro.html.tmpl:14
725
- msgid "Create a new Code Template"
726
- msgstr ""
727
-
728
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/help/intro.html.tmpl:15
729
- msgid ""
730
- "You can create code templates when you click into the Code Template "
731
- "Manager. To find this, hover over the icon showing a small cog over pages, "
732
- "and a tooltip should say Code Template Manager. Press this and if you have "
733
- "chosen to install the Template Samples, you will notice them sitting in "
734
- "there ready to be used. If you want to create a code template from scratch, "
735
- "click the Create Template button. Here you can choose a name for your code "
736
- "template, select a code language type (i.e. CSS, JavaScript, HTML, PHP), "
737
- "choose whether the template is in Draft or Published state, and then write "
738
- "your code. You have other tabs that allow you to write a Description, add "
739
- "Keywords and Version number, etc. Once you are happy with your code "
740
- "template, you can click the Save button"
741
- msgstr ""
742
-
743
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/help/intro.html.tmpl:16
744
- msgid "Embedding or Linking a Code Templates"
745
- msgstr ""
746
-
747
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/help/intro.html.tmpl:17
748
- msgid ""
749
- "Code Templates can be either embedded or linked into your code blocks. To "
750
- "see all your code templates, you have to click the Template Lookup icon by "
751
- "hovering over the icon with the open/closed angled brackets. A popup will "
752
- "appear showing you code templates in the form of users and they are:"
753
- msgstr ""
754
-
755
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/help/intro.html.tmpl:19
756
- msgid "WordPress: default code templates that are packaged with WordPress"
757
- msgstr ""
758
-
759
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/help/intro.html.tmpl:20
760
- msgid ""
761
- "Sample Templates: CJT Sample Templates (depending if Sample Templates were "
762
- "selected during install)"
763
- msgstr ""
764
-
765
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/help/intro.html.tmpl:21
766
- msgid ""
767
- "Users: code templates created by actual WordPress users and administrators"
768
- msgstr ""
769
-
770
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/help/intro.html.tmpl:23
771
- msgid ""
772
- "You can click on any of the 3 types of users to see all of their code "
773
- "templates, and you can either embed or link these to code blocks."
774
- msgstr ""
775
-
776
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/help/intro.html.tmpl:24
777
- msgid "Embed"
778
- msgstr ""
779
-
780
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/help/intro.html.tmpl:24
781
- msgid ""
782
- "embedding a code template will paste the entire template contents into the "
783
- "code block editor. This can be ideal if you want to do further enhancements "
784
- "and customisations to the code without permanently changing the base "
785
- "template."
786
- msgstr ""
787
-
788
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/help/intro.html.tmpl:25
789
- msgid "Link"
790
- msgstr ""
791
-
792
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/manager/tmpl/help/intro.html.tmpl:25
793
- msgid ""
794
- "linking the code template does not actually paste the template into the code "
795
- "block editor but instead links to it. This is more ideal if you want to "
796
- "link many code templates to the one code block. There is no need to create "
797
- "individual code blocks for each."
798
- msgstr ""
799
-
800
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/new/tmpl/default.html.tmpl:24
801
  msgid "Name or title of code block (must be unique and cannot be left blank)"
802
  msgstr ""
803
 
804
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/new/tmpl/default.html.tmpl:28
805
  msgid "Tick the checkbox to Activate (turn on) code block"
806
  msgstr ""
807
 
808
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/new/tmpl/default.html.tmpl:32
809
  msgid "Set location hook for code block output to: Header or Footer"
810
  msgstr ""
811
 
812
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/new/tmpl/default.html.tmpl:32
813
  msgid "Location Hook"
814
  msgstr ""
815
 
816
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/new/tmpl/default.html.tmpl:36
817
  msgid "Header"
818
  msgstr ""
819
 
820
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/new/tmpl/default.html.tmpl:37
821
  msgid "Footer"
822
  msgstr ""
823
 
824
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/new/tmpl/default.html.tmpl:48
825
  msgid "Set initial code block position to: First Block or Last Block"
826
  msgstr ""
827
 
828
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/new/tmpl/default.html.tmpl:48
829
  msgid "Initial Block Position"
830
  msgstr ""
831
 
832
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/new/tmpl/default.html.tmpl:53
833
  msgid "First Block"
834
  msgstr ""
835
 
836
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/new/tmpl/default.html.tmpl:54
837
  msgid "Last Block"
838
  msgstr ""
839
 
840
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/new/tmpl/default.html.tmpl:66
841
  msgid "Cancel"
842
  msgstr ""
843
 
844
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/new/tmpl/default.html.tmpl:67
845
  msgid "Create"
846
  msgstr ""
847
 
848
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/revisions/tmpl/default.html.tmpl:19
849
  msgid "No revisions!"
850
  msgstr ""
851
 
852
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/blocks/revisions/tmpl/default.html.tmpl:26
853
  msgid "by"
854
  msgstr ""
855
 
856
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/extensions/plugins-list/tmpl/default_setup_action.html.tmpl:10
857
  msgid "Setup"
858
  msgstr ""
859
 
860
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/installer/install/tmpl/default.html.tmpl:23
861
  msgid ""
862
  "In order to start using CJT Plugin you need first to install the Plugin."
863
  msgstr ""
864
 
865
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/installer/install/tmpl/default.html.tmpl:24
866
  msgid ""
867
  "The installation process will create CJT database tables, build-it Database "
868
  "records."
869
  msgstr ""
870
 
871
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/installer/install/tmpl/default.html.tmpl:25
872
  msgid "Check for previous version and if the upgrade process is needed."
873
  msgstr ""
874
 
875
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/installer/install/tmpl/default.html.tmpl:26
876
  msgid ""
877
  "The Plugin is in disable state untill the installation process took place!"
878
  msgstr ""
879
 
880
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/installer/install/tmpl/default.html.tmpl:27
881
  msgid ""
882
  "To utilize from the CJT functionality you must install the Plugin first!!"
883
  msgstr ""
884
 
885
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/installer/install/tmpl/default.html.tmpl:29
886
  msgid "Installing Version "
887
  msgstr ""
888
 
889
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/installer/install/tmpl/default.html.tmpl:30
890
  msgid ""
891
  "When you install a new version of CJT for the first time or even upgrading "
892
  "from old versions, a number of processes will happen, which will take "
893
  "approximately 1 to 2 minutes. These processes include"
894
  msgstr ""
895
 
896
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/installer/install/tmpl/default.html.tmpl:37
897
  msgid "Create database tables."
898
  msgstr ""
899
 
900
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/installer/install/tmpl/default.html.tmpl:38
901
  msgid "Finalize Installation."
902
  msgstr ""
903
 
904
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/installer/install/tmpl/upgrades/upgrade.html.tmpl:9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
905
  msgid "Upgrading Plugin"
906
  msgstr ""
907
 
908
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/installer/install/tmpl/upgrades/upgrade.html.tmpl:10
909
  msgid ""
910
  "The upgrade process time estimation cannot be preditected because its based "
911
  "on the amount of data (blocks + other data) you've created."
912
  msgstr ""
913
 
914
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/installer/install/tmpl/upgrades/upgrade.html.tmpl:11
915
  msgid ""
916
  "Important Note: It is highly recommended to upgrade the plugin using the "
917
  "same administrator or user that was used to manage the code blocks. This "
@@ -919,61 +908,59 @@ msgid ""
919
  "logged in administrators or users' meta data."
920
  msgstr ""
921
 
922
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/installer/install/tmpl/upgrades/upgrade.html.tmpl:16
923
- msgid ""
924
- "Transfer blocks to the new blocks table. Old versions doesn't use a specific "
925
- "blocks table!"
926
- msgstr ""
927
-
928
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/installer/install/tmpl/upgrades/upgrade.html.tmpl:22
929
  msgid "Finalize Upgrade."
930
  msgstr ""
931
 
932
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/installer/notice/tmpl/default.html.tmpl:12
933
  msgid ""
934
  "CJT Plugin has been installed throught Wordpress Plugins manager page. In "
935
  "order for CJT Plugin to work correctly you must install it throught"
936
  msgstr ""
937
 
938
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/installer/notice/tmpl/default.html.tmpl:13
939
  msgid "CJT-Instalaltion page."
940
  msgstr ""
941
 
942
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/installer/notice/tmpl/default.html.tmpl:16
943
  msgid "Please or you can go to the installation page directly through the"
944
  msgstr ""
945
 
946
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/installer/notice/tmpl/default.html.tmpl:17
947
  msgid "CSS & Javascript Toolbox page."
948
  msgstr ""
949
 
950
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/installer/notice/tmpl/default.html.tmpl:19
951
  msgid "Dismiss"
952
  msgstr ""
953
 
954
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/tmpl/default.html.tmpl:25
 
 
 
 
955
  msgid "License Key"
956
  msgstr ""
957
 
958
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/tmpl/default.html.tmpl:27
959
  msgid ""
960
  "In order to get the benefits from the premium services we provide you've to "
961
  "obtain your license key from"
962
  msgstr ""
963
 
964
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/tmpl/default.html.tmpl:28
965
  msgid "web site"
966
  msgstr ""
967
 
968
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/tmpl/default.html.tmpl:32
969
  msgid "Your Name"
970
  msgstr ""
971
 
972
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/tmpl/default.html.tmpl:37
973
  msgid "Key"
974
  msgstr ""
975
 
976
- #: E:\local-server\www\css-javascript-toolbox\6.0-CE\3.5\wp-content\plugins\css-javascript-toolbox/views/setup/activation-form/tmpl/default.html.tmpl:46
977
  msgid "Check"
978
  msgstr ""
979
 
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: CSS & Javascript Toolbox V6\n"
4
+ "POT-Creation-Date: 2013-10-05 00:16+0200\n"
5
+ "PO-Revision-Date: 2013-10-05 00:16+0200\n"
6
  "Last-Translator: \n"
7
  "Language-Team: CJT <development@css-javascript-toolbox.com>\n"
8
  "Language: English\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.5.7\n"
13
  "X-Poedit-KeywordsList: getText\n"
14
  "X-Poedit-Basepath: .\n"
15
  "X-Poedit-SourceCharset: UTF-8\n"
16
+ "X-Poedit-SearchPath-0: "
 
17
 
18
+ #: access.points/extensions.accesspoint.php:53
19
  msgid "Extensions"
20
  msgstr ""
21
 
22
+ #: access.points/manage.accesspoint.php:44
23
+ #: access.points/manage.accesspoint.php:45
24
+ #: views/setup/activation-form/tmpl/default.html.tmpl:28
25
  msgid "CSS & Javascript Toolbox"
26
  msgstr ""
27
 
28
+ #: controllers/coupling/shortcode/block/block.php:99
29
  msgid ""
30
+ "Could not find block specified! Please check out the Shortcode parameters."
31
  msgstr ""
32
 
33
+ #: framework/js/ajax/cjt-server/cjt-server.localization.php:13
34
  msgid ""
35
  "Unhandled error has been detected while processing the background request! \n"
36
  "\tas the error is not handled we cannot tell if the previous operation is "
42
  "\tWould you like to check the error details?"
43
  msgstr ""
44
 
45
+ #: framework/js/ajax/cjt-server/cjt-server.localization.php:17
46
  msgid ""
47
  "Its heighly recomended to send us the error details so we can enahce CJT "
48
  "products!\n"
51
  "\tWould you like to close the form?"
52
  msgstr ""
53
 
54
+ #: framework/js/misc/simple-error-dialog/simple-error-dialog.localization.php:13
55
  msgid "Submission Error!"
56
  msgstr ""
57
 
58
+ #: locals/strings.inc.php:9
59
+ #: views/blocks/block/tmpl/templates/toolbox.html.tmpl:15
60
  msgid "javascript"
61
  msgstr "Javascript"
62
 
63
+ #: locals/strings.inc.php:10
64
  msgid "css"
65
  msgstr "CSS"
66
 
67
+ #: locals/strings.inc.php:11
68
  msgid "html"
69
  msgstr "HTML"
70
 
71
+ #: locals/strings.inc.php:12
72
  msgid "php"
73
  msgstr "PHP"
74
 
75
+ #: models/block/assignmentpanel/helpers/auxiliary.php:25
76
+ msgid "Blog Index"
77
+ msgstr ""
78
+
79
+ #: models/block/assignmentpanel/helpers/auxiliary.php:26
80
+ msgid "All Posts"
81
+ msgstr ""
82
+
83
+ #: models/block/assignmentpanel/helpers/auxiliary.php:27
84
+ msgid "All Pages"
85
+ msgstr ""
86
+
87
+ #: models/block/assignmentpanel/helpers/auxiliary.php:28
88
+ msgid "All Categories"
89
+ msgstr ""
90
+
91
+ #: models/block/assignmentpanel/helpers/auxiliary.php:29
92
+ msgid "Recent Posts"
93
+ msgstr ""
94
+
95
+ #: models/block/assignmentpanel/helpers/auxiliary.php:30
96
+ msgid "Entire Website"
97
+ msgstr ""
98
+
99
+ #: models/block/assignmentpanel/helpers/auxiliary.php:31
100
+ msgid "Website Backend"
101
+ msgstr ""
102
+
103
+ #: models/block/assignmentpanel/helpers/auxiliary.php:32
104
+ msgid "Search Pages"
105
+ msgstr ""
106
+
107
+ #: models/block/assignmentpanel/helpers/auxiliary.php:33
108
+ msgid "All Archives"
109
+ msgstr ""
110
+
111
+ #: models/block/assignmentpanel/helpers/auxiliary.php:34
112
+ msgid "Tag Archives"
113
+ msgstr ""
114
+
115
+ #: models/block/assignmentpanel/helpers/auxiliary.php:35
116
+ msgid "Author Archives"
117
+ msgstr ""
118
+
119
+ #: models/block/assignmentpanel/helpers/auxiliary.php:36
120
+ msgid "Attachment Pages"
121
+ msgstr ""
122
+
123
+ #: models/block/assignmentpanel/helpers/auxiliary.php:37
124
+ msgid "404 Error"
125
+ msgstr ""
126
+
127
+ #: views/backups/manager/public/js/backups/backups.localization.php:11
128
  msgid "Backup name cannot be null!"
129
  msgstr ""
130
 
131
+ #: views/backups/manager/public/js/backups/backups.localization.php:12
132
  msgid "Would you like to delete \"{BACKUP-NAME}\" backup?"
133
  msgstr ""
134
 
135
+ #: views/blocks/block/view.php:121
136
  msgid "Click to update Block name"
137
  msgstr ""
138
 
139
+ #: views/blocks/block/public/js/jquery.block/jquery.block.localization.php:13
140
  msgid "Block revisions"
141
  msgstr ""
142
 
143
+ #: views/blocks/block/public/js/jquery.block/jquery.block.localization.php:14
144
  msgid "CJT-Block Info"
145
  msgstr ""
146
 
147
+ #: views/blocks/block/public/js/jquery.block/jquery.block.localization.php:15
148
  #, php-format
149
  msgid "Are you sure you want to delete this (%s) code block?"
150
  msgstr ""
151
 
152
+ #: views/blocks/block/public/js/jquery.block/jquery.block.localization.php:16
153
  msgid "Deactivate (turn off) code block"
154
  msgstr ""
155
 
156
+ #: views/blocks/block/public/js/jquery.block/jquery.block.localization.php:17
157
  msgid "Activate (turn on) code block"
158
  msgstr ""
159
 
160
+ #: views/blocks/block/public/js/jquery.block/jquery.block.localization.php:18
161
  msgid "Set output location hook to footer"
162
  msgstr ""
163
 
164
+ #: views/blocks/block/public/js/jquery.block/jquery.block.localization.php:19
165
  msgid "Set output location hook to header"
166
  msgstr ""
167
 
168
+ #: views/blocks/block/public/js/jquery.block/jquery.block.localization.php:20
169
  msgid "Block name cannot be empty!"
170
  msgstr ""
171
 
172
+ #: views/blocks/manager/public/js/blocks-page/blocks-page.localization.php:13
173
  msgid "Create New Code Block"
174
  msgstr ""
175
 
176
+ #: views/blocks/manager/public/js/blocks-page/blocks-page.localization.php:14
177
+ #: views/blocks/manager/tmpl/toolbox.html.tmpl:32
178
  msgid "Backups"
179
  msgstr ""
180
 
181
+ #: views/blocks/manager/public/js/blocks-page/blocks-page.localization.php:15
182
  msgid "Restoring blocks backup will result in losing all the current blocks."
183
  msgstr ""
184
 
185
+ #: views/blocks/manager/public/js/blocks-page/blocks-page.localization.php:15
186
  msgid "Are you sure, you'd like to continue?"
187
  msgstr ""
188
 
189
+ #: views/blocks/manager/public/js/blocks-page/blocks-page.localization.php:16
190
  msgid "Backup could not be restored"
191
  msgstr ""
192
 
193
+ #: views/blocks/manager/public/js/blocks-page/blocks-page.localization.php:17
194
  #, php-format
195
  msgid "You're about to delete %d code block(s)."
196
  msgstr ""
197
 
198
+ #: views/blocks/manager/public/js/blocks-page/blocks-page.localization.php:18
199
  msgid "Are you sure you want to delete all code blocks?"
200
  msgstr ""
201
 
202
+ #: views/blocks/manager/public/js/blocks-page/blocks-page.localization.php:19
203
  msgid "Are you sure you want to delete all the empty code blocks?"
204
  msgstr ""
205
 
206
+ #: views/blocks/manager/public/js/blocks-page/blocks-page.localization.php:20
207
  msgid "The changes you made will be lost if you navigate away from this page."
208
  msgstr ""
209
 
210
+ #: views/blocks/manager/public/js/blocks-page/blocks-page.localization.php:21
211
  msgid "There is no blocks to delete!"
212
  msgstr ""
213
 
214
+ #: views/blocks/new/public/js/add-new-block/add-new-block.localization.php:13
215
  msgid "block"
216
  msgstr ""
217
 
218
+ #: views/blocks/new/public/js/add-new-block/add-new-block.localization.php:14
219
  msgid "code block"
220
  msgstr ""
221
 
222
+ #: views/extensions/plugins-list/public/js/default/default.localization.php:13
223
  msgid "CJT Extension License Activation Form"
224
  msgstr ""
225
 
226
+ #: views/extensions/plugins-list/public/js/extensions/extensions.localization.php:13
227
+ #: views/extensions/plugins-list/public/js/plugins/plugins.localization.php:13
228
  msgid "CJT Extensions"
229
  msgstr ""
230
 
231
+ #: views/installer/install/public/js/default/default.localization.php:13
232
  msgid "Start"
233
  msgstr ""
234
 
235
+ #: views/installer/install/public/js/default/default.localization.php:14
236
  msgid "Installation Completed ... Click Start button and have fun!!!"
237
  msgstr ""
238
 
239
+ #: views/installer/install/public/js/default/default.localization.php:15
240
  msgid ""
241
  "The installation process would just take several minutes!\n"
242
  "\n"
243
  "\tWould you like to start the installation process?"
244
  msgstr ""
245
 
246
+ #: views/installer/notice/public/js/default/default.localization.php:13
247
  msgid ""
248
  "The notice message wont displayed again! You still can install/upgrade the "
249
  "Plugin by going to the manage blocks page. Would you really like to dismis "
250
  "this notice?"
251
  msgstr ""
252
 
253
+ #: views/settings/manager/view.php:36
254
+ msgid "Uninstall"
255
+ msgstr ""
256
+
257
+ #: views/setup/activation-form/public/js/default/default.localization.php:13
258
  msgid ""
259
  "External request need to be made to to css-javascript-toolbox offical web "
260
  "site! The operation will take an effect once its successed! You can always "
264
  "\t\t\t\t\t\t\tAre you sure would you like to process?"
265
  msgstr ""
266
 
267
+ #: views/setup/activation-form/public/js/default/default.localization.php:15
268
  msgid ""
269
  "External request need to be made to to css-javascript-toolbox offical web "
270
  "site! The operation will take an effect once its successed! You can always "
274
  "\t\t\t\t\t\t\tAre you sure would you like to process?"
275
  msgstr ""
276
 
277
+ #: views/setup/activation-form/public/js/default/default.localization.php:17
278
  msgid ""
279
  "The reset operation will clear the license fields and clear component "
280
  "license cache! This is really great once you need to stop using a previously "
283
  "anytime later!"
284
  msgstr ""
285
 
286
+ #: views/setup/activation-form/public/js/default/default.localization.php:19
287
+ #: views/blocks/new/tmpl/default.html.tmpl:28
288
  msgid "Activate"
289
  msgstr ""
290
 
291
+ #: views/setup/activation-form/public/js/default/default.localization.php:20
292
  msgid "Deactivate"
293
  msgstr ""
294
 
295
+ #: views/setup/activation-form/public/js/default/default.localization.php:22
296
  msgid "Activating Key"
297
  msgstr ""
298
 
299
+ #: views/setup/activation-form/public/js/default/default.localization.php:23
300
  msgid "Deactivating key"
301
  msgstr ""
302
 
303
+ #: views/setup/activation-form/public/js/default/default.localization.php:24
304
  msgid "Checking Key"
305
  msgstr ""
306
 
307
+ #: views/setup/activation-form/public/js/default/default.localization.php:25
308
+ msgid "Key is not activated/used yet"
309
+ msgstr ""
310
+
311
+ #: views/setup/activation-form/public/js/default/default.localization.php:26
312
+ msgid "Key is inactive"
313
+ msgstr ""
314
+
315
+ #: views/setup/activation-form/public/js/default/default.localization.php:27
316
  msgid "Reseting License Information"
317
  msgstr ""
318
 
319
+ #: views/setup/activation-form/public/js/default/default.localization.php:29
320
  msgid "Invalid"
321
  msgstr ""
322
 
323
+ #: views/setup/activation-form/public/js/default/default.localization.php:30
324
  msgid "Valid"
325
  msgstr ""
326
 
327
+ #: views/setup/activation-form/public/js/default/default.localization.php:31
328
  msgid "Error"
329
  msgstr ""
330
 
331
+ #: views/setup/activation-form/public/js/default/default.localization.php:32
332
  msgid "Activated"
333
  msgstr ""
334
 
335
+ #: views/setup/activation-form/public/js/default/default.localization.php:33
336
  msgid "Deactivated"
337
  msgstr ""
338
 
339
+ #: views/setup/activation-form/public/js/default/default.localization.php:34
340
  msgid "Reseted"
341
  msgstr ""
342
 
343
+ #: views/setup/activation-form/public/js/default/default.localization.php:37
344
  msgid "License key is activate! Thank you!"
345
  msgstr ""
346
 
347
+ #: views/setup/activation-form/public/js/default/default.localization.php:38
348
  msgid "License Cache has been reseted!"
349
  msgstr ""
350
 
351
+ #: views/setup/activation-form/public/js/default/default.localization.php:40
352
  msgid "License key is activated!"
353
  msgstr ""
354
 
355
+ #: views/setup/activation-form/public/js/default/default.localization.php:41
356
  msgid "Could not activate the provided license key!"
357
  msgstr ""
358
 
359
+ #: views/setup/activation-form/public/js/default/default.localization.php:42
360
  msgid "Could not activate License Key due to the server error!"
361
  msgstr ""
362
 
363
+ #: views/setup/activation-form/public/js/default/default.localization.php:44
364
  msgid "The license key is deactivated!"
365
  msgstr ""
366
 
367
+ #: views/setup/activation-form/public/js/default/default.localization.php:45
368
  msgid "Could not deactivate the provided license key!"
369
  msgstr ""
370
 
371
+ #: views/setup/activation-form/public/js/default/default.localization.php:46
372
  msgid "Could not deactivate License Key due to the server error!"
373
  msgstr ""
374
 
375
+ #: views/setup/activation-form/public/js/default/default.localization.php:48
376
  msgid "The ckeck operation detects that the provided key is a valid key!"
377
  msgstr ""
378
 
379
+ #: views/setup/activation-form/public/js/default/default.localization.php:49
380
  msgid "The check operation detects that the provided key is an invalid key!"
381
  msgstr ""
382
 
383
+ #: views/setup/activation-form/public/js/default/default.localization.php:50
384
  msgid "Could not check License Key due to the server error!"
385
  msgstr ""
386
 
387
+ #: views/setup/activation-form/public/js/default/default.localization.php:51
388
+ msgid ""
389
+ "The ckeck operation detects that the provided key is a valid key! The key is "
390
+ "not being activated yet."
391
+ msgstr ""
392
+
393
+ #: views/setup/activation-form/public/js/default/default.localization.php:52
394
+ msgid ""
395
+ "The ckeck operation detects that the provided key is a valid key! The "
396
+ "license key need to be activated from the CJT Website."
397
+ msgstr ""
398
+
399
+ #: views/setup/activation-form/public/js/default/default.localization.php:54
400
  msgid "Reset"
401
  msgstr ""
402
 
403
+ #: views/setup/activation-form/public/js/default/default.localization.php:56
404
  msgid "Invalid License name!"
405
  msgstr ""
406
 
407
+ #: views/setup/activation-form/public/js/default/default.localization.php:57
408
  msgid "Invalid License key!"
409
  msgstr ""
410
 
411
+ #: views/setup/activation-form/public/js/default/default.localization.php:58
412
  msgid "Component name is absolute!!! Invalid Request Specified!!!"
413
  msgstr ""
414
 
415
+ #: views/backups/manager/tmpl/form.html.tmpl:6
416
  msgid ""
417
  "Write backup name and click Backup button to create backup from current "
418
  "blocks"
419
  msgstr ""
420
 
421
+ #: views/backups/manager/tmpl/list.html.tmpl:3
422
  msgid ""
423
  "There is no backups available! You can start creating new backups from the "
424
  "form above."
425
  msgstr ""
426
 
427
+ #: views/backups/manager/tmpl/single-backup.html.tmpl:16
428
  msgid "By"
429
  msgstr ""
430
 
431
+ #: views/blocks/block/tmpl/edit.html.tmpl:12
432
  msgid "Cancel editing code block title"
433
  msgstr ""
434
 
435
+ #: views/blocks/block/tmpl/edit.html.tmpl:13
436
  msgid "Save code block title"
437
  msgstr ""
438
 
439
+ #: views/blocks/block/tmpl/templates/toolbox.html.tmpl:9
440
  msgid "Show code block information"
441
  msgstr ""
442
 
443
+ #: views/blocks/block/tmpl/templates/toolbox.html.tmpl:11
444
  msgid "Set editing language for syntax highlighting"
445
  msgstr ""
446
 
447
+ #: views/blocks/block/tmpl/templates/toolbox.html.tmpl:13
448
  msgid "Set editing language to CSS"
449
  msgstr ""
450
 
451
+ #: views/blocks/block/tmpl/templates/toolbox.html.tmpl:13
452
  msgid "Cascading Style Sheets"
453
  msgstr ""
454
 
455
+ #: views/blocks/block/tmpl/templates/toolbox.html.tmpl:14
456
  msgid "Set editing language to HTML"
457
  msgstr ""
458
 
459
+ #: views/blocks/block/tmpl/templates/toolbox.html.tmpl:14
460
  msgid "Hyper Text Markup Language"
461
  msgstr ""
462
 
463
+ #: views/blocks/block/tmpl/templates/toolbox.html.tmpl:15
464
  msgid "Set editing language to JavaScript"
465
  msgstr ""
466
 
467
+ #: views/blocks/block/tmpl/templates/toolbox.html.tmpl:16
468
  msgid "Set editing language to PHP"
469
  msgstr ""
470
 
471
+ #: views/blocks/block/tmpl/templates/toolbox.html.tmpl:16
472
  msgid "PHP: Hypertext Preprocessor"
473
  msgstr ""
474
 
475
+ #: views/blocks/block/tmpl/templates/toolbox.html.tmpl:19
476
  msgid "Edit code block title. Click Save to take affect"
477
  msgstr ""
478
 
479
+ #: views/blocks/block/tmpl/templates/toolbox.html.tmpl:20
480
  msgid "View and restore code block revisions"
481
  msgstr ""
482
 
483
+ #: views/blocks/block/tmpl/templates/toolbox.html.tmpl:21
484
  msgid "Delete code block"
485
  msgstr ""
486
 
487
+ #: views/blocks/block/tmpl/templates/toolbox.html.tmpl:25
488
  msgid "Save changes to code block"
489
  msgstr ""
490
 
491
+ #: views/blocks/block/tmpl/templates/toolbox.html.tmpl:25
492
  msgid "Save"
493
  msgstr ""
494
 
495
+ #: views/blocks/cjt-block/tmpl/templates/assign-panel/default.html.tmpl:7
496
  msgid "Pages"
497
  msgstr ""
498
 
499
+ #: views/blocks/cjt-block/tmpl/templates/assign-panel/default.html.tmpl:14
500
  msgid "Posts"
501
  msgstr ""
502
 
503
+ #: views/blocks/cjt-block/tmpl/templates/assign-panel/default.html.tmpl:21
504
+ msgid "Categories"
505
  msgstr ""
506
 
507
+ #: views/blocks/cjt-block/tmpl/templates/assign-panel/default.html.tmpl:28
508
+ msgid "Custom Posts"
509
  msgstr ""
510
 
511
+ #: views/blocks/cjt-block/tmpl/templates/assign-panel/default.html.tmpl:32
512
  msgid "Auxiliary"
513
  msgstr ""
514
 
515
+ #: views/blocks/cjt-block/tmpl/templates/assign-panel/default.html.tmpl:39
516
  msgid "Advanced"
517
  msgstr ""
518
 
519
+ #: views/blocks/cjt-block/tmpl/templates/assign-panel/templates/advanced.html.tmpl:2
520
+ msgid "One URL per line"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
521
  msgstr ""
522
 
523
+ #: views/blocks/cjt-block/tmpl/templates/assign-panel/templates/advanced.html.tmpl:2
524
+ msgid "URLs"
525
  msgstr ""
526
 
527
+ #: views/blocks/cjt-block/tmpl/templates/assign-panel/templates/advanced.html.tmpl:6
528
+ msgid "One Expression per line"
529
  msgstr ""
530
 
531
+ #: views/blocks/cjt-block/tmpl/templates/assign-panel/templates/advanced.html.tmpl:6
532
+ msgid "Expressions"
533
  msgstr ""
534
 
535
+ #: views/blocks/cjt-block/tmpl/templates/assign-panel/templates/auxiliarity.html.tmpl:6
536
+ msgid "Front Page"
537
  msgstr ""
538
 
539
+ #: views/blocks/cjt-block/tmpl/templates/assign-panel/templates/custom-posts.html.tmpl:48
540
+ msgid "There are no Custom Posts Defined yet!"
541
  msgstr ""
542
 
543
+ #: views/blocks/info/tmpl/default.html.tmpl:3
544
+ msgid "ID"
545
  msgstr ""
546
 
547
+ #: views/blocks/info/tmpl/default.html.tmpl:4
548
+ #: views/blocks/new/tmpl/default.html.tmpl:24
549
+ msgid "Name"
550
  msgstr ""
551
 
552
+ #: views/blocks/info/tmpl/default.html.tmpl:5
553
+ msgid "Author"
554
  msgstr ""
555
 
556
+ #: views/blocks/info/tmpl/default.html.tmpl:6
557
+ msgid "Date Created"
558
  msgstr ""
559
 
560
+ #: views/blocks/info/tmpl/default.html.tmpl:7
561
+ msgid "Last Modified"
562
  msgstr ""
563
 
564
+ #: views/blocks/info/tmpl/default.html.tmpl:8
565
+ msgid "Shortcode"
566
  msgstr ""
567
 
568
+ #: views/blocks/manager/tmpl/blocks.html.tmpl:11
569
+ msgid "CSS & Javascript Toolbox Free"
570
  msgstr ""
571
 
572
+ #: views/blocks/manager/tmpl/blocks.html.tmpl:14
573
+ msgid "Click for"
 
574
  msgstr ""
575
 
576
+ #: views/blocks/manager/tmpl/blocks.html.tmpl:15
577
+ msgid "Pro Edition"
578
  msgstr ""
579
 
580
+ #: views/blocks/manager/tmpl/blocks.html.tmpl:19
581
+ msgid "Script Packages"
582
  msgstr ""
583
 
584
+ #: views/blocks/manager/tmpl/blocks.html.tmpl:24
585
+ msgid "Support"
586
  msgstr ""
587
 
588
+ #: views/blocks/manager/tmpl/blocks.html.tmpl:26
589
+ msgid "Request Feature"
590
  msgstr ""
591
 
592
+ #: views/blocks/manager/tmpl/blocks.html.tmpl:30
593
+ msgid "Rate & Review"
594
  msgstr ""
595
 
596
+ #: views/blocks/manager/tmpl/blocks.html.tmpl:36
597
  msgid "Need Help?"
598
  msgstr ""
599
 
600
+ #: views/blocks/manager/tmpl/blocks.html.tmpl:37
601
+ msgid "How-To"
 
 
 
 
602
  msgstr ""
603
 
604
+ #: views/blocks/manager/tmpl/blocks.html.tmpl:40
605
+ msgid "User Manual"
606
  msgstr ""
607
 
608
+ #: views/blocks/manager/tmpl/blocks.html.tmpl:53
609
  msgid ""
610
  "You have now restored the code blocks from the current backup. Nothing is "
611
  "saved until you click \"Restore\" button. To revert back to the previous "
613
  "button."
614
  msgstr ""
615
 
616
+ #: views/blocks/manager/tmpl/blocks.html.tmpl:66
617
  msgid "Warning!"
618
  msgstr ""
619
 
620
+ #: views/blocks/manager/tmpl/blocks.html.tmpl:66
621
  msgid ""
622
  "Please make sure to validate added CSS &amp; JavaScript codes, the plugin "
623
  "doesn't do that for you!"
624
  msgstr ""
625
 
626
+ #: views/blocks/manager/tmpl/toolbox.html.tmpl:3
627
  msgid "Add new code block"
628
  msgstr ""
629
 
630
+ #: views/blocks/manager/tmpl/toolbox.html.tmpl:3
631
  msgid "New Code Block"
632
  msgstr ""
633
 
634
+ #: views/blocks/manager/tmpl/toolbox.html.tmpl:4
635
  msgid "Save changes to all code blocks"
636
  msgstr ""
637
 
638
+ #: views/blocks/manager/tmpl/toolbox.html.tmpl:4
639
  msgid "Save All Changes"
640
  msgstr ""
641
 
642
+ #: views/blocks/manager/tmpl/toolbox.html.tmpl:5
643
  msgid "Cancel backup restoring"
644
  msgstr ""
645
 
646
+ #: views/blocks/manager/tmpl/toolbox.html.tmpl:5
647
  msgid "Cancel Restore"
648
  msgstr ""
649
 
650
+ #: views/blocks/manager/tmpl/toolbox.html.tmpl:6
651
  msgid "Save restored Backup"
652
  msgstr ""
653
 
654
+ #: views/blocks/manager/tmpl/toolbox.html.tmpl:6
655
+ #: views/blocks/revisions/tmpl/default.html.tmpl:27
656
  msgid "Restore"
657
  msgstr ""
658
 
659
+ #: views/blocks/manager/tmpl/toolbox.html.tmpl:9
660
  msgid "Tools for block state (batch)"
661
  msgstr ""
662
 
663
+ #: views/blocks/manager/tmpl/toolbox.html.tmpl:11
664
  msgid "Activate (turn on) all code blocks"
665
  msgstr ""
666
 
667
+ #: views/blocks/manager/tmpl/toolbox.html.tmpl:11
668
  msgid "Activate All"
669
  msgstr ""
670
 
671
+ #: views/blocks/manager/tmpl/toolbox.html.tmpl:13
672
  msgid "Deactivate (turn off) all code blocks"
673
  msgstr ""
674
 
675
+ #: views/blocks/manager/tmpl/toolbox.html.tmpl:13
676
  msgid "Deactivate All"
677
  msgstr ""
678
 
679
+ #: views/blocks/manager/tmpl/toolbox.html.tmpl:15
680
  msgid "Switch current state for all code blocks"
681
  msgstr ""
682
 
683
+ #: views/blocks/manager/tmpl/toolbox.html.tmpl:15
684
  msgid "Revert State"
685
  msgstr ""
686
 
687
+ #: views/blocks/manager/tmpl/toolbox.html.tmpl:18
688
  msgid "Tools for location hook (batch)"
689
  msgstr ""
690
 
691
+ #: views/blocks/manager/tmpl/toolbox.html.tmpl:20
692
  msgid "Set output location hook to footer for all code blocks"
693
  msgstr ""
694
 
695
+ #: views/blocks/manager/tmpl/toolbox.html.tmpl:20
696
  msgid "Footer all"
697
  msgstr ""
698
 
699
+ #: views/blocks/manager/tmpl/toolbox.html.tmpl:22
700
  msgid "Set output location hook to header for all code blocks"
701
  msgstr ""
702
 
703
+ #: views/blocks/manager/tmpl/toolbox.html.tmpl:22
704
  msgid "Header all"
705
  msgstr ""
706
 
707
+ #: views/blocks/manager/tmpl/toolbox.html.tmpl:26
708
  msgid "Tools for block cleanup and backup"
709
  msgstr ""
710
 
711
+ #: views/blocks/manager/tmpl/toolbox.html.tmpl:28
712
  msgid "Delete all code blocks"
713
  msgstr ""
714
 
715
+ #: views/blocks/manager/tmpl/toolbox.html.tmpl:28
716
  msgid "Delete all"
717
  msgstr ""
718
 
719
+ #: views/blocks/manager/tmpl/toolbox.html.tmpl:30
720
  msgid "Delete only empty code blocks"
721
  msgstr ""
722
 
723
+ #: views/blocks/manager/tmpl/toolbox.html.tmpl:30
724
  msgid "Delete Empty"
725
  msgstr ""
726
 
727
+ #: views/blocks/manager/tmpl/toolbox.html.tmpl:32
728
  msgid "Backup Manager - Create, restore, or delete backups"
729
  msgstr ""
730
 
731
+ #: views/blocks/manager/tmpl/toolbox.html.tmpl:35
732
+ msgid "General plugin settings"
733
+ msgstr ""
734
+
735
+ #: views/blocks/manager/tmpl/toolbox.html.tmpl:37
736
  msgid "Maximise all code blocks"
737
  msgstr ""
738
 
739
+ #: views/blocks/manager/tmpl/toolbox.html.tmpl:38
740
  msgid "Minimise all code blocks"
741
  msgstr ""
742
 
743
+ #: views/blocks/manager/tmpl/help/intro.html.tmpl:10
744
  msgid "Welcome to the CSS & JavaScript Toolbox dashboard"
745
  msgstr ""
746
 
747
+ #: views/blocks/manager/tmpl/help/intro.html.tmpl:11
748
  msgid ""
749
+ "Since you do not have any code blocks active, you can create a new code "
750
+ "block."
751
  msgstr ""
752
 
753
+ #: views/blocks/manager/tmpl/help/intro.html.tmpl:12
754
  msgid "Create a new Code Block"
755
  msgstr ""
756
 
757
+ #: views/blocks/manager/tmpl/help/intro.html.tmpl:13
758
  msgid ""
759
  "You can add a new code block by clicking the New Code Block button. Once "
760
  "your code block has been added, simply choose the editor you wish to work "
768
  "assigned webpage."
769
  msgstr ""
770
 
771
+ #: views/blocks/new/tmpl/default.html.tmpl:24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
772
  msgid "Name or title of code block (must be unique and cannot be left blank)"
773
  msgstr ""
774
 
775
+ #: views/blocks/new/tmpl/default.html.tmpl:28
776
  msgid "Tick the checkbox to Activate (turn on) code block"
777
  msgstr ""
778
 
779
+ #: views/blocks/new/tmpl/default.html.tmpl:32
780
  msgid "Set location hook for code block output to: Header or Footer"
781
  msgstr ""
782
 
783
+ #: views/blocks/new/tmpl/default.html.tmpl:32
784
  msgid "Location Hook"
785
  msgstr ""
786
 
787
+ #: views/blocks/new/tmpl/default.html.tmpl:36
788
  msgid "Header"
789
  msgstr ""
790
 
791
+ #: views/blocks/new/tmpl/default.html.tmpl:37
792
  msgid "Footer"
793
  msgstr ""
794
 
795
+ #: views/blocks/new/tmpl/default.html.tmpl:48
796
  msgid "Set initial code block position to: First Block or Last Block"
797
  msgstr ""
798
 
799
+ #: views/blocks/new/tmpl/default.html.tmpl:48
800
  msgid "Initial Block Position"
801
  msgstr ""
802
 
803
+ #: views/blocks/new/tmpl/default.html.tmpl:53
804
  msgid "First Block"
805
  msgstr ""
806
 
807
+ #: views/blocks/new/tmpl/default.html.tmpl:54
808
  msgid "Last Block"
809
  msgstr ""
810
 
811
+ #: views/blocks/new/tmpl/default.html.tmpl:66
812
  msgid "Cancel"
813
  msgstr ""
814
 
815
+ #: views/blocks/new/tmpl/default.html.tmpl:67
816
  msgid "Create"
817
  msgstr ""
818
 
819
+ #: views/blocks/revisions/tmpl/default.html.tmpl:19
820
  msgid "No revisions!"
821
  msgstr ""
822
 
823
+ #: views/blocks/revisions/tmpl/default.html.tmpl:26
824
  msgid "by"
825
  msgstr ""
826
 
827
+ #: views/extensions/plugins-list/tmpl/default_setup_action.html.tmpl:10
828
  msgid "Setup"
829
  msgstr ""
830
 
831
+ #: views/installer/install/tmpl/default.html.tmpl:24
832
  msgid ""
833
  "In order to start using CJT Plugin you need first to install the Plugin."
834
  msgstr ""
835
 
836
+ #: views/installer/install/tmpl/default.html.tmpl:25
837
  msgid ""
838
  "The installation process will create CJT database tables, build-it Database "
839
  "records."
840
  msgstr ""
841
 
842
+ #: views/installer/install/tmpl/default.html.tmpl:26
843
  msgid "Check for previous version and if the upgrade process is needed."
844
  msgstr ""
845
 
846
+ #: views/installer/install/tmpl/default.html.tmpl:27
847
  msgid ""
848
  "The Plugin is in disable state untill the installation process took place!"
849
  msgstr ""
850
 
851
+ #: views/installer/install/tmpl/default.html.tmpl:28
852
  msgid ""
853
  "To utilize from the CJT functionality you must install the Plugin first!!"
854
  msgstr ""
855
 
856
+ #: views/installer/install/tmpl/default.html.tmpl:30
857
  msgid "Installing Version "
858
  msgstr ""
859
 
860
+ #: views/installer/install/tmpl/default.html.tmpl:31
861
  msgid ""
862
  "When you install a new version of CJT for the first time or even upgrading "
863
  "from old versions, a number of processes will happen, which will take "
864
  "approximately 1 to 2 minutes. These processes include"
865
  msgstr ""
866
 
867
+ #: views/installer/install/tmpl/default.html.tmpl:38
868
  msgid "Create database tables."
869
  msgstr ""
870
 
871
+ #: views/installer/install/tmpl/default.html.tmpl:39
872
  msgid "Finalize Installation."
873
  msgstr ""
874
 
875
+ #: views/installer/install/tmpl/upgrade.html.tmpl:13
876
+ msgid "Upgrading CJT Plugin"
877
+ msgstr ""
878
+
879
+ #: views/installer/install/tmpl/upgrade.html.tmpl:14
880
+ msgid ""
881
+ "Please wait while we upgrading CJT Plugin installation! This process would "
882
+ "take only a few seconds!"
883
+ msgstr ""
884
+
885
+ #: views/installer/install/tmpl/upgrade.html.tmpl:15
886
+ msgid "Please backup you database before processing!"
887
+ msgstr ""
888
+
889
+ #: views/installer/install/tmpl/upgrade.html.tmpl:17
890
+ msgid "Upgrade"
891
+ msgstr ""
892
+
893
+ #: views/installer/install/tmpl/upgrades/upgrade.html.tmpl:10
894
  msgid "Upgrading Plugin"
895
  msgstr ""
896
 
897
+ #: views/installer/install/tmpl/upgrades/upgrade.html.tmpl:11
898
  msgid ""
899
  "The upgrade process time estimation cannot be preditected because its based "
900
  "on the amount of data (blocks + other data) you've created."
901
  msgstr ""
902
 
903
+ #: views/installer/install/tmpl/upgrades/upgrade.html.tmpl:12
904
  msgid ""
905
  "Important Note: It is highly recommended to upgrade the plugin using the "
906
  "same administrator or user that was used to manage the code blocks. This "
908
  "logged in administrators or users' meta data."
909
  msgstr ""
910
 
911
+ #: views/installer/install/tmpl/upgrades/upgrade.html.tmpl:21
 
 
 
 
 
 
912
  msgid "Finalize Upgrade."
913
  msgstr ""
914
 
915
+ #: views/installer/notice/tmpl/default.html.tmpl:12
916
  msgid ""
917
  "CJT Plugin has been installed throught Wordpress Plugins manager page. In "
918
  "order for CJT Plugin to work correctly you must install it throught"
919
  msgstr ""
920
 
921
+ #: views/installer/notice/tmpl/default.html.tmpl:13
922
  msgid "CJT-Instalaltion page."
923
  msgstr ""
924
 
925
+ #: views/installer/notice/tmpl/default.html.tmpl:16
926
  msgid "Please or you can go to the installation page directly through the"
927
  msgstr ""
928
 
929
+ #: views/installer/notice/tmpl/default.html.tmpl:17
930
  msgid "CSS & Javascript Toolbox page."
931
  msgstr ""
932
 
933
+ #: views/installer/notice/tmpl/default.html.tmpl:19
934
  msgid "Dismiss"
935
  msgstr ""
936
 
937
+ #: views/settings/manager/tmpl/pages/uninstall.html.tmpl:7
938
+ msgid "Wipe out data!"
939
+ msgstr ""
940
+
941
+ #: views/setup/activation-form/tmpl/default.html.tmpl:25
942
  msgid "License Key"
943
  msgstr ""
944
 
945
+ #: views/setup/activation-form/tmpl/default.html.tmpl:27
946
  msgid ""
947
  "In order to get the benefits from the premium services we provide you've to "
948
  "obtain your license key from"
949
  msgstr ""
950
 
951
+ #: views/setup/activation-form/tmpl/default.html.tmpl:28
952
  msgid "web site"
953
  msgstr ""
954
 
955
+ #: views/setup/activation-form/tmpl/default.html.tmpl:32
956
  msgid "Your Name"
957
  msgstr ""
958
 
959
+ #: views/setup/activation-form/tmpl/default.html.tmpl:37
960
  msgid "Key"
961
  msgstr ""
962
 
963
+ #: views/setup/activation-form/tmpl/default.html.tmpl:46
964
  msgid "Check"
965
  msgstr ""
966
 
models/block.php CHANGED
@@ -138,6 +138,63 @@ class CJTBlockModel extends CJTModel {
138
  $this->properties[$property] = $value;
139
  }
140
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
141
  /**
142
  * put your comment there...
143
  *
138
  $this->properties[$property] = $value;
139
  }
140
 
141
+ /**
142
+ * put your comment there...
143
+ *
144
+ * @param mixed $blockData
145
+ */
146
+ public static function arrangePins(& $blockData) {
147
+ // Initialize
148
+ $pinsGroupNames = array_flip(array('pages', 'posts', 'categories', 'pinPoint'));
149
+ $dbDriver = cssJSToolbox::getInstance()->getDBDriver();
150
+ $mdlBlock = new CJTBlocksModel();
151
+ $block = $mdlBlock->getBlock($blockData->id, array(), array('id', 'pinPoint'));
152
+ $submittedPins = array_intersect_key(((array) $blockData), $pinsGroupNames);
153
+ $assignedPins = array_intersect_key(((array) $block), $pinsGroupNames);
154
+ // Transfer assigned PinPoint from "FLAGGED INTEGER" TO "ARRAY" like
155
+ // the other pins.
156
+ $assignedPins['pinPoint'] = array_keys(CJT_Models_Block_Assignmentpanel_Helpers_Auxiliary
157
+ ::getInstance()
158
+ ->getPinsArray($assignedPins['pinPoint']));
159
+ // Walk through all assigned pins.
160
+ // Unassigned any item with 'value=false'.
161
+ // Whenever an item is found on the submitted
162
+ // pins it should be removed from the submitted list
163
+ foreach ($submittedPins as $groupName => $submittedGroup) {
164
+ // Get assigned pins group if found
165
+ if (!isset($assignedPins[$groupName])) {
166
+ // Initialize new assigned group array.
167
+ $assignedPins[$groupName] = array();
168
+ }
169
+ // Get assigned group array reference.
170
+ $assignedGroup =& $assignedPins[$groupName];
171
+ // For every submitted item there is three types.
172
+ // 1. Already assigned :WHEN: (sync == true and value == true)
173
+ // 2. Unassigned :WHEN: (value == false)
174
+ // 3. Newly assigned :WHEN: (sync = false).
175
+ foreach ($submittedGroup as $submittedPinId => $submittedPin) {
176
+ // Unassigned pin
177
+ if (!$submittedPin['value']) {
178
+ // Find the submittedPinId AssignedPins index.
179
+ $assignedIndex = array_search($submittedPinId, $assignedGroup);
180
+ // Unassigned it :REMOVE FROM ARRAY:
181
+ unset($assignedGroup[$assignedIndex]);
182
+ }
183
+ else if (!$submittedPin['sync']) {
184
+ // Add newly assigned item.
185
+ $assignedGroup[] = $submittedPinId;
186
+ }
187
+ }
188
+ }
189
+ // Copy all assigned pins back to the block object.
190
+ foreach ($assignedPins as $groupName => $finalGroupAssigns) {
191
+ // Copy the group back to the block object.
192
+ $blockData->{$groupName} = $finalGroupAssigns;
193
+ }
194
+ // Important for caller short-circle condition.
195
+ return true;
196
+ }
197
+
198
  /**
199
  * put your comment there...
200
  *
models/block/assignmentpanel/auxiliary.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ */
5
+
6
+ /**
7
+ *
8
+ */
9
+ class CJT_Models_Block_Assignmentpanel_Auxiliary
10
+ extends CJT_Models_Block_Assignmentpanel_Auxiliarybase {
11
+
12
+ /**
13
+ * put your comment there...
14
+ *
15
+ */
16
+ protected function queryItems() {
17
+ return $this->getList();
18
+ }
19
+
20
+ /**
21
+ * put your comment there...
22
+ *
23
+ */
24
+ public function getTotalCount() {
25
+ return count($this->getList());
26
+ }
27
+
28
+ } // End class.
models/block/assignmentpanel/auxiliarybase.php ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ */
5
+
6
+ /**
7
+ *
8
+ */
9
+ abstract class CJT_Models_Block_Assignmentpanel_Auxiliarybase
10
+ extends CJT_Models_Block_Assignmentpanel_Base {
11
+
12
+ /**
13
+ * put your comment there...
14
+ *
15
+ * @var mixed
16
+ */
17
+ protected $auxHelper = array();
18
+
19
+ /**
20
+ * put your comment there...
21
+ *
22
+ * @param mixed $offset
23
+ * @param mixed $iPerPage
24
+ * @param mixed $blockId
25
+ * @param mixed $typeParams
26
+ * @return CJT_Models_Block_Assignmentpanel_Auxiliarybase
27
+ */
28
+ public function __construct($offset, $iPerPage, $blockId, $typeParams) {
29
+ // Initialize.
30
+ $this->auxHelper = new CJT_Models_Block_Assignmentpanel_Helpers_Auxiliary();
31
+ // Initialize parent.
32
+ parent::__construct($offset, $iPerPage, $blockId, $typeParams);
33
+ }
34
+
35
+ /**
36
+ * put your comment there...
37
+ *
38
+ */
39
+ protected function getList() {
40
+ // Initialize.
41
+ $list = array();
42
+ $offset = $this->getOffset();
43
+ // Don't return items unless the offset is 0
44
+ // there is no paging for the aux items.
45
+ if (!$offset) {
46
+ $list = $this->auxHelper->getList();
47
+ }
48
+ // Returns
49
+ return $list;
50
+ }
51
+
52
+ /**
53
+ * put your comment there...
54
+ *
55
+ */
56
+ protected function isHierarchical() {
57
+ return false;
58
+ }
59
+
60
+ /**
61
+ * put your comment there...
62
+ *
63
+ */
64
+ protected function pinsMap() {
65
+ // Initialize.
66
+ $map = array();
67
+ $mdlBlocks = new CJTBlocksModel();
68
+ $blockId = $this->getBlockId();
69
+ // Query block pinPoint field.
70
+ $assignedPinPoints = $mdlBlocks->getBlock($blockId, array(), array('id', 'pinPoint'), false)->pinPoint;
71
+ // Return map.
72
+ return $this->auxHelper->getPinsArray($assignedPinPoints);
73
+ }
74
+
75
+ /**
76
+ * put your comment there...
77
+ *
78
+ * @param mixed $key
79
+ * @param mixed $item
80
+ */
81
+ protected function prepareItem($key, & $item) {
82
+ // Get the title.
83
+ $title = $item;
84
+ // Create an item array.
85
+ $item = array();
86
+ $item['parent'] = 0;
87
+ $item['id'] = dechex($key);
88
+ $item['title'] = $title;
89
+ }
90
+
91
+ } // End class.
models/block/assignmentpanel/auxiliarypinned.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ */
5
+
6
+ /**
7
+ *
8
+ */
9
+ class CJT_Models_Block_Assignmentpanel_Auxiliarypinned
10
+ extends CJT_Models_Block_Assignmentpanel_Auxiliarybase {
11
+
12
+ /**
13
+ * put your comment there...
14
+ *
15
+ */
16
+ public function getTotalCount() {
17
+ return count($this->getPinsMap());
18
+ }
19
+
20
+ /**
21
+ * put your comment there...
22
+ *
23
+ */
24
+ protected function queryItems() {
25
+ // Get list.
26
+ $allItems = $this->getList();
27
+ $items = array();
28
+ // Get only assigned items.
29
+ $map = $this->getPinsMap();
30
+ // Get all aux-items available on the map.
31
+ foreach ($allItems as $id => $item) {
32
+ if (isset($map[dechex($id)])) {
33
+ $items[$id] = $item;
34
+ }
35
+ }
36
+ // Return assigned-only items.
37
+ return $items;
38
+ }
39
+
40
+ } // End class.
models/block/assignmentpanel/base.php ADDED
@@ -0,0 +1,194 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ */
5
+
6
+ /**
7
+ *
8
+ */
9
+ abstract class CJT_Models_Block_Assignmentpanel_Base {
10
+
11
+ /**
12
+ * put your comment there...
13
+ *
14
+ * @var mixed
15
+ */
16
+ protected $blockId = null;
17
+
18
+ /**
19
+ * put your comment there...
20
+ *
21
+ * @var mixed
22
+ */
23
+ protected $iPerPage = null;
24
+
25
+ /**
26
+ * put your comment there...
27
+ *
28
+ * @var mixed
29
+ */
30
+ protected $offset = null;
31
+
32
+ /**
33
+ * put your comment there...
34
+ *
35
+ * @var mixed
36
+ */
37
+ protected $typeParams = null;
38
+
39
+ /**
40
+ * put your comment there...
41
+ *
42
+ * @param mixed $offset
43
+ * @param mixed $oPerPage
44
+ * @param mixed $blockId
45
+ * @param mixed $typeParams
46
+ * @return CJT_Models_Block_Assignmentpanel_Base
47
+ */
48
+ public function __construct($offset, $iPerPage, $blockId, $typeParams) {
49
+ // Initialize.
50
+ $this->offset = $offset;
51
+ $this->iPerPage = $iPerPage;
52
+ $this->blockId = $blockId;
53
+ $this->typeParams = $typeParams;
54
+ }
55
+
56
+ /**
57
+ * put your comment there...
58
+ *
59
+ * @param mixed $assignedOnly
60
+ * @param mixed $type
61
+ * @param mixed $offset
62
+ * @param mixed $iPerPage
63
+ * @param mixed $blockId
64
+ * @param mixed $typeParams
65
+ */
66
+ public static function getInstance($assignedOnly, $type, $offset, $iPerPage, $blockId, $typeParams) {
67
+ // Get type class name.
68
+ $typeName = strtoupper($type);
69
+ // Inistantiate 'pinned' object if assignedOnly flag is set to true.
70
+ if ($assignedOnly) {
71
+ $typeName .= 'pinned';
72
+ }
73
+ // Build items-list handler class name.
74
+ $typeClass = "CJT_Models_Block_Assignmentpanel_{$typeName}";
75
+ // Instantiate type object.
76
+ $typeObject = new $typeClass($offset, $iPerPage, $blockId, $typeParams);
77
+ // Return instance.
78
+ return $typeObject;
79
+ }
80
+
81
+ /**
82
+ * put your comment there...
83
+ *
84
+ */
85
+ public function getItems() {
86
+ // Initialize.
87
+ $params = $this->getTypeParams();
88
+ $blockId = $this->getBlockId();
89
+ $pinsMap = array();
90
+ $items = array();
91
+ // Pins map.
92
+ $pinsMap = $this->getPinsMap();
93
+ // Query all items by the model class.
94
+ $items = $this->queryItems();
95
+ // Prepare all retrieved items by 'base' and model classes.
96
+ foreach ($items as $key => & $item) {
97
+ // Prepare the item by the model class.
98
+ $this->prepareItem($key, $item);
99
+ // Set if item is assigned to the block!
100
+ $item['assigned'] = isset($pinsMap[$item['id']]);
101
+ }
102
+ // In case the object type is Hierarchical
103
+ // Pass the items list to the filter.
104
+ if ($this->isHierarchical()) {
105
+ // Hierarchical filter.
106
+ $hierarchicalFilter = new CJT_Models_Block_Assignmentpanel_Helpers_Hierarchical(
107
+ $this->getOffset(),
108
+ $this->getIPerPage(),
109
+ $items
110
+ );
111
+ // Get items with childs in the correct order!
112
+ $items = $hierarchicalFilter->getItems();
113
+ }
114
+ // Return items list.
115
+ return $items;
116
+ }
117
+
118
+ /**
119
+ * put your comment there...
120
+ *
121
+ */
122
+ public function getBlockId() {
123
+ return $this->blockId;
124
+ }
125
+
126
+ /**
127
+ * put your comment there...
128
+ *
129
+ */
130
+ public function getIPerPage() {
131
+ return $this->iPerPage;
132
+ }
133
+
134
+ /**
135
+ * put your comment there...
136
+ *
137
+ */
138
+ public function getOffset() {
139
+ return $this->offset;
140
+ }
141
+
142
+ /**
143
+ * Query/Get-Cached pins map.
144
+ *
145
+ */
146
+ protected final function getPinsMap() {
147
+ // Initialize.
148
+ static $map = null;
149
+ if ($map === null) {
150
+ $map = $this->pinsMap();
151
+ }
152
+ // Returns.
153
+ return $map;
154
+ }
155
+
156
+ public abstract function getTotalCount();
157
+
158
+ /**
159
+ * put your comment there...
160
+ *
161
+ */
162
+ public function & getTypeParams() {
163
+ return $this->typeParams;
164
+ }
165
+
166
+ /**
167
+ * put your comment there...
168
+ *
169
+ * @return Boolean
170
+ */
171
+ protected abstract function isHierarchical();
172
+
173
+ /**
174
+ * put your comment there...
175
+ *
176
+ */
177
+ protected abstract function pinsMap();
178
+
179
+ /**
180
+ * put your comment there...
181
+ *
182
+ * @param mixed $item
183
+ * @return void
184
+ */
185
+ protected abstract function prepareItem($key, & $item);
186
+
187
+ /**
188
+ * put your comment there...
189
+ *
190
+ * @return Array Items list.
191
+ */
192
+ protected abstract function queryItems();
193
+
194
+ } // End class.
models/block/assignmentpanel/helpers/auxiliary.php ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ */
5
+
6
+ /**
7
+ *
8
+ */
9
+ class CJT_Models_Block_Assignmentpanel_Helpers_Auxiliary {
10
+
11
+ /**
12
+ * put your comment there...
13
+ *
14
+ * @var mixed
15
+ */
16
+ protected $list;
17
+
18
+ /**
19
+ * put your comment there...
20
+ *
21
+ */
22
+ public function __construct() {
23
+ // Define auxiliary list.
24
+ $this->list = array(
25
+ CJTBlockModel::PINS_POSTS_BLOG_INDEX => cssJSToolbox::getText('Blog Index'),
26
+ CJTBlockModel::PINS_POSTS_ALL_POSTS => cssJSToolbox::getText('All Posts'),
27
+ CJTBlockModel::PINS_PAGES_ALL_PAGES => cssJSToolbox::getText('All Pages'),
28
+ CJTBlockModel::PINS_CATEGORIES_ALL_CATEGORIES => cssJSToolbox::getText('All Categories'),
29
+ CJTBlockModel::PINS_POSTS_RECENT => cssJSToolbox::getText('Recent Posts'),
30
+ CJTBlockModel::PINS_FRONTEND => cssJSToolbox::getText('Entire Website'),
31
+ CJTBlockModel::PINS_BACKEND => cssJSToolbox::getText('Website Backend'),
32
+ CJTBlockModel::PINS_SEARCH => cssJSToolbox::getText('Search Pages'),
33
+ CJTBlockModel::PINS_ARCHIVE => cssJSToolbox::getText('All Archives'),
34
+ CJTBlockModel::PINS_TAG => cssJSToolbox::getText('Tag Archives'),
35
+ CJTBlockModel::PINS_AUTHOR => cssJSToolbox::getText('Author Archives'),
36
+ CJTBlockModel::PINS_ATTACHMENT => cssJSToolbox::getText('Attachment Pages'),
37
+ CJTBlockModel::PINS_404_ERROR => cssJSToolbox::getText('404 Error'),
38
+ );
39
+ }
40
+
41
+ /**
42
+ * put your comment there...
43
+ *
44
+ */
45
+ public static function getInstance() {
46
+ return new CJT_Models_Block_Assignmentpanel_Helpers_Auxiliary();
47
+ }
48
+
49
+ /**
50
+ * put your comment there...
51
+ *
52
+ */
53
+ public function getList() {
54
+ return $this->list;
55
+ }
56
+
57
+ /**
58
+ * put your comment there...
59
+ *
60
+ * @param mixed $pinPoint
61
+ */
62
+ public function getPinsArray($pinPoint) {
63
+ // Initialize.
64
+ $pinsArray = array();
65
+ $flagsList = array_keys($this->getList());
66
+ // Get the 'state' for all the available flags.
67
+ foreach ($flagsList as $flagValue) {
68
+ if ($flagValue & $pinPoint) {
69
+ // Use bitValue as ID and ON/OFF as value.
70
+ $pinsArray[dechex($flagValue)] = true;
71
+ }
72
+ }
73
+ return $pinsArray;
74
+ }
75
+
76
+ } // End class.
models/block/assignmentpanel/helpers/hierarchical.php ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ */
5
+
6
+ /**
7
+ *
8
+ */
9
+ class CJT_Models_Block_Assignmentpanel_Helpers_Hierarchical {
10
+
11
+ /**
12
+ * put your comment there...
13
+ *
14
+ * @var mixed
15
+ */
16
+ protected $allItems = array();
17
+
18
+ /**
19
+ * put your comment there...
20
+ *
21
+ * @var mixed
22
+ */
23
+ protected $iPerPage = null;
24
+
25
+ /**
26
+ * put your comment there...
27
+ *
28
+ * @var mixed
29
+ */
30
+ protected $offset = null;
31
+
32
+ /**
33
+ * put your comment there...
34
+ *
35
+ * @param mixed $offset
36
+ * @param mixed $iPerPage
37
+ * @param mixed $items
38
+ * @return CJT_Models_Block_Assignmentpanel_Helpers_Hierarchical
39
+ */
40
+ public function __construct($offset, $iPerPage, $allItems) {
41
+ // Initialize.
42
+ $this->offset = $offset;
43
+ $this->iPerPage = $iPerPage;
44
+ $this->allItems = $allItems;
45
+ }
46
+
47
+ /**
48
+ * put your comment there...
49
+ *
50
+ */
51
+ public function getIPerPage() {
52
+ return $this->iPerPage;
53
+ }
54
+
55
+ /**
56
+ * put your comment there...
57
+ *
58
+ */
59
+ public function getItems() {
60
+ // Initialize.
61
+ $allItems =& $this->allItems;
62
+ $hierarchicalItems = array();
63
+ $groupedItems = array();
64
+ $offset = $this->getOffset();
65
+ $endOffset = $this->getOffset() + $this->getIPerPage();
66
+ // Group all items under parent item(s) ID.
67
+ foreach ($allItems as $item) {
68
+ $groupedItems[((int) $item['parent'])][$item['id']] = $item;
69
+ }
70
+ /// Non-Recursive loop for getting
71
+ /// FLAT list for all items with childs items
72
+ /// underneath them
73
+ // Working pointers has the current in process
74
+ // items. Initialize to start with root
75
+ // items with parent = 0 (array(0)).
76
+ $workingPointers = array(0);
77
+ do {
78
+ // Current pointer is the last one.
79
+ $pointer = end($workingPointers);
80
+ // Get current working group.
81
+ $group =& $groupedItems[$pointer];
82
+ // Shift first item from group.
83
+ $item = array_shift($group);
84
+ // Add item to the list.
85
+ $hierarchicalItems[$item['id']] = $item;
86
+ // Remove current group from the pointers
87
+ // list if all items has been processed.
88
+ if (empty($group)) {
89
+ array_pop($workingPointers);
90
+ }
91
+ // If the current items has childs then
92
+ // add it to the working pointer to be processed
93
+ // in the immediate iteration.
94
+ if (isset($groupedItems[$item['id']])) {
95
+ $workingPointers[] = $item['id'];
96
+ }
97
+ // If there is no other group to process then exit.
98
+ } while(!empty($workingPointers) && (count($hierarchicalItems) != $endOffset));
99
+ // Get ony items start from the requested offset.
100
+ $items = array_slice($hierarchicalItems, $offset, $this->getIPerPage());
101
+ // Returns full-tree.
102
+ return $items;
103
+ }
104
+
105
+ /**
106
+ * put your comment there...
107
+ *
108
+ */
109
+ public function getOffset() {
110
+ return $this->offset;
111
+ }
112
+
113
+ } // End class.
models/block/assignmentpanel/post.php ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ */
5
+
6
+ /**
7
+ *
8
+ */
9
+ class CJT_Models_Block_Assignmentpanel_Post
10
+ extends CJT_Models_Block_Assignmentpanel_Postbase {
11
+
12
+ /**
13
+ * put your comment there...
14
+ *
15
+ */
16
+ public function getTotalCount() {
17
+ // Initialize.
18
+ $args = $this->args;
19
+ $params =& $this->getTypeParams();
20
+ // Set args.
21
+ $args['offset'] = 0;
22
+ $args['numberposts'] = -1;
23
+ $args['post_type'] = $params['type'];
24
+ // Query posts.
25
+ return count(get_posts($args));
26
+ }
27
+
28
+ /**
29
+ * put your comment there...
30
+ *
31
+ */
32
+ protected function isHierarchical() {
33
+ // Initialize.
34
+ $typeParams =& $this->getTypeParams();
35
+ // Check if post_type hierarchical.
36
+ return is_post_type_hierarchical($typeParams['type']);
37
+ }
38
+
39
+ /**
40
+ * put your comment there...
41
+ *
42
+ *
43
+ */
44
+ protected function queryItems() {
45
+ // Initialize.
46
+ $args = $this->args;
47
+ $params =& $this->getTypeParams();
48
+ // Set User passed parameters used to query 'posts'
49
+ if ($this->isHierarchical()) {
50
+ // Fetch all for Hierarchical posts.
51
+ $args['offset'] = 0;
52
+ $args['numberposts'] = -1;
53
+ }
54
+ else {
55
+ $args['offset'] = $this->getOffset();
56
+ $args['numberposts'] = $this->getIPerPage();
57
+ }
58
+ $args['post_type'] = $params['type'];
59
+ // Query posts.
60
+ return get_posts($args);
61
+ }
62
+
63
+ } // End class.
models/block/assignmentpanel/postbase.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ */
5
+
6
+ /**
7
+ *
8
+ */
9
+ abstract class CJT_Models_Block_Assignmentpanel_Postbase
10
+ extends CJT_Models_Block_Assignmentpanel_Wordpress {
11
+
12
+ /**
13
+ * put your comment there...
14
+ *
15
+ * @var mixed
16
+ */
17
+ protected $args = array(
18
+ 'order' => 'ASC',
19
+ 'orderby' => 'title',
20
+ 'suppress_filters' => true,
21
+ 'update_post_term_cache' => false,
22
+ 'update_post_meta_cache' => false
23
+ );
24
+
25
+ /**
26
+ * put your comment there...
27
+ *
28
+ * @param mixed $key
29
+ * @param mixed $item
30
+ */
31
+ protected function prepareItem($key, & $item) {
32
+ // Initialize.
33
+ $typeParams =& $this->getTypeParams();
34
+ // Get only 'ID' and 'Title', 'parent' fields.
35
+ $preItem['id'] = $item->ID;
36
+ $preItem['title'] = $item->post_title;
37
+ $preItem['parent'] = $item->post_parent;
38
+ // Get permalink.
39
+ $preItem['link'] = get_permalink($preItem['id']);
40
+ /// Flag if term has child terms!
41
+ // Query childs.
42
+ $args = $this->args;
43
+ $args['post_parent'] = $preItem['id'];
44
+ $args['post_type'] = $typeParams['type'];
45
+ $args['numberposts'] = 1;
46
+ $childPosts = get_posts($args);
47
+ // Flag it!
48
+ $preItem['hasChilds'] = !empty($childPosts);
49
+ // Re-Reference.
50
+ $item = $preItem;
51
+ }
52
+
53
+ } // End class.
models/block/assignmentpanel/postpinned.php ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ */
5
+
6
+ /**
7
+ *
8
+ */
9
+ class CJT_Models_Block_Assignmentpanel_Postpinned
10
+ extends CJT_Models_Block_Assignmentpanel_Postbase {
11
+
12
+ /**
13
+ * put your comment there...
14
+ *
15
+ */
16
+ public function getTotalCount() {
17
+ return count($this->getPinsMap());
18
+ }
19
+
20
+ /**
21
+ * put your comment there...
22
+ *
23
+ */
24
+ protected function isHierarchical() {
25
+ return false;
26
+ }
27
+
28
+ /**
29
+ * put your comment there...
30
+ *
31
+ * @param mixed $key
32
+ * @param mixed $item
33
+ */
34
+ protected function prepareItem($key, & $item) {
35
+ // Prepare item.
36
+ parent::prepareItem($key, $item);
37
+ // No parents used in assignedOnly items.
38
+ $item['parent'] = 0;
39
+ }
40
+
41
+ /**
42
+ * put your comment there...
43
+ *
44
+ *
45
+ */
46
+ protected function queryItems() {
47
+ // All assigned items is fetched in the first request
48
+ // Multiple requestes is now allowed.
49
+ if ($this->getOffset()) {
50
+ return array();
51
+ }
52
+ // Initialize.
53
+ $params = $this->getTypeParams();
54
+ // Get all assigned IDs.
55
+ $ids = array_keys($this->getPinsMap());
56
+ // Query all available Ids.
57
+ $args = $this->args;
58
+ $args['post_type'] = $params['type'];
59
+ $args['post__in'] = $ids;
60
+ $args['offset'] = $this->getOffset();
61
+ $args['numberposts'] = -1;
62
+ // Return empty list if nothing assigned
63
+ // or the queried items otherwise.
64
+ $items = empty($ids) ? array() : get_posts($args);
65
+ // Returns.
66
+ return $items;
67
+ }
68
+
69
+ } // End class.
models/block/assignmentpanel/taxonomy.php ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ */
5
+
6
+ /**
7
+ *
8
+ */
9
+ class CJT_Models_Block_Assignmentpanel_Taxonomy
10
+ extends CJT_Models_Block_Assignmentpanel_Taxonomybase {
11
+
12
+ /**
13
+ * put your comment there...
14
+ *
15
+ */
16
+ public function getTotalCount() {
17
+ // Initialize.
18
+ $args = $this->args;
19
+ $params =& $this->getTypeParams();
20
+ // Set args.
21
+ $args['fields'] = 'ids';
22
+ // Query posts.
23
+ return count(get_terms($params['type'], $args));
24
+ }
25
+
26
+ /**
27
+ * put your comment there...
28
+ *
29
+ */
30
+ protected function isHierarchical() {
31
+ // Initialize.
32
+ $typeParams =& $this->getTypeParams();
33
+ // Check if post_type hierarchical.
34
+ return is_taxonomy_hierarchical($typeParams['type']);
35
+ }
36
+
37
+ /**
38
+ * put your comment there...
39
+ *
40
+ *
41
+ */
42
+ protected function queryItems() {
43
+ // Initialize.
44
+ $args = $this->args;
45
+ $params =& $this->getTypeParams();
46
+ // Set User passed parameters used to query 'taxonomies'
47
+ if ($this->isHierarchical()) {
48
+ // Return them all for taxonomy doesn't
49
+ // require the end-offset ($args['number']) to be set.
50
+ $args['offset'] = 0;
51
+ }
52
+ else {
53
+ $args['offset'] = $this->getOffset();
54
+ $args['number'] = $this->getIPerPage();
55
+ }
56
+ // Query posts.
57
+ return get_terms($params['type'], $args);
58
+ }
59
+
60
+ } // End class.
models/block/assignmentpanel/taxonomybase.php ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ */
5
+
6
+ /**
7
+ *
8
+ */
9
+ abstract class CJT_Models_Block_Assignmentpanel_Taxonomybase
10
+ extends CJT_Models_Block_Assignmentpanel_Wordpress {
11
+
12
+
13
+ /**
14
+ * put your comment there...
15
+ *
16
+ * @var mixed
17
+ */
18
+ protected $args = array(
19
+ 'child_of' => 0,
20
+ 'hide_empty' => false,
21
+ 'hierarchical' => 1,
22
+ 'include_last_update_time' => false,
23
+ 'order' => 'DESC',
24
+ 'orderby' => 'name',
25
+ 'pad_counts' => false,
26
+ );
27
+
28
+ /**
29
+ * put your comment there...
30
+ *
31
+ * @param mixed $key
32
+ * @param mixed $item
33
+ */
34
+ protected function prepareItem($key, & $item) {
35
+ // Initialize.
36
+ $typeParams =& $this->getTypeParams();
37
+ $taxonomy = $typeParams['type'];
38
+ // COMMON names for 'ID' and 'TITLE'
39
+ $preItem['id'] = $item->term_id;
40
+ $preItem['title'] = $item->name;
41
+ $preItem['parent'] = $item->parent;
42
+ // Get taxonomy link.
43
+ $preItem['link'] = get_term_link($item, $taxonomy);
44
+ /// Flag if term has child terms!
45
+ // Query childs.
46
+ $args = $this->args;
47
+ $args['parent'] = $preItem['id'];
48
+ $args['hide_empty'] = false;
49
+ $args['fields'] = 'ids';
50
+ $args['number'] = 1;
51
+ $childTerms = get_terms($typeParams['type'], $args);
52
+ // Flag it!
53
+ $preItem['hasChilds'] = !empty($childTerms);
54
+ // Re-Reference.
55
+ $item = $preItem;
56
+ }
57
+
58
+ } // End class.
models/block/assignmentpanel/taxonomypinned.php ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ */
5
+
6
+ /**
7
+ *
8
+ */
9
+ class CJT_Models_Block_Assignmentpanel_Taxonomypinned
10
+ extends CJT_Models_Block_Assignmentpanel_Taxonomybase {
11
+
12
+ /**
13
+ * put your comment there...
14
+ *
15
+ */
16
+ public function getTotalCount() {
17
+ return count($this->getPinsMap());
18
+ }
19
+
20
+ /**
21
+ * put your comment there...
22
+ *
23
+ */
24
+ protected function isHierarchical() {
25
+ return false;
26
+ }
27
+
28
+ /**
29
+ * put your comment there...
30
+ *
31
+ * @param mixed $key
32
+ * @param mixed $item
33
+ */
34
+ protected function prepareItem($key, & $item) {
35
+ // Prepare item.
36
+ parent::prepareItem($key, $item);
37
+ // No parents used in assignedOnly items.
38
+ $item['parent'] = 0;
39
+ }
40
+
41
+ /**
42
+ * put your comment there...
43
+ *
44
+ *
45
+ */
46
+ protected function queryItems() {
47
+ // All assigned items is fetched in the first request
48
+ // Multiple requestes is now allowed.
49
+ if ($this->getOffset()) {
50
+ return array();
51
+ }
52
+ // Initialize.
53
+ $params = $this->getTypeParams();
54
+ // Get all assigned IDs.
55
+ $ids = array_keys($this->getPinsMap());
56
+ // Query all available Ids.
57
+ $args = $this->args;
58
+ $args['include'] = $ids;
59
+ $args['offset'] = 0;
60
+ // Return empty list if nothing assigned
61
+ // or the queried items otherwise.
62
+ $items = empty($ids) ? array() : get_terms($params['type'], $args);
63
+ // Return taxonomy items.
64
+ return $items;
65
+ }
66
+
67
+ } // End class.
models/block/assignmentpanel/wordpress.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ */
5
+
6
+ /**
7
+ *
8
+ */
9
+ abstract class CJT_Models_Block_Assignmentpanel_Wordpress
10
+ extends CJT_Models_Block_Assignmentpanel_Base {
11
+
12
+ /**
13
+ * put your comment there...
14
+ *
15
+ */
16
+ protected function pinsMap() {
17
+ // Initialize.
18
+ $blockId = $this->getBlockId();
19
+ $params = $this->getTypeParams();
20
+ $pinsMap = array();
21
+ // Prepare block pinned items.
22
+ $dbDriver = cssJSToolbox::getInstance()->getDBDriver();
23
+ $pinsTable = new CJTBlockPinsTable($dbDriver);
24
+ $pins = $pinsTable->get(null, array('blockId' => $blockId, 'pin' => $params['group']));
25
+ // Create ITEM-ID => VALUE array map for the retrieved pins.
26
+ foreach ($pins as $pin) {
27
+ $pinsMap[$pin->value] = true;
28
+ }
29
+ // Returns.
30
+ return $pinsMap;
31
+ }
32
+
33
+ } // End class.
models/blocks.php CHANGED
@@ -146,8 +146,8 @@ class CJTBlocksModel {
146
  * @param mixed $id
147
  * @param mixed $fields
148
  */
149
- public function getBlock($id, $filters = array(), $fields = array('*')) {
150
- $blocks = $this->getBlocks($id, $filters, $fields);
151
  $block = !empty($blocks) ? reset($blocks) : null;
152
  return $block;
153
  }
@@ -157,13 +157,13 @@ class CJTBlocksModel {
157
  *
158
  * @param mixed $ids
159
  */
160
- public function getBlocks($ids = array(), $filters = array(), $fields = array('*'), $returnType = OBJECT_K, $orderBy = array()) {
161
  $blocks = array();
162
  // Create Tables objects.
163
  $blocksTable = new CJTBlocksTable($this->dbDriver);
164
  $pinsTable = new CJTBlockPinsTable($this->dbDriver);
165
  // Read blocks.
166
- $blocks = $blocksTable->get($ids, $fields, $filters, $returnType, $orderBy);
167
  // Get only pins for retrieved blocks.
168
  $ids = array_keys($blocks);
169
  $pins = empty($ids) ? array() : $pinsTable->get($ids);
146
  * @param mixed $id
147
  * @param mixed $fields
148
  */
149
+ public function getBlock($id, $filters = array(), $fields = array('*'), $useDefaultBackupFltr = true) {
150
+ $blocks = $this->getBlocks($id, $filters, $fields, OBJECT_K, array(), $useDefaultBackupFltr);
151
  $block = !empty($blocks) ? reset($blocks) : null;
152
  return $block;
153
  }
157
  *
158
  * @param mixed $ids
159
  */
160
+ public function getBlocks($ids = array(), $filters = array(), $fields = array('*'), $returnType = OBJECT_K, $orderBy = array(), $useDefaultBackupFltr = true) {
161
  $blocks = array();
162
  // Create Tables objects.
163
  $blocksTable = new CJTBlocksTable($this->dbDriver);
164
  $pinsTable = new CJTBlockPinsTable($this->dbDriver);
165
  // Read blocks.
166
+ $blocks = $blocksTable->get($ids, $fields, $filters, $returnType, $orderBy, $useDefaultBackupFltr);
167
  // Get only pins for retrieved blocks.
168
  $ids = array_keys($blocks);
169
  $pins = empty($ids) ? array() : $pinsTable->get($ids);
models/setup.php CHANGED
@@ -14,7 +14,7 @@ class CJTSetupModel {
14
  /**
15
  *
16
  */
17
- const EDD_PRODUCT_NAME = 'CJT V6';
18
 
19
  /**
20
  *
14
  /**
15
  *
16
  */
17
+ const EDD_PRODUCT_NAME = 'CJT Pro';
18
 
19
  /**
20
  *
readme.txt CHANGED
@@ -5,21 +5,22 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
5
  Tags: plug, customise, style, scripts, hack, Wordpress, contribute, enhancing, HTML, CSS, Javascript, PHP, execute, display, output, header, footer, apply, requests, match, hook, run
6
  License: GPLv2 or later
7
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
8
- Requires at least: 3.3
9
- Tested up to: 3.5.1
10
- Stable tag: 6.0.15
11
 
12
  Easily add custom CSS, JavaScript, HTML and PHP code to unique CJT code blocks and assign them wherever you want.
13
 
14
  == Description ==
15
- CSS & JavaScript Toolbox (or CJT) is a powerful and flexible plugin, which allows you to contribute to your WordPress installation code via an easy-to-use web interface. You will be able to modify or extend your site functionality and appearance by adding custom code directly into CJT code blocks and assign them to pages, posts, custom posts, categories, URLs, expressions, and loads more!
16
 
17
- [youtube http://www.youtube.com/watch?v=A2AcTeU_tMk]
18
 
19
- If you like to know more about the development state, issues and to tracke future versions code please follow us on [GitHub Plugin repository](https://github.com/css-javascript-toolbox/css-javascript-toolbox-plugin).
 
20
 
21
  = Who is this plugin for? =
22
- The CJT plugin was created to help website authors write their own code. Basically, if you love writing code, then you will love CJT. Designed and developed from the ground-up, CJT will suit novice users to seasoned website developers alike. You can also use it as a training tool, and learn step-by-step how to write and apply scripts yourself! In fact, you will find useful script examples on the CJT website.
23
 
24
  = Have you ever thought? =
25
  - Wouldn't it be great to have an easy way to plug your code into a Wordpress installation without having to know how to create a Wordpress plugin OR having to modify files through FTP, etc?
@@ -48,8 +49,8 @@ If you would like to learn more, please click to [download the CJT User Manual](
48
  = Scripts, scripts, glorious scripts! =
49
  If you would like to learn how to use our plugin with some script examples, please visit our [Scripts page](http://css-javascript-toolbox.com/category/scripts). If you are a script author and would like to get more exposure for your scripts, please submit your scripts to us. Click [Submit a Script](http://css-javascript-toolbox.com/submit-a-script) to find out more.
50
 
51
- = Add more power to CJT by installing Extensions! =
52
- CJT is extensible Plugin that allow to other Wordpress Plugins to extend or change its behaviour! CJT team start to create some useful extensions you can find in the [addons](http://css-javascript-toolbox.com/addons) page.
53
 
54
  = Thank You =
55
  We would like to take this opportunity to thank you for installing our WordPress plugin. We will continue to develop it further, making it bigger and better with awesome updates in the near future. If you like this plugin and not only find it useful, but appreciate the huge amount of work that has gone into creating it, you can certainly support us in a number of ways, including:
@@ -122,10 +123,21 @@ Sometimes a bug decides to rear its ugly head and when this happens, this is whe
122
 
123
  == Screenshots ==
124
 
125
- 1. Main CJT V6 CE code block screen
126
  2. CJT Shortcode button
127
 
128
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
129
  = 6.0.15 =
130
  * Enhance: Uninstaller is now configurable so that admin can specify is to wipeout the data or not! This is really great for manual upgrade to the PE versions!
131
 
@@ -135,7 +147,7 @@ Sometimes a bug decides to rear its ugly head and when this happens, this is whe
135
  * Fix: Failed to work with non-ascii (e.g Arabic) characters.
136
  * Enhance: Viewing block info is now showing Shortcode using block 'name' instead of 'id'.
137
  * Enhance: Embedded Shortcode with its closing tag as the Shortcode content is now being used by the handler blocks.
138
- * Enhance: Revert block Shortcode 'force' parameter default value to 'true' therefoe allow using multiple Shortcode for the same block without setting 'force' attribute.
139
 
140
  = 6.0.13 =
141
  * Fix: CJT hijacks Plugins page after activate or deactivate a Plugin.
@@ -156,9 +168,9 @@ Sometimes a bug decides to rear its ugly head and when this happens, this is whe
156
 
157
  = 6.0.6 =
158
  * Fix: Conflict with other Plugins!
159
- * Fix: Javascript exception throwed when dismissing the install/upgrade notice.
160
  * Enhancement: Disallow (with user notice) upgrade/downgrade if the target version is not being supported, therefor saving user data!
161
- * Enhancement: Don't break down the site if manual upgrade/downgrage process is incompleted! Allow user to revert back manually or disable the Plugin.
162
  * Enhancement: E_ALL complain! Suppress all notices when WP_DEBUG set to true, allow better development, fast performance and error handling.
163
 
164
  = 6.0 =
@@ -193,7 +205,7 @@ Sometimes a bug decides to rear its ugly head and when this happens, this is whe
193
  * Each block has an Information metabox (Author, created date, modification date, and Shortcode).
194
  * Create new block with initial properties (state, name and position).
195
  * Internal error detection routine for detecting Ajax errors that may have happened away from users view.
196
- * There is an extensive CJT User Manual PDF file attached in the /docs folder. You can also download this file through the website - click for [CJT V6 CE User Manual](http://css-javascript-toolbox.com/css-javascript-toolbox-free)
197
  * Use of a separated Dashboard item to embrace all CJT plugin pages.
198
  * Added separate installer and upgrade pages for both CJT v0.3 and v0.8 to allow watching of the installation processes.
199
  * Added an uninstaller to completely erase all CJT data from the system.
@@ -225,19 +237,19 @@ Sometimes a bug decides to rear its ugly head and when this happens, this is whe
225
  Its recommended to backup your database before upgrading.
226
  Templates feature/system is not available anymore! Please backup your templates data manually before upgrading.
227
  You can do this by copying and pasting CSS and JS template data into a text editor and saving your text file.
228
- If you have any other third-party plugin or software integrated with the CJT plugin database, please note that the database structure has been completely changed in CJT V6 CE.
229
  Linked scripts are now obsolete! If you've linked scripts with any code blocks, then those blocks might stop working.
230
 
231
  = 0.3 =
232
  Its recommended to backup your database before upgrading.
233
  Templates feature/system is not available anymore! Please backup your templates data manually before upgrading.
234
- You can do this by copying and pasting CSS and JS template data into a text editor and saving your text file. If you have any other third-party plugin or software integrated with the CJT plugin database, please note that the database structure has been completely changed in CJT V6 CE.
235
  Code block names will get changed as 'CSS & Javascript Block' phrase will be removed and replaced by 'Block' word.
236
  The double-slashes fix modules is now obsolete! If you have extra slashes (double slashes) in your code block you have to clean it manually yourself or upgrade to version 0.8 to fix them first!
237
 
238
  == Credits ==
239
 
240
- Copyright (c) 2013, Wipeout Media.
241
 
242
  This program is free software; you can redistribute it and/or
243
  modify it under the terms of the GNU General Public License
5
  Tags: plug, customise, style, scripts, hack, Wordpress, contribute, enhancing, HTML, CSS, Javascript, PHP, execute, display, output, header, footer, apply, requests, match, hook, run
6
  License: GPLv2 or later
7
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
8
+ Requires at least: 3.6
9
+ Tested up to: 3.6.1
10
+ Stable tag: 6.1
11
 
12
  Easily add custom CSS, JavaScript, HTML and PHP code to unique CJT code blocks and assign them wherever you want.
13
 
14
  == Description ==
15
+ CSS & JavaScript Toolbox is a code management plugin that gives you the tools to easily and safely modify or extend the functionality and appearance of your WordPress-powered website. You do this by adding custom code directly into unique code blocks and assign them to pages, posts, custom posts, categories, URLs, expressions, and loads more!
16
 
17
+ [youtube http://www.youtube.com/watch?v=Br4tVp6QFwA]
18
 
19
+ = Upgrade to CJT Pro =
20
+ You will get more power and flexibility, better security, and a lot more features, tools and options in CJT Pro. Features in Pro include: a code auto completion system (for CSS, JavaScript, PHP, and HTML), code block metabox support for Pages/Posts, heaps of editor tools, external script support, a powerful code template manager, script package installer, and the list goes on. [Click here to see all the benefits of CJT Pro](http://css-javascript-toolbox.com/css-javascript-toolbox-pro)
21
 
22
  = Who is this plugin for? =
23
+ This plugin is primarily intended for WordPress website developers and designers. But that is not to say that others would not be able to get use out of it. CJT can be used for a lot of things from teachers, students learning to code, to mum and dad bloggers wanting to add Google Analytics or other scripts to their website.
24
 
25
  = Have you ever thought? =
26
  - Wouldn't it be great to have an easy way to plug your code into a Wordpress installation without having to know how to create a Wordpress plugin OR having to modify files through FTP, etc?
49
  = Scripts, scripts, glorious scripts! =
50
  If you would like to learn how to use our plugin with some script examples, please visit our [Scripts page](http://css-javascript-toolbox.com/category/scripts). If you are a script author and would like to get more exposure for your scripts, please submit your scripts to us. Click [Submit a Script](http://css-javascript-toolbox.com/submit-a-script) to find out more.
51
 
52
+ = Follow the Developments =
53
+ If you like to know more about the development state, issues and to track future versions code please follow us on [GitHub Plugin repository](https://github.com/css-javascript-toolbox/css-javascript-toolbox-plugin).
54
 
55
  = Thank You =
56
  We would like to take this opportunity to thank you for installing our WordPress plugin. We will continue to develop it further, making it bigger and better with awesome updates in the near future. If you like this plugin and not only find it useful, but appreciate the huge amount of work that has gone into creating it, you can certainly support us in a number of ways, including:
123
 
124
  == Screenshots ==
125
 
126
+ 1. Main CJT Free code block screen
127
  2. CJT Shortcode button
128
 
129
  == Changelog ==
130
+
131
+ = 6.1 =
132
+ * Enhance: Initially don't load Block assignment panel items: Speed up Blocks page loading time when its initially opened, also affect the browser performance as the items is not loaded or rendered before its required.
133
+ * Enhance: Initially don't load Block code for the closed/minimised Blocks: Loading those Blocks will be done through AJAX once the Block is opened by user.
134
+ * Enhance: The ability to 'Cancel' revision mode and get back to the normal mode without refreshing the whole page.
135
+ * Update: Animate Block 'Save' button for not-saved Blocks.
136
+ * Update: The Assignment-Panel is now Loads the assigned items only when enter the revision and backup modes.
137
+ * Update: Set assignment-Panel Advanced-TAB as the default active TAB.
138
+ * Add: Few helper links to the CJT official website at the top of the Blocks page.
139
+ * Fix: Block 'Save' and 'Save All Changes' buttons are stay enabled after updating Block Assignment-Panel items and revert them back again. The buttons is enabled even if the Block content has not been changed.
140
+
141
  = 6.0.15 =
142
  * Enhance: Uninstaller is now configurable so that admin can specify is to wipeout the data or not! This is really great for manual upgrade to the PE versions!
143
 
147
  * Fix: Failed to work with non-ascii (e.g Arabic) characters.
148
  * Enhance: Viewing block info is now showing Shortcode using block 'name' instead of 'id'.
149
  * Enhance: Embedded Shortcode with its closing tag as the Shortcode content is now being used by the handler blocks.
150
+ * Enhance: Revert block Shortcode 'force' parameter default value to 'true' therefore allow using multiple Shortcode for the same block without setting 'force' attribute.
151
 
152
  = 6.0.13 =
153
  * Fix: CJT hijacks Plugins page after activate or deactivate a Plugin.
168
 
169
  = 6.0.6 =
170
  * Fix: Conflict with other Plugins!
171
+ * Fix: Javascript exception thrown when dismissing the install/upgrade notice.
172
  * Enhancement: Disallow (with user notice) upgrade/downgrade if the target version is not being supported, therefor saving user data!
173
+ * Enhancement: Don't break down the site if manual upgrade/downgrade process is uncompleted! Allow user to revert back manually or disable the Plugin.
174
  * Enhancement: E_ALL complain! Suppress all notices when WP_DEBUG set to true, allow better development, fast performance and error handling.
175
 
176
  = 6.0 =
205
  * Each block has an Information metabox (Author, created date, modification date, and Shortcode).
206
  * Create new block with initial properties (state, name and position).
207
  * Internal error detection routine for detecting Ajax errors that may have happened away from users view.
208
+ * There is an extensive CJT User Manual PDF file attached in the /docs folder. You can also download this file through the website - click for [CJT Free User Manual](http://css-javascript-toolbox.com/css-javascript-toolbox-free)
209
  * Use of a separated Dashboard item to embrace all CJT plugin pages.
210
  * Added separate installer and upgrade pages for both CJT v0.3 and v0.8 to allow watching of the installation processes.
211
  * Added an uninstaller to completely erase all CJT data from the system.
237
  Its recommended to backup your database before upgrading.
238
  Templates feature/system is not available anymore! Please backup your templates data manually before upgrading.
239
  You can do this by copying and pasting CSS and JS template data into a text editor and saving your text file.
240
+ If you have any other third-party plugin or software integrated with the CJT plugin database, please note that the database structure has been completely changed in CJT Free.
241
  Linked scripts are now obsolete! If you've linked scripts with any code blocks, then those blocks might stop working.
242
 
243
  = 0.3 =
244
  Its recommended to backup your database before upgrading.
245
  Templates feature/system is not available anymore! Please backup your templates data manually before upgrading.
246
+ You can do this by copying and pasting CSS and JS template data into a text editor and saving your text file. If you have any other third-party plugin or software integrated with the CJT plugin database, please note that the database structure has been completely changed in CJT Free.
247
  Code block names will get changed as 'CSS & Javascript Block' phrase will be removed and replaced by 'Block' word.
248
  The double-slashes fix modules is now obsolete! If you have extra slashes (double slashes) in your code block you have to clean it manually yourself or upgrade to version 0.8 to fix them first!
249
 
250
  == Credits ==
251
 
252
+ Copyright © 2013, Wipeout Media.
253
 
254
  This program is free software; you can redistribute it and/or
255
  modify it under the terms of the GNU General Public License
tables/block-pins.php CHANGED
@@ -8,9 +8,6 @@
8
  */
9
  defined('ABSPATH') or die("Access denied");
10
 
11
- // CJTTable class.
12
- require_once CJTOOLBOX_FRAMEWORK . '/db/mysql/table.inc.php';
13
-
14
  /**
15
  *
16
  */
@@ -44,14 +41,25 @@ class CJTBlockPinsTable extends CJTTable {
44
  * put your comment there...
45
  *
46
  * @param mixed $ids
 
47
  */
48
- public function get($ids = array()) {
49
- $where = '';
50
- $ids = (array) $ids; // May be single integer.
 
 
 
51
  if (!empty($ids)) {
52
  $ids = implode(',', $ids);
53
- $where = " WHERE `blockId` IN ({$ids})";
54
  }
 
 
 
 
 
 
 
55
  $query = "SELECT * FROM {$this->table}{$where};";
56
  return $this->dbDriver->select($query, OBJECT);
57
  }
@@ -63,17 +71,20 @@ class CJTBlockPinsTable extends CJTTable {
63
  * @param mixed $pins
64
  */
65
  public function insert($blockId, $pins) {
 
66
  $rows = array();
67
- if (!empty($pins)) {
68
- foreach ($pins as $pin => $values) {
69
- foreach ($values as $value) {
70
- $rows[] = "({$blockId},'{$pin}', {$value})";
71
- }
72
  }
 
 
 
73
  $rows = implode(',', $rows);
74
  $query = "INSERT INTO {$this->table} (`blockId`, `pin`, `value`) VALUES {$rows};";
75
  $this->dbDriver->insert($query);
76
  }
 
77
  }
78
 
79
  /**
8
  */
9
  defined('ABSPATH') or die("Access denied");
10
 
 
 
 
11
  /**
12
  *
13
  */
41
  * put your comment there...
42
  *
43
  * @param mixed $ids
44
+ * @param mixed $condition
45
  */
46
+ public function get($ids = array(), $condition = null) {
47
+ // Initialize.
48
+ $where = array();
49
+ // May be single integer.
50
+ $ids = (array) $ids;
51
+ // Retrieve specific list of IDs.
52
  if (!empty($ids)) {
53
  $ids = implode(',', $ids);
54
+ $where[] = "`blockId` IN ({$ids})";
55
  }
56
+ // Get CONDITIONS expression.
57
+ if ($condition !== null) {
58
+ $where = array_merge($where, $this->prepareQueryParameters($condition));
59
+ }
60
+ // Use WHERE CLAUSE only if there is Ids or Condition specified.
61
+ $where = !empty($where) ? (' WHERE ' . implode(' AND ', $where)) : '';
62
+ // Get result.
63
  $query = "SELECT * FROM {$this->table}{$where};";
64
  return $this->dbDriver->select($query, OBJECT);
65
  }
71
  * @param mixed $pins
72
  */
73
  public function insert($blockId, $pins) {
74
+ // Initialize.
75
  $rows = array();
76
+ foreach (((array) $pins) as $pin => $values) {
77
+ foreach ($values as $value) {
78
+ $rows[] = "({$blockId},'{$pin}', {$value})";
 
 
79
  }
80
+ }
81
+ // Execute only if there is at least one row to insert.
82
+ if (!empty($rows)) {
83
  $rows = implode(',', $rows);
84
  $query = "INSERT INTO {$this->table} (`blockId`, `pin`, `value`) VALUES {$rows};";
85
  $this->dbDriver->insert($query);
86
  }
87
+ // Chaining.
88
  }
89
 
90
  /**
tables/blocks.php CHANGED
@@ -55,7 +55,7 @@ class CJTBlocksTable extends CJTTable {
55
  * @deprecated @param mixed $returnType
56
  * @param mixed $orderBy
57
  */
58
- public function get($ids = array(), $fields = array('*'), $filters = array(), $returnType = OBJECT_K, $orderBy = array()) {
59
  // Warn if $returnTypes is used
60
  if ($returnType != OBJECT_K) {
61
  die('Warning! Using $returnType with value other than OBJECT_K from the caller!!!');
@@ -69,8 +69,10 @@ class CJTBlocksTable extends CJTTable {
69
  $where[] = " `id` IN ({$ids})";
70
  }
71
  // Filter by backup name.
72
- $where[] = (!isset($filters['backupId']) ? ' `backupId` IS NULL' : " `backupId` = {$filters['backupId']}");
73
- unset($filters['backupId']);
 
 
74
  // Filter by parent.
75
  if (isset($filters['parent'])) {
76
  $filters['parent'] = implode(',', ((array) $filters['parent']));
55
  * @deprecated @param mixed $returnType
56
  * @param mixed $orderBy
57
  */
58
+ public function get($ids = array(), $fields = array('*'), $filters = array(), $returnType = OBJECT_K, $orderBy = array(), $useDefaultBackupFltr = true) {
59
  // Warn if $returnTypes is used
60
  if ($returnType != OBJECT_K) {
61
  die('Warning! Using $returnType with value other than OBJECT_K from the caller!!!');
69
  $where[] = " `id` IN ({$ids})";
70
  }
71
  // Filter by backup name.
72
+ if ($useDefaultBackupFltr) {
73
+ $where[] = (!isset($filters['backupId']) ? ' `backupId` IS NULL' : " `backupId` = {$filters['backupId']}");
74
+ unset($filters['backupId']);
75
+ }
76
  // Filter by parent.
77
  if (isset($filters['parent'])) {
78
  $filters['parent'] = implode(',', ((array) $filters['parent']));
views/backups/manager/public/css/backups.css CHANGED
@@ -12,4 +12,4 @@ span.backup-name {font-weight: bold;}
12
  #backups-list li.alt-backup-row { background-color: #EFEFEF; }
13
  #backups-list li span.backup-tasks { float: right; }
14
  .loading { border: none; }
15
- .link-loading { height: 10px; display: inline-block; }
12
  #backups-list li.alt-backup-row { background-color: #EFEFEF; }
13
  #backups-list li span.backup-tasks { float: right; }
14
  .loading { border: none; }
15
+ .link-loading {top: 2px; height: 13px; display: inline-block; }
views/blocks/block/public/css/block.css CHANGED
@@ -88,7 +88,7 @@
88
  .block-toolbox a.state-active { background: url(../images/toolbox/active.png); }
89
  .block-toolbox a.state-inactive { background-image: url(../images/toolbox/inactive.png); }
90
  .block-toolbox a.cjttbl-save {
91
- background: url(../images/toolbox/save.png);
92
  background-position: left top !important;
93
  text-decoration: none;
94
  padding-left: 23px;
@@ -98,10 +98,29 @@
98
  width: 37px !important;
99
  height: 18px !important;
100
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
  .block-toolbox a.cjttbl-save.cjttbs-loading {
102
  top: -2px;
103
  background-position: center center;
104
  }
 
105
  .block-toolbox a.cjttbl-save.cjttbs-disabled {background: url(../images/toolbox/save-inactive.png); }
106
  .block-toolbox a.cjttbl-revisions { background-image: url(../images/toolbox/revisions.png); }
107
  .block-toolbox a.cjttbl-delete { background-image: url(../images/toolbox/delete.png); }
@@ -150,4 +169,4 @@ span.block-name {
150
  .jsblock select { width:155px; }
151
  .cjbutton { width:116px; height:24px; float:left; }
152
  .cjbutton a { height:24px; width:24px; text-indent:-999em; display:block; float:left; }
153
- .cjexample { clear:left; float:left; padding:5px 0 0; }
88
  .block-toolbox a.state-active { background: url(../images/toolbox/active.png); }
89
  .block-toolbox a.state-inactive { background-image: url(../images/toolbox/inactive.png); }
90
  .block-toolbox a.cjttbl-save {
91
+ background: url(../images/toolbox/save.gif);
92
  background-position: left top !important;
93
  text-decoration: none;
94
  padding-left: 23px;
98
  width: 37px !important;
99
  height: 18px !important;
100
  }
101
+ /* Restore revision toolbox buttons. */
102
+ .block-toolbox a.cjttblSW-restore {
103
+ background: url(../images/toolbox/restore.png);
104
+ width: 50px !important;
105
+ }
106
+ .block-toolbox a.cjttbl-cancel-restore {
107
+ background: url(../images/toolbox/cancel-restore.png);
108
+ background-position: left top !important;
109
+ text-decoration: none;
110
+ padding-left: 23px;
111
+ padding-top: 5px;
112
+ position: relative;
113
+ top: -9px;
114
+ width: 45px !important;
115
+ height: 18px !important;
116
+ margin-right: 10px !important;
117
+ }
118
+
119
  .block-toolbox a.cjttbl-save.cjttbs-loading {
120
  top: -2px;
121
  background-position: center center;
122
  }
123
+
124
  .block-toolbox a.cjttbl-save.cjttbs-disabled {background: url(../images/toolbox/save-inactive.png); }
125
  .block-toolbox a.cjttbl-revisions { background-image: url(../images/toolbox/revisions.png); }
126
  .block-toolbox a.cjttbl-delete { background-image: url(../images/toolbox/delete.png); }
169
  .jsblock select { width:155px; }
170
  .cjbutton { width:116px; height:24px; float:left; }
171
  .cjbutton a { height:24px; width:24px; text-indent:-999em; display:block; float:left; }
172
+ .cjexample { clear:left; float:left; padding:5px 0 0; }
views/blocks/block/public/images/toolbox/cancel-restore.png ADDED
Binary file
views/blocks/block/public/images/toolbox/restore.png ADDED
Binary file
views/blocks/block/public/images/toolbox/save.gif ADDED
Binary file
views/blocks/block/public/js/block/block.js CHANGED
@@ -7,38 +7,12 @@
7
  /**
8
  * Put CJTBlock class at global scope.
9
  */
10
- var CJTBlock;
11
 
12
  /**
13
  * JQuery wrapper for the CJTBlock class.
14
  */
15
  (function($) {
16
-
17
- /**
18
- * Blocks property that allowed to be read or write.
19
- *
20
- * flags:
21
- * - r : read.
22
- * - w : write.
23
- * - c : cookie.
24
- * - l : checkbox list.
25
- *
26
- * @var object
27
- */
28
- var properties = {
29
- name : {flags: 'rw', selector : 'input:hidden[name="cjtoolbox[{blockId}][name]"]'},
30
- editorLang : {flags: 'rwc'},
31
- pagesPanelToggleState : {flags: 'rwc'},
32
- location : {flags: 'rw', selector : 'input:hidden[name="cjtoolbox[{blockId}][location]"]'},
33
- state : {flags: 'rw', selector : 'input:hidden[name="cjtoolbox[{blockId}][state]"]'},
34
- code : {flags: 'rw', selector : 'div#editor-{blockId}'},
35
- links : {flags: 'rw', selector : 'textarea[name="cjtoolbox[{blockId}][links]"]'},
36
- expressions : {flags: 'rw', selector : 'textarea[name="cjtoolbox[{blockId}][expressions]"]'},
37
- pinPoint : {flags: 'rwl', selector : 'input:checkbox[name="cjtoolbox[{blockId}][pinPoint][]"]'},
38
- pages : {flags: 'rwl', selector : 'input:checkbox[name="cjtoolbox[{blockId}][pages][]"]'},
39
- posts : {flags: 'rwl', selector : 'input:checkbox[name="cjtoolbox[{blockId}][posts][]"]'},
40
- categories : {flags: 'rwl', selector : 'input:checkbox[name="cjtoolbox[{blockId}][categories][]"]'}
41
- };
42
 
43
  /**
44
  * Flags values.
@@ -57,7 +31,7 @@ var CJTBlock;
57
  * @version 6
58
  * @param DOMElement Block element.
59
  */
60
- CJTBlock = function(element) {
61
 
62
  /**
63
  *
@@ -66,6 +40,11 @@ var CJTBlock;
66
  */
67
  this.aceEditor = null;
68
 
 
 
 
 
 
69
  /**
70
  * Block JQuery object.
71
  *
@@ -81,26 +60,74 @@ var CJTBlock;
81
  this.id = 0;
82
 
83
  /**
 
84
  *
 
 
 
 
 
85
  *
86
- *
87
- *
88
- *
 
 
 
 
 
89
  */
90
- this.CJTBlock = function() {
91
- var block = this; // To be used inside each().
 
92
  this.box = $(element);
93
  this.id = parseInt(this.box.find('input:hidden[name="blocks[]"]').val())
 
94
  this.aceEditor = ace.edit('editor-' + this.id);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
  // Create bridge through "code" field
96
  // so that div element can set/get aceEditor real object.
 
97
  var codeDiv = $(this.property('code').selector).get(0);
98
  codeDiv.getValue = function() {
99
  return block.aceEditor.getSession().getValue();
100
  };
101
- codeDiv.setValue = function(value) {
102
- block.aceEditor.getSession().setValue(value)
103
- };
104
  }
105
 
106
  /**
@@ -110,77 +137,72 @@ var CJTBlock;
110
  * @return mixed
111
  */
112
  this.get = function(name, _default) {
113
- var value = null;
114
- // Just return the exists properties.
 
 
115
  if (this[name] != undefined) {
116
  value = this[name];
117
  }
118
- // Properties need to be fetched from HTML structure or from another JS objects.
119
- else {
120
- var property = this.property(name);
121
- // There are two types of properties, cookie and element.
122
- if (property.flag('c')) {
123
- // Get cookie value.
124
- var cookieName = name + '-' + this.id;
125
- value = $.cookies.get(cookieName);
126
- }
127
- else { // Not cookies, it may be saved throught JS object or inside HTML elements.
128
- // Custom implemetation.
129
- switch (name) {
130
- case 'code': // Code is throught ACE-Editor Object.
131
- value = this.aceEditor.getSession().getValue();
132
- break;
133
- default: // Get property value from html elements.
134
- var element = this.box.find(property.selector);
135
- switch (property.flag('l')) {
136
- // Custom implementation for reading checkboxes list.
137
- case true:
138
- value = [];
139
- element.each(
140
- function(index, element) {
141
- element = $(element);
142
- if (element.prop('checked')) {
143
- value.push(element.val());
144
- }
145
- }
146
- )
147
- break;
148
- default:
149
- value = element.val();
150
- break;
151
- }
152
- break;
153
- }
154
- }
155
- // If empty and _default is provided, return _default.
156
- if (!value && (_default != undefined)) {
157
- value = _default;
158
  }
159
  }
 
 
 
 
 
160
  return value;
161
  }
162
 
163
  /**
164
- *
165
- *
166
- *
167
- *
168
- *
169
  */
170
  this.getDIFields = function() {
171
- var fieldsNames = ['links', 'expressions', 'pinPoint', 'pages', 'posts', 'categories'];
172
- var diFieldsSelector = [];
173
- var diFields;
174
- var block = this; // To be used inside each().
175
- $.each(fieldsNames,
176
- function(index, field) {
177
- diFieldsSelector.push(block.property(field).selector);
178
- }
179
- );
180
- diFields = block.box.find(diFieldsSelector.join(','));
181
  return diFields;
182
  }
183
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
184
  /**
185
  * Get operation queue object for the block.
186
  *
@@ -206,76 +228,10 @@ var CJTBlock;
206
  * @return object Property selector object.
207
  */
208
  this.property = function(name) {
209
- if (properties[name] == undefined) {
210
- $.error('Property ' + name + ' is not found');
211
- }
212
- else {
213
- // Copy/Clone property object.
214
- var property = $.extend({}, properties[name]);
215
- // Add flag checker method to property object.
216
- property.flag = function(flag) {
217
- var flagIndex = this.flags.indexOf(flag);
218
- return (flagIndex == -1) ? false : true;
219
- };
220
- // Place block id in the selector.
221
- if (property.selector != undefined) {
222
- property.selector = property.selector.replace('{blockId}', this.id);
223
- // Implement set/get common interface through all fields.
224
- if (property.flag('l')) {
225
- property.setValue = function(values) {
226
- var fields = $(this.selector);
227
- // If values is integer then each bit represent single field value.
228
- if ($.isNumeric(values)) {
229
- var flag;
230
- var arrayValues = [];
231
- // Convert bit-map to array.
232
- for (weight = 0; weight < 32; weight++) {
233
- flag = Math.pow(2, weight);
234
- if (flag & values) {
235
- arrayValues.push(flag.toString(16));
236
- }
237
- }
238
- values = arrayValues;
239
- }
240
- else if (values == undefined) {
241
- // We need all fields to be unchecked is pin is not passed,
242
- values = [];
243
- }
244
- // Check/Uncheck fields.
245
- fields.each(
246
- function(index, field) {
247
- var field = $(field);
248
- var checked = (values.indexOf(field.val()) == -1) ? false : true;
249
- field.prop('checked', checked);
250
- // Fire change event so that
251
- // notification save change action can take place.
252
- field.change();
253
- }
254
- );
255
- };
256
- }
257
- else if (property.flag('c')) {
258
- property.setValue = function() {
259
-
260
- };
261
- }
262
- else {
263
- property.setValue = function(value) {
264
- var jNode = $(this.selector);
265
- var node = jNode.get(0);
266
- if (node.value == undefined) {
267
- node.setValue(value);
268
- }
269
- else {
270
- node.value = value;
271
- }
272
- // Fire change event so that
273
- // notification save change action can take place.
274
- jNode.change();
275
- };
276
- }
277
- }
278
- }
279
  return property;
280
  }
281
 
@@ -292,40 +248,34 @@ var CJTBlock;
292
  // return Dummy Promise object.
293
  var promise = CJTServer.getDeferredObject().promise();
294
  var property = this.property(name);
295
- // Check if the property is writable.
296
- if (!property.flag('w')) {
297
- $.error('Could not write to read-only property');
 
 
 
298
  }
299
  else {
300
- // There are two types of properties, cookie and element.
301
- if (property.flag('c')) {
302
- var expires = new Date((new Date()).getTime() + ((30 * 24 * 60 * 60) * 1000)); // Live for 1 month.
303
- // Set cookie value.
304
- var cookieName = name + '-' + this.id;
305
- $.cookies.set(cookieName, newValue, {expiresAt : expires});
306
- }
307
- else {
308
- // Get element value.
309
- var element = this.box.find(property.selector);
310
- var value = element.val();
311
- // Update only if not same.
312
- if ((newValue != undefined) && (value != newValue)) {
313
- // Update on the server.
314
- var data = {
315
- id : this.get('id'),
316
- property : name,
317
- value : newValue
318
- };
319
- // Save property at the server.
320
- queue = this.getOperationQueue(name);
321
- promise = queue.add(data)
322
- .success(
323
- function(rProperty) {
324
- // Change local value to new value.
325
- element.val(rProperty.value);
326
- }
327
- );
328
- }
329
  }
330
  }
331
  return promise;
@@ -381,26 +331,24 @@ var CJTBlock;
381
  * @return void
382
  */
383
  this.queueDIFields = function() {
384
- var dIFields = ['code', 'pinPoint', 'pages', 'posts', 'categories', 'links', 'expressions'];
 
385
  var queue = this.getOperationQueue('saveDIFields');
386
- var block = this; // To use inside .each().
387
  // For every field create queue request as a single property for the block.
388
- $.each(dIFields,
389
- function(index, property) {
390
  var field = {
391
- id : block.get('id'),
392
- property : property,
393
- value : block.get(property)
394
  };
395
  // Add to queue list.
396
  queue.add(field);
397
- }
398
  );
399
  }
400
 
401
- // Initialize object.
402
- this.CJTBlock();
403
-
404
  } // End class.
405
 
406
  })(jQuery);
7
  /**
8
  * Put CJTBlock class at global scope.
9
  */
10
+ var CJTBlockBase;
11
 
12
  /**
13
  * JQuery wrapper for the CJTBlock class.
14
  */
15
  (function($) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
  /**
18
  * Flags values.
31
  * @version 6
32
  * @param DOMElement Block element.
33
  */
34
+ CJTBlockBase = function() {
35
 
36
  /**
37
  *
40
  */
41
  this.aceEditor = null;
42
 
43
+ /**
44
+ *
45
+ */
46
+ this.blockPlugin = null;
47
+
48
  /**
49
  * Block JQuery object.
50
  *
60
  this.id = 0;
61
 
62
  /**
63
+ * Blocks property that allowed to be read or write.
64
  *
65
+ * flags:
66
+ * - r : read.
67
+ * - w : write.
68
+ * - c : cookie.
69
+ * - S : Save when block is saved.
70
  *
71
+ * @var object
72
+ */
73
+ this.properties = {};
74
+
75
+ /**
76
+ * put your comment there...
77
+ *
78
+ * @param element
79
  */
80
+ this.CJTBlockBase = function(blockPlugin, element, properties) {
81
+ // Initialize.
82
+ this.blockPlugin = blockPlugin;
83
  this.box = $(element);
84
  this.id = parseInt(this.box.find('input:hidden[name="blocks[]"]').val())
85
+ this.properties = {};
86
  this.aceEditor = ace.edit('editor-' + this.id);
87
+ // Define base properties.
88
+ properties.name = {om : new CJTBlockPropertyHTMLNodeOM(),
89
+ flags: 'rw',
90
+ selector : 'input:hidden[name="cjtoolbox[{blockId}][name]"]'};
91
+ properties.location = {om : new CJTBlockPropertyHTMLNodeOM(),
92
+ flags: 'rw',
93
+ selector : 'input:hidden[name="cjtoolbox[{blockId}][location]"]'};
94
+ properties.state = {om : new CJTBlockPropertyHTMLNodeOM(),
95
+ flags: 'rw',
96
+ selector : 'input:hidden[name="cjtoolbox[{blockId}][state]"]'};
97
+ properties.code = {om : new CJTBlockPropertyACEEditor(),
98
+ flags: 'rws',
99
+ selector : 'div#editor-{blockId}'};
100
+ properties.editorLang = {flags: 'rwc'};
101
+ properties.pagesPanelToggleState = {flags: 'rwc'};
102
+ // Initialize ALL (BASE, DERIVDED) properties.
103
+ $.each(properties, $.proxy(
104
+ function(name, propertyDefinition) {
105
+ // Add flag checker method to property object.
106
+ propertyDefinition.flag = function(flag) {
107
+ var flagIndex = this.flags.indexOf(flag);
108
+ return (flagIndex == -1) ? false : true;
109
+ };
110
+ // Add name to the property object.
111
+ propertyDefinition.name = name;
112
+ // Place block id in the selector.
113
+ if (propertyDefinition.selector != undefined) {
114
+ propertyDefinition.selector = propertyDefinition.selector.replace('{blockId}', this.id);
115
+ }
116
+ // If OM is supported bind it.
117
+ if (propertyDefinition.om !== undefined) {
118
+ propertyDefinition.om.bind(this.blockPlugin, propertyDefinition);
119
+ }
120
+ // Cache property object.
121
+ this.properties[name] = propertyDefinition;
122
+ }, this)
123
+ );
124
  // Create bridge through "code" field
125
  // so that div element can set/get aceEditor real object.
126
+ var block = this;
127
  var codeDiv = $(this.property('code').selector).get(0);
128
  codeDiv.getValue = function() {
129
  return block.aceEditor.getSession().getValue();
130
  };
 
 
 
131
  }
132
 
133
  /**
137
  * @return mixed
138
  */
139
  this.get = function(name, _default) {
140
+ // Initialize.
141
+ var value = null;
142
+ var property = this.property(name);
143
+ // Check member variables first.
144
  if (this[name] != undefined) {
145
  value = this[name];
146
  }
147
+ // There are two types of properties, cookie and element.
148
+ else if (property.flag('c')) {
149
+ // Get cookie value.
150
+ var cookieName = name + '-' + this.id;
151
+ value = $.cookies.get(cookieName);
152
+ }
153
+ else { // Not cookies, it may be saved throught JS object or inside HTML elements.
154
+ // Custom implemetation.
155
+ switch (name) {
156
+ case 'code': // Code is throught ACE-Editor Object.
157
+ value = this.aceEditor.getSession().getValue();
158
+ break;
159
+ default: // Get property value from html elements.
160
+ value = property.om.get();
161
+ break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
162
  }
163
  }
164
+ // If empty and _default is provided, return _default.
165
+ if (!value && (_default != undefined)) {
166
+ value = _default;
167
+ }
168
+ // Returns
169
  return value;
170
  }
171
 
172
  /**
173
+ *
 
 
 
 
174
  */
175
  this.getDIFields = function() {
176
+ // Initialize.
177
+ var diFields = null;
178
+ // Query DIFields selectors nodes.
179
+ diFields = this.box.find(this.getDIProperties().selector.join(','));
180
+ // Returns diFields
 
 
 
 
 
181
  return diFields;
182
  }
183
 
184
+ /**
185
+ *
186
+ */
187
+ this.getDIProperties = function() {
188
+ // Initialize.
189
+ var diProperties = {selector : [], list : {}};
190
+ // Collect DIFields from the properties list.
191
+ $.each(this.properties, $.proxy(
192
+ function(name, property) {
193
+ // All fields with 's' flag is a DIField.
194
+ if (property.flag('s')) {
195
+ // Add property to the list.
196
+ diProperties.list[name] = property;
197
+ // Add the selector as well.
198
+ diProperties.selector.push(property.selector);
199
+ }
200
+ }, this)
201
+ );
202
+ // Return DIProperties.
203
+ return diProperties;
204
+ }
205
+
206
  /**
207
  * Get operation queue object for the block.
208
  *
228
  * @return object Property selector object.
229
  */
230
  this.property = function(name) {
231
+ // Get property object from the cache.
232
+ var property = this.properties[name];
233
+ // Returns property cached object used to
234
+ // get and set property values.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
235
  return property;
236
  }
237
 
248
  // return Dummy Promise object.
249
  var promise = CJTServer.getDeferredObject().promise();
250
  var property = this.property(name);
251
+ // There are two types of properties, cookie and element.
252
+ if (property.flag('c')) {
253
+ var expires = new Date((new Date()).getTime() + ((30 * 24 * 60 * 60) * 1000)); // Live for 1 month.
254
+ // Set cookie value.
255
+ var cookieName = name + '-' + this.id;
256
+ $.cookies.set(cookieName, newValue, {expiresAt : expires});
257
  }
258
  else {
259
+ // Get element value.
260
+ var element = this.box.find(property.selector);
261
+ var value = element.val();
262
+ // Update only if not same.
263
+ if ((newValue != undefined) && (value != newValue)) {
264
+ // Update on the server.
265
+ var data = {
266
+ id : this.get('id'),
267
+ property : name,
268
+ value : newValue
269
+ };
270
+ // Save property at the server.
271
+ queue = this.getOperationQueue(name);
272
+ promise = queue.add(data)
273
+ .success(
274
+ function(rProperty) {
275
+ // Change local value to new value.
276
+ element.val(rProperty.value);
277
+ }
278
+ );
 
 
 
 
 
 
 
 
 
279
  }
280
  }
281
  return promise;
331
  * @return void
332
  */
333
  this.queueDIFields = function() {
334
+ // Initialize.
335
+ var dIFields = this.getDIProperties().list;
336
  var queue = this.getOperationQueue('saveDIFields');
337
+ var blockId = this.get('id');
338
  // For every field create queue request as a single property for the block.
339
+ $.each(dIFields, $.proxy(
340
+ function(name) {
341
  var field = {
342
+ id : blockId,
343
+ property : name,
344
+ value : this.get(name)
345
  };
346
  // Add to queue list.
347
  queue.add(field);
348
+ }, this)
349
  );
350
  }
351
 
 
 
 
352
  } // End class.
353
 
354
  })(jQuery);
views/blocks/block/public/js/blockproperty/blockproperty.js ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ *
3
+ */
4
+
5
+ var CJTBlockPropertyHTMLNodeOM;
6
+ var CJTBlockPropertyACEEditor;
7
+
8
+ /**
9
+ *
10
+ */
11
+ (function($) {
12
+
13
+ /**
14
+ * put your comment there...
15
+ *
16
+ */
17
+ CJTBlockPropertyHTMLNodeOM = function() {
18
+
19
+ /**
20
+ * put your comment there...
21
+ *
22
+ */
23
+ var block = null;
24
+
25
+ /**
26
+ * put your comment there...
27
+ *
28
+ */
29
+ var property = null;
30
+
31
+ /**
32
+ *
33
+ */
34
+ this.bind = function(blk, prprty) {
35
+ // Bind to property object.
36
+ block = blk;
37
+ property = prprty;
38
+ }
39
+
40
+ /**
41
+ *
42
+ */
43
+ this.get = function() {
44
+ // Initialize.
45
+ var mdlBlock = block.block;
46
+ // Get the value.
47
+ var element = mdlBlock.box.find(property.selector);
48
+ value = element.val();
49
+ // Returns
50
+ return value;
51
+ }
52
+
53
+ /**
54
+ *
55
+ */
56
+ this.getValueCache = function() {
57
+ return this.get();
58
+ }
59
+
60
+ /**
61
+ *
62
+ */
63
+ this.setValue = function(value) {
64
+ // Initialize.
65
+ var mdlBlock = block.block;
66
+ // Get the value.
67
+ var element = mdlBlock.box.find(property.selector);
68
+ element.val(value);
69
+ }
70
+
71
+ }
72
+
73
+
74
+ /**
75
+ * put your comment there...
76
+ *
77
+ */
78
+ CJTBlockPropertyACEEditor = function() {
79
+
80
+ /**
81
+ * put your comment there...
82
+ *
83
+ */
84
+ var block = null;
85
+
86
+ /**
87
+ * put your comment there...
88
+ *
89
+ */
90
+ var property = null;
91
+
92
+ /**
93
+ *
94
+ */
95
+ this.bind = function(blk, prprty) {
96
+ // Bind to property object.
97
+ block = blk;
98
+ property = prprty;
99
+ }
100
+
101
+ /**
102
+ *
103
+ */
104
+ this.get = function() {
105
+ return block.block.aceEditor.getSession().getValue();
106
+ }
107
+
108
+ /**
109
+ *
110
+ */
111
+ this.getValueCache = function() {
112
+ return this.get();
113
+ }
114
+
115
+ /**
116
+ *
117
+ */
118
+ this.setValue = function(value) {
119
+ block.block.aceEditor.getSession().setValue(value);
120
+ }
121
+
122
+ }
123
+
124
+ })(jQuery);
views/blocks/block/public/js/jquery.block/jquery.block.js CHANGED
@@ -9,6 +9,83 @@
9
  */
10
  (function($) {
11
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  /**
13
  * Default block features and options.
14
  *
@@ -17,7 +94,7 @@
17
  var defaultOptions = {
18
  showObjectsPanel : true,
19
  calculatePinPoint : 1,
20
- copy : {fields : ['code', 'links', 'expressions', 'pages', 'posts', 'categories', 'pinPoint']}
21
  };
22
 
23
  /**
@@ -72,6 +149,11 @@
72
  */
73
  this.features;
74
 
 
 
 
 
 
75
  /**
76
  *
77
  *
@@ -99,6 +181,11 @@
99
  *
100
  */
101
  this._oncontentchanged = function(event) {
 
 
 
 
 
102
  var element;
103
  var id; // Give every field an id for tracing change.
104
  var newValue; // Field new value.
@@ -155,6 +242,11 @@
155
  *
156
  */
157
  this._ondisplayrevisions = function() {
 
 
 
 
 
158
  var revisionsFormParams = {
159
  id : this.block.get('id'),
160
  width : 300,
@@ -163,6 +255,7 @@
163
  };
164
  var url = CJTBlocksPage.server.getRequestURL('block', 'get_revisions', revisionsFormParams);
165
  tb_show(CJTJqueryBlockI18N.blockRevisionsDialogTitle, url);
 
166
  }
167
 
168
  /**
@@ -246,7 +339,40 @@
246
  *
247
  */
248
  this._onpostboxopened = function() {
 
 
 
249
  this.block.aceEditor.resize();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
250
  }
251
 
252
  /**
@@ -263,7 +389,7 @@
263
  // Return REsolved Dummy Object for standarizing sake!
264
  return CJTBlocksPage.server.getDeferredObject().resolve().promise();
265
  }
266
- // Queue User Direct Interact fields (code, posts, categories, links, expressions etc...).
267
  var data = {calculatePinPoint : this.features.calculatePinPoint, createRevision : 1};
268
  // Push DiFields inside Ajax queue.
269
  this.block.queueDIFields();
@@ -287,8 +413,12 @@
287
  this.cjtSyncInputField();
288
  }
289
  );
 
 
290
  // Tell blocks page that block is saved and has not changed yet.
291
  CJTBlocksPage.blockContentChanged(this.block.id, false);
 
 
292
  }, this)
293
  )
294
  .error($.proxy(
@@ -396,23 +526,6 @@
396
  );
397
  }
398
 
399
- /**
400
- *
401
- *
402
- *
403
- *
404
- */
405
- this.copy = function(data) {
406
- var properties = this.features.copy.fields;
407
- $.each(properties, $.proxy(
408
- function(index, name) {
409
- var property = this.block.property(name);
410
- // Use setValue Fields Common Setter Interface (FCSI) impleneted by CJTBlock.
411
- property.setValue(data[name]);
412
- }, this)
413
- );
414
- }
415
-
416
  /**
417
  *
418
  *
@@ -450,8 +563,10 @@
450
  */
451
  this.initCJTPluginBase = function(node, args) {
452
  // Initialize object properties!
453
- this.block = new CJTBlock(node)
454
  this.features = $.extend(defaultOptions, args);
 
 
455
  // Load commonly used elements.
456
  this.elements = {};
457
  $.each(autoLoadElements, $.proxy(
@@ -462,7 +577,7 @@
462
  // Initialize User Interface.
463
  this.initUI();
464
  // Prepare input elements for notifying user changes.
465
- this.notifySavingChangesInit();
466
  // Set Plugin options.
467
  this.setOptions();
468
  }
@@ -488,13 +603,9 @@
488
  model.box.find(selector).click(handler);
489
  }, this)
490
  );
491
- // remove code textarea and replace it with ace editor.
492
- var initCode = model.box.find('textarea.initCode');
493
  model.aceEditor.setTheme('ace/theme/chrome');
494
- model.aceEditor.getSession().setValue(initCode.val());
495
  model.aceEditor.setShowPrintMargin(false);
496
- // Remove textarea with code transfered from server.
497
- initCode.remove();
498
  // Activate toolbox.
499
  this.toolbox = model.box.find('.block-toolbox').CJTToolBox({
500
  context : this,
@@ -548,67 +659,6 @@
548
  // need sometime to be ready for display.
549
  model.box.css({display : 'block'}).addClass('cjt-block');
550
  }
551
-
552
- /**
553
- *
554
- * For now it initialize fields for notifying user changes.
555
- *
556
- *
557
- *
558
- */
559
- this.notifySavingChangesInit = function() {
560
- var model = this.block;
561
- var aceEditor = model.aceEditor;
562
- var fields = model.getDIFields();
563
- // Initialize vars.
564
- this.changes = [];
565
- // Create common interface for ace editor to
566
- // be accessed like other HTML elements.
567
- aceEditor.type = 'aceEditor'; // Required for _oncontentchanged to behave correctly.
568
- /**
569
- * Bind method for bind events like HTML Elements.
570
- */
571
- aceEditor.bind = function(e, h) {
572
- this.getSession().doc.on(e, h);
573
- }
574
- /**
575
- * Method to get hash copy from stored content.
576
- */
577
- aceEditor.cjtSyncInputField = function() {
578
- this.cjtBlockSyncValue = hex_md5(this.getSession().getValue());
579
- }
580
- // Hack jQuery Object by pushing
581
- // ace Editor into fields list, increase length by 1.
582
- fields[fields.length++] = aceEditor;
583
- // For all fields call cjtSyncInputField and give a unique id.
584
- $.each(fields, $.proxy(
585
- function(fieldId, field) {
586
- // Assign weight number used to identify the field.
587
- field.cjtBlockFieldId = fieldId;
588
- // Create default cjtSyncInputField method if not exists.
589
- if (field.cjtSyncInputField == undefined) {
590
- if (field.type == 'checkbox') {
591
- field.cjtSyncInputField = function() {
592
- this.cjtBlockSyncValue = $(this).prop('checked');
593
- }
594
- }
595
- else {
596
- field.cjtSyncInputField = function() {
597
- this.cjtBlockSyncValue = this.value;
598
- }
599
- }
600
- // Create interface to "bind" too.
601
- field.bind = function(e, h) {
602
- $(this).bind(e, h);
603
- }
604
- }
605
- // Sync field.
606
- field.cjtSyncInputField();
607
- // Bind to change event.
608
- field.bind('change', $.proxy(this._oncontentchanged, this));
609
- }, this)
610
- );
611
- }
612
 
613
  /**
614
  *
@@ -629,15 +679,23 @@
629
  editorCommands.addCommands(commands);
630
  }
631
 
 
 
 
 
 
 
 
 
 
 
632
  /**
633
  * Change Block options.
634
  *
635
  * NOT IMPLEMENTED YET.
636
  *
637
  */
638
- this.setOptions = function() {
639
-
640
- }
641
 
642
  /*
643
  *
@@ -651,7 +709,8 @@
651
  this.toolbox.jToolbox.hide();
652
  // Disable all fields.
653
  this.enable(false);
654
- break;
 
655
  default:
656
  // Nothing for now
657
  break;
9
  */
10
  (function($) {
11
 
12
+ /**
13
+ *
14
+ */
15
+ var notifySaveChangesProto = function(block) {
16
+
17
+ /**
18
+ * put your comment there...
19
+ *
20
+ * @param block
21
+ */
22
+ this.initDIFields = function() {
23
+ // Initialize notification saqve change singlton object.
24
+ block.changes = [];
25
+ // Initialize vars.
26
+ var model = block.block;
27
+ var aceEditor = model.aceEditor;
28
+ var fields = model.getDIFields();
29
+ // Create common interface for ace editor to
30
+ // be accessed like other HTML elements.
31
+ aceEditor.type = 'aceEditor'; // Required for _oncontentchanged to behave correctly.
32
+ /**
33
+ * Bind method for bind events like HTML Elements.
34
+ */
35
+ aceEditor.bind = function(e, h) {
36
+ this.getSession().doc.on(e, h);
37
+ }
38
+ /**
39
+ * Method to get hash copy from stored content.
40
+ */
41
+ aceEditor.cjtSyncInputField = function() {
42
+ this.cjtBlockSyncValue = hex_md5(this.getSession().getValue());
43
+ }
44
+ // Hack jQuery Object by pushing
45
+ // ace Editor into fields list, increase length by 1.
46
+ fields[fields.length++] = aceEditor;
47
+ // For all fields call cjtSyncInputField and give a unique id.
48
+ $.each(fields, $.proxy(
49
+ function(index, field) {
50
+ this.initElement(field);
51
+ }, this)
52
+ );
53
+ // Chaining.
54
+ return this;
55
+ },
56
+
57
+ /**
58
+ * put your comment there...
59
+ *
60
+ * @param element
61
+ */
62
+ this.initElement = function(field) {
63
+ // Assign weight number used to identify the field.
64
+ field.cjtBlockFieldId = CJTBlocksPage.blocks.getUFI();
65
+ // Create default cjtSyncInputField method if not exists.
66
+ if (field.cjtSyncInputField == undefined) {
67
+ if (field.type == 'checkbox') {
68
+ field.cjtSyncInputField = function() {
69
+ this.cjtBlockSyncValue = $(this).prop('checked');
70
+ }
71
+ }
72
+ else {
73
+ field.cjtSyncInputField = function() {
74
+ this.cjtBlockSyncValue = this.value;
75
+ }
76
+ }
77
+ // Create interface to "bind" too.
78
+ field.bind = function(e, h) {
79
+ $(this).bind(e, h);
80
+ }
81
+ }
82
+ // Sync field.
83
+ field.cjtSyncInputField();
84
+ // Bind to change event.
85
+ field.bind('change', $.proxy(block._oncontentchanged, block));
86
+ }
87
+ };
88
+
89
  /**
90
  * Default block features and options.
91
  *
94
  var defaultOptions = {
95
  showObjectsPanel : true,
96
  calculatePinPoint : 1,
97
+ restoreRevision : {fields : ['code']}
98
  };
99
 
100
  /**
149
  */
150
  this.features;
151
 
152
+ /**
153
+ *
154
+ */
155
+ this.internalChanging = false;
156
+
157
  /**
158
  *
159
  *
181
  *
182
  */
183
  this._oncontentchanged = function(event) {
184
+ // Dont process internal changes.
185
+ if (this.internalChanging) {
186
+ return;
187
+ }
188
+ // Initialize.
189
  var element;
190
  var id; // Give every field an id for tracing change.
191
  var newValue; // Field new value.
242
  *
243
  */
244
  this._ondisplayrevisions = function() {
245
+ // Restore revision only when block is opened.
246
+ if (this.block.box.hasClass('closed')) {
247
+ return false;
248
+ }
249
+ // Initialize form request.
250
  var revisionsFormParams = {
251
  id : this.block.get('id'),
252
  width : 300,
255
  };
256
  var url = CJTBlocksPage.server.getRequestURL('block', 'get_revisions', revisionsFormParams);
257
  tb_show(CJTJqueryBlockI18N.blockRevisionsDialogTitle, url);
258
+ return false;
259
  }
260
 
261
  /**
339
  *
340
  */
341
  this._onpostboxopened = function() {
342
+ // Initialize.
343
+ var blockId = this.block.get('id');
344
+ // Update ACE Editor region.
345
  this.block.aceEditor.resize();
346
+ // Load block code if not initially-loaded.
347
+ var aceEditor = this.block.aceEditor;
348
+ var jEditor = $(aceEditor.container);
349
+ if (!jEditor.hasClass('initially-loaded')) {
350
+ // Hold-on notification changes component.
351
+ this.internalChanging = true;
352
+ // Show loading state.
353
+ aceEditor.getSession().setValue('Loading...');
354
+ this.block.aceEditor.setReadOnly(true);
355
+ // Load code.
356
+ var request = {filter : {
357
+ field : 'id',
358
+ value : blockId},
359
+ returns : ['code']
360
+ };
361
+ CJTBlocksPage.server.send('block', 'getBlockBy', request)
362
+ .success($.proxy(
363
+ function(response) {
364
+ // Load code.
365
+ aceEditor.getSession().setValue(response.code);
366
+ this.internalChanging = false;
367
+ // Notification save changes SYNC.
368
+ aceEditor.cjtSyncInputField();
369
+ // Remove loading state.
370
+ this.block.aceEditor.setReadOnly(false);
371
+ // Mark as loaded.
372
+ jEditor.removeClass('iniially-loaded');
373
+ }, this)
374
+ );
375
+ }
376
  }
377
 
378
  /**
389
  // Return REsolved Dummy Object for standarizing sake!
390
  return CJTBlocksPage.server.getDeferredObject().resolve().promise();
391
  }
392
+ // Queue User Direct Interact fields (code, etc...).
393
  var data = {calculatePinPoint : this.features.calculatePinPoint, createRevision : 1};
394
  // Push DiFields inside Ajax queue.
395
  this.block.queueDIFields();
413
  this.cjtSyncInputField();
414
  }
415
  );
416
+ // Reset changes list.
417
+ this.changes = [];
418
  // Tell blocks page that block is saved and has not changed yet.
419
  CJTBlocksPage.blockContentChanged(this.block.id, false);
420
+ // Fire BlockSaved event.
421
+ this.onBlockSaved();
422
  }, this)
423
  )
424
  .error($.proxy(
526
  );
527
  }
528
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
529
  /**
530
  *
531
  *
563
  */
564
  this.initCJTPluginBase = function(node, args) {
565
  // Initialize object properties!
566
+ this.block = new CJTBlock(this, node)
567
  this.features = $.extend(defaultOptions, args);
568
+ // Initialize Events.
569
+ this.onBlockSaved = function() {};
570
  // Load commonly used elements.
571
  this.elements = {};
572
  $.each(autoLoadElements, $.proxy(
577
  // Initialize User Interface.
578
  this.initUI();
579
  // Prepare input elements for notifying user changes.
580
+ this.notifySaveChanges = (new notifySaveChangesProto(this)).initDIFields();
581
  // Set Plugin options.
582
  this.setOptions();
583
  }
603
  model.box.find(selector).click(handler);
604
  }, this)
605
  );
606
+ // Initialize ACE Editor.
 
607
  model.aceEditor.setTheme('ace/theme/chrome');
 
608
  model.aceEditor.setShowPrintMargin(false);
 
 
609
  // Activate toolbox.
610
  this.toolbox = model.box.find('.block-toolbox').CJTToolBox({
611
  context : this,
659
  // need sometime to be ready for display.
660
  model.box.css({display : 'block'}).addClass('cjt-block');
661
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
662
 
663
  /**
664
  *
679
  editorCommands.addCommands(commands);
680
  }
681
 
682
+ /**
683
+ *
684
+ */
685
+ this.restoreRevision = function(revisionId, data) {
686
+ // Create new revision control action.
687
+ var revisionControl = new CJTBlockOptionalRevision(this, data, revisionId);
688
+ // Display the revision + enter revision mode.
689
+ revisionControl.display();
690
+ }
691
+
692
  /**
693
  * Change Block options.
694
  *
695
  * NOT IMPLEMENTED YET.
696
  *
697
  */
698
+ this.setOptions = function() {}
 
 
699
 
700
  /*
701
  *
709
  this.toolbox.jToolbox.hide();
710
  // Disable all fields.
711
  this.enable(false);
712
+ // Change state
713
+ this.state = 'restore';
714
  default:
715
  // Nothing for now
716
  break;
views/blocks/block/public/js/optional/revision/revision.js ADDED
@@ -0,0 +1,212 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ *
3
+ */
4
+
5
+ var CJTBlockOptionalRevisionBase = null;
6
+
7
+ /**
8
+ *
9
+ */
10
+ (function($) {
11
+
12
+ /**
13
+ * put your comment there...
14
+ *
15
+ */
16
+ CJTBlockOptionalRevisionBase = function() {
17
+
18
+ /**
19
+ * put your comment there...
20
+ *
21
+ * @type Boolean
22
+ */
23
+ this.block;
24
+
25
+ /**
26
+ *
27
+ */
28
+ this.original;
29
+
30
+ /**
31
+ * put your comment there...
32
+ *
33
+ * @type Boolean
34
+ */
35
+ this.revision;
36
+
37
+ /**
38
+ *
39
+ */
40
+ this.state;
41
+
42
+ /**
43
+ * Switch state event
44
+ */
45
+ this.onBeforeSwitchState;
46
+
47
+ /**
48
+ * Switch state event
49
+ */
50
+ this.onDoneRestore;
51
+
52
+ /**
53
+ * Switch state event
54
+ */
55
+ this.onSwitchState;
56
+
57
+ /**
58
+ * put your comment there...
59
+ *
60
+ */
61
+ this.CJTBlockOptionalRevisionBase = function(block, revision) {
62
+ // Initialize instance.
63
+ this.block = block;
64
+ this.revision = revision;
65
+ this.original = {};
66
+ this.state = 'normal';
67
+ // Events.
68
+ this.onSwitchState = function() {};
69
+ this.onRestoreDone = function() {};
70
+ this.onBeforeSwitchState = function() {};
71
+ }
72
+
73
+ /**
74
+ *
75
+ */
76
+ this.cancel = function() {
77
+ // Initialize
78
+ var block = this.block;
79
+ var toolbox = block.toolbox;
80
+ var saveButton = toolbox.buttons['save'];
81
+ var mdlBlock = block.block;
82
+ var properties = block.features.restoreRevision.fields;
83
+ var pom;
84
+ // Before switch state event.
85
+ this.onBeforeSwitchState()
86
+ // Copy original data back to the block.
87
+ $.each(properties, $.proxy(
88
+ function(index, propertyName) {
89
+ // Get property om
90
+ pom = mdlBlock.property(propertyName).om;
91
+ // Set the original value.
92
+ pom.setValue(this.original[propertyName]);
93
+ }, this)
94
+ );
95
+ // Remove cancel button.
96
+ toolbox.remove('cancel-restore');
97
+ // Enable block components.
98
+ block.enable(true);
99
+ toolbox.enable(true);
100
+ // Set notification changes back.
101
+ block.changes = this.original.changes;
102
+ var isChanged = CJTBlocksPage.blocks.calculateChanges(block.changes, 0, false);
103
+ // Enable button is there is a change not saved yet, disable it if not.
104
+ saveButton.enable(isChanged);
105
+ // Reset save buttons properties back.
106
+ saveButton.jButton.text('Save')
107
+ // Clear RESTORE button style
108
+ .removeClass('cjttblSW-restore');
109
+ saveButton.callback = saveButton._callback;
110
+ block._onsavechanges = block.__onsavechanges;
111
+ saveButton._callback = null;
112
+ // Notify blocks page.
113
+ CJTBlocksPage.blockContentChanged(block.block.id, isChanged);
114
+ // Change state / Enter revision mode.
115
+ this.onSwitchState(this.state = null);
116
+ }
117
+
118
+ /**
119
+ *
120
+ */
121
+ this.display = function() {
122
+ // Initialize.
123
+ var block = this.block;
124
+ var toolbox = block.toolbox;
125
+ var saveButton = toolbox.buttons['save'];
126
+ var mdlBlock = block.block;
127
+ var properties = block.features.restoreRevision.fields;
128
+ var pom;
129
+ // Before switch state event.
130
+ this.onBeforeSwitchState()
131
+ // Cache 'Changes' array, don't reference it from block.changes
132
+ // as both got the same variable reference.
133
+ this.original.changes = block.changes; block.changes = [];
134
+ // Display revision data
135
+ $.each(properties, $.proxy(
136
+ function(index, propertyName) {
137
+ // Get property om
138
+ pom = mdlBlock.property(propertyName).om;
139
+ // Get original property value.
140
+ this.original[propertyName] = pom.getValueCache();
141
+ // Display Revision value.
142
+ pom.setValue(this.revision[propertyName]);
143
+ }, this)
144
+ );
145
+ // Empty changes array. As it affected by the copy code above!
146
+ block.changes = [];
147
+ // Force Notification Changes to detect that current block has changes.
148
+ CJTBlocksPage.blockContentChanged(mdlBlock.get('id'), true);
149
+ // DISABLE-ALL toolbox buttons
150
+ toolbox.enable(false);
151
+ // Except save button!
152
+ saveButton.enable(true);
153
+ saveButton._callback = saveButton.callback;
154
+ saveButton.__onsavechanges = block._onsavechanges;
155
+ block._onsavechanges = saveButton.callback = $.proxy(this.restore, this);
156
+ // Rename it to 'Restore'
157
+ saveButton.jButton.text('Restore')
158
+ // Reflect new style
159
+ .addClass('cjttblSW-restore');
160
+ // Add cancel restore button.
161
+ $('<a href="#" class="cjt-tb-link cjttbl-cancel-restore il-60x23"></a>')
162
+ .text('Cancel')
163
+ .insertBefore(saveButton.jButton);
164
+ toolbox.add('cancel-restore', {callback : $.proxy(this.cancel, this)});
165
+ // Disable block.
166
+ block.enable(false);
167
+ // Change state / Enter revision mode.
168
+ this.onSwitchState(this.state = 'revision');
169
+ }
170
+
171
+ /**
172
+ *
173
+ */
174
+ this.restore = function() {
175
+ // Initialize.
176
+ var block = this.block;
177
+ var toolbox = block.toolbox;
178
+ var saveButton = toolbox.buttons['save'];
179
+ var server = CJTBlocksPage.server;
180
+ var request = {rid : this.revision['id'], bid : block.block.get('id')};
181
+ // Restore revision via server.
182
+ saveButton.loading(true);
183
+ server.send('block', 'restoreRevision', request)
184
+ .success($.proxy(
185
+ function() {
186
+ // Fire restore done event.
187
+ this.onRestoreDone();
188
+ // Stop loading
189
+ saveButton.loading(false);
190
+ // Clear notify-save-changes list.
191
+ this.original.changes = [];
192
+ // Cancel restore action will reset
193
+ // the block UI elements to the normal state.
194
+ this.cancel(true);
195
+ // Sync fields with server value.
196
+ // This refrssh required for notifying saving
197
+ // change to detect changes.
198
+ var diFields = block.block.getDIFields();
199
+ // Push aceEditor into diFields list.
200
+ diFields[diFields.length++] = block.block.aceEditor;
201
+ diFields.each(
202
+ function() {
203
+ this.cjtSyncInputField();
204
+ }
205
+ );
206
+ }, this)
207
+ );
208
+ }
209
+
210
+ } // End Prototype.
211
+
212
+ })(jQuery);
views/blocks/block/tmpl/edit.html.tmpl CHANGED
@@ -25,9 +25,17 @@ defined('ABSPATH') or die("Access denied");
25
  <div class="cjcontainer">
26
  <div class="cjcodeblock">
27
  <div class="datablock">
28
- <textarea class="initCode" style="visibility:hidden"><?php echo htmlentities($this->block->code, null, 'UTF-8') ;?></textarea>
29
- <div id="editor-<?php echo $this->block->id ?>" class="code-editor">
30
- </div>
 
 
 
 
 
 
 
 
31
  </div>
32
  </div>
33
  </div>
25
  <div class="cjcontainer">
26
  <div class="cjcodeblock">
27
  <div class="datablock">
28
+ <?php // Output block code only if the block metabox is opened.
29
+ $code = '';
30
+ $codeLoadedSignClass = '';
31
+ $blockId = "cjtoolbox-{$this->block->id}";
32
+ $closedMetaboxes = get_user_meta(get_current_user_id(), 'closedpostboxes_cjtoolbox', true);
33
+ if (!in_array($blockId, ((array) $closedMetaboxes))) {
34
+ $code = htmlentities($this->block->code, null, 'UTF-8');
35
+ $codeLoadedSignClass = ' initially-loaded';
36
+ }
37
+ ?>
38
+ <div id="editor-<?php echo $this->block->id ?>" class="code-editor<?php echo $codeLoadedSignClass ?>"><?php echo $code ?></div>
39
  </div>
40
  </div>
41
  </div>
views/blocks/block/view.php CHANGED
@@ -86,6 +86,8 @@ class CJTBlocksBlockView extends CJTView {
86
  'framework:js:ace(loadMethod=Tag, lookFor=ace)',
87
  'framework:js:ace:{CJT-}pluggable',
88
  'views:blocks:block:public:js:{CJT-}ajax',
 
 
89
  'views:blocks:block:public:js:{CJT-}block',
90
  'views:blocks:block:public:js:{CJT-}jquery.block'
91
  );
86
  'framework:js:ace(loadMethod=Tag, lookFor=ace)',
87
  'framework:js:ace:{CJT-}pluggable',
88
  'views:blocks:block:public:js:{CJT-}ajax',
89
+ 'views:blocks:block:public:js:{CJT-}blockproperty',
90
+ 'views:blocks:block:public:js:optional:{CJT-}revision',
91
  'views:blocks:block:public:js:{CJT-}block',
92
  'views:blocks:block:public:js:{CJT-}jquery.block'
93
  );
views/blocks/cjt-block/public/css/block.css CHANGED
@@ -2,7 +2,15 @@
2
  .cjcodeblock {margin-right:317px;}
3
  /* Pages Panel */
4
  .cjpageblock {width: 315px; height: 100%; position: absolute; right: 3px;}
5
- .pagelist {padding:10px; height: 251px; overflow:auto; background:#fff; border:1px solid #ccc;}
 
 
 
 
 
 
 
 
6
  /* Wrap long text */
7
  .pagelist a{color: black; text-decoration: none;}
8
  .select-childs {position: relative; left: 2px; top: 2px; margin-left:-12px !important; margin-right: 1px !important; margin-top: 0px !important;}
@@ -10,16 +18,81 @@
10
  .select-childs-checkbox-overlay:hover {opacity: 0.5; filter: alpha(opacity = 50);}
11
  .pagelist a:hover{color: #B06D38; font-weight: bold;}
12
  .pagelist>li>span {width: 203px;overflow: hidden; display: inline-block; height: 21px; vertical-align: middle;}
 
13
  .pagelist li { line-height:19px; word-wrap:break-word; margin:0; padding:0; }
14
  .pagelist li .sub-list {font-weight: bold; font-size: 13px;text-decoration: underline;}
15
- .pagelist li .list-error {font-size: 12px;text-align: center;margin-top: 41px;text-decoration: underline;}
16
- .pagelist li .list-error .message{font-weight: bold;}
17
  .pagelist ul { margin-left:15px; }
18
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  /**
20
- * Advanced TAB Accordion menu.
21
  */
22
- .advanced-accordion {margin-top: 6px;}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  .advanced-accordion textarea {
24
  height: 211px;
25
  width: 282px;
@@ -29,19 +102,7 @@
29
  white-space: nowrap;
30
  text-decoration: underline;
31
  }
32
- .advanced-accordion a.acc-header {display: block;}
33
- .advanced-accordion a.acc-header,
34
- .advanced-accordion a.acc-header:hover,
35
- .advanced-accordion a.acc-header:visited {
36
- text-decoration: none;
37
- font-family: Helvetica;
38
- color: #AFAFAF;
39
- font-weight: bold;
40
- font-size: 16px;
41
- padding: 7px 4px;
42
- }
43
- .advanced-accordion .ui-accordion-content {height: 218px;}
44
- .advanced-accordion .ui-accordion-header-active {color: #a5581b !important;}
45
  /*
46
  * jQuery UI Tabs 1.8.16
47
  *
@@ -56,9 +117,9 @@
56
  .cjpageblock .ui-tabs .ui-tabs-nav { margin: 0;}
57
  .cjpageblock .ui-tabs .ui-tabs-nav li { list-style: none; top: 1px; margin: 0 .2em 1px 0; padding: 0; white-space: nowrap; }
58
  .cjpageblock .ui-tabs .ui-tabs-nav li a { background:#F1F1F1; color:#999999; border-color:#DFDFDF #DFDFDF #CCCCCC; height:18px;margin:5px 5px 0 0;float:right;cursor:pointer;border-width:1px;border-style:solid;-moz-border-radius:3px 3px 0 0;-webkit-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;-khtml-border-top-right-radius:3px;-khtml-border-top-left-radius:3px;border-top-right-radius:3px;border-top-left-radius:3px; border-bottom: 0 !important; }
59
- .cjpageblock .ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1.6em; text-decoration: none; }
60
  .cjpageblock .ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
61
  .cjpageblock .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; background:#E9E9E9; border-color:#CCCCCC #CCCCCC #E9E9E9; color:#333333; }
62
  .cjpageblock .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
63
- .cjpageblock .ui-tabs .ui-tabs-panel {height: 290px; display: block; padding: 0px 7px; background: #EFEFEF; border-color:#CCCCCC; border-style:solid;border-width:1px;border-collapse:separate;-moz-border-radius:3px 3px 0 0;-webkit-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;-khtml-border-top-right-radius:3px;-khtml-border-top-left-radius:3px;border-top-right-radius:3px;border-top-left-radius:3px; clear:both }
64
  .cjpageblock .ui-tabs .ui-tabs-hide { display: none !important; }
2
  .cjcodeblock {margin-right:317px;}
3
  /* Pages Panel */
4
  .cjpageblock {width: 315px; height: 100%; position: absolute; right: 3px;}
5
+ .pagelist {
6
+ padding:10px;
7
+ height: 242px;
8
+ overflow:auto;
9
+ background:#fff;
10
+ border:1px solid #ccc;
11
+ margin-bottom: 0px;
12
+ margin-top: 8px;
13
+ }
14
  /* Wrap long text */
15
  .pagelist a{color: black; text-decoration: none;}
16
  .select-childs {position: relative; left: 2px; top: 2px; margin-left:-12px !important; margin-right: 1px !important; margin-top: 0px !important;}
18
  .select-childs-checkbox-overlay:hover {opacity: 0.5; filter: alpha(opacity = 50);}
19
  .pagelist a:hover{color: #B06D38; font-weight: bold;}
20
  .pagelist>li>span {width: 203px;overflow: hidden; display: inline-block; height: 21px; vertical-align: middle;}
21
+ .pagelist li span>a {margin-left: 4px;}
22
  .pagelist li { line-height:19px; word-wrap:break-word; margin:0; padding:0; }
23
  .pagelist li .sub-list {font-weight: bold; font-size: 13px;text-decoration: underline;}
24
+ .list-error {font-size: 12px;text-align: center;margin-top: 41px;text-decoration: underline;}
25
+ .list-error .message{font-weight: bold;}
26
  .pagelist ul { margin-left:15px; }
27
 
28
+ div.cjpageblock .objects-list-button > a.prog-colored {color: transparent !important;}
29
+
30
+ .info-panel {display: none; margin-top: 4px; margin-right: 2px; text-align: right;}
31
+ .info-panel .counter {font-size: 14px;}
32
+ .info-panel .counter .info-panel-loaded-count {color: #A5581B;}
33
+ .info-panel .optional-actions {display: inline-block; width: 80px; height: 12px;}
34
+ .info-panel .optional-actions .pagination-list {
35
+ background-image: url('../images/pages-panel/pagination.png');
36
+ width: 16px;
37
+ height: 16px;
38
+ background-repeat: no-repeat;
39
+ display: inline-block;
40
+ margin-top: 0px;
41
+ position: relative;
42
+ left: 0px;
43
+ }
44
+ .info-panel .optional-actions .pagination-options-list {
45
+ display: none;
46
+ z-index: 1;
47
+ width: 61px;
48
+ height: 198px !important;
49
+ position: relative;
50
+ margin-left: -64px;
51
+ margin-top: -179px;
52
+ left: -13px;
53
+ top: -7px;
54
+ color: #A5581B;
55
+ font-size: 13px;
56
+ }
57
+
58
  /**
59
+ * jQuery Accordions
60
  */
61
+ a.acc-header, .custom-posts-container a.custom-post-item-header {display: block;}
62
+ a.acc-header,
63
+ a.acc-header:hover,
64
+ a.acc-header:visited,
65
+ .custom-posts-container a.custom-post-item-header,
66
+ .custom-posts-container a.custom-post-item-header:hover,
67
+ .custom-posts-container a.custom-post-item-header:visited {
68
+ text-decoration: none;
69
+ font-family: Helvetica;
70
+ color: #A5581B;
71
+ font-weight: bold;
72
+ }
73
+ /**
74
+ * Custom Posts jQuery Accordion
75
+ */
76
+ .custom-posts-container {
77
+ background-color: white;
78
+ margin-top: 9px;
79
+ height: 261px;
80
+ padding: 6px;
81
+ overflow: auto;
82
+ }
83
+ .custom-posts-container .custom-post-list {display: none; padding-bottom: 8px;}
84
+ .custom-posts-container .ui-accordion-content {height: 258px;}
85
+ .custom-posts-container .pagelist {height: 218px; margin-top: 2px; margin-left: 5px; border: none; padding-top: 0px;}
86
+ .custom-posts-container a.custom-post-item-header {
87
+ text-decoration: underline;
88
+ margin-bottom: 2px;
89
+ padding-left: 5px;
90
+ }
91
+ /**
92
+ * Advanced Tab jQuery Accordion
93
+ */
94
+ .advanced-accordion .ui-accordion-content {height: 218px;}
95
+ .advanced-accordion .ui-accordion-header-active {color: #a5581b !important;}
96
  .advanced-accordion textarea {
97
  height: 211px;
98
  width: 282px;
102
  white-space: nowrap;
103
  text-decoration: underline;
104
  }
105
+ .advanced-accordion a.acc-header {padding: 7px 4px;}
 
 
 
 
 
 
 
 
 
 
 
 
106
  /*
107
  * jQuery UI Tabs 1.8.16
108
  *
117
  .cjpageblock .ui-tabs .ui-tabs-nav { margin: 0;}
118
  .cjpageblock .ui-tabs .ui-tabs-nav li { list-style: none; top: 1px; margin: 0 .2em 1px 0; padding: 0; white-space: nowrap; }
119
  .cjpageblock .ui-tabs .ui-tabs-nav li a { background:#F1F1F1; color:#999999; border-color:#DFDFDF #DFDFDF #CCCCCC; height:18px;margin:5px 5px 0 0;float:right;cursor:pointer;border-width:1px;border-style:solid;-moz-border-radius:3px 3px 0 0;-webkit-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;-khtml-border-top-right-radius:3px;-khtml-border-top-left-radius:3px;border-top-right-radius:3px;border-top-left-radius:3px; border-bottom: 0 !important; }
120
+ .cjpageblock .ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1.4em; text-decoration: none; }
121
  .cjpageblock .ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
122
  .cjpageblock .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; background:#E9E9E9; border-color:#CCCCCC #CCCCCC #E9E9E9; color:#333333; }
123
  .cjpageblock .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
124
+ .cjpageblock .ui-tabs .ui-tabs-panel {height: 294px; display: block; padding: 0px 7px; background: #EFEFEF; border-color:#CCCCCC; border-style:solid;border-width:1px;border-collapse:separate;-moz-border-radius:3px 3px 0 0;-webkit-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;-khtml-border-top-right-radius:3px;-khtml-border-top-left-radius:3px;border-top-right-radius:3px;border-top-left-radius:3px; clear:both }
125
  .cjpageblock .ui-tabs .ui-tabs-hide { display: none !important; }
views/blocks/cjt-block/public/images/pages-panel/pagination.png ADDED
Binary file
views/blocks/cjt-block/public/js/block/block.js ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ *
3
+ */
4
+ var CJTBlock;
5
+
6
+ /**
7
+ *
8
+ */
9
+ (function($) {
10
+
11
+ /**
12
+ * put your comment there...
13
+ *
14
+ * @param element
15
+ */
16
+ CJTBlock = function(blockPlugin, element) {
17
+
18
+ // Constructor.
19
+ this.CJTBlock = function() {
20
+ var properties = {};
21
+ // Define CJTBlock properties for assignment panel.
22
+ properties.links = {om : new CJTBlockPropertyHTMLNodeOM(),
23
+ flags: 'rws',
24
+ selector : 'textarea[name="cjtoolbox[{blockId}][links]"]'};
25
+ properties.expressions = {om : new CJTBlockPropertyHTMLNodeOM(),
26
+ flags: 'rws',
27
+ selector : 'textarea[name="cjtoolbox[{blockId}][expressions]"]'},
28
+ properties.pinPoint = {om : new CJTBlockPropertyAPItemsList(),
29
+ flags: 'rws',
30
+ selector : 'input:checkbox[name="cjtoolbox[{blockId}][pinPoint][]"]'},
31
+ properties.pages = {om : new CJTBlockPropertyAPItemsList(),
32
+ flags: 'rws',
33
+ selector : 'input:checkbox[name="cjtoolbox[{blockId}][pages][]"]'},
34
+ properties.posts = {om : new CJTBlockPropertyAPItemsList(),
35
+ flags: 'rws',
36
+ selector : 'input:checkbox[name="cjtoolbox[{blockId}][posts][]"]'},
37
+ properties.categories = {om : new CJTBlockPropertyAPItemsList(),
38
+ flags: 'rws',
39
+ selector : 'input:checkbox[name="cjtoolbox[{blockId}][categories][]"]'}
40
+ // Initialize parent.
41
+ this.CJTBlockBase(blockPlugin, element, properties);
42
+ }
43
+
44
+ // Construct!
45
+ this.CJTBlock();
46
+ }
47
+
48
+ // Extend CJTBlockBase class.
49
+ CJTBlock.prototype = new CJTBlockBase();
50
+
51
+ })(jQuery)
views/blocks/cjt-block/public/js/blockproperty/blockproperty.js ADDED
@@ -0,0 +1,144 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ *
3
+ */
4
+
5
+ var CJTBlockPropertyAPItemsList;
6
+
7
+ /**
8
+ *
9
+ */
10
+ (function($) {
11
+
12
+ /**
13
+ * put your comment there...
14
+ *
15
+ * @param assignPanel
16
+ */
17
+ CJTBlockPropertyAPItemsList = function(assignPanel) {
18
+
19
+ /**
20
+ * put your comment there...
21
+ *
22
+ */
23
+ var block = null;
24
+
25
+ /**
26
+ * put your comment there...
27
+ *
28
+ */
29
+ var property = null;
30
+
31
+ /**
32
+ *
33
+ */
34
+ this.bind = function(blk, prprty) {
35
+ // Bind to property object.
36
+ block = blk;
37
+ property = prprty;
38
+ }
39
+
40
+ /**
41
+ *
42
+ */
43
+ this.get = function() {
44
+ // Initialize.
45
+ var map = block.pagesPanel.getMap();
46
+ // Get values directy from the assignment panel
47
+ var value = map[property.name];
48
+ // Returns
49
+ return value;
50
+ }
51
+
52
+ /**
53
+ *
54
+ */
55
+ this.getValueCache = function() {
56
+ // Initialize.
57
+ var pagesPanel = block.pagesPanel;
58
+ var buttons = pagesPanel.buttons[property.name];
59
+ var value = {};
60
+ var type, list;
61
+ // Get the map.
62
+ value.map = this.get();
63
+ // Get all types.
64
+ value.types = {};
65
+ // Get all types values for current type.
66
+ $.each(buttons, $.proxy(
67
+ function(index, button) {
68
+ // List.
69
+ list = button.data('list');
70
+ // Get type object prototype
71
+ type = pagesPanel.getTypeObject();
72
+ // Read button state-vars.
73
+ $.each(type.button.stateVars, $.proxy(
74
+ function(name) {
75
+ type.button.stateVars[name] = button.data(name);
76
+ }, this)
77
+ );
78
+ // Read list state-vars.
79
+ $.each(type.list.stateVars, $.proxy(
80
+ function(name) {
81
+ type.list.stateVars[name] = list.data(name);
82
+ }, this)
83
+ );
84
+ // Get list items, deattach them from the list.
85
+ type.list.items = list.children().detach();
86
+ // Push to the types list.
87
+ value.types[list.data('params')['type']] = type;
88
+ }, this)
89
+ );
90
+ // Return types list.
91
+ return value;
92
+ }
93
+
94
+ /**
95
+ *
96
+ */
97
+ this.setValue = function(value) {
98
+ // Initialize.
99
+ var pagesPanel = block.pagesPanel;
100
+ var list, type, typeName;
101
+ if (!value) {
102
+ value = {map : {}, types : {}};
103
+ }
104
+ // Get 'group' type buttons.
105
+ var buttons = pagesPanel.buttons[property.name];
106
+ // For each button reset all 'status data'.
107
+ $.each(buttons, $.proxy(
108
+ function(index, button) {
109
+ // Get list.
110
+ list = button.data('list');
111
+ // Get button items-list type name
112
+ typeName = list.data('params')['type'];
113
+ // Get type object from the new-value.
114
+ type = (value.types[typeName] !== undefined) ? value.types[typeName] : pagesPanel.getTypeObject();
115
+ // Write button stateVars.
116
+ $.each(type.button.stateVars, $.proxy(
117
+ function(name, value) {
118
+ button.data(name, value);
119
+ }, this)
120
+ );
121
+ // Write List stateVars.
122
+ $.each(type.list.stateVars, $.proxy(
123
+ function(name, value) {
124
+ list.data(name, value);
125
+ }, this)
126
+ );
127
+ // Remove all pins under that 'button' list.
128
+ list.empty();
129
+ // Add items to the list.
130
+ list.append(type.list.items);
131
+ // Reset Pagination list.
132
+ button.data('paginationList').reset();
133
+ // Reset info panel.
134
+ var infoPanel = list.data('infoPanel');
135
+ infoPanel.find('.info-panel-total').text(list.data('totalItemsCount'));
136
+ infoPanel.find('.info-panel-loaded-count').text(list.data('loadedCount'));
137
+ }, this)
138
+ );
139
+ // Set the map.
140
+ pagesPanel.setMapGroup(property.name, value.map);
141
+ }
142
+ }
143
+
144
+ })(jQuery);
views/blocks/cjt-block/public/js/jquery.assignpanel/jquery.assignpanel.js ADDED
@@ -0,0 +1,578 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ *
3
+ */
4
+
5
+ /**
6
+ *
7
+ */
8
+ (function($) {
9
+
10
+ /**
11
+ * Hold the items per page to load
12
+ * at a time.
13
+ *
14
+ * The variable is set the first time
15
+ * getIPerPage method is called.
16
+ *
17
+ * @
18
+ */
19
+ var iPerPage = null;
20
+
21
+ /**
22
+ * jQuery namespace.
23
+ */
24
+ $.fn.CJTBlockAssignmentPanel = function(options) {
25
+ // Process all assigment panels
26
+ return this.each(function() {
27
+ // Assigment panel DOM element.
28
+ var assigmentPanelElement = this;
29
+ // Create a plugin for the element only if not already created.
30
+ if (assigmentPanelElement.CJTBlockAssignmentPanel === undefined) {
31
+ // Define assigment panel plugin.
32
+ assigmentPanelElement.CJTBlockAssignmentPanel = new function() {
33
+
34
+ /**
35
+ * put your comment there...
36
+ *
37
+ * @type CJTBLockPlugin
38
+ */
39
+ this.block = options.block;
40
+
41
+ /**
42
+ *
43
+ */
44
+ this.buttons = {pages : [], posts : [], categories : [], pinPoint : []};
45
+
46
+ /**
47
+ *
48
+ */
49
+ this.loadAssignedOnlyMode = (this.block.state == 'restore');
50
+
51
+ /**
52
+ *
53
+ */
54
+ this.jElement = $(assigmentPanelElement);
55
+
56
+ /**
57
+ * Hold reference for 'this' object to
58
+ * be accessed by 'private' methods when called
59
+ * from DOM element event handler.
60
+ *
61
+ */
62
+ var assignPanel = this;
63
+
64
+ /**
65
+ * put your comment there...
66
+ *
67
+ * @type Object
68
+ */
69
+ var map = {pages : {}, posts : {}, categories : {}, pinPoint : {}};
70
+
71
+ /**
72
+ * put your comment there...
73
+ *
74
+ */
75
+ var mdlBlock = this.block.block;
76
+
77
+ /**
78
+ *
79
+ */
80
+ var _onadvancedaccordionchanged = function(event, ui) {
81
+ // Activate textarea under the current selected item content!
82
+ ui.newContent.find('textarea').focus();
83
+ };
84
+
85
+ /**
86
+ * put your comment there...
87
+ *
88
+ * @param event
89
+ */
90
+ var _ondetectlistscroll = function(event) {
91
+ // Initialize.
92
+ var list = this;
93
+ var jList = $(list);
94
+ // Don't load unless not all items has been loaded.
95
+ if (jList.data('itemsLoaded') === true) {
96
+ return;
97
+ }
98
+ // Prevent multiple requests at the same time.
99
+ var isLoading = jList.data('cjt_isObjectListLoading');
100
+ // Scroll value.
101
+ var scrollValue = list.scrollTop;
102
+ // The hidden zone!
103
+ var scrollZone = list.scrollHeight - jList.innerHeight();
104
+ // If the ScrollValue = ScrollZone
105
+ // then we need to load a new page.
106
+ if ((scrollValue == scrollZone) && (isLoading === false)) {
107
+ list.getCJTBlockAPOP(false);
108
+ }
109
+ };
110
+
111
+ /**
112
+ *
113
+ *
114
+ * @param event
115
+ * @param ui
116
+ */
117
+ var _onobjectlistactivate = function(event, ui) {
118
+ // Initialize.
119
+ var item = ui.item;
120
+ // Process only elements that list assignment panel objects.
121
+ if (item.data('objectListButton') === true) {
122
+ // Load first objects page for the activated item
123
+ // only once.
124
+ if (item.data('objectListActivated') !== true) {
125
+ // In order to load the first page we need to get 'list' DOM node.
126
+ var list = item.data('list');
127
+ var params = list.data('params');
128
+ // Load first page.
129
+ list.get(0).getCJTBlockAPOP(true).success($.proxy(
130
+ function(response) {
131
+ // Mark item as activated after the page
132
+ // is successfully loaded.
133
+ item.data('objectListActivated', true);
134
+ // Initialize TOTLAL COUNT.
135
+ var infoPanel = list.data('infoPanel');
136
+ // Cache total.
137
+ list.data('totalItemsCount', response.total);
138
+ // Show pagination info bar.
139
+ infoPanel.css({display : 'block'}).find('.info-panel-total').text(response.total);
140
+ // Reset Pagination List when the button is first time activated.
141
+ item.data('paginationList').reset();
142
+ }, this)
143
+ );
144
+ }
145
+ }
146
+ };
147
+
148
+ /**
149
+ * put your comment there...
150
+ *
151
+ * @param event
152
+ */
153
+ var _onobjectstatechanged = function() {
154
+ // Initialize.
155
+ var checkbox = this;
156
+ var groupName = checkbox.name.match(/cjtoolbox\[\d+\]\[(\w+)\]/)[1];
157
+ var objectId = parseInt(checkbox.value);
158
+ // Get item reference is available (sync=true, sync=false&value=true)
159
+ // or create new one (select not synced item).
160
+ var item = (map[groupName][objectId] === undefined) ? {sync : 0} : map[groupName][objectId];
161
+ // Set value as checkbox.
162
+ item.value = $(checkbox).prop('checked') ? 1 : 0;
163
+ // If the item is not 'synced' (not saved on server)
164
+ // and not checked then remove it from the map
165
+ // , add it if checked.
166
+ if (item.sync === 0) {
167
+ if (item.value === 0) {
168
+ delete map[groupName][objectId];
169
+ }
170
+ else {
171
+ map[groupName][objectId] = item;
172
+ }
173
+ }
174
+ };
175
+
176
+ /**
177
+ * put your comment there...
178
+ *
179
+ * @param event
180
+ *
181
+ * @returns {Boolean}
182
+ */
183
+ var _onselectchilds = function(event) {
184
+ // Initialize vars.
185
+ var overlay = $(event.target);
186
+ var checkbox = overlay.parent().find('.select-childs');
187
+ var state = checkbox.prop('checked') ? '' : 'checked';
188
+ // Work only if select-child checkbox is interactive!
189
+ if (checkbox.attr('disabled') != 'disabled') {
190
+ // Revert checkbox state.
191
+ checkbox.prop('checked', state);
192
+ // Clone state to parent checkbox.
193
+ checkbox.parent().find('label>input:checkbox').prop('checked', state).trigger('change');
194
+ //Clone state to all child checkboxes
195
+ checkbox.parent().find('.children input:checkbox').prop('checked', state).trigger('change');
196
+ }
197
+ // For link to behave inactive.
198
+ return false;
199
+ };
200
+
201
+ /**
202
+ * put your comment there...
203
+ *
204
+ * @param index
205
+ * @param typeParams
206
+ * @param initialize
207
+ * @param page
208
+ */
209
+ var getAPOP = function(index, typeParams, initialize, page) {
210
+ // Initialize.
211
+ var server = CJTBlocksPage.server;
212
+ // Use modeBlockId instead of original block id to be used in case of
213
+ // DISPLAY-REVISION mode or any other modes added in the future.
214
+ var blockId = assignPanel.modeBlockId ? assignPanel.modeBlockId : assignPanel.block.block.get('id');
215
+ var requestData = {
216
+ block : blockId,
217
+ index : index,
218
+ iPerPage : (page * assignPanel.getIPerPage()),
219
+ typeParams : typeParams,
220
+ assignedOnly : assignPanel.loadAssignedOnlyMode,
221
+ initialize : initialize
222
+ };
223
+ // Send request to server.
224
+ var promise = server.send('block', 'getAPOP', requestData).success($.proxy(
225
+ // User Interface Component Independent Routines
226
+ function(response) {
227
+ // Initialize.
228
+ var items = response.items;
229
+ // Create Assigment Panel objects MAP used for saving
230
+ // the assigned pins.
231
+ $.each(items, $.proxy(
232
+ function(index, item) {
233
+ // Cache only 'assigned' items.
234
+ if (item.assigned === true) {
235
+ map[typeParams.group][item.id] = {value : 1, sync : 1};
236
+ }
237
+ }, this)
238
+ );
239
+ }, this)
240
+ );
241
+ // Return
242
+ return promise;
243
+ };
244
+
245
+ /**
246
+ * Get items count to load per
247
+ * page.
248
+ *
249
+ * The items to load per page is calculated by
250
+ * determing the maximum height that the objects-list element
251
+ * can reach divided by the single item height.
252
+ *
253
+ * The maximum objects-list height is determined by
254
+ * the available screen-height - the other elements
255
+ * (TAB Nav, margins, padding, etc...).
256
+ * above and bottom the objects-list.
257
+ *
258
+ */
259
+ this.getIPerPage = function() {
260
+ // Calculate iPerPage only if not calculated.
261
+ if (iPerPage === null) {
262
+ // Initialize.
263
+ var screenHeight = screen.availHeight;
264
+ var listItemHeight = 21;
265
+ // BLK_HEADER + NAV(MENU + (SPACE * 2)) + LIST((PAD * 10) + BORDER + (MARGIN * 2)) + BUTTOM-SPACE.
266
+ var reserved = 33 + (62 + (5 * 2)) + ((10 * 2) + 1 + (12 * 2)) + 14;
267
+ // Get the maximum objects-list height.
268
+ var maxListHeight = screenHeight - reserved;
269
+ // Divide the max height by the item height.
270
+ // and always add 5 items for makr the full screen
271
+ // mode scrolled too.
272
+ // Scrollbar must be available in all cases
273
+ // as long as there is items not loaded yet.
274
+ iPerPage = parseInt(maxListHeight / listItemHeight) + 5;
275
+ }
276
+ return iPerPage;
277
+ };
278
+
279
+ /**
280
+ *
281
+ */
282
+ this.list_displayItems = function(list, data) {
283
+ // Initialize.
284
+ var mdlBlock = assignPanel.block.block;
285
+ // New items to add to the list.
286
+ var items = data.items;
287
+ // Get pins parameters.
288
+ var typeParams = list.data('params')
289
+ // Get the cached loaded pins count.
290
+ var loadedPinsCount = list.data('loadedCount');
291
+ // Update loaded count.
292
+ list.data('loadedCount', (loadedPinsCount + data.count));
293
+ // Add items to list using
294
+ $.each(items, $.proxy(
295
+ function(index, item) {
296
+ // Get parent list DOM Node.
297
+ var listId = '#objects-list-' + typeParams.type + '-' + mdlBlock.get('id') + '-' + item.parent;
298
+ var targetList = assignPanel.jElement.find(listId);
299
+ // Item list LI element.
300
+ var itemLi = $('<li></li>').appendTo(targetList);
301
+ // Item assignment panel checkbox.
302
+ var checkbox = $('<input type="checkbox" />')
303
+ // Set name
304
+ .prop('name', 'cjtoolbox[' + mdlBlock.get('id') + '][' + typeParams.group + '][]')
305
+ // Submit object-ID when saving.
306
+ .val(item.id)
307
+ // Update the map once the assigned pin checkbox
308
+ // checked value changed.
309
+ .change(_onobjectstatechanged)
310
+ .prop('checked', item.assigned)
311
+ .appendTo($('<label></label>').appendTo(itemLi))
312
+ // If load-assigned-only-mode is activated then disable checkboxes.
313
+ .prop('disabled', assignPanel.loadAssignedOnlyMode);
314
+ // Add the Checkbox to notification save chnages elements.
315
+ assignPanel.block.notifySaveChanges.initElement(checkbox.get(0));
316
+ // Checkbox title container.
317
+ var title = $('<span><span>')
318
+ .attr('title', item.title)
319
+ .appendTo(itemLi);
320
+ // Checkbox title and link
321
+ if (item.link) {
322
+ $('<a href="' + item.link + '" target="_blank">' + item.title + '</a>').appendTo(title);
323
+ }
324
+ else {
325
+ title.text(item.title)
326
+ .css({'margin-left' : '6px'});
327
+ }
328
+ // Create Child Components IF: NOT-IN-REVISION-MODE AND THE ITEM-HAS-CHILD.
329
+ if (!assignPanel.loadAssignedOnlyMode && item.hasChilds) {
330
+ // Add 'select childs' checkbox just before te title container element.
331
+ var link = $('<a href="#" class="select-childs-checkbox-overlay"></a>')
332
+ .click($.proxy(_onselectchilds, this))
333
+ .insertBefore(title);
334
+ // Overlay checkbox.
335
+ link.after('<input type="checkbox" class="select-childs">');
336
+ // Add child items list below the title container.
337
+ $('<ul class="children"></ul>')
338
+ .prop('id', ('objects-list-' + typeParams.type + '-' + mdlBlock.get('id') + '-' + item.id))
339
+ .insertAfter(title);
340
+ }
341
+ }, this)
342
+ );
343
+ }
344
+
345
+ /**
346
+ * APOP -- Assigment Pabel Objects page
347
+ *
348
+ */
349
+ this.list_GetAPOP = function(initialize, page) {
350
+ // Initialize.
351
+ var list = $(this);
352
+ // Get pins parameters.
353
+ var typeParams = list.data('params')
354
+ // Get the cached loaded pins count.
355
+ var loadedPinsCount = list.data('loadedCount');
356
+ // Flag that the list is in 'loading' state.
357
+ list.data('cjt_isObjectListLoading', true);
358
+ // Show LOADING-PROGRESS as color switching.
359
+ var button = list.data('button');
360
+ var colorStyles = ['prog-normal', 'prog-colored'];
361
+ var colorState = false;
362
+ var tmrProg = window.setInterval($.proxy(
363
+ function() {
364
+ // Remove previous state class.
365
+ button.removeClass(colorStyles[colorState ? 1 : 0]);
366
+ // Switch STATE
367
+ colorState = !colorState;
368
+ // Add or Remove CSS class based on the current state.
369
+ button.addClass(colorStyles[colorState ? 1 : 0]);
370
+ }, this)
371
+ , 150);
372
+ // Load next page.
373
+ var promise = getAPOP(loadedPinsCount, typeParams, initialize, page).success($.proxy(
374
+ // Add the new items to the list.
375
+ function(response) {
376
+ // If there is no more items to load then exit
377
+ // and don't try to load data for this list anymore.
378
+ if (response.count == 0) {
379
+ // Mark as full loaded
380
+ list.data('itemsLoaded', true);
381
+ // Exit as there is nothing to process.
382
+ return;
383
+ }
384
+ // Display items.
385
+ assignPanel.list_displayItems(list, response);
386
+ // Display loaded items count.
387
+ list.data('infoPanel').find('.info-panel-loaded-count').text(list.data('loadedCount'));
388
+ // Cache TOTAL loaded pages.
389
+ list.data('loadedPages', (list.data('loadedPages') + page));
390
+ }, this)
391
+ ).complete($.proxy(
392
+ function() {
393
+ // Flag that the list is in 'not-loading' state.
394
+ list.data('cjt_isObjectListLoading', false);
395
+ // Stop progeess.
396
+ window.clearInterval(tmrProg);
397
+ // Remove STATE class.
398
+ button.removeClass('prog-normal').removeClass('prog-colored');
399
+ }, this)
400
+ );
401
+ return promise;
402
+ };
403
+
404
+ /**
405
+ *
406
+ */
407
+ this.getMap = function() {
408
+ return map;
409
+ }
410
+
411
+ /**
412
+ * put your comment there...
413
+ *
414
+ */
415
+ this.getTypeObject = function() {
416
+ // Default type object.
417
+ var type = {
418
+ button : {
419
+ stateVars : {
420
+ objectListActivated : false
421
+ }
422
+ },
423
+ list : {
424
+ stateVars : {
425
+ cjt_isObjectListLoading : false,
426
+ loadedCount : 0,
427
+ itemsLoaded : false,
428
+ loadedPages : 0,
429
+ totalItemsCount : 0
430
+ },
431
+ items : null
432
+ }
433
+ };
434
+ // Returs.
435
+ return type;
436
+ }
437
+
438
+ /**
439
+ * put your comment there...
440
+ *
441
+ */
442
+ var onBlockSaved = function() {
443
+ // Syncronize the map.
444
+ var map = assignPanel.getMap();
445
+ $.each(map, $.proxy(
446
+ function(name, map) {
447
+ $.each(map, $.proxy(
448
+ function(id, item) {
449
+ // Sync new-added items.
450
+ if (!item.sync) {
451
+ item.sync = 1;
452
+ }
453
+ else if (!item.value) {
454
+ // Remove deleted item.
455
+ delete map[id];
456
+ }
457
+ }, this)
458
+ )
459
+ }, this)
460
+ );
461
+ };
462
+
463
+ /**
464
+ *
465
+ */
466
+ this.setMapGroup = function(name, mapList) {
467
+ map[name] = mapList;
468
+ }
469
+
470
+ /// CONSTRUCTTOR ///
471
+ var blockId = mdlBlock.get('id');
472
+ var typeObjectDefaults = this.getTypeObject();
473
+
474
+ // Initialize all 'objects-list'
475
+ this.jElement.find('.objects-list-button').each(
476
+ $.proxy(function(index, objectListEle) {
477
+ // Initialize.
478
+ var listElement = null;
479
+ var listElementId = '';
480
+ var listElementNode;
481
+ var listParams = {};
482
+ // objectListElement jQuery.
483
+ objectListEle = $(objectListEle);
484
+ // Get all input fields laying under the object-list container.
485
+ var inputFields = objectListEle.find('input[type=hidden]').each($.proxy(
486
+ function(index, inputEle) {
487
+ listParams[inputEle.name] = inputEle.value;
488
+ })
489
+ );
490
+ // Get objects-list DOM node.
491
+ listElementId = '#objects-list-' + listParams.type + '-' + blockId + '-0';
492
+ listElement = this.jElement.find(listElementId).eq(0);
493
+ // Initialize data register.
494
+ listElement
495
+ .data('loadedCount', 0)
496
+ .data('loadedPages', 0)
497
+ .data('totalItemsCount', 0)
498
+ .data('itemsLoaded', false)
499
+ // Cache button element reference.
500
+ .data('button', objectListEle.find('>a'))
501
+ // Get info-panel element.
502
+ .data('infoPanel', listElement.next())
503
+ // Push all input field values to the list.
504
+ .data('params', listParams);
505
+ // Set objects-list for later use.
506
+ objectListEle.data('list', listElement)
507
+ // Pagination list.
508
+ .data('paginationList', new CJTBlockAssignPanelPaginationList(this, listElement))
509
+ // Initialize default state-var
510
+ .data('objectListActivated', false)
511
+ // In order for the item to be processed on the 'activate' event
512
+ // the item should be signed for that so it can determind
513
+ // later when the activate event got fired!
514
+ .data('objectListButton', true);
515
+ // Delete those extra input fields from DOM tree.
516
+ inputFields.remove();
517
+ // Add fetchBlockPins and Detect Scrolling event handler method to the list object.
518
+ listElementNode = listElement.get(0);
519
+ listElementNode.getCJTBlockAPOP = function(initialize) {
520
+ // List items.
521
+ return assignPanel.list_GetAPOP.apply(this, [initialize, 1]);
522
+ };
523
+ listElementNode._ondetectlistscroll = _ondetectlistscroll;
524
+ // Fetch objects from server with list scrolls event.
525
+ listElement.bind('scroll.cjt', listElementNode._ondetectlistscroll);
526
+ // Cache object-list-element reference for later use.
527
+ this.buttons[listParams['group']].push(objectListEle);
528
+ }, this)
529
+ );
530
+
531
+ // Initialize Assigment Panel tab.
532
+ this.jElement.tabs({
533
+ activate : function(event, ui) {
534
+ // Set ui.item to TAB reference.
535
+ ui.item = ui.newTab;
536
+ // Trigger real event handler.
537
+ _onobjectlistactivate(event, ui);
538
+ }
539
+ });
540
+
541
+ // Create custom posts toggle widget.
542
+ var cpContainer = this.jElement.find('#custom-posts-container-' + blockId);
543
+ // Toggle custom post list when the header link is clicked.
544
+ cpContainer.find('.objects-list-button>a.custom-post-item-header').click($.proxy(
545
+ function(event) {
546
+ // Initialize.
547
+ var button = $(event.target).parent();
548
+ var list = button.next();
549
+ // Toggle item.
550
+ list.toggle();
551
+ // Fire the activate event in case that the item
552
+ // is not visible.
553
+ if (list.css('display') != 'none') {
554
+ // Activate event standard interface.
555
+ var ui = {item : button};
556
+ // Trigger real event handler.
557
+ _onobjectlistactivate(event, ui);
558
+ }
559
+ // Make link inactive.
560
+ return false;
561
+ }, this)
562
+ );
563
+
564
+ // Initialize Advanced tab accordion.
565
+ mdlBlock.box.find('#advanced-accordion-' + blockId).accordion({
566
+ change : _onadvancedaccordionchanged,
567
+ header: '.acc-header'
568
+ }
569
+ );
570
+ // Activate the AUX tab by default.
571
+ this.jElement.find('li.type-advanced>a').trigger('click');
572
+ // Syncronize assign panel map when block saved.
573
+ options.block.onBlockSaved = onBlockSaved;
574
+ }
575
+ }
576
+ })
577
+ }
578
+ })(jQuery);
views/blocks/cjt-block/public/js/jquery.block/jquery.block.js CHANGED
@@ -18,44 +18,28 @@
18
  /**
19
  *
20
  */
21
- this._onadvancedaccordionchanged = function(event, ui) {
22
- // Activate textarea under the current selected item content!
23
- ui.newContent.find('textarea').focus();
24
- }
25
 
26
  /**
27
  *
28
  */
29
- this._onselectchilds = function(event) {
30
- // Initialize vars.
31
- var overlay = $(event.target);
32
- var checkbox = overlay.parent().find('.select-childs');
33
- var state = checkbox.prop('checked') ? '' : 'checked';
34
- // Work only if select-child checkbox is interactive!
35
- if (checkbox.attr('disabled') != 'disabled') {
36
- // Revert checkbox state.
37
- checkbox.prop('checked', state);
38
- // Clone state to parent checkbox.
39
- checkbox.parent().find('label>input:checkbox').prop('checked', state).trigger('change');
40
- //Clone state to all child checkboxes
41
- checkbox.parent().find('.children input:checkbox').prop('checked', state).trigger('change');
42
  }
43
- // For link to behave inactive.
44
- return false;
45
  }
46
 
47
- // Initialize parent class.
 
 
48
  this.initCJTPluginBase(node, args);
49
- // Activate objects panel!
50
- var pagesPanel = this.block.box.find('.cjt-pages-tab').tabs();
51
- // Accordion menu for Advanced TAB.
52
- this.block.box.find('#advanced-accordion-' + this.block.get('id')).accordion({
53
- change : this._onadvancedaccordionchanged,
54
- header: '.acc-header'
55
- }
56
- );
57
- // Put select-childs checkboxes in action!
58
- pagesPanel.find('.select-childs-checkbox-overlay').click($.proxy(this._onselectchilds, this));
59
  } // End class.
60
 
61
  // Extend CJTBLockPluginBase.
18
  /**
19
  *
20
  */
21
+ this.pagesPanel = null;
 
 
 
22
 
23
  /**
24
  *
25
  */
26
+ this._onswitchstate = function(state) {
27
+ switch (state) {
28
+ case 'restore':
29
+ this.pagesPanel.loadAssignedOnlyMode = true;
30
+ break;
 
 
 
 
 
 
 
 
31
  }
 
 
32
  }
33
 
34
+ /// Initialize parent class.
35
+ // Add assigment panel fields to the restoreRevision args.
36
+ args.restoreRevision = {fields : ['code', 'pages', 'posts', 'categories', 'pinPoint', 'links', 'expressions']};
37
  this.initCJTPluginBase(node, args);
38
+
39
+ // Plug the assigment panel, get the jQuery ELement for it
40
+ var assigmentPanelElement = this.block.box.find('#tabs-' + this.block.get('id'));
41
+ this.pagesPanel = assigmentPanelElement.CJTBlockAssignmentPanel({block : this}).get(0).CJTBlockAssignmentPanel;
42
+
 
 
 
 
 
43
  } // End class.
44
 
45
  // Extend CJTBLockPluginBase.
views/blocks/cjt-block/public/js/optional/pagination.list/pagination.list.js ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ *
3
+ */
4
+ var CJTBlockAssignPanelPaginationList;
5
+
6
+ /**
7
+ *
8
+ */
9
+ (function($) {
10
+
11
+ /**
12
+ * put your comment there...
13
+ *
14
+ * @param assignPanel
15
+ * @param list
16
+ */
17
+ CJTBlockAssignPanelPaginationList = function(assignPanel, list) {
18
+
19
+ /**
20
+ * put your comment there...
21
+ *
22
+ */
23
+ var link = list.data('infoPanel').find('a.pagination-list');
24
+
25
+ /**
26
+ * put your comment there...
27
+ *
28
+ * @type Number
29
+ */
30
+ var loadedCount = 0;
31
+
32
+ /**
33
+ * put your comment there...
34
+ *
35
+ */
36
+ var paginationList = $('<select size="2" class="pagination-options-list"></select>').insertAfter(link);
37
+
38
+ /**
39
+ * put your comment there...
40
+ *
41
+ */
42
+ var _onhide = function(event) {
43
+ // Initialize.
44
+ var element = event.relatedTarget;
45
+ if ((element !== paginationList.get(0)) && (element !== link.get(0))) {
46
+ // Hide list.
47
+ paginationList.hide();
48
+ }
49
+ };
50
+
51
+ /**
52
+ * put your comment there...
53
+ *
54
+ */
55
+ var _onselect = function() {
56
+ // Don't do anything when reseting the selectedIndex
57
+ // through the _onshow method.
58
+ var selectedIndex = parseInt(paginationList.prop('selectedIndex'));
59
+ if (selectedIndex != -1) {
60
+ // Load the number of pages laying between
61
+ // the last loaded page and the new selected one.
62
+ var pagesCount = parseInt(paginationList.val()) - loadedCount;
63
+ // Load pages.
64
+ assignPanel.list_GetAPOP.apply(list, [false, pagesCount]);
65
+ // Close.
66
+ paginationList.hide();
67
+ }
68
+ };
69
+
70
+ /**
71
+ * put your comment there...
72
+ *
73
+ */
74
+ var _onshow = function() {
75
+ // Disable all items until the loaded page.
76
+ var realLoadedCount = list.data('loadedPages');
77
+ // Disable all options that is already loaded and
78
+ // not captured by the list as a reult o external
79
+ // loading through the list scrollbar.
80
+ for (var pageNo = (loadedCount + 1); pageNo <= realLoadedCount; pageNo++) {
81
+ paginationList.children().eq(pageNo - 1).prop('disabled', true);
82
+ }
83
+ // Update loaded count
84
+ loadedCount = realLoadedCount;
85
+ // Set position.
86
+ paginationList.prop('selectedIndex', -1)
87
+ .show();
88
+ };
89
+
90
+ /**
91
+ *
92
+ */
93
+ this.reset = function() {
94
+ // Create pages list.
95
+ var pagesCount = Math.ceil(list.data('totalItemsCount') / assignPanel.getIPerPage());
96
+ // Clear list.
97
+ paginationList.empty();
98
+ // Add page numbers.
99
+ for (var pageNo = 1; pageNo <= pagesCount; pageNo++) {
100
+ // Create page option.
101
+ var option = $('<option></option>').prop('value', pageNo).text(pageNo)
102
+ // Add it
103
+ .appendTo(paginationList);
104
+ }
105
+ // Reset vars.
106
+ loadedCount = 0;
107
+ }
108
+
109
+ // Show/Hide list when mouse is overed.
110
+ link.mouseenter($.proxy(_onshow, this))
111
+ .mouseleave($.proxy(_onhide, this));
112
+ paginationList.mouseleave($.proxy(_onhide, this))
113
+
114
+ // Select item.
115
+ paginationList.change($.proxy(_onselect, this));
116
+ };
117
+
118
+ })(jQuery);
views/blocks/cjt-block/public/js/optional/revision/revision.js ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ *
3
+ */
4
+
5
+ var CJTBlockOptionalRevision = null;
6
+
7
+ /**
8
+ *
9
+ */
10
+ (function($) {
11
+
12
+ /**
13
+ * put your comment there...
14
+ *
15
+ */
16
+ CJTBlockOptionalRevision = function(block, revision) {
17
+
18
+ /**
19
+ *
20
+ */
21
+ this.assignPanel = null;
22
+
23
+ /**
24
+ * put your comment there...
25
+ *
26
+ */
27
+ var activateTab = function(type) {
28
+ // Initialize.
29
+ var assignPanel = block.pagesPanel.jElement;
30
+ // Activate the AUX tab by default.
31
+ assignPanel.find('li.type-' + type + '>a').trigger('click');
32
+ assignPanel.tabs({collapsible : false});
33
+ };
34
+
35
+ /**
36
+ * put your comment there...
37
+ *
38
+ * @param block
39
+ * @param Revision
40
+ */
41
+ this.CJTBlockOptionalRevision = function() {
42
+ // Initialize parent.
43
+ this.CJTBlockOptionalRevisionBase(block, revision);
44
+ // Handle switch state event.
45
+ this.onSwitchState = this._onswitchstate;
46
+ this.onRestoreDone = this._onrestoredone;
47
+ this.onBeforeSwitchState = this._onbeforeswitchstate;
48
+ // Initialize.
49
+ this.assignPanel = block.pagesPanel;
50
+ }
51
+
52
+ /**
53
+ *
54
+ */
55
+ this._onbeforeswitchstate = function() {
56
+ // deactivate all tabs while processing.
57
+ block.pagesPanel.jElement.tabs({collapsible : true, active : false});
58
+ }
59
+
60
+ /**
61
+ *
62
+ */
63
+ this._onrestoredone = function() {
64
+ // Clear original cache except of 'code' property.
65
+ this.original = {code : this.revision.code};
66
+ }
67
+
68
+ /**
69
+ *
70
+ */
71
+ this._onswitchstate = function() {
72
+ // Whenever we're in revision mode enter the load-assigned-only-mode.
73
+ this.assignPanel.loadAssignedOnlyMode = (this.state == 'revision');
74
+ switch (this.state) {
75
+ case 'revision':
76
+ // If we're in revision mode set modeBlockId
77
+ this.assignPanel.modeBlockId = revision['id'];
78
+ break;
79
+ default : // Revert back to normal state.
80
+ // Reset alternate block Id.
81
+ this.assignPanel.modeBlockId = null;
82
+ break;
83
+ }
84
+ // Reset assignpanel selected TAB.
85
+ activateTab('advanced');
86
+ }
87
+
88
+ // Construct parent.
89
+ this.CJTBlockOptionalRevision(block, revision);
90
+
91
+ } // End Prototype.
92
+
93
+ // Extend CJTBlockOptionalRevisionBase prototype.
94
+ CJTBlockOptionalRevision.prototype = new CJTBlockOptionalRevisionBase();
95
+
96
+ })(jQuery);
views/blocks/cjt-block/tmpl/default.html.tmpl CHANGED
@@ -11,5 +11,5 @@ $blockView = $this->getBlockView();
11
  $blockContent = $blockView->getTemplate($blockView->templateName);
12
 
13
  // Put the Objects Panel at the begning of the block content.
14
- echo $this->getTemplate('objects-panel', array('block' => $blockView->getBlock()), 'tmpl/templates');
15
  echo $blockContent;
11
  $blockContent = $blockView->getTemplate($blockView->templateName);
12
 
13
  // Put the Objects Panel at the begning of the block content.
14
+ echo $this->getTemplate('default', array('block' => $blockView->getBlock()), 'tmpl/templates/assign-panel');
15
  echo $blockContent;
views/blocks/cjt-block/tmpl/templates/assign-panel/default.html.tmpl ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Define tabs.
3
+ $tabs = array(
4
+ 'tab' => array('id' => 'tabs', 'class'=> 'cjt-pages-tab'),
5
+ 'tabs' => array(
6
+ 'pages' => array(
7
+ 'title' => cssJSToolbox::getText('Pages'),
8
+ 'renderer' => 'objects-list',
9
+ 'type' => array('type' => 'page',
10
+ 'group' => 'pages',
11
+ 'targetType' => 'post')
12
+ ),
13
+ 'posts' => array(
14
+ 'title' => cssJSToolbox::getText('Posts'),
15
+ 'renderer' => 'objects-list',
16
+ 'type' => array('type' => 'post',
17
+ 'group' => 'posts',
18
+ 'targetType' => 'post')
19
+ ),
20
+ 'categories' => array(
21
+ 'title' => cssJSToolbox::getText('Categories'),
22
+ 'renderer' => 'objects-list',
23
+ 'type' => array('type' => 'category',
24
+ 'group' => 'categories',
25
+ 'targetType' => 'taxonomy')
26
+ ),
27
+ 'custom-posts' => array(
28
+ 'title' => cssJSToolbox::getText('Custom Posts'),
29
+ 'renderer' => 'custom-posts'
30
+ ),
31
+ 'other' => array(
32
+ 'title' => cssJSToolbox::getText('Auxiliary'),
33
+ 'renderer' => 'objects-list',
34
+ 'type' => array('type' => 'auxiliary',
35
+ 'group' => 'pinPoint',
36
+ 'targetType' => 'auxiliary')
37
+ ),
38
+ 'advanced' => array(
39
+ 'title' => cssJSToolbox::getText('Advanced'),
40
+ 'renderer' => 'advanced'
41
+ ),
42
+ )
43
+ );
44
+ ?>
45
+ <div class="cjpageblock">
46
+ <?php
47
+ // Render assigment panel root tab. All nested tabs will be rendered
48
+ // internally by the tab template.
49
+ echo $this->getTemplate('tab',
50
+ array('tab' => $tabs, 'block' => $block),
51
+ 'tmpl/templates/assign-panel/templates'
52
+ );
53
+ ?>
54
+ <div style="clear:both;"></div>
55
+ </div>
views/blocks/cjt-block/tmpl/templates/assign-panel/templates/advanced.html.tmpl ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <div id="advanced-accordion-<?php echo $block->id ?>" class="advanced-accordion">
2
+ <a class="acc-header" href="#" title="<?php echo cssJSToolbox::getText('One URL per line') ?>"><?php echo cssJSToolbox::getText('URLs') ?></a>
3
+ <div class="linklist">
4
+ <textarea cols="31" rows="9" name="cjtoolbox[<?php echo $block->id; ?>][links]" id="cjcode-links-<?php echo $block->id; ?>"><?php echo $block->links; ?></textarea>
5
+ </div>
6
+ <a class="acc-header" href="#" title="<?php echo cssJSToolbox::getText('One Expression per line') ?>"><?php echo cssJSToolbox::getText('Expressions') ?></a>
7
+ <div class="linklist">
8
+ <textarea cols="31" rows="9" name="cjtoolbox[<?php echo $block->id; ?>][expressions]" id="cjcode-expressions-<?php echo $block->id; ?>"><?php echo $block->expressions; ?></textarea>
9
+ </div>
10
+ </div>
views/blocks/cjt-block/tmpl/templates/assign-panel/templates/auxiliarity.html.tmpl ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <ul class="pagelist">
2
+ <li>
3
+ <label>
4
+ <?php echo $this->getPinCheckbox('pinPoint', CJTBlockModel::PINS_PAGES_FRONT_PAGE) ?>
5
+ </label>
6
+ <span><a href="<?php bloginfo('url') ?>" target="_blank"><?php echo cssJSToolbox::getText('Front Page') ?></a></span>
7
+ </li>
8
+ <?php
9
+
10
+ foreach ($list as $value => $text) :
11
+ ?>
12
+ <li>
13
+ <label>
14
+ <?php echo $this->getPinCheckbox('pinPoint', $value) ?> <?php echo $text ?>
15
+ </label>
16
+ </li>
17
+ <?php endforeach; ?>
18
+ </ul>
views/blocks/cjt-block/tmpl/templates/assign-panel/templates/custom-posts.html.tmpl ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Create tabs for every custom post under the custom posts tab.
3
+ // Get all registered custom posts.
4
+ $customPosts = get_post_types(array('public' => 1, 'show_ui' => true, '_builtin' => false), 'objects');
5
+ // Get refernce to custom posts tab.
6
+ $items = array();
7
+ // Add tab for every custom post
8
+ // Exclude 'Empty' Custom Post Types.
9
+ foreach ($customPosts as $typeName => $customPost) {
10
+ // Check if has posts.
11
+ $hasPosts = count(get_posts(array('post_type' => $typeName, 'offset' => 0, 'numberposts' => 1)));
12
+ // Add only types with at least one post exists.
13
+ if ($hasPosts) {
14
+ $items[$typeName] = array(
15
+ 'title' => $customPost->labels->name,
16
+ 'renderer' => 'objects-list',
17
+ 'type' => array('type' => $typeName,
18
+ 'group' => 'posts',
19
+ 'targetType' => 'post')
20
+ );
21
+ }
22
+ }
23
+ // If there is no custom posts registered show message
24
+ //, otherwise create the custom-posts accordion
25
+ if (!empty($items)) :
26
+ ?>
27
+ <div id="custom-posts-container-<?php echo $block->id ?>" class="custom-posts-container">
28
+ <?php foreach ($items as $item) : ?>
29
+ <div class="objects-list-button">
30
+ <?php echo $this->getTemplate('inputs-list', array('item' => $item), 'tmpl/templates/assign-panel/templates') ?>
31
+ <a href="#" class="custom-post-item-header"><?php echo $item['title'] ?></a>
32
+ </div>
33
+ <div class="custom-post-list">
34
+ <?php
35
+ // Get item 'renderer' (every tab has template to render) template.
36
+ $tabViewTmpl = $item['renderer'];
37
+ // Use template view for rendering the tab.
38
+ echo $this->getTemplate($tabViewTmpl,
39
+ array('tab' => $item, 'block' => $block),
40
+ 'tmpl/templates/assign-panel/templates'
41
+ );
42
+ ?>
43
+ </div>
44
+ <?php endforeach; ?>
45
+ </div>
46
+ <?php else : ?>
47
+ <div class="list-error">
48
+ <span class="message"><?php echo cssJSToolbox::getText('There are no Custom Posts Defined yet!') ?></span>
49
+ <br />
50
+ <br />
51
+ <span class="desc">This message is displayed if there is no Custom Post types defined or there is no Posts Added under Custom Post types!</span>
52
+ </div>
53
+ <?php endif; ?>
views/blocks/cjt-block/tmpl/templates/assign-panel/templates/inputs-list.html.tmpl ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Extra type item would be sent as FLAT hidden elements
3
+ // Its very stricted but serves the current requiremenets
4
+ // without the need for bundling JSON string-2-object converter.
5
+ // Make sure that the type array is set.
6
+ $type = isset($item['type']) ? $item['type'] : array();
7
+ // For every element add 'hidden-element'.
8
+ foreach ($type as $typeName => $typeValue) :
9
+ ?>
10
+ <input type="hidden" name="<?php echo $typeName ?>" value="<?php echo $typeValue ?>" />
11
+ <?php endforeach; ?>
views/blocks/cjt-block/tmpl/templates/assign-panel/templates/objects-list.html.tmpl ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <ul id="objects-list-<?php echo $tab['type']['type'] ?>-<?php echo $block->id ?>-0" class="pagelist"></ul>
2
+ <div class="info-panel">
3
+ <span class="optional-actions">
4
+ <a href="#" class="pagination-list"></a>
5
+ </span>
6
+ <span class="counter">
7
+ <span class="info-panel-loaded-count">0</span> / <span class="info-panel-total">0</span>
8
+ </span>
9
+ </div>
views/blocks/cjt-block/tmpl/templates/assign-panel/templates/tab.html.tmpl ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div id="<?php echo $tab['tab']['id'] ?>-<?php echo $block->id; ?>" class="objects-list-component <?php echo $tab['tab']['class'] ?>">
2
+ <ul>
3
+ <?php
4
+ /// Create TAB navigator
5
+ foreach ($tab['tabs'] as $name => & $item):
6
+ // Use template name as CSS class for providing a way
7
+ // for identifying the items that has objects-list to fetch.
8
+ $tabViewTmpl = $item['renderer'];
9
+ // Cache item tab ID.
10
+ $item['tabId'] = "{$tab['tab']['id']}-{$block->id}-{$name}";
11
+ ?>
12
+ <li class="<?php echo $tabViewTmpl ?>-button type-<?php echo $name ?>">
13
+ <?php echo $this->getTemplate('inputs-list', array('item' => $item), 'tmpl/templates/assign-panel/templates') ?>
14
+ <a href="#<?php echo $item['tabId'] ?>"><?php echo $item['title'] ?></a>
15
+ </li>
16
+ <?php endforeach; ?>
17
+ </ul>
18
+ <?php
19
+ /// Create TAB Views.
20
+ foreach ($tab['tabs'] as $name => & $item):
21
+ // Get item 'renderer' (every tab has template to render.) template.
22
+ $tabViewTmpl = $item['renderer'];
23
+ ?>
24
+ <div id="<?php echo $item['tabId'] ?>" class="cjt-tab-item-<?php echo $name ?>">
25
+ <?php // Use template view for rendering the tab.
26
+ echo $this->getTemplate($tabViewTmpl,
27
+ array('tab' => $item, 'block' => $block),
28
+ 'tmpl/templates/assign-panel/templates'
29
+ );
30
+ ?>
31
+ </div>
32
+ <?php endforeach; ?>
33
+ </div>
views/blocks/cjt-block/view.php CHANGED
@@ -59,7 +59,12 @@ class CJTBlocksCjtBlockView extends CJTView {
59
  CJTBlocksBlockView::enqueueScripts();
60
  self::useScripts(__CLASS__,
61
  'jquery-ui-tabs',
62
- 'jquery-ui-accordion',
 
 
 
 
 
63
  'views:blocks:cjt-block:public:js:{CJT_CJT_BLOCK-}jquery.block'
64
  );
65
  }
59
  CJTBlocksBlockView::enqueueScripts();
60
  self::useScripts(__CLASS__,
61
  'jquery-ui-tabs',
62
+ 'jquery-ui-accordion',
63
+ 'views:blocks:cjt-block:public:js:{CJT_CJT_BLOCK-}jquery.assignpanel',
64
+ 'views:blocks:cjt-block:public:js:{CJT_CJT_BLOCK-}blockproperty',
65
+ 'views:blocks:cjt-block:public:js:optional:{CJT_CJT_BLOCK-}pagination.list',
66
+ 'views:blocks:cjt-block:public:js:optional:{CJT_CJT_BLOCK-}revision',
67
+ 'views:blocks:cjt-block:public:js:{CJT_CJT_BLOCK-}block',
68
  'views:blocks:cjt-block:public:js:{CJT_CJT_BLOCK-}jquery.block'
69
  );
70
  }
views/blocks/manager/public/css/blocks.css CHANGED
@@ -3,9 +3,9 @@
3
  .wrap { position: relative; }
4
  .cjt-banner-bar .cjt-banner-link a, .cjt-banner-bar a:hover, .cjt-banner-bar a:visited{color: #A5581B;}
5
  #cjt-banner-bar-right {right: 0px;position: absolute;top: 2px;}
6
- #cjt-banner-bar-right .cjt-banner-link {float: right; margin-bottom: 6px;}
7
 
8
- #get-packages {margin-left: 15px;}
9
  #get-packages-icon {display: inline-block; width: 13px; height: 15px; background-image: url('../images/get-packages.png'); margin-left: 3px;margin-bottom: -4px; margin-right: 5px;}
10
 
11
  #review-icon {display: inline-block; width: 75px; height: 14px; background-image: url('../images/review.png');margin-bottom: -2px; margin-left: 12px;}
@@ -78,8 +78,9 @@
78
  padding-left: 43px !important;
79
  }
80
  .cjt-toolbox-blocks a.cjttbl-restore.cjttbs-disabled {
81
- height: 10px !important;
82
  margin-left: 40px;
 
83
  }
84
  .cjt-toolbox-blocks a.cjttbl-delete-all { background: url(../images/toolbox/delete-all.png) no-repeat; }
85
  .cjt-toolbox-blocks a.cjttbl-delete-empty { background: url(../images/toolbox/delete-empty.png) no-repeat; }
3
  .wrap { position: relative; }
4
  .cjt-banner-bar .cjt-banner-link a, .cjt-banner-bar a:hover, .cjt-banner-bar a:visited{color: #A5581B;}
5
  #cjt-banner-bar-right {right: 0px;position: absolute;top: 2px;}
6
+ #cjt-banner-bar-right .cjt-banner-link {margin-bottom: 6px;}
7
 
8
+ #get-packages {margin-left: 5px;}
9
  #get-packages-icon {display: inline-block; width: 13px; height: 15px; background-image: url('../images/get-packages.png'); margin-left: 3px;margin-bottom: -4px; margin-right: 5px;}
10
 
11
  #review-icon {display: inline-block; width: 75px; height: 14px; background-image: url('../images/review.png');margin-bottom: -2px; margin-left: 12px;}
78
  padding-left: 43px !important;
79
  }
80
  .cjt-toolbox-blocks a.cjttbl-restore.cjttbs-disabled {
81
+ height: 11px !important;
82
  margin-left: 40px;
83
+ top: 2px;
84
  }
85
  .cjt-toolbox-blocks a.cjttbl-delete-all { background: url(../images/toolbox/delete-all.png) no-repeat; }
86
  .cjt-toolbox-blocks a.cjttbl-delete-empty { background: url(../images/toolbox/delete-empty.png) no-repeat; }
views/blocks/manager/public/images/CSS_JS_Toolbox_Icon.png CHANGED
Binary file
views/blocks/manager/public/js/blocks/blocks.js CHANGED
@@ -23,6 +23,11 @@ var CJTBlocks;
23
  */
24
  this.hasBlocksElement = CJTBlocksPage.blocksForm.find('input:hidden#cjt-hasBlocks');
25
 
 
 
 
 
 
26
  /**
27
  *
28
  */
@@ -57,6 +62,13 @@ var CJTBlocks;
57
  return isChanged;
58
  }
59
 
 
 
 
 
 
 
 
60
  /*
61
  *
62
  *
23
  */
24
  this.hasBlocksElement = CJTBlocksPage.blocksForm.find('input:hidden#cjt-hasBlocks');
25
 
26
+ /**
27
+ *
28
+ */
29
+ this.nextId = 1;
30
+
31
  /**
32
  *
33
  */
62
  return isChanged;
63
  }
64
 
65
+ /**
66
+ *
67
+ */
68
+ this.getUFI = function(changes) {
69
+ return this.nextId++;
70
+ }
71
+
72
  /*
73
  *
74
  *
views/blocks/manager/tmpl/blocks.html.tmpl CHANGED
@@ -8,27 +8,38 @@ defined('ABSPATH') or die("Access denied");
8
  ?>
9
  <div id="cjtoolbox-admin" class="wrap">
10
  <div id="custom-icon" class="icon32 blocks-icon32"></div>
11
- <h2><?php echo cssJSToolbox::getText('CSS & Javascript Toolbox V6 CE') ?></h2>
12
  <div id="cjt-banner-bar-left" class="cjt-banner-bar ">
13
- <span class="cjt-banner-link">
14
- <?php echo cssJSToolbox::getText('Upgrade To') ?>:&nbsp;&nbsp;
15
- <a target="_blank" href="http://<?php echo cssJSToolbox::CJT_WEB_SITE_DOMAIN ?>/css-javascript-toolbox-v6/"><?php echo cssJSToolbox::getText('CJT V6 Premium') ?></a>
16
- </span>
17
  <span id="get-packages" class="cjt-banner-link">
18
  <span id="get-packages-icon"></span>
19
- <a target="_blank" href="http://<?php echo cssJSToolbox::CJT_WEB_SITE_DOMAIN ?>/category/scripts/"><?php echo cssJSToolbox::getText('Get Script Packages') ?></a>
20
  </span>
21
  </div>
22
- <div id="cjt-banner-bar-right" class="cjt-banner-bar ">
23
  <span class="cjt-banner-link">
24
- <?php echo cssJSToolbox::getText('Support Us?') ?>&nbsp;&nbsp;&nbsp;
 
 
 
 
25
  <a target="_blank" href="http://wordpress.org/support/view/plugin-reviews/css-javascript-toolbox#postform">
26
  <?php echo cssJSToolbox::getText('Rate & Review') ?>
27
  <span id="review-icon"></span>
28
  </a>
29
  </span>
30
  <br>
31
- <span class="cjt-banner-link"><?php echo cssJSToolbox::getText('Need Help?') ?>&nbsp;&nbsp;&nbsp;<a target="_blank" href="http://<?php echo cssJSToolbox::CJT_WEB_SITE_DOMAIN ?>/css-javascript-toolbox-free/"><?php echo cssJSToolbox::getText('CJT V6 CE User Manual') ?></a></span>
 
 
 
 
 
 
 
32
  </div>
33
  <form id="cjtoolbox-blocks-page-form" method="post">
34
  <?php wp_nonce_field('cjtoolbox'); ?>
8
  ?>
9
  <div id="cjtoolbox-admin" class="wrap">
10
  <div id="custom-icon" class="icon32 blocks-icon32"></div>
11
+ <h2><?php echo cssJSToolbox::getText('CSS & Javascript Toolbox Free') ?></h2>
12
  <div id="cjt-banner-bar-left" class="cjt-banner-bar ">
13
+ <span class="cjt-banner-link" style="margin-left: 47px;">
14
+ <?php echo cssJSToolbox::getText('Click for') ?>:&nbsp;&nbsp;
15
+ <a target="_blank" href="http://<?php echo cssJSToolbox::CJT_WEB_SITE_DOMAIN ?>/css-javascript-toolbox-pro/"><?php echo cssJSToolbox::getText('Pro Edition') ?></a>
16
+ </span>&nbsp;&nbsp;|
17
  <span id="get-packages" class="cjt-banner-link">
18
  <span id="get-packages-icon"></span>
19
+ <a target="_blank" href="http://<?php echo cssJSToolbox::CJT_WEB_SITE_DOMAIN ?>/category/scripts/"><?php echo cssJSToolbox::getText('Script Packages') ?></a>
20
  </span>
21
  </div>
22
+ <div id="cjt-banner-bar-right" class="cjt-banner-bar">
23
  <span class="cjt-banner-link">
24
+ <?php echo cssJSToolbox::getText('Support') ?>:&nbsp;&nbsp;&nbsp;
25
+ <span class="cjt-banner-link">
26
+ <a target="_blank" href="http://<?php echo cssJSToolbox::CJT_WEB_SITE_DOMAIN ?>/cjt-feature-requests/"><?php echo cssJSToolbox::getText('Request Feature') ?></a>
27
+ </span>
28
+ &nbsp;&nbsp;|&nbsp;&nbsp;
29
  <a target="_blank" href="http://wordpress.org/support/view/plugin-reviews/css-javascript-toolbox#postform">
30
  <?php echo cssJSToolbox::getText('Rate & Review') ?>
31
  <span id="review-icon"></span>
32
  </a>
33
  </span>
34
  <br>
35
+ <span class="cjt-banner-link" style="float: right;">
36
+ <?php echo cssJSToolbox::getText('Need Help?') ?>&nbsp;&nbsp;&nbsp;
37
+ <a target="_blank" href="http://<?php echo cssJSToolbox::CJT_WEB_SITE_DOMAIN ?>/category/how-to/"><?php echo cssJSToolbox::getText('How-To') ?></a>
38
+ &nbsp;&nbsp;|&nbsp;&nbsp;
39
+ <span class="cjt-banner-link">
40
+ <a target="_blank" href="<?php echo CJTOOLBOX_URL ?>/docs/CJTV6CEUserManual.pdf"><?php echo cssJSToolbox::getText('User Manual') ?></a>
41
+ </span>
42
+ </span>
43
  </div>
44
  <form id="cjtoolbox-blocks-page-form" method="post">
45
  <?php wp_nonce_field('cjtoolbox'); ?>
views/blocks/revisions/public/js/revisions/revisions.js CHANGED
@@ -48,7 +48,7 @@
48
  .success(
49
  function(revisionData) {
50
  // Copy revision data.
51
- blockRevisions.block.copy(revisionData);
52
  // Remove Popup.
53
  window.parent.tb_remove();
54
  }
48
  .success(
49
  function(revisionData) {
50
  // Copy revision data.
51
+ blockRevisions.block.restoreRevision(revisionId, revisionData);
52
  // Remove Popup.
53
  window.parent.tb_remove();
54
  }
views/setup/activation-form/public/css/default.css CHANGED
@@ -13,7 +13,9 @@ ul.fields-list {}
13
  #license-state {width: 16px; height: 18px; display: inline-block; position: relative; top: 3px; visibility: hidden;}
14
  #license-state.activate {background : url('../images/activate.png') no-repeat;}
15
  #license-state.deactivate {background : url('../images/deactivate.png') no-repeat;}
16
- #license-state.valid {background : url('../images/valid.png') no-repeat;}
 
 
17
  #license-state.invalid{background : url('../images/invalid.png') no-repeat;}
18
  #license-state.reset{background : url('../images/reset.png') no-repeat;}
19
  #license-state.error{background : url('../images/error.png') no-repeat;}
13
  #license-state {width: 16px; height: 18px; display: inline-block; position: relative; top: 3px; visibility: hidden;}
14
  #license-state.activate {background : url('../images/activate.png') no-repeat;}
15
  #license-state.deactivate {background : url('../images/deactivate.png') no-repeat;}
16
+ #license-state.valid,
17
+ #license-state.inactive,
18
+ #license-state.site_inactive {background : url('../images/valid.png') no-repeat;}
19
  #license-state.invalid{background : url('../images/invalid.png') no-repeat;}
20
  #license-state.reset{background : url('../images/reset.png') no-repeat;}
21
  #license-state.error{background : url('../images/error.png') no-repeat;}
views/setup/activation-form/public/js/default/default.js CHANGED
@@ -76,14 +76,6 @@
76
  }
77
  },
78
 
79
- /**
80
- * put your comment there...
81
- *
82
- */
83
- _onreset : function() {
84
- alert('reset!!');
85
- },
86
-
87
  /**
88
  * put your comment there...
89
  *
76
  }
77
  },
78
 
 
 
 
 
 
 
 
 
79
  /**
80
  * put your comment there...
81
  *
views/setup/activation-form/public/js/default/default.localization.php CHANGED
@@ -22,6 +22,8 @@ return array(
22
  'activateActionStateName' => cssJSToolbox::getText('Activating Key'),
23
  'deactivateActionStateName' => cssJSToolbox::getText('Deactivating key'),
24
  'checkActionStateName' => cssJSToolbox::getText('Checking Key'),
 
 
25
  'resetActionStateName' => cssJSToolbox::getText('Reseting License Information'),
26
  /* State names */
27
  'invalidStateName' => cssJSToolbox::getText('Invalid'),
@@ -30,6 +32,7 @@ return array(
30
  'activateStateName' => cssJSToolbox::getText('Activated'),
31
  'deactivateStateName' => cssJSToolbox::getText('Deactivated'),
32
  'resetStateName' => cssJSToolbox::getText('Reseted'),
 
33
  /* Request message to be showed after the request is completed! */
34
  'readvalidRequestMessage' => cssJSToolbox::getText('License key is activate! Thank you!'),
35
  'resetvalidRequestMessage' => cssJSToolbox::getText('License Cache has been reseted!'),
@@ -45,6 +48,8 @@ return array(
45
  'checkvalidRequestMessage' => cssJSToolbox::getText('The ckeck operation detects that the provided key is a valid key!'),
46
  'checkinvalidRequestMessage' => cssJSToolbox::getText('The check operation detects that the provided key is an invalid key!'),
47
  'checkerrorRequestMessage' => cssJSToolbox::getText('Could not check License Key due to the server error!'),
 
 
48
 
49
  'resetButtonCaption' => cssJSToolbox::getText('Reset'),
50
  /* Validation */
22
  'activateActionStateName' => cssJSToolbox::getText('Activating Key'),
23
  'deactivateActionStateName' => cssJSToolbox::getText('Deactivating key'),
24
  'checkActionStateName' => cssJSToolbox::getText('Checking Key'),
25
+ 'site_inactiveStateName' => cssJSToolbox::getText('Key is not activated/used yet'),
26
+ 'inactiveStateName' => cssJSToolbox::getText('Key is inactive'),
27
  'resetActionStateName' => cssJSToolbox::getText('Reseting License Information'),
28
  /* State names */
29
  'invalidStateName' => cssJSToolbox::getText('Invalid'),
32
  'activateStateName' => cssJSToolbox::getText('Activated'),
33
  'deactivateStateName' => cssJSToolbox::getText('Deactivated'),
34
  'resetStateName' => cssJSToolbox::getText('Reseted'),
35
+
36
  /* Request message to be showed after the request is completed! */
37
  'readvalidRequestMessage' => cssJSToolbox::getText('License key is activate! Thank you!'),
38
  'resetvalidRequestMessage' => cssJSToolbox::getText('License Cache has been reseted!'),
48
  'checkvalidRequestMessage' => cssJSToolbox::getText('The ckeck operation detects that the provided key is a valid key!'),
49
  'checkinvalidRequestMessage' => cssJSToolbox::getText('The check operation detects that the provided key is an invalid key!'),
50
  'checkerrorRequestMessage' => cssJSToolbox::getText('Could not check License Key due to the server error!'),
51
+ 'checksite_inactiveRequestMessage' => cssJSToolbox::getText('The ckeck operation detects that the provided key is a valid key! The key is not being activated yet.'),
52
+ 'checkinactiveRequestMessage' => cssJSToolbox::getText('The ckeck operation detects that the provided key is a valid key! The license key need to be activated from the CJT Website.'),
53
 
54
  'resetButtonCaption' => cssJSToolbox::getText('Reset'),
55
  /* Validation */