Author: ornicar2
Date: 2010-02-12 21:45:44 +0100 (Fri, 12 Feb 2010)
New Revision: 27977
Added:
plugins/diemPlugin/trunk/dmAdminPlugin/lib/view/html/dmAdminPageTreeView.php
Removed:
plugins/diemPlugin/trunk/dmAdminPlugin/lib/view/html/dmAdminRecursivePageList.php
Modified:
plugins/diemPlugin/trunk/dmAdminPlugin/config/dm/services.yml
plugins/diemPlugin/trunk/dmAdminPlugin/lib/response/asset/dmAdminAssetConfig.php
plugins/diemPlugin/trunk/dmAdminPlugin/modules/dmInterface/actions/actions.class.php
plugins/diemPlugin/trunk/dmAdminPlugin/web/js/dmAdminPageBar.js
Log:
[Diem]
- added jquery.jstree beta2
- added page_tree_view service with two implementations: front & admin
- made front & admin page panel use the new jstree
- updated page tree sprite icons
- fixed indentation in JavaScripts
- removed deprecated class dmRecursivePageList
- removed dmFlowPlayerPlugin tests from test project
Modified: plugins/diemPlugin/trunk/dmAdminPlugin/config/dm/services.yml
===================================================================
--- plugins/diemPlugin/trunk/dmAdminPlugin/config/dm/services.yml
2010-02-12 20:29:08 UTC (rev 27976)
+++ plugins/diemPlugin/trunk/dmAdminPlugin/config/dm/services.yml
2010-02-12 20:45:44 UTC (rev 27977)
@@ -72,7 +72,9 @@
log_view.log: # The log to render
log_view.options:
show_ip: true # whether to show users IP
-
+
+ page_tree_view.class: dmAdminPageTreeView # Render the page tree
+
services:
homepage_manager:
Modified:
plugins/diemPlugin/trunk/dmAdminPlugin/lib/response/asset/dmAdminAssetConfig.php
===================================================================
---
plugins/diemPlugin/trunk/dmAdminPlugin/lib/response/asset/dmAdminAssetConfig.php
2010-02-12 20:29:08 UTC (rev 27976)
+++
plugins/diemPlugin/trunk/dmAdminPlugin/lib/response/asset/dmAdminAssetConfig.php
2010-02-12 20:45:44 UTC (rev 27977)
@@ -40,6 +40,7 @@
'lib.fieldSelection',
'lib.blockUI',
'lib.hotkeys',
+ 'lib.jstree',
'core.config',
'core.plugins',
'core.editPlugins',
Copied:
plugins/diemPlugin/trunk/dmAdminPlugin/lib/view/html/dmAdminPageTreeView.php
(from rev 27942,
plugins/diemPlugin/trunk/dmAdminPlugin/lib/view/html/dmAdminRecursivePageList.php)
===================================================================
---
plugins/diemPlugin/trunk/dmAdminPlugin/lib/view/html/dmAdminPageTreeView.php
(rev 0)
+++
plugins/diemPlugin/trunk/dmAdminPlugin/lib/view/html/dmAdminPageTreeView.php
2010-02-12 20:45:44 UTC (rev 27977)
@@ -0,0 +1,11 @@
+<?php
+
+class dmAdminPageTreeView extends dmPageTreeView
+{
+
+ protected function getPageLink(array $page)
+ {
+ return '<a class="tree_node s16 s16_page_'.($page[1] === 'show' ? 'auto' :
'manual').'" href="'.$page[6].'">'.$page[5].'</a>';
+ }
+
+}
\ No newline at end of file
Deleted:
plugins/diemPlugin/trunk/dmAdminPlugin/lib/view/html/dmAdminRecursivePageList.php
===================================================================
---
plugins/diemPlugin/trunk/dmAdminPlugin/lib/view/html/dmAdminRecursivePageList.php
2010-02-12 20:29:08 UTC (rev 27976)
+++
plugins/diemPlugin/trunk/dmAdminPlugin/lib/view/html/dmAdminRecursivePageList.php
2010-02-12 20:45:44 UTC (rev 27977)
@@ -1,11 +0,0 @@
-<?php
-
-class dmAdminRecursivePageList extends dmRecursivePageList
-{
-
- protected function getPageLink(array $page)
- {
- return '<a class="s16 s16_page_'.($page[1] === 'show' ? 'auto' :
'manual').'" href="'.$page[6].'">'.$page[5].'</a>';
- }
-
-}
\ No newline at end of file
Modified:
plugins/diemPlugin/trunk/dmAdminPlugin/modules/dmInterface/actions/actions.class.php
===================================================================
---
plugins/diemPlugin/trunk/dmAdminPlugin/modules/dmInterface/actions/actions.class.php
2010-02-12 20:29:08 UTC (rev 27976)
+++
plugins/diemPlugin/trunk/dmAdminPlugin/modules/dmInterface/actions/actions.class.php
2010-02-12 20:45:44 UTC (rev 27977)
@@ -7,11 +7,9 @@
public function executeLoadPageTree(dmWebRequest $request)
{
- $tree = new dmAdminRecursivePageList();
-
return $this->renderAsync(array(
- 'html' => $tree->render(),
- 'js' => array('lib.tree-component', 'lib.tree-css')
+ 'html' => $this->getService('page_tree_view')->render(),
+ //'js' => array('lib.jstree')
), true);
}
Modified: plugins/diemPlugin/trunk/dmAdminPlugin/web/js/dmAdminPageBar.js
===================================================================
--- plugins/diemPlugin/trunk/dmAdminPlugin/web/js/dmAdminPageBar.js
2010-02-12 20:29:08 UTC (rev 27976)
+++ plugins/diemPlugin/trunk/dmAdminPlugin/web/js/dmAdminPageBar.js
2010-02-12 20:45:44 UTC (rev 27977)
@@ -8,42 +8,19 @@
this.initPageBar();
},
- getTreeOptions: function()
+ getTreeOptions: function($tree)
{
return {
- ui: {
- theme_path: $.dm.ctrl.options.dm_core_asset_root + 'lib/dmTree/',
- theme_name: 'page',
- dots: true,
- hover_mode: false,
- context: null
+ animation: 300,
+ plugins: ['ui', 'cookies', 'html_data', 'themes'],
+ themes: {
+ theme: "pagebar",
+ dots : true,
+ icons: false
},
- rules: {
- clickable: "all", // which node types can the user select | default
- all
- renameable: "none", // which node types can the user select |
default - all
- deletable: "none", // which node types can the user delete | default
- all
- creatable: "none" // which node types can the user create in |
default - all
- },
- callback: {
- ondblclk: function(NODE, TREE_OBJ)
- {
- EV.preventDefault(); EV.stopPropagation(); return false;
-// location.href = $.dm.ctrl.options.script_name+$('a',
NODE).attr('href');
- },
- onselect: function(NODE, TREE_OBJ)
- {
- TREE_OBJ.toggle_branch.call(TREE_OBJ, NODE);
- },
- // right click - to prevent use: EV.preventDefault();
EV.stopPropagation(); return false
- onrgtclk: function(NODE, TREE_OBJ, EV)
- {
- EV.preventDefault(); EV.stopPropagation(); return false;
- }
- },
- cookies: {
- prefix: "dpt"
- },
- selected: 'dmp' + $.dm.ctrl.options.page_id
+ ui: {
+ initially_open: [$tree.find('> ul > li:first').attr('id')]
+ }
};
}
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-svn?hl=en.