-
Notifications
You must be signed in to change notification settings - Fork 780
Show channel description on long press #3101
Show channel description on long press #3101
Conversation
Signed-off-by: Aoun Bukhari <bukhari@itemis.de>
$scope.showDescription=function(channel,channelType){ | ||
var popup = $mdDialog.alert({ | ||
title: channel.label?channel.label:channel.channelType?channel.channelType.label:channel.id, | ||
textContent: channel.description?channel.description:channel.channelType?channel.channelType.description:'No description available', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of showing "No description available", might it make more sense to only offer the long press on channels where there is a description available?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be, but then user might keep on trying to open the dialog and think its broken?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be. But then again, the description is localized and thus should be the "no description" message, if possible (which it isn't ;-)).
At many other places, a long press does nothing, so I think it is an expected situation that "nothing happens" means "nothing available" and not "all broken" ;-)
@@ -575,6 +575,20 @@ angular.module('PaperUI.controllers.configuration', [ 'PaperUI.constants' ]).con | |||
$scope.hasProperties = function(properties) { | |||
return util.hasProperties(properties); | |||
} | |||
|
|||
$scope.showDescription=function(channel,channelType){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a space before the curly bracket?
Signed-off-by: Aoun Bukhari <bukhari@itemis.de>
Updated. |
<h3 ng-if="!channel.label && !channel.channelType.label">{{channel.id}}</h3> | ||
<p> | ||
{{thing.UID + ':' + channel.id}}<i ng-show="advancedMode" class="material-icons copy-clipboard" copyclipboard="{{thing.UID + ':' + channel.id}}">content_copy</i> | ||
</p> | ||
<p ng-if="channel.description" ng-bind-html="channel.description"></p> | ||
<p ng-if="!channel.description && channel.channelType.description" ng-bind-html="channel.channelType.description"></p> | ||
<p>{{channel.itemType}}</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
something seems to be wrong with the indentation here.
Signed-off-by: Aoun Bukhari <bukhari@itemis.de>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
fixes issue reported here: #3051 (comment)
Signed-off-by: Aoun Bukhari bukhari@itemis.de