Skip to content

Commit

Permalink
Merge branch 'develop-v2' of github.com:craftcms/cms into develop
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/resources/js/compressed/craft.js
#	src/resources/js/compressed/craft.js.map
#	src/resources/js/craft.js
#	src/resources/js/craft/BaseElementIndex.js
  • Loading branch information
brandonkelly committed Dec 12, 2018
2 parents c15825f + 67d80c0 commit 5fda444
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 15 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-v2.md
Expand Up @@ -4,6 +4,7 @@

### Fixed
- Fixed a SQL error that could occur when merging two elements together if MySQL was set to a case-sensitive collation. ([#3539](https://github.com/craftcms/cms/issues/3539))
- Fixed a bug where element indexes wouldn’t return to the previous sort selection after the search input was cleared. ([#3548](https://github.com/craftcms/cms/issues/3548))

## 2.7.4 - 2018-11-27

Expand Down
10 changes: 3 additions & 7 deletions src/web/assets/cp/dist/js/Craft.js
@@ -1,4 +1,4 @@
/*! - 2018-10-12 */
/*! - 2018-12-12 */
(function($){

/** global: Craft */
Expand Down Expand Up @@ -2247,7 +2247,7 @@ Craft.BaseElementIndex = Garnish.Base.extend(
source: this.instanceState.selectedSource,
criteria: criteria,
disabledElementIds: this.settings.disabledElementIds,
viewState: this.getSelectedSourceState()
viewState: $.extend({}, this.getSelectedSourceState())
};

// Possible that the order/sort isn't entirely accurate if we're sorting by Score
Expand Down Expand Up @@ -2612,14 +2612,10 @@ Craft.BaseElementIndex = Garnish.Base.extend(
},

setStoredSortOptionsForSource: function() {
// Default to whatever's first
this.setSortAttribute();
this.setSortDirection('asc');

var sortAttr = this.getSelectedSourceState('order'),
sortDir = this.getSelectedSourceState('sort');

if (!sortAttr) {
if (!sortAttr || !sortDir) {
// Get the default
sortAttr = this.getDefaultSort();

Expand Down
2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/js/Craft.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/js/Craft.min.js.map

Large diffs are not rendered by default.

8 changes: 2 additions & 6 deletions src/web/assets/cp/src/js/BaseElementIndex.js
Expand Up @@ -559,7 +559,7 @@ Craft.BaseElementIndex = Garnish.Base.extend(
source: this.instanceState.selectedSource,
criteria: criteria,
disabledElementIds: this.settings.disabledElementIds,
viewState: this.getSelectedSourceState()
viewState: $.extend({}, this.getSelectedSourceState())
};

// Possible that the order/sort isn't entirely accurate if we're sorting by Score
Expand Down Expand Up @@ -924,14 +924,10 @@ Craft.BaseElementIndex = Garnish.Base.extend(
},

setStoredSortOptionsForSource: function() {
// Default to whatever's first
this.setSortAttribute();
this.setSortDirection('asc');

var sortAttr = this.getSelectedSourceState('order'),
sortDir = this.getSelectedSourceState('sort');

if (!sortAttr) {
if (!sortAttr || !sortDir) {
// Get the default
sortAttr = this.getDefaultSort();

Expand Down

0 comments on commit 5fda444

Please sign in to comment.