Guest User

Untitled

a guest
Oct 20th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. <aui:button name="YES" value="YES" onClick="javascript:yes();"/>
  2. <aui:script>
  3. function yes(){
  4. alert('pop');
  5. Liferay.Util.getOpener().<portlet:namespace />closePopup('<portlet:namespace />shahbaj');
  6. }
  7. </aui:script>
  8.  
  9. <input type="button" onclick="hidePopup();" value="Cancel" />
  10.  
  11. function hidePopup(){
  12. AUI().ready('aui-dialog', function(A){
  13. A.DialogManager.hideAll();
  14. });
  15. }
  16.  
  17. AUI().ready(function(A) {
  18. AUI().use('aui-dialog', 'aui-io', function(A) {
  19. var url = 'http://localhost/url';
  20. Liferay.Util.openWindow(
  21. {
  22. dialog: {
  23. cache: false,
  24. width:800,
  25. modal: true
  26. },
  27. id:'shahbaj',
  28. uri: url
  29. }
  30. );
  31. Liferay.provide(
  32. window,
  33. 'closePopup',
  34. function(popupIdToClose) {
  35. var dialog = Liferay.Util.getWindow(popupIdToClose);
  36. dialog.destroy(); // You can try toggle/hide whatever You want
  37. },
  38. ['aui-base','aui-dialog','aui-dialog-iframe']
  39. );
  40. });
  41. });
  42.  
  43. <aui:button cssClass="close-panel" type="cancel" value="close" />
Add Comment
Please, Sign In to add comment