コード例 #1
0
ファイル: Controller.php プロジェクト: jfkz/aquarel-cms
 public function listAction()
 {
     $live = \Control\Live::getInstance();
     $page = new \Pages\Page();
     $tree = $page->getTree();
     $form = new \Control\Forms();
     $form->setTitle('Страницы');
     $form->setTemplate('tree');
     $properties = array('animate' => 'true', 'autoclose' => 'false', 'docToFolderConvert' => 'true', 'afterMove' => "if (\$('span:first',destination).parent().attr('id') && \$('span:first',source).parent().attr('id')) {\n                                                        var parent = \$('span:first',destination).parent().attr('id').split('_')['1'];\n                                                        var id = \$('span:first',source).parent().attr('id').split('_')['1'];\n                                                        pages_reorder(parent,id,pos);\n                                                        }", 'afterDblClick' => "var id = \$('span:first',node).parent().attr('id').split('_')['1']; location.href = '#Pages/edit/'+id;", 'afterClick' => '');
     $form->addDraggebleTree($tree, $properties);
     $output = $form->render();
     return $output;
 }