mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-09 21:58:47 +00:00
feat(challenges): add angular-ui-select2 for simpler find/select
challenge winner.
This commit is contained in:
parent
ae0d758d8f
commit
9fa4521739
5 changed files with 10 additions and 4 deletions
|
|
@ -40,7 +40,8 @@
|
|||
"bootstrap-tour": "~0.8.0",
|
||||
"angular-ui-utils": "~0.1.0",
|
||||
"swagger-ui": "https://github.com/wordnik/swagger-ui.git#105c516f5f055b140e935e9cfe0c36f841921dff",
|
||||
"ngInfiniteScroll": "~1.0.0"
|
||||
"ngInfiniteScroll": "~1.0.0",
|
||||
"angular-ui-select2": "~0.0.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"angular-mocks": "~1.2.1"
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
@import "../bower_components/bootstrap-tour/build/css/bootstrap-tour.min.css"
|
||||
@import "../bower_components/angular-loading-bar/build/loading-bar.css"
|
||||
@import "../bower_components/js-emoji/emoji.css"
|
||||
@import "../bower_components/select2/select2.css"
|
||||
|
||||
// Custom includes
|
||||
@import "./tasks.styl"
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ window.env.t = function(string){
|
|||
window.habitrpg = angular.module('habitrpg',
|
||||
['ngResource', 'ngSanitize', 'userServices', 'groupServices', 'memberServices', 'challengeServices',
|
||||
'authServices', 'notificationServices', 'guideServices', 'authCtrl',
|
||||
'ui.bootstrap', 'ui.keypress', 'ui.router', 'chieffancypants.loadingBar', 'At', 'pasvaz.bindonce', 'infinite-scroll'])
|
||||
'ui.bootstrap', 'ui.keypress', 'ui.router', 'chieffancypants.loadingBar', 'At', 'pasvaz.bindonce', 'infinite-scroll', 'ui.select2'])
|
||||
|
||||
// @see https://github.com/angular-ui/ui-router/issues/110 and https://github.com/HabitRPG/habitrpg/issues/1705
|
||||
// temporary hack until they have a better solution
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@
|
|||
"bower_components/js-emoji/emoji.js",
|
||||
"bower_components/sticky/jquery.sticky.js",
|
||||
"bower_components/ngInfiniteScroll/ng-infinite-scroll.js",
|
||||
"bower_components/select2/select2.js",
|
||||
"bower_components/angular-ui-select2/src/select2.js",
|
||||
|
||||
"bower_components/bootstrap/docs/assets/js/bootstrap.js",
|
||||
"bower_components/angular-bootstrap/ui-bootstrap.js",
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
script(type='text/ng-template', id='partials/options.social.challenges.detail.close.html')
|
||||
a.btn.btn-small.btn-danger(ng-click="delete(closingChal)") Delete
|
||||
h5 - Or -
|
||||
small Select a winner and close the challenge:
|
||||
select(ng-model='closingChal.winner', name='Winner', ng-options='u._id as u.profile.name for u in closingChal.members', ng-change='selectWinner(closingChal)')
|
||||
select(ui-select2, ng-required=true, ng-model='closingChal.winner', data-placeholder='Select winner, close challenge', ng-change='selectWinner(closingChal)', )
|
||||
option(value='')
|
||||
option(ng-repeat='u in closingChal.members', value='{{u._id}}') {{u.profile.name}}
|
||||
|
||||
small.pull-right
|
||||
a(ng-click='cancelClosing(closingChal)') cancel
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue