Permalink
Browse files

v1.24.2

  • Loading branch information...
1 parent d55ede5 commit 3fa683c096aec4558a8c4cfae42b3777fe4192ed @kevinchappell committed Oct 24, 2016
View
@@ -1,5 +1,6 @@
# Changelog
+- v1.24.2 - Hotfix: typeUserEvents, attribute array converted to comma separated list [#297](https://github.com/kevinchappell/formBuilder/pull/297)
- v1.24.1 - Bugfix: defaultFields names are overwritten [#295](https://github.com/kevinchappell/formBuilder/pull/295)
- v1.24.0 - Hotfix and Feature bonanza [#293](https://github.com/kevinchappell/formBuilder/pull/293)
- v1.23.1 - Hotfix: deleteId undefined [#291](https://github.com/kevinchappell/formBuilder/pull/291)
View
@@ -1,4 +1,4 @@
-formBuilder v1.24.1
+formBuilder v1.24.2
===========
[![Join the chat at https://gitter.im/kevinchappell/formBuilder](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/kevinchappell/formBuilder?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
View
@@ -1,6 +1,6 @@
{
"name": "formBuilder",
- "version": "1.24.1",
+ "version": "1.24.2",
"main": "dist/form-builder.js",
"description": "A jQuery plugin for drag and drop form building",
"authors": [
Oops, something went wrong.
@@ -1,6 +1,6 @@
/*
formBuilder - https://formbuilder.online/
-Version: 1.24.1
+Version: 1.24.2
Author: Kevin Chappell <kevin.b.chappell@gmail.com>
*/
.kc-toggle{position:relative;margin:4px 0 0 2px;width:60px;height:21px;border-radius:3px;cursor:pointer;overflow:hidden;display:inline-block;background:#e9e9e9;border:1px solid #cbcbcb;vertical-align:bottom;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.kc-toggle .kct-inner{position:absolute;top:0;left:-28px;width:115px;height:100%;-webkit-transition:left 150ms ease;transition:left 150ms ease}.kc-toggle.on .kct-inner{background:#e2e2e2;background:-webkit-linear-gradient(top,#e2e2e2 0,#fff 100%);background:linear-gradient(to bottom,#e2e2e2 0,#fff 100%);left:0}.kc-toggle input{display:none;position:absolute;z-index:-1;opacity:0;margin:0;padding:0;width:100%;height:100%}.kc-toggle .kct-on{color:#12a912}.kct-off{color:#666}.kct-handle,.kct-off,.kct-on{width:28px;height:100%;font-family:Arial,Tahoma,sans-serif;font-size:12px;text-align:center;line-height:22px;font-weight:700;float:left}.kct-off,.kct-on{position:relative}.kct-handle{position:relative;height:17px;background:#fff;background:-webkit-linear-gradient(top,#fff 0,#cecece 100%);background:linear-gradient(to bottom,#fff 0,#cecece 100%);border:1px solid #999;font-weight:100;color:#4b4b4b;text-shadow:none;border-radius:3px;margin:1px}.rendered-form .btn,.rendered-form .btn.active,.rendered-form .btn.btn-active,.rendered-form .btn:active,.rendered-form .form-control{background-image:none}.rendered-form *{box-sizing:border-box}.rendered-form button,.rendered-form input,.rendered-form optgroup,.rendered-form select,.rendered-form textarea{margin:0;font:inherit;color:inherit}.rendered-form textarea{overflow:auto}.rendered-form button,.rendered-form input,.rendered-form select,.rendered-form textarea{font-family:inherit;font-size:inherit;line-height:inherit}.rendered-form .btn-group{position:relative;display:inline-block;vertical-align:middle}.rendered-form .btn-group>.btn{position:relative;float:left}.rendered-form .btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.rendered-form .btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.rendered-form .btn-group .btn+.btn,.rendered-form .btn-group .btn+.btn-group,.rendered-form .btn-group .btn-group+.btn,.rendered-form .btn-group .btn-group+.btn-group{margin-left:-1px}.rendered-form .btn-group .input-group .form-control:last-child,.rendered-form .btn-group .input-group-addon:last-child,.rendered-form .btn-group .input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.rendered-form .btn-group .input-group-btn:first-child>.btn:not(:first-child),.rendered-form .btn-group .input-group-btn:last-child>.btn,.rendered-form .btn-group .input-group-btn:last-child>.btn-group>.btn,.rendered-form .btn-group .input-group-btn:last-child>.dropdown-toggle,.rendered-form .btn-group>.btn:last-child:not(:first-child),.rendered-form .btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.rendered-form .btn-group>.btn.active,.rendered-form .btn-group>.btn:active,.rendered-form .btn-group>.btn:focus,.rendered-form .btn-group>.btn:hover{z-index:2}.rendered-form .btn{color:#fff;display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid transparent;border-radius:4px}.rendered-form .btn.btn-default{color:#333;background-color:#fff;border-color:#ccc}.rendered-form .btn.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.rendered-form .btn.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.rendered-form .btn.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.rendered-form .btn-primary{background-color:#337ab7;border-color:#2e6da4}.rendered-form .btn-primary.active,.rendered-form .btn-primary.btn-active,.rendered-form .btn-primary:active,.rendered-form .btn-primary:hover{background-color:#286090;border-color:#204d74}.rendered-form .btn-danger{background-color:#d9534f;border-color:#d43f3a}.rendered-form .btn-danger:hover{background-color:#c9302c;border-color:#ac2925}.rendered-form .btn-default{background-color:#fff;border-color:#ccc}.rendered-form .btn-success{background-color:#5cb85c;border-color:#4cae4c}.rendered-form .btn-success:hover{background-color:#449d44;border-color:#398439}.rendered-form .btn-info{background-color:#5bc0de;border-color:#46b8da}.rendered-form .btn-info:hover{background-color:#31b0d5;border-color:#269abc}.rendered-form .btn-warning{background-color:#f0ad4e;border-color:#eea236}.rendered-form .btn-warning:hover{background-color:#ec971f;border-color:#d58512}.rendered-form .input-group .form-control:last-child,.rendered-form .input-group-addon:last-child,.rendered-form .input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.rendered-form .input-group-btn:first-child>.btn:not(:first-child),.rendered-form .input-group-btn:last-child>.btn,.rendered-form .input-group-btn:last-child>.btn-group>.btn,.rendered-form .input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.rendered-form .input-group .form-control,.rendered-form .input-group-addon,.rendered-form .input-group-btn{display:table-cell}.rendered-form .input-group-lg>.form-control,.rendered-form .input-group-lg>.input-group-addon,.rendered-form .input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.rendered-form .input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.rendered-form .input-group{position:relative;display:table;border-collapse:separate}.rendered-form .form-control,.rendered-form output{display:block;font-size:14px;line-height:1.42857143;color:#555}.rendered-form textarea.form-control{height:auto}.rendered-form .form-control{height:34px;width:100%;padding:6px 12px;background-color:#fff;border:1px solid #ccc;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.rendered-form .form-control:focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.rendered-form .form-group{margin-bottom:15px}.rendered-form .pull-right{float:right!important}.rendered-form .pull-left{float:left!important}.form-group .required{color:#C10000}.form-control.number{width:auto}[tooltip]{position:relative}[tooltip]:hover:after{background:#262626;background:rgba(0,0,0,.9);border-radius:5px 5px 5px 0;bottom:23px;color:#fff;content:attr(tooltip);padding:10px 5px;position:absolute;z-index:98;left:2px;width:230px;text-shadow:none;font-size:12px;line-height:1.5em}[tooltip]:hover:before{border:solid;border-color:#222 transparent;border-width:6px 6px 0;bottom:17px;content:'';left:2px;position:absolute;z-index:99}.tooltip-element{color:#fff;background:#000;width:16px;height:16px;border-radius:8px;display:inline-block;text-align:center;line-height:16px;margin:0 5px;font-size:12px}.form-control[type=color]{width:60px;padding:2px;display:inline-block}.form-control[multiple]{height:auto}
Oops, something went wrong.
Oops, something went wrong.
@@ -1,6 +1,6 @@
/*
formBuilder - https://formbuilder.online/
-Version: 1.24.1
+Version: 1.24.2
Author: Kevin Chappell <kevin.b.chappell@gmail.com>
*/
@charset "UTF-8";
View
@@ -1,6 +1,6 @@
/*
formBuilder - https://formbuilder.online/
-Version: 1.24.1
+Version: 1.24.2
Author: Kevin Chappell <kevin.b.chappell@gmail.com>
*/
'use strict';
@@ -54,7 +54,7 @@ if (typeof Object.assign != 'function') {
*
*/
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var fbUtils = {};
@@ -121,8 +121,18 @@ fbUtils.attrString = function (attrs) {
*/
fbUtils.safeAttr = function (name, value) {
name = fbUtils.safeAttrName(name);
+ var valString = void 0;
- var valString = fbUtils.escapeAttr(value);
+ if (value) {
+ if (Array.isArray(value)) {
+ valString = fbUtils.escapeAttr(value.join(' '));
+ } else {
+ if (typeof value === 'boolean') {
+ value = value.toString();
+ }
+ valString = fbUtils.escapeAttr(value.replace(',', ' ').trim());
+ }
+ }
value = value ? '="' + valString + '"' : '';
return {
@@ -174,8 +184,8 @@ fbUtils.camelCase = function (str) {
* @return {String}
*/
fbUtils.markup = function (tag) {
- var content = arguments.length <= 1 || arguments[1] === undefined ? '' : arguments[1];
- var attrs = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
+ var content = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
+ var attrs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
var contentType = void 0,
field = document.createElement(tag),
@@ -346,7 +356,7 @@ fbUtils.unique = function (array) {
* @return {string} preview markup for field
*/
fbUtils.fieldRender = function (fieldData, opts) {
- var preview = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2];
+ var preview = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
var fieldMarkup = '',
fieldLabel = '',
@@ -906,8 +916,8 @@ function formBuilderHelpersFn(opts, formBuilder) {
};
_helpers.debounce = function (func) {
- var wait = arguments.length <= 1 || arguments[1] === undefined ? 250 : arguments[1];
- var immediate = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2];
+ var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 250;
+ var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
var timeout;
return function () {
@@ -1043,8 +1053,8 @@ function formBuilderHelpersFn(opts, formBuilder) {
* @return {Object} Reference to the modal
*/
_helpers.confirm = function (message, yesAction) {
- var coords = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2];
- var className = arguments.length <= 3 || arguments[3] === undefined ? '' : arguments[3];
+ var coords = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
+ var className = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
var overlay = _helpers.showOverlay();
var yes = utils.markup('button', opts.messages.yes, { className: 'yes btn btn-success btn-sm' }),
@@ -1092,8 +1102,8 @@ function formBuilderHelpersFn(opts, formBuilder) {
* @return {Object} dom
*/
_helpers.dialog = function (content) {
- var coords = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1];
- var className = arguments.length <= 2 || arguments[2] === undefined ? '' : arguments[2];
+ var coords = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
+ var className = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
_helpers.showOverlay();
@@ -1924,7 +1934,7 @@ function formBuilderEventsFn() {
};
var prepFieldVars = function prepFieldVars($field) {
- var isNew = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1];
+ var isNew = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
var field = {};
if ($field instanceof jQuery) {
@@ -1957,8 +1967,8 @@ function formBuilderEventsFn() {
if (isNew && utils.inArray(field.type, ['text', 'number', 'file', 'select', 'textarea'])) {
field.className = 'form-control'; // backwards compatibility
} else {
- field.className = field.class || field.className; // backwards compatibility
- }
+ field.className = field.class || field.className; // backwards compatibility
+ }
var match = /(?:^|\s)btn-(.*?)(?:\s|$)/g.exec(field.className);
if (match) {
Oops, something went wrong.
Oops, something went wrong.
@@ -1,6 +1,6 @@
/*
formBuilder - https://formbuilder.online/
-Version: 1.24.1
+Version: 1.24.2
Author: Kevin Chappell <kevin.b.chappell@gmail.com>
*/
.kc-toggle {
View
@@ -1,6 +1,6 @@
/*
formBuilder - https://formbuilder.online/
-Version: 1.24.1
+Version: 1.24.2
Author: Kevin Chappell <kevin.b.chappell@gmail.com>
*/
'use strict';
@@ -99,7 +99,7 @@ if (typeof Object.assign != 'function') {
*
*/
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
+var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var fbUtils = {};
@@ -166,8 +166,18 @@ fbUtils.attrString = function (attrs) {
*/
fbUtils.safeAttr = function (name, value) {
name = fbUtils.safeAttrName(name);
+ var valString = void 0;
- var valString = fbUtils.escapeAttr(value);
+ if (value) {
+ if (Array.isArray(value)) {
+ valString = fbUtils.escapeAttr(value.join(' '));
+ } else {
+ if (typeof value === 'boolean') {
+ value = value.toString();
+ }
+ valString = fbUtils.escapeAttr(value.replace(',', ' ').trim());
+ }
+ }
value = value ? '="' + valString + '"' : '';
return {
@@ -219,8 +229,8 @@ fbUtils.camelCase = function (str) {
* @return {String}
*/
fbUtils.markup = function (tag) {
- var content = arguments.length <= 1 || arguments[1] === undefined ? '' : arguments[1];
- var attrs = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
+ var content = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
+ var attrs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
var contentType = void 0,
field = document.createElement(tag),
@@ -391,7 +401,7 @@ fbUtils.unique = function (array) {
* @return {string} preview markup for field
*/
fbUtils.fieldRender = function (fieldData, opts) {
- var preview = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2];
+ var preview = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
var fieldMarkup = '',
fieldLabel = '',
Oops, something went wrong.

0 comments on commit 3fa683c

Please sign in to comment.