From 006da3219a0465c03668c7dfb7dbd4fcd2833e26 Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Fri, 26 Sep 2014 13:34:46 -0400 Subject: [PATCH] made SM fields readonly/disabled and adjusted opacity --- awx/ui/static/js/helpers/Survey.js | 12 +++++++----- awx/ui/static/less/survey-maker.less | 4 +--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/awx/ui/static/js/helpers/Survey.js b/awx/ui/static/js/helpers/Survey.js index c54c282656..886f0cfbfe 100644 --- a/awx/ui/static/js/helpers/Survey.js +++ b/awx/ui/static/js/helpers/Survey.js @@ -290,13 +290,13 @@ angular.module('SurveyHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper', if(question.type === 'text' ){ html+='
'+ '
'+ - ''+ + ''+ '
'; } if(question.type === "textarea"){ html+='
'+ '
'+ - ''+ + ''+ '
'; } if(question.type === 'multiplechoice' || question.type === "multiselect"){ @@ -306,7 +306,7 @@ angular.module('SurveyHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper', for( i = 0; i'+ - '' +choices[i]+ + '' +choices[i]+ ''; } @@ -316,7 +316,7 @@ angular.module('SurveyHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper', max = (question.max) ? question.max : "" ; html+='
'+ '
'+ - ''+ + ''+ '
'; } @@ -331,6 +331,7 @@ angular.module('SurveyHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper', element = angular.element(document.getElementById('question_'+question.index)); // element.html(html); + element.css('opacity', 0.7); $compile(element)(scope); // var questionScope = scope.$new; @@ -362,10 +363,11 @@ angular.module('SurveyHelper', [ 'Utilities', 'RestServices', 'SchedulesHelper', index = params.index, element, fld, i, form = SurveyQuestionForm; + $('#add_question_btn').hide(); $('#new_question .aw-form-well').remove(); element = $('.question_final:eq('+index+')'); - // element.attr('id', 'question_'+index); + element.css('opacity', 1.0); element.empty(); // $('#new_question .aw-form-well').remove(); GenerateForm.inject(form, { id: 'question_'+index, mode: 'edit' , scope:scope, breadCrumbs: false}); diff --git a/awx/ui/static/less/survey-maker.less b/awx/ui/static/less/survey-maker.less index fbb0b4ec0f..2847657e56 100644 --- a/awx/ui/static/less/survey-maker.less +++ b/awx/ui/static/less/survey-maker.less @@ -37,9 +37,7 @@ border-top: 1px dashed; border-color: rgb(204,204,204); border-radius: 4px; - /* opacity: 0.7; - - */ + opacity: 0.7; padding: 5px; position: relative; .final{