Sha256: c57b1a99503b3717bf9b4f67b5606cd944c01725bebb5a0d7623b911cfac7dba

Contents?: true

Size: 273 Bytes

Versions: 28

Compression:

Stored size: 273 Bytes

Contents

import Vue from 'vue';
import $ from 'jquery';

export default Vue.directive('node-submit', {
  bind: function() {
    let $el = $(this.el);
    $el.on('click', function(e) {
      if ( !$(e.target).is('span') ) {
        $el.parents('form').submit();
      }
    })
  }
})

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
push_type_admin-0.12.1 app/webpack/javascripts/directives/node-submit.es6
push_type_admin-0.12.0 app/webpack/javascripts/directives/node-submit.es6
push_type_admin-0.12.0.beta.1 app/webpack/javascripts/directives/node-submit.es6
push_type_admin-0.11.2 app/webpack/javascripts/directives/node-submit.es6
push_type_admin-0.11.1 app/webpack/javascripts/directives/node-submit.es6
push_type_admin-0.11.0.beta.2 app/webpack/javascripts/directives/node-submit.es6
push_type_admin-0.11.0.beta.1 app/webpack/javascripts/directives/node-submit.es6
push_type_admin-0.10.4 app/webpack/javascripts/directives/node-submit.es6
push_type_admin-0.10.3 app/webpack/javascripts/directives/node-submit.es6
push_type_admin-0.10.2 app/webpack/javascripts/directives/node-submit.es6
push_type_admin-0.10.1 app/webpack/javascripts/directives/node-submit.es6
push_type_admin-0.10.0 app/webpack/javascripts/directives/node-submit.es6
push_type_admin-0.10.0.beta.5 app/webpack/javascripts/directives/node-submit.es6
push_type_admin-0.10.0.beta.3 app/webpack/javascripts/directives/node-submit.es6
push_type_admin-0.9.5 app/webpack/javascripts/directives/node-submit.es6
push_type_admin-0.9.3 app/webpack/javascripts/directives/node-submit.es6
push_type_admin-0.9.2 app/webpack/javascripts/directives/node-submit.es6
push_type_admin-0.9.1 app/webpack/javascripts/directives/node-submit.es6
push_type_admin-0.9.0 app/webpack/javascripts/directives/node-submit.es6
push_type_admin-0.9.0.beta.4 app/webpack/javascripts/directives/node-submit.es6