Changeset 630196
- Timestamp:
- 11/26/2012 04:50:29 PM (13 years ago)
- Location:
- misamee-gravity-forms-tools/branches/1.4
- Files:
-
- 13 added
- 3 deleted
- 10 edited
-
css/mgft.pretty.form.css (modified) (13 diffs)
-
js/mgft.pretty.form.js (modified) (1 diff)
-
lib/mgft_pretty_form.php (modified) (1 diff)
-
lib/mgft_pretty_form_widget.php (modified) (5 diffs)
-
misamee-gf-tools.php (modified) (2 diffs)
-
readme.txt (modified) (5 diffs)
-
sass/mgft.pretty.form.scss (modified) (7 diffs)
-
themes/autumn (modified) (1 prop)
-
themes/autumn/css/mgft.pretty.form.autumn.css (added)
-
themes/autumn/css/mgft.pretty.form.css (deleted)
-
themes/autumn/functions.php (modified) (1 diff)
-
themes/autumn/js/mgft.pretty.form.autumn.js (added)
-
themes/autumn/js/mgft.pretty.form.js (deleted)
-
themes/autumn/sass/mgft.pretty.form.autumn.scss (modified) (6 diffs)
-
themes/autumn/sass/mgft.pretty.form.scss (deleted)
-
themes/formspring (added)
-
themes/formspring/config.rb (added)
-
themes/formspring/css (added)
-
themes/formspring/css/mgft.pretty.form.formspring.css (added)
-
themes/formspring/functions.php (added)
-
themes/formspring/js (added)
-
themes/formspring/js/mgft.pretty.form.formspring.js (added)
-
themes/formspring/js/tooltipsy.min.js (added)
-
themes/formspring/js/tooltipsy.source.js (added)
-
themes/formspring/sass (added)
-
themes/formspring/sass/mgft.pretty.form.formspring.scss (added)
Legend:
- Unmodified
- Added
- Removed
-
misamee-gravity-forms-tools/branches/1.4/css/mgft.pretty.form.css
r629029 r630196 1 /* line 85, ../sass/mgft.pretty.form.scss */2 .pretty_form .gform_wrapper {1 /* line 91, ../sass/mgft.pretty.form.scss */ 2 .pretty_form.default .gform_wrapper { 3 3 background: #FFF; 4 4 -webkit-border-radius: 7px; … … 13 13 max-width: 100%; 14 14 } 15 /* line 9 1, ../sass/mgft.pretty.form.scss */16 .pretty_form .gform_wrapper .gform_heading {15 /* line 97, ../sass/mgft.pretty.form.scss */ 16 .pretty_form.default .gform_wrapper .gform_heading { 17 17 border-bottom: 1px solid #EEEEEE; 18 18 background-color: #f9fcf7; 19 19 *zoom: 1; 20 20 filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#FFF9FCF7', endColorstr='#FFF5F9F0'); 21 background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2Y5ZmNmNyIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2Y1ZjlmMCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); 22 background-size: 100%; 21 23 background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #f9fcf7), color-stop(100%, #f5f9f0)); 22 24 background-image: -webkit-linear-gradient(top, #f9fcf7 0%, #f5f9f0 100%); … … 40 42 width: 100%; 41 43 } 42 /* line 10 2, ../sass/mgft.pretty.form.scss */43 .pretty_form .gform_wrapper h3.gform_title, .pretty_form.gform_wrapper .gform_description {44 /* line 108, ../sass/mgft.pretty.form.scss */ 45 .pretty_form.default .gform_wrapper h3.gform_title, .pretty_form.default .gform_wrapper .gform_description { 44 46 width: auto; 45 47 padding: 0 0.25em; 46 48 display: block; 47 49 } 48 /* line 1 08, ../sass/mgft.pretty.form.scss */49 .pretty_form .gform_wrapper .gf_progressbar_wrapper {50 /* line 114, ../sass/mgft.pretty.form.scss */ 51 .pretty_form.default .gform_wrapper .gf_progressbar_wrapper { 50 52 margin: 0 1em; 51 53 width: auto; 52 54 } 53 /* line 11 3, ../sass/mgft.pretty.form.scss */54 .pretty_form .gform_wrapper .validation_error {55 /* line 119, ../sass/mgft.pretty.form.scss */ 56 .pretty_form.default .gform_wrapper .validation_error { 55 57 display: none; 56 58 } 57 /* line 1 17, ../sass/mgft.pretty.form.scss */58 .pretty_form .gform_wrapper .gform_body {59 /* line 123, ../sass/mgft.pretty.form.scss */ 60 .pretty_form.default .gform_wrapper .gform_body { 59 61 background-color: white; 60 62 *zoom: 1; 61 63 filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#FFFFFFFF', endColorstr='#FFE5E5E5'); 64 background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2U1ZTVlNSIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); 65 background-size: 100%; 62 66 background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #e5e5e5)); 63 67 background-image: -webkit-linear-gradient(top, #ffffff 0%, #e5e5e5 100%); … … 66 70 background-image: linear-gradient(top, #ffffff 0%, #e5e5e5 100%); 67 71 } 68 /* line 12 0, ../sass/mgft.pretty.form.scss */69 .pretty_form .gform_wrapper .gform_body .gsection_title, .pretty_form.gform_wrapper .gform_body .gsection_description {72 /* line 126, ../sass/mgft.pretty.form.scss */ 73 .pretty_form.default .gform_wrapper .gform_body .gsection_title, .pretty_form.default .gform_wrapper .gform_body .gsection_description { 70 74 width: 98%; 71 75 margin: 0 auto; 72 76 } 73 /* line 1 25, ../sass/mgft.pretty.form.scss */74 .pretty_form .gform_wrapper .gform_body .gsection_title {77 /* line 131, ../sass/mgft.pretty.form.scss */ 78 .pretty_form.default .gform_wrapper .gform_body .gsection_title { 75 79 text-align: center; 76 80 } 77 /* line 1 29, ../sass/mgft.pretty.form.scss */78 .pretty_form .gform_wrapper .gform_body .gsection_description {81 /* line 135, ../sass/mgft.pretty.form.scss */ 82 .pretty_form.default .gform_wrapper .gform_body .gsection_description { 79 83 padding: 0 0.5em; 80 84 font-style: italic; 81 85 } 82 /* line 1 36, ../sass/mgft.pretty.form.scss */83 .pretty_form .gform_wrapper .gform_body .gform_fields li.gfield {86 /* line 142, ../sass/mgft.pretty.form.scss */ 87 .pretty_form.default .gform_wrapper .gform_body .gform_fields li.gfield { 84 88 margin: 0; 85 89 } 86 /* line 1 39, ../sass/mgft.pretty.form.scss */87 .pretty_form .gform_wrapper .gform_body .gform_fields li.gfield label {90 /* line 145, ../sass/mgft.pretty.form.scss */ 91 .pretty_form.default .gform_wrapper .gform_body .gform_fields li.gfield label { 88 92 font-size: 0.8em; 89 93 line-height: 2.5em; … … 91 95 margin: 0 2px 0 10px; 92 96 } 93 /* line 1 49, ../sass/mgft.pretty.form.scss */94 .pretty_form .gform_wrapper .gform_body .clear-multi .ginput_container {97 /* line 155, ../sass/mgft.pretty.form.scss */ 98 .pretty_form.default .gform_wrapper .gform_body .clear-multi .ginput_container { 95 99 margin: 0 2px; 96 100 padding: 0; 97 101 } 98 /* line 1 55, ../sass/mgft.pretty.form.scss */99 .pretty_form .gform_wrapper .gform_body .gfield_html {102 /* line 161, ../sass/mgft.pretty.form.scss */ 103 .pretty_form.default .gform_wrapper .gform_body .gfield_html { 100 104 color: #999; 101 105 font-size: 11px; 102 106 text-align: center; 103 107 } 104 /* line 16 2, ../sass/mgft.pretty.form.scss */105 .pretty_form .gform_wrapper .gform_body .right_label input.medium, .pretty_form .gform_wrapper .gform_body .right_label select.medium, .pretty_form .gform_wrapper .gform_body .left_label input.medium, .pretty_form.gform_wrapper .gform_body .left_label select.medium {108 /* line 168, ../sass/mgft.pretty.form.scss */ 109 .pretty_form.default .gform_wrapper .gform_body .right_label input.medium, .pretty_form.default .gform_wrapper .gform_body .right_label select.medium, .pretty_form.default .gform_wrapper .gform_body .left_label input.medium, .pretty_form.default .gform_wrapper .gform_body .left_label select.medium { 106 110 width: 100%; 107 111 } 108 /* line 1 69, ../sass/mgft.pretty.form.scss */109 .pretty_form .gform_wrapper .gform_body ul .right_label li, .pretty_form.gform_wrapper .gform_body ul .left_label li {112 /* line 175, ../sass/mgft.pretty.form.scss */ 113 .pretty_form.default .gform_wrapper .gform_body ul .right_label li, .pretty_form.default .gform_wrapper .gform_body ul .left_label li { 110 114 margin-bottom: 0; 111 115 } 112 /* line 1 75, ../sass/mgft.pretty.form.scss */113 .pretty_form .gform_wrapper .gform_body .ginput_container {116 /* line 181, ../sass/mgft.pretty.form.scss */ 117 .pretty_form.default .gform_wrapper .gform_body .ginput_container { 114 118 margin: 10px; 115 119 padding: 0; 116 120 } 117 /* line 1 86, ../sass/mgft.pretty.form.scss */118 .pretty_form .gform_wrapper .gform_body input[type="text"], .pretty_form .gform_wrapper .gform_body input[type="url"], .pretty_form .gform_wrapper .gform_body input[type="email"], .pretty_form .gform_wrapper .gform_body input[type="tel"], .pretty_form .gform_wrapper .gform_body input[type="number"], .pretty_form.gform_wrapper .gform_body input[type="password"] {121 /* line 192, ../sass/mgft.pretty.form.scss */ 122 .pretty_form.default .gform_wrapper .gform_body input[type="text"], .pretty_form.default .gform_wrapper .gform_body input[type="url"], .pretty_form.default .gform_wrapper .gform_body input[type="email"], .pretty_form.default .gform_wrapper .gform_body input[type="tel"], .pretty_form.default .gform_wrapper .gform_body input[type="number"], .pretty_form.default .gform_wrapper .gform_body input[type="password"] { 119 123 letter-spacing: normal; 120 124 background: #FCFCFC; … … 143 147 padding: 0px 0 0 5px; 144 148 } 145 /* line 20 2, ../sass/mgft.pretty.form.scss */146 .pretty_form .gform_wrapper .gform_body .validation_error {149 /* line 208, ../sass/mgft.pretty.form.scss */ 150 .pretty_form.default .gform_wrapper .gform_body .validation_error { 147 151 display: none; 148 152 } 149 /* line 2 06, ../sass/mgft.pretty.form.scss */150 .pretty_form .gform_wrapper .gform_body .gfield_description.validation_message {153 /* line 212, ../sass/mgft.pretty.form.scss */ 154 .pretty_form.default .gform_wrapper .gform_body .gfield_description.validation_message { 151 155 padding: 0; 152 156 margin-left: 0; 153 157 } 154 /* line 21 3, ../sass/mgft.pretty.form.scss */155 .pretty_form .gform_wrapper .gform_page_footer {158 /* line 219, ../sass/mgft.pretty.form.scss */ 159 .pretty_form.default .gform_wrapper .gform_page_footer { 156 160 margin: 20px auto; 157 161 } 158 /* line 2 17, ../sass/mgft.pretty.form.scss */159 .pretty_form .gform_wrapper .gform_footer, .pretty_form.gform_wrapper .gform_page_footer {162 /* line 223, ../sass/mgft.pretty.form.scss */ 163 .pretty_form.default .gform_wrapper .gform_footer, .pretty_form.default .gform_wrapper .gform_page_footer { 160 164 height: 3em; 161 165 padding: 0.25em; … … 170 174 *zoom: 1; 171 175 filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#FFFFFFFF', endColorstr='#FFF6F6F6'); 176 background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iNTAlIiBzdG9wLWNvbG9yPSIjZjFmMWYxIi8+PHN0b3Agb2Zmc2V0PSI1MSUiIHN0b3AtY29sb3I9IiNlMWUxZTEiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNmNmY2ZjYiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2dyYWQpIiAvPjwvc3ZnPiA='); 177 background-size: 100%; 172 178 background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(50%, #f1f1f1), color-stop(51%, #e1e1e1), color-stop(100%, #f6f6f6)); 173 179 background-image: -webkit-linear-gradient(top, #ffffff 0%, #f1f1f1 50%, #e1e1e1 51%, #f6f6f6 100%); … … 176 182 background-image: linear-gradient(top, #ffffff 0%, #f1f1f1 50%, #e1e1e1 51%, #f6f6f6 100%); 177 183 } 178 /* line 2 25, ../sass/mgft.pretty.form.scss */179 .pretty_form .gform_wrapper .gform_footer .button, .pretty_form.gform_wrapper .gform_page_footer .button {184 /* line 231, ../sass/mgft.pretty.form.scss */ 185 .pretty_form.default .gform_wrapper .gform_footer .button, .pretty_form.default .gform_wrapper .gform_page_footer .button { 180 186 -webkit-border-radius: 3px; 181 187 -moz-border-radius: 3px; … … 202 208 background-image: linear-gradient(top, #ffb76b 0%, #ffa73d 50%, #ff7c00 51%, #ff7f04 100%); 203 209 } 204 /* line 23 0, ../sass/mgft.pretty.form.scss */205 .pretty_form .gform_wrapper .gform_footer input[type="submit"].button, .pretty_form.gform_wrapper .gform_page_footer input[type="submit"].button {210 /* line 236, ../sass/mgft.pretty.form.scss */ 211 .pretty_form.default .gform_wrapper .gform_footer input[type="submit"].button, .pretty_form.default .gform_wrapper .gform_page_footer input[type="submit"].button { 206 212 -webkit-border-radius: 3px; 207 213 -moz-border-radius: 3px; … … 241 247 background-image: linear-gradient(top, #9dd53a 0%, #a1d54f 50%, #80c217 51%, #7cbc0a 100%); 242 248 } 243 /* line 2 37, ../sass/mgft.pretty.form.scss */244 .pretty_form .gform_wrapper .gform_footer .button {249 /* line 243, ../sass/mgft.pretty.form.scss */ 250 .pretty_form.default .gform_wrapper .gform_footer .button { 245 251 width: 100%; 246 252 } 247 /* line 24 3, ../sass/mgft.pretty.form.scss */248 .pretty_form .gform_wrapper .gform_page_footer .button {253 /* line 249, ../sass/mgft.pretty.form.scss */ 254 .pretty_form.default .gform_wrapper .gform_page_footer .button { 249 255 width: 40%; 250 256 float: right; 251 257 } 252 /* line 2 46, ../sass/mgft.pretty.form.scss */253 .pretty_form .gform_wrapper .gform_page_footer .button.gform_button {258 /* line 252, ../sass/mgft.pretty.form.scss */ 259 .pretty_form.default .gform_wrapper .gform_page_footer .button.gform_button { 254 260 margin-right: auto; 255 261 } 256 /* line 25 0, ../sass/mgft.pretty.form.scss */257 .pretty_form .gform_wrapper .gform_page_footer .gform_previous_button {262 /* line 256, ../sass/mgft.pretty.form.scss */ 263 .pretty_form.default .gform_wrapper .gform_page_footer .gform_previous_button { 258 264 float: left; 259 265 } 260 266 261 /* line 26 0, ../sass/mgft.pretty.form.scss */267 /* line 267, ../sass/mgft.pretty.form.scss */ 262 268 .tooltipsy { 263 269 padding: 10px; … … 276 282 } 277 283 278 /* line 27 0, ../sass/mgft.pretty.form.scss */284 /* line 277, ../sass/mgft.pretty.form.scss */ 279 285 .tooltipsy::after { 280 286 content: ''; … … 287 293 } 288 294 289 /* line 28 0, ../sass/mgft.pretty.form.scss */295 /* line 287, ../sass/mgft.pretty.form.scss */ 290 296 .tooltipsy-error { 291 297 padding: 10px; … … 304 310 } 305 311 306 /* line 29 1, ../sass/mgft.pretty.form.scss */312 /* line 298, ../sass/mgft.pretty.form.scss */ 307 313 .tooltipsy-error::after { 308 314 content: ''; -
misamee-gravity-forms-tools/branches/1.4/js/mgft.pretty.form.js
r629022 r630196 1 1 // CLEAR FORM FIELDS OF LABEL ON FOCUS THEN ADD BACK ON BLUR IF EMPTY (class of 'clear_field' must be added to form field) // 2 (function () {3 // Your base, I'm in it!4 var originalAddClassMethod = jQuery.fn.addClass;5 6 jQuery.fn.addClass = function () {7 // Execute the original method.8 var result = originalAddClassMethod.apply(this, arguments);9 10 // call your function11 // this gets called everytime you use the addClass method12 jQuery(this).trigger('cssClassChanged'); 13 14 // return the original result15 return result;16 }17 })();2 //(function () { 3 // // Your base, I'm in it! 4 // var originalAddClassMethod = jQuery.fn.addClass; 5 // 6 // jQuery.fn.addClass = function () { 7 // // Execute the original method. 8 // var result = originalAddClassMethod.apply(this, arguments); 9 // 10 // // call your function 11 // // this gets called everytime you use the addClass method 12 // jQuery(this).trigger('cssClassChanged') 13 // 14 // // return the original result 15 // return result; 16 // } 17 //})(); 18 18 19 19 jQuery(document).ready(function ($) { 20 function prettify() { 21 if (!("placeholder" in document.createElement("input"))) { 22 $("input[placeholder], textarea[placeholder]").each(function () { 23 var val = $(this).attr("placeholder"); 24 if (this.value == "") { 25 this.value = val; 20 $templateMainElement = $('.pretty_form.default'); 21 if (!("placeholder" in document.createElement("input"))) { 22 $("input[placeholder], textarea[placeholder]", $templateMainElement).each(function () { 23 var val = $(this).attr("placeholder"); 24 if (this.value == "") { 25 this.value = val; 26 } 27 $(this).focus(function () { 28 if (this.value == val) { 29 this.value = ""; 26 30 } 27 $(this).focus(function () {28 if ( this.value == val) {29 this.value = "";31 }).blur(function () { 32 if ($.trim(this.value) == "") { 33 this.value = val; 30 34 } 31 }).blur(function () { 32 if ($.trim(this.value) == "") { 33 this.value = val; 34 } 35 }) 35 }) 36 }); 37 38 // Clear default placeholder values on form submit 39 $('form', $templateMainElement).submit(function () { 40 $(this).find("input[placeholder], textarea[placeholder]").each(function () { 41 if (this.value == $(this).attr("placeholder")) { 42 this.value = ""; 43 } 36 44 }); 37 // Clear default placeholder values on form submit38 $('form').submit(function () {39 $(this).find("input[placeholder], textarea[placeholder]").each(function () {40 if (this.value == $(this).attr("placeholder")) {41 this.value = "";42 }43 });44 });45 }46 $('.pretty_form').removeClass('gfield_error');47 $('.pretty_form .gfield').bind('cssClassChanged', function () {48 $(this).removeClass('gfield_error');49 });50 $('.pretty_form .gfield input').each(function () {51 if ($(this).attr('id') != '') {52 var $label = $('label[for="' + $(this).attr('id') + '"]');53 $label.hide();54 $(this).addClass('mgft_pretty_form_input')55 $(this).attr('placeholder', $label.text());56 }57 var $descElement = $(this).parent('.ginput_container').siblings('.gfield_description:not(".validation_message")');58 var $toolTip = $descElement.text();59 if ($toolTip != '') {60 $descElement.hide();61 $(this).tooltipsy({62 content: $toolTip,63 alignTo: 'element',64 offset: [-10, 10],65 show: function (e, $el) {66 $el.css({67 'left': parseInt($el[0].style.left.replace(/[a-z]/g, '')) - 50 + 'px',68 'opacity': '0.0',69 'display': 'block'70 }).animate({71 'left': parseInt($el[0].style.left.replace(/[a-z]/g, '')) + 50 + 'px',72 'opacity': '1.0'73 }, 300);74 },75 hide: function (e, $el) {76 $el.slideUp(100);77 }78 });79 }80 var $validationElement = $(this).parent('.ginput_container').siblings('.validation_message');81 var $validationToolTip = $validationElement.text();82 if ($validationToolTip != '') {83 $validationElement.hide();84 //$(this).data('tooltipsy').destroy();85 $(this).tooltipsy({86 content: $validationToolTip,87 alignTo: 'element',88 offset: [-10, 10],89 className: 'tooltipsy-error'90 });91 $(this).trigger('focus');92 $(this).trigger('mouseenter');93 } else {94 }95 45 }); 96 46 } 97 47 98 prettify(); 48 $($templateMainElement).removeClass('gfield_error'); 49 $('.gfield', $templateMainElement).bind('cssClassChanged', function () { 50 $(this).removeClass('gfield_error'); 51 }); 52 53 $('.gfield input', $templateMainElement).each(function () { 54 if ($(this).attr('id') != '') { 55 var $label = $('label[for="' + $(this).attr('id') + '"]'); 56 $label.hide(); 57 $(this).addClass('mgft_pretty_form_input') 58 $(this).attr('placeholder', $label.text()); 59 } 60 61 var $descElement = $(this).parent('.ginput_container').siblings('.gfield_description:not(".validation_message")'); 62 var $toolTip = $descElement.text(); 63 if ($toolTip != '') { 64 $descElement.hide(); 65 $(this).tooltipsy({ 66 content:$toolTip, 67 alignTo:'element', 68 offset:[-10, 10], 69 show:function (e, $el) { 70 $el.css({ 71 'left':parseInt($el[0].style.left.replace(/[a-z]/g, '')) - 50 + 'px', 72 'opacity':'0.0', 73 'display':'block' 74 }).animate({ 75 'left':parseInt($el[0].style.left.replace(/[a-z]/g, '')) + 50 + 'px', 76 'opacity':'1.0' 77 }, 300); 78 }, 79 hide:function (e, $el) { 80 $el.slideUp(100); 81 } 82 }); 83 } 84 85 var $validationElement = $(this).parent('.ginput_container').siblings('.validation_message'); 86 var $validationToolTip = $validationElement.text(); 87 if ($validationToolTip != '') { 88 $validationElement.hide(); 89 //$(this).data('tooltipsy').destroy(); 90 $(this).tooltipsy({ 91 content:$validationToolTip, 92 alignTo:'element', 93 offset:[-10, 10], 94 className: 'tooltipsy-error' 95 }); 96 $(this).trigger('focus'); 97 $(this).trigger('mouseenter'); 98 } else { 99 100 } 101 }); 99 102 }); -
misamee-gravity-forms-tools/branches/1.4/lib/mgft_pretty_form.php
r629029 r630196 1 1 <?php 2 2 if (!class_exists('mgft_pretty_form_widget')) { 3 require_once 'mgft_pretty_form_widget.php';3 require_once 'mgft_pretty_form_widget.php'; 4 4 } 5 5 6 6 class mgft_pretty_form 7 7 { 8 //Class Functions 9 public static function init() 10 { 11 $class = __CLASS__; 12 new $class; 13 } 14 15 /** 16 * PHP 5 Constructor 17 */ 18 public function __construct() 19 { 20 add_filter("gform_shortcode_prettify", array(&$this, "mgft_pretty_form_prettify"), 10, 3); 21 add_action('widgets_init', array(&$this, "mgft_pretty_form_register_widget")); 22 23 //register_widget('mgft_pretty_form_widget'); 24 } 25 26 function mgft_pretty_form_register_widget() 27 { 28 register_widget('mgft_pretty_form_widget'); 29 } 30 31 function mgft_pretty_form_prettify($string, $attributes, $content) 32 { 33 extract(shortcode_atts(array( 34 'title' => true, 35 'description' => true, 36 'id' => 0, 37 'name' => '', 38 'field_values' => "", 39 'ajax' => false, 40 'tabindex' => 1, 41 'action' => 'form', 42 'prettytemplate' => '', 43 'cssclass' => '' 44 ), $attributes)); 45 46 /** @var $prettytemplate string */ 47 /** @var $selectedTemplate string */ 48 $selectedTemplate = $prettytemplate; 49 50 /** @var $id int */ 51 $theme = $this->mgft_pretty_form_setTemplate($selectedTemplate, $id); 52 53 $additionalClasses = ''; 54 if ($theme['name'] != '') { 55 $additionalClasses = ' class="pretty_form'; 56 if ($theme['name'] != 'default') { 57 $additionalClasses .= ' ' . $theme['name']; 58 } 59 $additionalClasses .= '"'; 60 } 61 62 $attributes['action'] = 'form'; 63 64 $formString = RGForms::parse_shortcode($attributes, $content = null); 65 66 if ($additionalClasses != '') { 67 return "<div$additionalClasses>$formString</div>"; 68 } 69 return $formString; 70 } 71 72 private function mgft_pretty_form_setTemplate($themeName, $formId) 73 { 74 $theme = $this->mgft_pretty_form_getThemeByName($themeName); 75 //echo "<pre>"; 76 if (strtolower($theme['name']) != "none") { 77 if ($theme['name'] == 'default') { 78 wp_enqueue_style('mfgt-pretty-form-css', $theme['url'] . 'css/mgft.pretty.form.css'); 79 wp_enqueue_script('tooltipsy', $theme['url'] . 'js/tooltipsy.source.js', array('jquery')); 80 wp_enqueue_script('mfgt-pretty-form-js', $theme['url'] . 'js/mgft.pretty.form.js', array('jquery')); 81 } elseif (is_dir($theme['dir'])) { 82 //get all files in specified directory 83 $files = glob($theme['dir'] . "/*.*"); 84 85 foreach ($files as $file) { 86 $fileData = pathinfo($file); 87 switch ($fileData['extension']) { 88 case 'css': 89 wp_enqueue_style($fileData['filename'], $theme['url'] . $fileData['basename']); 90 //echo "wp_enqueue_style('$fileData[filename]', '$theme[url]$fileData[basename]')\n"; 91 break; 92 case 'js': 93 wp_enqueue_script($fileData['filename'], $theme['url'] . $fileData['basename']); 94 //echo "wp_enqueue_script('$fileData[filename]', '$theme[url]$fileData[basename]')\n"; 95 break; 96 case 'php': 97 include($theme['dir'] . '/' . $fileData['basename']); 98 //echo "include($theme[dir]/$fileData[basename])\n"; 99 break; 100 } 101 } 102 } 103 } 104 return $theme; 105 } 106 107 private function mgft_pretty_form_getThemeByName($themeName) 108 { 109 switch (strtolower($themeName)) { 110 case 'none': 111 $theme = 'None'; 112 $themeDir = ''; 113 break; 114 case 'default': 115 $theme = $themeName; 116 $themeDir = misamee_gf_tools::getPluginPath(); 117 $themeUrl = misamee_gf_tools::getPluginUrl(); 118 break; 119 default: 120 $themes = $this->mgft_pretty_form_themes(); 121 if (array_key_exists($themeName, $themes)) { 122 $theme = $themeName; 123 $themeDir = WP_CONTENT_DIR . $themes[$theme]['dir']; 124 $themeUrl = $themes[$theme]['url']; 125 } elseif ($themeName == 'Default') { 126 $theme = $themeName; 127 $themeDir = misamee_gf_tools::getPluginPath(); 128 $themeUrl = misamee_gf_tools::getPluginUrl(); 129 } 130 } 131 132 return array( 133 'name' => $theme, 134 'dir' => str_replace("\\", "/", $themeDir), 135 'url' => $themeUrl 136 ); 137 } 138 139 public static function mgft_pretty_form_themes() 140 { 141 $themes = array(); 142 if (is_dir(WP_CONTENT_DIR . '/mgft-themes')) { 143 //get all files in specified directory 144 $files = glob('{' . misamee_gf_tools::getPluginPath() . 'themes/*,' . WP_CONTENT_DIR . '/mgft-themes/*}', GLOB_ONLYDIR | GLOB_BRACE); 145 ksort($files, SORT_STRING); 8 //Class Functions 9 public static function init() 10 { 11 $class = __CLASS__; 12 new $class; 13 } 14 15 /** 16 * PHP 5 Constructor 17 */ 18 public function __construct() 19 { 20 add_filter("gform_shortcode_prettify", array(&$this, "mgft_pretty_form_prettify"), 10, 3); 21 add_action('widgets_init', array(&$this, "mgft_pretty_form_register_widget")); 22 } 23 24 function mgft_pretty_form_register_widget() 25 { 26 register_widget('mgft_pretty_form_widget'); 27 } 28 29 function mgft_pretty_form_prettify($string, $attributes, $content) 30 { 31 extract(shortcode_atts(array( 32 'title' => true, 33 'description' => true, 34 'id' => 0, 35 'name' => '', 36 'field_values' => "", 37 'ajax' => false, 38 'tabindex' => 1, 39 'action' => 'form', 40 'prettytemplate' => '', 41 'cssclass' => '' 42 ), $attributes)); 43 44 /** @var $prettytemplate string */ 45 /** @var $selectedTemplate string */ 46 $selectedTemplate = $prettytemplate; 47 48 /** @var $id int */ 49 $theme = $this->mgft_pretty_form_setTemplate($selectedTemplate, $id); 50 51 $additionalClasses = ($theme['name'] != '') ? " class=\"pretty_form $theme[name]\"" : ""; 52 53 //$newString = str_replace('action="prettify"', 'action="form"', $string); 54 55 $attributes['action'] = 'form'; 56 57 $formString = RGForms::parse_shortcode($attributes, $content = null); 58 //$formString = do_shortcode($newString); 59 60 if ($additionalClasses != '') { 61 return "<div$additionalClasses>$formString</div>"; 62 } 63 return $formString; 64 } 65 66 private function mgft_pretty_form_setTemplate($themeName, $formId) 67 { 68 $theme = $this->mgft_pretty_form_getThemeByName($themeName); 69 //echo "<pre>"; 70 if (strtolower($theme['name']) != "none") { 71 if ($theme['name'] == 'default') { 72 wp_enqueue_style('mfgt-pretty-form-css', $theme['url'] . 'css/mgft.pretty.form.css'); 73 wp_enqueue_script('tooltipsy', $theme['url'] . 'js/tooltipsy.source.js', array('jquery')); 74 wp_enqueue_script('mfgt-pretty-form-js', $theme['url'] . 'js/mgft.pretty.form.js', array('jquery')); 75 } elseif (is_dir($theme['dir'])) { 76 //get all files in specified directory 77 $files = glob($theme['dir'] . "/*.*"); 78 79 foreach ($files as $file) { 80 $fileData = pathinfo($file); 81 switch ($fileData['extension']) { 82 case 'css': 83 wp_enqueue_style($fileData['filename'], $theme['url'] . $fileData['basename']); 84 //echo "wp_enqueue_style('$fileData[filename]', '$theme[url]$fileData[basename]')\n"; 85 break; 86 case 'js': 87 wp_enqueue_script($fileData['filename'], $theme['url'] . $fileData['basename']); 88 //echo "wp_enqueue_script('$fileData[filename]', '$theme[url]$fileData[basename]')\n"; 89 break; 90 case 'php': 91 include($theme['dir'] . '/' . $fileData['basename']); 92 //echo "include($theme[dir]/$fileData[basename])\n"; 93 break; 94 } 95 } 96 } 97 } 98 return $theme; 99 } 100 101 private function mgft_pretty_form_getThemeByName($themeName) 102 { 103 switch (strtolower($themeName)) { 104 case 'none': 105 $theme = 'None'; 106 $themeDir = ''; 107 break; 108 case 'default': 109 $theme = $themeName; 110 $themeDir = misamee_gf_tools::getPluginPath(); 111 $themeUrl = misamee_gf_tools::getPluginUrl(); 112 break; 113 default: 114 $themes = $this->mgft_pretty_form_themes(); 115 if (array_key_exists($themeName, $themes)) { 116 $theme = $themeName; 117 $themeDir = WP_CONTENT_DIR . $themes[$theme]['dir']; 118 $themeUrl = $themes[$theme]['url']; 119 } elseif ($themeName == 'Default') { 120 $theme = $themeName; 121 $themeDir = misamee_gf_tools::getPluginPath(); 122 $themeUrl = misamee_gf_tools::getPluginUrl(); 123 } 124 } 125 126 return array( 127 'name' => $theme, 128 'dir' => str_replace("\\", "/", $themeDir), 129 'url' => $themeUrl 130 ); 131 } 132 133 public static function mgft_pretty_form_themes() 134 { 135 $themes = array(); 136 if (is_dir(WP_CONTENT_DIR . '/mgft-themes')) { 137 //get all files in specified directory 138 $files = glob(WP_CONTENT_DIR . '/mgft-themes/*', GLOB_ONLYDIR); 139 ksort($files, SORT_STRING); 146 140 // echo '<pre>'; 147 141 // echo '{' . misamee_gf_tools::getPluginPath() . 'themes/*,' . WP_CONTENT_DIR . '/mgft-themes/*}' . "\n"; 148 142 // print_r($files); 149 143 // echo '</pre>'; 150 $themes['none'] = array( 151 'dir' => '', 152 'url' => '' 153 ); 154 $themes['default'] = array( 155 'dir' => '', 156 'url' => '' 157 ); 158 159 if (is_array($files) && count($files) > 0) { 160 foreach ($files as $file) { 161 if (is_dir($file)) { 162 $themePath = substr($file, strlen(WP_CONTENT_DIR)); 163 $folderArray = explode('/', $themePath); 164 //print_r($folderArray); 165 $themeName = $folderArray[count($folderArray) - 1]; 166 $themeUrl = WP_CONTENT_URL . '/mgft-themes/' . $themeName . "/"; 167 $themes[$themeName] = array( 168 'dir' => $themePath, 169 'url' => $themeUrl 170 ); 171 } 172 } 173 } 174 } 175 return $themes; 176 } 144 $themes['none'] = array( 145 'dir' => '', 146 'url' => '' 147 ); 148 $themes['default'] = array( 149 'dir' => '', 150 'url' => '' 151 ); 152 153 if (is_array($files) && count($files) > 0) { 154 foreach ($files as $file) { 155 if (is_dir($file)) { 156 $themePath = substr($file, strlen(WP_CONTENT_DIR)); 157 $folderArray = explode('/', $themePath); 158 //print_r($folderArray); 159 $themeName = $folderArray[count($folderArray) - 1]; 160 $themeUrl = WP_CONTENT_URL . '/mgft-themes/' . $themeName . "/"; 161 $themes[$themeName] = array( 162 'dir' => $themePath, 163 'url' => $themeUrl 164 ); 165 } 166 } 167 } 168 } 169 if (is_dir(misamee_gf_tools::getPluginPath() . 'themes')) { 170 //get all files in specified directory 171 $files = glob(misamee_gf_tools::getPluginPath() . 'themes/*', GLOB_ONLYDIR); 172 ksort($files, SORT_STRING); 173 // echo '<pre>'; 174 // echo '{' . misamee_gf_tools::getPluginPath() . 'themes/*,' . WP_CONTENT_DIR . '/mgft-themes/*}' . "\n"; 175 // print_r($files); 176 // echo '</pre>'; 177 $themes['none'] = array( 178 'dir' => '', 179 'url' => '' 180 ); 181 $themes['default'] = array( 182 'dir' => '', 183 'url' => '' 184 ); 185 186 if (is_array($files) && count($files) > 0) { 187 foreach ($files as $file) { 188 if (is_dir($file)) { 189 $themePath = substr($file, strlen(WP_CONTENT_DIR)); 190 $folderArray = explode('/', $themePath); 191 //print_r($folderArray); 192 $themeName = $folderArray[count($folderArray) - 1]; 193 $themeUrl = misamee_gf_tools::getPluginUrl() . 'themes/' . $themeName . "/"; 194 $themes[$themeName] = array( 195 'dir' => $themePath, 196 'url' => $themeUrl 197 ); 198 } 199 } 200 } 201 } 202 return $themes; 203 } 177 204 178 205 } -
misamee-gravity-forms-tools/branches/1.4/lib/mgft_pretty_form_widget.php
r629022 r630196 1 1 <?php 2 2 if (!class_exists("mgft_pretty_form_widget") && class_exists("GFWidget")) { 3 class mgft_pretty_form_widget extends GFWidget 4 { 3 class mgft_pretty_form_widget extends GFWidget 4 { 5 function mgft_pretty_form_widget() 6 { 7 $this->WP_Widget('mgft_pretty_form_widget', 'Pretty Form', 8 array('classname' => 'mgft_pretty_form_widget', 9 'description' => __('Gravity (Pretty) Forms Widget', misamee_gf_tools::$localizationDomain)), 10 array('width' => 200, 11 'height' => 250, 12 'id_base' => 'mgft_pretty_form_widget') 13 ); 14 } 5 15 6 function mgft_pretty_form_widget() 7 { 8 $this->WP_Widget('mgft_pretty_form_widget', 'Pretty Form', 9 array('classname' => 'mgft_pretty_form_widget', 10 'description' => __('Gravity (Pretty) Forms Widget', misamee_gf_tools::$localizationDomain)), 11 array('width' => 200, 12 'height' => 250, 13 'id_base' => 'mgft_pretty_form_widget') 14 ); 15 } 16 function widget($args, $instance) 17 { 18 /** @var $before_widget string */ 19 /** @var $before_title string */ 20 /** @var $after_title string */ 21 /** @var $after_widget string */ 16 22 17 function widget($args, $instance) 18 { 19 /** @var $before_widget string */ 20 /** @var $before_title string */ 21 /** @var $after_title string */ 22 /** @var $after_widget string */ 23 extract($args); 24 echo $before_widget; 25 $title = apply_filters('widget_title', $instance['title']); 23 26 24 extract($args); 25 echo $before_widget; 26 $title = apply_filters('widget_title', $instance['title']); 27 if ($title) 28 echo $before_title . $title . $after_title; 27 29 28 if ($title) 29 echo $before_title . $title . $after_title; 30 //setting tabindex based on configured value 31 if (is_numeric($instance['tabindex'])) { 32 add_filter("mgft_pretty_form_tabindex_{$instance['form_id']}", create_function("", "return {$instance['tabindex']};")); 33 } 30 34 31 //setting tabindex based on configured value 32 if (is_numeric($instance['tabindex'])) { 33 add_filter("mgft_pretty_form_tabindex_{$instance['form_id']}", create_function("", "return {$instance['tabindex']};")); 34 } 35 $form = RGFormsModel::get_form_meta($instance['form_id']); 35 36 36 $form = RGFormsModel::get_form_meta($instance['form_id']); 37 $attributes = array( 38 'title' => $instance['showtitle'] ? $form['title'] : '', 39 'description' => $instance['showtitle'] ? $form['description'] : '', 40 'id' => $instance['form_id'], 41 'ajax' => ($instance['ajax'] == 1), 42 'tabindex' => $instance['tabindex'], 43 'action' => 'prettify', 44 'prettytemplate' => $instance['pretty_template'] 45 ); 37 46 38 $attributes = array( 39 'title' => $instance['showtitle'] ? $form['title'] : '', 40 'description' => $instance['showtitle'] ? $form['description'] : '', 41 'id' => $instance['form_id'], 42 'ajax' => ($instance['ajax'] == 1), 43 'tabindex' => $instance['tabindex'], 44 'action' => 'prettify', 45 'prettytemplate' => $instance['pretty_template'] 46 ); 47 /* echo '<pre>'; 48 print_r($attributes); 49 echo '</pre>';*/ 50 $form_markup = str_replace("\\\"", "\"", RGForms::parse_shortcode($attributes)); 47 51 48 /* echo '<pre>'; 49 print_r($attributes);50 echo '</pre>';*/ 51 $form_markup = RGForms::parse_shortcode($attributes); 52 //display form 53 echo $form_markup; 54 echo $after_widget; 55 } 52 56 53 //display form 54 echo $form_markup; 55 echo $after_widget; 56 } 57 function update($new_instance, $old_instance) 58 { 59 $instance = $old_instance; 60 $instance["title"] = strip_tags($new_instance["title"]); 61 $instance["form_id"] = $new_instance["form_id"]; 62 $instance["showtitle"] = $new_instance["showtitle"]; 63 $instance["ajax"] = $new_instance["ajax"]; 64 $instance["disable_scripts"] = $new_instance["disable_scripts"]; 65 $instance["showdescription"] = $new_instance["showdescription"]; 66 $instance["tabindex"] = $new_instance["tabindex"]; 67 $instance["pretty_template"] = $new_instance["pretty_template"]; 57 68 58 function update($new_instance, $old_instance) 59 { 60 $instance = $old_instance; 61 $instance["title"] = strip_tags($new_instance["title"]); 62 $instance["form_id"] = $new_instance["form_id"]; 63 $instance["showtitle"] = $new_instance["showtitle"]; 64 $instance["ajax"] = $new_instance["ajax"]; 65 $instance["disable_scripts"] = $new_instance["disable_scripts"]; 66 $instance["showdescription"] = $new_instance["showdescription"]; 67 $instance["tabindex"] = $new_instance["tabindex"]; 68 $instance["pretty_template"] = $new_instance["pretty_template"]; 69 return $instance; 70 } 69 71 70 return $instance; 71 } 72 function form($instance) 73 { 72 74 73 function form($instance) 74 { 75 76 $instance = wp_parse_args((array)$instance, array('title' => __("Contact Us", misamee_gf_tools::$localizationDomain), 'tabindex' => '1')); 77 ?> 75 $instance = wp_parse_args((array)$instance, array('title' => __("Contact Us", misamee_gf_tools::$localizationDomain), 'tabindex' => '1')); 76 ?> 78 77 <p> 79 78 <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e("Title", misamee_gf_tools::$localizationDomain); ?>:</label> … … 83 82 <label for="<?php echo $this->get_field_id('form_id'); ?>"><?php _e("Select a Form", misamee_gf_tools::$localizationDomain); ?>:</label> 84 83 <select id="<?php echo $this->get_field_id('form_id'); ?>" name="<?php echo $this->get_field_name('form_id'); ?>" style="width:90%;"> 85 <?php86 $forms = RGFormsModel::get_forms(1, "title");87 foreach ($forms as $form) {88 $selected = '';89 if ($form->id == rgar($instance, 'form_id'))90 $selected = ' selected="selected"';91 echo '<option value="' . $form->id . '" ' . $selected . '>' . $form->title . '</option>';92 }93 ?>84 <?php 85 $forms = RGFormsModel::get_forms(1, "title"); 86 foreach ($forms as $form) { 87 $selected = ''; 88 if ($form->id == rgar($instance, 'form_id')) 89 $selected = ' selected="selected"'; 90 echo '<option value="' . $form->id . '" ' . $selected . '>' . $form->title . '</option>'; 91 } 92 ?> 94 93 </select> 95 94 </p> … … 97 96 <label for="<?php echo $this->get_field_id('pretty_template'); ?>"><?php _e("Select a Template", misamee_gf_tools::$localizationDomain); ?>:</label> 98 97 <select id="<?php echo $this->get_field_id('pretty_template'); ?>" name="<?php echo $this->get_field_name('pretty_template'); ?>" style="width:90%;"> 99 <?php100 $templates = mgft_pretty_form::mgft_pretty_form_themes();101 foreach ($templates as $name => $templateData) {102 $selected = '';103 if ($name == rgar($instance, 'pretty_template'))104 $selected = ' selected="selected"';105 echo '<option value="' . $name . '" ' . $selected . '>' . $name . '</option>';106 }107 ?>98 <?php 99 $templates = mgft_pretty_form::mgft_pretty_form_themes(); 100 foreach ($templates as $name => $templateData) { 101 $selected = ''; 102 if ($name == rgar($instance, 'pretty_template')) 103 $selected = ' selected="selected"'; 104 echo '<option value="' . $name . '" ' . $selected . '>' . $name . '</option>'; 105 } 106 ?> 108 107 </select> 109 108 </p> 110 109 <p> 111 <input type="checkbox" name="<?php echo $this->get_field_name('showtitle'); ?>" id="<?php echo $this->get_field_id('showtitle'); ?>" <?php checked(rgar($instance, 'showtitle')); ?> value="1"/> <label for="<?php echo $this->get_field_id('showtitle'); ?>"><?php _e("Display form title", misamee_gf_tools::$localizationDomain); ?></label><br/> 112 <input type="checkbox" name="<?php echo $this->get_field_name('showdescription'); ?>" id="<?php echo $this->get_field_id('showdescription'); ?>" <?php checked(rgar($instance, 'showdescription')); ?> value="1"/> <label for="<?php echo $this->get_field_id('showdescription'); ?>"><?php _e("Display form description", misamee_gf_tools::$localizationDomain); ?></label><br/> 110 <input type="checkbox" name="<?php echo $this->get_field_name('showtitle'); ?>" id="<?php echo $this->get_field_id('showtitle'); ?>" <?php checked(rgar($instance, 'showtitle')); ?> value="1"/> <label 111 for="<?php echo $this->get_field_id('showtitle'); ?>"><?php _e("Display form title", misamee_gf_tools::$localizationDomain); ?></label><br/> 112 <input type="checkbox" name="<?php echo $this->get_field_name('showdescription'); ?>" id="<?php echo $this->get_field_id('showdescription'); ?>" <?php checked(rgar($instance, 'showdescription')); ?> value="1"/> <label 113 for="<?php echo $this->get_field_id('showdescription'); ?>"><?php _e("Display form description", misamee_gf_tools::$localizationDomain); ?></label><br/> 113 114 </p> 114 115 <p> … … 116 117 </p> 117 118 <p class="gf_widget_advanced" style="display:none;"> 118 <input type="checkbox" name="<?php echo $this->get_field_name('ajax'); ?>" id="<?php echo $this->get_field_id('ajax'); ?>" <?php checked(rgar($instance, 'ajax')); ?> value="1"/> <label for="<?php echo $this->get_field_id('ajax'); ?>"><?php _e("Enable AJAX", misamee_gf_tools::$localizationDomain); ?></label><br/> 119 <input type="checkbox" name="<?php echo $this->get_field_name('disable_scripts'); ?>" id="<?php echo $this->get_field_id('disable_scripts'); ?>" <?php checked(rgar($instance, 'disable_scripts')); ?> value="1"/> <label for="<?php echo $this->get_field_id('disable_scripts'); ?>"><?php _e("Disable script output", misamee_gf_tools::$localizationDomain); ?></label><br/> 119 <input type="checkbox" name="<?php echo $this->get_field_name('ajax'); ?>" id="<?php echo $this->get_field_id('ajax'); ?>" <?php checked(rgar($instance, 'ajax')); ?> value="1"/> <label 120 for="<?php echo $this->get_field_id('ajax'); ?>"><?php _e("Enable AJAX", misamee_gf_tools::$localizationDomain); ?></label><br/> 121 <input type="checkbox" name="<?php echo $this->get_field_name('disable_scripts'); ?>" id="<?php echo $this->get_field_id('disable_scripts'); ?>" <?php checked(rgar($instance, 'disable_scripts')); ?> value="1"/> <label 122 for="<?php echo $this->get_field_id('disable_scripts'); ?>"><?php _e("Disable script output", misamee_gf_tools::$localizationDomain); ?></label><br/> 120 123 <label for="<?php echo $this->get_field_id('tabindex'); ?>"><?php _e("Tab Index Start", misamee_gf_tools::$localizationDomain); ?>: </label> 121 124 <input id="<?php echo $this->get_field_id('tabindex'); ?>" name="<?php echo $this->get_field_name('tabindex'); ?>" value="<?php echo rgar($instance, 'tabindex'); ?>" style="width:15%;"/><br/> … … 123 126 </p> 124 127 125 <?php126 }127 }128 <?php 129 } 130 } 128 131 } 129 132 -
misamee-gravity-forms-tools/branches/1.4/misamee-gf-tools.php
r628182 r630196 4 4 Plugin URI: http://misamee.com/2012/10/misamee-gravity-forms-tools/ 5 5 Description: Add a shortcode that sums data frm Gravity Forms entries, showing the result as a value, percentage or progressbar. 6 Version: 1. 3.16 Version: 1.4 7 7 Author: Misamee 8 8 Author URI: http://misamee.com/ … … 148 148 } 149 149 150 p rivatefunction gravityFormsIsMissing()150 public function gravityFormsIsMissing() 151 151 { 152 152 misamee_tools::showMessage("You must have Gravity Forms installed in order to use this plugin.", true); -
misamee-gravity-forms-tools/branches/1.4/readme.txt
r622502 r630196 2 2 Contributors: sciamannikoo, cmwwebfx 3 3 Donate link: http://misamee.com/donate/ 4 Tags: gravity forms, formula, grandtotal, gravity-forms, shortcode, formula, expression, calculation, progressbar, progress-bar 4 Tags: gravity forms, formula, grandtotal, gravity-forms, shortcode, formula, expression, calculation, progressbar, progress-bar, theme, customization, template 5 5 Requires at least: 3.3 6 6 Tested up to: 3.4 … … 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 10 11 Add a shortcode that sums data frm Gravity Forms entries, showing the result as a value, percentage or progressbar.11 Add grand totals, progress bars and custom templates to Gravity Forms 12 12 13 13 == Description == … … 24 24 25 25 * [More details](http://misamee.com/2012/10/misamee-gravity-forms-tools/) 26 * [Live demo](http://misamee.com/2012/10/misamee-gravity-forms-tools-live-examples/) 26 * [Grand Total and Progress Bar examples](http://misamee.com/2012/10/misamee-gravity-forms-tools-live-examples/) 27 * [Pretty Form examples](http://misamee.com/2012/10/misamee-gravity-forms-tools-pretty-form-examples/) 27 28 28 29 == Installation == … … 58 59 == Changelog == 59 60 60 = 1.3.1 = 61 * Added some more styling to the wizard editor 61 = 1.4 = 62 * New shortcode attribute for the standard Gravity Forms shortcode (see [Pretty Form examples](http://misamee.com/2012/10/misamee-gravity-forms-tools-pretty-form-examples/) ) 63 * General code improvements 64 65 = 1.3.1 = 66 * Added some more styling to the wizard editor 62 67 * More code refactoring 63 68 * New screenshots … … 97 102 == Upgrade Notice == 98 103 104 = 1.4 = 105 This update add new features and some general code improvement. 106 99 107 = 1.3.1 = 100 108 This update doesn't provide any additional feature, only some makeup, and improved quality code. -
misamee-gravity-forms-tools/branches/1.4/sass/mgft.pretty.form.scss
r629029 r630196 14 14 border-bottom: 1px solid #EEEEEE; 15 15 16 $experimental-support-for-svg: true; 16 17 background-color: rgb(249, 252, 247); 17 18 @include filter-gradient(#f9fcf7, #f5f9f0, vertical); … … 25 26 26 27 @mixin form-body { 28 $experimental-support-for-svg: true; 27 29 background-color: rgb(255, 255, 255); 28 30 @include filter-gradient(#ffffff, #e5e5e5, vertical); … … 51 53 @mixin form-footer { 52 54 @include border-radius(0 0 7px 7px); 55 $experimental-support-for-svg: true; 53 56 background-color: rgb(255, 255, 255); 54 57 @include filter-gradient(#ffffff, #f6f6f6, vertical); … … 57 60 58 61 @mixin form-buttons { 59 $experimental-support-for-svg: true;60 62 @include border-radius(3px); 61 63 border: 1px solid #769800; … … 70 72 71 73 @mixin form-buttons-normal { 74 $experimental-support-for-svg: true; 72 75 background-color: rgb(255, 183, 107); 73 76 @include filter-gradient(#ffb76b, #ff7f04, vertical); … … 77 80 @mixin form-buttons-submit { 78 81 @include form-buttons; 82 $experimental-support-for-svg: true; 79 83 background-color: rgb(157, 213, 58); 80 84 @include filter-gradient(#9dd53a, #7cbc0a, vertical); … … 83 87 84 88 // Everything else... 85 .pretty_form {89 .pretty_form.default { 86 90 87 91 .gform_wrapper { -
misamee-gravity-forms-tools/branches/1.4/themes/autumn
-
Property
svn:ignore
set to
.sass-cache
-
Property
svn:ignore
set to
-
misamee-gravity-forms-tools/branches/1.4/themes/autumn/functions.php
r629029 r630196 4 4 //$theme['name'] 5 5 6 wp_enqueue_style( 'mfgt-pretty-form-css', $theme['url'] . 'css/mgft.pretty.form.css');7 wp_enqueue_script('tooltipsy', $theme['url'] . 'js/tooltipsy.min.js', array('jquery'));8 wp_enqueue_script( 'mfgt-pretty-form-js', $theme['url'] . 'js/mgft.pretty.form.js', array('jquery'));6 wp_enqueue_style("mfgt-pretty-form-$theme[name]", "$theme[url]css/mgft.pretty.form.$theme[name].css"); 7 wp_enqueue_script('tooltipsy', "$theme[url]js/tooltipsy.min.js", array('jquery')); 8 wp_enqueue_script("mfgt-pretty-form-$theme[name]-js", "$theme[url]js/mgft.pretty.form.$theme[name].js", array('jquery')); 9 9 ?> -
misamee-gravity-forms-tools/branches/1.4/themes/autumn/sass/mgft.pretty.form.autumn.scss
r629109 r630196 3 3 @import "compass/css3/border-radius"; 4 4 @import "compass/css3/box-shadow"; 5 @import "compass/css3/transform"; 5 6 6 7 // Colors, borders, and typografy 7 8 @mixin form-wrapper { 8 9 background: #FFF; 9 10 @include border-radius(7px);11 @include box-shadow(0px 1px 3px 0px rgba(0, 0, 0, 0.2));12 13 10 background-color: rgba(109, 0, 25, 1); 14 11 } … … 19 16 background-color: rgb(169, 3, 41); 20 17 @include filter-gradient(#a90329, #6d0019, vertical); 21 @include background-image(linear-gradient(top, rgba(169, 3, 41, 1) 0%, rgba(143, 2, 34, 1) 44%, rgba(109, 0, 25, 1) 100%)); 22 23 @include border-radius(7px 7px 0 0); 18 @include background(linear-gradient(top, rgba(169, 3, 41, 1) 0%, rgba(143, 2, 34, 1) 44%, rgba(109, 0, 25, 1) 100%)); 19 24 20 @include box-shadow(inset 0px 1px 0px 0px #FFFFFF); 25 21 … … 31 27 $experimental-support-for-svg: true; 32 28 background-color: rgb(234, 239, 181); 33 // Old browsers34 29 @include filter-gradient(#eaefb5, #e1e9a0, vertical); 35 // IE6-9 36 @include background-image(linear-gradient(top, rgba(234, 239, 181, 1) 0%, rgba(225, 233, 160, 1) 100%)); 30 @include background(linear-gradient(top, rgba(234, 239, 181, 1) 0%, rgba(225, 233, 160, 1) 100%)); 37 31 } 38 32 … … 59 53 background-color: rgb(98, 125, 77); 60 54 @include filter-gradient(#627d4d, #1f3b08, vertical); 61 @include background -image(linear-gradient(top, rgba(98, 125, 77, 1) 0%, rgba(31, 59, 8, 1) 100%));55 @include background(linear-gradient(top, rgba(98, 125, 77, 1) 0%, rgba(31, 59, 8, 1) 100%)); 62 56 } 63 57 … … 77 71 background-color: rgb(255, 183, 107); 78 72 @include filter-gradient(#ffb76b, #ff7f04, vertical); 79 @include background -image(linear-gradient(top, rgba(255, 183, 107, 1) 0%, rgba(255, 167, 61, 1) 50%, rgba(255, 124, 0, 0) 51%, rgba(255, 127, 4, 0) 100%));73 @include background(linear-gradient(top, rgba(255, 183, 107, 1) 0%, rgba(255, 167, 61, 1) 50%, rgba(255, 124, 0, 0) 51%, rgba(255, 127, 4, 0) 100%)); 80 74 } 81 75 … … 87 81 background-color: transparent; 88 82 @include filter-gradient(#9dd53a, #00baba, horizontal); 89 @include background -image(radial-gradient(center, ellipse contain, rgba(157, 213, 58, 1) 0%, rgba(157, 213, 58, 0) 100%));83 @include background(radial-gradient(center, ellipse contain, rgba(157, 213, 58, 1) 0%, rgba(157, 213, 58, 0) 100%)); 90 84 } 91 85 92 86 // Everything else... 93 87 .pretty_form.autumn { 94 95 .gform_wrapper { 88 z-index: 0; 89 position: relative; 90 margin: 0 0 15px 0; 91 92 &::before, &::after { 93 z-index: -1; 94 position: absolute; 95 content: ""; 96 bottom: 15px; 97 width: 50%; 98 top: 80%; 99 max-width: 300px; 100 background: rgba(0, 0, 0, 0.7); 101 @include box-shadow(0 15px 10px rgba(0, 0, 0, 0.7)); 102 } 103 104 &::before { 105 @include transform(rotate(-3deg)); 106 left: 10px; 107 } 108 109 &::after { 110 @include transform(rotate(3deg)); 111 right: 10px; 112 } 113 114 .pretty_form_wrapper { 96 115 @include form-wrapper; 97 116 98 margin: 0;99 117 max-width: 100%; 100 118
Note: See TracChangeset
for help on using the changeset viewer.