mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 06:37:23 +01:00
18 lines
434 B
JavaScript
18 lines
434 B
JavaScript
'use strict';
|
|
|
|
habitrpg.controller("CopyMessageModalCtrl", ['$scope', 'User', 'Notification',
|
|
function($scope, User, Notification){
|
|
$scope.saveTodo = function() {
|
|
var newTask = {
|
|
text: $scope.text,
|
|
type: 'todo',
|
|
notes: $scope.notes
|
|
};
|
|
|
|
User.addTask({body:newTask});
|
|
Notification.text(window.env.t('messageAddedAsToDo'));
|
|
|
|
$scope.$close();
|
|
}
|
|
}]);
|