Permalink
Browse files

Refactor build process, santize formRender attributes, add linting se…

…ttings, minor refactor on add_opt click callback
  • Loading branch information...
1 parent 075d305 commit 1872217dad457abdd3eb617b435f424a11954b6c @kevinchappell committed Feb 21, 2016
Showing with 3,568 additions and 561 deletions.
  1. +1 −0 .gitignore
  2. +21 −0 .jsbeautifyrc
  3. +2 −1 .jscsrc
  4. +43 −0 .jshintrc
  5. +94 −0 .sass-lint.yml
  6. +3 −3 demo/assets/{ → css}/demo.css
  7. +870 −0 demo/assets/css/form-builder.css
  8. +3 −3 demo/assets/{ → css}/form-builder.min.css
  9. +313 −0 demo/assets/css/form-render.css
  10. +2 −2 demo/assets/{ → css}/form-render.min.css
  11. +0 −6 demo/assets/form-builder.min.js
  12. +0 −6 demo/assets/form-render.min.js
  13. BIN demo/assets/{images → img}/android-icon-144x144.png
  14. BIN demo/assets/{images → img}/android-icon-192x192.png
  15. BIN demo/assets/{images → img}/android-icon-36x36.png
  16. BIN demo/assets/{images → img}/android-icon-48x48.png
  17. BIN demo/assets/{images → img}/android-icon-72x72.png
  18. BIN demo/assets/{images → img}/android-icon-96x96.png
  19. BIN demo/assets/{images → img}/apple-icon-114x114.png
  20. BIN demo/assets/{images → img}/apple-icon-120x120.png
  21. BIN demo/assets/{images → img}/apple-icon-144x144.png
  22. BIN demo/assets/{images → img}/apple-icon-152x152.png
  23. BIN demo/assets/{images → img}/apple-icon-180x180.png
  24. BIN demo/assets/{images → img}/apple-icon-57x57.png
  25. BIN demo/assets/{images → img}/apple-icon-60x60.png
  26. BIN demo/assets/{images → img}/apple-icon-72x72.png
  27. BIN demo/assets/{images → img}/apple-icon-76x76.png
  28. BIN demo/assets/{images → img}/apple-icon-precomposed.png
  29. BIN demo/assets/{images → img}/apple-icon.png
  30. BIN demo/assets/{images → img}/bg_hr.png
  31. BIN demo/assets/{images → img}/blacktocat.png
  32. BIN demo/assets/img/clipboard-sprite.png
  33. BIN demo/assets/{images → img}/favicon-16x16.png
  34. BIN demo/assets/{images → img}/favicon-32x32.png
  35. BIN demo/assets/{images → img}/favicon-96x96.png
  36. BIN demo/assets/{images → img}/favicon.ico
  37. BIN demo/assets/img/frmb-sprite.png
  38. BIN demo/assets/{images → img}/icon_download.png
  39. BIN demo/assets/{images → img}/ms-icon-144x144.png
  40. BIN demo/assets/{images → img}/ms-icon-150x150.png
  41. BIN demo/assets/{images → img}/ms-icon-310x310.png
  42. BIN demo/assets/{images → img}/ms-icon-70x70.png
  43. BIN demo/assets/{images → img}/sprite_download.png
  44. +1,422 −0 demo/assets/js/form-builder.js
  45. +7 −0 demo/assets/js/form-builder.min.js
  46. +277 −0 demo/assets/js/form-render.js
  47. +7 −0 demo/assets/js/form-render.min.js
  48. +1 −0 demo/assets/js/form-render.min.js.map
  49. +8 −8 demo/assets/sass/_theme.scss
  50. +20 −21 demo/index.html
  51. +11 −23 dist/form-builder.css
  52. +42 −51 dist/form-builder.js
  53. +3 −3 dist/form-builder.min.css
  54. +3 −3 dist/form-builder.min.js
  55. +2 −2 dist/form-render.css
  56. +28 −10 dist/form-render.js
  57. +2 −2 dist/form-render.min.css
  58. +3 −3 dist/form-render.min.js
  59. +206 −0 gulpfile.babel.js
  60. +0 −229 gulpfile.js
  61. +11 −8 package.json
  62. +29 −136 src/js/form-builder.js
  63. +26 −8 src/js/form-render.js
  64. +93 −0 src/js/to-xml.js
  65. +15 −33 src/sass/_stage.scss
View
@@ -1,2 +1,3 @@
node_modules
npm-debug.log
+demo/assets/**/*.map
View
@@ -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
+ }
+}
View
@@ -1,3 +1,4 @@
{
- "preset": "google"
+ "preset": "google",
+ "disallowMultipleVarDecl": false
}
View
@@ -0,0 +1,43 @@
+{
+ "nonew" : true,
+ "plusplus" : false,
+ "curly" : true,
+ "latedef" : true,
+ "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,
+ "es3" : 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
+ }
+}
View
@@ -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
@@ -1,6 +1,6 @@
/*
-formBuilder - git@github.com:kevinchappell/formBuilder.git
-Version: 1.7.4
+formBuilder - http://kevinchappell.github.io/formBuilder/
+Version: 1.3.0
Author: Kevin Chappell <kevin.b.chappell@gmail.com>
*/
-dl dd,dl p,ol,ul{padding-left:20px}article,aside,details,em,figcaption,figure,footer,header,hgroup,menu,nav,pre code,section{display:block}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font:inherit;vertical-align:baseline}blockquote,table{margin-bottom:20px}code,pre{padding:1%;width:98%;box-shadow:0 0 10px rgba(0,0,0,.1)}td,th{padding:10px}dl dd,dl p,em{font-style:italic}#forkme_banner,#project_title,dl dt,h1,strong{font-weight:700}body{box-sizing:border-box;color:#373737;background:#212121;font-size:14px;font-family:'Myriad Pro',Calibri,Helvetica,Arial,sans-serif;line-height:1.42857143;-webkit-font-smoothing:antialiased}h1,h2,h3,h4,h5,h6{margin:10px 0;font-weight:700;color:#222;font-family:'Lucida Grande',Calibri,Helvetica,Arial,sans-serif;letter-spacing:-1px}h1{font-size:36px}h2{padding-bottom:10px;font-size:32px;background:url(images/bg_hr.png) bottom repeat-x}h3{font-size:24px}h4{font-size:21px}h5{font-size:18px}h6{font-size:16px}p{margin:10px 0 15px}footer p{color:#f2f2f2}a{text-decoration:none;color:#0090ff;text-shadow:none;-webkit-transition:text-shadow .5s ease;transition:text-shadow .5s ease}a:focus,a:hover{text-decoration:underline}em{color:#999}p img{display:inline;margin:0;padding:0;vertical-align:middle;text-align:center;border:none}code,pre{color:#222;background-color:#fff;font-family:Monaco,"Bitstream Vera Sans Mono","Lucida Console",Terminal,monospace;font-size:14px;border-radius:2px}table,td{border:1px solid #373737}pre{overflow:auto;white-space:pre-wrap}code{margin:0 3px}pre code{box-shadow:none}blockquote{color:#666;padding:0 0 0 20px;border-left:3px solid #bbb}dl,ol,ul{margin-bottom:15px}ul{list-style:disc}ol{list-style:decimal}hr{height:1px;margin-bottom:5px;border:none;background:url(images/bg_hr.png) center repeat-x}table{border-collapse:collapse;border-spacing:0;text-align:left}th{font-family:'Lucida Grande','Helvetica Neue',Helvetica,Arial,sans-serif;background:#373737;color:#fff}.outer{width:100%}.inner{position:relative;max-width:1080px;padding:20px 10px;margin:0 auto}#downloads,#forkme_banner{position:absolute;z-index:10}#forkme_banner{display:block;top:0;right:10px;padding:10px 50px 10px 10px;color:#fff;background:url(images/blacktocat.png) 95% 50% no-repeat #0090ff;box-shadow:0 0 10px rgba(0,0,0,.5);border-bottom-left-radius:2px;border-bottom-right-radius:2px}#header_wrap{background:-webkit-linear-gradient(top,#373737,#212121);background:linear-gradient(to bottom,#373737,#212121)}#header_wrap .inner{padding:50px 10px 30px}#project_title{margin:0;color:#fff;font-size:42px;text-shadow:#111 0 0 10px}#project_tagline{color:#fff;font-size:24px;font-weight:300;background:0 0;text-shadow:#111 0 0 10px}#downloads{width:210px;bottom:-40px;right:0;height:70px;background:url(images/icon_download.png) 0 90% no-repeat}.tar_download_link,.zip_download_link{display:block;float:right;width:90px;height:70px;text-indent:-5000px;overflow:hidden}.zip_download_link{background:url(images/sprite_download.png) bottom left no-repeat}.tar_download_link{background:url(images/sprite_download.png) bottom right no-repeat;margin-left:10px}.zip_download_link:hover{background:url(images/sprite_download.png) top left no-repeat}.tar_download_link:hover{background:url(images/sprite_download.png) top right no-repeat}fieldset,legend{border:1px solid #999;background:#fefefe}#main_content_wrap{background:#f2f2f2;border-top:1px solid #111;border-bottom:1px solid #111}#footer_wrap{background:#212121}@media screen and (max-width:480px){.inner,code,pre{min-width:320px;max-width:480px}body{font-size:14px}#downloads{display:none}#project_title{font-size:32px}h1{font-size:28px}h2{font-size:24px}h3{font-size:21px}h4{font-size:18px}h5{font-size:14px}h6{font-size:12px}code,pre{font-size:11px;width:98%;padding:1%}}.demo-wrap{width:100%}.donate-plea{width:50%;float:left;text-align:left}.donate-plea form{float:left;margin-bottom:10px}.copyright{float:right;text-align:right}.badges{margin-top:-30px}.social{margin-top:-40px}.social .chicklets{text-indent:-9999px}fieldset{padding:20px;margin:20px 0}legend{padding:5px 10px}#rendered-form{clear:both;float:left;width:62%;margin-right:2%}#rendered-form .form-group>label{font-weight:700;font-size:1.1em}.render-description{width:36%;float:right;overflow:hidden}#main_content hr{clear:both}.build-form{margin-bottom:30px}
+dl dd,dl p,ol,ul{padding-left:20px}article,aside,details,em,figcaption,figure,footer,header,hgroup,menu,nav,pre code,section{display:block}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font:inherit;vertical-align:baseline}blockquote,table{margin-bottom:20px}code,pre{padding:1%;width:98%;box-shadow:0 0 10px rgba(0,0,0,.1)}td,th{padding:10px}dl dd,dl p,em{font-style:italic}#forkme_banner,#project_title,dl dt,h1,strong{font-weight:700}body{box-sizing:border-box;color:#373737;background:#212121;font-size:14px;font-family:'Myriad Pro',Calibri,Helvetica,Arial,sans-serif;line-height:1.42857143;-webkit-font-smoothing:antialiased}h1,h2,h3,h4,h5,h6{margin:10px 0;font-weight:700;color:#222;font-family:'Lucida Grande',Calibri,Helvetica,Arial,sans-serif;letter-spacing:-1px}h1{font-size:36px}h2{padding-bottom:10px;font-size:32px;background:url(../img/bg_hr.png) bottom repeat-x}h3{font-size:24px}h4{font-size:21px}h5{font-size:18px}h6{font-size:16px}p{margin:10px 0 15px}footer p{color:#f2f2f2}a{text-decoration:none;color:#0090ff;text-shadow:none;-webkit-transition:text-shadow .5s ease;transition:text-shadow .5s ease}a:focus,a:hover{text-decoration:underline}em{color:#999}p img{display:inline;margin:0;padding:0;vertical-align:middle;text-align:center;border:none}code,pre{color:#222;background-color:#fff;font-family:Monaco,"Bitstream Vera Sans Mono","Lucida Console",Terminal,monospace;font-size:14px;border-radius:2px}table,td{border:1px solid #373737}pre{overflow:auto;white-space:pre-wrap}code{margin:0 3px}pre code{box-shadow:none}blockquote{color:#666;padding:0 0 0 20px;border-left:3px solid #bbb}dl,ol,ul{margin-bottom:15px}ul{list-style:disc}ol{list-style:decimal}hr{height:1px;margin-bottom:5px;border:none;background:url(../img/bg_hr.png) center repeat-x}table{border-collapse:collapse;border-spacing:0;text-align:left}th{font-family:'Lucida Grande','Helvetica Neue',Helvetica,Arial,sans-serif;background:#373737;color:#fff}.outer{width:100%}.inner{position:relative;max-width:1080px;padding:20px 10px;margin:0 auto}#downloads,#forkme_banner{position:absolute;z-index:10}#forkme_banner{display:block;top:0;right:10px;padding:10px 50px 10px 10px;color:#fff;background:url(../img/blacktocat.png) 95% 50% no-repeat #0090ff;box-shadow:0 0 10px rgba(0,0,0,.5);border-bottom-left-radius:2px;border-bottom-right-radius:2px}#header_wrap{background:-webkit-linear-gradient(top,#373737,#212121);background:linear-gradient(to bottom,#373737,#212121)}#header_wrap .inner{padding:50px 10px 30px}#project_title{margin:0;color:#fff;font-size:42px;text-shadow:#111 0 0 10px}#project_tagline{color:#fff;font-size:24px;font-weight:300;background:0 0;text-shadow:#111 0 0 10px}#downloads{width:210px;bottom:-40px;right:0;height:70px;background:url(../img/icon_download.png) 0 90% no-repeat}.tar_download_link,.zip_download_link{display:block;float:right;width:90px;height:70px;text-indent:-5000px;overflow:hidden}.zip_download_link{background:url(../img/sprite_download.png) bottom left no-repeat}.tar_download_link{background:url(../img/sprite_download.png) bottom right no-repeat;margin-left:10px}.zip_download_link:hover{background:url(../img/sprite_download.png) top left no-repeat}.tar_download_link:hover{background:url(../img/sprite_download.png) top right no-repeat}fieldset,legend{border:1px solid #999;background:#fefefe}#main_content_wrap{background:#f2f2f2;border-top:1px solid #111;border-bottom:1px solid #111}#footer_wrap{background:#212121}@media screen and (max-width:480px){.inner,code,pre{min-width:320px;max-width:480px}body{font-size:14px}#downloads{display:none}#project_title{font-size:32px}h1{font-size:28px}h2{font-size:24px}h3{font-size:21px}h4{font-size:18px}h5{font-size:14px}h6{font-size:12px}code,pre{font-size:11px;width:98%;padding:1%}}.demo-wrap{width:100%}.donate-plea{width:50%;float:left;text-align:left}.donate-plea form{float:left;margin-bottom:10px}.copyright{float:right;text-align:right}.badges{margin-top:-30px}.social{margin-top:-40px}.social .chicklets{text-indent:-9999px}fieldset{padding:20px;margin:20px 0}legend{padding:5px 10px}#rendered-form{clear:both;float:left;width:62%;margin-right:2%}#rendered-form .form-group>label{font-weight:700;font-size:1.1em}.render-description{width:36%;float:right;overflow:hidden}#main_content hr{clear:both}.build-form{margin-bottom:30px}
Oops, something went wrong.

0 comments on commit 1872217

Please sign in to comment.