From ba963377658e53209799548feb93a0e5ffc85820 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 28 Apr 2022 11:30:30 +0300 Subject: [PATCH 1/2] animation remove prefixes --- .../modules/microweber/api/liveedit/drag.js | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/userfiles/modules/microweber/api/liveedit/drag.js b/userfiles/modules/microweber/api/liveedit/drag.js index 58930a4dfc3..5164a79cf00 100644 --- a/userfiles/modules/microweber/api/liveedit/drag.js +++ b/userfiles/modules/microweber/api/liveedit/drag.js @@ -941,8 +941,14 @@ mw.drag = { }); }, - grammarlyFix:function(html){ - var data = mw.tools.parseHtml(html).body; + animationsClearFix:function(body){ + mw.$('[class*="animate__"]').each(function () { + mw.tools.classNamespaceDelete(this, 'animate__'); + }); + return body; + }, + grammarlyFix:function(data){ + mw.$("grammarly-btn", data).remove(); mw.$("grammarly-card", data).remove(); mw.$("g.gr_", data).each(function(){ @@ -955,13 +961,16 @@ mw.drag = { mw.$("grammarly-inline-cards", data).remove(); mw.$("grammarly-popups", data).remove(); mw.$("grammarly-extension", data).remove(); - return data.innerHTML; + return data; }, saving: false, coreSave: function(data) { if (!data) return false; $.each(data, function(){ - this.html = mw.drag.grammarlyFix(this.html) + var body = mw.tools.parseHtml(this.html).body; + mw.drag.grammarlyFix(body); + mw.drag.animationsClearFix(body); + this.html = body.innerHTML; }); mw.drag.saving = true; @@ -1134,12 +1143,12 @@ mw.drag = { }) var options = { - group: 'page-animations', + group: 'template', key: 'animations-global', value: JSON.stringify(animations) }; mw.options.saveOption(options, function(){ - mw.clear_cache() + }); @@ -1168,7 +1177,7 @@ mw.drag = { doc.write(xhr.responseText); doc.close(); var save_content_error_iframe_reloads = 0; - var doc = document.getElementById('save_content_error_iframe').contentWindow.document; + doc = document.getElementById('save_content_error_iframe').contentWindow.document; mw.$("#save_content_error_iframe").load(function(){ // cloudflare captcha From 5de5b361191af03f7178dfe8bc19bfbaf70890e4 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 28 Apr 2022 12:26:56 +0300 Subject: [PATCH 2/2] animations labels lang --- .../editor_tools/rte_css_editor/index.php | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/userfiles/modules/microweber/toolbar/editor_tools/rte_css_editor/index.php b/userfiles/modules/microweber/toolbar/editor_tools/rte_css_editor/index.php index 5bb5b46eecb..c2397010dce 100644 --- a/userfiles/modules/microweber/toolbar/editor_tools/rte_css_editor/index.php +++ b/userfiles/modules/microweber/toolbar/editor_tools/rte_css_editor/index.php @@ -353,8 +353,8 @@ interface: 'shadow', } }); - $(this).after(select) - $('input',this).on('input', function(){ + $(this).after(select); + $('input', this).on('input', function(){ var $el = $(this); var parent = $el.parent() var val = $el.val().trim(); @@ -991,7 +991,7 @@ interface: 'shadow', }) -
+
@@ -1675,7 +1675,7 @@ class="mw-field mw-field-flat unit" content: [ { tag: 'label', - props: { innerHTML: 'Motion'}, + props: { innerHTML: mw.lang('Motion')}, }, { @@ -1710,7 +1710,7 @@ class="mw-field mw-field-flat unit" content: [ { tag: 'label', - props: { innerHTML: 'Speed'}, + props: { innerHTML: mw.lang('Speed')}, }, { props: { @@ -1721,7 +1721,7 @@ className: 'mw-field mw-field-flat unit', }, content: { tag: 'input', - props: { type: 'text', placeholder: 'Speed in seconds ' }, + props: { type: 'text', placeholder: mw.lang('Speed in seconds') }, } } @@ -1756,7 +1756,7 @@ className: 'mw-field mw-field-flat unit', content: [ { tag: 'label', - props: { innerHTML: 'Trigger'}, + props: { innerHTML: mw.lang('Trigger')}, }, { props: { @@ -1767,9 +1767,9 @@ className: 'mw-field mw-field-flat', tag: 'select', props: { }, content: [ - { tag: 'option', props: { value: 'onAppear', innerHTML: 'When Appear'}}, - { tag: 'option', props: { value: 'onHover', innerHTML: 'When mouse is over'}}, - { tag: 'option', props: { value: 'onClick', innerHTML: 'When element is clicked'}}, + { tag: 'option', props: { value: 'onAppear', innerHTML: mw.lang('When element appears on screen')}}, + { tag: 'option', props: { value: 'onHover', innerHTML: mw.lang('When mouse is over')}}, + { tag: 'option', props: { value: 'onClick', innerHTML: mw.lang('When element is clicked')}}, ] }, ] @@ -1779,7 +1779,7 @@ className: 'mw-field mw-field-flat', { tag: 'small', props: { - innerHTML: 'Available when you are not "edit mode"', + innerHTML: mw.lang('Available when you are not editing'), className: 'form-text text-muted' } }