Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinchappell committed Jun 1, 2016
0 parents commit 4790a89
Show file tree
Hide file tree
Showing 233 changed files with 26,361 additions and 0 deletions.
1 change: 1 addition & 0 deletions .fontello
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
015abe7093f727ea50014d30fb984001
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
npm-debug.log
demo/assets/**/*.map
21 changes: 21 additions & 0 deletions .jsbeautifyrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"html": {
"indent_size": 2,
"indent_char": " "
},
"css": {
"indent_size": 2,
"indent_char": " ",
"indent_with_tabs": true,
"newline-between-rules": true,
"selector_separator_newline": true,
"allowed_file_extensions": ["css", "scss", "sass", "less"]
},
"js": {
"indent_size": 2,
"indent_char": " ",
"jslint_happy": false,
"indent_with_tabs": false,
"space_after_anon_function": false
}
}
4 changes: 4 additions & 0 deletions .jscsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"preset": "google",
"disallowMultipleVarDecl": false
}
44 changes: 44 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"nonew" : true,
"plusplus" : false,
"curly" : true,
"latedef" : false,
"unused" : "strict",
"noarg" : true,
"indent" : 2,
"forin" : true,
"noempty" : true,
"quotmark" : "single",
"maxparams" : 4,
"node" : true,
"eqeqeq" : true,
"strict" : true,
"undef" : true,
"bitwise" : true,
"newcap" : true,
"immed" : true,
"browser" : true,
"camelcase" : true,
"nonbsp" : true,
"esnext" : true,
"globals" : {
"after" : false,
"afterEach" : false,
"alert" : false,
"angular" : false,
"before" : false,
"beforeEach" : false,
"browser" : false,
"describe" : false,
"expect" : false,
"inject" : false,
"it" : false,
"jasmine" : false,
"jQuery" : false,
"spyOn" : false,
"$" : false,
"_" : false,
"formBuilderHelpersFn": false,
"formBuilderEventsFn": false
}
}
94 changes: 94 additions & 0 deletions .sass-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
options:
formatter: stylish
files:
include: '**/*.s+(a|c)ss'
rules:
# Extends
extends-before-mixins: 1
extends-before-declarations: 1
placeholder-in-extend: 1

# Mixins
mixins-before-declarations: 1

# Line Spacing
one-declaration-per-line: 1
empty-line-between-blocks: 1
single-line-per-selector: 1

# Disallows
no-color-keywords: 1
no-color-literals: 1
no-css-comments: 1
no-debug: 1
no-duplicate-properties: 1
no-empty-rulesets: 1
no-extends: 0
no-ids: 1
no-important: 1
no-invalid-hex: 1
no-mergeable-selectors: 1
no-misspelled-properties: 1
no-qualifying-elements: 1
no-trailing-zero: 1
no-transition-all: 1
no-url-protocols: 1
no-vendor-prefixes: 1
no-warn: 1
property-units: 0

# Nesting
force-attribute-nesting: 1
force-element-nesting: 1
force-pseudo-nesting: 1

# Name Formats
class-name-format: 1
function-name-format: 1
id-name-format: 0
mixin-name-format: 1
placeholder-name-format: 1
variable-name-format: 1

# Style Guide
bem-depth: 0
border-zero: 1
brace-style: 1
clean-import-paths: 1
empty-args: 1
hex-length: 1
hex-notation: 1
indentation: 1
leading-zero: 1
nesting-depth:
- 1
- max-depth:
- 3
property-sort-order:
- 1
- order:
- display
- position
- width
- height
- margin
- padding
quotes: 1
shorthand-values: 1
url-quotes: 1
variable-for-property: 1
zero-unit: 1

# Inner Spacing
space-after-comma: 1
space-before-colon: 1
space-after-colon: 1
space-before-brace: 1
space-before-bang: 1
space-after-bang: 1
space-between-parens: 1
space-around-operator: 1

# Final Items
trailing-semicolon: 1
final-newline: 1
96 changes: 96 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Changelog

- v1.9.27 - Bugfix: Header subtypes [#136](https://github.com/kevinchappell/formBuilder/pull/136)
- v1.9.26 - Bugfix: saved subtypes not rendering [#134](https://github.com/kevinchappell/formBuilder/pull/134)
- v1.9.25 - Bugfix: Standardizes how field variables are processed from xml, defaultfields and new field sources [#129](https://github.com/kevinchappell/formBuilder/pull/129)
- v1.9.24 - Bugfix: Update internal field id to better handle multiple editors [#126](https://github.com/kevinchappell/formBuilder/pull/126)
- v1.9.23 - Bugfix: editing class attribute is wonky [#122](https://github.com/kevinchappell/formBuilder/pull/122)
- v1.9.22 - Feature: `controlOrder` option. [#118](https://github.com/kevinchappell/formBuilder/pull/118)
- v1.9.21 - Bugfix: Add pull left and right to `_bs.scss`
- v1.9.20 - Feature: sortableFields #114
- v1.9.19
- Feature: controlPosition option #114
- Feature: sortableFields option #114
- v1.9.18 - Bugfix: Button variables not processed from XML #113
- v1.9.17 - Bugfix: Umlauts break XML #112
- v1.9.16 - Bugfix: XML parse issue [#110](https://github.com/kevinchappell/formBuilder/pull/110)
- v1.9.15 - Bugfix: Option character encoding problem [#109](https://github.com/kevinchappell/formBuilder/pull/109)
- v1.9.14 -
- Feature: Header and Paragraph tags [#108](https://github.com/kevinchappell/formBuilder/pull/108)
- Bugfix: button classes, special character encoding, renamed functions for Selenium
- Chore: added/updated comments [#106](https://github.com/kevinchappell/formBuilder/pull/106)
- v1.9.13 - Bugfix: Add `defaultFields` to formData [#103](https://github.com/kevinchappell/formBuilder/pull/103)
- v1.9.12 - Feature: disableFields option, formRender jQuery fallback, formSaved Event [#101](https://github.com/kevinchappell/formBuilder/pull/101)
- v1.9.11 - Bugfix: formRender hidden field issue [#100](https://github.com/kevinchappell/formBuilder/pull/100)
- v1.9.10 - Bugfix: formRender not rendering with containers [#98](https://github.com/kevinchappell/formBuilder/pull/98)
- v1.9.9 - Bugfix: formRender reinit, take regular js object [#97](https://github.com/kevinchappell/formBuilder/pull/97)
- v1.9.8 - Bugfix: Enter toggles XML field [#95](https://github.com/kevinchappell/formBuilder/pull/95)
- v1.9.7 - Bugfix: Radio group and checkbox group not rendered correctly in IE [#93](https://github.com/kevinchappell/formBuilder/pull/93)
- v1.9.6 - Bugfix: Arrows functions don't work with arguments.callee [#92](https://github.com/kevinchappell/formBuilder/pull/92)
- v1.9.5 - Bugfix: IE Element.remove() polyfill [#91](https://github.com/kevinchappell/formBuilder/pull/91)
- v1.9.4 - Bugfix: IE compatibility issues [#90](https://github.com/kevinchappell/formBuilder/pull/90)
- v1.9.3 - Bugfix: Update .jshintrc [#89](https://github.com/kevinchappell/formBuilder/pull/89)
- v1.9.2 - Bugfix: remove CustomEvent, no IE support [#88](https://github.com/kevinchappell/formBuilder/pull/88)
- v1.9.1 - Bugfix: invalid package.json [#86](https://github.com/kevinchappell/formBuilder/pull/86)
- v1.9.0 - Feature: Style and data updates, Class attribute [#85](https://github.com/kevinchappell/formBuilder/pull/85)
- v1.8.2 - Bugfix: Radio group preview [#82](https://github.com/kevinchappell/formBuilder/pull/82)
- v1.8.1 - Feature: File upload element [#80](https://github.com/kevinchappell/formBuilder/pull/80)
- v1.8.0 - Feature: Button element [#79](https://github.com/kevinchappell/formBuilder/pull/79)
- v1.7.10 - Bugfix: stringify bug causing `null` to be 'null'
- v1.7.9 -
- Add options to formRender
+ `render` : defaults to `true`, will not render the html fields if set false.
+ `notify` : Allows you to define your own handler for notifications. defaults to console.log, console.warn and console.error.
- Set form field data to template element to be used by other modules.
- v1.7.8 - Add fontello fonts with config and Makefile for editing icons.
- v1.7.7
- Bugfix: Close button doesn't close #71
- Bugfix: max-length attribute should be maxlength #70
- Chore: Add gulp plumber to build process to catch errors instead of fail build.
- v1.7.6 - Bugfix: radio and checkbox group options without values cause formRender error.
- v1.7.5
- Bugfix: Multiple selection bug for checkbox group and radio group fields. [#66](https://github.com/kevinchappell/formBuilder/pull/66)
- Chore: Refactor build process, Add linter and code style settings, formRender santized attributes [#67](https://github.com/kevinchappell/formBuilder/pull/67)
- v1.7.4 - Feature: Multiple selection. See: [#65](https://github.com/kevinchappell/formBuilder/pull/65)
- v1.7.3 - Feature: Mobile support for touch based drag and drop. See: [#64](https://github.com/kevinchappell/formBuilder/pull/64)
- v1.7.2 - Bugfix/Feature: Added placeholder attribute for `text` and `textarea` fields. See: [#63](https://github.com/kevinchappell/formBuilder/pull/63)
- v1.7.1 - Bugfix/Feature: Added reinitialization to formBuilder. See: [#62](https://github.com/kevinchappell/formBuilder/pull/62)
- v1.7.0 - Feature: Added sub-types to the `text` input for `password`, `color`, and `email` html5 inputs.
- v1.6.8 - Bugfix: Description and required not rendered in formRender
- v1.6.7 - Bugfix: fields are not sortable
- v1.6.6 - Bugfix: change should be triggered when hidden textarea updated
- v1.6.5 - Feature: Make rendered fields targetable
- v1.6.4 - Bugfix: User options should be deep copied with `$.extend`
- v1.6.3 - Bugfix: Remove `max-length` attribute for hidden fields, Update preview and label for `textarea`
- v1.6.2 - Bugfix: Option text not rendered in IE #39
- v1.6.1 - Bugfix: required attribute should not be rendered when false.
- v1.6.0 - Feature: Hidden input field type added
- v1.5.4 - update gulp to autopush tags
- v1.5.3 - Bugfix: multiple formBuilder on one page.
- v1.5.2 - Bugfix: formRender radio-group invalid name property
- v1.5.1 - Bugfix: Add minimal Bootstrap styling for `formRender`
- v1.5 - Feature: checkbox inputs can now be made into toggle switch. [details here](https://github.com/kevinchappell/formBuilder/pull/24)
- v1.4.0 - Feature: `formRender` is a companion plugin to render saved formData into a usable form. [details here](https://github.com/kevinchappell/formBuilder/pull/20)
- v1.3.5 - Bugfix: XML parse and save
+ This fix brings a slight update in XML markup for multiple value fields, specifically the `<option>` node. The changes is to move away from the proprietary XML parser formBuilder was made for.

**This**:
```
<field name="checkbox-group-1" label="Checkbox Group" style="multiple" required="false" type="checkbox-group" >
<option label="Option 1">option-1</option>
<option label="Option 2">option-2</option>
</field>
```
**Becomes**:
```
<field name="checkbox-group-1" label="Checkbox Group" style="multiple" required="false" type="checkbox-group" >
<option value="option-1">Option 1</option>
<option value="option-2">Option 2</option>
</field>
```
- v1.3.4 - Bugfix: fix self closing xml for radio-group field
- v1.3.3 - Bugfix: preview not toggling correctly
- v1.3.2 - Bugfix: preview for Multiple fields not updating
- v1.3.1 - Bugfix: multiple value fields not saving XML
- v1.3.0 - Live previews, icon font
- v1.2.0 - Add default fields, and call-to-action text
40 changes: 40 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Contributing

formBuilder is open source to the core and contributions are always welcome. In this document we'll cover some dependencies and installation process to get your local development environment up and running.

## Dependencies
To develop for formBuilder you'll need:

- [NodeJS](https://nodejs.org)
- [GulpJS](http://gulpjs.com/)
- [Git](https://git-scm.com/)
- and a [GitHub account](https://github.com/)

## Recommended Tooling
While not required, the following tools are recommended to maintain code quality and consistency in style.

- [JSCS](http://jscs.info/)
- [jsHint](http://jshint.com/)
- [SASS-lint](https://www.npmjs.com/package/sass-lint)

## Installation

Navigate to the directory you'll be working from and run:
```
git clone https://github.com/kevinchappell/formBuilder.git form-builder
cd form-builder
npm install
gulp
```

The above code will clone the repo, install the required `node_modules` and run the default `gulp` task. You should now have a locally running version of the demo page.

## Documentation
For more information on build processes, editing fonts or adding custom fields please see the documentation [here](http://formbuilder.readthedocs.org/en/latest/).

## Notes
Windows users, remember to configure your line endings with `core.autocrlf`. More info [here](https://help.github.com/articles/dealing-with-line-endings/#platform-windows)
```
$ git config --global core.autocrlf true
# Configure Git on Windows to properly handle line endings
```
25 changes: 25 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
The MIT License (MIT)
=====================

Copyright © 2016 Draggable llc.

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the “Software”), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
formBuilder v1.9.27
===========

[![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)

A jQuery plugin for drag and drop form creation

## Usage
To start building forms with this plugin call `formBuilder()` on the textarea you would like to make your editor. FormBuilder takes a number of options and is translatable.


**Example**
```
jQuery(document).ready(function($) {
'use strict';
var template = document.getElementById('form-builder');
$(template).formBuilder();
});
```

## [Demo](https://formbuilder.online/) ##
[![form-builder](https://cloud.githubusercontent.com/assets/1457540/13762292/d7fa75ba-ea35-11e5-96d8-14d813885288.gif)](https://formbuilder.online/)

## [Changelog](https://github.com/kevinchappell/formBuilder/blob/master/CHANGELOG.md) ##

## Translators Needed!
As formBuilder usage grows so does it's need to be available in multiple languages. This is currently possible by manually passing translations through the config options object but wouldn't it be great if it worked out of the box? See [Contributing Languages](https://github.com/kevinchappell/formBuilder/blob/languages/CONTRIBUTING.md) for details.
26 changes: 26 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "formBuilder",
"version": "1.9.27",
"main": [
"dist/*"
],
"description": "jQuery plugin for drag and drop form building",
"authors": [
"Kevin Chappell <[email protected]>"
],
"keywords": [
"jquery-plugin",
"forms",
"drag and drop",
"form builder"
],
"license": "MIT",
"moduleType": [
"jquery"
],
"ignore": [
"*",
"!dist",
"!dist/**/*"
]
}
Loading

0 comments on commit 4790a89

Please sign in to comment.