Added escaping for Add JT -> create survey

the service for the escaping for the html was not included in the JT add function
This commit is contained in:
Jared Tabor 2015-02-02 10:23:24 -05:00
parent 208e08410f
commit 57e2548265
2 changed files with 7 additions and 9 deletions

View File

@ -337,8 +337,7 @@ function JobTemplatesAdd($scope, $rootScope, $compile, $location, $log, $routePa
SurveyControllerInit({
scope: $scope,
parent_scope: $scope,
// iterator: 'schedule'
parent_scope: $scope
});
// Update playbook select whenever project value changes
@ -556,7 +555,7 @@ function JobTemplatesEdit($scope, $rootScope, $compile, $location, $log, $routeP
Alert, ProcessErrors, LoadBreadCrumbs, RelatedSearchInit, RelatedPaginateInit, ReturnToCaller, ClearScope, InventoryList,
CredentialList, ProjectList, LookUpInit, GetBasePath, md5Setup, ParseTypeChange, JobStatusToolTip, FormatDate,
Wait, Stream, Empty, Prompt, ParseVariableString, ToJSON, SchedulesControllerInit, JobsControllerInit, JobsListUpdate,
GetChoices, SchedulesListInit, SchedulesList, CallbackHelpInit, PlaybookRun, SurveyControllerInit, $sce){
GetChoices, SchedulesListInit, SchedulesList, CallbackHelpInit, PlaybookRun, SurveyControllerInit){
ClearScope();
@ -595,8 +594,7 @@ function JobTemplatesEdit($scope, $rootScope, $compile, $location, $log, $routeP
SurveyControllerInit({
scope: $scope,
parent_scope: $scope,
id: id,
sce: $sce
id: id
});
callback = function() {
@ -1069,5 +1067,5 @@ JobTemplatesEdit.$inject = ['$scope', '$rootScope', '$compile', '$location', '$l
'ReturnToCaller', 'ClearScope', 'InventoryList', 'CredentialList', 'ProjectList', 'LookUpInit',
'GetBasePath', 'md5Setup', 'ParseTypeChange', 'JobStatusToolTip', 'FormatDate', 'Wait', 'Stream', 'Empty', 'Prompt',
'ParseVariableString', 'ToJSON', 'SchedulesControllerInit', 'JobsControllerInit', 'JobsListUpdate', 'GetChoices',
'SchedulesListInit', 'SchedulesList', 'CallbackHelpInit', 'PlaybookRun' , 'SurveyControllerInit', '$sce'
'SchedulesListInit', 'SchedulesList', 'CallbackHelpInit', 'PlaybookRun' , 'SurveyControllerInit'
];

View File

@ -459,9 +459,9 @@ angular.module('SurveyHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper',
}])
.factory('SurveyControllerInit', ['$location', 'DeleteSurvey', 'EditSurvey', 'AddSurvey', 'GenerateForm', 'SurveyQuestionForm', 'Wait', 'Alert',
'GetBasePath', 'Rest', 'ProcessErrors' , '$compile', 'FinalizeQuestion', 'EditQuestion',
'GetBasePath', 'Rest', 'ProcessErrors' , '$compile', 'FinalizeQuestion', 'EditQuestion', '$sce',
function($location, DeleteSurvey, EditSurvey, AddSurvey, GenerateForm, SurveyQuestionForm, Wait, Alert,
GetBasePath, Rest, ProcessErrors, $compile, FinalizeQuestion, EditQuestion) {
GetBasePath, Rest, ProcessErrors, $compile, FinalizeQuestion, EditQuestion, $sce) {
return function(params) {
var scope = params.scope,
id = params.id,
@ -481,7 +481,7 @@ angular.module('SurveyHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper',
];
scope.serialize = function(expression){
return scope.sce.getTrustedHtml(expression);
return $sce.getTrustedHtml(expression);
};
scope.deleteSurvey = function() {