mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 03:12:54 +03:00
42166c8d9f
- Refactor to handle deprecations including removal of all Views, ArrayControllers, and ItemControllers.
31 lines
706 B
JavaScript
31 lines
706 B
JavaScript
import Ember from 'ember';
|
|
|
|
export default Ember.Component.extend({
|
|
classNames: 'gh-blognav-item',
|
|
|
|
attributeBindings: ['order:data-order'],
|
|
order: Ember.computed.readOnly('navItem.order'),
|
|
|
|
keyPress: function (event) {
|
|
// enter key
|
|
if (event.keyCode === 13) {
|
|
event.preventDefault();
|
|
this.send('addItem');
|
|
}
|
|
},
|
|
|
|
actions: {
|
|
addItem: function () {
|
|
this.sendAction('addItem');
|
|
},
|
|
|
|
deleteItem: function (item) {
|
|
this.sendAction('deleteItem', item);
|
|
},
|
|
|
|
updateUrl: function (value) {
|
|
this.sendAction('updateUrl', value, this.get('navItem'));
|
|
}
|
|
}
|
|
});
|