Commit b0f26636 authored by Nigel McNie's avatar Nigel McNie
Browse files

Remember the category when submitting the view form

parent e4b2ab62
......@@ -221,6 +221,7 @@ function ViewManager() {
removeElementClass(getFirstElementByTagAndClassName('li', 'current', 'category-list'), 'current');
addElementClass(i.parentNode, 'current');
sendjsonrequest(config['wwwroot'] + 'view/blocks.json.php', {'id': $('viewid').value, 'action': 'blocktype_list', 'c': queryString['c']}, 'POST', function(data) {
setNodeAttribute('category', 'value', queryString['c']);
$('blocktype-list').innerHTML = data.data;
self.makeBlockTypesDraggable();
});
......
......@@ -5,6 +5,7 @@
<form action="" method="post">
<input type="hidden" id="viewid" name="id" value="{$view}">
<input type="hidden" name="change" value="1">
<input type="hidden" id="category" name="c" value="{$category}">
{if $new}<input type="hidden" name="new" value="1">{/if}
<div id="page">
<div id="top-pane">
......
......@@ -58,6 +58,7 @@ $smarty->assign('columns', $columns);
// Tell smarty we're editing rather than just rendering
$smarty->assign('editing', true);
$smarty->assign('category', $category);
$smarty->assign('new', $new);
$smarty->assign('view', $view->get('id'));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment