From 4db562c9e7aae869ae7cd9784a83672526dcdb52 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 22 Jun 2015 22:31:44 +0200 Subject: [PATCH] Tags are shown as thumbs into card. --- htdocs/categories/index.php | 2 +- htdocs/core/class/html.form.class.php | 6 +- htdocs/societe/soc.php | 2 +- htdocs/theme/amarok/style.css.php | 95 +++++++++++++++++++++++++ htdocs/theme/auguria/style.css.php | 95 +++++++++++++++++++++++++ htdocs/theme/bureau2crea/style.css.php | 95 +++++++++++++++++++++++++ htdocs/theme/cameleo/style.css.php | 98 +++++++++++++++++++++++++- htdocs/theme/eldy/style.css.php | 44 +++++++++++- 8 files changed, 430 insertions(+), 7 deletions(-) diff --git a/htdocs/categories/index.php b/htdocs/categories/index.php index 2a41d318ff5..fcfa8f9b910 100644 --- a/htdocs/categories/index.php +++ b/htdocs/categories/index.php @@ -160,7 +160,7 @@ foreach($fulltree as $key => $val) } -print ''; +print '
'; print ''; } - // Categories + // Tags / categories if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire)) { print ''; diff --git a/htdocs/theme/amarok/style.css.php b/htdocs/theme/amarok/style.css.php index 96febfcda9c..80f64e41561 100644 --- a/htdocs/theme/amarok/style.css.php +++ b/htdocs/theme/amarok/style.css.php @@ -2266,6 +2266,101 @@ div.jnotify-background { } +/* ============================================================================== */ +/* Select2 */ +/* ============================================================================== */ + +.selectoptiondisabledwhite { + background: #FFFFFF !important; +} + +.select2-choice, +.select2-drop.select2-drop-above.select2-drop-active, +.select2-container-active .select2-choice, +.select2-container-active .select2-choices, +.select2-dropdown-open.select2-drop-above .select2-choice, +.select2-dropdown-open.select2-drop-above .select2-choices, +.select2-container-multi.select2-container-active .select2-choices +{ + border: 1px solid #aaa; +} +.select2-disabled +{ + color: #888; +} +.select2-drop-active +{ + border: 1px solid #aaa; + border-top: none; +} +a span.select2-chosen +{ + font-weight: normal !important; +} +.select2-container .select2-choice { + background-image: none; + height: 24px; + line-height: 24px; +} +.select2-choices .select2-search-choice { + border: 1px solid #aaa !important; +} +.select2-results .select2-no-results, .select2-results .select2-searching, .select2-results .select2-ajax-error, .select2-results .select2-selection-limit +{ + background: #FFFFFF; +} +.select2-container-multi.select2-container-disabled .select2-choices { + background-color: #FFFFFF; + background-image: none; + border: none; + cursor: default; +} +.select2-container-multi .select2-choices .select2-search-choice { + margin-bottom: 3px; +} +/* To emulate select 2 style */ +.select2-container-multi-dolibarr .select2-choices-dolibarr .select2-search-choice-dolibarr { + padding: 2px 5px 1px 5px; + margin: 0 0 2px 3px; + position: relative; + line-height: 13px; + color: #333; + cursor: default; + border: 1px solid #aaaaaa; + border-radius: 3px; + -webkit-box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05); + box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05); + background-clip: padding-box; + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + background-color: #e4e4e4; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#f4f4f4', GradientType=0); + background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eee)); + background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); + background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); + background-image: linear-gradient(to bottom, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); +} +.select2-container-multi-dolibarr .select2-choices-dolibarr .select2-search-choice-dolibarr a { + font-weight: normal; +} +.select2-container-multi-dolibarr .select2-choices-dolibarr li { + float: left; + list-style: none; +} +.select2-container-multi-dolibarr .select2-choices-dolibarr { + height: auto !important; + height: 1%; + margin: 0; + padding: 0 5px 0 0; + position: relative; + cursor: text; + overflow: hidden; +} + + /* ============================================================================== */ /* JMobile */ /* ============================================================================== */ diff --git a/htdocs/theme/auguria/style.css.php b/htdocs/theme/auguria/style.css.php index ec652179ac1..d1dd0ab4091 100644 --- a/htdocs/theme/auguria/style.css.php +++ b/htdocs/theme/auguria/style.css.php @@ -2440,6 +2440,101 @@ div.ecmjqft { } +/* ============================================================================== */ +/* Select2 */ +/* ============================================================================== */ + +.selectoptiondisabledwhite { + background: #FFFFFF !important; +} + +.select2-choice, +.select2-drop.select2-drop-above.select2-drop-active, +.select2-container-active .select2-choice, +.select2-container-active .select2-choices, +.select2-dropdown-open.select2-drop-above .select2-choice, +.select2-dropdown-open.select2-drop-above .select2-choices, +.select2-container-multi.select2-container-active .select2-choices +{ + border: 1px solid #aaa; +} +.select2-disabled +{ + color: #888; +} +.select2-drop-active +{ + border: 1px solid #aaa; + border-top: none; +} +a span.select2-chosen +{ + font-weight: normal !important; +} +.select2-container .select2-choice { + background-image: none; + height: 24px; + line-height: 24px; +} +.select2-choices .select2-search-choice { + border: 1px solid #aaa !important; +} +.select2-results .select2-no-results, .select2-results .select2-searching, .select2-results .select2-ajax-error, .select2-results .select2-selection-limit +{ + background: #FFFFFF; +} +.select2-container-multi.select2-container-disabled .select2-choices { + background-color: #FFFFFF; + background-image: none; + border: none; + cursor: default; +} +.select2-container-multi .select2-choices .select2-search-choice { + margin-bottom: 3px; +} +/* To emulate select 2 style */ +.select2-container-multi-dolibarr .select2-choices-dolibarr .select2-search-choice-dolibarr { + padding: 2px 5px 1px 5px; + margin: 0 0 2px 3px; + position: relative; + line-height: 13px; + color: #333; + cursor: default; + border: 1px solid #aaaaaa; + border-radius: 3px; + -webkit-box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05); + box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05); + background-clip: padding-box; + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + background-color: #e4e4e4; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#f4f4f4', GradientType=0); + background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eee)); + background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); + background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); + background-image: linear-gradient(to bottom, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); +} +.select2-container-multi-dolibarr .select2-choices-dolibarr .select2-search-choice-dolibarr a { + font-weight: normal; +} +.select2-container-multi-dolibarr .select2-choices-dolibarr li { + float: left; + list-style: none; +} +.select2-container-multi-dolibarr .select2-choices-dolibarr { + height: auto !important; + height: 1%; + margin: 0; + padding: 0 5px 0 0; + position: relative; + cursor: text; + overflow: hidden; +} + + /* ============================================================================== */ /* JMobile */ /* ============================================================================== */ diff --git a/htdocs/theme/bureau2crea/style.css.php b/htdocs/theme/bureau2crea/style.css.php index 41a7b6fef87..eee7afcb9c0 100644 --- a/htdocs/theme/bureau2crea/style.css.php +++ b/htdocs/theme/bureau2crea/style.css.php @@ -2625,6 +2625,101 @@ div.ecmjqft { } +/* ============================================================================== */ +/* Select2 */ +/* ============================================================================== */ + +.selectoptiondisabledwhite { + background: #FFFFFF !important; +} + +.select2-choice, +.select2-drop.select2-drop-above.select2-drop-active, +.select2-container-active .select2-choice, +.select2-container-active .select2-choices, +.select2-dropdown-open.select2-drop-above .select2-choice, +.select2-dropdown-open.select2-drop-above .select2-choices, +.select2-container-multi.select2-container-active .select2-choices +{ + border: 1px solid #aaa; +} +.select2-disabled +{ + color: #888; +} +.select2-drop-active +{ + border: 1px solid #aaa; + border-top: none; +} +a span.select2-chosen +{ + font-weight: normal !important; +} +.select2-container .select2-choice { + background-image: none; + height: 24px; + line-height: 24px; +} +.select2-choices .select2-search-choice { + border: 1px solid #aaa !important; +} +.select2-results .select2-no-results, .select2-results .select2-searching, .select2-results .select2-ajax-error, .select2-results .select2-selection-limit +{ + background: #FFFFFF; +} +.select2-container-multi.select2-container-disabled .select2-choices { + background-color: #FFFFFF; + background-image: none; + border: none; + cursor: default; +} +.select2-container-multi .select2-choices .select2-search-choice { + margin-bottom: 3px; +} +/* To emulate select 2 style */ +.select2-container-multi-dolibarr .select2-choices-dolibarr .select2-search-choice-dolibarr { + padding: 2px 5px 1px 5px; + margin: 0 0 2px 3px; + position: relative; + line-height: 13px; + color: #333; + cursor: default; + border: 1px solid #aaaaaa; + border-radius: 3px; + -webkit-box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05); + box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05); + background-clip: padding-box; + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + background-color: #e4e4e4; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#f4f4f4', GradientType=0); + background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eee)); + background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); + background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); + background-image: linear-gradient(to bottom, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); +} +.select2-container-multi-dolibarr .select2-choices-dolibarr .select2-search-choice-dolibarr a { + font-weight: normal; +} +.select2-container-multi-dolibarr .select2-choices-dolibarr li { + float: left; + list-style: none; +} +.select2-container-multi-dolibarr .select2-choices-dolibarr { + height: auto !important; + height: 1%; + margin: 0; + padding: 0 5px 0 0; + position: relative; + cursor: text; + overflow: hidden; +} + + /* ============================================================================== */ /* JMobile */ /* ============================================================================== */ diff --git a/htdocs/theme/cameleo/style.css.php b/htdocs/theme/cameleo/style.css.php index 640fea40575..4b8955953bd 100644 --- a/htdocs/theme/cameleo/style.css.php +++ b/htdocs/theme/cameleo/style.css.php @@ -195,7 +195,7 @@ legend { margin-bottom: 8px; } } .buttonRefused { pointer-events: none; - cursor: default; + cursor: default; opacity: 0.4; filter: alpha(opacity=40); /* For IE8 and earlier */ box-shadow: none; @@ -2505,6 +2505,102 @@ div.ecmjqft { background-image: none; } + +/* ============================================================================== */ +/* Select2 */ +/* ============================================================================== */ + +.selectoptiondisabledwhite { + background: #FFFFFF !important; +} + +.select2-choice, +.select2-drop.select2-drop-above.select2-drop-active, +.select2-container-active .select2-choice, +.select2-container-active .select2-choices, +.select2-dropdown-open.select2-drop-above .select2-choice, +.select2-dropdown-open.select2-drop-above .select2-choices, +.select2-container-multi.select2-container-active .select2-choices +{ + border: 1px solid #aaa; +} +.select2-disabled +{ + color: #888; +} +.select2-drop-active +{ + border: 1px solid #aaa; + border-top: none; +} +a span.select2-chosen +{ + font-weight: normal !important; +} +.select2-container .select2-choice { + background-image: none; + height: 24px; + line-height: 24px; +} +.select2-choices .select2-search-choice { + border: 1px solid #aaa !important; +} +.select2-results .select2-no-results, .select2-results .select2-searching, .select2-results .select2-ajax-error, .select2-results .select2-selection-limit +{ + background: #FFFFFF; +} +.select2-container-multi.select2-container-disabled .select2-choices { + background-color: #FFFFFF; + background-image: none; + border: none; + cursor: default; +} +.select2-container-multi .select2-choices .select2-search-choice { + margin-bottom: 3px; +} +/* To emulate select 2 style */ +.select2-container-multi-dolibarr .select2-choices-dolibarr .select2-search-choice-dolibarr { + padding: 2px 5px 1px 5px; + margin: 0 0 2px 3px; + position: relative; + line-height: 13px; + color: #333; + cursor: default; + border: 1px solid #aaaaaa; + border-radius: 3px; + -webkit-box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05); + box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05); + background-clip: padding-box; + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + background-color: #e4e4e4; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#f4f4f4', GradientType=0); + background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eee)); + background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); + background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); + background-image: linear-gradient(to bottom, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); +} +.select2-container-multi-dolibarr .select2-choices-dolibarr .select2-search-choice-dolibarr a { + font-weight: normal; +} +.select2-container-multi-dolibarr .select2-choices-dolibarr li { + float: left; + list-style: none; +} +.select2-container-multi-dolibarr .select2-choices-dolibarr { + height: auto !important; + height: 1%; + margin: 0; + padding: 0 5px 0 0; + position: relative; + cursor: text; + overflow: hidden; +} + + /* ============================================================================== */ /* JMobile */ /* ============================================================================== */ diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 0ab45e0d0d9..5eaa49a3072 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -3394,8 +3394,50 @@ a span.select2-chosen cursor: default; } .select2-container-multi .select2-choices .select2-search-choice { - margin-bottom: 2px; + margin-bottom: 3px; } +/* To emulate select 2 style */ +.select2-container-multi-dolibarr .select2-choices-dolibarr .select2-search-choice-dolibarr { + padding: 2px 5px 1px 5px; + margin: 0 0 2px 3px; + position: relative; + line-height: 13px; + color: #333; + cursor: default; + border: 1px solid #aaaaaa; + border-radius: 3px; + -webkit-box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05); + box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05); + background-clip: padding-box; + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + background-color: #e4e4e4; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#f4f4f4', GradientType=0); + background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eee)); + background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); + background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); + background-image: linear-gradient(to bottom, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%); +} +.select2-container-multi-dolibarr .select2-choices-dolibarr .select2-search-choice-dolibarr a { + font-weight: normal; +} +.select2-container-multi-dolibarr .select2-choices-dolibarr li { + float: left; + list-style: none; +} +.select2-container-multi-dolibarr .select2-choices-dolibarr { + height: auto !important; + height: 1%; + margin: 0; + padding: 0 5px 0 0; + position: relative; + cursor: text; + overflow: hidden; +} + /* ============================================================================== */
'.$langs->trans("Categories").''; if (! empty($conf->use_javascript_ajax)) { diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 69d480888fe..331352812ca 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4608,7 +4608,7 @@ class Form * * @param int $id Id of object * @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact'). Old mode (0, 1, 2, ...) is deprecated. - * @param int $rendermode 0=Default, use multiselect. 1=Use text with link + * @param int $rendermode 0=Default, use multiselect. 1=Emulate multiselect * @return mixed Array of category objects or < 0 if KO */ function showCategories($id, $type, $rendermode=0) @@ -4626,10 +4626,10 @@ class Form $ways = $c->print_all_ways(); foreach($ways as $way) { - $toprint[] = img_object('','category').' '.$way; + $toprint[] = '
  • '.img_object('','category').' '.$way.'
  • '; } } - return implode('
    ', $toprint); + return '
      '.implode(' ', $toprint).'
    '; } if ($rendermode == 0) diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index ae58f2d85c0..c4e95abcb8e 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -2204,7 +2204,7 @@ else print '
    ' . $langs->trans( "Categories" ) . '