4 * Ajatus - Distributed CRM
5 * @requires jQuery v1.2.1
7 * Copyright (c) 2007 Jerry Jalava <jerry.jalava@gmail.com>
8 * Copyright (c) 2007 Nemein Oy <http://nemein.com>
9 * Website: http://ajatus.info
10 * Licensed under the GPL license
11 * http://www.gnu.org/licenses/gpl.html
16 $.ajatus = $.ajatus || {};
17 $.ajatus.content_type = $.ajatus.content_type || {};
19 $.ajatus.content_type.note = function()
25 this.history_support = true;
26 this.enable_additionals = true;
28 this.pool_settings = {
63 this.list_map = 'map( doc.value.metadata.created.val, {"_type": doc.value._type,';
64 this.list_map += '"report_id": doc.value.report_id,';
65 this.list_map += '"title": doc.value.title,';
66 this.list_map += '"tags": doc.value.tags,';
67 this.list_map += '"creator": doc.value.metadata.creator,';
68 this.list_map += '"created": doc.value.metadata.created';
69 this.list_map += '});';
71 this.gen_views = function() {
73 list: $.ajatus.views.generate(this.view_header+this.list_map+this.view_footer),
82 'title', 'created', 'creator'
86 on_click: function(e) {
87 $.ajatus.tabs.on_click(e);
93 $.ajatus.preferences.client_defaults.content_types['note'] = new $.ajatus.content_type.note();