Skip to content

Commit

Permalink
Add angular-ui-selec2 to configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
aurimus committed Oct 7, 2014
1 parent 211a7d4 commit 3469c55
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 6 deletions.
6 changes: 6 additions & 0 deletions app/models/user.server.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ var UserSchema = new Schema({
}],
default: ['']
},
languages: {
type: [{
type: String,
}],
default: ['']
},
locationLiving: {
type: Schema.ObjectId,
ref: 'Geo'
Expand Down
5 changes: 4 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
"angular-moment": "~0.8.2",
"angular-medium-editor": "*",
"angular-socket-io": "~0.6.0",
"angular-perfect-scrollbar": "*"
"angular-perfect-scrollbar": "*",
"angular-ui-select": "~0.8.0",
"select2": "~3.4.5",
"selectize": "~0.8.5"
}
}
3 changes: 3 additions & 0 deletions config/env/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ module.exports = {
css: [
'public/lib/medium-editor/dist/css/medium-editor.css',
'public/lib/perfect-scrollbar/src/perfect-scrollbar.css',
'public/lib/angular-ui-select/dist/select.css'
],
js: [
'public/lib/jquery/dist/jquery.js',
Expand All @@ -32,6 +33,8 @@ module.exports = {
'public/lib/angular-sanitize/angular-sanitize.js',
'public/lib/angular-ui-router/release/angular-ui-router.js',
'public/lib/angular-ui-utils/ui-utils.js',
'public/lib/angular-ui-select/dist/select.js',
'public/lib/select2/select2.js',
'public/lib/angular-bootstrap/ui-bootstrap-tpls.js',
'public/lib/moment/moment.js',
'public/lib/angular-moment/angular-moment.js',
Expand Down
6 changes: 4 additions & 2 deletions gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,10 @@ module.exports = function(grunt) {
css: {
src: watchFiles.clientCSS.concat([
// @todo: should be '<%= applicationCSSFiles %>' instead!
'public/lib/medium-editor/dist/css/medium-editor.css',
'public/lib/perfect-scrollbar/src/perfect-scrollbar.css',
'public/lib/medium-editor/dist/css/medium-editor.css',
'public/lib/perfect-scrollbar/src/perfect-scrollbar.css',
'public/lib/angular-ui-select/dist/select.css',
'public/lib/select2/select2.css'
]),
dest: 'public/dist/application.min.css',
}
Expand Down
1 change: 1 addition & 0 deletions public/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var ApplicationConfiguration = (function() {
'ui.router',
'ui.bootstrap',
'ui.utils',
'ui.select',
'angularMoment',
'angular-medium-editor',
'perfect_scrollbar'
Expand Down
11 changes: 8 additions & 3 deletions public/modules/users/views/profile/edit-profile.client.view.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,14 @@ <h4>Last seen</h4>

<div class="form-group">
<label for="languages"><h4>Languages</h4></label>
<select id="languages" class="form-control">
<option value=""></option>
</select>
<div>
<ui-select multiple ng-model="user.languages" theme="select2" ng-disabled="disabled">
<ui-select-match placeholder="Type in languages...">{{$item}}</ui-select-match>
<ui-select-choices repeat="language in languages | filter:$select.search">
{{language}}
</ui-select-choices>
</ui-select>
</div>
</div>

<div class="form-group">
Expand Down

0 comments on commit 3469c55

Please sign in to comment.