Guest User

Untitled

a guest
Jul 15th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. // Place your application-specific JavaScript functions and classes here
  2. // This file is automatically included by javascript_include_tag :defaults
  3. appUI = {
  4. dialogWindow: function(node) {
  5. $(node).dialog({
  6. bgiframe: true,
  7. modal: true,
  8. draggable: false,
  9. height: 530,
  10. width: 700,
  11. close: function(event, ui) {
  12. appUI.removeFCK('#' + event.target.id);
  13. appUI.removeNode('#' + event.target.id);
  14. },
  15. resizable: false
  16. });
  17. },
  18.  
  19. removeFCK: function(node) {
  20. var nodes = $(node + ' textarea');
  21. if(nodes.length > 0) {
  22. nodes.each(function(i) {
  23. editor = FCKeditorAPI.GetInstance(this.id);
  24. if(editor) {
  25. $('#' + this.id).val(editor.GetXHTML()).show();
  26. $('#' + this.id + '___Config').remove();
  27. $('#' + this.id + '___Frame').remove();
  28. FCKeditorAPI.__Instances[this.id] = null;
  29. }
  30. });
  31. }
  32.  
  33. var frames = $('iframe');
  34. if(frames.length > 0) {
  35. frames.each(function(i) {
  36. $(this).remove();
  37. });
  38. }
  39. },
  40.  
  41. removeNode: function(node) {
  42. $(node).remove();
  43. }
  44. };
Add Comment
Please, Sign In to add comment