Resolves lookup issues blocking job template creation flow

@NoIssue
This commit is contained in:
Leigh Johnson 2016-10-31 18:18:03 -04:00
parent 43fbff7e8c
commit b281d475f7
3 changed files with 7 additions and 10 deletions

View File

@ -54,7 +54,10 @@
default_val: false
});
CallbackHelpInit({ scope: $scope });
ParseTypeChange({ scope: $scope, field_id: 'job_template_variables', onChange: callback });
SurveyControllerInit({
scope: $scope,
parent_scope: $scope
});
}
callback = function() {
@ -62,10 +65,6 @@
$scope[form.name + '_form'].$setDirty();
};
SurveyControllerInit({
scope: $scope,
parent_scope: $scope
});
var selectCount = 0;
@ -73,6 +72,7 @@
$scope.removeChoicesReady();
}
$scope.removeChoicesReady = $scope.$on('choicesReadyVerbosity', function () {
ParseTypeChange({ scope: $scope, field_id: 'job_template_variables', onChange: callback });
selectCount++;
if (selectCount === 3) {
var verbosity;
@ -120,8 +120,6 @@
element:'#job_template_verbosity',
multiple: false
});
$scope.$emit('lookUpInitialize');
}
});

View File

@ -517,7 +517,6 @@ angular.module('Utilities', ['RestServices', 'Utilities', 'sanitizeFilter'])
function($rootScope) {
return function(directive) {
/* @todo re-enable
var docw, doch, spinnyw, spinnyh;
if (directive === 'start' && !$rootScope.waiting) {
$rootScope.waiting = true;
@ -538,7 +537,6 @@ angular.module('Utilities', ['RestServices', 'Utilities', 'sanitizeFilter'])
$rootScope.waiting = false;
});
}
*/
};
}
])

View File

@ -363,7 +363,7 @@ export default ['$injector', '$stateExtender', '$log', function($injector, $stat
function buildFieldDefinition(field) {
let state = $stateExtender.buildDefinition({
searchPrefix: field.sourceModel,
squashSearchUrl: true,
//squashSearchUrl: true, @issue enable
name: `${formStateDefinition.name}.${field.sourceModel}`,
url: `/${field.sourceModel}`,
// a lookup field's basePath takes precedence over generic list definition's basePath, if supplied
@ -391,6 +391,7 @@ export default ['$injector', '$stateExtender', '$log', function($injector, $stat
},
resolve: {
ListDefinition: [field.list, function(list) {
list.iterator = field.sourceModel;
return list;
}],
Dataset: ['ListDefinition', 'QuerySet', '$stateParams', 'GetBasePath', '$interpolate', '$rootScope', '$state',