Commit 28d0562f authored by Lena Gunn's avatar Lena Gunn

Renamed files and components and added copy and link to the help panel

parent 22965bd4
...@@ -46,7 +46,7 @@ module.exports = function AppController( ...@@ -46,7 +46,7 @@ module.exports = function AppController(
// App dialogs // App dialogs
$scope.accountDialog = {visible: false}; $scope.accountDialog = {visible: false};
$scope.shareDialog = {visible: false}; $scope.shareDialog = {visible: false};
$scope.aboutThisVersionDialog = {visible: false}; $scope.helpPanel = {visible: false};
// Check to see if we're in the sidebar, or on a standalone page such as // Check to see if we're in the sidebar, or on a standalone page such as
// the stream page or an individual annotation page. // the stream page or an individual annotation page.
......
...@@ -128,16 +128,16 @@ module.exports = angular.module('h', [ ...@@ -128,16 +128,16 @@ module.exports = angular.module('h', [
.controller('StreamController', require('./stream-controller')) .controller('StreamController', require('./stream-controller'))
.controller('WidgetController', require('./widget-controller')) .controller('WidgetController', require('./widget-controller'))
.directive('aboutThisVersionDialog', require('./directive/about-this-version-dialog'))
.directive('annotation', require('./directive/annotation').directive) .directive('annotation', require('./directive/annotation').directive)
.directive('annotationShareDialog', require('./directive/annotation-share-dialog')) .directive('annotationShareDialog', require('./directive/annotation-share-dialog'))
.directive('annotationThread', require('./directive/annotation-thread')) .directive('annotationThread', require('./directive/annotation-thread'))
.directive('dropdownMenuBtn', require('./directive/dropdown-menu-btn')) .directive('dropdownMenuBtn', require('./directive/dropdown-menu-btn'))
.directive('excerpt', require('./directive/excerpt').directive) .directive('excerpt', require('./directive/excerpt').directive)
.directive('feedbackLink', require('./directive/feedback-link'))
.directive('formInput', require('./directive/form-input')) .directive('formInput', require('./directive/form-input'))
.directive('formValidate', require('./directive/form-validate')) .directive('formValidate', require('./directive/form-validate'))
.directive('groupList', require('./directive/group-list').directive) .directive('groupList', require('./directive/group-list').directive)
.directive('helpLink', require('./directive/help-link'))
.directive('helpPanel', require('./directive/help-panel'))
.directive('hAutofocus', require('./directive/h-autofocus')) .directive('hAutofocus', require('./directive/h-autofocus'))
.directive('hTooltip', require('./directive/h-tooltip')) .directive('hTooltip', require('./directive/h-tooltip'))
.directive('loggedoutMessage', require('./directive/loggedout-message')) .directive('loggedoutMessage', require('./directive/loggedout-message'))
......
...@@ -5,7 +5,7 @@ module.exports = function () { ...@@ -5,7 +5,7 @@ module.exports = function () {
bindToController: true, bindToController: true,
controllerAs: 'vm', controllerAs: 'vm',
restrict: 'E', restrict: 'E',
template: require('../../../templates/client/feedback_link.html'), template: require('../../../templates/client/help_link.html'),
controller: function () {}, controller: function () {},
scope: { scope: {
version: '<', version: '<',
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/** /**
* @ngdoc directive * @ngdoc directive
* @name aboutThisVersionDialog * @name helpPanel
* @description Displays product version and environment info * @description Displays product version and environment info
*/ */
// @ngInject // @ngInject
...@@ -30,7 +30,7 @@ module.exports = function () { ...@@ -30,7 +30,7 @@ module.exports = function () {
); );
}, },
restrict: 'E', restrict: 'E',
template: require('../../../templates/client/about_this_version_dialog.html'), template: require('../../../templates/client/help_panel.html'),
scope: { scope: {
auth: '<', auth: '<',
onClose: '&', onClose: '&',
......
...@@ -17,7 +17,7 @@ module.exports = function () { ...@@ -17,7 +17,7 @@ module.exports = function () {
/** /**
* Called when the user clicks on the "About this version" text. * Called when the user clicks on the "About this version" text.
*/ */
onShowAboutVersionDialog: '&', onShowHelpPanel: '&',
/** /**
* Called when the user clicks on the "Sign in" text. * Called when the user clicks on the "Sign in" text.
*/ */
......
...@@ -6,7 +6,7 @@ module.exports = function () { ...@@ -6,7 +6,7 @@ module.exports = function () {
scope: { scope: {
auth: '<', auth: '<',
isSidebar: '<', isSidebar: '<',
onShowAboutVersionDialog: '&', onShowHelpPanel: '&',
onLogin: '&', onLogin: '&',
onLogout: '&', onLogout: '&',
onSharePage: '&', onSharePage: '&',
......
...@@ -8,7 +8,6 @@ $base-line-height: 20px; ...@@ -8,7 +8,6 @@ $base-line-height: 20px;
// Components // Components
// ---------- // ----------
@import './about-this-version-dialog';
@import './annotation'; @import './annotation';
@import './annotation-share-dialog'; @import './annotation-share-dialog';
@import './annotation-thread'; @import './annotation-thread';
...@@ -16,6 +15,7 @@ $base-line-height: 20px; ...@@ -16,6 +15,7 @@ $base-line-height: 20px;
@import './dropdown-menu-btn'; @import './dropdown-menu-btn';
@import './excerpt'; @import './excerpt';
@import './group-list'; @import './group-list';
@import './help-panel';
@import './loggedout-message'; @import './loggedout-message';
@import './markdown'; @import './markdown';
@import './primary-action-btn'; @import './primary-action-btn';
......
.about-this-version { .help-panel {
@include font-normal; @include font-normal;
background: $grey-3; background: $grey-3;
margin-bottom: .72em; margin-bottom: .72em;
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
border-radius: 2px; border-radius: 2px;
} }
.about-this-version-title { .help-panel-title {
color: $grey-6; color: $grey-6;
font-weight: bold; font-weight: bold;
// Margin between top of the dialog and // Margin between top of the dialog and
...@@ -14,28 +14,29 @@ ...@@ -14,28 +14,29 @@
margin-top: -5px; margin-top: -5px;
} }
.about-this-version-content { .help-panel-content {
// Margin between bottom of ascent of title and // Margin between bottom of ascent of title and
// top of x-height of content should be 20px. // top of x-height of content should be 20px.
margin-top: 11px; margin-top: 11px;
} }
.about-this-version-content__key { .help-panel-content__key {
width: 100px; width: 100px;
float: left; float: left;
color: $grey-4; color: $grey-4;
} }
.about-this-version-content__val { .help-panel-content__val {
word-wrap: break-word; word-wrap: break-word;
margin-left: 100px; margin-left: 100px;
} }
.about-this-version-content-feedback { .help-panel-content {
margin-top: 10px;
margin-bottom: 15px; margin-bottom: 15px;
} }
.about-this-version-content-feedback__link { .help-panel-content__link {
color: $grey-6; color: $grey-6;
&:hover { &:hover {
text-decoration: underline; text-decoration: underline;
......
<div class="about-this-version">
<i class="close h-icon-close"
role="button"
title="Close"
ng-click="vm.onClose()"></i>
<header class="about-this-version-title">
Help
</header>
<feedback-link
version="vm.version"
user-agent="vm.userAgent"
url="vm.url"
document-fingerprint="vm.documentFingerprint"
auth="vm.auth"
date-time="vm.dateTime">
</feedback-link>
<header class="about-this-version-title">
About this version
</header>
<dl class="about-this-version-content">
<dt class="about-this-version-content__key">Version: </dt>
<dd class="about-this-version-content__val">{{ vm.version }}</dd>
<dt class="about-this-version-content__key">User agent: </dt>
<dd class="about-this-version-content__val">{{ vm.userAgent }}</dd>
<dt class="about-this-version-content__key">URL: </dt>
<dd class="about-this-version-content__val">{{ vm.url }}</dd>
<div ng-if="vm.documentFingerprint">
<dt class="about-this-version-content__key">PDF fingerprint: </dt>
<dd class="about-this-version-content__val">{{ vm.documentFingerprint }}</dd>
</div>
<div ng-if="vm.auth.userid">
<dt class="about-this-version-content__key">Username: </dt>
<dd class="about-this-version-content__val">{{ vm.auth.username }}</dd>
</div>
<dt class="about-this-version-content__key">Date: </dt>
<dd class="about-this-version-content__val">{{ vm.dateTime | date:'dd MMM yyyy HH:mm:ss Z' }}</dd>
</div>
</div>
<div class="about-this-version-content-feedback">
<a class="about-this-version-content-feedback__link" href="mailto:support@hypothes.is?subject=Hypothesis%20support&amp;body=Version:%20{{ vm.version }}%0D%0AUser%20Agent:%20{{vm.userAgent}}%0D%0AURL:%20{{ vm.url }}%0D%0APDF%20fingerprint:%20{{ vm.documentFingerprint ? vm.documentFingerprint : '-' }}%0D%0AUsername:%20{{ vm.auth.username ? vm.auth.username : '-' }}%0D%0ADate:%20{{ vm.dateTime | date:'dd MMM yyyy HH:mm:ss Z' }} ">
Send us a message
</a>
</div>
<a class="help-panel-content__link" href="mailto:support@hypothes.is?subject=Hypothesis%20support&amp;body=Version:%20{{ vm.version }}%0D%0AUser%20Agent:%20{{vm.userAgent}}%0D%0AURL:%20{{ vm.url }}%0D%0APDF%20fingerprint:%20{{ vm.documentFingerprint ? vm.documentFingerprint : '-' }}%0D%0AUsername:%20{{ vm.auth.username ? vm.auth.username : '-' }}%0D%0ADate:%20{{ vm.dateTime | date:'dd MMM yyyy HH:mm:ss Z' }} ">
Send us a message
</a>
<div class="help-panel">
<i class="close h-icon-close"
role="button"
title="Close"
ng-click="vm.onClose()"></i>
<header class="help-panel-title">
Help
</header>
<div class="help-panel-content">
<help-link
version="vm.version"
user-agent="vm.userAgent"
url="vm.url"
document-fingerprint="vm.documentFingerprint"
auth="vm.auth"
date-time="vm.dateTime">
</help-link>
if you have any questions or want to give us feedback.
You can also visit our <a class="help-panel-content__link" href="/docs/help" target="_blank"> help documents.</a>
</div>
<header class="help-panel-title">
About this version
</header>
<dl class="help-panel-content">
<dt class="help-panel-content__key">Version: </dt>
<dd class="help-panel-content__val">{{ vm.version }}</dd>
<dt class="help-panel-content__key">User agent: </dt>
<dd class="help-panel-content__val">{{ vm.userAgent }}</dd>
<dt class="help-panel-content__key">URL: </dt>
<dd class="help-panel-content__val">{{ vm.url }}</dd>
<div ng-if="vm.documentFingerprint">
<dt class="help-panel-content__key">PDF fingerprint: </dt>
<dd class="help-panel-content__val">{{ vm.documentFingerprint }}</dd>
</div>
<div ng-if="vm.auth.userid">
<dt class="help-panel-content__key">Username: </dt>
<dd class="help-panel-content__val">{{ vm.auth.username }}</dd>
</div>
<dt class="help-panel-content__key">Date: </dt>
<dd class="help-panel-content__val">{{ vm.dateTime | date:'dd MMM yyyy HH:mm:ss Z' }}</dd>
</div>
</div>
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<a class="dropdown-menu__link" href="{{vm.serviceUrl}}profile" target="_blank">Account settings</a> <a class="dropdown-menu__link" href="{{vm.serviceUrl}}profile" target="_blank">Account settings</a>
</li> </li>
<li class="dropdown-menu__row"> <li class="dropdown-menu__row">
<a class="dropdown-menu__link" ng-click="vm.onShowAboutVersionDialog()">Help</a> <a class="dropdown-menu__link" ng-click="vm.onShowHelpPanel()">Help</a>
</li> </li>
<li class="dropdown-menu__row" ng-if="vm.auth.status === 'signed-in'"> <li class="dropdown-menu__row" ng-if="vm.auth.status === 'signed-in'">
<a class="dropdown-menu__link dropdown-menu__link--subtle" <a class="dropdown-menu__link dropdown-menu__link--subtle"
...@@ -58,10 +58,7 @@ ...@@ -58,10 +58,7 @@
<a class="dropdown-menu__link" href="{{vm.serviceUrl}}profile" target="_blank">Account</a> <a class="dropdown-menu__link" href="{{vm.serviceUrl}}profile" target="_blank">Account</a>
</li> </li>
<li class="dropdown-menu__row" > <li class="dropdown-menu__row" >
<a class="dropdown-menu__link" href="mailto:support@hypothes.is">Feedback</a> <a class="dropdown-menu__link" ng-click="vm.onShowHelpPanel()">Help</a>
</li>
<li class="dropdown-menu__row" >
<a class="dropdown-menu__link" href="{{vm.serviceUrl}}docs/help" target="_blank">Help</a>
</li> </li>
<li class="dropdown-menu__row" ng-if="vm.auth.status === 'signed-in'"> <li class="dropdown-menu__row" ng-if="vm.auth.status === 'signed-in'">
<a class="dropdown-menu__link" href="{{vm.serviceUrl}}stream?q=user:{{vm.auth.username}}" <a class="dropdown-menu__link" href="{{vm.serviceUrl}}stream?q=user:{{vm.auth.username}}"
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<signin-control <signin-control
auth="auth" auth="auth"
new-style="false" new-style="false"
on-show-about-version-dialog="vm.onShowAboutVersionDialog()" on-show-help-panel="vm.onShowHelpPanel()"
on-login="onLogin()" on-login="onLogin()"
on-logout="onLogout()"> on-logout="onLogout()">
</signin-control> </signin-control>
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<signin-control <signin-control
auth="auth" auth="auth"
new-style="true" new-style="true"
on-show-about-version-dialog="onShowAboutVersionDialog()" on-show-help-panel="onShowHelpPanel()"
on-login="onLogin()" on-login="onLogin()"
on-logout="onLogout()"> on-logout="onLogout()">
</signin-control> </signin-control>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment