-
Notifications
You must be signed in to change notification settings - Fork 0
/
ReportDisplayGroup.bemhtml
78 lines (65 loc) · 1.94 KB
/
ReportDisplayGroup.bemhtml
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
// vim: ft=javascript
/* jshint camelcase:false, unused:false, laxbreak:true, expr:true, boss:true */
/* globals debugger, DEBUG, DBG, project, def, tag, match, js, applyCtx, content, applyNext, block, elem, attrs, mix, mod */
/**
*
* @module ReportDisplayGroup
* @overview __INFO__
*
* @author lilliputten <lilliputten@yandex.ru>
* @since 2017.05.22 16:50:22
* @version 2017.05.22 16:50:22
*
* $Date: 2017-05-23 16:13:53 +0300 (Вт, 23 май 2017) $
* $Id: ReportDisplayGroup.bemhtml 8415 2017-05-23 13:13:53Z miheev $
*
*/
block('ReportDisplayGroup')(
def()(function(){
var ctx = this.ctx;
ctx = Object.assign({
data : {},
id : 'defaultReportDisplayGroup',
}, ctx);
// Сохраняем данные и параметры для последующего использования...
this.rootCtx = ctx;
this.Stat = ctx.Stat || {};
this.Table = ctx.Table || {};
this.mods.initialExpanded = this.mods.expanded;
return applyNext();
}),
addMix()(function(){
return [
{ block : 'exportable', mods : { provider : this.block } },
];
}),
addJs()(function(){
return {
id : this.ctx.id,
title : this.ctx.title,
};
}),
// Добавляем полосу заголовка
// mod('showTitle', true).
match(function(){ return this.mods.showTitle || this.mods.expandable; }).
content()(function(){
var ctx = this.ctx,
content = applyNext() || []
;
content.unshift({
elem : 'TitleBar',
});
return content;
}),
// Добавляем блок детальной информации
content()(function(){
var ctx = this.ctx,
content = applyNext() || []
;
content.push({
elem : 'Details',
});
return content;
}),
tag()()
);