actions_js.html 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. {% load i18n %}
  2. <script lang="JavaScript">
  3. $(function() {
  4. $('#thread-actions .dropdown-menu button').click(function() {
  5. if ($(this).data('confirmation') != undefined) {
  6. var decision = confirm($(this).data('confirmation'));
  7. return decision
  8. } else {
  9. return true;
  10. }
  11. });
  12. var $thread_actions = $('#thread-actions');
  13. $('#thread-actions .action-move').click(function() {
  14. var action_data = $thread_actions.serialize($thread_actions) + '&thread_action=move';
  15. Misago.Modal.post('', action_data);
  16. return false;
  17. });
  18. var $posts_actions = $('#posts-actions');
  19. $('#posts-actions .action-move').click(function() {
  20. var action_data = $posts_actions.serialize($posts_actions) + '&action=move';
  21. Misago.Modal.post('', action_data);
  22. return false;
  23. });
  24. $('#posts-actions .action-split').click(function() {
  25. var action_data = $posts_actions.serialize($posts_actions) + '&action=split';
  26. Misago.Modal.post('', action_data);
  27. return false;
  28. });
  29. });
  30. </script>