Skip to content

Commit

Permalink
fix: Added description attribute (#226)
Browse files Browse the repository at this point in the history
* Added description attribute to image element and removed formatting,
  as formatting for title and description can be applied in the Assistant workspace
  • Loading branch information
Steve Green authored and germanattanasio committed Feb 7, 2019
1 parent fcbc8f5 commit e7a516e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 0 additions & 4 deletions public/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,3 @@ html{
cursor: pointer;
display: inline-block;
}

.description-area {
font-style: italic;
}
6 changes: 3 additions & 3 deletions public/js/conversation.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,18 +234,18 @@ var ConversationPanel = (function () {
}

function getResponse(responses, gen) {
var title = '';
var title = '', description = '';
if (gen.hasOwnProperty('title')) {
title = gen.title;
}
if (gen.hasOwnProperty('description')) {
var description = '<div class="description-area">' + gen.description + '</div>';
description = '<div>' + gen.description + '</div>';
}
if (gen.response_type === 'image') {
var img = '<div><img src="' + gen.source + '" width="300"></div>';
responses.push({
type: gen.response_type,
innerhtml: title + img
innerhtml: title + description + img
});
} else if (gen.response_type === 'text') {
responses.push({
Expand Down

0 comments on commit e7a516e

Please sign in to comment.