parent
59c6952025
commit
176750046a
|
@ -45,4 +45,4 @@ import './input-file';
|
||||||
import './treeview';
|
import './treeview';
|
||||||
import './treeview/child';
|
import './treeview/child';
|
||||||
import './calendar';
|
import './calendar';
|
||||||
|
import './scroll-up/scroll-up';
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
<button class="mdl-button mdl-js-button mdl-button--fab mdl-button--mini-fab mdl-js-ripple-effect mdl-button--colored"
|
||||||
|
ng-click="$ctrl.goUp()"
|
||||||
|
vn-tooltip="Go up">
|
||||||
|
<vn-icon icon="keyboard_arrow_up"></vn-icon>
|
||||||
|
</button>
|
|
@ -0,0 +1,35 @@
|
||||||
|
import ngModule from '../../module';
|
||||||
|
import Component from '../../lib/component';
|
||||||
|
import './style.scss';
|
||||||
|
|
||||||
|
export default class Controller extends Component {
|
||||||
|
constructor($element, $scope, $window) {
|
||||||
|
super($element, $scope);
|
||||||
|
this.$window = $window;
|
||||||
|
|
||||||
|
$window.addEventListener('scroll', () => {
|
||||||
|
console.log($element[0]);
|
||||||
|
if ($window.scrollY > 0)
|
||||||
|
$element[0].style.display = 'block';
|
||||||
|
else
|
||||||
|
$element[0].style.display = 'none';
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
goUp() {
|
||||||
|
this.$window.scrollTo(0, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Controller.$inject = ['$element', '$scope', '$window'];
|
||||||
|
|
||||||
|
ngModule.component('vnScrollUp', {
|
||||||
|
template: require('./scroll-up.html'),
|
||||||
|
controller: Controller,
|
||||||
|
bindings: {
|
||||||
|
field: '=?',
|
||||||
|
options: '<?',
|
||||||
|
disabled: '<?',
|
||||||
|
checked: '<?'
|
||||||
|
}
|
||||||
|
});
|
|
@ -0,0 +1,6 @@
|
||||||
|
vn-scroll-up {
|
||||||
|
top: 5em;
|
||||||
|
right: 1.8em;
|
||||||
|
display: none;
|
||||||
|
position: fixed;
|
||||||
|
}
|
|
@ -50,4 +50,5 @@ Fields to show: Campos a mostrar
|
||||||
Create new one: Crear nuevo
|
Create new one: Crear nuevo
|
||||||
Toggle: Desplegar/Plegar
|
Toggle: Desplegar/Plegar
|
||||||
Check all: Seleccionar todo
|
Check all: Seleccionar todo
|
||||||
Select a file: Selecciona un fichero
|
Select a file: Selecciona un fichero
|
||||||
|
Go up: Ir arriba
|
|
@ -51,8 +51,8 @@ a, .link {
|
||||||
}
|
}
|
||||||
html [fixed-bottom-right] {
|
html [fixed-bottom-right] {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 2em;
|
bottom: 1.3em;
|
||||||
right: 2em;
|
right: 1.3em;
|
||||||
}
|
}
|
||||||
html [text-center], .text-center {
|
html [text-center], .text-center {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
|
@ -81,4 +81,5 @@
|
||||||
vn-acl="deliveryBoss"
|
vn-acl="deliveryBoss"
|
||||||
vn-acl-action="remove">
|
vn-acl-action="remove">
|
||||||
</vn-float-button>
|
</vn-float-button>
|
||||||
</a>
|
</a>
|
||||||
|
<vn-scroll-up></vn-scroll-up>
|
|
@ -75,4 +75,5 @@
|
||||||
<tpl-body>
|
<tpl-body>
|
||||||
<vn-claim-summary claim="$ctrl.claimSelected"></vn-claim-summary>
|
<vn-claim-summary claim="$ctrl.claimSelected"></vn-claim-summary>
|
||||||
</tpl-body>
|
</tpl-body>
|
||||||
</vn-dialog>
|
</vn-dialog>
|
||||||
|
<vn-scroll-up></vn-scroll-up>
|
|
@ -66,4 +66,5 @@
|
||||||
<tpl-body>
|
<tpl-body>
|
||||||
<vn-client-summary client="$ctrl.clientSelected"></vn-client-summary>
|
<vn-client-summary client="$ctrl.clientSelected"></vn-client-summary>
|
||||||
</tpl-body>
|
</tpl-body>
|
||||||
</vn-dialog>
|
</vn-dialog>
|
||||||
|
<vn-scroll-up></vn-scroll-up>
|
|
@ -78,3 +78,4 @@
|
||||||
</tpl-body>
|
</tpl-body>
|
||||||
</vn-dialog>
|
</vn-dialog>
|
||||||
<vn-client-descriptor-popover vn-id="clientDescriptor"></vn-client-descriptor-popover>
|
<vn-client-descriptor-popover vn-id="clientDescriptor"></vn-client-descriptor-popover>
|
||||||
|
<vn-scroll-up></vn-scroll-up>
|
|
@ -81,4 +81,6 @@
|
||||||
</vn-ticket-descriptor-popover>
|
</vn-ticket-descriptor-popover>
|
||||||
<vn-client-descriptor-popover
|
<vn-client-descriptor-popover
|
||||||
vn-id="clientDescriptor">
|
vn-id="clientDescriptor">
|
||||||
</vn-client-descriptor-popover>
|
</vn-client-descriptor-popover>
|
||||||
|
|
||||||
|
<vn-scroll-up></vn-scroll-up>
|
|
@ -145,4 +145,5 @@
|
||||||
<vn-worker-descriptor-popover
|
<vn-worker-descriptor-popover
|
||||||
vn-id="workerDescriptor"
|
vn-id="workerDescriptor"
|
||||||
worker-fk="$ctrl.selectedWorker">
|
worker-fk="$ctrl.selectedWorker">
|
||||||
</vn-worker-descriptor-popover>
|
</vn-worker-descriptor-popover>
|
||||||
|
<vn-scroll-up></vn-scroll-up>
|
|
@ -90,4 +90,5 @@
|
||||||
<tpl-body>
|
<tpl-body>
|
||||||
<vn-order-summary order="$ctrl.selectedOrder"></vn-order-summary>
|
<vn-order-summary order="$ctrl.selectedOrder"></vn-order-summary>
|
||||||
</tpl-body>
|
</tpl-body>
|
||||||
</vn-dialog>
|
</vn-dialog>
|
||||||
|
<vn-scroll-up></vn-scroll-up>
|
|
@ -74,4 +74,5 @@
|
||||||
</vn-worker-descriptor-popover>
|
</vn-worker-descriptor-popover>
|
||||||
<a ui-sref="route.create" vn-tooltip="New route" vn-bind="+" fixed-bottom-right>
|
<a ui-sref="route.create" vn-tooltip="New route" vn-bind="+" fixed-bottom-right>
|
||||||
<vn-float-button icon="add"></vn-float-button>
|
<vn-float-button icon="add"></vn-float-button>
|
||||||
</a>
|
</a>
|
||||||
|
<vn-scroll-up></vn-scroll-up>
|
|
@ -160,4 +160,5 @@
|
||||||
</vn-worker-descriptor-popover>
|
</vn-worker-descriptor-popover>
|
||||||
<vn-client-balance-create
|
<vn-client-balance-create
|
||||||
vn-id="balanceCreateDialog">
|
vn-id="balanceCreateDialog">
|
||||||
</vn-client-balance-create>
|
</vn-client-balance-create>
|
||||||
|
<vn-scroll-up></vn-scroll-up>
|
|
@ -51,4 +51,5 @@
|
||||||
</vn-table>
|
</vn-table>
|
||||||
</vn-card>
|
</vn-card>
|
||||||
<vn-pagination model="model"></vn-pagination>
|
<vn-pagination model="model"></vn-pagination>
|
||||||
</div>
|
</div>
|
||||||
|
<vn-scroll-up></vn-scroll-up>
|
|
@ -72,4 +72,5 @@
|
||||||
<tpl-body>
|
<tpl-body>
|
||||||
<vn-worker-summary worker="$ctrl.selectedWorker"></vn-worker-summary>
|
<vn-worker-summary worker="$ctrl.selectedWorker"></vn-worker-summary>
|
||||||
</tpl-body>
|
</tpl-body>
|
||||||
</vn-dialog>
|
</vn-dialog>
|
||||||
|
<vn-scroll-up></vn-scroll-up>
|
Loading…
Reference in New Issue