raw/ace/assets/js/uncompressed/x-editable/bootstrap-editable.js
function(element, options) {
            this.$element = $(element);
            //since 1.4.1 container do not use data-* directly as they already merged into options.
            this.options = $.extend({}, $.fn.editableContainer.defaults, options);         
            this.splitOptions();
            
            //set scope of form callbacks to element
            this.formOptions.scope = this.$element[0]; 
            
            this.initContainer();
            
            //flag to hide container, when saving value will finish
            this.delayedHide = false;

            //bind 'destroyed' listener to destroy container when element is removed from dom
            this.$element.on('destroyed', $.proxy(function(){
                this.destroy();
            }, this)); 
            
            //attach document handler to close containers on click / escape
            if(!$(document).data('editable-handlers-attached')) {
                //close all on escape
                $(document).on('keyup.editable', function (e) {
                    if (e.which === 27) {
                        $('.editable-open').editableContainer('hide');
                        //todo: return focus on element 
                    }
                });

                //close containers when click outside 
                //(mousedown could be better than click, it closes everything also on drag drop)
                $(document).on('click.editable', function(e) {
                    var $target = $(e.target), i,
                        exclude_classes = ['.editable-container', 
                                           '.ui-datepicker-header', 
                                           '.datepicker', //in inline mode datepicker is rendered into body
                                           '.modal-backdrop', 
                                           '.bootstrap-wysihtml5-insert-image-modal', 
                                           '.bootstrap-wysihtml5-insert-link-modal'
                                           ];
                    
                    //check if element is detached. It occurs when clicking in bootstrap datepicker
                    if (!$.contains(document.documentElement, e.target)) {
                      return;
                    }

                    //for some reason FF 20 generates extra event (click) in select2 widget with e.target = document
                    //we need to filter it via construction below. See https://github.com/vitalets/x-editable/issues/199
                    //Possibly related to http://stackoverflow.com/questions/10119793/why-does-firefox-react-differently-from-webkit-and-ie-to-click-event-on-selec
                    if($target.is(document)) {
                       return; 
                    }
                    
                    //if click inside one of exclude classes --> no nothing
                    for(i=0; i<exclude_classes.length; i++) {
                         if($target.is(exclude_classes[i]) || $target.parents(exclude_classes[i]).length) {
                             return;
                         }
                    }
                      
                    //close all open containers (except one - target)
                    Popup.prototype.closeOthers(e.target);
                });
                
                $(document).data('editable-handlers-attached', true);
            }                        
        }
function(element, options) {
            this.$element = $(element);
            //since 1.4.1 container do not use data-* directly as they already merged into options.
            this.options = $.extend({}, $.fn.editableContainer.defaults, options);         
            this.splitOptions();
            
            //set scope of form callbacks to element
            this.formOptions.scope = this.$element[0]; 
            
            this.initContainer();
            
            //flag to hide container, when saving value will finish
            this.delayedHide = false;

            //bind 'destroyed' listener to destroy container when element is removed from dom
            this.$element.on('destroyed', $.proxy(function(){
                this.destroy();
            }, this)); 
            
            //attach document handler to close containers on click / escape
            if(!$(document).data('editable-handlers-attached')) {
                //close all on escape
                $(document).on('keyup.editable', function (e) {
                    if (e.which === 27) {
                        $('.editable-open').editableContainer('hide');
                        //todo: return focus on element 
                    }
                });

                //close containers when click outside 
                //(mousedown could be better than click, it closes everything also on drag drop)
                $(document).on('click.editable', function(e) {
                    var $target = $(e.target), i,
                        exclude_classes = ['.editable-container', 
                                           '.ui-datepicker-header', 
                                           '.datepicker', //in inline mode datepicker is rendered into body
                                           '.modal-backdrop', 
                                           '.bootstrap-wysihtml5-insert-image-modal', 
                                           '.bootstrap-wysihtml5-insert-link-modal'
                                           ];
                    
                    //check if element is detached. It occurs when clicking in bootstrap datepicker
                    if (!$.contains(document.documentElement, e.target)) {
                      return;
                    }

                    //for some reason FF 20 generates extra event (click) in select2 widget with e.target = document
                    //we need to filter it via construction below. See https://github.com/vitalets/x-editable/issues/199
                    //Possibly related to http://stackoverflow.com/questions/10119793/why-does-firefox-react-differently-from-webkit-and-ie-to-click-event-on-selec
                    if($target.is(document)) {
                       return; 
                    }
                    
                    //if click inside one of exclude classes --> no nothing
                    for(i=0; i<exclude_classes.length; i++) {
                         if($target.is(exclude_classes[i]) || $target.parents(exclude_classes[i]).length) {
                             return;
                         }
                    }
                      
                    //close all open containers (except one - target)
                    Popup.prototype.closeOthers(e.target);
                });
                
                $(document).data('editable-handlers-attached', true);
            }                        
        }
function ( element , options ) { this . $element = $ ( element ) ; //since 1.4.1 container do not use data-* directly as they already merged into options. this . options = $ . extend ( { } , $ . fn . editableContainer . defaults , options ) ; this . splitOptions ( ) ; //set scope of form callbacks to element this . formOptions . scope = this . $element [ 0 ] ; this . initContainer ( ) ; //flag to hide container, when saving value will finish this . delayedHide = false ; //bind 'destroyed' listener to destroy container when element is removed from dom this . $element . on ( 'destroyed' , $ . proxy ( function ( ) { this . destroy ( ) ; } , this ) ) ; //attach document handler to close containers on click / escape if ( ! $ ( document ) . data ( 'editable-handlers-attached' ) ) { //close all on escape $ ( document ) . on ( 'keyup.editable' , function ( e ) { if ( e . which === 27 ) { $ ( '.editable-open' ) . editableContainer ( 'hide' ) ; //todo: return focus on element  } } ) ; //close containers when click outside  //(mousedown could be better than click, it closes everything also on drag drop) $ ( document ) . on ( 'click.editable' , function ( e ) { var $target = $ ( e . target ) , i , exclude_classes = [ '.editable-container' , '.ui-datepicker-header' , '.datepicker' , //in inline mode datepicker is rendered into body '.modal-backdrop' , '.bootstrap-wysihtml5-insert-image-modal' , '.bootstrap-wysihtml5-insert-link-modal' ] ; //check if element is detached. It occurs when clicking in bootstrap datepicker if ( ! $ . contains ( document . documentElement , e . target ) ) { return ; } //for some reason FF 20 generates extra event (click) in select2 widget with e.target = document //we need to filter it via construction below. See https://github.com/vitalets/x-editable/issues/199 //Possibly related to http://stackoverflow.com/questions/10119793/why-does-firefox-react-differently-from-webkit-and-ie-to-click-event-on-selec if ( $target . is ( document ) ) { return ; } //if click inside one of exclude classes --> no nothing for ( i = 0 ; i < exclude_classes . length ; i ++ ) { if ( $target . is ( exclude_classes [ i ] ) || $target . parents ( exclude_classes [ i ] ) . length ) { return ; } } //close all open containers (except one - target) Popup . prototype . closeOthers ( e . target ) ; } ) ; $ ( document ) . data ( 'editable-handlers-attached' , true ) ; } }
css class applied to container element
css class applied to container element