From 73e3ef3a823fd6eea98205c5492774bf98daa75c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 18 Jun 2013 22:12:17 +0200 Subject: [PATCH 1/4] Fix: Bad return url --- htdocs/comm/action/index.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 7e59a9e2748..165101e3cfa 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -759,7 +759,9 @@ if (empty($action) || $action == 'show_month') // View by month $newparam=preg_replace('/day=[0-9]+&?/i','',$newparam); $newparam=preg_replace('/month=[0-9]+&?/i','',$newparam); $newparam=preg_replace('/year=[0-9]+&?/i','',$newparam); + $newparam=preg_replace('/viewcal=[0-9]+&?/i','',$newparam); $newparam=preg_replace('/showbirthday_=/i','showbirthday=',$newparam); // Restore correct parameter + $newparam.='&viewcal=1'; echo ''; echo ' '; $i=0; @@ -830,7 +832,9 @@ elseif ($action == 'show_week') // View by week $newparam=preg_replace('/day=[0-9]+&?/i','',$newparam); $newparam=preg_replace('/month=[0-9]+&?/i','',$newparam); $newparam=preg_replace('/year=[0-9]+&?/i','',$newparam); + $newparam=preg_replace('/viewweek=[0-9]+&?/i','',$newparam); $newparam=preg_replace('/showbirthday_=/i','showbirthday=',$newparam); // Restore correct parameter + $newparam.='&viewweek=1'; echo '
'; echo ' '; $i=0; @@ -884,6 +888,8 @@ else // View by day $newparam=$param; // newparam is for birthday links $newparam=preg_replace('/action=show_month&?/i','',$newparam); $newparam=preg_replace('/action=show_week&?/i','',$newparam); + $newparam=preg_replace('/viewday=[0-9]+&?/i','',$newparam); + $newparam.='&viewday=1'; // Code to show just one day $style='cal_current_month'; $today=0; @@ -950,6 +956,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa global $theme_datacolor; global $cachethirdparties, $cachecontacts, $colorindexused; + print '
'."\n"; $curtime = dol_mktime(0, 0, 0, $month, $day, $year); print '
'; @@ -957,7 +964,6 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa print ''; if ($showinfo) print dol_print_date($curtime,'daytext'); else print dol_print_date($curtime,'%d'); @@ -965,6 +971,8 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa print '
'; if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create) { + $newparam.='&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$year; + //$param='month='.$monthshown.'&year='.$year; $hourminsec='100000'; print ''; From 66e0f80aa2cf2195e7641cb277e53ec72ae64031 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 18 Jun 2013 23:28:03 +0200 Subject: [PATCH 2/4] Fix: civility label --- htdocs/contact/class/contact.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 90bd7861435..5787b23463e 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -883,7 +883,8 @@ class Contact extends CommonObject global $langs; $langs->load("dict"); - $code=$this->civilite_id; + $code=(! empty($this->civilite_id)?$this->civilite_id:(! empty($this->civility_id)?$this->civility_id:'')); + if (empty($code)) return ''; return $langs->getLabelFromKey($this->db, "Civility".$code, "c_civilite", "code", "civilite", $code); } From bd8271ee241c023531e5049341bc0ce1fa13c891 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 19 Jun 2013 00:11:42 +0200 Subject: [PATCH 3/4] Fix: hooks for leftmenu must not be loaded if left menu hidden, also hooks were lost into page search_page. --- htdocs/core/search_page.php | 6 +++++- htdocs/main.inc.php | 10 +++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/htdocs/core/search_page.php b/htdocs/core/search_page.php index 0819b4fa6c2..999a24ec782 100644 --- a/htdocs/core/search_page.php +++ b/htdocs/core/search_page.php @@ -61,8 +61,12 @@ print '
'; $nbofsearch=0; +// Instantiate hooks of thirdparty module +$hookmanager->initHooks(array('searchform')); + // Define $searchform -if (! empty($conf->societe->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_SOCIETE) && $user->rights->societe->lire) +// TODO Mutualize code here with function left_menu into main.inc.php page +if ((( ! empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || ! empty($conf->fournisseur->enabled)) && ! empty($conf->global->MAIN_SEARCHFORM_SOCIETE) && $user->rights->societe->lire) { $langs->load("companies"); $searchform.=printSearchForm(DOL_URL_ROOT.'/societe/societe.php', DOL_URL_ROOT.'/societe/societe.php', img_object('','company').' '.$langs->trans("ThirdParties"), 'soc', 'socname'); diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 48231e64bbc..7a5cd2edcc7 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1479,18 +1479,18 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me $searchform=''; $bookmarks=''; - // Instantiate hooks of thirdparty module - $hookmanager->initHooks(array('searchform','leftblock')); - if (empty($conf->dol_hide_leftmenu)) { - if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print "\n".'
'."\n"; + // Instantiate hooks of thirdparty module + $hookmanager->initHooks(array('searchform','leftblock')); + + if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print "\n".'
'."\n"; else print '
'; print "\n"; // Define $searchform - if (! empty($conf->societe->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_SOCIETE) && $user->rights->societe->lire) + if ((( ! empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || ! empty($conf->fournisseur->enabled)) && ! empty($conf->global->MAIN_SEARCHFORM_SOCIETE) && $user->rights->societe->lire) { $langs->load("companies"); $searchform.=printSearchForm(DOL_URL_ROOT.'/societe/societe.php', DOL_URL_ROOT.'/societe/societe.php', img_object('','company').' '.$langs->trans("ThirdParties"), 'soc', 'socname'); From dcaaa84ddb2acf094e82d64d0c5415cd304dc03c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 19 Jun 2013 14:03:54 +0200 Subject: [PATCH 4/4] Fix: css with jmobile --- htdocs/theme/amarok/style.css.php | 8 ++++++++ htdocs/theme/auguria/style.css.php | 7 +++++++ htdocs/theme/bureau2crea/style.css.php | 9 ++++++++- htdocs/theme/cameleo/style.css.php | 8 ++++++++ htdocs/theme/eldy/style.css.php | 10 ++++++++++ 5 files changed, 41 insertions(+), 1 deletion(-) diff --git a/htdocs/theme/amarok/style.css.php b/htdocs/theme/amarok/style.css.php index 351fb17494b..c3ff5f2882c 100755 --- a/htdocs/theme/amarok/style.css.php +++ b/htdocs/theme/amarok/style.css.php @@ -246,6 +246,10 @@ input:disabled {background:#b6b6b6;} input[type=checkbox] { background-color: transparent; border: none; box-shadow: none; } input[type=image] { background-color: transparent; border: none; box-shadow: none; } + +legend { margin-bottom: 8px; } + + textarea.flat { font-size:px; font-family:; @@ -2120,6 +2124,10 @@ div.ui-radio margin: 0; position: static; } +.ui-mobile fieldset +{ + padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid #AAAAAA !important; +} close(); diff --git a/htdocs/theme/auguria/style.css.php b/htdocs/theme/auguria/style.css.php index 1074a89da49..de93b41a160 100644 --- a/htdocs/theme/auguria/style.css.php +++ b/htdocs/theme/auguria/style.css.php @@ -136,6 +136,9 @@ textarea:disabled { } input[type=checkbox] { background-color: transparent; border: none; box-shadow: none; } input[type=image] { background-color: transparent; border: none; box-shadow: none; } + +legend { margin-bottom: 8px; } + .button { font-family: ; border: 1px solid #ACBCBB; @@ -2261,6 +2264,10 @@ div.ui-radio margin: 0; position: static; } +.ui-mobile fieldset +{ + padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid #AAAAAA !important; +} +legend { margin-bottom: 8px; } + + .button { font-family: ; border: 0px; @@ -2442,6 +2445,10 @@ div.ui-radio margin: 0; position: static; } +.ui-mobile fieldset +{ + padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid #AAAAAA !important; +} close(); diff --git a/htdocs/theme/cameleo/style.css.php b/htdocs/theme/cameleo/style.css.php index 88c800a3e55..85af77cb18c 100644 --- a/htdocs/theme/cameleo/style.css.php +++ b/htdocs/theme/cameleo/style.css.php @@ -142,6 +142,10 @@ input.button[type=submit] { font-weight: bold; } + +legend { margin-bottom: 8px; } + + .button { font-family: ; background-image: url(); @@ -2358,6 +2362,10 @@ div.ui-radio margin: 0; position: static; } +.ui-mobile fieldset +{ + padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid #AAAAAA !important; +} +legend { margin-bottom: 8px; } + + .button { font-family: ; background-image: url(); @@ -2676,6 +2681,11 @@ div.ui-radio margin: 0; position: static; } +.ui-mobile fieldset +{ + padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid #AAAAAA !important; +} + close();