Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. $('div').html(""); //limpa a div
  2.  
  3. $('div').dialog({
  4. resizable: false,
  5. height: 'auto',
  6. width: 400,
  7. modal: true,
  8. title: 'Criar Ticket?',
  9. buttons: {
  10. "Confirmar": function () {
  11. $(this).dialog("close");
  12. obs = prompt('Inserir alguma observação no ticket?');
  13. $('<input/>').attr('type', 'hidden')
  14. .attr('name', "obs")
  15. .attr('value', obs)
  16. .appendTo('#form');
  17. $("#form").submit();
  18. },
  19. "Cancelar": function () {
  20. $(this).dialog("close");
  21. console.log('cancelado');
  22. }
  23. }
  24. });
  25.  
  26.  
  27. <form action="#" id="form" method="post" accept-charset="utf-8">
  28.  
  29. <div></div>
  30.  
  31. <button id="ticket" name="obs" type="button" style="
  32. border-top-color: transparent;
  33. border-right-color: transparent;
  34. border-bottom-color: transparent;
  35. border-left-color: transparent;
  36. background-color: transparent;
  37. cursor: pointer;" title="Criar Ticket no Redmine"><img src="https://cdn3.iconfinder.com/data/icons/fatcow/32x32/ruby_add.png" style="height: 32px" alt=""></button>
  38. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement