Browse Source

update event listeners

main
ghost 3 years ago
parent
commit
b475c49829
  1. 2
      src/public/js/home.js
  2. 2
      src/public/js/module/following.js
  3. 2
      src/public/js/module/post.js

2
src/public/js/home.js

@ -5,7 +5,7 @@ $(document).ready(function() { @@ -5,7 +5,7 @@ $(document).ready(function() {
ModuleFeed.load('#moduleFeed', true);
// Event listeners
$(document).on('modulePost.add:success', function(/*event, response*/) {
$(document).on('ModulePost.add:success', function(/*event, response*/) {
ModuleFeed.load('#moduleFeed', true);
});

2
src/public/js/module/following.js

@ -90,6 +90,8 @@ var ModuleFollowing = { @@ -90,6 +90,8 @@ var ModuleFollowing = {
ModuleFollowing.load(list, reFresh);
}
$(document).trigger('ModuleFollowing.unFollow:success', [response]);
} else {
alert(response.message);

2
src/public/js/module/post.js

@ -15,7 +15,7 @@ var ModulePost = { @@ -15,7 +15,7 @@ var ModulePost = {
input.val('');
$(document).trigger('modulePost.add:success', [response]);
$(document).trigger('ModulePost.add:success', [response]);
} else {

Loading…
Cancel
Save