From 725ff47a81e4afd8c3229e53adf7886ac7f820fe Mon Sep 17 00:00:00 2001 From: Emfluence Date: Tue, 12 Sep 2023 17:27:45 +0530 Subject: [PATCH 01/20] Updated version number --- emfluence.php | 2 +- readme.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/emfluence.php b/emfluence.php index 8f4c5f7..5470245 100755 --- a/emfluence.php +++ b/emfluence.php @@ -4,7 +4,7 @@ Plugin URI: https://github.com/emfluencekc/wp-emfluence Description: Easily add forms to your website for contacts to add or update their details in your emfluence Marketing Platform account. Author: emfluence Digital Marketing -Version: 2.13 +Version: 2.13.1 Author URI: https://www.emfluence.com Text Domain: emfl_form */ diff --git a/readme.txt b/readme.txt index beb7694..a6fe82a 100644 --- a/readme.txt +++ b/readme.txt @@ -2,7 +2,7 @@ Tags: email, email marketing, emailmarketing, emfluence, api, marketing automation, widget, email widget, email signup, mailing list, newsletter, form, automation Requires at least: 4.0 Tested up to: 6.0 -Stable tag: 2.13 +Stable tag: 2.13.1 Requires PHP: 5.6 Contributors: emfluencekc, mightyturtle License: GPLv2 or later @@ -57,7 +57,7 @@ choose date as your type for your field on your widget too. == Changelog == -= 2.13 = += 2.13.1 = * PHP error fixes = 2.12 = From b20c398bf268901758ac6b0829b5cd1dcab5f33f Mon Sep 17 00:00:00 2001 From: Emfluence Date: Tue, 12 Sep 2023 17:34:09 +0530 Subject: [PATCH 02/20] CSS modified --- css/widget-frontend.css | 3 ++- css/widget-frontend.css.map | 0 css/widget-frontend.scss | 4 +++ css/widget-settings.css | 16 ++++++++++++ css/widget-settings.css.map | 0 css/widget-settings.scss | 52 +++++++++++++++++++++++++++++++++++++ 6 files changed, 74 insertions(+), 1 deletion(-) mode change 100644 => 100755 css/widget-frontend.css mode change 100644 => 100755 css/widget-frontend.css.map mode change 100644 => 100755 css/widget-frontend.scss mode change 100644 => 100755 css/widget-settings.css mode change 100644 => 100755 css/widget-settings.css.map mode change 100644 => 100755 css/widget-settings.scss diff --git a/css/widget-frontend.css b/css/widget-frontend.css old mode 100644 new mode 100755 index 9f3fc78..ca8c699 --- a/css/widget-frontend.css +++ b/css/widget-frontend.css @@ -1,2 +1,3 @@ -.emfluence_email_signup .message.error{color:red}.emfluence_email_signup .field.row,.emfluence_email_signup .actions.row{padding:0.5em 0} +/*.emfluence_email_signup .message.error{color:red}.emfluence_email_signup .field.row,.emfluence_email_signup .actions.row{padding:0.5em 0}*/ +.emfluence_email_signup {.message.error {color: red;}.field.row, .actions.row {padding: 0.5em 0;}.field.row label {display: block;}} /*# sourceMappingURL=widget-frontend.css.map */ diff --git a/css/widget-frontend.css.map b/css/widget-frontend.css.map old mode 100644 new mode 100755 diff --git a/css/widget-frontend.scss b/css/widget-frontend.scss old mode 100644 new mode 100755 index 59dfe17..6d92229 --- a/css/widget-frontend.scss +++ b/css/widget-frontend.scss @@ -6,4 +6,8 @@ .actions.row { padding: 0.5em 0; } + + .field.row label { + display: block; + } } \ No newline at end of file diff --git a/css/widget-settings.css b/css/widget-settings.css old mode 100644 new mode 100755 index 8f358f9..33b45b6 --- a/css/widget-settings.css +++ b/css/widget-settings.css @@ -485,8 +485,24 @@ .wp-emfluence { padding: 10px 0; } .wp-emfluence .contact-field { border-top: solid 1px #aaa; padding: 5px 0 10px; } .wp-emfluence p.heading label { padding-right: 10px; display: inline-block; } +.wp-emfluence p.heading label:first-of-type { font-weight: bold !important; } +.wp-emfluence p.heading label input.order { display: inline !important; width: 40px !important; } .wp-emfluence label.heading { font-weight: 600; font-size: 1rem; } .wp-emfluence input.hidden-value { display: none; vertical-align: middle; } .wp-emfluence .validation-error { color: red; display: block; } +.widget-content p, .widget-content .wp-emfluence p { font-size: 12px; } +.widget-content .wp-emfluence div.filter { display: block; width: 100%; } +.widget-content .wp-emfluence div.selected { display: block; width: 100%; padding: 0 10px; } +.widget-content .wp-emfluence div.selected div { display: block; } + +.wp-emfluence .basic-fields-adder p select { display: inline-block !important; width: 60% !important; } +.wp-emfluence .basic-fields-adder p button { display: inline-block !important; margin-left: 6px; } + +.wp-emfluence .custom-variable-adder p input { width: 60% !important; display: inline-block !important; } +.wp-emfluence .custom-variable-adder p button { display: inline-block !important; margin-left: 5px; } + +/* .wp-emfluence .contact-field label { display: inline !important; } +.wp-emfluence .contact-field label input.order { width: 20px; } */ + /*# sourceMappingURL=widget-settings.css.map */ diff --git a/css/widget-settings.css.map b/css/widget-settings.css.map old mode 100644 new mode 100755 diff --git a/css/widget-settings.scss b/css/widget-settings.scss old mode 100644 new mode 100755 index 78709e8..d16e3a4 --- a/css/widget-settings.scss +++ b/css/widget-settings.scss @@ -10,6 +10,13 @@ padding-right: 10px; display: inline-block; } + p.heading label:first-of-type { + font-weight: bold !important; + } + p.heading label input.order { + display: inline !important; + width: 40px !important; + } label.heading { font-weight: 600; font-size: 1rem; @@ -22,4 +29,49 @@ color: red; display: block; } + + p { + font-size: 12px; + } + + div.filter { + display: block; width: 100%; + } + + div.selected { + display: block; + width: 100%; + padding: 0 10px; + + div { + display: block; + } + } + + .basic-fields-adder { + p { + select { + display: inline-block !important; width: 60% !important; + } + + button { + display: inline-block !important; margin-left: 6px; + } + } + } + + .custom-variable-adder p input { + width: 60% !important; + display: inline-block !important; + } + .custom-variable-adder p button { + display: inline-block !important; + margin-left: 5px; + } +} + +.widget-content { + p { + font-size: 12px; + } } From 5a9c53fd4b946f4cc3e251e6a541d5ed0c6e34c8 Mon Sep 17 00:00:00 2001 From: Emfluence Date: Tue, 12 Sep 2023 17:59:14 +0530 Subject: [PATCH 03/20] Updated widgest settings script. Minification not done yet. --- js/widget-settings.js | 65 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 63 insertions(+), 2 deletions(-) diff --git a/js/widget-settings.js b/js/widget-settings.js index 19d25c6..3b012dc 100755 --- a/js/widget-settings.js +++ b/js/widget-settings.js @@ -1,5 +1,6 @@ // Multiple instances of the widget may exist on the widget settings page. // This is completely functional programming. + emfluenceEmailerWidget = { init: function() { @@ -9,6 +10,7 @@ emfluenceEmailerWidget = { collapsible: true, active: false }); + jQuery('.wp-emfluence .type-selector').each(function(index, el) { emfluenceEmailerWidget.fields.typeSelected(jQuery(el).parents('.type-section')); }); @@ -55,9 +57,18 @@ emfluenceEmailerWidget = { add: function(element){ $widget = jQuery(element).parents('.widget'); $input = this.getInput($widget); + + //Subrata + $groupIdsContainer = this.getGroupIdsContainer($widget); + //Subrata // Validate the value var values = this.processValue($input.val()); + + //Subrata + //console.log(values.id); + //Subrata + if( !values ){ return; } @@ -71,14 +82,51 @@ emfluenceEmailerWidget = { } $checkboxesContainer.append( this.createCheckbox($widget, values) ); + + //Subrata + if($groupIdsContainer.val().length === 0) { + $groupIdsContainer.val( values.id ); + } else { + $groupIdsContainer.val( $groupIdsContainer.val() + ',' + values.id ); + } + //Subrata + $input.val(null); } + + //Subrata + ,removeGroup: function(element) { + $widget = jQuery(element).parents('.widget'); + $groupIdsContainer = this.getGroupIdsContainer($widget); + $currentGroupId = jQuery(element).attr("value"); + $groupIdsArray = $groupIdsContainer.val().split(','); + + if(jQuery(element).is(":checked")) { + $groupIdsArray.push($currentGroupId); + } else { + $groupIdsArray = jQuery.grep( $groupIdsArray, function(value) { + return value != $currentGroupId; + }); + } + + $commaString = $groupIdsArray.join(","); + $groupIdsContainer.val($commaString); + } + //Subrata + ,getInput: function($widget){ return $widget.find('.groups input[list]'); } ,getCheckboxesContainer: function($widget){ return $widget.find('.groups .selected'); } + + //Subrata + ,getGroupIdsContainer: function($widget) { + return $widget.find('.begroups'); + } + //Subrata + ,processValue: function(value){ // Seperate the name and id // It should be in the format of name [##] @@ -92,8 +140,21 @@ emfluenceEmailerWidget = { } } ,createCheckbox: function($widget, values){ - var widgetId = $widget.attr('id').slice(-1); - var id = 'groups-' + widgetId + '-' + values.id; + //Subrata + var widgetId = ''; + var id = ''; + + try{ + widgetId = $widget.attr('id').slice(-1); + id = 'groups-' + widgetId + '-' + values.id; + } + catch { + instance_number = jQuery("#emfluence_email_signup_instance").val(); + widgetId = 'widget-7_emfluence_email_signup-' + instance_number.slice(-1); + id = 'groups-' + instance_number + '-' + values.id; + } + //Subrata + var html = '