Index: branches/RC/core/units/categories/categories_tag_processor.php =================================================================== diff -u -N -r11931 -r11963 --- branches/RC/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 11931) +++ branches/RC/core/units/categories/categories_tag_processor.php (.../categories_tag_processor.php) (revision 11963) @@ -1,6 +1,6 @@ '#BLOCK#', 'theme-file_event' => '#EVENT#', 'theme_id' => $theme_id, 'source' => $template, 'pass' => 'all,theme-file', 'front' => 1, 'no_amp' => 1); $edit_template_url = $this->Application->HREF('themes/template_edit', ADMIN_DIRECTORY, $url_params, 'index.php'); + + $url_params = Array ('theme-file_event' => 'OnSaveLayout', 'source' => $template, 'pass' => 'all,theme-file', 'no_amp' => 1); + $save_layout_url = $this->Application->HREF('index', '', $url_params); + $this_url = $this->Application->HREF('', '', Array ('editing_mode' => '#EDITING_MODE#', 'no_amp' => 1)); - $ret .= "var aTemplateManager = new TemplateManager('" . $edit_template_url . "', '" . $this_url . "', " . (int)EDITING_MODE . ");\n"; + $ret .= "var aTemplateManager = new TemplateManager('" . $edit_template_url . "', '" . $this_url . "', '" . $save_layout_url . "', " . (int)EDITING_MODE . ");\n"; $ret .= "var \$modal_windows = " . ($this->Application->ConfigValue('UseModalWindows') ? 'true' : 'false') . ";\n"; $ret .= "var main_title = '" . addslashes( $this->Application->ConfigValue('Site_Name') ) . "';" . "\n"; @@ -1427,7 +1431,19 @@ $edit_url = $this->Application->HREF('categories/categories_edit', '/admin', $url_params); - $edit_btn = ' + $edit_btn = ''; + + if (EDITING_MODE == EDITING_MODE_LAYOUT) { + $edit_btn .= ' +
+
+ +
+
Save Layout
+
' . "\n"; + } + + $edit_btn .= '