Skip to content

Commit

Permalink
Organizing.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Kim authored and ajb committed Dec 30, 2013
1 parent 42470d6 commit f9b4317
Show file tree
Hide file tree
Showing 46 changed files with 919 additions and 51 deletions.
20 changes: 12 additions & 8 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,31 @@ module.exports = (grunt) ->
grunt.initConfig

pkg: '<json:package.json>'
srcFolder: 'src'
compiledFolder: 'compiled' # Temporary holding area.
distFolder: 'dist'
vendorFolder: 'vendor'
testFolder: 'test'

jst:
all:
options:
namespace: 'Formbuilder.templates'
processName: (filename) ->
filename.replace('./templates/', '').replace('.html', '')
filename.replace('<%= srcFolder %>/templates/', '').replace('.html', '')

files:
'templates/compiled.js': ['./templates/**/*.html']
'<%= compiledFolder %>/templates.js': '<%= srcFolder %>/templates/**/*.html'

coffee:
all:
files:
'js/compiled.js': ['coffee/rivets-config.coffee', 'coffee/main.coffee', 'coffee/fields/*.coffee']
'<%= compiledFolder %>/scripts.js': '<%= srcFolder %>/scripts/**/*.coffee'

concat:
all:
'<%= distFolder %>/formbuilder.js': ['js/compiled.js', 'templates/compiled.js']
'vendor/js/vendor.js': [
'<%= distFolder %>/formbuilder.js': '<%= compiledFolder %>/*.js'
'<%= vendorFolder %>/js/vendor.js': [
'bower_components/jquery/jquery.js'
'bower_components/jquery-ui/ui/jquery.ui.core.js'
'bower_components/jquery-ui/ui/jquery.ui.widget.js'
Expand All @@ -59,12 +62,13 @@ module.exports = (grunt) ->
dist:
files:
'<%= distFolder %>/formbuilder-min.css': '<%= distFolder %>/formbuilder.css'
'vendor/css/vendor.css': 'bower_components/font-awesome/css/font-awesome.css'
'<%= vendorFolder %>/css/vendor.css': 'bower_components/font-awesome/css/font-awesome.css'

stylus:
all:
files:
'<%= distFolder %>/formbuilder.css': 'styl/formbuilder.styl'
'<%= compiledFolder %>/formbuilder.css': '<%= srcFolder %>/styles/**.styl'
'<%= distFolder %>/formbuilder.css': '<%= compiledFolder %>/**/*.css'

uglify:
dist:
Expand All @@ -73,7 +77,7 @@ module.exports = (grunt) ->

watch:
all:
files: ['./coffee/**/*.coffee', 'templates/**/*.html', './styl/**/*.styl']
files: ['<%= srcFolder %>/**/*.(coffee|styl|html)']
tasks: ALL_TASKS

# To test, run `grunt --no-write -v release`
Expand Down
67 changes: 67 additions & 0 deletions compiled/formbuilder.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
.fb-button{display:inline-block;margin:0;padding:.563rem .844rem;border:0 none;background:#16a085;color:#fff;text-align:center;text-decoration:none;font-size:12px;line-height:1.5;cursor:pointer;border-radius:.125rem;border:thin solid #19b394;border-bottom:2px solid #16a085}
.fb-button[disabled]{background:#ddd !important;border:thin solid #ccc;color:#777 !important;text-shadow:none !important;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=65)";opacity:.65;cursor:default}
.fb-clear{clear:both}
.fb-main{max-width:1000px;margin:0 auto;padding:0 20px 0 0;position:relative;font-family:'Source Sans Pro','Open Sans',Tahoma}
.fb-save-wrapper{position:absolute;right:20px;top:10px}
.fb-left{width:320px;float:left;padding-top:30px}
.fb-right{padding-top:70px;margin-left:320px;border-left:1px solid #ddd;padding-left:20px;min-height:100%;overflow:hidden}
.fb-no-response-fields{color:#999}
.fb-tabs{list-style:none;margin:0 0 20px 0;padding:0 0 0 20px;border-bottom:1px solid #ccc}
.fb-tabs li{display:inline-block}
.fb-tabs li a{display:block;padding:10px;border-radius:5px 5px 0 0;font-size:13px;cursor:pointer;border-left:1px solid transparent;border-right:1px solid transparent}
.fb-tabs li.active a{border:1px solid #ccc;margin-bottom:-1px;border-bottom-color:#fff}
.fb-tab-content .fb-tab-pane{padding:0 20px;display:none}
.fb-tab-content .fb-tab-pane.active{display:block}
.fb-add-field-types .section{padding-bottom:5px;margin-bottom:20px}
.fb-add-field-types{font-size:0;}
.fb-add-field-types a{font-size:13px;display:inline-block;width:48.5%;background-color:#1abc9c;margin-bottom:9px;box-sizing:border-box;}
.fb-add-field-types a:nth-child(odd){margin-right:3%}
.fb-add-field-types a .symbol{opacity:.6;margin:0 .25em 0 -1em}
.fb-response-fields{padding-bottom:150px}
.fb-response-fields a.sortable-placeholder{display:block;border:1px dashed #ddd;min-height:80px;height:80px;width:100%}
.fb-field-wrapper{cursor:pointer;position:relative;margin-bottom:20px;}
.fb-field-wrapper input{border-radius:3px;border:thin solid #ddd}
.fb-field-wrapper:hover .actions-wrapper,.fb-field-wrapper.editing .actions-wrapper{display:block}
.fb-field-wrapper:hover .subtemplate-wrapper{border-color:#ddd;border-radius:3px}
.fb-field-wrapper.editing{background-color:#ecf0f1;border-radius:3px}
.fb-field-wrapper.editing .subtemplate-wrapper{border-color:#d9e1e3;border-style:solid;margin:0;border-radius:3px}
.fb-field-wrapper .actions-wrapper{display:none;position:absolute;bottom:-7px;right:5px;z-index:3}
.fb-field-wrapper .actions-wrapper a{display:inline-block;background-color:#ccc;padding:2px 8px}
.edit-response-field input,.edit-response-field textarea,.edit-response-field select{border:thin solid #ddd;border-radius:.25em;padding:.5em;display:inline-block;height:auto;vertical-align:middle;}
.edit-response-field input:focus,.edit-response-field textarea:focus,.edit-response-field select:focus{outline:none;border:thin solid #1abc9c}
.edit-response-field select{font-size:14px}
.fb-field-wrapper .actions-wrapper a.js-duplicate,.fb-edit-field-wrapper .js-add-option{background-color:#2ecc71;border:none}
.fb-field-wrapper .actions-wrapper a.js-clear,.fb-edit-field-wrapper .js-remove-option{background-color:#e74c3c;border:none}
.fb-field-wrapper .subtemplate-wrapper{border:1px dashed transparent;margin-bottom:10px;padding:10px;position:relative}
.fb-field-wrapper .subtemplate-wrapper .cover{position:absolute;top:0;left:0;height:100%;width:100%;z-index:2}
.fb-field-wrapper .subtemplate-wrapper > label{display:block;border-bottom:thin solid #eee;padding-bottom:3px;margin-bottom:7px}
.fb-field-wrapper .subtemplate-wrapper abbr{color:#f00}
.fb-field-wrapper .input-line{clear:both;margin-bottom:10px}
.fb-field-wrapper .input-line .above-line{margin-top:7px}
.fb-field-wrapper .input-line > span{display:inline-block;vertical-align:top}
.fb-field-wrapper .input-line > span input{width:100%}
.fb-field-wrapper .input-line > span > label{display:block;font-size:13px;margin-left:3px}
.fb-field-wrapper .help-block{display:block;font-size:12px;margin-top:5px}
.fb-edit-field-wrapper{font-size:13px}
.fb-edit-field-wrapper .fb-field-label{font-weight:normal;background:#eee;padding:.75em;color:#666;font-size:1.25em;}
.fb-edit-field-wrapper .fb-field-label .field-type{margin-top:.5em;display:block;font-family:'Source Sans Pro',sans-serif;font-size:1em;}
.fb-edit-field-wrapper .fb-field-label .field-type:before{content:'Type: ';color:#999}
.fb-edit-field-wrapper .fb-field-label .fa.fa-arrow-right{display:none}
.fb-edit-field-wrapper .fb-edit-section-header{border-bottom:1px solid #ddd;margin-top:25px;margin-bottom:10px;padding-bottom:5px;clear:both;font-weight:700}
.fb-edit-field-wrapper .js-add-option,.fb-edit-field-wrapper .js-remove-option{padding:3px 6px}
.fb-edit-field-wrapper .fb-bottom-add{margin-top:8px}
.fb-common-wrapper .fb-label-description{margin-bottom:10px}
.fb-common-wrapper .fb-label-description input,.fb-common-wrapper .fb-label-description textarea{width:100%}
.fb-common-wrapper .fb-label-description textarea{min-height:5em}
.response-field-draggable-helper{border:1px dashed #ddd;background:#eee}
.response-field-text input.rf-size-small{width:130px}
.response-field-text input.rf-size-medium{width:300px}
.response-field-text input.rf-size-large{width:100%}
.response-field-paragraph textarea.rf-size-small{width:200px;min-height:60px}
.response-field-paragraph textarea.rf-size-medium{width:400px;min-height:100px}
.response-field-paragraph textarea.rf-size-large{width:100%;min-height:200px}
.response-field-address .street{width:400px}
.response-field-address .city,.response-field-address .state,.response-field-address .zip,.response-field-address .country{width:198px}
.response-field-date .month,.response-field-date .day,.response-field-date .year{width:50px}
.response-field-time .hours,.response-field-time .minutes,.response-field-time .seconds{width:50px}
.response-field-checkboxes .fb-option,.response-field-radio .fb-option{margin-bottom:5px;display:inline-block}
Loading

0 comments on commit f9b4317

Please sign in to comment.