parent
75decad601
commit
191db1c541
@ -0,0 +1,24 @@
|
||||
'use strict';
|
||||
define(
|
||||
[
|
||||
'backbone.collectionview',
|
||||
'Settings/Quality/Profile/Edit/EditQualityProfileItemView'
|
||||
], function (BackboneSortableCollectionView, EditQualityProfileItemView) {
|
||||
return BackboneSortableCollectionView.extend({
|
||||
|
||||
className: 'qualities',
|
||||
modelView: EditQualityProfileItemView,
|
||||
|
||||
attributes: {
|
||||
'validation-name': 'items'
|
||||
},
|
||||
|
||||
events: {
|
||||
'click li, td' : '_listItem_onMousedown',
|
||||
'dblclick li, td' : '_listItem_onDoubleClick',
|
||||
'click' : '_listBackground_onClick',
|
||||
'click ul.collection-list, table.collection-list' : '_listBackground_onClick',
|
||||
'keydown' : '_onKeydown'
|
||||
}
|
||||
});
|
||||
});
|
@ -1,27 +0,0 @@
|
||||
'use strict';
|
||||
define(
|
||||
[
|
||||
'backbone.collectionview'
|
||||
], function (BackboneSortableCollectionView) {
|
||||
return BackboneSortableCollectionView.extend({
|
||||
|
||||
events : {
|
||||
'click li, td' : '_listItem_onMousedown',
|
||||
'dblclick li, td' : '_listItem_onDoubleClick',
|
||||
'click' : '_listBackground_onClick',
|
||||
'click ul.collection-list, table.collection-list' : '_listBackground_onClick',
|
||||
'keydown' : '_onKeydown',
|
||||
'click .x-move' : '_onClickMove'
|
||||
},
|
||||
|
||||
_onClickMove: function( theEvent ) {
|
||||
var clickedItemId = this._getClickedItemId( theEvent );
|
||||
|
||||
if( clickedItemId )
|
||||
{
|
||||
var clickedModel = this.collection.get( clickedItemId );
|
||||
this.trigger('moveClicked', clickedModel);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
Loading…
Reference in new issue