Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/tasks.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorkorelstar <github@korelstar.de>2016-08-22 15:53:54 +0300
committerkorelstar <github@korelstar.de>2016-08-26 11:24:58 +0300
commit2acf463a6ed8a731575f55a2c2009c612c1182d2 (patch)
tree105e84bdc53b669d18db03bf7d3f383f1e9f6820 /js
parent372792db6f008acffcb0144b5b9f3c51b798b43e (diff)
Automatically open new task after creation
Diffstat (limited to 'js')
-rw-r--r--js/app/controllers/taskscontroller.js3
-rw-r--r--js/public/app.js5
2 files changed, 5 insertions, 3 deletions
diff --git a/js/app/controllers/taskscontroller.js b/js/app/controllers/taskscontroller.js
index f6e21858..ea782f26 100644
--- a/js/app/controllers/taskscontroller.js
+++ b/js/app/controllers/taskscontroller.js
@@ -93,6 +93,7 @@
task = VTodo.create(task);
_tasksbusinesslayer.add(task).then(function(task) {
_$scope.isAddingTask = false;
+ _$scope.openDetails(task.uri, null);
return $scope.$apply();
});
if (parent) {
@@ -173,7 +174,7 @@
this._$scope.openDetails = function(id, $event) {
var calendarID = _$scope.route.calendarID;
var collectionID = _$scope.route.collectionID;
- if ($($event.currentTarget).is($($event.target).closest('.handler'))) {
+ if ($event==null || $($event.currentTarget).is($($event.target).closest('.handler'))) {
var parent = _$tasksmodel.getByUri(id);
if (!parent.loadedCompleted) {
_tasksbusinesslayer.getAll(parent.calendar, true, parent).then(function() {
diff --git a/js/public/app.js b/js/public/app.js
index f0b10328..d0bf8031 100644
--- a/js/public/app.js
+++ b/js/public/app.js
@@ -972,6 +972,7 @@ angular.module('Tasks').controller('SettingsController', [
task = VTodo.create(task);
_tasksbusinesslayer.add(task).then(function(task) {
_$scope.isAddingTask = false;
+ _$scope.openDetails(task.uri, null);
return $scope.$apply();
});
if (parent) {
@@ -1052,7 +1053,7 @@ angular.module('Tasks').controller('SettingsController', [
this._$scope.openDetails = function(id, $event) {
var calendarID = _$scope.route.calendarID;
var collectionID = _$scope.route.collectionID;
- if ($($event.currentTarget).is($($event.target).closest('.handler'))) {
+ if ($event==null || $($event.currentTarget).is($($event.target).closest('.handler'))) {
var parent = _$tasksmodel.getByUri(id);
if (!parent.loadedCompleted) {
_tasksbusinesslayer.getAll(parent.calendar, true, parent).then(function() {
@@ -4689,4 +4690,4 @@ angular.module('Tasks').service('VTodoService', ['DavClient', 'RandomStringServi
}]);
-})(window.angular, window.jQuery, oc_requesttoken); \ No newline at end of file
+})(window.angular, window.jQuery, oc_requesttoken);