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.contact = function()
22 this.name = 'contact';
23 this.title = 'Contact';
25 this.history_support = true;
26 this.update_statics = false;
102 this.original_schema = $.ajatus.utils.object.clone(this.schema);
105 'firstname', ' ', 'lastname'
109 list: function(doc) {
110 if ( doc.value._type == 'contact'
111 && doc.value.metadata.archived.val == false
112 && doc.value.metadata.deleted.val == false)
114 map(doc.value.lastname.val, {
115 "_type": doc.value._type,
116 "firstname": doc.value.firstname,
117 "lastname": doc.value.lastname,
118 "email": doc.value.email,
119 "phone": doc.value.phone,
120 "tags": doc.value.tags
126 this.list_headers = [
127 'firstname', 'lastname', 'email', 'phone'
131 on_click: function(e)
133 $.ajatus.tabs.on_click(e);
139 $.ajatus.preferences.client_defaults.content_types['contact'] = new $.ajatus.content_type.contact();