Upgrade grapesjs
Showing
8 changed files
with
8 additions
and
4 deletions
... | @@ -21,7 +21,7 @@ along with this software (see the LICENSE.md file). If not, see | ... | @@ -21,7 +21,7 @@ along with this software (see the LICENSE.md file). If not, see |
21 | <moqui.screen.ScreenThemeResource screenThemeId="MJML_DEFAULT" sequenceNum="52" resourceTypeEnumId="STRT_STYLESHEET" resourceValue="/mjmlstatic/css/grapesjs-mjml.css"/> | 21 | <moqui.screen.ScreenThemeResource screenThemeId="MJML_DEFAULT" sequenceNum="52" resourceTypeEnumId="STRT_STYLESHEET" resourceValue="/mjmlstatic/css/grapesjs-mjml.css"/> |
22 | 22 | ||
23 | <delete-moqui.screen.ScreenThemeResource screenThemeId="MJML_DEFAULT" sequenceNum="10" resourceTypeEnumId="STRT_SCRIPT" resourceValue="/js/MoquiLib.js"/> | 23 | <delete-moqui.screen.ScreenThemeResource screenThemeId="MJML_DEFAULT" sequenceNum="10" resourceTypeEnumId="STRT_SCRIPT" resourceValue="/js/MoquiLib.js"/> |
24 | <moqui.screen.ScreenThemeResource screenThemeId="MJML_DEFAULT" sequenceNum="51" resourceTypeEnumId="STRT_SCRIPT" resourceValue="/mjmlstatic/js/grapesjs.min.js"/> | 24 | <moqui.screen.ScreenThemeResource screenThemeId="MJML_DEFAULT" sequenceNum="51" resourceTypeEnumId="STRT_SCRIPT" resourceValue="/mjmlstatic/js/grapes.min.js"/> |
25 | <moqui.screen.ScreenThemeResource screenThemeId="MJML_DEFAULT" sequenceNum="52" resourceTypeEnumId="STRT_SCRIPT" resourceValue="/mjmlstatic/js/grapesjs-mjml.min.js"/> | 25 | <moqui.screen.ScreenThemeResource screenThemeId="MJML_DEFAULT" sequenceNum="52" resourceTypeEnumId="STRT_SCRIPT" resourceValue="/mjmlstatic/js/grapesjs-mjml.min.js"/> |
26 | 26 | ||
27 | <!-- <moqui.screen.ScreenThemeResource screenThemeId="MJML_DEFAULT" sequenceNum="100" resourceTypeEnumId="STRT_HEADER_LOGO"--> | 27 | <!-- <moqui.screen.ScreenThemeResource screenThemeId="MJML_DEFAULT" sequenceNum="100" resourceTypeEnumId="STRT_HEADER_LOGO"--> | ... | ... |
... | @@ -178,7 +178,7 @@ along with this software (see the LICENSE.md file). If not, see | ... | @@ -178,7 +178,7 @@ along with this software (see the LICENSE.md file). If not, see |
178 | <script type="text/javascript"> | 178 | <script type="text/javascript"> |
179 | // Wait for the plugin to be injected by the dev server | 179 | // Wait for the plugin to be injected by the dev server |
180 | window.onload = () => { | 180 | window.onload = () => { |
181 | const resourceId = new URLSearchParams(window.location.search).get('resourceId'); | 181 | let resourceId = new URLSearchParams(window.location.search).get('resourceId'); |
182 | 182 | ||
183 | window.editor = grapesjs.init({ | 183 | window.editor = grapesjs.init({ |
184 | // projectData: { | 184 | // projectData: { |
... | @@ -216,11 +216,13 @@ along with this software (see the LICENSE.md file). If not, see | ... | @@ -216,11 +216,13 @@ along with this software (see the LICENSE.md file). If not, see |
216 | // project data from the response result. | 216 | // project data from the response result. |
217 | onStore: data => { | 217 | onStore: data => { |
218 | console.log('onStore', ({ id: resourceId, data })) | 218 | console.log('onStore', ({ id: resourceId, data })) |
219 | console.log('resourceId', resourceId) | 219 | console.log('onStore resourceId', resourceId) |
220 | console.log('onStore editor', editor) | ||
221 | console.log('onStore this ', this) | ||
220 | // const url = new URL(window.location.href) | 222 | // const url = new URL(window.location.href) |
221 | // url.searchParams.set('resourceId', resourceId); | 223 | // url.searchParams.set('resourceId', resourceId); |
222 | // window.history.pushState({}, '', url) | 224 | // window.history.pushState({}, '', url) |
223 | return { id: resourceId, data } | 225 | return { resourceId: resourceId, data } |
224 | }, | 226 | }, |
225 | onLoad: result => { | 227 | onLoad: result => { |
226 | const url = new URL(window.location.href) | 228 | const url = new URL(window.location.href) | ... | ... |
This diff could not be displayed because it is too large.
screen/MjmlStatic/js/grapes.min.js
0 → 100644
This diff could not be displayed because it is too large.
screen/MjmlStatic/js/grapes.min.js.map
0 → 100644
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
screen/MjmlStatic/js/grapesjs.min.js
deleted
100644 → 0
This diff could not be displayed because it is too large.
... | @@ -30,6 +30,7 @@ along with this software (see the LICENSE.md file). If not, see | ... | @@ -30,6 +30,7 @@ along with this software (see the LICENSE.md file). If not, see |
30 | 30 | ||
31 | <if condition="!resourceId"> | 31 | <if condition="!resourceId"> |
32 | <then> | 32 | <then> |
33 | <return error="true" message="Resource not found"/> | ||
33 | <set field="grapesJsResource" from="ec.resource.getLocationReference('dbresource://grapesjs/project')"/> | 34 | <set field="grapesJsResource" from="ec.resource.getLocationReference('dbresource://grapesjs/project')"/> |
34 | <service-call name="create#moqui.resource.DbResource" in-map="[parentResourceId:grapesJsResource.getDbResourceId(),isFile:'Y']" out-map="dbResource"/> | 35 | <service-call name="create#moqui.resource.DbResource" in-map="[parentResourceId:grapesJsResource.getDbResourceId(),isFile:'Y']" out-map="dbResource"/> |
35 | <service-call name="update#moqui.resource.DbResource" in-map="[resourceId:dbResource.resourceId,filename:dbResource.resourceId]" out-map="dbResource"/> | 36 | <service-call name="update#moqui.resource.DbResource" in-map="[resourceId:dbResource.resourceId,filename:dbResource.resourceId]" out-map="dbResource"/> |
... | @@ -39,6 +40,7 @@ along with this software (see the LICENSE.md file). If not, see | ... | @@ -39,6 +40,7 @@ along with this software (see the LICENSE.md file). If not, see |
39 | <service-call name="create#moqui.resource.DbResourceFile" in-map="[resourceId: dbResource.resourceId,mimeType: 'text/json',versionName: versionName,rootVersionName: versionName,fileData:data]"/> | 40 | <service-call name="create#moqui.resource.DbResourceFile" in-map="[resourceId: dbResource.resourceId,mimeType: 'text/json',versionName: versionName,rootVersionName: versionName,fileData:data]"/> |
40 | <service-call name="create#moqui.resource.DbResourceFileHistory" in-map="[resourceId: dbResource.resourceId,versionDate: ec.user.nowTimestamp,userId: ec.user.userId,isDiff: 'N']"/> | 41 | <service-call name="create#moqui.resource.DbResourceFileHistory" in-map="[resourceId: dbResource.resourceId,versionDate: ec.user.nowTimestamp,userId: ec.user.userId,isDiff: 'N']"/> |
41 | <set field="resourceId" from="dbResource.resourceId"/> | 42 | <set field="resourceId" from="dbResource.resourceId"/> |
43 | |||
42 | </then> | 44 | </then> |
43 | <else> | 45 | <else> |
44 | <entity-find-one entity-name="moqui.resource.DbResource" value-field="dbResource" auto-field-map="[resourceId:resourceId]"/> | 46 | <entity-find-one entity-name="moqui.resource.DbResource" value-field="dbResource" auto-field-map="[resourceId:resourceId]"/> | ... | ... |
-
Please register or sign in to post a comment