1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00

Merge pull request #56 from mabashian/7234-delete-survey-questions

Fixed bug deleting survey questions
This commit is contained in:
Michael Abashian 2017-07-26 09:46:50 -04:00 committed by GitHub
commit 3a91169726
3 changed files with 10 additions and 6 deletions

View File

@ -22,7 +22,7 @@
<div class="SurveyMaker-header">
<div class="SurveyMaker-title">
<div class="SurveyMaker-titleText">{{name || "New Job Template"}}<div class="SurveyMaker-titleLockup"></div>SURVEY</div>
<div class="ScheduleToggle" ng-class="{'is-on': survey_enabled}" aw-tool-tip="surveyEnabledTooltip" data-placement="right" data-tip-watch="surveyEnabledTooltip">
<div class="ScheduleToggle" ng-class="{'is-on': survey_enabled}" aw-tool-tip="surveyEnabledTooltip" data-container="#survey-modal-dialog" data-placement="right" data-tip-watch="surveyEnabledTooltip">
<button ng-show="survey_enabled" class="ScheduleToggle-switch is-on" ng-click="toggleSurveyEnabled()" translate>ON</button>
<button ng-show="!survey_enabled" class="ScheduleToggle-switch" ng-click="toggleSurveyEnabled()" translate>OFF</button>
</div>
@ -56,17 +56,17 @@
<i>{{question.question_description}}</i>
</div>
<div class="SurveyMaker-previewInputRow">
<span dnd-handle class="SurveyMaker-reorderButton" data-placement="top" aw-tool-tip="Drag to reorder question" data-original-title="" title="" ng-show="(job_template_obj.summary_fields.user_capabilities.edit || workflow_job_template_obj.summary_fields.user_capabilities.edit || canAdd)">
<span dnd-handle class="SurveyMaker-reorderButton" data-placement="top" aw-tool-tip="Drag to reorder question" data-container="#survey-modal-dialog" data-original-title="" title="" ng-show="(job_template_obj.summary_fields.user_capabilities.edit || workflow_job_template_obj.summary_fields.user_capabilities.edit || canAdd)">
<i class="fa fa-ellipsis-v"></i>
<span>&nbsp;</span>
<i class="fa fa-ellipsis-v"></i>
</span>
<survey-question class="SurveyMaker-previewInput" preview="true" question="question" ng-required="question.required" ng-disabled=true></survey-question>
<div class="SurveyMaker-previewActions" ng-show="(job_template_obj.summary_fields.user_capabilities.edit || workflow_job_template_obj.summary_fields.user_capabilities.edit || canAdd)">
<button class="List-actionButton" data-placement="top" ng-class="{'SurveyMaker-previewActions--selected' : editQuestionIndex == $index}" ng-click="editQuestion($index)" aw-tool-tip="Edit question" data-original-title="" title="">
<button class="List-actionButton" data-placement="top" ng-class="{'SurveyMaker-previewActions--selected' : editQuestionIndex == $index}" ng-click="editQuestion($index)" aw-tool-tip="Edit question" data-container="#survey-modal-dialog" data-original-title="" title="">
<i class="fa fa-pencil"></i>
</button>
<button class="List-actionButton List-actionButton--delete" data-placement="top" ng-click="showDeleteQuestion($index)" aw-tool-tip="Delete question" data-original-title="" title="">
<button class="List-actionButton List-actionButton--delete" data-placement="top" ng-click="showDeleteQuestion($index)" aw-tool-tip="Delete question" data-container="#survey-modal-dialog" data-original-title="" title="">
<i class="fa fa-trash-o"></i>
</button>
</div>

View File

@ -804,6 +804,7 @@ function(ConfigurationUtils, i18n, $rootScope) {
link: function(scope, element, attrs) {
var delay = { show: 200, hide: 0 },
placement,
container,
stateChangeWatcher;
if (attrs.awTipPlacement) {
placement = attrs.awTipPlacement;
@ -811,6 +812,8 @@ function(ConfigurationUtils, i18n, $rootScope) {
placement = (attrs.placement !== undefined && attrs.placement !== null) ? attrs.placement : 'left';
}
container = attrs.container ? attrs.container : 'body';
var template, custom_class;
if (attrs.tooltipInnerClass || attrs.tooltipinnerclass) {
custom_class = attrs.tooltipInnerClass || attrs.tooltipinnerclass;
@ -849,7 +852,7 @@ function(ConfigurationUtils, i18n, $rootScope) {
delay: delay,
html: true,
title: attrs.awToolTip,
container: 'body',
container: container,
trigger: 'hover',
template: template
});

View File

@ -6,7 +6,8 @@ module.exports = {
partials: {
files: [
'client/lib/components/**/*.partial.html',
'client/src/**/*.partial.html'
'client/src/**/*.partial.html',
'client/src/partials/*.html'
],
tasks: ['newer:copy:partials']
},