Dotclear


Ignore:
Timestamp:
11/25/14 20:00:54 (11 years ago)
Author:
Nicolas <nikrou77@…>
Branch:
default
Message:

When something change in content area using ckeditor there's no prompt to invite user staying on page.
Fixes #2003

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/dcCKEditor/_post_config.php

    r2761 r2816  
    4141 
    4242     /* Retrieve editor from popup */ 
    43     $.active_editor = null; 
     43     $.active_editor = null; 
    4444     $.getEditorName = function getEditorName() { 
    4545          return $.active_editor; 
    4646     } 
     47     chainHandler(window, 'onbeforeunload', function(e) { 
     48          if (e == undefined && window.event) { 
     49               e = window.event; 
     50          } 
     51 
     52          var editor = CKEDITOR.instances[$.getEditorName()]; 
     53          if (editor.checkDirty()) { 
     54               e.returnValue = confirmClosePage.prompt; 
     55               return confirmClosePage.prompt; 
     56          } 
     57          return false; 
     58     }); 
    4759})(jQuery); 
    4860 
Note: See TracChangeset for help on using the changeset viewer.

Sites map