From 0d4076ed779ae7663d17b09ff43325ab0bd343d5 Mon Sep 17 00:00:00 2001 From: Silvan Date: Wed, 1 Nov 2017 13:31:28 +0100 Subject: [PATCH] positioning of first sortable arrow,fix #1563 (#1579) * positioning of first sortable arrow, fix #1563 * update changelog --- CHANGELOG.md | 1 + modules/admin/src/ngrest/plugins/Sortable.php | 4 ++-- modules/admin/src/resources/scss/admin.scss | 1 + modules/admin/src/resources/scss/components/_sortable.scss | 7 +++++++ 4 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 modules/admin/src/resources/scss/components/_sortable.scss diff --git a/CHANGELOG.md b/CHANGELOG.md index 1520173d4..f9e286722 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,7 @@ All notable changes to this project will be documented in this file. This projec ### Fixed +- [#1563](https://github.com/luyadev/luya/issues/1563) Adjust position of first sortable arrow as desired. - [#1545](https://github.com/luyadev/luya/issues/1545) Adjust position of page version dropdown content on admin edit section. - [#1549](https://github.com/luyadev/luya/issues/1549) Hide version informations for other page types then page content. - [#1550](https://github.com/luyadev/luya/issues/1550) Readded option to change the page type in CMS Module. diff --git a/modules/admin/src/ngrest/plugins/Sortable.php b/modules/admin/src/ngrest/plugins/Sortable.php index 0be201f48..5a05eca93 100644 --- a/modules/admin/src/ngrest/plugins/Sortable.php +++ b/modules/admin/src/ngrest/plugins/Sortable.php @@ -23,8 +23,8 @@ class Sortable extends Plugin public function renderList($id, $ngModel) { return [ - $this->createTag('i', 'keyboard_arrow_up', ['ng-init' => '$first ? changeOrder(\''.$this->name.'\', \'+\') : null', 'ng-click' => 'sortableUp($index, item, \''.$this->name.'\')', 'ng-hide' => '$first', 'class' => 'material-icons btn btn-outline-secondary btn-symbol']), - $this->createTag('i', 'keyboard_arrow_down', ['ng-click' => 'sortableDown($index, item, \''.$this->name.'\')', 'ng-hide' => '$last', 'class' => 'material-icons btn btn-outline-secondary btn-symbol']) + $this->createTag('i', 'keyboard_arrow_up', ['ng-init' => '$first ? changeOrder(\''.$this->name.'\', \'+\') : null', 'ng-click' => 'sortableUp($index, item, \''.$this->name.'\')', 'ng-class' => '{\'sortable-up-first\' : $first}', 'class' => 'material-icons btn btn-outline-secondary btn-symbol']), + $this->createTag('i', 'keyboard_arrow_down', ['ng-click' => 'sortableDown($index, item, \''.$this->name.'\')', 'ng-class' => '{\'sortable-up-last\' : $last}', 'class' => 'material-icons btn btn-outline-secondary btn-symbol']) ]; } diff --git a/modules/admin/src/resources/scss/admin.scss b/modules/admin/src/resources/scss/admin.scss index 505231d9b..bea582f45 100644 --- a/modules/admin/src/resources/scss/admin.scss +++ b/modules/admin/src/resources/scss/admin.scss @@ -119,6 +119,7 @@ @import "components/material-icons"; @import "components/modal"; @import "components/modulenav"; +@import "components/sortable"; @import "components/switch"; @import "components/tab"; @import "components/nav"; diff --git a/modules/admin/src/resources/scss/components/_sortable.scss b/modules/admin/src/resources/scss/components/_sortable.scss new file mode 100644 index 000000000..a7b123965 --- /dev/null +++ b/modules/admin/src/resources/scss/components/_sortable.scss @@ -0,0 +1,7 @@ +.sortable-up-first { + visibility: hidden; +} + +.sortable-up-last { + visibility: hidden; +} \ No newline at end of file