Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | 3x 3x 3x 3x 3x 3x | import DefineMap from 'can-define/map/map';
import DefineList from 'can-define/list/list';
import realtimeRestModel from 'can-super-model';
// import fake ajax services
import './fixtures';
export const TaskMap = DefineMap.extend('Task', {seal: false}, {
id: {type: 'number', identity: true, edit: 'false'},
'name': 'string',
'description': 'string',
edit: {
edit: false,
serialize: false,
displayComponent: `
<button class="btn btn-link" type="button" on:click="scope.root.dispatchEvent('edit', ../object)">
<i class="fa fa-pencil"></i></button>
`
}
});
export const TaskList = DefineList.extend({
'#': TaskMap
});
TaskMap.List = TaskList;
const C = realtimeRestModel({
Map: TaskMap,
url: '/tasks'
});
C.metadata = {};
export const Connection = C;
|