]> git.mxchange.org Git - friendica.git/commitdiff
Make the site admin theme setting link go to the currently selected theme
authorHypolite Petovan <hypolite@mrpetovan.com>
Fri, 26 Apr 2019 13:22:08 +0000 (09:22 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Thu, 2 May 2019 13:52:55 +0000 (09:52 -0400)
src/Module/Admin/Site.php
view/templates/admin/site.tpl
view/theme/frio/templates/admin/site.tpl

index b6b6f51794e3b3a0e44896a348e1cd43dc05b055..1bafa9ab39800b1f596f08a52a3ed6d450f33700 100644 (file)
@@ -588,7 +588,7 @@ class Site extends BaseAdminModule
                        '$touch_icon'       => ['touch_icon', L10n::t('Touch icon'), Config::get('system', 'touch_icon'), L10n::t('Link to an icon that will be used for tablets and mobiles.')],
                        '$additional_info'  => ['additional_info', L10n::t('Additional Info'), $additional_info, L10n::t('For public servers: you can add additional information here that will be listed at %s/servers.', get_server())],
                        '$language'         => ['language', L10n::t('System language'), Config::get('system', 'language'), '', $lang_choices],
-                       '$theme'            => ['theme', L10n::t('System theme'), Config::get('system', 'theme'), L10n::t('Default system theme - may be over-ridden by user profiles - <a href="/admin/themes">Change default theme settings</a>'), $theme_choices],
+                       '$theme'            => ['theme', L10n::t('System theme'), Config::get('system', 'theme'), L10n::t('Default system theme - may be over-ridden by user profiles - <a href="/admin/themes" id="cnftheme">Change default theme settings</a>'), $theme_choices],
                        '$theme_mobile'     => ['theme_mobile', L10n::t('Mobile system theme'), Config::get('system', 'mobile-theme', '---'), L10n::t('Theme for mobile devices'), $theme_choices_mobile],
                        '$ssl_policy'       => ['ssl_policy', L10n::t('SSL link policy'), (string)intval(Config::get('system', 'ssl_policy')), L10n::t('Determines whether generated links should be forced to use SSL'), $ssl_choices],
                        '$force_ssl'        => ['force_ssl', L10n::t('Force SSL'), Config::get('system', 'force_ssl'), L10n::t('Force all Non-SSL requests to SSL - Attention: on some systems it could lead to endless loops.')],
index a4df56279da854ae14c0f3f93bd9e357d829002b..823753768eba3291c96ae961dc004259ba644175 100644 (file)
@@ -1,4 +1,12 @@
-<div id='adminpage'>
+<script>
+       $(function(){
+               $("#cnftheme").click(function(){
+                       document.location.assign("{{$baseurl}}/admin/themes/" + $("#id_theme :selected").val());
+                       return false;
+               });
+       });
+</script>
+<div id="adminpage">
        <h1>{{$title}} - {{$page}}</h1>
 
        <form action="{{$baseurl}}/admin/site" method="post">
index 2cebb620bcdf6241fbfb8a4f5c779aca3a7ac196..4c0a6ce06667a241cd9add9be8ac16547975e4d7 100644 (file)
                                $(element).addClass('in');
                        window.scroll(0, $(element).offset().top - 120);
                }
+
+               $("#cnftheme").click(function(){
+                       document.location.assign("{{$baseurl}}/admin/themes/" + $("#id_theme :selected").val());
+                       return false;
+               });
        });
 </script>
 <link rel="stylesheet" href="view/theme/frio/css/mod_admin.css" type="text/css" media="screen"/>