diff --git a/app/models/form.server.model.js b/app/models/form.server.model.js index c4eda095..fedd3729 100644 --- a/app/models/form.server.model.js +++ b/app/models/form.server.model.js @@ -119,15 +119,18 @@ var FormSchema = new Schema({ colors:{ backgroundColor: { type: String, - match: [/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/] + match: [/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/], + default: '#fff' }, questionColor: { type: String, - match: [/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/] + match: [/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/], + default: '#333', }, answerColor: { type: String, - match: [/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/] + match: [/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/], + default: '#333', }, buttonColor: { type: String, diff --git a/bower.json b/bower.json index d3a24475..a13bcf43 100755 --- a/bower.json +++ b/bower.json @@ -29,7 +29,8 @@ "angular-busy": "~4.1.3", "angular-permission": "~0.3.1", "angular-input-stars": "*", - "file-saver.js": "~1.20150507.2" + "file-saver.js": "~1.20150507.2", + "angular-bootstrap-colorpicker": "~3.0.19" }, "resolutions": { "angular": "~1.3.17" diff --git a/public/application.js b/public/application.js index f3b09aaa..1db48f6f 100755 --- a/public/application.js +++ b/public/application.js @@ -62,8 +62,6 @@ angular.module(ApplicationConfiguration.applicationModuleName).run(['$rootScope' Auth.ensureHasCurrentUser(User); user = Auth.currentUser; - console.log(user.roles); - if(user){ authenticator = new Authorizer(user); console.log('access denied: '+!authenticator.canAccess(permissions)); diff --git a/public/modules/forms/css/form.css b/public/modules/forms/css/form.css index 16b35ee5..8c7f3216 100644 --- a/public/modules/forms/css/form.css +++ b/public/modules/forms/css/form.css @@ -4,6 +4,10 @@ border-width:3px; } +section.public-form { + margin-top: -70px; +} + section.content p.breakwords { word-break: break-all; } @@ -120,20 +124,20 @@ form .row.field { padding: 0.45em 0.9em; width: 100%; line-height: 160%; - border: 2px dashed #ddd; + border: 3px dashed #ddd; } form .field-input > input.hasDatepicker{ padding: 0.45em 0.9em; width: 50%; line-height: 160%; - border: 2px dashed #ddd; + border: 3px dashed #ddd; } form .field-input > input.text-field-input{ padding: 0.45em 0.9em; width: 100%; line-height: 160%; - border: 2px dashed #ddd; + border: 3px dashed #ddd; } form .field-input > input.text-field-input:focus{ border: 0; diff --git a/public/modules/forms/directives/field.client.directive.js b/public/modules/forms/directives/field.client.directive.js index 300879fe..83ffc3b1 100644 --- a/public/modules/forms/directives/field.client.directive.js +++ b/public/modules/forms/directives/field.client.directive.js @@ -67,7 +67,8 @@ angular.module('forms').directive('fieldDirective', ['$templateCache', '$http', restrict: 'E', scope: { field: '=', - required: '&' + required: '&', + design: '=' }, link: linker }; diff --git a/public/modules/forms/forms.client.module.js b/public/modules/forms/forms.client.module.js index 7771d7b8..269a760b 100644 --- a/public/modules/forms/forms.client.module.js +++ b/public/modules/forms/forms.client.module.js @@ -1,4 +1,4 @@ 'use strict'; // Use Application configuration module to register a new module -ApplicationConfiguration.registerModule('forms', ['ngFileUpload', 'ui.date', 'ui.sortable', 'angular-input-stars', 'users']); \ No newline at end of file +ApplicationConfiguration.registerModule('forms', ['ngFileUpload', 'colorpicker.module', 'ui.date', 'ui.sortable', 'angular-input-stars', 'users']); \ No newline at end of file diff --git a/public/modules/forms/views/admin-form.client.view.html b/public/modules/forms/views/admin-form.client.view.html index 5cd06aea..b6e23d9e 100644 --- a/public/modules/forms/views/admin-form.client.view.html +++ b/public/modules/forms/views/admin-form.client.view.html @@ -70,10 +70,75 @@ - + - Edit Design + Design +
+ +
+
+ +
+
+ + +
+
+ + +
+
+
Form Background Color
+
+ +
+ + + + +
+
+ + +
+
+
Question Color
+
+ +
+ + + + +
+
+ + +
+
+
Form Answer Color
+
+ +
+ + + + +
+
+
+
+ +
+
+ +
+
+ +
+
+
diff --git a/public/modules/forms/views/directiveViews/field/checkbox.html b/public/modules/forms/views/directiveViews/field/checkbox.html index 56a25140..07312c46 100755 --- a/public/modules/forms/views/directiveViews/field/checkbox.html +++ b/public/modules/forms/views/directiveViews/field/checkbox.html @@ -4,7 +4,7 @@