diff --git a/gui/app/components/layout/grid/sidebar-go-top.js b/gui/app/components/layout/grid/sidebar-go-top.js new file mode 100644 index 00000000..7d0e70c0 --- /dev/null +++ b/gui/app/components/layout/grid/sidebar-go-top.js @@ -0,0 +1,24 @@ +// Copyright 2016 Documize Inc. . All rights reserved. +// +// This software (Documize Community Edition) is licensed under +// GNU AGPL v3 http://www.gnu.org/licenses/agpl-3.0.en.html +// +// You can operate outside the AGPL restrictions by purchasing +// Documize Enterprise Edition and obtaining a commercial license +// by contacting . +// +// https://documize.com + +import browser from '../../../services/browser'; +import Component from '@ember/component'; + +export default Component.extend({ + tagName: 'div', + classNames: ['goto-top'], + + actions: { + onClick() { + this.get('browser').scrollTo('html'); + } + } +}); diff --git a/gui/app/constants/constants.js b/gui/app/constants/constants.js index c5e2428c..cc5f1a83 100644 --- a/gui/app/constants/constants.js +++ b/gui/app/constants/constants.js @@ -232,6 +232,7 @@ let constants = EmberObject.extend({ Export2: 'dicon-upload', Filter: 'dicon-sort-tool', Grid: 'dicon-grid-interface', + GoTop: 'dicon-move-layer-up', Handshake: 'dicon-handshake', Index: 'dicon-menu-8', Integrations: 'dicon-geometry', diff --git a/gui/app/pods/document/index/template.hbs b/gui/app/pods/document/index/template.hbs index 98b4a04b..6a01bf2e 100644 --- a/gui/app/pods/document/index/template.hbs +++ b/gui/app/pods/document/index/template.hbs @@ -23,8 +23,8 @@