Sha256: 50e7819f506ce7effba59fddd0fd4a864971207c7118ea5803c8f164f6a6c4ff

Contents?: true

Size: 700 Bytes

Versions: 23

Compression:

Stored size: 700 Bytes

Contents

import Vue from 'vue';
import AssetModal from './asset-modal.vue';

export default Vue.component('asset-field', {

  props: {
    asset: {
      coerce: (val) => JSON.parse(val)
    }
  },

  data: function() {
    return {
      uid: `asset-${ Math.uid() }`
    }
  },

  ready: function() {
    if (window.fndtnInit) {
      setTimeout(() => $(this.$el).trigger('init.fndtn'), 100);
    }
  },

  computed: {
    assetId: function() {
      return this.asset ? this.asset.id : null;
    }
  },

  methods: {
    selectAsset: function(asset) {
      this.asset = asset;
    },
    deselectAsset: function() {
      this.asset = null;
    }
  },

  components: {
    'asset-modal': AssetModal
  }

})

Version data entries

23 entries across 23 versions & 1 rubygems

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