Mehr Frieden -General Kyrylo Budanov:
[kivitendo-erp.git] / js / jquery / fixes.js
1 // Allow CKeditor to work in jQuery dialogs. See
2 // http://bugs.jqueryui.com/ticket/9087
3
4 $.widget( "ui.dialog", $.ui.dialog, {
5  /*! jQuery UI - v1.10.2 - 2013-12-12
6   *  http://bugs.jqueryui.com/ticket/9087#comment:27 - bugfix
7   *  http://bugs.jqueryui.com/ticket/4727#comment:23 - bugfix
8   *  allowInteraction fix to accommodate windowed editors
9   */
10   _allowInteraction: function( event ) {
11     if ( this._super( event ) ) {
12       return true;
13     }
14
15     // address interaction issues with general iframes with the dialog
16     if ( event.target.ownerDocument != this.document[ 0 ] ) {
17       return true;
18     }
19
20     // address interaction issues with dialog window
21     if ( $( event.target ).closest( ".cke_dialog" ).length ) {
22       return true;
23     }
24
25     // address interaction issues with iframe based drop downs in IE
26     if ( $( event.target ).closest( ".cke" ).length ) {
27       return true;
28     }
29   },
30  /*! jQuery UI - v1.10.2 - 2013-10-28
31   *  http://dev.ckeditor.com/ticket/10269 - bugfix
32   *  moveToTop fix to accommodate windowed editors
33   */
34   _moveToTop: function ( event, silent ) {
35     if ( !event || !this.options.modal ) {
36       this._super( event, silent );
37     }
38   }
39
40 });