diff options
author | schmelzs | 2010-01-20 16:52:54 +0100 |
---|---|---|
committer | schmelzs | 2010-01-20 16:52:54 +0100 |
commit | 6c09e2d3b2a7e9c7bfeb403c01ec65315833281c (patch) | |
tree | f981c1e45fbe61b13ab7edb63f03b85e37310498 | |
parent | initial import (diff) | |
download | pbs-6c09e2d3b2a7e9c7bfeb403c01ec65315833281c.tar.gz pbs-6c09e2d3b2a7e9c7bfeb403c01ec65315833281c.tar.xz pbs-6c09e2d3b2a7e9c7bfeb403c01ec65315833281c.zip |
added delete function for menu assignments
-rw-r--r-- | application/modules/backend/controllers/MenuController.php | 16 | ||||
-rw-r--r-- | public/js/pbs.js | 12 |
2 files changed, 27 insertions, 1 deletions
diff --git a/application/modules/backend/controllers/MenuController.php b/application/modules/backend/controllers/MenuController.php index f8c6a7f..cdfa30b 100644 --- a/application/modules/backend/controllers/MenuController.php +++ b/application/modules/backend/controllers/MenuController.php @@ -198,6 +198,22 @@ class Backend_MenuController extends Zend_Controller_Action } + public function delassignmentAction() + { + $this->_helper->viewRenderer->setNoRender(); + + $id = (int) $this->getRequest()->getParam("id"); + + $w = $this->_mmenu_assignments->getAdapter()->quoteInto('id = ?', $id); + $this->_mmenu_assignments->delete($w); + + $w = $this->_mmenu_assignment_bmrules->getAdapter()->quoteInto('menu_assignment_rule = ?', $id); + $this->_mmenu_assignment_bmrules->delete($w); + + $w = $this->_mmenu_assignment_iprules->getAdapter()->quoteInto('menu_assignment_rule = ?', $id); + $this->_mmenu_assignment_iprules->delete($w); + } + } diff --git a/public/js/pbs.js b/public/js/pbs.js index f216602..1534138 100644 --- a/public/js/pbs.js +++ b/public/js/pbs.js @@ -498,7 +498,17 @@ var menuCreateAssignmentStep2 = function (name, menu, bootmedia, ip) { ip : ip }, function () { - $("#menuassignments-list-content").load("/backend/menu/listassignments/"); + $("#menuassignment-list-content").load("/backend/menu/listassignments/"); }); }; +var menuAssignmentDelete = function (id) { + $.post("/backend/menu/delassignment", { + id : id + }, + function () { + $("#menuassignment-list-content").load("/backend/menu/listassignments/"); + } + ); + +};
\ No newline at end of file |