Fixes focus in Feedback and makes animation configurable.

This commit is contained in:
yanas 2016-09-19 23:25:03 -05:00
parent 4572e1d344
commit 2d2915967c
4 changed files with 19 additions and 10 deletions

View File

@ -48,7 +48,7 @@ $dominantSpeakerBg: #165ecc;
$raiseHandBg: #D6D61E; $raiseHandBg: #D6D61E;
$rateStarDefault: #ccc; $rateStarDefault: #ccc;
$rateStarActivity: #f6c342; $rateStarActivity: #165ecc;
$rateStarLabelColor: #333; $rateStarLabelColor: #333;
/** /**
@ -64,7 +64,7 @@ $toolbarZ: 900;
$overlayZ: 800; $overlayZ: 800;
/** /**
* Font Colors TODO: change according the design * Font Colors TODO: Change colors when general dialogs are implemented.
*/ */
$defaultFontColor: #777; $defaultFontColor: #777;
$defaultLightFontColor: #F1F1F1; $defaultLightFontColor: #F1F1F1;

View File

@ -102,8 +102,8 @@
&__details { &__details {
text-align: left; text-align: left;
textarea { textarea {
resize: vertical;
min-height: 100px; min-height: 100px;
width: 100%;
} }
} }
} }

View File

@ -38,5 +38,7 @@ var interfaceConfig = {
LOCAL_THUMBNAIL_RATIO_WIDTH: 16, LOCAL_THUMBNAIL_RATIO_WIDTH: 16,
LOCAL_THUMBNAIL_RATIO_HEIGHT: 9, LOCAL_THUMBNAIL_RATIO_HEIGHT: 9,
REMOTE_THUMBNAIL_RATIO_WIDTH: 1, REMOTE_THUMBNAIL_RATIO_WIDTH: 1,
REMOTE_THUMBNAIL_RATIO_HEIGHT: 1 REMOTE_THUMBNAIL_RATIO_HEIGHT: 1,
// Enables feedback star animation.
ENABLE_FEEDBACK_ANIMATION: false
}; };

View File

@ -48,12 +48,17 @@ let constructDetailedFeedbackHtml = function() {
* @returns {string} the contructed html string * @returns {string} the contructed html string
*/ */
let createRateFeedbackHTML = function (Feedback) { let createRateFeedbackHTML = function (Feedback) {
var rateExperience = APP.translation.translateString('dialog.rateExperience'), let rateExperience
= APP.translation.translateString('dialog.rateExperience'),
feedbackHelp = APP.translation.translateString('dialog.feedbackHelp'), feedbackHelp = APP.translation.translateString('dialog.feedbackHelp'),
feedbackQuestion = (Feedback.feedbackScore < 0) feedbackQuestion = (Feedback.feedbackScore < 0)
? `<p><br/>${APP.translation.translateString('dialog.feedbackQuestion')}</p>` ? `<p><br/>${APP.translation.translateString('dialog.feedbackQuestion')}</p>`
: ''; : '';
let starClassName = (interfaceConfig.ENABLE_FEEDBACK_ANIMATION)
? "icon-star shake-rotate"
: "icon-star";
return ` return `
<div class="aui-dialog2-content feedback__content"> <div class="aui-dialog2-content feedback__content">
${feedbackQuestion} ${feedbackQuestion}
@ -63,19 +68,19 @@ let createRateFeedbackHTML = function (Feedback) {
<p class="star-label">&nbsp;</p> <p class="star-label">&nbsp;</p>
<div id="stars" class="feedback-stars"> <div id="stars" class="feedback-stars">
<a class="star-btn"> <a class="star-btn">
<i class="icon-star shake-rotate"></i> <i class=${ starClassName }></i>
</a> </a>
<a class="star-btn"> <a class="star-btn">
<i class="icon-star shake-rotate"></i> <i class=${ starClassName }></i>
</a> </a>
<a class="star-btn"> <a class="star-btn">
<i class="icon-star shake-rotate"></i> <i class=${ starClassName }></i>
</a> </a>
<a class="star-btn"> <a class="star-btn">
<i class="icon-star shake-rotate"></i> <i class=${ starClassName }></i>
</a> </a>
<a class="star-btn"> <a class="star-btn">
<i class="icon-star shake-rotate"></i> <i class=${ starClassName }></i>
</a> </a>
</div> </div>
<p>&nbsp;</p> <p>&nbsp;</p>
@ -140,6 +145,8 @@ let onLoadDetailedFunction = function(Feedback) {
Feedback.hide(); Feedback.hide();
}); });
} }
$('#feedbackTextArea').focus();
}; };
/** /**