diff options
author | Frederic Guillot <fred@kanboard.net> | 2017-01-02 17:01:27 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2017-01-02 17:01:27 -0500 |
commit | 3833c12ccce59bcc49c4cfa892401973558f604d (patch) | |
tree | b67b0e10cdc3d42e5626f728206138a444a40ed0 /assets/js/src/Task.js | |
parent | d49ce63e51f596ad3bf0d02b689aea673cf544f8 (diff) |
Refactoring/rewrite of modal boxes handling
Diffstat (limited to 'assets/js/src/Task.js')
-rw-r--r-- | assets/js/src/Task.js | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/assets/js/src/Task.js b/assets/js/src/Task.js index be9c2bfa..19cf39e8 100644 --- a/assets/js/src/Task.js +++ b/assets/js/src/Task.js @@ -2,9 +2,9 @@ Kanboard.Task = function(app) { this.app = app; }; +// TODO: rewrite this code Kanboard.Task.prototype.onPopoverOpened = function() { var self = this; - var reloadingProjectId = 0; self.renderColorPicker(); @@ -19,29 +19,6 @@ Kanboard.Task.prototype.onPopoverOpened = function() { $(dropdownId).val(currentId); } }); - - // Reload page when a destination project is changed - $(document).on("change", "select.task-reload-project-destination", function() { - if (reloadingProjectId > 0) { - $(this).val(reloadingProjectId); - } - else { - reloadingProjectId = $(this).val(); - var url = $(this).data("redirect").replace(/PROJECT_ID/g, reloadingProjectId); - - $(".loading-icon").show(); - - $.ajax({ - type: "GET", - url: url, - success: function(data, textStatus, request) { - reloadingProjectId = 0; - $(".loading-icon").hide(); - self.app.get("Popover").ajaxReload(data, request, self.app.get("Popover")); - } - }); - } - }); }; Kanboard.Task.prototype.renderColorPicker = function() { |