diff --git a/lib/MT/CMS/Plugin.pm b/lib/MT/CMS/Plugin.pm index d3df09e3f..ad32dc676 100644 --- a/lib/MT/CMS/Plugin.pm +++ b/lib/MT/CMS/Plugin.pm @@ -35,6 +35,7 @@ sub cfg_plugins { $param{reset} = 1 if $app->param('reset'); $param{saved} = 1 if $app->param('saved'); $param{mod_perl} = 1 if $ENV{MOD_PERL}; + $param{plugin} = $app->param('plugin'); $param{screen_id} = "list-plugins"; $param{screen_class} = "plugin-settings"; build_plugin_table( $app, param => \%param, scope => $q->param('blog_id') ? 'blog:'.$q->param('blog_id') : 'system' ); @@ -73,6 +74,7 @@ sub save_config { } $app->add_return_arg( saved => 1 ); + $app->add_return_arg( plugin => $profile->{object}->id ); $app->call_return; } @@ -285,7 +287,8 @@ sub build_plugin_table { plugin_config_link => $plugin->config_link(), plugin_config_html => $config_html, plugin_settings_id => $settings->id, - plugin_id => $id, + plugin_id => $plugin->id, + plugin_num => $id, plugin_compat_errors => $registry->{compat_errors}, }; my $block_tags = $plugin->registry('tags', 'block'); diff --git a/tmpl/cms/include/plugins_content_nav.tmpl b/tmpl/cms/include/plugins_content_nav.tmpl index 67b172cff..859fd4001 100644 --- a/tmpl/cms/include/plugins_content_nav.tmpl +++ b/tmpl/cms/include/plugins_content_nav.tmpl @@ -10,15 +10,19 @@ $(document).ready( function() { $(this).parent().addClass('active'); $('#' + newactive).show(); }); + + $('#content-nav ul li a[title="plugin-<$mt:var name="plugin"$>"]').trigger('click'); + if (a && $('#content-nav ul li a[title="'+a[1]+'"]')) { $('#content-nav ul li a[title="'+a[1]+'"]').trigger('click'); } else { $('#content-nav ul li:first-child').find('a').trigger('click'); } + });