From 09ff9b2a2c52aeceb1f157831eddbacf91df6b6d Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Tue, 11 Jun 2013 18:01:50 +0200 Subject: [PATCH 1/7] remove leading spaces --- core/css/multiselect.css | 132 +++++++++++++++++++-------------------- 1 file changed, 66 insertions(+), 66 deletions(-) diff --git a/core/css/multiselect.css b/core/css/multiselect.css index def4e60d74..3cf43ccd4b 100644 --- a/core/css/multiselect.css +++ b/core/css/multiselect.css @@ -1,84 +1,84 @@ /* Copyright (c) 2011, Jan-Christoph Borchardt, http://jancborchardt.net - This file is licensed under the Affero General Public License version 3 or later. - See the COPYING-README file. */ +This file is licensed under the Affero General Public License version 3 or later. +See the COPYING-README file. */ - ul.multiselectoptions { - background-color:#fff; - border:1px solid #ddd; - border-top:none; - box-shadow:0 1px 1px #ddd; - padding-top:.5em; - position:absolute; +ul.multiselectoptions { + background-color:#fff; + border:1px solid #ddd; + border-top:none; + box-shadow:0 1px 1px #ddd; + padding-top:.5em; + position:absolute; max-height: 20em; overflow-y: auto; - z-index:49; - } + z-index:49; +} - ul.multiselectoptions.down { - border-bottom-left-radius:.5em; - border-bottom-right-radius:.5em; - } +ul.multiselectoptions.down { + border-bottom-left-radius:.5em; + border-bottom-right-radius:.5em; +} - ul.multiselectoptions.up { - border-top-left-radius:.5em; - border-top-right-radius:.5em; - } +ul.multiselectoptions.up { + border-top-left-radius:.5em; + border-top-right-radius:.5em; +} - ul.multiselectoptions>li { - overflow:hidden; - white-space:nowrap; - } +ul.multiselectoptions>li { + overflow:hidden; + white-space:nowrap; +} - ul.multiselectoptions>li>input[type="checkbox"] { +ul.multiselectoptions>li>input[type="checkbox"] { margin-top: 3px; margin-right: 5px; margin-left: 3px; - } +} - div.multiselect { - display:inline-block; - max-width:400px; - min-width:100px; - padding-right:.6em; - position:relative; - vertical-align:bottom; - } +div.multiselect { + display:inline-block; + max-width:400px; + min-width:100px; + padding-right:.6em; + position:relative; + vertical-align:bottom; +} - div.multiselect.active { - background-color:#fff; - position:relative; - z-index:50; - } +div.multiselect.active { + background-color:#fff; + position:relative; + z-index:50; +} - div.multiselect.up { - border-top:0 none; - border-top-left-radius:0; - border-top-right-radius:0; - } +div.multiselect.up { + border-top:0 none; + border-top-left-radius:0; + border-top-right-radius:0; +} - div.multiselect.down { - border-bottom:none; - border-bottom-left-radius:0; - border-bottom-right-radius:0; - } +div.multiselect.down { + border-bottom:none; + border-bottom-left-radius:0; + border-bottom-right-radius:0; +} - div.multiselect>span:first-child { - float:left; - margin-right:2em; - overflow:hidden; - text-overflow:ellipsis; - width:90%; - } +div.multiselect>span:first-child { + float:left; + margin-right:2em; + overflow:hidden; + text-overflow:ellipsis; + width:90%; +} - div.multiselect>span:last-child { - position:absolute; - right:.8em; - } +div.multiselect>span:last-child { + position:absolute; + right:.8em; +} - ul.multiselectoptions input.new { - border-top-left-radius:0; - border-top-right-radius:0; - padding-bottom:.2em; - padding-top:.2em; - margin:0; - } +ul.multiselectoptions input.new { + border-top-left-radius:0; + border-top-right-radius:0; + padding-bottom:.2em; + padding-top:.2em; + margin:0; +} From e6a4721f648f0e201dcdfc06c743de00c75b7d69 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Tue, 11 Jun 2013 18:02:30 +0200 Subject: [PATCH 2/7] checkstyle: add space after colon --- core/css/multiselect.css | 92 ++++++++++++++++++++-------------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/core/css/multiselect.css b/core/css/multiselect.css index 3cf43ccd4b..bb1c525a3c 100644 --- a/core/css/multiselect.css +++ b/core/css/multiselect.css @@ -1,84 +1,84 @@ -/* Copyright (c) 2011, Jan-Christoph Borchardt, http://jancborchardt.net +/* Copyright (c) 2011, Jan-Christoph Borchardt, http: //jancborchardt.net This file is licensed under the Affero General Public License version 3 or later. See the COPYING-README file. */ ul.multiselectoptions { - background-color:#fff; - border:1px solid #ddd; - border-top:none; - box-shadow:0 1px 1px #ddd; - padding-top:.5em; - position:absolute; - max-height: 20em; - overflow-y: auto; - z-index:49; + background-color: #fff; + border: 1px solid #ddd; + border-top: none; + box-shadow: 0 1px 1px #ddd; + padding-top: .5em; + position: absolute; + max-height: 20em; + overflow-y: auto; + z-index: 49; } ul.multiselectoptions.down { - border-bottom-left-radius:.5em; - border-bottom-right-radius:.5em; + border-bottom-left-radius: .5em; + border-bottom-right-radius: .5em; } ul.multiselectoptions.up { - border-top-left-radius:.5em; - border-top-right-radius:.5em; + border-top-left-radius: .5em; + border-top-right-radius: .5em; } ul.multiselectoptions>li { - overflow:hidden; - white-space:nowrap; + overflow: hidden; + white-space: nowrap; } ul.multiselectoptions>li>input[type="checkbox"] { - margin-top: 3px; - margin-right: 5px; - margin-left: 3px; + margin-top: 3px; + margin-right: 5px; + margin-left: 3px; } div.multiselect { - display:inline-block; - max-width:400px; - min-width:100px; - padding-right:.6em; - position:relative; - vertical-align:bottom; + display: inline-block; + max-width: 400px; + min-width: 100px; + padding-right: .6em; + position: relative; + vertical-align: bottom; } div.multiselect.active { - background-color:#fff; - position:relative; - z-index:50; + background-color: #fff; + position: relative; + z-index: 50; } div.multiselect.up { - border-top:0 none; - border-top-left-radius:0; - border-top-right-radius:0; + border-top: 0 none; + border-top-left-radius: 0; + border-top-right-radius: 0; } div.multiselect.down { - border-bottom:none; - border-bottom-left-radius:0; - border-bottom-right-radius:0; + border-bottom: none; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; } div.multiselect>span:first-child { - float:left; - margin-right:2em; - overflow:hidden; - text-overflow:ellipsis; - width:90%; + float: left; + margin-right: 2em; + overflow: hidden; + text-overflow: ellipsis; + width: 90%; } div.multiselect>span:last-child { - position:absolute; - right:.8em; + position: absolute; + right: .8em; } ul.multiselectoptions input.new { - border-top-left-radius:0; - border-top-right-radius:0; - padding-bottom:.2em; - padding-top:.2em; - margin:0; + border-top-left-radius: 0; + border-top-right-radius: 0; + padding-bottom: .2em; + padding-top: .2em; + margin: 0; } From 35e7b64cc204ed1c7152fe4b7b7cd6ee67d0fd19 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Tue, 11 Jun 2013 18:04:11 +0200 Subject: [PATCH 3/7] multiselect: do not cut off group names --- core/css/multiselect.css | 1 + 1 file changed, 1 insertion(+) diff --git a/core/css/multiselect.css b/core/css/multiselect.css index bb1c525a3c..8fab99806f 100644 --- a/core/css/multiselect.css +++ b/core/css/multiselect.css @@ -17,6 +17,7 @@ ul.multiselectoptions { ul.multiselectoptions.down { border-bottom-left-radius: .5em; border-bottom-right-radius: .5em; + width: 100%; /* do not cut off group names */ } ul.multiselectoptions.up { From 27996d1c64a4fab8334b9188b99011097e7ab605 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Tue, 11 Jun 2013 18:04:33 +0200 Subject: [PATCH 4/7] multiselect: drop shadow for better focus --- core/css/multiselect.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/css/multiselect.css b/core/css/multiselect.css index 8fab99806f..667eba86e7 100644 --- a/core/css/multiselect.css +++ b/core/css/multiselect.css @@ -18,6 +18,9 @@ ul.multiselectoptions.down { border-bottom-left-radius: .5em; border-bottom-right-radius: .5em; width: 100%; /* do not cut off group names */ + -webkit-box-shadow: 0px 0px 20px rgba(29,45,68,.4); + -moz-box-shadow: 0px 0px 20px rgba(29,45,68,.4); + box-shadow: 0px 0px 20px rgba(29,45,68,.4); } ul.multiselectoptions.up { From 686797eb6dde2d0c7ac6b9cc5c900a2878a8c06f Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Tue, 11 Jun 2013 18:08:47 +0200 Subject: [PATCH 5/7] multiselect: more breathing space for entries --- core/css/multiselect.css | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/core/css/multiselect.css b/core/css/multiselect.css index 667eba86e7..23aec23437 100644 --- a/core/css/multiselect.css +++ b/core/css/multiselect.css @@ -33,10 +33,19 @@ ul.multiselectoptions>li { white-space: nowrap; } -ul.multiselectoptions>li>input[type="checkbox"] { - margin-top: 3px; - margin-right: 5px; - margin-left: 3px; +ul.multiselectoptions > li > input[type="checkbox"] { + margin: 10px 7px; + vertical-align: middle; +} +ul.multiselectoptions > li input[type='checkbox']+label { + font-weight: normal; + display: inline-block; + width: 100%; + padding: 5px 27px; + margin-left: -27px; /* to have area around checkbox clickable as well */ +} +ul.multiselectoptions > li input[type='checkbox']:checked+label { + font-weight: bold; } div.multiselect { From 0bcb04398d731ff75d74497f4a203279b6990351 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Tue, 11 Jun 2013 18:21:13 +0200 Subject: [PATCH 6/7] multiselect: fixed 'add group' interface a bit --- core/css/multiselect.css | 12 ++++++++++-- core/js/multiselect.js | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/core/css/multiselect.css b/core/css/multiselect.css index 23aec23437..afdf27681a 100644 --- a/core/css/multiselect.css +++ b/core/css/multiselect.css @@ -89,9 +89,17 @@ div.multiselect>span:last-child { } ul.multiselectoptions input.new { - border-top-left-radius: 0; - border-top-right-radius: 0; padding-bottom: .2em; padding-top: .2em; margin: 0; } + +ul.multiselectoptions > li.creator { + padding: 10px; + font-weight: bold; +} +ul.multiselectoptions > li.creator > input { + width: 95% !important; /* do not constrain size of text input */ + padding: 5px; + margin: -5px; +} diff --git a/core/js/multiselect.js b/core/js/multiselect.js index 463c397d8c..48d521e185 100644 --- a/core/js/multiselect.js +++ b/core/js/multiselect.js @@ -176,10 +176,10 @@ }); button.parent().data('preventHide',false); if(settings.createText){ - var li=$('
  • + '+settings.createText+'
  • '); + var li=$('
  • + '+settings.createText+'
  • '); li.click(function(event){ li.empty(); - var input=$(''); + var input=$(''); li.append(input); input.focus(); input.css('width',button.innerWidth()); From cdedfb6f37ad45d2124c328c1b6a86faa7dfac93 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Tue, 11 Jun 2013 18:23:29 +0200 Subject: [PATCH 7/7] multiselect: up min-width of group multiselect to 150px --- core/css/multiselect.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/css/multiselect.css b/core/css/multiselect.css index afdf27681a..a2d1b20d3a 100644 --- a/core/css/multiselect.css +++ b/core/css/multiselect.css @@ -51,7 +51,7 @@ ul.multiselectoptions > li input[type='checkbox']:checked+label { div.multiselect { display: inline-block; max-width: 400px; - min-width: 100px; + min-width: 150px; padding-right: .6em; position: relative; vertical-align: bottom;