Skip to content

Commit a0f4fd6

Browse files
committed
v3.0.0
1 parent c6b6d50 commit a0f4fd6

File tree

6 files changed

+494
-303
lines changed

6 files changed

+494
-303
lines changed

CHANGELOG.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
### v3.0.0
2+
##### Added / Updated
3+
- Customized text on helper elements
4+
- 5 new callbacks
5+
- You can now set minimum characters required to trigger the search functionality
6+
- You can now define which input-model properties to search from (previously, all input-model properties are searched)
7+
- On close, parent button will now receive focus.
8+
- Using proper semantics (well at least better than previous version).
9+
- Various small optimizations.
10+
11+
##### Deprecated / Breaking Changes
12+
- File name and the directive name have been changed. I am really sorry for this, but this is the only workaround to prevent wrong language statistic in Github (they don''t count files whose name starts with "angular"). The repository name stays the same.
13+
- output-model is now required.
14+
- input-model is now static (not dynamically updated), hence why we need output-model. On the plus side, you now can re-use the input model where necessary.
15+
- default-label is deprecated. Custom text and translations can be done using the translation attribute.
16+
17+
### v2.0.2
18+
##### Added / Updated
19+
- Bring back CSS into bower.json.
20+
121
### v2.0.1
222
##### Added / Updated
323
- <a href="https://github.com/isteven/angular-multi-select/issues/52">#52</a> Form tag is now properly closed
@@ -13,7 +33,7 @@
1333
- on-open and on-close callbacks will now pass the multi-select element (HTML) to the callback function.
1434
- max-height attribute. You can define the height of the selection items container.
1535

16-
##### Removed / Deprecated:
36+
##### Deprecated / Breaking Changes
1737
- on-focus attribute is deprecated.
1838
- on-blur attribute is deprecated. Use on-close instead, as it will be triggered when user close a directive by clicking outside the directive.
1939
- IE8 will no longer be supported.

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2014 Ignatius Steven (https://github.com/isteven)
3+
Copyright (c) 2014-2015 Ignatius Steven (https://github.com/isteven)
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,34 @@
11
# AngularJS MultiSelect
22
Pure AngularJS directive which creates a dropdown button with multiple or single selections.
33
Doesn't require jQuery and works well with other Javascript libraries.
4-
Fully configurable through element attributes and CSS.
54

65
![Screenshot](https://raw.githubusercontent.com/isteven/angular-multi-select/master/screenshot.png)
76

87
### Demo & How To
98
Go to http://isteven.github.io/angular-multi-select
109

1110
### Current Version
12-
2.0.1
11+
3.0.0
1312

1413
### Change Log
15-
See <a href="https://github.com/isteven/angular-multi-select/blob/master/CHANGELOG.md">CHANGELOG.md</a>
14+
See <a href="https://github.com/isteven/angular-multi-select/blob/master/CHANGELOG.md">CHANGELOG.md</a>.
15+
For those who's upgrading from version 2.x.x, do note that this version is not backward-compatible. Please read the manual
16+
thoroughly and update your code accordingly.
1617

1718
### Bug Reporting
18-
- Search in the issue section first. Somebody might have reported the same bug and/or asked similar question. If there's none, then please create a new issue.
19-
- Try to reproduce the problem in JSFiddle or Plunker (or any other online JS collaboration tool), and include the URL in the issue you are creating.
20-
21-
22-
### Note
23-
- This directive is a practical solution, not a performance champion. It will not win any code efficiency competition.
24-
- As for the moment, developments are on going, so I am not accepting pull requests. I will choose & add them manually instead.
25-
- If you like / use this directive in your awesome projects, star this repo. It's a huge motivation for me. Would also love to hear from you if you use it in an open source project. Thanks!
19+
Please follow these steps:
20+
1. READ THE MANUAL AGAIN. You might have missed something. This includes the MINIMUM ANGULARJS VERSION and the SUPPORTED BROWSERS.
21+
2. The next step is to search in Github's issue section first. There might already be an answer for similar issue. Do check both open and closed issues.
22+
3. If there's no previous issue found, then please create a new issue in https://github.com/isteven/angular-multi-select/issues.
23+
4. Please replicate the problem in JSFiddle or Plunker (or any other online JS collaboration tool), and include the URL in the issue you are creating.
24+
5. When you're done, please close the issue you've created.
2625

2726
### Licence
2827
Released under the MIT license:
2928

3029
The MIT License (MIT)
3130

32-
Copyright (c) 2014 Ignatius Steven (https://github.com/isteven)
31+
Copyright (c) 2014-2015 Ignatius Steven (https://github.com/isteven)
3332

3433
Permission is hereby granted, free of charge, to any person obtaining a copy
3534
of this software and associated documentation files (the "Software"), to deal

bower.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
{
22
"name" : "isteven-angular-multiselect",
3-
"version" : "v2.0.1",
3+
"version" : "v3.0.0",
44
"main" : [
5-
"angular-multi-select.js"
5+
"isteven-multi-select.js",
6+
"isteven-multi-select.css",
67
],
78
"ignore" : [
89
".git",
910
".gitignore",
1011
"bower.json",
1112
"README.md",
12-
"screenshot.png"
13+
"screenshot.png",
14+
"/doc"
1315
]
1416
}

angular-multi-select.css renamed to isteven-multi-select.css

Lines changed: 38 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
/* ! vertical layout */
66
.multiSelect .vertical {
7-
float: none;
7+
float: none;
88
}
99

1010
/* ! horizontal layout */
@@ -14,8 +14,10 @@
1414

1515
/* ! create a "row" */
1616
.multiSelect .line {
17-
max-height: 34px;
17+
padding: 2px 0px 4px 0px;
18+
max-height: 30px;
1819
overflow: hidden;
20+
box-sizing: content-box;
1921
}
2022

2123
/* ! create a "column" */
@@ -30,8 +32,8 @@
3032
}
3133

3234
/* the multiselect button */
33-
.multiSelect .button {
34-
display: block;
35+
.multiSelect > button {
36+
display: inline-block;
3537
position: relative;
3638
text-align: center;
3739
cursor: pointer;
@@ -52,7 +54,7 @@
5254
}
5355

5456
/* button: hover */
55-
.multiSelect .button:hover {
57+
.multiSelect > button:hover {
5658
background-image: linear-gradient(#fff, #e9e9e9);
5759
}
5860

@@ -90,14 +92,13 @@
9092
-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
9193
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
9294
min-width:278px;
93-
display: none !important;
94-
margin-right: 30px;
95+
display: none !important;
9596
}
9697

9798
/* container of helper elements */
9899
.multiSelect .helperContainer {
99100
border-bottom: 1px solid #ddd;
100-
padding: 8px 8px 0px 8px;
101+
padding: 8px 8px 0px 8px;
101102
}
102103

103104
/* helper buttons (select all, none, reset); */
@@ -115,6 +116,14 @@
115116
margin: 0px 0px 8px 0px;
116117
}
117118

119+
.multiSelect .helperButton.reset{
120+
float: right;
121+
}
122+
123+
.multiSelect .helperButton:not( .reset ) {
124+
margin-right: 4px;
125+
}
126+
118127
/* clear button */
119128
.multiSelect .clearButton {
120129
position: absolute;
@@ -130,7 +139,7 @@
130139
background-color: #f1f1f1;
131140
line-height: 1.4;
132141
right : 2px;
133-
top: 2px;
142+
top: 4px;
134143
}
135144

136145
/* filter */
@@ -146,6 +155,8 @@
146155
box-sizing: border-box; /* Opera/IE 8+ */
147156
color: #888;
148157
margin: 0px 0px 8px 0px;
158+
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
159+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
149160
}
150161

151162
/* helper elements on hover & focus */
@@ -160,13 +171,16 @@
160171
.multiSelect .helperButton:focus,
161172
.multiSelect .inputFilter:focus {
162173
border: 1px solid #66AFE9 !important;
163-
box-shadow: inset 0 0px 1px rgba(0,0,0,.035), 0 0 5px rgba(82,168,236,.7) !important;
174+
outline: 0;
175+
-webkit-box-shadow: box-shadow: inset 0 0 1px rgba(0,0,0,.065), 0 0 5px rgba(102, 175, 233, .6) !important;
176+
box-shadow: inset 0 0 1px rgba(0,0,0,.065), 0 0 5px rgba(102, 175, 233, .6) !important;
164177
}
165178

166179
/* container of multi select items */
167180
.multiSelect .checkBoxContainer {
168-
display: inline-block;
181+
display: block;
169182
padding: 8px;
183+
overflow: hidden;
170184
}
171185

172186
/* ! to show / hide the checkbox layer above */
@@ -187,10 +201,11 @@
187201
user-select: none;
188202
border: 1px solid transparent;
189203
position: relative;
190-
min-width:278px;
204+
min-width:278px;
205+
min-height: 32px;
191206
}
192207

193-
/* Item labels: selected - Enable this if you want to apply styling on selected items */
208+
/* Styling on selected items */
194209
.multiSelect .multiSelectItem:not(.multiSelectGroup).selected
195210
{
196211
background-image: linear-gradient( #e9e9e9, #f1f1f1 );
@@ -201,6 +216,14 @@
201216
border-right: 1px solid #d9d9d9;
202217
}
203218

219+
.multiSelect .multiSelectItem .acol label {
220+
display: inline-block;
221+
padding-right: 30px;
222+
margin: 0px;
223+
font-weight: normal;
224+
line-height: normal;
225+
}
226+
204227
/* item labels focus on mouse hover */
205228
.multiSelect .multiSelectItem:hover,
206229
.multiSelect .multiSelectGroup:hover {
@@ -260,6 +283,6 @@
260283
.multiSelect img {
261284
vertical-align: middle;
262285
margin-bottom:0px;
263-
height: 22px;
264-
width:22px;
286+
max-height: 22px;
287+
max-width:22px;
265288
}

0 commit comments

Comments
 (0)