From 1b2bf32ddea23ad814505862fa10b5d82ff40919 Mon Sep 17 00:00:00 2001 From: Andre Lorbach Date: Thu, 26 Mar 2015 10:49:10 +0100 Subject: [PATCH] Autofocus "Enable/disable personal Options" button in admin panel Added javscript code to automatically set focus on the button after page load. --- src/admin/index.php | 13 +++++++++++++ src/templates/admin/admin_index.html | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/admin/index.php b/src/admin/index.php index 0eafe08..a7451a7 100644 --- a/src/admin/index.php +++ b/src/admin/index.php @@ -94,10 +94,23 @@ if ( isset($_GET['op']) && isset($_GET['value']) ) { $iNewVal = intval($_GET['value']); if ( $iNewVal == 1 ) + { + // Set UserOption $USERCFG['UserOverwriteOptions'] = 1; + + // Add some javascript to FOcus the enable/disable user button + $content['EXTRA_JAVASCRIPT'] .= ""; + } else + { + // Set UserOption $USERCFG['UserOverwriteOptions'] = 0; + // Add some javascript to FOcus the enable/disable user button + $content['EXTRA_JAVASCRIPT'] .= ""; + } + + // Enable User Options! WriteConfigValue( "UserOverwriteOptions", false, $content['SESSION_USERID'] ); } diff --git a/src/templates/admin/admin_index.html b/src/templates/admin/admin_index.html index 476264a..af98c2b 100644 --- a/src/templates/admin/admin_index.html +++ b/src/templates/admin/admin_index.html @@ -23,7 +23,7 @@
-
+