Sha256: 28acb41c074dbdea9386e11bba6e703fcfb901c6d81a359a8f780404f826f5db
Contents?: true
Size: 785 Bytes
Versions: 8
Compression:
Stored size: 785 Bytes
Contents
import axios from 'axios' const railsAdmin = { namespaced: true, state: { inputId: '' }, mutations: { SET_INPUT_ID (state, id) { state.inputId = id } }, actions: { setInputId ({ commit}, id) { commit('SET_INPUT_ID', id) }, insertImage ({commit, state, dispatch}, idImage) { dispatch('overlayStore/showProgressOverlay', true, {root:true}) // Generating new dynamic image size before sending it back axios.get(`/images/${idImage}?width=0&height=0`).then((response) => { dispatch('overlayStore/showProgressOverlay', false, {root:true}) window.opener.insertImageManagerMedia(idImage, state.inputId, response.data.image.src_for_wysiwyg) window.close() }) } } } export default railsAdmin
Version data entries
8 entries across 8 versions & 1 rubygems