mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Fix tag order
fixes #4151 - Properly re-add pre-existing tags to beginning of array
This commit is contained in:
parent
f941cd064f
commit
c0639eb4cc
1 changed files with 1 additions and 4 deletions
|
@ -6,7 +6,6 @@ var PostTagsInputController = Ember.Controller.extend({
|
||||||
var proxyTags = Ember.ArrayProxy.create({
|
var proxyTags = Ember.ArrayProxy.create({
|
||||||
content: this.get('parentController.tags')
|
content: this.get('parentController.tags')
|
||||||
}),
|
}),
|
||||||
|
|
||||||
temp = proxyTags.get('arrangedContent').slice();
|
temp = proxyTags.get('arrangedContent').slice();
|
||||||
|
|
||||||
proxyTags.get('arrangedContent').clear();
|
proxyTags.get('arrangedContent').clear();
|
||||||
|
@ -22,9 +21,7 @@ var PostTagsInputController = Ember.Controller.extend({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
temp.forEach(function (tag) {
|
proxyTags.get('arrangedContent').unshiftObjects(temp);
|
||||||
proxyTags.get('arrangedContent').addObject(tag);
|
|
||||||
});
|
|
||||||
|
|
||||||
return proxyTags;
|
return proxyTags;
|
||||||
}),
|
}),
|
||||||
|
|
Loading…
Add table
Reference in a new issue