From 2d2915967c664def10df220dbcdc35a72125d5e4 Mon Sep 17 00:00:00 2001 From: yanas Date: Mon, 19 Sep 2016 23:25:03 -0500 Subject: [PATCH] Fixes focus in Feedback and makes animation configurable. --- css/_variables.scss | 4 ++-- css/modals/feedback/_feedback.scss | 2 +- interface_config.js | 4 +++- modules/UI/feedback/FeedbackWindow.js | 19 +++++++++++++------ 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/css/_variables.scss b/css/_variables.scss index 1f1302d43..4ea67fbad 100644 --- a/css/_variables.scss +++ b/css/_variables.scss @@ -48,7 +48,7 @@ $dominantSpeakerBg: #165ecc; $raiseHandBg: #D6D61E; $rateStarDefault: #ccc; -$rateStarActivity: #f6c342; +$rateStarActivity: #165ecc; $rateStarLabelColor: #333; /** @@ -64,7 +64,7 @@ $toolbarZ: 900; $overlayZ: 800; /** - * Font Colors TODO: change according the design + * Font Colors TODO: Change colors when general dialogs are implemented. */ $defaultFontColor: #777; $defaultLightFontColor: #F1F1F1; diff --git a/css/modals/feedback/_feedback.scss b/css/modals/feedback/_feedback.scss index da4400d09..50cf92324 100644 --- a/css/modals/feedback/_feedback.scss +++ b/css/modals/feedback/_feedback.scss @@ -102,8 +102,8 @@ &__details { text-align: left; textarea { - resize: vertical; min-height: 100px; + width: 100%; } } } diff --git a/interface_config.js b/interface_config.js index b96556fc6..2c1987011 100644 --- a/interface_config.js +++ b/interface_config.js @@ -38,5 +38,7 @@ var interfaceConfig = { LOCAL_THUMBNAIL_RATIO_WIDTH: 16, LOCAL_THUMBNAIL_RATIO_HEIGHT: 9, REMOTE_THUMBNAIL_RATIO_WIDTH: 1, - REMOTE_THUMBNAIL_RATIO_HEIGHT: 1 + REMOTE_THUMBNAIL_RATIO_HEIGHT: 1, + // Enables feedback star animation. + ENABLE_FEEDBACK_ANIMATION: false }; diff --git a/modules/UI/feedback/FeedbackWindow.js b/modules/UI/feedback/FeedbackWindow.js index b7f64544e..5807aaee8 100644 --- a/modules/UI/feedback/FeedbackWindow.js +++ b/modules/UI/feedback/FeedbackWindow.js @@ -48,12 +48,17 @@ let constructDetailedFeedbackHtml = function() { * @returns {string} the contructed html string */ let createRateFeedbackHTML = function (Feedback) { - var rateExperience = APP.translation.translateString('dialog.rateExperience'), + let rateExperience + = APP.translation.translateString('dialog.rateExperience'), feedbackHelp = APP.translation.translateString('dialog.feedbackHelp'), feedbackQuestion = (Feedback.feedbackScore < 0) ? `


${APP.translation.translateString('dialog.feedbackQuestion')}

` : ''; + let starClassName = (interfaceConfig.ENABLE_FEEDBACK_ANIMATION) + ? "icon-star shake-rotate" + : "icon-star"; + return `
${feedbackQuestion} @@ -63,19 +68,19 @@ let createRateFeedbackHTML = function (Feedback) {

 

 

@@ -140,6 +145,8 @@ let onLoadDetailedFunction = function(Feedback) { Feedback.hide(); }); } + + $('#feedbackTextArea').focus(); }; /**