diff --git a/assets/css/src/components/_formEditorLegacy.scss b/assets/css/src/components/_formEditorLegacy.scss deleted file mode 100644 index f7b42fee09..0000000000 --- a/assets/css/src/components/_formEditorLegacy.scss +++ /dev/null @@ -1,647 +0,0 @@ -@import '../../../../node_modules/codemirror/lib/codemirror'; -@import '../../../../node_modules/codemirror/theme/neo'; - -$icons: '../../img/form_editor_icons.png'; -$handle_icon: '../../img/handle.png'; - -#mailpoet_form_name { - font-size: 23px; -} - -#mailpoet_form_history { - display: none; -} - -#mailpoet_form_editor { - background-color: #fff; - border: 1px solid #ccc; - box-shadow: 0 0 5px rgba(0, 0, 0, .2), inset 0 0 20px rgba(0, 0, 0, .1); - padding: 20px; - position: relative; - width: 300px; -} - -#mailpoet_form_editor:before, -#mailpoet_form_editor:after { - background: transparent; - bottom: 12px; - box-shadow: 0 6px 12px rgba(0, 0, 0, .3); - content: ' '; - height: 10px; - left: 12px; - position: absolute; - transform: skew(-5deg) rotate(-5deg); - width: 40%; - z-index: -1; -} - -#mailpoet_form_editor:after { - left: auto; - right: 12px; - transform: skew(5deg) rotate(5deg); -} - -/* Warnings in blocks */ -.mailpoet_warning { - color: #900; - font-weight: bold; -} - -.block_placeholder { - border: 0 none; - font-weight: bold; - height: 0; - line-height: 30px; - margin: 0 auto; - overflow: hidden; - text-align: center; - text-indent: -9999px; - width: 298px; - z-index: 9500; -} - -.block_placeholder.active { - /* border:1px dashed #dfdfdf; */ - /* background-color:#f5f5f5; */ - background-color: #4cb7e1; - display: block; - height: 30px; - overflow: auto; - text-indent: 0; -} - -.block_placeholder.hover { - background-color: #0074a2; - border-color: #0074a2; - color: #fff; -} - -/* Widget: checkbox, radio */ -.mailpoet_radio, -.mailpoet_checkbox { - margin: -2px 5px 0 0; -} - -/* MailPoet Form wrapper */ -#mailpoet_form_wrapper { - margin: 20px 0 0; - position: relative; -} - -/* MailPoet Form container */ -#mailpoet_form_container { - margin: 0; - width: 340px; -} - -#mailpoet_form_editor.loading, -#mailpoet_form_toolbar.loading { - background: url('loading.gif') no-repeat center center #fcfcfc; -} - -#mailpoet_form_toolbar.loading { - border: 1px solid #dfdfdf; -} - -#mailpoet_form_toolbar.loading #mailpoet_toolbar_fields { - visibility: hidden; - z-index: 1; -} - -/* Tabs : content/images/styles/themes */ -#wysija-add-field { - float: none; -} - -#mailpoet_form_toolbar { - position: absolute; - width: 400px; - z-index: 999; -} - -#mailpoet_form_toolbar .mailpoet_form_toolbar_tabs { - border-bottom: 1px solid #dfdfdf; - line-height: 0; -} - -#mailpoet_form_toolbar .add_custom_field { - padding: 15px 0 5px; - text-align: center; -} - -#mailpoet_form_toolbar .mailpoet_form_toolbar_tabs li, -#mailpoet_form_toolbar .mailpoet_form_toolbar_tabs a { - display: inline-block; - *display: inline; - *float: left; - height: 30px; - line-height: 30px; - margin: 0; - outline: 0 none; - padding: 0; -} - -#mailpoet_form_toolbar .mailpoet_form_toolbar_tabs li { - margin: 0 0 1px; -} - -#mailpoet_form_toolbar .mailpoet_form_toolbar_tabs a { - background: linear-gradient(center top, #f9f9f9, #f5f5f5); - background-color: #f5f5f5; - border: 1px solid #dfdfdf; - border-radius: 3px 3px 0 0; - box-shadow: 0 1px 0 #fff inset; - color: #a6a6a6; - font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; - outline: 0 none; - padding: 0 7px; - text-decoration: none; -} - -#mailpoet_form_toolbar .mailpoet_form_toolbar_tabs a:hover { - background-color: #eee; -} - -#mailpoet_form_toolbar .mailpoet_form_toolbar_tabs a.selected { - background: #fcfcfc; - border-bottom: 0 none; - color: #000; - filter: none; - padding-bottom: 1px; -} - -#mailpoet_form_toolbar .mailpoet_form_toolbar_tabs .last a, -.wysija_params { - display: none !important; -} - -#mailpoet_form_toolbar .mailpoet_form_toolbar_tabs, -#mailpoet_form_toolbar #mailpoet_toolbar_fields { - margin: 0; - position: relative; - z-index: 9998; -} - -/* edit form name */ -#mailpoet_form_name_input { - vertical-align: bottom; -} - -/* wysija widgets */ -.mailpoet_form_widget { - height: 25px; - line-height: 25px; - width: 298px; - z-index: 9999 !important; -} - -.mailpoet_toolbar_section { - background: none repeat scroll 0 0 #fff; - border: 1px solid #e5e5e5; - box-shadow: 0 1px 1px rgba(0, 0, 0, .04); - cursor: pointer; - margin-bottom: 0; - max-height: 2000px; - min-width: 255px; - overflow: hidden; - position: relative; - transition: max-height .5s ease-in-out; -} - -.mailpoet_toolbar_section > div { - height: 100%; - min-width: 255px; - overflow: auto; - padding: 10px 20px 20px; -} - -.mailpoet_toolbar_section h3 { - margin: 10px; - position: relative; -} - -.mailpoet_toolbar_section.closed { - max-height: 38px; -} - -.mailpoet_toolbar_section .mailpoet_toggle { - height: 38px; - position: absolute; - right: 0; - top: 0; - width: 27px; -} - -.mailpoet_toolbar_section .mailpoet_toggle:focus { - box-shadow: none !important; - outline: 0 none !important; -} - -.mailpoet_toolbar_section .mailpoet_toggle:before { - content: '\f142'; - display: inline-block; - font: 400 20px / 1 dashicons; - padding: 8px 10px; - position: relative; - right: 12px; - speak: none; - text-decoration: none !important; - top: 0; -} - -.mailpoet_toolbar_section.closed .mailpoet_toggle:before { - content: '\f140'; -} - -#mailpoet_form_styles { - margin: 10px; - max-width: 318px; - min-height: 300px; - resize: vertical; - width: 318px; -} - -#mailpoet_form_toolbar a.mailpoet_form_field, -.mailpoet_form_widget { - background: linear-gradient(center 0, #f9f9f9, #ececec); - background-color: #f5f5f5; - border: 1px solid #dfdfdf; - border-radius: 3px; - box-shadow: 0 1px 0 #fff inset; - color: #222; - cursor: move; - display: block; - font-size: 12px; - font-weight: bold; - height: 25px; - line-height: 25px; - padding: 0 7px; - text-shadow: 0 1px 0 #fff; -} - -#mailpoet_form_toolbar a.mailpoet_form_field.disabled { - color: #ccc; - cursor: pointer; - pointer-events: none; -} - -.mailpoet_form_field_edit { - bottom: 13px; - position: absolute; - right: 27px; -} - -.mailpoet_form_field_delete { - bottom: 13px; - position: absolute; - right: 7px; -} - -/* toolbar: fields */ -#mailpoet_toolbar_fields li { - padding: 0 0 10px; - position: relative; -} - -#mailpoet_toolbar_fields li.notice { - background: none !important; - border: 0 none !important; - font-size: 11px; - font-style: italic; - margin: 0 !important; -} - -/* blocks */ -.mailpoet_form_block { - background-color: #fff; - border: 0 none; - display: inline-table; - display: block; - height: 1%; - margin: 0; - padding: 10px 18px; - position: relative; - z-index: 98; -} - -.mailpoet_form_block.highlighted { - border: 1px solid #5897fb; - padding: 9px 17px; -} - -.mailpoet_form_block img { - max-width: 100%; -} - -/* Widget styles */ -.mailpoet_form_block p { - margin: 5px 0; - word-wrap: break-word; -} - -.mailpoet_form_block.dragging { - pointer-events: none; - z-index: 99000; -} - -.mailpoet_form_block:after { - clear: both; - content: '.'; - display: block; - height: 0; - visibility: hidden; -} - -.mailpoet_form_block.hover { - border: 1px dashed #bbb; - margin: 0; - padding: 9px 17px; -} - -.mailpoet_form_block.static { - background-color: #999; -} - -/* controls */ -.mailpoet_form_block .wysija_controls { - background: linear-gradient(center 0, #eee, #bbb); - background-color: #dfdfdf; - border: 1px solid #ccc; - border-radius: 2px; - height: 20px; - left: -1px; - margin: 0; - padding: 0; - position: absolute; - right: 0; - top: -22px; - width: 298px; -} - -.mailpoet_form_block .wysija_controls li { - float: left; - height: 20px; - width: 20px; -} - -.mailpoet_form_block .wysija_controls a { - color: #000; - cursor: pointer; - float: left; - font-size: 120%; - font-weight: bold; - height: 20px; - line-height: 20px; - text-align: center; - width: 20px; -} - -.mailpoet_form_block .wysija_controls a.remove { - margin: 0 0 0 1px; -} - -.mailpoet_form_block .handle_container, -.mailpoet_form_block .handle_container a { - float: none; - width: 40px !important; -} - -.mailpoet_form_block .handle_container { - left: 140px; - position: absolute; - top: 0; -} - -/* controls & icons */ -.wysija_controls a span, -.wysija_gallery .wysija_tools a span, -.wysija_image .wysija_tools a span, -.wysija_text .wysija_tools a span, -#mailpoet_toolbar_fields a span { - display: block; - height: 20px; - width: 20px; -} - -/* toolbar: full width button */ -/* color picker in control bars */ -.wysija_controls span input { - color: transparent; - margin: 2px 0 0; - padding: 0; -} - -/* left alignment button */ -.alignment-left span { - background: url($icons) no-repeat 0 0; -} - -.alignment-left.active span, -.alignment-left:hover span { - background: url($icons) no-repeat 0 -20px; -} - -/* center alignment button */ -.alignment-center span { - background: url($icons) no-repeat -20px 0; -} - -.alignment-center.active span, -.alignment-center:hover span { - background: url($icons) no-repeat -20px -20px; -} - -/* right alignment button */ -.alignment-right span { - background: url($icons) no-repeat -40px 0; -} - -.alignment-right.active span, -.alignment-right:hover span { - background: url($icons) no-repeat -40px -20px; -} - -/* linking */ -.add-link span { - background: url($icons) no-repeat -60px 0; -} - -.add-link.active span, -.add-link:hover span { - background: url($icons) no-repeat -60px -20px; -} - -.remove-link span { - background: url($icons) no-repeat -80px 0; -} - -.remove-link.active span, -.remove-link:hover span { - background: url($icons) no-repeat -80px -20px; -} - -/* block controls */ -.remove span, -.delete span { - background: url($icons) no-repeat -100px 0; -} - -.remove.active span, -.remove:hover span, -.delete.active span, -.delete:hover span { - background: url($icons) no-repeat -100px -20px; -} - -.handle span { - background: url($handle_icon) no-repeat; - cursor: move; - width: 40px !important; -} - -.duplicate span { - background: url($icons) no-repeat -140px 0; -} - -.duplicate.active span, -.duplicate:hover span { - background: url($icons) no-repeat -140px -20px; -} - -.settings span { - background: url($icons) no-repeat -160px 0; -} - -.settings.active span, -.settings:hover span { - background: url($icons) no-repeat -160px -20px; -} - -.icon-plus span { - background: url($icons) no-repeat -200px 0; -} - -.icon-plus.active span, -.icon-plus:hover span { - background: url($icons) no-repeat -200px -20px; -} - -.icon-minus span { - background: url($icons) no-repeat -220px 0; -} - -.icon-minus.active span, -.icon-minus:hover span { - background: url($icons) no-repeat -220px -20px; -} - -/* wysija options */ -.wysija_options { - display: none; -} - -/* wysija block settings */ -.wysija_settings { - position: absolute; - z-index: 1000; -} - -.wysija_settings a { - background: linear-gradient(center 0, #f9f9f9, #ececec); - background-color: #f5f5f5; - border: 1px solid #dfdfdf; - border-radius: 3px; - box-shadow: 0 1px 0 #fff inset; - color: #222; - cursor: pointer; - display: block; - font-size: 12px; - font-weight: normal; - padding: 5px 5px 3px 27px; - text-decoration: none; - text-shadow: 0 1px 0 #fff; -} - -.wysija_settings a span { - height: 20px; - left: 5px; - position: absolute; - top: 3px; - width: 20px; -} - -/* labels */ -.mailpoet_form_block label { - display: block; - margin: 0 5px 0 0; -} - -/* form settings: success message */ -#mailpoet_on_success textarea, -#mailpoet_on_success select { - width: 100%; -} - -#mailpoet_on_success textarea { - height: 50px; - min-height: 50px; - resize: vertical; -} - -/* make sure textareas within the form editor are not resizeable */ -.mailpoet_form_block textarea { - resize: none; -} - -/* remove click events from inputs within form editor */ -.mailpoet_form_block input, -.mailpoet_form_block textarea { - pointer-events: none; -} - -/* form export */ -#mailpoet_form_export textarea { - display: none; - font-size: 85%; - height: 150px; - min-height: 150px; - resize: vertical; - width: 340px; -} - -/** Styling for WP 3.8 and higher */ -.mailpoet_form_field_edit, -.mailpoet_form_field_delete { - text-decoration: none; -} - -.mailpoet_form_field_edit:hover .dashicons-admin-generic:before, -.mailpoet_form_field_delete:hover .dashicons-dismiss:before, -.settings:hover .dashicons-admin-generic:before { - color: #2ea2cc; -} - -.mailpoet_form_field_edit span, -.mailpoet_form_field_delete span { - background: none !important; - color: #999; -} - -.mailpoet_form_field_delete span:before { - font-size: 21px; -} - -/* Code Mirror */ -.CodeMirror { - border: 1px solid #eee; -} - -/* Settings */ -#mailpoet_form_segments.parsley-error + span .select2-selection { - border: 1px solid #b94a48; -} - -.mailpoet_form_field_settings_text { - min-height: 100px; - width: 100%; -} diff --git a/assets/css/src/components/formEditor/components/_sidebar.scss b/assets/css/src/components/formEditor/components/_sidebar.scss index 75e3960c85..7d9f317b38 100644 --- a/assets/css/src/components/formEditor/components/_sidebar.scss +++ b/assets/css/src/components/formEditor/components/_sidebar.scss @@ -85,9 +85,3 @@ $gutenberg-control-border-color-focus: #007cba; margin: 8px 0; } } - -// Styles for old editor link -.mailpoet_old_form_editor_link, -#mailpoet_form_edit_old_editor_fallback_link { - padding: 16px; -} diff --git a/assets/css/src/mailpoet-plugin.scss b/assets/css/src/mailpoet-plugin.scss index 26bfdc5a20..469cde0adb 100644 --- a/assets/css/src/mailpoet-plugin.scss +++ b/assets/css/src/mailpoet-plugin.scss @@ -9,7 +9,6 @@ @import 'components/common'; @import 'components/modal'; @import 'components/notice'; -@import 'components/formEditorLegacy'; @import 'components/listing'; @import 'components/listing/newsletters'; @import 'components/box'; diff --git a/assets/js/lib/prototype.min.js b/assets/js/lib/prototype.min.js deleted file mode 100644 index 35e4dfc841..0000000000 --- a/assets/js/lib/prototype.min.js +++ /dev/null @@ -1,12 +0,0 @@ -var Prototype={Version:"1.7.3",Browser:(function(){var b=navigator.userAgent;var a=Object.prototype.toString.call(window.opera)=="[object Opera]";return{IE:!!window.attachEvent&&!a,Opera:a,WebKit:b.indexOf("AppleWebKit/")>-1,Gecko:b.indexOf("Gecko")>-1&&b.indexOf("KHTML")===-1,MobileSafari:/Apple.*Mobile/.test(b)}})(),BrowserFeatures:{XPath:!!document.evaluate,SelectorsAPI:!!document.querySelector,ElementExtensions:(function(){var a=window.Element||window.HTMLElement;return !!(a&&a.prototype)})(),SpecificElementExtensions:(function(){if(typeof window.HTMLDivElement!=="undefined"){return true}var c=document.createElement("div"),b=document.createElement("form"),a=false;if(c.__proto__&&(c.__proto__!==b.__proto__)){a=true}c=b=null;return a})()},ScriptFragment:" -<% endblock %> - -<% block templates %> - -<%= partial('form_template_fields', 'form/templatesLegacy/toolbar/fields.hbs') %> -<%= partial('form_template_exports', 'form/templatesLegacy/toolbar/exports.hbs') %> - - -<%= partial('form_template_block', 'form/templatesLegacy/blocks/container.hbs') %> -<%= partial('form_template_divider', 'form/templatesLegacy/blocks/divider.hbs') %> -<%= partial('form_template_text', 'form/templatesLegacy/blocks/text.hbs') %> -<%= partial('form_template_submit', 'form/templatesLegacy/blocks/submit.hbs') %> -<%= partial('form_template_segment', 'form/templatesLegacy/blocks/segment.hbs') %> -<%= partial('form_template_radio', 'form/templatesLegacy/blocks/radio.hbs') %> -<%= partial('form_template_select', 'form/templatesLegacy/blocks/select.hbs') %> -<%= partial('form_template_checkbox', 'form/templatesLegacy/blocks/checkbox.hbs') %> -<%= partial('form_template_textarea', 'form/templatesLegacy/blocks/textarea.hbs') %> -<%= partial('form_template_html', 'form/templatesLegacy/blocks/html.hbs') %> - - -<% include 'form/custom_fields_legacy.html' %> - - -<%= partial('mailpoet_form_preview_template', -'form/templatesLegacy/preview.hbs' -) %> -<% endblock %> - -<% block translations %> -<%= localize({ -'editFieldSettings': __('Edit field settings'), -}) %> -<% endblock %> diff --git a/views/form/templatesLegacy/blocks/checkbox.hbs b/views/form/templatesLegacy/blocks/checkbox.hbs deleted file mode 100644 index bd850c52be..0000000000 --- a/views/form/templatesLegacy/blocks/checkbox.hbs +++ /dev/null @@ -1,10 +0,0 @@ -{{#if params.label}} -
- -
-{{/if}} -{{#each params.values}} -- -
-{{/each}} \ No newline at end of file diff --git a/views/form/templatesLegacy/blocks/container.hbs b/views/form/templatesLegacy/blocks/container.hbs deleted file mode 100644 index 8b2bbf5c1a..0000000000 --- a/views/form/templatesLegacy/blocks/container.hbs +++ /dev/null @@ -1,20 +0,0 @@ -- -
-{{/if}} -{{#each params.values}} -- -
-{{/each}} \ No newline at end of file diff --git a/views/form/templatesLegacy/blocks/segment.hbs b/views/form/templatesLegacy/blocks/segment.hbs deleted file mode 100644 index 064b5f9beb..0000000000 --- a/views/form/templatesLegacy/blocks/segment.hbs +++ /dev/null @@ -1,7 +0,0 @@ -{{#if params.label}}{{ params.label }}
{{/if}} -{{#unless params.values}}<%= __('Please select at least one list') %>
{{/unless}} -{{#each params.values}} -- {{ name }} -
-{{/each}} \ No newline at end of file diff --git a/views/form/templatesLegacy/blocks/select.hbs b/views/form/templatesLegacy/blocks/select.hbs deleted file mode 100644 index 248b4be8da..0000000000 --- a/views/form/templatesLegacy/blocks/select.hbs +++ /dev/null @@ -1,17 +0,0 @@ -{{#unless params.label_within}} - {{#if params.label}} -- -
- {{/if}} -{{/unless}} - \ No newline at end of file diff --git a/views/form/templatesLegacy/blocks/submit.hbs b/views/form/templatesLegacy/blocks/submit.hbs deleted file mode 100644 index 177137fc98..0000000000 --- a/views/form/templatesLegacy/blocks/submit.hbs +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/views/form/templatesLegacy/blocks/text.hbs b/views/form/templatesLegacy/blocks/text.hbs deleted file mode 100644 index a3e94b9fd1..0000000000 --- a/views/form/templatesLegacy/blocks/text.hbs +++ /dev/null @@ -1,2 +0,0 @@ -{{#unless params.label_within}}{{/unless}} - \ No newline at end of file diff --git a/views/form/templatesLegacy/blocks/textarea.hbs b/views/form/templatesLegacy/blocks/textarea.hbs deleted file mode 100644 index 47046558b2..0000000000 --- a/views/form/templatesLegacy/blocks/textarea.hbs +++ /dev/null @@ -1,4 +0,0 @@ -- {{#unless params.label_within}}{{/unless}} - -
\ No newline at end of file diff --git a/views/form/templatesLegacy/preview.hbs b/views/form/templatesLegacy/preview.hbs deleted file mode 100644 index fc028cda71..0000000000 --- a/views/form/templatesLegacy/preview.hbs +++ /dev/null @@ -1,11 +0,0 @@ - -