Skip to content

Commit

Permalink
fix sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanwoulfe committed Jun 6, 2018
1 parent 831e05b commit b91902a
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 11 deletions.
Binary file modified Tabulate.Site/App_Data/Umbraco.sdf
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@
// get/set the sort order for the model, apply sort filter if necessary
// if sorting is manual, the order is unchanged
const setSorting = () => {
this.manualSort = false;

if (settings.sortOrder === undefined) {
settings.sortOrder = 'A';
} else if (settings.sortOrder === 'M') {
Expand Down Expand Up @@ -356,15 +358,15 @@
totalPages: 1,
search: '',
pageNumber: 1,
pageIndex: 0
pageIndex: 0
},
noConfig: true,
sortOptions: {
axis: 'y',
cursor: 'move',
handle: '.sort-btn',
handle: '.sort-handle',
stop: () => {
$scope.model.value.data = data = this.paging.items;
$scope.model.value.data = data = this.pagination.items;
setIds();
}
},
Expand All @@ -380,6 +382,7 @@
goToPage: goToPage
});

console.log(this);

/////////////////////////////////
// kick the whole thing off... //
Expand Down
2 changes: 1 addition & 1 deletion Tabulate/App_Plugins/Tabulate/Backoffice/style.min.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Tabulate/App_Plugins/Tabulate/Backoffice/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
}
}

.sort-handle {
cursor:ns-resize;
}

.disabled {
.umb-node-preview__content {
opacity:0.25;
Expand Down
3 changes: 2 additions & 1 deletion Tabulate/App_Plugins/Tabulate/Backoffice/views/tabulate.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@
<span class="no-result" ng-if="vm.noResults">No results found for search term '{{vm.pagination.search}}'</span>

<div ui-sortable="vm.sortOptions" ng-model="vm.pagination.items" ng-hide="vm.noConfig">
<div class="umb-node-preview umb-node-preview--sortable ui-sortable-handle" ng-class="{'disabled' : o.disabled}" ng-repeat="o in vm.pagination.items track by $index">
<div class="umb-node-preview" ng-class="{'disabled' : o.disabled}" ng-repeat="o in vm.pagination.items track by $index">
<div class="umb-node-preview__content">
<div class="umb-node-preview__name" ng-bind="o._label" ng-model="o._label"></div>
</div>
<div class="umb-node-preview__actions">
<a class="umb-node-preview__action" title="Edit" href="" ng-click="vm.editRow(o._id)"><localize key="general_edit">Edit</localize></a>
<a class="umb-node-preview__action sort-handle" ng-show="vm.manualSort" title="Sort" href=""><localize key="general_sort">Sort</localize></a>
<a class="umb-node-preview__action" title="Disable" href="" ng-click="vm.disableRow(o._id)">{{ o.disabled ? 'Enable' : 'Disable' }}</a>
<a class="umb-node-preview__action umb-node-preview__action--red" title="Remove" href="" ng-click="vm.removeRow(o._id)"><localize key="general_remove">Remove</localize></a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions Tabulate/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("2.2.3.0")]
[assembly: AssemblyFileVersion("2.2.3.0")]
[assembly: AssemblyVersion("2.2.4.0")]
[assembly: AssemblyFileVersion("2.2.4.0")]
8 changes: 4 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# version format
version: 2.2.3.{build}
version: 2.2.4.{build}

image: Visual Studio 2017

Expand Down Expand Up @@ -41,9 +41,9 @@ deploy:
appveyor_repo_tag: true

- provider: GitHub
tag: v2.2.3
release: Release 2.2.3
description: 'Ensure property converter parses internal links'
tag: v2.2.4
release: Release 2.2.4
description: 'Enable sorting of rows when sorting set to manual'
force_update: true
auth_token:
secure: Otbl8p8qCwciDqJgSWCyN0Arfs5XS1CwiHcK+r0F6uz9Rxt4gzBFvlc3cjPV3NxR
Expand Down

0 comments on commit b91902a

Please sign in to comment.