forked from evoluteur/evolutility-ui-jquery
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomics.js
More file actions
executable file
·118 lines (116 loc) · 5.14 KB
/
Copy pathcomics.js
File metadata and controls
executable file
·118 lines (116 loc) · 5.14 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
var uiModels = uiModels || {};
uiModels.comics = {
id: 'comics',
label: 'Graphic Novels',
name: 'graphic novel serie',
namePlural: 'graphic novel series',
//icon: 'serie.gif',
fnTitle: 'title',
fnSearch: ['title', 'authors', 'notes'],
fnBadge: function(m){
var hNb=m.get('haveNb'),
sNb=m.get('serieNb');
return (hNb==sNb)?hNb:hNb+'/'+sNb;
},
elements: [
{
type: 'panel', label: 'Serie', width: 70,
elements: [
{
id: 'title', attribute: 'title', type: 'text', label: 'Title', required: true,
maxLength: 255,
width: 62, inMany: true
},
{
id: 'genre', attribute: 'genre', type: 'lov', label: 'Genre', width: 38, inMany: true,
list: [
{id: 'adv', text: 'Adventure'},
{id: 'conte', text: 'Fairy tale'},
{id: 'eros', text: 'Erotic'},
{id: 'fantasy', text: 'Fantastic'},
{id: 'hf', text: 'Heroic Fantasy'},
{id: 'hist', text: 'Historic'},
{id: 'humor', text: 'Humor'},
{id: 'nocat', text: 'One of a kind'},
{id: 'youth', text: 'Youth'},
{id: 'pol', text: 'Thriller'},
{id: 'sf', text: 'Science-fiction'},
{id: 'sh', text: 'Super Heros'},
{id: 'wwest', text: 'Western'}
]
},
{
id: 'authors', attribute: 'authors', type: 'text', width: 62, inMany: true,
label: 'Authors'
},
{
id: 'language', attribute: 'language', type: 'lov', label: 'Language', width: 38, inMany: true,
list: [
{id: 'FR', text: 'French', icon:'flag_fr.gif'},
{id: 'EN', text: 'American', icon:'flag_us.gif'}
]
},
{
id: 'serieNb', attribute: 'serieNb', type: 'integer', width: 15, inMany: false,
label: 'Albums', inCharts:false
},
{
id: 'haveNb', attribute: 'haveNb', type: 'integer', width: 15, inMany: false,
label: 'Owned', inCharts:false
},
{
id: 'have', attribute: 'have', type: 'text', width: 32, inMany: false,
label: 'Have'
},
{
id: 'complete', attribute: 'complete', type: 'boolean', width: 19, inMany: true,
label: 'Complete', labelFalse:'Incomplete', labelTrue:'Complete'
},
{
id: 'finished', attribute: 'finished', type: 'boolean', width: 19, inMany: true,
label: 'Finished', labelTrue:'Finished', labelFalse:'Unfinished', css:'cBlue'
},
{
id:'amazon', label:'Amazon', type:'formula', width:62, css:'evol-ellipsis',
formula:function(m){
if(m){
var urlData=m.get('title')+' '+(m.get('authors')||''),
link=m.get('language')=='FR' ?
'http://www.amazon.fr/s/ref=sr_nr_n_1?keywords='
:'http://www.amazon.com/s/ref=nb_sb_noss?field-keywords=';
return '<a target="a" href="'+link+encodeURI(urlData)+'">'+_.escape(urlData)+'</a>';
}
return 'N/A';
}
},
{
id:'bdfugue', label:'BDFugue', type:'formula', width:38, css:'evol-ellipsis',
formula:function(m){
if(m){
var urlData=m.get('title')+' '+(m.get('authors')||''),
link='http://www.bdfugue.com/catalogsearch/result/?q=';
return '<a target="a" href="'+link+encodeURI(urlData)+'">'+_.escape(urlData)+'</a>';
}
return 'N/A';
}
},
{
id: 'notes', attribute: 'notes', type: 'textmultiline', label: 'Notes', maxLength: 1000,
width: 100, height: 7, inMany: false
}
]
},
{
type: 'panel', label: 'Cover', width: 30,
elements: [
{
id: 'pix', attribute: 'pix', type: 'image', width: 100, inMany: true,
label: 'Album Cover', labelList:'Cover', labelBrowse:'', labelCards:''
}
]
}
]
};
if(typeof module === "object" && typeof module.exports === "object"){
module.exports = uiModels.comics;
}