Sha256: 2f666e6dda22ecaa82dde01f998709eaa5ad9b385c47b183f3da5e7637509ba0

Contents?: true

Size: 624 Bytes

Versions: 9

Compression:

Stored size: 624 Bytes

Contents

define(['angular'],
function (angular) {
  'use strict';

  angular
    .module('kibana.directives')
    .directive('ngModelOnblur', function() {
      return {
        restrict: 'A',
        require: 'ngModel',
        link: function(scope, elm, attr, ngModelCtrl) {
          if (attr.type === 'radio' || attr.type === 'checkbox') {
            return;
          }

          elm.unbind('input').unbind('keydown').unbind('change');
          elm.bind('blur', function() {
            scope.$apply(function() {
              ngModelCtrl.$setViewValue(elm.val());
            });
          });
        }
      };
    });
});

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
kibana-sinatra-3.0.0.0 lib/kibana/assets/app/directives/ngModelOnBlur.js
kibana-sinatra-0.0.8 lib/kibana/assets/app/directives/ngModelOnBlur.js
kibana-sinatra-0.0.7 lib/kibana/assets/app/directives/ngModelOnBlur.js
kibana-sinatra-0.0.6 lib/kibana/assets/app/directives/ngModelOnBlur.js
kibana-sinatra-0.0.5 lib/kibana/assets/app/directives/ngModelOnBlur.js
kibana-sinatra-0.0.4 lib/kibana/assets/app/directives/ngModelOnBlur.js
kibana-sinatra-0.0.3 lib/kibana/assets/app/directives/ngModelOnBlur.js
kibana-sinatra-0.0.2 lib/kibana/assets/app/directives/ngModelOnBlur.js
kibana-sinatra-0.0.1 lib/kibana/assets/app/directives/ngModelOnBlur.js