Fixed tag edits not triggering tag list updates
This commit is contained in:
parent
3c54671aeb
commit
a3aea27a13
1 changed files with 16 additions and 1 deletions
|
@ -128,6 +128,7 @@ App.Presenters.TagPresenter = function(
|
|||
promise.wait(api.put('/tags/' + tag.name, formData))
|
||||
.then(function(response) {
|
||||
router.navigateInplace('#/tag/' + response.json.name);
|
||||
tagList.refreshTags();
|
||||
}).fail(function(response) {
|
||||
window.alert(response.json && response.json.error || 'An error occured.');
|
||||
});
|
||||
|
@ -140,6 +141,7 @@ App.Presenters.TagPresenter = function(
|
|||
promise.wait(api.delete('/tags/' + tag.name))
|
||||
.then(function(response) {
|
||||
router.navigate('#/tags');
|
||||
tagList.refreshTags();
|
||||
}).fail(function(response) {
|
||||
window.alert(response.json && response.json.error || 'An error occured.');
|
||||
});
|
||||
|
@ -151,6 +153,7 @@ App.Presenters.TagPresenter = function(
|
|||
promise.wait(api.put('/tags/' + tag.name + '/merge', {targetTag: targetTag}))
|
||||
.then(function(response) {
|
||||
router.navigate('#/tags');
|
||||
tagList.refreshTags();
|
||||
}).fail(function(response) {
|
||||
window.alert(response.json && response.json.error || 'An error occured.');
|
||||
});
|
||||
|
@ -183,4 +186,16 @@ App.Presenters.TagPresenter = function(
|
|||
|
||||
};
|
||||
|
||||
App.DI.register('tagPresenter', ['_', 'jQuery', 'util', 'promise', 'auth', 'api', 'tagList', 'router', 'keyboard', 'topNavigationPresenter', 'messagePresenter'], App.Presenters.TagPresenter);
|
||||
App.DI.register('tagPresenter', [
|
||||
'_',
|
||||
'jQuery',
|
||||
'util',
|
||||
'promise',
|
||||
'auth',
|
||||
'api',
|
||||
'tagList',
|
||||
'router',
|
||||
'keyboard',
|
||||
'topNavigationPresenter',
|
||||
'messagePresenter'],
|
||||
App.Presenters.TagPresenter);
|
||||
|
|
Loading…
Reference in a new issue