Version Description
- js/custom-contact-forms.js - JQuery conflict issue fixed
- js/custom-contact-forms-admin.js - JQuery conflict issue fixed
- js/custom-contact-forms-admin-inc.js - JQuery conflict issue fixed
- js/custom-contact-forms-admin-ajax.js - JQuery conflict issue fixed
- custom-contact-forms-admin.php - JQuery conflict issue fixed
- custom-contact-forms-front.php - Unnecessary JQuery dependencies removed
Download this release
Release Info
| Developer | tlovett1 |
| Plugin | |
| Version | 4.0.9 |
| Comparing to | |
| See all releases | |
Code changes from version 4.0.8.1 to 4.0.9
- custom-contact-forms-admin.php +1 -1
- custom-contact-forms-front.php +1 -1
- custom-contact-forms.php +1 -1
- js/custom-contact-forms-admin-ajax.js +73 -73
- js/custom-contact-forms-admin-inc.js +16 -18
- js/custom-contact-forms-admin.js +21 -21
- js/custom-contact-forms.js +12 -19
- readme.txt +10 -2
custom-contact-forms-admin.php
CHANGED
|
@@ -189,7 +189,7 @@ if (!class_exists('CustomContactFormsAdmin')) {
|
|
| 189 |
$admin_options['show_install_popover'] = 0;
|
| 190 |
?>
|
| 191 |
<script type="text/javascript" language="javascript">
|
| 192 |
-
|
| 193 |
showCCFUsagePopover();
|
| 194 |
});
|
| 195 |
</script>
|
| 189 |
$admin_options['show_install_popover'] = 0;
|
| 190 |
?>
|
| 191 |
<script type="text/javascript" language="javascript">
|
| 192 |
+
jQuery(document).ready(function() {
|
| 193 |
showCCFUsagePopover();
|
| 194 |
});
|
| 195 |
</script>
|
custom-contact-forms-front.php
CHANGED
|
@@ -28,7 +28,7 @@ if (!class_exists('CustomContactFormsFront')) {
|
|
| 28 |
if ($admin_options['enable_jquery'] == 1) {
|
| 29 |
wp_enqueue_script('jquery');
|
| 30 |
wp_enqueue_script('jquery-tools', plugins_url() . '/custom-contact-forms/js/jquery.tools.min.js');
|
| 31 |
-
wp_enqueue_script('ccf-main', plugins_url() . '/custom-contact-forms/js/custom-contact-forms.js', array('jquery'
|
| 32 |
}
|
| 33 |
}
|
| 34 |
|
| 28 |
if ($admin_options['enable_jquery'] == 1) {
|
| 29 |
wp_enqueue_script('jquery');
|
| 30 |
wp_enqueue_script('jquery-tools', plugins_url() . '/custom-contact-forms/js/jquery.tools.min.js');
|
| 31 |
+
wp_enqueue_script('ccf-main', plugins_url() . '/custom-contact-forms/js/custom-contact-forms.js', array('jquery'), '1.0');
|
| 32 |
}
|
| 33 |
}
|
| 34 |
|
custom-contact-forms.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
Plugin Name: Custom Contact Forms
|
| 4 |
Plugin URI: http://taylorlovett.com/wordpress-plugins
|
| 5 |
Description: Guaranteed to be 1000X more customizable and intuitive than Fast Secure Contact Forms or Contact Form 7. Customize every aspect of your forms without any knowledge of CSS: borders, padding, sizes, colors. Ton's of great features. Required fields, form submissions saved to database, captchas, tooltip popovers, unlimited fields/forms/form styles, import/export, use a custom thank you page or built-in popover with a custom success message set for each form.
|
| 6 |
-
Version: 4.0.
|
| 7 |
Author: Taylor Lovett
|
| 8 |
Author URI: http://www.taylorlovett.com
|
| 9 |
*/
|
| 3 |
Plugin Name: Custom Contact Forms
|
| 4 |
Plugin URI: http://taylorlovett.com/wordpress-plugins
|
| 5 |
Description: Guaranteed to be 1000X more customizable and intuitive than Fast Secure Contact Forms or Contact Form 7. Customize every aspect of your forms without any knowledge of CSS: borders, padding, sizes, colors. Ton's of great features. Required fields, form submissions saved to database, captchas, tooltip popovers, unlimited fields/forms/form styles, import/export, use a custom thank you page or built-in popover with a custom success message set for each form.
|
| 6 |
+
Version: 4.0.9
|
| 7 |
Author: Taylor Lovett
|
| 8 |
Author URI: http://www.taylorlovett.com
|
| 9 |
*/
|
js/custom-contact-forms-admin-ajax.js
CHANGED
|
@@ -1,38 +1,38 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
var name =
|
| 5 |
-
var value =
|
| 6 |
var html = '<input class="delete-button" type="button" name="'+name+'" value="'+value+'" />';
|
| 7 |
-
|
| 8 |
});
|
| 9 |
-
|
| 10 |
-
var object_id =
|
| 11 |
-
var object_type =
|
| 12 |
-
var parent_row =
|
| 13 |
var modal = fx.initModal();
|
| 14 |
-
|
| 15 |
.attr("href", "#")
|
| 16 |
.addClass("modal-close-btn")
|
| 17 |
.html("×")
|
| 18 |
.click(function(event) { fx.boxOut(event); })
|
| 19 |
.appendTo(modal);
|
| 20 |
-
|
| 21 |
.html(delete_confirm + " " + object_type.replace("_", " ") + "?")
|
| 22 |
.appendTo(modal);
|
| 23 |
-
|
| 24 |
type: "button",
|
| 25 |
value: click_to_confirm
|
| 26 |
}).addClass("delete-button-confirm").appendTo(modal);
|
| 27 |
-
var loading_img =
|
| 28 |
.attr("src", ccf_plugin_dir + '/images/wpspin_light.gif')
|
| 29 |
.addClass("modal-wpspin")
|
| 30 |
.appendTo(modal)
|
| 31 |
.hide();
|
| 32 |
//var option_pattern = RegExp('<option value="' + object_id + '">.*?<\/option>', "i");
|
| 33 |
-
|
| 34 |
loading_img.show();
|
| 35 |
-
|
| 36 |
type: "POST",
|
| 37 |
url: ccf_file,
|
| 38 |
data: "ajax_action=delete&object_id=" + object_id + "&object_type=" + object_type,
|
|
@@ -41,18 +41,18 @@ $j(document).ready(function() {
|
|
| 41 |
parent_row.next().remove();
|
| 42 |
if (object_type == "style") {
|
| 43 |
/* delete occurences of this option within style dropdowns. */
|
| 44 |
-
var style_inputs =
|
| 45 |
style_inputs.each(function() {
|
| 46 |
-
this_option =
|
| 47 |
if (this_option.attr("selected") == "selected")
|
| 48 |
-
|
| 49 |
this_option.remove();
|
| 50 |
});
|
| 51 |
} else if (object_type == "field" || object_type == "field_option") {
|
| 52 |
/* delete occurences of this option within field and field option attach dropdowns. */
|
| 53 |
-
var fields_options_input =
|
| 54 |
fields_options_input.each(function () {
|
| 55 |
-
this_option =
|
| 56 |
this_option.remove();
|
| 57 |
});
|
| 58 |
}
|
|
@@ -63,132 +63,132 @@ $j(document).ready(function() {
|
|
| 63 |
});
|
| 64 |
});
|
| 65 |
});
|
| 66 |
-
|
| 67 |
-
var name =
|
| 68 |
-
var value =
|
| 69 |
var html = '<input class="edit-button" type="button" name="'+name+'" value="'+value+'" />';
|
| 70 |
-
|
| 71 |
});
|
| 72 |
-
|
| 73 |
save_box = fx.initSaveBox("Saving");
|
| 74 |
-
var object_id =
|
| 75 |
-
var object_type =
|
| 76 |
var values = "object_id=" + object_id + "&object_type=" + object_type + "&ajax_action=edit";
|
| 77 |
-
var object_rows =
|
| 78 |
if (object_type == "form" || object_type == "field")
|
| 79 |
object_rows = object_rows.add(object_rows.next());
|
| 80 |
object_rows.find("input, select, textarea").each(function() {
|
| 81 |
-
if (
|
| 82 |
-
key =
|
| 83 |
-
values = values + "&" + key + "=" +
|
| 84 |
}
|
| 85 |
});
|
| 86 |
-
|
| 87 |
type: "POST",
|
| 88 |
url: ccf_file,
|
| 89 |
data: values,
|
| 90 |
//success: function(data) {
|
| 91 |
-
|
| 92 |
//},
|
| 93 |
error: function() { alert(error); },
|
| 94 |
-
complete: function() {
|
| 95 |
});
|
| 96 |
});
|
| 97 |
|
| 98 |
-
|
| 99 |
-
var name =
|
| 100 |
-
var value =
|
| 101 |
var html = '<input class="attach-button" type="button" name="' + name + '" value="' + value + '" />';
|
| 102 |
-
|
| 103 |
});
|
| 104 |
-
|
| 105 |
-
var object_type =
|
| 106 |
-
var attach_object_field =
|
| 107 |
var object_id = attach_object_field.attr("class").split(' ')[0].replace(/[^0-9]*([0-9]*)/, "$1");
|
| 108 |
-
var dettach_object_field =
|
| 109 |
var attach_object_id = attach_object_field.attr("value");
|
| 110 |
var attach_object_slug = attach_object_field.find("option[value=" + attach_object_id + "]:eq(0)").first().text();
|
| 111 |
pattern = new RegExp('<option value="' + attach_object_id + '">', "i");
|
| 112 |
str = dettach_object_field.html();
|
| 113 |
if (!str.match(pattern)) {
|
| 114 |
var save_box = fx.initSaveBox(attaching);
|
| 115 |
-
|
| 116 |
type: "POST",
|
| 117 |
url: ccf_file,
|
| 118 |
data: "ajax_action=attach&attach_object_id=" + attach_object_id + "&attach_to=" + object_id + "&object_type=" + object_type,
|
| 119 |
success: function(data) {
|
| 120 |
//debug = fx.initDebugWindow();
|
| 121 |
-
|
| 122 |
-
new_option =
|
| 123 |
dettach_object_field.append(new_option);
|
| 124 |
dettach_object_field.find('option[value=-1]').remove();
|
| 125 |
|
| 126 |
},
|
| 127 |
error: function() { alert(error); },
|
| 128 |
-
complete: function() {
|
| 129 |
});
|
| 130 |
}
|
| 131 |
});
|
| 132 |
|
| 133 |
-
|
| 134 |
-
var name =
|
| 135 |
-
var value =
|
| 136 |
var html = '<input class="dettach-button" type="button" name="' + name + '" value="' + value + '" />';
|
| 137 |
-
|
| 138 |
});
|
| 139 |
-
|
| 140 |
-
var object_type =
|
| 141 |
-
var dettach_object_field =
|
| 142 |
var object_id = dettach_object_field.attr("class").split(' ')[0].replace(/[^0-9]*([0-9]*)/, "$1");
|
| 143 |
var dettach_object_id = dettach_object_field.attr("value");
|
| 144 |
if (dettach_object_id != "-1") {
|
| 145 |
var dettach_object_slug = dettach_object_field.find("option[value=" + dettach_object_id + "]:eq(0)").first().text();
|
| 146 |
var save_box = fx.initSaveBox(dettaching);
|
| 147 |
-
|
| 148 |
type: "POST",
|
| 149 |
url: ccf_file,
|
| 150 |
data: "ajax_action=dettach&dettach_object_id=" + dettach_object_id + "&dettach_from=" + object_id + "&object_type=" + object_type,
|
| 151 |
success: function(data) {
|
| 152 |
//debug = fx.initDebugWindow();
|
| 153 |
-
|
| 154 |
pattern = new RegExp('<option value="' + dettach_object_id + '">.*?<\/option>', "i");
|
| 155 |
new_options = dettach_object_field.html().replace(pattern, '');
|
| 156 |
if (!new_options.match(/<\/option>/)) new_options = '<option value="-1">Nothing Attached!</option>';
|
| 157 |
dettach_object_field.html(new_options);
|
| 158 |
},
|
| 159 |
error: function() { alert(error); },
|
| 160 |
-
complete: function() {
|
| 161 |
});
|
| 162 |
}
|
| 163 |
});
|
| 164 |
/*
|
| 165 |
-
|
| 166 |
-
var name =
|
| 167 |
-
var value =
|
| 168 |
var html = '<input class="create-button" type="button" name="'+name+'" value="'+value+'" />';
|
| 169 |
-
|
| 170 |
});
|
| 171 |
-
|
| 172 |
var icon = fx.getLoadingIcon().insertBefore(this);
|
| 173 |
-
var object_type =
|
| 174 |
if (object_type == "field_option") {
|
| 175 |
var values = "ajax_action=create_field_option";
|
| 176 |
var value_array = [];
|
| 177 |
-
var new_row =
|
| 178 |
-
|
| 179 |
-
if (
|
| 180 |
-
values = values + "&" +
|
| 181 |
-
key =
|
| 182 |
-
value_array[key] =
|
| 183 |
-
|
| 184 |
}
|
| 185 |
});
|
| 186 |
// Try to get first row of field options table to use its html as a framework for new row
|
| 187 |
}
|
| 188 |
-
//new_row =
|
| 189 |
|
| 190 |
// Create generic class of objects/functions to add delete/edit/insert capabilities on certain tables
|
| 191 |
-
|
| 192 |
type: "POST",
|
| 193 |
url: ccf_file,
|
| 194 |
data: values,
|
|
@@ -200,6 +200,6 @@ $j(document).ready(function() {
|
|
| 200 |
}
|
| 201 |
});
|
| 202 |
new_row.fadeIn("slow").removeClass("new-object");
|
| 203 |
-
|
| 204 |
});*/
|
| 205 |
});
|
| 1 |
+
jQuery.preloadImages(ccf_plugin_dir + "/images/wpspin_light.gif"); // preload loading image
|
| 2 |
+
jQuery(document).ready(function() {
|
| 3 |
+
jQuery(".delete-button").each(function(){
|
| 4 |
+
var name = jQuery(this).attr('name');
|
| 5 |
+
var value = jQuery(this).attr('value');
|
| 6 |
var html = '<input class="delete-button" type="button" name="'+name+'" value="'+value+'" />';
|
| 7 |
+
jQuery(this).after(html).remove(); // add new, then remove original input
|
| 8 |
});
|
| 9 |
+
jQuery(".delete-button").live("click", function(event) {
|
| 10 |
+
var object_id = jQuery(this).parents().find(".object-id").attr("value");
|
| 11 |
+
var object_type = jQuery(this).parents().find(".object-type").attr("value");
|
| 12 |
+
var parent_row = jQuery(this).parents("tr:eq(0)");
|
| 13 |
var modal = fx.initModal();
|
| 14 |
+
jQuery("<a>")
|
| 15 |
.attr("href", "#")
|
| 16 |
.addClass("modal-close-btn")
|
| 17 |
.html("×")
|
| 18 |
.click(function(event) { fx.boxOut(event); })
|
| 19 |
.appendTo(modal);
|
| 20 |
+
jQuery("<p>")
|
| 21 |
.html(delete_confirm + " " + object_type.replace("_", " ") + "?")
|
| 22 |
.appendTo(modal);
|
| 23 |
+
jQuery("<input>").attr({
|
| 24 |
type: "button",
|
| 25 |
value: click_to_confirm
|
| 26 |
}).addClass("delete-button-confirm").appendTo(modal);
|
| 27 |
+
var loading_img = jQuery("<img>")
|
| 28 |
.attr("src", ccf_plugin_dir + '/images/wpspin_light.gif')
|
| 29 |
.addClass("modal-wpspin")
|
| 30 |
.appendTo(modal)
|
| 31 |
.hide();
|
| 32 |
//var option_pattern = RegExp('<option value="' + object_id + '">.*?<\/option>', "i");
|
| 33 |
+
jQuery(".delete-button-confirm").click(function() {
|
| 34 |
loading_img.show();
|
| 35 |
+
jQuery.ajax({
|
| 36 |
type: "POST",
|
| 37 |
url: ccf_file,
|
| 38 |
data: "ajax_action=delete&object_id=" + object_id + "&object_type=" + object_type,
|
| 41 |
parent_row.next().remove();
|
| 42 |
if (object_type == "style") {
|
| 43 |
/* delete occurences of this option within style dropdowns. */
|
| 44 |
+
var style_inputs = jQuery(".form_style_input");
|
| 45 |
style_inputs.each(function() {
|
| 46 |
+
this_option = jQuery(this).find("option[value=" + object_id + "]");
|
| 47 |
if (this_option.attr("selected") == "selected")
|
| 48 |
+
jQuery(this).find("option[value=0]").attr("selected", "selected");
|
| 49 |
this_option.remove();
|
| 50 |
});
|
| 51 |
} else if (object_type == "field" || object_type == "field_option") {
|
| 52 |
/* delete occurences of this option within field and field option attach dropdowns. */
|
| 53 |
+
var fields_options_input = jQuery("select[name=attach_object_id], select[name=dettach_object_id]");
|
| 54 |
fields_options_input.each(function () {
|
| 55 |
+
this_option = jQuery(this).find("option[value=" + object_id + "]");
|
| 56 |
this_option.remove();
|
| 57 |
});
|
| 58 |
}
|
| 63 |
});
|
| 64 |
});
|
| 65 |
});
|
| 66 |
+
jQuery(".edit-button").each(function(){
|
| 67 |
+
var name = jQuery(this).attr('name');
|
| 68 |
+
var value = jQuery(this).attr('value');
|
| 69 |
var html = '<input class="edit-button" type="button" name="'+name+'" value="'+value+'" />';
|
| 70 |
+
jQuery(this).after(html).remove(); // add new, then remove original input
|
| 71 |
});
|
| 72 |
+
jQuery(".edit-button").live("click", function(event) {
|
| 73 |
save_box = fx.initSaveBox("Saving");
|
| 74 |
+
var object_id = jQuery(this).parents().find(".object-id").attr("value");
|
| 75 |
+
var object_type = jQuery(this).parents().find(".object-type").attr("value");
|
| 76 |
var values = "object_id=" + object_id + "&object_type=" + object_type + "&ajax_action=edit";
|
| 77 |
+
var object_rows = jQuery(this).parents("tr:eq(0)");
|
| 78 |
if (object_type == "form" || object_type == "field")
|
| 79 |
object_rows = object_rows.add(object_rows.next());
|
| 80 |
object_rows.find("input, select, textarea").each(function() {
|
| 81 |
+
if (jQuery(this).attr("name").match(/\[/) && jQuery(this).attr("type") != "submit" && jQuery(this).attr("type") != "button") {
|
| 82 |
+
key = jQuery(this).attr("name");;
|
| 83 |
+
values = values + "&" + key + "=" + jQuery(this).attr("value");
|
| 84 |
}
|
| 85 |
});
|
| 86 |
+
jQuery.ajax({
|
| 87 |
type: "POST",
|
| 88 |
url: ccf_file,
|
| 89 |
data: values,
|
| 90 |
//success: function(data) {
|
| 91 |
+
//jQuery(".save-box").fadeOut().remove();
|
| 92 |
//},
|
| 93 |
error: function() { alert(error); },
|
| 94 |
+
complete: function() { jQuery(".save-box").fadeOut().remove(); }
|
| 95 |
});
|
| 96 |
});
|
| 97 |
|
| 98 |
+
jQuery(".attach-button").each(function(){
|
| 99 |
+
var name = jQuery(this).attr('name');
|
| 100 |
+
var value = jQuery(this).attr('value');
|
| 101 |
var html = '<input class="attach-button" type="button" name="' + name + '" value="' + value + '" />';
|
| 102 |
+
jQuery(this).after(html).remove(); // add new, then remove original input
|
| 103 |
});
|
| 104 |
+
jQuery(".attach-button").live("click", function() {
|
| 105 |
+
var object_type = jQuery(this).parents().find(".object-type").attr("value");
|
| 106 |
+
var attach_object_field = jQuery(this).parents().find("select[name=attach_object_id]:first");
|
| 107 |
var object_id = attach_object_field.attr("class").split(' ')[0].replace(/[^0-9]*([0-9]*)/, "$1");
|
| 108 |
+
var dettach_object_field = jQuery(this).parents().find("select[name=dettach_object_id]:first");
|
| 109 |
var attach_object_id = attach_object_field.attr("value");
|
| 110 |
var attach_object_slug = attach_object_field.find("option[value=" + attach_object_id + "]:eq(0)").first().text();
|
| 111 |
pattern = new RegExp('<option value="' + attach_object_id + '">', "i");
|
| 112 |
str = dettach_object_field.html();
|
| 113 |
if (!str.match(pattern)) {
|
| 114 |
var save_box = fx.initSaveBox(attaching);
|
| 115 |
+
jQuery.ajax({
|
| 116 |
type: "POST",
|
| 117 |
url: ccf_file,
|
| 118 |
data: "ajax_action=attach&attach_object_id=" + attach_object_id + "&attach_to=" + object_id + "&object_type=" + object_type,
|
| 119 |
success: function(data) {
|
| 120 |
//debug = fx.initDebugWindow();
|
| 121 |
+
//jQuery("<div></div>").html(data).appendTo(debug);
|
| 122 |
+
new_option = jQuery("<option></option>").attr("value", attach_object_id).text(attach_object_slug);
|
| 123 |
dettach_object_field.append(new_option);
|
| 124 |
dettach_object_field.find('option[value=-1]').remove();
|
| 125 |
|
| 126 |
},
|
| 127 |
error: function() { alert(error); },
|
| 128 |
+
complete: function() { jQuery(".save-box").fadeOut().remove(); }
|
| 129 |
});
|
| 130 |
}
|
| 131 |
});
|
| 132 |
|
| 133 |
+
jQuery(".dettach-button").each(function(){
|
| 134 |
+
var name = jQuery(this).attr('name');
|
| 135 |
+
var value = jQuery(this).attr('value');
|
| 136 |
var html = '<input class="dettach-button" type="button" name="' + name + '" value="' + value + '" />';
|
| 137 |
+
jQuery(this).after(html).remove(); // add new, then remove original input
|
| 138 |
});
|
| 139 |
+
jQuery(".dettach-button").live("click", function() {
|
| 140 |
+
var object_type = jQuery(this).parents().find(".object-type").attr("value");
|
| 141 |
+
var dettach_object_field = jQuery(this).parents().find("select[name=dettach_object_id]:first");
|
| 142 |
var object_id = dettach_object_field.attr("class").split(' ')[0].replace(/[^0-9]*([0-9]*)/, "$1");
|
| 143 |
var dettach_object_id = dettach_object_field.attr("value");
|
| 144 |
if (dettach_object_id != "-1") {
|
| 145 |
var dettach_object_slug = dettach_object_field.find("option[value=" + dettach_object_id + "]:eq(0)").first().text();
|
| 146 |
var save_box = fx.initSaveBox(dettaching);
|
| 147 |
+
jQuery.ajax({
|
| 148 |
type: "POST",
|
| 149 |
url: ccf_file,
|
| 150 |
data: "ajax_action=dettach&dettach_object_id=" + dettach_object_id + "&dettach_from=" + object_id + "&object_type=" + object_type,
|
| 151 |
success: function(data) {
|
| 152 |
//debug = fx.initDebugWindow();
|
| 153 |
+
//jQuery("<div></div>").html(data).appendTo(debug);
|
| 154 |
pattern = new RegExp('<option value="' + dettach_object_id + '">.*?<\/option>', "i");
|
| 155 |
new_options = dettach_object_field.html().replace(pattern, '');
|
| 156 |
if (!new_options.match(/<\/option>/)) new_options = '<option value="-1">Nothing Attached!</option>';
|
| 157 |
dettach_object_field.html(new_options);
|
| 158 |
},
|
| 159 |
error: function() { alert(error); },
|
| 160 |
+
complete: function() { jQuery(".save-box").fadeOut().remove(); }
|
| 161 |
});
|
| 162 |
}
|
| 163 |
});
|
| 164 |
/*
|
| 165 |
+
jQuery(".create-button").each(function(){
|
| 166 |
+
var name = jQuery(this).attr('name');
|
| 167 |
+
var value = jQuery(this).attr('value');
|
| 168 |
var html = '<input class="create-button" type="button" name="'+name+'" value="'+value+'" />';
|
| 169 |
+
jQuery(this).after(html).remove(); // add new, then remove original input
|
| 170 |
});
|
| 171 |
+
jQuery(".create-button").live("click", function(event) {
|
| 172 |
var icon = fx.getLoadingIcon().insertBefore(this);
|
| 173 |
+
var object_type = jQuery(this).parents().find("input[name=object_type]").attr("value");
|
| 174 |
if (object_type == "field_option") {
|
| 175 |
var values = "ajax_action=create_field_option";
|
| 176 |
var value_array = [];
|
| 177 |
+
var new_row = jQuery('#edit-field-options tr:first').clone(true).addClass("new-object").hide().insertBefore('#edit-field-options tr:first');
|
| 178 |
+
jQuery(this).parents("form:eq(0)").find("input").each(function() {
|
| 179 |
+
if (jQuery(this).attr("name").match(/^option\[/)) {
|
| 180 |
+
values = values + "&" + jQuery(this).attr("name") + "=" + jQuery(this).attr("value");
|
| 181 |
+
key = jQuery(this).attr("name").replace(/^option\[(.*)\]$/, "$1");
|
| 182 |
+
value_array[key] = jQuery(this).attr("value");
|
| 183 |
+
jQuery(".new-object input[name=\"option[" + key + "]\"]").attr("value", value_array[key]);
|
| 184 |
}
|
| 185 |
});
|
| 186 |
// Try to get first row of field options table to use its html as a framework for new row
|
| 187 |
}
|
| 188 |
+
//new_row = jQuery("#edit-field-options tr:first").html().appendTo("body").hide();
|
| 189 |
|
| 190 |
// Create generic class of objects/functions to add delete/edit/insert capabilities on certain tables
|
| 191 |
+
jQuery.ajax({
|
| 192 |
type: "POST",
|
| 193 |
url: ccf_file,
|
| 194 |
data: values,
|
| 200 |
}
|
| 201 |
});
|
| 202 |
new_row.fadeIn("slow").removeClass("new-object");
|
| 203 |
+
jQuery(".ccf-loading-icon").remove();
|
| 204 |
});*/
|
| 205 |
});
|
js/custom-contact-forms-admin-inc.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
| 1 |
-
var $j = jQuery.noConflict();
|
| 2 |
-
|
| 3 |
function showCCFUsagePopover() {
|
| 4 |
-
|
| 5 |
}
|
| 6 |
|
| 7 |
-
(function(
|
| 8 |
var cache = [];
|
| 9 |
// Arguments are image paths relative to the current page.
|
| 10 |
-
|
| 11 |
var args_len = arguments.length;
|
| 12 |
for (var i = args_len; i--;) {
|
| 13 |
var cacheImage = document.createElement('img');
|
|
@@ -19,43 +17,43 @@ function showCCFUsagePopover() {
|
|
| 19 |
|
| 20 |
var fx = {
|
| 21 |
"initModal" : function() {
|
| 22 |
-
if (
|
| 23 |
-
return
|
| 24 |
.addClass("modal-window")
|
| 25 |
.appendTo("body");
|
| 26 |
} else {
|
| 27 |
-
return
|
| 28 |
}
|
| 29 |
},
|
| 30 |
|
| 31 |
"initDebugWindow" : function() {
|
| 32 |
-
if (
|
| 33 |
-
debug =
|
| 34 |
debug.click(function() { debug.remove(); });
|
| 35 |
return debug;
|
| 36 |
} else {
|
| 37 |
-
return
|
| 38 |
}
|
| 39 |
},
|
| 40 |
|
| 41 |
"initSaveBox" : function(text) {
|
| 42 |
-
if (
|
| 43 |
-
box =
|
| 44 |
-
|
| 45 |
.attr("href", "#")
|
| 46 |
.addClass("save-box-close-btn")
|
| 47 |
.html("×")
|
| 48 |
-
.click(function(event) { event.preventDefault();
|
| 49 |
.appendTo(box);
|
| 50 |
-
|
| 51 |
return box;
|
| 52 |
} else {
|
| 53 |
-
return
|
| 54 |
}
|
| 55 |
},
|
| 56 |
|
| 57 |
"boxOut": function(event) {
|
| 58 |
if (event != undefined) event.preventDefault();
|
| 59 |
-
|
| 60 |
}
|
| 61 |
};
|
|
|
|
|
|
|
| 1 |
function showCCFUsagePopover() {
|
| 2 |
+
jQuery("#ccf-usage-popover").fadeIn('slow');
|
| 3 |
}
|
| 4 |
|
| 5 |
+
(function(jQuery) {
|
| 6 |
var cache = [];
|
| 7 |
// Arguments are image paths relative to the current page.
|
| 8 |
+
jQuery.preloadImages = function() {
|
| 9 |
var args_len = arguments.length;
|
| 10 |
for (var i = args_len; i--;) {
|
| 11 |
var cacheImage = document.createElement('img');
|
| 17 |
|
| 18 |
var fx = {
|
| 19 |
"initModal" : function() {
|
| 20 |
+
if (jQuery(".modal-window").length == 0) {
|
| 21 |
+
return jQuery("<div>")
|
| 22 |
.addClass("modal-window")
|
| 23 |
.appendTo("body");
|
| 24 |
} else {
|
| 25 |
+
return jQuery(".modal-window");
|
| 26 |
}
|
| 27 |
},
|
| 28 |
|
| 29 |
"initDebugWindow" : function() {
|
| 30 |
+
if (jQuery(".debug-window").length == 0) {
|
| 31 |
+
debug = jQuery("<div>").addClass("debug-window").appendTo("body");
|
| 32 |
debug.click(function() { debug.remove(); });
|
| 33 |
return debug;
|
| 34 |
} else {
|
| 35 |
+
return jQuery(".debug-window");
|
| 36 |
}
|
| 37 |
},
|
| 38 |
|
| 39 |
"initSaveBox" : function(text) {
|
| 40 |
+
if (jQuery(".save-box").length == 0) {
|
| 41 |
+
box = jQuery("<div>").addClass("save-box").appendTo("body");
|
| 42 |
+
jQuery("<a>")
|
| 43 |
.attr("href", "#")
|
| 44 |
.addClass("save-box-close-btn")
|
| 45 |
.html("×")
|
| 46 |
+
.click(function(event) { event.preventDefault(); jQuery(".save-box").fadeOut("slow"); })
|
| 47 |
.appendTo(box);
|
| 48 |
+
jQuery("<p>").html(text + ' <img src="' + ccf_plugin_dir + '/images/wpspin_light.gif" />').appendTo(".save-box");
|
| 49 |
return box;
|
| 50 |
} else {
|
| 51 |
+
return jQuery(".save-box");
|
| 52 |
}
|
| 53 |
},
|
| 54 |
|
| 55 |
"boxOut": function(event) {
|
| 56 |
if (event != undefined) event.preventDefault();
|
| 57 |
+
jQuery(".modal-window").fadeOut("slow", function() { jQuery(this).remove(); });
|
| 58 |
}
|
| 59 |
};
|
js/custom-contact-forms-admin.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
-
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
.parent()
|
| 8 |
.parent()
|
| 9 |
.parent()
|
|
@@ -12,10 +12,10 @@ $j(document).ready(function(){
|
|
| 12 |
.toggle();
|
| 13 |
});
|
| 14 |
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
.parent()
|
| 20 |
.parent()
|
| 21 |
.parent()
|
|
@@ -24,10 +24,10 @@ $j(document).ready(function(){
|
|
| 24 |
.toggle();
|
| 25 |
});
|
| 26 |
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
.parent()
|
| 32 |
.parent()
|
| 33 |
.parent()
|
|
@@ -36,10 +36,10 @@ $j(document).ready(function(){
|
|
| 36 |
.toggle();
|
| 37 |
});
|
| 38 |
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
.parent()
|
| 44 |
.parent()
|
| 45 |
.parent()
|
|
@@ -47,14 +47,14 @@ $j(document).ready(function(){
|
|
| 47 |
.find(".fields-extra-options:first")
|
| 48 |
.toggle();
|
| 49 |
});
|
| 50 |
-
|
| 51 |
showCCFUsagePopover();
|
| 52 |
});
|
| 53 |
-
|
| 54 |
-
|
| 55 |
});
|
| 56 |
|
| 57 |
-
|
| 58 |
position: "bottom left",
|
| 59 |
offset: [-2, 10],
|
| 60 |
effect: "fade",
|
| 1 |
+
jQuery(document).ready(function(){
|
| 2 |
|
| 3 |
+
jQuery('.form-extra-options').hide();
|
| 4 |
+
jQuery('.form-options-expand').prepend('<input type="button" class="form-options-expand-link" value="' + more_options + '" />');
|
| 5 |
+
jQuery('.form-options-expand-link').click(function() {
|
| 6 |
+
jQuery(this)
|
| 7 |
.parent()
|
| 8 |
.parent()
|
| 9 |
.parent()
|
| 12 |
.toggle();
|
| 13 |
});
|
| 14 |
|
| 15 |
+
jQuery('.submission-content').hide();
|
| 16 |
+
jQuery('.submission-content-expand').prepend('<input type="button" class="submission-content-expand-button" value="' + expand + '" />');
|
| 17 |
+
jQuery('.submission-content-expand-button').click(function() {
|
| 18 |
+
jQuery(this)
|
| 19 |
.parent()
|
| 20 |
.parent()
|
| 21 |
.parent()
|
| 24 |
.toggle();
|
| 25 |
});
|
| 26 |
|
| 27 |
+
jQuery('.fixed-fields-extra-options').hide();
|
| 28 |
+
jQuery('.fixed-fields-options-expand').prepend('<input type="button" class="fixed-fields-options-expand-link" value="' + more_options + '" />');
|
| 29 |
+
jQuery('.fixed-fields-options-expand-link').click(function() {
|
| 30 |
+
jQuery(this)
|
| 31 |
.parent()
|
| 32 |
.parent()
|
| 33 |
.parent()
|
| 36 |
.toggle();
|
| 37 |
});
|
| 38 |
|
| 39 |
+
jQuery('.fields-extra-options').hide();
|
| 40 |
+
jQuery('.fields-options-expand').prepend('<input type="button" class="fields-options-expand-link" value="' + more_options + '" />');
|
| 41 |
+
jQuery('.fields-options-expand-link').click(function() {
|
| 42 |
+
jQuery(this)
|
| 43 |
.parent()
|
| 44 |
.parent()
|
| 45 |
.parent()
|
| 47 |
.find(".fields-extra-options:first")
|
| 48 |
.toggle();
|
| 49 |
});
|
| 50 |
+
jQuery('.usage-popover-button').click(function() {
|
| 51 |
showCCFUsagePopover();
|
| 52 |
});
|
| 53 |
+
jQuery("#ccf-usage-popover .close").click(function() {
|
| 54 |
+
jQuery("#ccf-usage-popover").fadeOut();
|
| 55 |
});
|
| 56 |
|
| 57 |
+
jQuery("a[title].toollink").tooltip({
|
| 58 |
position: "bottom left",
|
| 59 |
offset: [-2, 10],
|
| 60 |
effect: "fade",
|
js/custom-contact-forms.js
CHANGED
|
@@ -1,31 +1,24 @@
|
|
| 1 |
// Custom Contact Forms plugin javascript
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
cid = form_id;
|
| 6 |
-
}
|
| 7 |
-
|
| 8 |
-
var $j = jQuery.noConflict();
|
| 9 |
-
|
| 10 |
-
$j(document).ready(function(){
|
| 11 |
-
$j('<a></a>')
|
| 12 |
.addClass('ccf-popover-close')
|
| 13 |
.html('[close]')
|
| 14 |
.prependTo('.ccf-popover');
|
| 15 |
-
|
| 16 |
-
|
| 17 |
var sel = ".ccf-popover" + cid;
|
| 18 |
-
|
| 19 |
|
| 20 |
});
|
| 21 |
-
|
| 22 |
-
|
| 23 |
});
|
| 24 |
-
|
| 25 |
|
| 26 |
});
|
| 27 |
|
| 28 |
-
|
| 29 |
position: "center right",
|
| 30 |
offset: [-2, 10],
|
| 31 |
effect: "fade",
|
|
@@ -34,9 +27,9 @@ $j(document).ready(function(){
|
|
| 34 |
|
| 35 |
});
|
| 36 |
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
});
|
| 41 |
|
| 42 |
});
|
| 1 |
// Custom Contact Forms plugin javascript
|
| 2 |
|
| 3 |
+
jQuery(document).ready(function(){
|
| 4 |
+
jQuery('<a></a>')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
.addClass('ccf-popover-close')
|
| 6 |
.html('[close]')
|
| 7 |
.prependTo('.ccf-popover');
|
| 8 |
+
jQuery('.ccf-popover').css({'padding' : '10px 14px 10px 10px'});
|
| 9 |
+
jQuery("a#in").click(function(){
|
| 10 |
var sel = ".ccf-popover" + cid;
|
| 11 |
+
jQuery(".ccf-popover1").fadeIn();
|
| 12 |
|
| 13 |
});
|
| 14 |
+
jQuery(".ccf-popover-close").click(function(){
|
| 15 |
+
jQuery(".ccf-popover").hide();
|
| 16 |
});
|
| 17 |
+
jQuery('.show-field-instructions').click(function() {
|
| 18 |
|
| 19 |
});
|
| 20 |
|
| 21 |
+
jQuery(".ccf-tooltip-field").tooltip({
|
| 22 |
position: "center right",
|
| 23 |
offset: [-2, 10],
|
| 24 |
effect: "fade",
|
| 27 |
|
| 28 |
});
|
| 29 |
|
| 30 |
+
jQuery("#ccf-form-success").delay(500).fadeIn('slow');
|
| 31 |
+
jQuery("#ccf-form-success .close").click(function() {
|
| 32 |
+
jQuery("#ccf-form-success").fadeOut();
|
| 33 |
});
|
| 34 |
|
| 35 |
});
|
readme.txt
CHANGED
|
@@ -3,8 +3,8 @@ Contributors: Taylor Lovett
|
|
| 3 |
Donate link: http://www.taylorlovett.com
|
| 4 |
Tags: contact form, web form, custom contact form, custom forms, captcha form, contact fields, form mailers
|
| 5 |
Requires at least: 2.8.1
|
| 6 |
-
Tested up to: 3.0.
|
| 7 |
-
Stable tag: 4.0.
|
| 8 |
|
| 9 |
Gauranteed to be the most customizable and intuitive contact form plugin for Wordpress.
|
| 10 |
|
|
@@ -121,6 +121,14 @@ Visit http://www.taylorlovett.com/wordpress-plugins for screenshots. Right now a
|
|
| 121 |
|
| 122 |
== Changelog ==
|
| 123 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 124 |
= 4.0.8.1 =
|
| 125 |
* custom-contact-forms-admin.php - Email charset set to UTF-8
|
| 126 |
* css/custom-contact-forms-admin.css - Usage Popover z-index set to 10000 and Usage button styled.
|
| 3 |
Donate link: http://www.taylorlovett.com
|
| 4 |
Tags: contact form, web form, custom contact form, custom forms, captcha form, contact fields, form mailers
|
| 5 |
Requires at least: 2.8.1
|
| 6 |
+
Tested up to: 3.0.4
|
| 7 |
+
Stable tag: 4.0.9
|
| 8 |
|
| 9 |
Gauranteed to be the most customizable and intuitive contact form plugin for Wordpress.
|
| 10 |
|
| 121 |
|
| 122 |
== Changelog ==
|
| 123 |
|
| 124 |
+
= 4.0.9 =
|
| 125 |
+
* js/custom-contact-forms.js - JQuery conflict issue fixed
|
| 126 |
+
* js/custom-contact-forms-admin.js - JQuery conflict issue fixed
|
| 127 |
+
* js/custom-contact-forms-admin-inc.js - JQuery conflict issue fixed
|
| 128 |
+
* js/custom-contact-forms-admin-ajax.js - JQuery conflict issue fixed
|
| 129 |
+
* custom-contact-forms-admin.php - JQuery conflict issue fixed
|
| 130 |
+
* custom-contact-forms-front.php - Unnecessary JQuery dependencies removed
|
| 131 |
+
|
| 132 |
= 4.0.8.1 =
|
| 133 |
* custom-contact-forms-admin.php - Email charset set to UTF-8
|
| 134 |
* css/custom-contact-forms-admin.css - Usage Popover z-index set to 10000 and Usage button styled.
|
