mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-22 03:34:14 +00:00
17 lines
434 B
JavaScript
17 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();
|
|
}
|
|
}]);
|