Version Description
- Fixed bug where classes were not being updated.
=
Download this release
Release Info
Developer | bradvin |
Plugin | Gravity Forms CSS Ready Class Selector |
Version | 1.1 |
Comparing to | |
See all releases |
Code changes from version 1.0.1 to 1.1
- gf-readyclasses-addon.php +26 -32
- readme.txt +4 -2
gf-readyclasses-addon.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Gravity Forms CSS Ready Class Selector
|
4 |
Plugin URI: http://themergency.com/plugins/gravity-forms-custom-post-types/
|
5 |
Description: Easily select a CSS "Ready Class" for your fields within Gravity Forms
|
6 |
-
Version: 1.
|
7 |
Author: Brad Vincent
|
8 |
Author URI: http://themergency.com/
|
9 |
License: GPL2
|
@@ -64,7 +64,7 @@ if (!class_exists('GFReadyClassesAddon')) {
|
|
64 |
#css_ready_modal h4 { margin-bottom:2px; }
|
65 |
.cssr_accordian { display:none; }
|
66 |
a.cssr_acc_link { font-weight:bold; display:block; padding:5px; text-decoration:none; text-align:left; background:#888; border:solid 1px #ddd; color:#fff; }
|
67 |
-
a.cssr_link { text-decoration:none; margin:2px; text-align:center; padding:3px; border:solid 1px #aaa; background:#eee; display:inline-block; }
|
68 |
a.cssr_link:hover { background:#ddd; }
|
69 |
ul.cssr_ul { margin:0; padding: 0; }
|
70 |
ul.cssr_ul li { margin:2px; padding: 0; }
|
@@ -75,55 +75,57 @@ if (!class_exists('GFReadyClassesAddon')) {
|
|
75 |
<li>
|
76 |
<a class='cssr_acc_link' href='#'>2 Columns</a>
|
77 |
<div class='cssr_accordian'>
|
78 |
-
<a class='cssr_link' style='width:
|
79 |
-
<a class='cssr_link' style='width:
|
80 |
</div>
|
81 |
</li>
|
82 |
|
83 |
<li>
|
84 |
<a class='cssr_acc_link' href='#'>3 Columns</a>
|
85 |
<div class='cssr_accordian'>
|
86 |
-
<a class='cssr_link' style='width:
|
87 |
-
<a class='cssr_link' style='width:
|
88 |
-
<a class='cssr_link' style='width:
|
89 |
</div>
|
90 |
</li>
|
91 |
|
92 |
<li>
|
93 |
<a class='cssr_acc_link' href='#'>List Layout</a>
|
94 |
<div class='cssr_accordian'>
|
95 |
-
<a class='cssr_link' style='width:
|
96 |
-
<a class='cssr_link' style='width:
|
97 |
-
<a class='cssr_link' style='width:
|
98 |
-
<a class='cssr_link' style='width:
|
99 |
-
<a class='cssr_link' style='width:
|
100 |
</div>
|
101 |
</li>
|
102 |
|
103 |
<li>
|
104 |
<a class='cssr_acc_link' href='#'>List Heights</a>
|
105 |
<div class='cssr_accordian'>
|
106 |
-
<a class='cssr_link' style='width:
|
107 |
-
<a class='cssr_link' style='width:
|
108 |
-
<a class='cssr_link' style='width:
|
109 |
-
<a class='cssr_link' style='width:
|
110 |
-
<a class='cssr_link' style='width:
|
111 |
-
<a class='cssr_link' style='width:
|
112 |
</div>
|
113 |
</li>
|
114 |
|
115 |
<li>
|
116 |
<a class='cssr_acc_link' href='#'>Others</a>
|
117 |
<div class='cssr_accordian'>
|
118 |
-
<a class='cssr_link' style='width:
|
119 |
-
<a class='cssr_link' style='width:
|
120 |
-
<a class='cssr_link' style='width:
|
121 |
</div>
|
122 |
</li>
|
123 |
</ul>
|
|
|
124 |
Click on one or more CSS ready classes to add them.<br />
|
125 |
Double-clicking adds the class and closes this popup.<br />
|
126 |
For more help with CSS ready classes, refer to <a href='http://www.gravityhelp.com/css-ready-classes-for-gravity-forms/' target='_blank'>this documentation</a>.
|
|
|
127 |
";
|
128 |
|
129 |
?>
|
@@ -189,7 +191,7 @@ if (!class_exists('GFReadyClassesAddon')) {
|
|
189 |
if (jQuery("#css_ready_selector").length == 0) {
|
190 |
|
191 |
//add some html after the CSS Class Name input
|
192 |
-
var $select_link = jQuery("<a id='css_ready_selector' href='#'><img src='<?php echo $btn_url; ?>' /></a>");
|
193 |
|
194 |
var $modal = jQuery("<?php echo preg_replace( '/\s*[\r\n\t]+\s*/', '', $modal_html ); ?>").hide();
|
195 |
|
@@ -219,18 +221,10 @@ if (!class_exists('GFReadyClassesAddon')) {
|
|
219 |
var css = jQuery(this).attr("rel");
|
220 |
addTokenToInput(jQuery("#field_css_class"), css, ' ');
|
221 |
SetFieldProperty('cssClass', jQuery("#field_css_class").val().trim());
|
222 |
-
|
223 |
});
|
224 |
|
225 |
-
|
226 |
-
onOpen: function (dialog) {
|
227 |
-
dialog.overlay.fadeIn(function () {
|
228 |
-
dialog.container.slideDown(function () {
|
229 |
-
dialog.data.fadeIn('slow');
|
230 |
-
});
|
231 |
-
});
|
232 |
-
}
|
233 |
-
});
|
234 |
});
|
235 |
|
236 |
}
|
3 |
Plugin Name: Gravity Forms CSS Ready Class Selector
|
4 |
Plugin URI: http://themergency.com/plugins/gravity-forms-custom-post-types/
|
5 |
Description: Easily select a CSS "Ready Class" for your fields within Gravity Forms
|
6 |
+
Version: 1.1
|
7 |
Author: Brad Vincent
|
8 |
Author URI: http://themergency.com/
|
9 |
License: GPL2
|
64 |
#css_ready_modal h4 { margin-bottom:2px; }
|
65 |
.cssr_accordian { display:none; }
|
66 |
a.cssr_acc_link { font-weight:bold; display:block; padding:5px; text-decoration:none; text-align:left; background:#888; border:solid 1px #ddd; color:#fff; }
|
67 |
+
a.cssr_link { text-decoration:none; margin:2px; text-align:center; padding:3px; border:solid 1px #aaa; background:#eee; display:inline-block; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; }
|
68 |
a.cssr_link:hover { background:#ddd; }
|
69 |
ul.cssr_ul { margin:0; padding: 0; }
|
70 |
ul.cssr_ul li { margin:2px; padding: 0; }
|
75 |
<li>
|
76 |
<a class='cssr_acc_link' href='#'>2 Columns</a>
|
77 |
<div class='cssr_accordian'>
|
78 |
+
<a class='cssr_link' style='width:30%'' href='#' rel='gf_left_half' title='gf_left_half'>Left Half</a>
|
79 |
+
<a class='cssr_link' style='width:30%'' href='#' rel='gf_right_half' title='gf_right_half'>Right Half</a>
|
80 |
</div>
|
81 |
</li>
|
82 |
|
83 |
<li>
|
84 |
<a class='cssr_acc_link' href='#'>3 Columns</a>
|
85 |
<div class='cssr_accordian'>
|
86 |
+
<a class='cssr_link' style='width:30%' href='#' rel='gf_left_third' title='gf_left_third'>Left Third</a>
|
87 |
+
<a class='cssr_link' style='width:30%' href='#' rel='gf_middle_third' title='gf_middle_third'>Middle Third</a>
|
88 |
+
<a class='cssr_link' style='width:30%' href='#' rel='gf_right_third' title='gf_right_third'>Right Third</a>
|
89 |
</div>
|
90 |
</li>
|
91 |
|
92 |
<li>
|
93 |
<a class='cssr_acc_link' href='#'>List Layout</a>
|
94 |
<div class='cssr_accordian'>
|
95 |
+
<a class='cssr_link' style='width:30%' rel='gf_list_2col' title='gf_list_2col' href='#'>2 Column List</a>
|
96 |
+
<a class='cssr_link' style='width:30%' rel='gf_list_3col' title='gf_list_3col' href='#'>3 Column List</a>
|
97 |
+
<a class='cssr_link' style='width:30%' rel='gf_list_4col' title='gf_list_4col' href='#'>4 Column List</a>
|
98 |
+
<a class='cssr_link' style='width:30%' rel='gf_list_5col' title='gf_list_5col' href='#'>5 Column List</a>
|
99 |
+
<a class='cssr_link' style='width:30%' rel='gf_list_inline' title='gf_list_inline' href='#'>Inline List</a>
|
100 |
</div>
|
101 |
</li>
|
102 |
|
103 |
<li>
|
104 |
<a class='cssr_acc_link' href='#'>List Heights</a>
|
105 |
<div class='cssr_accordian'>
|
106 |
+
<a class='cssr_link' style='width:30%' rel='gf_list_height_25' title='gf_list_height_25' href='#'>25px Height</a>
|
107 |
+
<a class='cssr_link' style='width:30%' rel='gf_list_height_50' title='gf_list_height_50' href='#'>50px Height</a>
|
108 |
+
<a class='cssr_link' style='width:30%' rel='gf_list_height_75' title='gf_list_height_75' href='#'>75px Height</a>
|
109 |
+
<a class='cssr_link' style='width:30%' rel='gf_list_height_100' title='gf_list_height_100' href='#'>100px Height</a>
|
110 |
+
<a class='cssr_link' style='width:30%' rel='gf_list_height_125' title='gf_list_height_125' href='#'>125px Height</a>
|
111 |
+
<a class='cssr_link' style='width:30%' rel='gf_list_height_150' title='gf_list_height_150' href='#'>150px Height</a>
|
112 |
</div>
|
113 |
</li>
|
114 |
|
115 |
<li>
|
116 |
<a class='cssr_acc_link' href='#'>Others</a>
|
117 |
<div class='cssr_accordian'>
|
118 |
+
<a class='cssr_link' style='width:30%' rel='gf_scroll_text' title='gf_scroll_text' href='#'>Scrolling Paragraph Text</a>
|
119 |
+
<a class='cssr_link' style='width:30%' rel='gf_hide_ampm' title='gf_hide_ampm' href='#'>Hide Time am/pm</a>
|
120 |
+
<a class='cssr_link' style='width:30%' rel='gf_hide_charleft' title='gf_hide_charleft' href='#'>Hide Character Counter</a>
|
121 |
</div>
|
122 |
</li>
|
123 |
</ul>
|
124 |
+
<p>
|
125 |
Click on one or more CSS ready classes to add them.<br />
|
126 |
Double-clicking adds the class and closes this popup.<br />
|
127 |
For more help with CSS ready classes, refer to <a href='http://www.gravityhelp.com/css-ready-classes-for-gravity-forms/' target='_blank'>this documentation</a>.
|
128 |
+
</p>
|
129 |
";
|
130 |
|
131 |
?>
|
191 |
if (jQuery("#css_ready_selector").length == 0) {
|
192 |
|
193 |
//add some html after the CSS Class Name input
|
194 |
+
var $select_link = jQuery("<a id='css_ready_selector' class='thickbox' href='#TB_inline?width=500&height=550&inlineId=css_ready_modal'><img src='<?php echo $btn_url; ?>' /></a>");
|
195 |
|
196 |
var $modal = jQuery("<?php echo preg_replace( '/\s*[\r\n\t]+\s*/', '', $modal_html ); ?>").hide();
|
197 |
|
221 |
var css = jQuery(this).attr("rel");
|
222 |
addTokenToInput(jQuery("#field_css_class"), css, ' ');
|
223 |
SetFieldProperty('cssClass', jQuery("#field_css_class").val().trim());
|
224 |
+
tb_remove();
|
225 |
});
|
226 |
|
227 |
+
tb_show('', this.href, false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
228 |
});
|
229 |
|
230 |
}
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: bradvin
|
|
3 |
Donate link: http://themergency.com/donate/
|
4 |
Tags: form,forms,gravity,gravity form,gravity forms,ready classes,CSS Ready,CSS,class
|
5 |
Requires at least: 3.0
|
6 |
-
Tested up to: 3.
|
7 |
-
Stable tag: 1.
|
8 |
|
9 |
Easily select a CSS "Ready Class" for your fields within Gravity Forms
|
10 |
|
@@ -13,6 +13,8 @@ Easily select a CSS "Ready Class" for your fields within Gravity Forms
|
|
13 |
> This plugin is an add-on for the amazing *Gravity Forms Plugin*.
|
14 |
> Check out my other free [Add-ons for Gravity Forms](http://themergency.com/gravity-forms-addon-plugins/)
|
15 |
|
|
|
|
|
16 |
**Requires at least v1.5 of Gravity Forms**
|
17 |
|
18 |
"Ready Classes" were introduced in Gravity Forms 1.5. Using these new classes, you can easily create more advanced alternative layouts for the fields in your forms. Excellent idea, however, the problem is you always need to remember what the exact class name is. Now with the CSS Ready class selector, you don't need to remember. Simply click on a button to lauch the popup and choose the class you want to add from the list.
|
3 |
Donate link: http://themergency.com/donate/
|
4 |
Tags: form,forms,gravity,gravity form,gravity forms,ready classes,CSS Ready,CSS,class
|
5 |
Requires at least: 3.0
|
6 |
+
Tested up to: 3.5.1
|
7 |
+
Stable tag: 1.1
|
8 |
|
9 |
Easily select a CSS "Ready Class" for your fields within Gravity Forms
|
10 |
|
13 |
> This plugin is an add-on for the amazing *Gravity Forms Plugin*.
|
14 |
> Check out my other free [Add-ons for Gravity Forms](http://themergency.com/gravity-forms-addon-plugins/)
|
15 |
|
16 |
+
**Compatible with Gravity Forms v1.7.2**
|
17 |
+
|
18 |
**Requires at least v1.5 of Gravity Forms**
|
19 |
|
20 |
"Ready Classes" were introduced in Gravity Forms 1.5. Using these new classes, you can easily create more advanced alternative layouts for the fields in your forms. Excellent idea, however, the problem is you always need to remember what the exact class name is. Now with the CSS Ready class selector, you don't need to remember. Simply click on a button to lauch the popup and choose the class you want to add from the list.
|