mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-06-18 16:21:09 +02:00
feat(forums): admin/Moderators and topic owner can edit topic title when click on the title text
#20
This commit is contained in:
@@ -189,6 +189,21 @@
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* onTopicTitleEdited
|
||||
*/
|
||||
$scope.onTopicTitleEdited = function (modifyed) {
|
||||
console.log(modifyed);
|
||||
if (vm.topic && modifyed) {
|
||||
vm.topic.$update(function (res) {
|
||||
vm.topic = res;
|
||||
NotifycationService.showSuccessNotify('FORUMS.TOPIC_EDIT_SUCCESSFULLY');
|
||||
}, function (res) {
|
||||
NotifycationService.showErrorNotify(res.data.message, 'FORUMS.TOPIC_EDIT_FAILED');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* beginEditTopic
|
||||
* @param t
|
||||
|
||||
Reference in New Issue
Block a user