From 21f14320cf08f487d8f4b98b83c2e3ad05e2da62 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Thu, 27 Nov 2014 05:07:04 +0100 Subject: [PATCH 1/9] Untranslatable token in datepicker --- htdocs/core/datepicker.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/datepicker.php b/htdocs/core/datepicker.php index 7e0333bc5aa..67af3c7e083 100644 --- a/htdocs/core/datepicker.php +++ b/htdocs/core/datepicker.php @@ -39,6 +39,7 @@ require_once '../main.inc.php'; if (GETPOST('lang')) $langs->setDefaultLang(GETPOST('lang')); // If language was forced on URL by the main.inc.php $langs->load("main"); +$langs->load("agenda"); $right=($langs->trans("DIRECTION")=='rtl'?'left':'right'); $left=($langs->trans("DIRECTION")=='rtl'?'right':'left'); @@ -57,7 +58,7 @@ if (GETPOST('mode') && GETPOST('mode') == 'test') } else { - print 'Calendar'; + print ''.$langs->trans("Calendar").''; } // Define tradMonths javascript array (we define this in datapicker AND in parent page to avoid errors with IE8) From ea70159a7e72cf5057bc5dc95f5ffb50662f6cab Mon Sep 17 00:00:00 2001 From: aspangaro Date: Thu, 27 Nov 2014 05:07:39 +0100 Subject: [PATCH 2/9] Activate the HTML5 Doctype --- htdocs/main.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index c8553f29291..9250384880b 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -959,11 +959,11 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs if (empty($conf->css)) $conf->css = '/theme/eldy/style.css.php'; // If not defined, eldy by default - print ''; + //print ''; //print ''; //print ''; //print ''; - //print ''; + print ''; print "\n"; if (! empty($conf->global->MAIN_USE_CACHE_MANIFEST)) print ''."\n"; else print ''."\n"; From 92c093055ca148d1253ab2f596e00367b915c1b7 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Thu, 27 Nov 2014 05:41:57 +0100 Subject: [PATCH 3/9] Add meta balise for viewport & scale --- htdocs/main.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 9250384880b..f9ff80dd366 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -975,6 +975,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs // Displays meta print ''."\n"; // Evite indexation par robots print ''."\n"; + print ''."\n"; // Needed for Responsive Web Design $favicon=dol_buildpath('/theme/'.$conf->theme.'/img/favicon.ico',1); if (! empty($conf->global->MAIN_FAVICON_URL)) $favicon=$conf->global->MAIN_FAVICON_URL; print ''."\n"; From b98c0a3208098512a0b9645b578c0a83bfaff2ba Mon Sep 17 00:00:00 2001 From: aspangaro Date: Thu, 27 Nov 2014 20:32:29 +0100 Subject: [PATCH 4/9] Login - Better presentation with RWD --- htdocs/core/tpl/login.tpl.php | 9 +++------ htdocs/theme/eldy/style.css.php | 4 ++-- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php index 23d8dd4f326..844f874a711 100644 --- a/htdocs/core/tpl/login.tpl.php +++ b/htdocs/core/tpl/login.tpl.php @@ -67,6 +67,8 @@ $(document).ready(function () { +
+ @@ -76,7 +78,7 @@ $(document).ready(function () {
-
+
@@ -130,11 +132,6 @@ if (! empty($hookmanager->resArray['options'])) { -
- - - -
diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 5ac8a76fb53..08c5fbcf2ff 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -849,7 +849,7 @@ form#login { vertical-align: middle; } .login_table_title { - max-width: 540px; + max-width: 320px; color: #888888; text-shadow: 1px 1px 1px #FFF; } @@ -863,7 +863,7 @@ form#login { padding-right:6px; padding-top:12px; padding-bottom:12px; - max-width: 540px; + max-width: 320px; background-color: #FFFFFF; From 64260cde726df9979899922b5c04598d77296beb Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sat, 29 Nov 2014 07:07:27 +0100 Subject: [PATCH 5/9] Add button in admin->GUISetup to activate Html5 --- htdocs/admin/ihm.php | 61 +++++++++++++++++++++++------------ htdocs/langs/en_US/admin.lang | 3 +- htdocs/main.inc.php | 4 +-- 3 files changed, 45 insertions(+), 23 deletions(-) diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 23e7cc96363..f2312ee042f 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -53,29 +53,30 @@ $searchformmodule=array('Module1Name','Module1Name','Module50Name','Module50Name if ($action == 'update') { - dolibarr_set_const($db, "MAIN_LANG_DEFAULT", $_POST["main_lang_default"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_MULTILANGS", $_POST["main_multilangs"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", $_POST["main_size_liste_limit"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", $_POST["main_disable_javascript"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_BUTTON_HIDE_UNAUTHORIZED", $_POST["MAIN_BUTTON_HIDE_UNAUTHORIZED"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_START_WEEK", $_POST["MAIN_START_WEEK"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_DAYS", $_POST["MAIN_DEFAULT_WORKING_DAYS"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_HOURS", $_POST["MAIN_DEFAULT_WORKING_HOURS"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_SHOW_LOGO", $_POST["MAIN_SHOW_LOGO"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", $_POST["MAIN_FIRSTNAME_NAME_POSITION"],'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_LANG_DEFAULT", $_POST["main_lang_default"],'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_MULTILANGS", $_POST["main_multilangs"],'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", $_POST["main_size_liste_limit"],'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", $_POST["main_disable_javascript"],'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_BUTTON_HIDE_UNAUTHORIZED", $_POST["MAIN_BUTTON_HIDE_UNAUTHORIZED"],'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_START_WEEK", $_POST["MAIN_START_WEEK"],'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_DAYS", $_POST["MAIN_DEFAULT_WORKING_DAYS"],'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_HOURS", $_POST["MAIN_DEFAULT_WORKING_HOURS"],'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_SHOW_LOGO", $_POST["MAIN_SHOW_LOGO"],'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_ACTIVATE_HTML5", $_POST["MAIN_ACTIVATE_HTML5"],'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", $_POST["MAIN_FIRSTNAME_NAME_POSITION"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_THEME", $_POST["main_theme"],'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_THEME", $_POST["main_theme"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_SEARCHFORM_CONTACT", $_POST["MAIN_SEARCHFORM_CONTACT"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_SEARCHFORM_SOCIETE", $_POST["MAIN_SEARCHFORM_SOCIETE"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_SEARCHFORM_PRODUITSERVICE",$_POST["MAIN_SEARCHFORM_PRODUITSERVICE"],'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_SEARCHFORM_CONTACT", $_POST["MAIN_SEARCHFORM_CONTACT"],'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_SEARCHFORM_SOCIETE", $_POST["MAIN_SEARCHFORM_SOCIETE"],'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_SEARCHFORM_PRODUITSERVICE", $_POST["MAIN_SEARCHFORM_PRODUITSERVICE"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_SEARCHFORM_PRODUITSERVICE_SUPPLIER",$_POST["MAIN_SEARCHFORM_PRODUITSERVICE_SUPPLIER"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_SEARCHFORM_ADHERENT",$_POST["MAIN_SEARCHFORM_ADHERENT"],'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_SEARCHFORM_ADHERENT", $_POST["MAIN_SEARCHFORM_ADHERENT"],'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_HELPCENTER_DISABLELINK", $_POST["MAIN_HELPCENTER_DISABLELINK"],'chaine',0,'',0); // Param for all entities - dolibarr_set_const($db, "MAIN_MOTD", dol_htmlcleanlastbr($_POST["main_motd"]),'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_HOME", dol_htmlcleanlastbr($_POST["main_home"]),'chaine',0,'',$conf->entity); - dolibarr_set_const($db, "MAIN_HELP_DISABLELINK", $_POST["MAIN_HELP_DISABLELINK"],'chaine',0,'',0); // Param for all entities + dolibarr_set_const($db, "MAIN_HELPCENTER_DISABLELINK", $_POST["MAIN_HELPCENTER_DISABLELINK"],'chaine',0,'',0); // Param for all entities + dolibarr_set_const($db, "MAIN_MOTD", dol_htmlcleanlastbr($_POST["main_motd"]),'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_HOME", dol_htmlcleanlastbr($_POST["main_home"]),'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_HELP_DISABLELINK", $_POST["MAIN_HELP_DISABLELINK"],'chaine',0,'',0); // Param for all entities // This one is not always defined if (isset($_POST["MAIN_USE_PREVIEW_TABS"])) dolibarr_set_const($db, "MAIN_USE_PREVIEW_TABS", $_POST["MAIN_USE_PREVIEW_TABS"],'chaine',0,'',$conf->entity); @@ -119,7 +120,7 @@ if ($action == 'edit') // Edit print_fiche_titre($langs->trans("Language"),'','').'
'; print '
'; - print ''; + print ''; print ''; print ''; @@ -172,6 +173,17 @@ if ($action == 'edit') // Edit print ''; print ''; print ''; + + // Activate Html5 - Developement - Only available on Eldy template + if ($conf->global->MAIN_FEATURES_LEVEL == 2 || ! empty($conf->global->MAIN_ACTIVATE_HTML5)) + { + $var=!$var; + print ''; + print ''; + print ''; + } // Max size of lists $var=!$var; @@ -351,6 +363,15 @@ else // Show print ''; print ''; print ""; + + // Activate Html5 - Developement - Only available on Eldy template + if ($conf->global->MAIN_FEATURES_LEVEL == 2 || ! empty($conf->global->MAIN_ACTIVATE_HTML5)) + { + $var=!$var; + print ''; + print ''; + print ""; + } $var=!$var; print ''; diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index a524ff8a5fe..4aee36d73ab 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -887,7 +887,8 @@ MessageLogin=Login page message PermanentLeftSearchForm=Permanent search form on left menu DefaultLanguage=Default language to use (language code) EnableMultilangInterface=Enable multilingual interface -EnableShowLogo=Show logo on left menu +EnableShowLogo=Show logo on left menu +EnableHtml5=Enable Html5 (Developement - Only available on Eldy template) SystemSuccessfulyUpdated=Your system has been updated successfully CompanyInfo=Company/foundation information CompanyIds=Company/foundation identities diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 87b69b56443..199436eae65 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -959,11 +959,11 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs if (empty($conf->css)) $conf->css = '/theme/eldy/style.css.php'; // If not defined, eldy by default - //print ''; + if (empty($conf->global->MAIN_ACTIVATE_HTML5)) print ''; //print ''; //print ''; //print ''; - print ''; + if ($conf->global->MAIN_FEATURES_LEVEL == 2 || ! empty($conf->global->MAIN_ACTIVATE_HTML5)) print ''; // Html5 - Developement - Only available on Eldy template print "\n"; if (! empty($conf->global->MAIN_USE_CACHE_MANIFEST)) print ''."\n"; else print ''."\n"; From c27e2676e3b79db13af1b0f411afc6d14f2ad75c Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sat, 29 Nov 2014 07:08:35 +0100 Subject: [PATCH 6/9] Modify presentation of login page --- htdocs/core/tpl/login.tpl.php | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php index c34894e49c3..a12a960aaec 100644 --- a/htdocs/core/tpl/login.tpl.php +++ b/htdocs/core/tpl/login.tpl.php @@ -67,6 +67,11 @@ $(document).ready(function () { +
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("Parameters").''.$langs->trans("Value").' 
 
'.$langs->trans("EnableHtml5").''; + print $form->selectyesno('MAIN_ACTIVATE_HTML5',$conf->global->MAIN_ACTIVATE_HTML5,1); + print ' 
'.$langs->trans("EnableShowLogo").'' . yn($conf->global->MAIN_SHOW_LOGO) . ' 
'.$langs->trans("EnableHtml5").'' . yn($conf->global->MAIN_ACTIVATE_HTML5) . ' 
'.$langs->trans("DefaultMaxSizeList").'' . $conf->global->MAIN_SIZE_LISTE_LIMIT . '
@@ -74,12 +79,6 @@ $(document).ready(function () {
-