function panels_ajax_flexible_edit_resize in Panels 7.3
Same name and namespace in other branches
- 6.3 plugins/layouts/flexible/flexible.inc \panels_ajax_flexible_edit_resize()
AJAX responder to store resize information when the user adjusts splitter.
1 string reference to 'panels_ajax_flexible_edit_resize'
- flexible.inc in plugins/
layouts/ flexible/ flexible.inc - Flexible layout plugin.
File
- plugins/
layouts/ flexible/ flexible.inc, line 1706 - Flexible layout plugin.
Code
function panels_ajax_flexible_edit_resize($handler) {
ctools_include('ajax');
$settings =& $handler->display->layout_settings;
panels_flexible_convert_settings($settings, $handler->plugins['layout']);
$settings['items'][$_POST['left']]['width'] = $_POST['left_width'];
if (!empty($_POST['right']) && $_POST['right'] != $_POST['left']) {
$settings['items'][$_POST['right']]['width'] = $_POST['right_width'];
}
// Save our new state.
panels_edit_cache_set($handler->cache);
$handler->commands = array(
'ok',
);
}