updated .gitignore to ignore generated files
modified: config/env/production.js modified: .gitignore modified: config/env/production.js modified: .gitignore modified: config/env/production.js modified: .gitignore modified: config/env/production.js deleted: public/dist/application.js deleted: public/dist/application.min.css deleted: public/dist/application.min.js modified: public/modules/forms/css/form.css modified: public/modules/forms/directives/auto-save.client.directive.js modified: public/modules/forms/directives/key-to-option.client.directive.js modified: public/modules/forms/directives/submit-form.client.directive.js modified: public/modules/forms/views/directiveViews/field/dropdown.html
This commit is contained in:
commit
e9f86a9c62
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -1,9 +1,6 @@
|
|||
<<<<<<< HEAD
|
||||
ecosystem.js
|
||||
=======
|
||||
dist/
|
||||
public/dist/
|
||||
npm-debug.*
|
||||
>>>>>>> 08a672a87432ca61efb3613b22e5a8b16698f722
|
||||
docs/Oscar_Credentials.md
|
||||
scripts/test_oscarhost.js
|
||||
scripts/oscarhost/private/
|
||||
|
|
2
config/env/production.js
vendored
2
config/env/production.js
vendored
|
@ -56,7 +56,7 @@ module.exports = {
|
|||
options: {
|
||||
service: process.env.MAILER_SERVICE_PROVIDER || '',
|
||||
ssl: false,
|
||||
host: "smtp.sparkpostmail.com",
|
||||
host: 'smtp.sparkpostmail.com',
|
||||
port: 587,
|
||||
secure: false,
|
||||
auth: {
|
||||
|
|
2835
public/dist/application.js
vendored
2835
public/dist/application.js
vendored
File diff suppressed because one or more lines are too long
4
public/dist/application.min.css
vendored
4
public/dist/application.min.css
vendored
File diff suppressed because one or more lines are too long
4
public/dist/application.min.js
vendored
4
public/dist/application.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -334,7 +334,14 @@ div.config-form .row.field {
|
|||
width: 80%;
|
||||
}
|
||||
|
||||
|
||||
/*Override Select2 UI*/
|
||||
.ui-select-choices.ui-select-dropdown {
|
||||
top:2.5em!important;
|
||||
}
|
||||
.ui-select-toggle {
|
||||
box-shadow:none!important;
|
||||
border:none!important;
|
||||
}
|
||||
|
||||
.current-fields .tool-panel > .panel-default:hover {
|
||||
border-color: #9d9d9d;
|
||||
|
|
|
@ -6,7 +6,7 @@ function removeDateFieldsFunc(o) {
|
|||
function eachObject(v,k){
|
||||
|
||||
if(k === 'lastModified' || k === 'created'){
|
||||
delete clone[i][k];
|
||||
delete clone[k];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,23 +2,26 @@
|
|||
|
||||
angular.module('forms').directive('keyToOption', function(){
|
||||
return {
|
||||
restrict: 'A',
|
||||
restrict: 'AE',
|
||||
transclude: true,
|
||||
scope: {
|
||||
field: '='
|
||||
field: '&'
|
||||
},
|
||||
link: function($scope, $element, $attrs) {
|
||||
link: function($scope, $element, $attrs, $select) {
|
||||
$element.bind('keydown keypress', function(event) {
|
||||
console.log('keypress');
|
||||
|
||||
var keyCode = event.which || event.keyCode;
|
||||
var index = parseInt(String.fromCharCode(keyCode))-1;
|
||||
console.log($scope.field);
|
||||
|
||||
|
||||
if (index < $scope.field.fieldOptions.length) {
|
||||
event.preventDefault();
|
||||
$scope.$apply(function () {
|
||||
$scope.field.fieldValue = $scope.field.fieldOptions[index].option_value;
|
||||
if($attrs.type === 'dropdown'){
|
||||
$select.selected.option_value = $scope.field.fieldOptions[index].option_value;
|
||||
}
|
||||
console.log($scope);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -53,25 +53,25 @@ angular.module('forms').directive('submitFormDirective', ['$http', 'TimeCounter'
|
|||
|
||||
if(!$scope.noscroll){
|
||||
//Focus on submit button
|
||||
if( $scope.selected.index === $scope.myform.form_fields.length-1 && $scope.fieldBottom < 200){
|
||||
if( $scope.selected.index === $scope.myform.visible_form_fields.length-1 && $scope.fieldBottom < 200){
|
||||
field_index = $scope.selected.index+1;
|
||||
field_id = 'submit_field';
|
||||
$scope.setActiveField(field_id, field_index, false);
|
||||
}
|
||||
//Focus on field above submit button
|
||||
else if($scope.selected.index === $scope.myform.form_fields.length){
|
||||
else if($scope.selected.index === $scope.myform.visible_form_fields.length){
|
||||
if($scope.fieldTop > 200){
|
||||
field_index = $scope.selected.index-1;
|
||||
field_id = $scope.myform.form_fields[field_index]._id;
|
||||
field_id = $scope.myform.visible_form_fields[field_index]._id;
|
||||
$scope.setActiveField(field_id, field_index, false);
|
||||
}
|
||||
}else if( $scope.fieldBottom < 0){
|
||||
field_index = $scope.selected.index+1;
|
||||
field_id = $scope.myform.form_fields[field_index]._id;
|
||||
field_id = $scope.myform.visible_form_fields[field_index]._id;
|
||||
$scope.setActiveField(field_id, field_index, false);
|
||||
}else if ( $scope.selected.index !== 0 && $scope.fieldTop > 0) {
|
||||
field_index = $scope.selected.index-1;
|
||||
field_id = $scope.myform.form_fields[field_index]._id;
|
||||
field_id = $scope.myform.visible_form_fields[field_index]._id;
|
||||
$scope.setActiveField(field_id, field_index, false);
|
||||
}
|
||||
//console.log('$scope.selected.index: '+$scope.selected.index);
|
||||
|
@ -80,6 +80,10 @@ angular.module('forms').directive('submitFormDirective', ['$http', 'TimeCounter'
|
|||
}
|
||||
};
|
||||
|
||||
$rootScope.setDropdownOption = function(){
|
||||
console.log('setDropdownOption index: ');
|
||||
};
|
||||
|
||||
/*
|
||||
** Field Controls
|
||||
*/
|
||||
|
@ -89,8 +93,8 @@ angular.module('forms').directive('submitFormDirective', ['$http', 'TimeCounter'
|
|||
//console.log($scope.selected);
|
||||
return;
|
||||
}
|
||||
console.log('field_id: '+field_id);
|
||||
console.log('field_index: '+field_index);
|
||||
//console.log('field_id: '+field_id);
|
||||
//console.log('field_index: '+field_index);
|
||||
//console.log($scope.selected);
|
||||
|
||||
$scope.selected._id = field_id;
|
||||
|
@ -103,28 +107,38 @@ angular.module('forms').directive('submitFormDirective', ['$http', 'TimeCounter'
|
|||
$scope.noscroll = false;
|
||||
setTimeout(function() {
|
||||
if (document.querySelectorAll('.activeField .focusOn')[0]) {
|
||||
console.log(document.querySelectorAll('.activeField .focusOn')[0]);
|
||||
//console.log(document.querySelectorAll('.activeField .focusOn')[0]);
|
||||
document.querySelectorAll('.activeField .focusOn')[0].focus();
|
||||
} else {
|
||||
//console.log(document.querySelectorAll('.activeField input')[0]);
|
||||
document.querySelectorAll('.activeField input')[0].focus();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}else {
|
||||
setTimeout(function() {
|
||||
if (document.querySelectorAll('.activeField .focusOn')[0]) {
|
||||
//console.log(document.querySelectorAll('.activeField .focusOn')[0]);
|
||||
document.querySelectorAll('.activeField .focusOn')[0].focus();
|
||||
} else {
|
||||
document.querySelectorAll('.activeField input')[0].focus();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$rootScope.nextField = $scope.nextField = function(){
|
||||
//console.log('nextfield');
|
||||
//console.log($scope.selected.index);
|
||||
//console.log($scope.myform.form_fields.length-1);
|
||||
//console.log($scope.myform.visible_form_fields.length-1);
|
||||
var selected_index, selected_id;
|
||||
if($scope.selected.index < $scope.myform.form_fields.length-1){
|
||||
if($scope.selected.index < $scope.myform.visible_form_fields.length-1){
|
||||
selected_index = $scope.selected.index+1;
|
||||
selected_id = $scope.myform.form_fields[selected_index]._id;
|
||||
selected_id = $scope.myform.visible_form_fields[selected_index]._id;
|
||||
$rootScope.setActiveField(selected_id, selected_index, true);
|
||||
} else if($scope.selected.index === $scope.myform.form_fields.length-1) {
|
||||
console.log('Second last element');
|
||||
} else if($scope.selected.index === $scope.myform.visible_form_fields.length-1) {
|
||||
//console.log('Second last element');
|
||||
selected_index = $scope.selected.index+1;
|
||||
selected_id = 'submit_field';
|
||||
$rootScope.setActiveField(selected_id, selected_index, true);
|
||||
|
@ -134,7 +148,7 @@ angular.module('forms').directive('submitFormDirective', ['$http', 'TimeCounter'
|
|||
$rootScope.prevField = $scope.prevField = function(){
|
||||
if($scope.selected.index > 0){
|
||||
var selected_index = $scope.selected.index - 1;
|
||||
var selected_id = $scope.myform.form_fields[selected_index]._id;
|
||||
var selected_id = $scope.myform.visible_form_fields[selected_index]._id;
|
||||
$scope.setActiveField(selected_id, selected_index, true);
|
||||
}
|
||||
};
|
||||
|
@ -144,8 +158,8 @@ angular.module('forms').directive('submitFormDirective', ['$http', 'TimeCounter'
|
|||
*/
|
||||
$scope.exitStartPage = function(){
|
||||
$scope.myform.startPage.showStart = false;
|
||||
if($scope.myform.form_fields.length > 0){
|
||||
$scope.selected._id = $scope.myform.form_fields[0]._id;
|
||||
if($scope.myform.visible_form_fields.length > 0){
|
||||
$scope.selected._id = $scope.myform.visible_form_fields[0]._id;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -11,11 +11,10 @@
|
|||
<span class="required-error" ng-show="!field.required">optional</span>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="col-xs-12 field-input ">
|
||||
<ui-select ng-model="field.fieldValue"
|
||||
<div class="col-xs-12 field-input">
|
||||
<ui-select ng-model="field.fieldValue"
|
||||
theme="selectize"
|
||||
ng-model-options="{ debounce: 250 }"
|
||||
ng-required="field.required"
|
||||
ng-required="field.required"
|
||||
ng-disabled="field.disabled"
|
||||
ng-change="$root.nextField()">
|
||||
<ui-select-match placeholder="Type or select an option">
|
||||
|
|
Loading…
Reference in a new issue