fixed dropdowns for configure admin panel

This commit is contained in:
David Baldwynn 2017-11-01 19:13:53 -07:00
parent eaea95078c
commit 5120a2f287
7 changed files with 20 additions and 24 deletions

View File

@ -3,6 +3,8 @@ extends layout.server.view.pug
block content
section.content(ui-view='', ng-cloak='')
link(rel='stylesheet', href='https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.8.5/css/selectize.default.css')
link(rel='stylesheet', href='/static/lib/jquery-ui/themes/flick/jquery-ui.min.css')
script(src='/static/lib/file-saver.js/FileSaver.js', type='text/javascript')
//Embedding The User Object

View File

@ -32,7 +32,6 @@
"raven-js": "^3.0.4",
"tableExport.jquery.plugin": "^1.5.1",
"js-yaml": "^3.6.1",
"angular-ui-select": "https://github.com/tellform/ui-select.git#compiled",
"angular-translate": "~2.11.0",
"ng-translate": "*",
"deep-diff": "^0.3.4",
@ -42,17 +41,18 @@
"socket.io-client": "^1.7.2",
"css-toggle-switch": "^4.0.2",
"angular-strap": "^2.3.12",
"textAngular": "^1.5.16"
"textAngular": "^1.5.16",
"angular-ui-select": "^0.19.8"
},
"resolutions": {
"angular-bootstrap": "^0.14.0",
"angular": "1.4.14",
"angular-ui-select": "compiled",
"jspdf": "~1.0.178",
"angular-sanitize": "1.4.14",
"angular-ui-sortable": "^0.17.1",
"angular-ui-date": "~0.0.11",
"angular-input-stars-directive": "master"
"angular-input-stars-directive": "master",
"angular-ui-select": "^0.19.8"
},
"overrides": {
"BOWER-PACKAGE": {

View File

@ -285,8 +285,6 @@ angular.module('view-form').directive('submitFormDirective', ['$http', 'TimeCoun
};
$rootScope.prevField = $scope.prevField = function(){
console.log('prevField');
console.log($scope.selected);
var selected_index = $scope.selected.index - 1;
if($scope.selected.index > 0){
$scope.setActiveField(null, selected_index, true);

View File

@ -26,4 +26,9 @@
.email-subject.ta-root .ta-scroll-window > .ta-bind {
min-height: 0;
outline: 0;
}
.ui-select input.form-control {
height: 34px;
padding: 6px;
}

View File

@ -32,11 +32,12 @@ angular.module('forms').directive('configureFormDirective', ['$rootScope', '$fil
}
];
$rootScope.emailFields = $scope.myform.form_fields.filter(function(field){
$scope.emailFields = $scope.myform.form_fields.filter(function(field){
return field.fieldType === 'email';
});
$scope.formHasEmailField = ($rootScope.emailFields.length > 0);
console.log($scope.emailFields);
$scope.formHasEmailField = ($scope.emailFields.length > 0);
$scope.go = function(tab){
tab.active = true;

View File

@ -6,16 +6,11 @@
</div>
<div class="col-xs-12 field-input">
<ui-select ng-model="myform.respondentNotifications.toField"
theme="selectize"
search-enabled="true"
search-by="title"
set-search-to-answer="true"
ng-required="true">
<ui-select ng-model="myform.respondentNotifications.toField" theme="selectize">
<ui-select-match placeholder="{{ 'OPTION_PLACEHOLDER' | translate }}">
{{$select.selected.title}}
</ui-select-match>
<ui-select-choices repeat="field.globalId as field in $root.emailFields | filter: { title: $select.search }">
<ui-select-choices repeat="field.globalId as field in emailFields | filter: { title: $select.search }">
<span ng-bind-html="field.title | highlight: $select.search">
</span>
</ui-select-choices>

View File

@ -18,17 +18,12 @@
<h5>{{ 'REPLY_TO' | translate }}</h5>
</div>
<div class="col-xs-12 field-input">
<ui-select ng-model="myform.selfNotifications.fromField"
theme="selectize"
search-enabled="true"
search-by="title"
set-search-to-answer="true"
ng-required="true">
<div class="col-xs-12 ui-select">
<ui-select ng-model="myform.selfNotifications.fromField" theme="selectize">
<ui-select-match placeholder="{{ 'OPTION_PLACEHOLDER' | translate }}">
{{$select.selected.title}}
{{$select.selected.title}}
</ui-select-match>
<ui-select-choices repeat="field.globalId as field in $root.emailFields | filter: { title: $select.search }">
<ui-select-choices repeat="field.globalId as field in emailFields | filter: { title: $select.search }">
<span ng-bind-html="field.title | highlight: $select.search">
</span>
</ui-select-choices>