-
Notifications
You must be signed in to change notification settings - Fork 0
/
CrystalViewerRender.js
159 lines (111 loc) · 3.43 KB
/
CrystalViewerRender.js
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
function CrystalViewer($)
{
this.ToolBar;
this.StatusBar;
this.Responsive;
this.Width;
this.Height;
this.WebConfig;
this.Metadata;
this.Param;
this.Path;
this.DataBase;
this.Conection;
// Databinding for property WebConfig
this.SetWebConfig = function(data)
{
///UserCodeRegionStart:[SetWebConfig] (do not remove this comment.)
this.WebConfig = data;
///UserCodeRegionEnd: (do not remove this comment.)
}
// Databinding for property WebConfig
this.GetWebConfig = function()
{
///UserCodeRegionStart:[GetWebConfig] (do not remove this comment.)
return this.WebConfig;
///UserCodeRegionEnd: (do not remove this comment.)
}
// Databinding for property Metadata
this.SetMetadata = function(data)
{
///UserCodeRegionStart:[SetMetadata] (do not remove this comment.)
this.Metadata = data;
///UserCodeRegionEnd: (do not remove this comment.)
}
// Databinding for property Metadata
this.GetMetadata = function()
{
///UserCodeRegionStart:[GetMetadata] (do not remove this comment.)
return this.Metadata;
///UserCodeRegionEnd: (do not remove this comment.)
}
// Databinding for property Param
this.SetParam = function(data)
{
///UserCodeRegionStart:[SetParam] (do not remove this comment.)
this.Conection = data;
///UserCodeRegionEnd: (do not remove this comment.)
}
// Databinding for property Param
this.GetParam = function()
{
///UserCodeRegionStart:[GetParam] (do not remove this comment.)
return this.Conection;
///UserCodeRegionEnd: (do not remove this comment.)
}
// Databinding for property Path
this.SetPath = function(data)
{
///UserCodeRegionStart:[SetPath] (do not remove this comment.)
this.Path = data;
///UserCodeRegionEnd: (do not remove this comment.)
}
// Databinding for property Path
this.GetPath = function()
{
///UserCodeRegionStart:[GetPath] (do not remove this comment.)
return this.Path;
///UserCodeRegionEnd: (do not remove this comment.)
}
// Databinding for property Conection
this.SetConection = function(data)
{
///UserCodeRegionStart:[SetConection] (do not remove this comment.)
///UserCodeRegionEnd: (do not remove this comment.)
}
// Databinding for property Conection
this.GetConection = function()
{
///UserCodeRegionStart:[GetConection] (do not remove this comment.)
///UserCodeRegionEnd: (do not remove this comment.)
}
this.show = function()
{
///UserCodeRegionStart:[show] (do not remove this comment.)
var myContainer = document.getElementById(this.ContainerName);
_this = this;
var buffer = '';
if (!this.IsPostBack) {
buffer += createHTML();
$(myContainer).append(buffer);
}
function createHTML(){
var h = [];
var html = '';
console.log(_this.Path);
console.log(_this.ToolBar);
console.log(_this.StatusBar);
h.push('<main role="main">');
h.push('<iframe name="Framename" src="./CrystalViewer/Default.aspx?rpt='+_this.Path+'&toolbar='+_this.ToolBar+'&=statusbar='+_this.StatusBar+'" frameborder="0" scrolling="auto" class="frame-area"></iframe>');
h.push('</main>');
// Write text
h.forEach(function (str, index) {
html += str;
});
return html;
}
///UserCodeRegionEnd: (do not remove this comment.)
}
///UserCodeRegionStart:[User Functions] (do not remove this comment.)
///UserCodeRegionEnd: (do not remove this comment.):
}