Custom Contact Forms - Version 4.0.9

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 Icon 128x128 Custom Contact Forms
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 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
- $j(document).ready(function() {
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', 'jquery-ui-core', 'jquery-ui-tabs', 'jquery-ui-resizable'), '1.0');
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.8.1
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
- $j.preloadImages(ccf_plugin_dir + "/images/wpspin_light.gif"); // preload loading image
2
- $j(document).ready(function() {
3
- $j(".delete-button").each(function(){
4
- var name = $j(this).attr('name');
5
- var value = $j(this).attr('value');
6
  var html = '<input class="delete-button" type="button" name="'+name+'" value="'+value+'" />';
7
- $j(this).after(html).remove(); // add new, then remove original input
8
  });
9
- $j(".delete-button").live("click", function(event) {
10
- var object_id = $j(this).parents().find(".object-id").attr("value");
11
- var object_type = $j(this).parents().find(".object-type").attr("value");
12
- var parent_row = $j(this).parents("tr:eq(0)");
13
  var modal = fx.initModal();
14
- $j("<a>")
15
  .attr("href", "#")
16
  .addClass("modal-close-btn")
17
  .html("&times")
18
  .click(function(event) { fx.boxOut(event); })
19
  .appendTo(modal);
20
- $j("<p>")
21
  .html(delete_confirm + " " + object_type.replace("_", " ") + "?")
22
  .appendTo(modal);
23
- $j("<input>").attr({
24
  type: "button",
25
  value: click_to_confirm
26
  }).addClass("delete-button-confirm").appendTo(modal);
27
- var loading_img = $j("<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
- $j(".delete-button-confirm").click(function() {
34
  loading_img.show();
35
- $j.ajax({
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 = $j(".form_style_input");
45
  style_inputs.each(function() {
46
- this_option = $j(this).find("option[value=" + object_id + "]");
47
  if (this_option.attr("selected") == "selected")
48
- $j(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 = $j("select[name=attach_object_id], select[name=dettach_object_id]");
54
  fields_options_input.each(function () {
55
- this_option = $j(this).find("option[value=" + object_id + "]");
56
  this_option.remove();
57
  });
58
  }
@@ -63,132 +63,132 @@ $j(document).ready(function() {
63
  });
64
  });
65
  });
66
- $j(".edit-button").each(function(){
67
- var name = $j(this).attr('name');
68
- var value = $j(this).attr('value');
69
  var html = '<input class="edit-button" type="button" name="'+name+'" value="'+value+'" />';
70
- $j(this).after(html).remove(); // add new, then remove original input
71
  });
72
- $j(".edit-button").live("click", function(event) {
73
  save_box = fx.initSaveBox("Saving");
74
- var object_id = $j(this).parents().find(".object-id").attr("value");
75
- var object_type = $j(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 = $j(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 ($j(this).attr("name").match(/\[/) && $j(this).attr("type") != "submit" && $j(this).attr("type") != "button") {
82
- key = $j(this).attr("name");;
83
- values = values + "&" + key + "=" + $j(this).attr("value");
84
  }
85
  });
86
- $j.ajax({
87
  type: "POST",
88
  url: ccf_file,
89
  data: values,
90
  //success: function(data) {
91
- //$j(".save-box").fadeOut().remove();
92
  //},
93
  error: function() { alert(error); },
94
- complete: function() { $j(".save-box").fadeOut().remove(); }
95
  });
96
  });
97
 
98
- $j(".attach-button").each(function(){
99
- var name = $j(this).attr('name');
100
- var value = $j(this).attr('value');
101
  var html = '<input class="attach-button" type="button" name="' + name + '" value="' + value + '" />';
102
- $j(this).after(html).remove(); // add new, then remove original input
103
  });
104
- $j(".attach-button").live("click", function() {
105
- var object_type = $j(this).parents().find(".object-type").attr("value");
106
- var attach_object_field = $j(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 = $j(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
- $j.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
- //$j("<div></div>").html(data).appendTo(debug);
122
- new_option = $j("<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() { $j(".save-box").fadeOut().remove(); }
129
  });
130
  }
131
  });
132
 
133
- $j(".dettach-button").each(function(){
134
- var name = $j(this).attr('name');
135
- var value = $j(this).attr('value');
136
  var html = '<input class="dettach-button" type="button" name="' + name + '" value="' + value + '" />';
137
- $j(this).after(html).remove(); // add new, then remove original input
138
  });
139
- $j(".dettach-button").live("click", function() {
140
- var object_type = $j(this).parents().find(".object-type").attr("value");
141
- var dettach_object_field = $j(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
- $j.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
- //$j("<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() { $j(".save-box").fadeOut().remove(); }
161
  });
162
  }
163
  });
164
  /*
165
- $j(".create-button").each(function(){
166
- var name = $j(this).attr('name');
167
- var value = $j(this).attr('value');
168
  var html = '<input class="create-button" type="button" name="'+name+'" value="'+value+'" />';
169
- $j(this).after(html).remove(); // add new, then remove original input
170
  });
171
- $j(".create-button").live("click", function(event) {
172
  var icon = fx.getLoadingIcon().insertBefore(this);
173
- var object_type = $j(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 = $j('#edit-field-options tr:first').clone(true).addClass("new-object").hide().insertBefore('#edit-field-options tr:first');
178
- $j(this).parents("form:eq(0)").find("input").each(function() {
179
- if ($j(this).attr("name").match(/^option\[/)) {
180
- values = values + "&" + $j(this).attr("name") + "=" + $j(this).attr("value");
181
- key = $j(this).attr("name").replace(/^option\[(.*)\]$/, "$1");
182
- value_array[key] = $j(this).attr("value");
183
- $j(".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 = $j("#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
- $j.ajax({
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
- $j(".ccf-loading-icon").remove();
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("&times")
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
- $j("#ccf-usage-popover").fadeIn('slow');
5
  }
6
 
7
- (function($j) {
8
  var cache = [];
9
  // Arguments are image paths relative to the current page.
10
- $j.preloadImages = function() {
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 ($j(".modal-window").length == 0) {
23
- return $j("<div>")
24
  .addClass("modal-window")
25
  .appendTo("body");
26
  } else {
27
- return $j(".modal-window");
28
  }
29
  },
30
 
31
  "initDebugWindow" : function() {
32
- if ($j(".debug-window").length == 0) {
33
- debug = $j("<div>").addClass("debug-window").appendTo("body");
34
  debug.click(function() { debug.remove(); });
35
  return debug;
36
  } else {
37
- return $j(".debug-window");
38
  }
39
  },
40
 
41
  "initSaveBox" : function(text) {
42
- if ($j(".save-box").length == 0) {
43
- box = $j("<div>").addClass("save-box").appendTo("body");
44
- $j("<a>")
45
  .attr("href", "#")
46
  .addClass("save-box-close-btn")
47
  .html("&times;")
48
- .click(function(event) { event.preventDefault(); $j(".save-box").fadeOut("slow"); })
49
  .appendTo(box);
50
- $j("<p>").html(text + ' <img src="' + ccf_plugin_dir + '/images/wpspin_light.gif" />').appendTo(".save-box");
51
  return box;
52
  } else {
53
- return $j(".save-box");
54
  }
55
  },
56
 
57
  "boxOut": function(event) {
58
  if (event != undefined) event.preventDefault();
59
- $j(".modal-window").fadeOut("slow", function() { $j(this).remove(); });
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("&times;")
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
- $j(document).ready(function(){
2
 
3
- $j('.form-extra-options').hide();
4
- $j('.form-options-expand').prepend('<input type="button" class="form-options-expand-link" value="' + more_options + '" />');
5
- $j('.form-options-expand-link').click(function() {
6
- $j(this)
7
  .parent()
8
  .parent()
9
  .parent()
@@ -12,10 +12,10 @@ $j(document).ready(function(){
12
  .toggle();
13
  });
14
 
15
- $j('.submission-content').hide();
16
- $j('.submission-content-expand').prepend('<input type="button" class="submission-content-expand-button" value="' + expand + '" />');
17
- $j('.submission-content-expand-button').click(function() {
18
- $j(this)
19
  .parent()
20
  .parent()
21
  .parent()
@@ -24,10 +24,10 @@ $j(document).ready(function(){
24
  .toggle();
25
  });
26
 
27
- $j('.fixed-fields-extra-options').hide();
28
- $j('.fixed-fields-options-expand').prepend('<input type="button" class="fixed-fields-options-expand-link" value="' + more_options + '" />');
29
- $j('.fixed-fields-options-expand-link').click(function() {
30
- $j(this)
31
  .parent()
32
  .parent()
33
  .parent()
@@ -36,10 +36,10 @@ $j(document).ready(function(){
36
  .toggle();
37
  });
38
 
39
- $j('.fields-extra-options').hide();
40
- $j('.fields-options-expand').prepend('<input type="button" class="fields-options-expand-link" value="' + more_options + '" />');
41
- $j('.fields-options-expand-link').click(function() {
42
- $j(this)
43
  .parent()
44
  .parent()
45
  .parent()
@@ -47,14 +47,14 @@ $j(document).ready(function(){
47
  .find(".fields-extra-options:first")
48
  .toggle();
49
  });
50
- $j('.usage-popover-button').click(function() {
51
  showCCFUsagePopover();
52
  });
53
- $j("#ccf-usage-popover .close").click(function() {
54
- $j("#ccf-usage-popover").fadeOut();
55
  });
56
 
57
- $j("a[title].toollink").tooltip({
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
- var cid;
4
- function storePopupVar(form_id) {
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
- $j('.ccf-popover').css({'padding' : '10px 14px 10px 10px'});
16
- $j("a#in").click(function(){
17
  var sel = ".ccf-popover" + cid;
18
- $j(".ccf-popover1").fadeIn();
19
 
20
  });
21
- $j(".ccf-popover-close").click(function(){
22
- $j(".ccf-popover").hide();
23
  });
24
- $j('.show-field-instructions').click(function() {
25
 
26
  });
27
 
28
- $j(".ccf-tooltip-field").tooltip({
29
  position: "center right",
30
  offset: [-2, 10],
31
  effect: "fade",
@@ -34,9 +27,9 @@ $j(document).ready(function(){
34
 
35
  });
36
 
37
- $j("#ccf-form-success").delay(500).fadeIn('slow');
38
- $j("#ccf-form-success .close").click(function() {
39
- $j("#ccf-form-success").fadeOut();
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.1
7
- Stable tag: 4.0.8.1
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.