semantic-buttons.js 1015 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. $('.ui.dropdown')
  25. .dropdown()
  26. ;
  27. $('.add_function_button').on('click', addFunctionHandler);
  28. // Atualiza a tela do algoritmo
  29. renderAlgorithm();
  30. $('.ivprog_visual_panel').removeClass("loading");
  31. //Sortable:
  32. Sortable.create(listWithHandle, {
  33. handle: '.glyphicon-move',
  34. animation: 100,
  35. ghostClass: 'ghost',
  36. group: 'functions_divs_drag',
  37. onEnd: function (evt) {
  38. updateSequenceFunctionHandler(evt.oldIndex, evt.newIndex);
  39. }
  40. });
  41. };
  42. // attach ready event
  43. $(document)
  44. .ready(button_ready)
  45. ;