semantic-buttons.js 974 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. var button_ready = function() {
  2. var
  3. $buttons = $('.ivprog_format .button'),
  4. handler = {
  5. activate: function() {
  6. $(this)
  7. .addClass('active')
  8. .siblings()
  9. .removeClass('active')
  10. ;
  11. }
  12. }
  13. ;
  14. $buttons.on('click', handler.activate);
  15. $('.ivprog_format_info')
  16. .popup({
  17. popup : $('.custom.popup'),
  18. on : 'click'
  19. })
  20. ;
  21. $(".data_types_dropdown")
  22. .dropdown()
  23. ;
  24. $('.add_function_button').on('click', addFunctionHandler);
  25. // Atualiza a tela do algoritmo
  26. renderAlgorithm();
  27. $('.ivprog_visual_panel').removeClass("loading");
  28. //Sortable:
  29. Sortable.create(listWithHandle, {
  30. handle: '.glyphicon-move',
  31. animation: 100,
  32. ghostClass: 'ghost',
  33. group: 'functions_divs_drag',
  34. onEnd: function (evt) {
  35. updateSequenceFunctionHandler(evt.oldIndex, evt.newIndex);
  36. }
  37. });
  38. };
  39. // attach ready event
  40. $(document)
  41. .ready(button_ready)
  42. ;