mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-22 03:34:14 +00:00
refactor(bs3): port drops modals
This commit is contained in:
parent
f6a8b9e4cb
commit
8b29eb530a
2 changed files with 5 additions and 15 deletions
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
angular.module('guideServices', []).
|
||||
factory('Guide', ['$rootScope', 'User', '$timeout', function($rootScope, User, $timeout) {
|
||||
factory('Guide', ['$rootScope', 'User', '$timeout', '$modal', function($rootScope, User, $timeout, $modal) {
|
||||
|
||||
/**
|
||||
* Init and show the welcome tour. Note we do it listening to a $rootScope broadcasted 'userLoaded' message,
|
||||
|
|
@ -130,7 +130,9 @@ angular.module('guideServices', []).
|
|||
if (!eggs) {
|
||||
eggs['Wolf'] = 1; // This is also set on the server
|
||||
}
|
||||
$rootScope.modals.dropsEnabled = true;
|
||||
$modal.open({
|
||||
templateUrl: 'modals/dropsEnabled.html'
|
||||
});
|
||||
});
|
||||
|
||||
$rootScope.$watch('user.items.pets', function(after, before) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
//div(modal='modals.dropsEnabled')
|
||||
script(type='text/ng-template', id='modals/dropsEnabled.html')
|
||||
.modal-header
|
||||
h3=env.t('dropsEnabled')
|
||||
|
|
@ -11,15 +10,4 @@ script(type='text/ng-template', id='modals/dropsEnabled.html')
|
|||
span.item-drop-icon(class='Pet_Currency_Gem')
|
||||
span!=env.t('useGems')
|
||||
.modal-footer
|
||||
button.btn.btn-default.cancel(ng-click='modals.dropsEnabled = false')=env.t('close')
|
||||
|
||||
//div(modal='modals.drop')
|
||||
script(type='text/ng-template', id='modals/drop.html')
|
||||
.modal-header
|
||||
h3=env.t('itemDrop')
|
||||
.modal-body
|
||||
p
|
||||
span.item-drop-icon(class='Pet_{{user._tmp.drop.type}}_{{user._tmp.drop.key}}')
|
||||
| {{user._tmp.drop.dialog}}
|
||||
.modal-footer
|
||||
button.btn.btn-default.cancel(ng-click='modals.drop = false')=env.t('close')
|
||||
button.btn.btn-default.cancel(ng-click='$close()')=env.t('close')
|
||||
Loading…
Reference in a new issue