Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
A
angular-ui-select
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Custom Issue Tracker
Custom Issue Tracker
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
angularjs
angular-ui-select
Commits
578e6c50
Commit
578e6c50
authored
Sep 19, 2018
by
bingchuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[dev]version 0.19.4_fix 修复选中后插入最后一个
parent
3074ae6b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
select.js
dist/select.js
+7
-7
No files found.
dist/select.js
View file @
578e6c50
...
...
@@ -1016,7 +1016,7 @@
restrict
:
'EA'
,
templateUrl
:
function
(
tElement
,
tAttrs
)
{
var
theme
=
tAttrs
.
theme
||
uiSelectConfig
.
theme
;
return
theme
+
(
angular
.
isDefined
(
tAttrs
.
multiple
)
?
'/select-multiple.tpl.html'
:
'/select.tpl.html'
);
return
theme
+
(
angular
.
isDefined
(
tAttrs
.
multiple
)
&&
tAttrs
.
multiple
!=
'false'
?
'/select-multiple.tpl.html'
:
'/select.tpl.html'
);
},
replace
:
true
,
transclude
:
true
,
...
...
@@ -1036,7 +1036,7 @@
}
//Multiple or Single depending if multiple attribute presence
if
(
angular
.
isDefined
(
tAttrs
.
multiple
))
if
(
angular
.
isDefined
(
tAttrs
.
multiple
)
&&
tAttrs
.
multiple
!=
'false'
)
tElement
.
append
(
'<ui-select-multiple/>'
).
removeAttr
(
'multiple'
);
else
tElement
.
append
(
'<ui-select-single/>'
);
...
...
@@ -1437,7 +1437,7 @@
var
theme
=
getAttribute
(
parent
,
'theme'
)
||
uiSelectConfig
.
theme
;
var
multi
=
angular
.
isDefined
(
getAttribute
(
parent
,
'multiple'
));
return
theme
+
(
multi
?
'/match-multiple.tpl.html'
:
'/match.tpl.html'
);
return
theme
+
(
multi
&&
parent
[
0
].
getAttribute
(
"multiple"
)
!=
'false'
?
'/match-multiple.tpl.html'
:
'/match.tpl.html'
);
},
link
:
function
(
scope
,
element
,
attrs
,
$select
)
{
$select
.
lockChoiceExpression
=
attrs
.
uiLockChoice
;
...
...
@@ -1572,7 +1572,7 @@
locals
=
{};
locals
[
$select
.
parserResult
.
itemName
]
=
$select
.
selected
[
j
];
result
=
$select
.
parserResult
.
modelMapper
(
scope
,
locals
);
resultMultiple
.
unshift
(
result
);
resultMultiple
.
push
(
result
);
}
return
resultMultiple
;
});
...
...
@@ -1594,13 +1594,13 @@
var
matches
=
/
\.([^\s]
+
)
/
.
exec
(
$select
.
parserResult
.
trackByExp
);
if
(
propsItemNameMatches
&&
propsItemNameMatches
.
length
>
0
&&
propsItemNameMatches
[
1
]
==
$select
.
parserResult
.
itemName
){
if
(
matches
&&
matches
.
length
>
0
&&
result
[
matches
[
1
]]
==
value
[
matches
[
1
]]){
resultMultiple
.
unshift
(
list
[
p
]);
resultMultiple
.
push
(
list
[
p
]);
return
true
;
}
}
}
if
(
angular
.
equals
(
result
,
value
)){
resultMultiple
.
unshift
(
list
[
p
]);
resultMultiple
.
push
(
list
[
p
]);
return
true
;
}
}
...
...
@@ -1613,7 +1613,7 @@
//Check model array of all items available
if
(
!
checkFnMultiple
(
data
,
inputValue
[
k
])){
//If not found on previous lists, just add it directly to resultMultiple
resultMultiple
.
unshift
(
inputValue
[
k
]);
resultMultiple
.
push
(
inputValue
[
k
]);
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment