Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Place your application-specific JavaScript functions and classes here
- // This file is automatically included by javascript_include_tag :defaults
- appUI = {
- dialogWindow: function(node) {
- $(node).dialog({
- bgiframe: true,
- modal: true,
- draggable: false,
- height: 530,
- width: 700,
- close: function(event, ui) {
- appUI.removeFCK('#' + event.target.id);
- appUI.removeNode('#' + event.target.id);
- },
- resizable: false
- });
- },
- removeFCK: function(node) {
- var nodes = $(node + ' textarea');
- if(nodes.length > 0) {
- nodes.each(function(i) {
- editor = FCKeditorAPI.GetInstance(this.id);
- if(editor) {
- $('#' + this.id).val(editor.GetXHTML()).show();
- $('#' + this.id + '___Config').remove();
- $('#' + this.id + '___Frame').remove();
- FCKeditorAPI.__Instances[this.id] = null;
- }
- });
- }
- var frames = $('iframe');
- if(frames.length > 0) {
- frames.each(function(i) {
- $(this).remove();
- });
- }
- },
- removeNode: function(node) {
- $(node).remove();
- }
- };
Add Comment
Please, Sign In to add comment