From d700b89628dc9475af2e7ef9b42102ee2e05e5bd Mon Sep 17 00:00:00 2001 From: plegall Date: Fri, 29 Nov 2013 13:00:40 +0000 Subject: smartpocket, configuration: simpler yes/no checkboxes (with fontello icons, same as AdminTools checkboxes) git-svn-id: http://piwigo.org/svn/trunk@25752 68402e56-0260-453c-a942-63ccdbb3a9ee --- themes/smartpocket/admin/admin.inc.php | 4 +-- themes/smartpocket/admin/admin.tpl | 54 ++++++++++++++++++++++------------ 2 files changed, 38 insertions(+), 20 deletions(-) (limited to 'themes/smartpocket') diff --git a/themes/smartpocket/admin/admin.inc.php b/themes/smartpocket/admin/admin.inc.php index e9fd8326f..a5a9300c4 100644 --- a/themes/smartpocket/admin/admin.inc.php +++ b/themes/smartpocket/admin/admin.inc.php @@ -10,8 +10,8 @@ $config_send= array(); if(isset($_POST['submit_smartpocket'])) { - $config_send['loop']=(isset($_POST['loop']) and $_POST['loop']=="false") ? false : true; - $config_send['autohide']=(isset($_POST['autohide']) and $_POST['autohide']=="0") ? 0 : 5000; + $config_send['loop'] = isset($_POST['loop']); + $config_send['autohide'] = (isset($_POST['autohide']) ? 5000 : 0); $conf['smartpocket'] = serialize($config_send); conf_update_param('smartpocket', pwg_db_real_escape_string($conf['smartpocket'])); diff --git a/themes/smartpocket/admin/admin.tpl b/themes/smartpocket/admin/admin.tpl index 26cae2160..e903622fd 100644 --- a/themes/smartpocket/admin/admin.tpl +++ b/themes/smartpocket/admin/admin.tpl @@ -1,12 +1,27 @@ -{combine_css path="themes/default/js/ui/theme/jquery.ui.button.css"} -{combine_css path="themes/smartpocket/admin/jquery.ui.button.css"} -{footer_script require='jquery.ui.button'} -{literal} -jQuery(document).ready(function(){ - jQuery( ".radio" ).buttonset(); +{html_style} +.graphicalCheckbox { + font-size:16px; + line-height:16px; +} + +input[type=checkbox] { + display:none; +} +{/html_style} + +{footer_script}{literal} +jQuery(document).ready(function() { + jQuery('form li label input[type=checkbox]').change(function() { + var graphicalCheckbox = jQuery(this).parent().find('.graphicalCheckbox'); + if (jQuery(this).is(':checked')) { + jQuery(graphicalCheckbox).removeClass('icon-check-empty').addClass('icon-check'); + } + else { + jQuery(graphicalCheckbox).removeClass('icon-check').addClass('icon-check-empty'); + } + }); }); -{/literal} -{/footer_script} +{/literal}{/footer_script}

{'Smartpocket, Configuration Page'|@translate}

@@ -16,16 +31,19 @@ jQuery(document).ready(function(){
{'Slideshow Options'|@translate}
    -
  • - - - -
  • -
  • - - - -
  • + +
  • + +
  • +
-- cgit v1.2.3