l5m-tools 0.0.11 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +1 -1
- data/README.md +2 -1
- data/VERSION +1 -1
- data/bin/duplicate-app +0 -0
- data/bin/l5m +0 -0
- data/bin/make-app +0 -0
- data/bin/set_env.sh +0 -0
- data/bin/svn.tool +0 -0
- data/l5m-tools.gemspec +8 -7
- data/lib/l5m-tools/application.rb +34 -11
- data/lib/l5m-tools/array.rb +0 -0
- data/lib/l5m-tools/env.rb +2 -2
- data/lib/l5m-tools/ignore/svn_ingore.yaml +0 -0
- data/lib/l5m-tools/l5m-tools-module.rb +0 -0
- data/lib/l5m-tools/svn.rb +0 -0
- data/lib/l5m-tools/template/Template.jsp +53 -116
- data/lib/l5m-tools/template/TemplateBaseAbstractWorker.java +10 -2
- data/lib/l5m-tools/template/TemplateServicerImpl.java +21 -4
- data/lib/l5m-tools/template/TemplateViewer.java +60 -0
- data/lib/l5m-tools/template/frt.jsp +46 -93
- data/lib/l5m-tools/template/ms2.jsp +69 -108
- data/lib/l5m-tools/template/rad.jsp +53 -91
- data/lib/l5m-tools/template/ttv2.jsp +53 -111
- data/lib/l5m-tools/tools.rb +0 -0
- data/lib/l5m-tools.rb +0 -0
- data/test/test_l5m-tools.rb +0 -0
- metadata +35 -27
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 812fcfe10e139e3e7179c90a186bad48c179376b
|
4
|
+
data.tar.gz: dd4dd9891d897bea581d1a3ff59e5b22b9b29b89
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: cd9d9a8916e3d390a226e157126d29878ec30f8faca28e76fa4ec4ea3d0c32cdc210f6c8c1deaf73714d9b85d7c6ceb6882a836502c188b233c52f80e3b3ae71
|
7
|
+
data.tar.gz: f4c521ab34b79c1e8078ec98536c15e3280fd953c1b074a08f921d5ef6a2fbefdbb1709e93d9881cbed2454ce8251d0d108e190f557d011ec8cfae620caf457d
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
* This is a tool set for Lake 5 Media and Qinghe Tech Programmer.
|
4
4
|
* It includes make-app for creating a new app.
|
5
5
|
|
6
|
-
### Usage
|
6
|
+
### Usage
|
7
7
|
* first please install svn and git
|
8
8
|
* please add the following sys env variables
|
9
9
|
* WORKSPACE
|
@@ -14,6 +14,7 @@
|
|
14
14
|
* DEV_HOST
|
15
15
|
* `$l5m make` or `$make-app`# to create a new app
|
16
16
|
* `$l5m dup file.csv original new` or `$duplicate-app file.csv original new` #duplicate a app with the files in file.csv, and use new to replace original
|
17
|
+
* `$l5m dup package original new` #duplicate an application from special package, no file.csv required.
|
17
18
|
* `$l5m svn status` #ls all uncommitted files
|
18
19
|
* `$l5m svn log` #ls all today's commits
|
19
20
|
* `$l5m svn update packs` #update all packges.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0
|
1
|
+
0.1.0
|
data/bin/duplicate-app
CHANGED
File without changes
|
data/bin/l5m
CHANGED
File without changes
|
data/bin/make-app
CHANGED
File without changes
|
data/bin/set_env.sh
CHANGED
File without changes
|
data/bin/svn.tool
CHANGED
File without changes
|
data/l5m-tools.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "l5m-tools"
|
8
|
-
s.version = "0.0
|
8
|
+
s.version = "0.1.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["RONGHAI"]
|
12
|
-
s.date = "
|
12
|
+
s.date = "2015-07-07"
|
13
13
|
s.description = "A tool set for Lake5Media and QingheTech developer"
|
14
14
|
s.email = "ronghai.wei@outlook.com"
|
15
15
|
s.executables = ["duplicate-app", "l5m", "make-app", "set_env.sh", "svn.tool"]
|
@@ -42,6 +42,7 @@ Gem::Specification.new do |s|
|
|
42
42
|
"lib/l5m-tools/template/Template.jsp",
|
43
43
|
"lib/l5m-tools/template/TemplateBaseAbstractWorker.java",
|
44
44
|
"lib/l5m-tools/template/TemplateServicerImpl.java",
|
45
|
+
"lib/l5m-tools/template/TemplateViewer.java",
|
45
46
|
"lib/l5m-tools/template/TemplateWorker.java",
|
46
47
|
"lib/l5m-tools/template/frt.jsp",
|
47
48
|
"lib/l5m-tools/template/ms2.jsp",
|
@@ -54,27 +55,27 @@ Gem::Specification.new do |s|
|
|
54
55
|
s.homepage = "http://github.com/RONGHAI/l5m-tools"
|
55
56
|
s.licenses = ["MIT"]
|
56
57
|
s.require_paths = ["lib"]
|
57
|
-
s.rubygems_version = "
|
58
|
+
s.rubygems_version = "2.0.14"
|
58
59
|
s.summary = "A tool set for Lake5Media and QingheTech developer"
|
59
60
|
|
60
61
|
if s.respond_to? :specification_version then
|
61
|
-
s.specification_version =
|
62
|
+
s.specification_version = 4
|
62
63
|
|
63
64
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
64
65
|
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
65
66
|
s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
|
66
|
-
s.add_development_dependency(%q<bundler>, ["
|
67
|
+
s.add_development_dependency(%q<bundler>, [">= 0"])
|
67
68
|
s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
|
68
69
|
else
|
69
70
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
70
71
|
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
71
|
-
s.add_dependency(%q<bundler>, ["
|
72
|
+
s.add_dependency(%q<bundler>, [">= 0"])
|
72
73
|
s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
|
73
74
|
end
|
74
75
|
else
|
75
76
|
s.add_dependency(%q<shoulda>, [">= 0"])
|
76
77
|
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
77
|
-
s.add_dependency(%q<bundler>, ["
|
78
|
+
s.add_dependency(%q<bundler>, [">= 0"])
|
78
79
|
s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
|
79
80
|
end
|
80
81
|
end
|
@@ -3,23 +3,45 @@ require 'pathname'
|
|
3
3
|
|
4
4
|
module L5MTools
|
5
5
|
TEMPLATE_DIR = Pathname.new(__FILE__).parent + 'template'
|
6
|
+
|
6
7
|
class Application
|
7
8
|
require 'l5m-tools/tools'
|
8
9
|
include Tools
|
9
10
|
def duplicate_app(*args)
|
10
11
|
delete = args.delete('-d')
|
11
12
|
replacements = {args[1] => args[2]}
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
13
|
+
|
14
|
+
unless File.exist?(args[0])
|
15
|
+
duplicate_wo_csv(*args)
|
16
|
+
else
|
17
|
+
File.open(args[0], "r") do |infile|
|
18
|
+
while (line = infile.gets)
|
19
|
+
line = line.chomp.strip
|
20
|
+
if line.length > 0 && line[0] != '#'
|
21
|
+
#duplicate_and_replace( line.chomp , replacements )
|
22
|
+
#FileUtils.rm(line, :force => true) if delete
|
23
|
+
FileUtils.rm(line, :force => true) if duplicate_and_replace( line.chomp , replacements )[1] != line && delete
|
24
|
+
end
|
25
|
+
end
|
20
26
|
end
|
21
27
|
end
|
22
28
|
end
|
29
|
+
|
30
|
+
def duplicate_wo_csv(*args)
|
31
|
+
delete = args.delete('-d')
|
32
|
+
package = args[0]
|
33
|
+
application = args[1]
|
34
|
+
replacements = {args[1] => args[2]}
|
35
|
+
Dir.glob("#{WORKSPACE}/#{package}/{src,WebContent}/**/#{application}*.*", File::FNM_CASEFOLD).each{|line|
|
36
|
+
bn = File.basename(line, ".*")
|
37
|
+
#puts line #File.basename(line, ".*")
|
38
|
+
unless(bn[application.length] =~ /[a-z0-9]/)
|
39
|
+
#puts line #File.basename(line, ".*")
|
40
|
+
FileUtils.rm(line, :force => true) if duplicate_and_replace( line.chomp , replacements )[1] != line && delete
|
41
|
+
end
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
23
45
|
#read file list from file and delete them
|
24
46
|
def del(*args)
|
25
47
|
replacements = {args[1] => args[2]}
|
@@ -42,6 +64,10 @@ module L5MTools
|
|
42
64
|
"#{WORKSPACE}/#{package}/src/com/l5m/#{package}/engine/worker/#{application}Worker.java" , replacements )
|
43
65
|
copy_with_replace( TEMPLATE_DIR+"TemplateServicerImpl.java" ,
|
44
66
|
"#{WORKSPACE}/#{package}/src/com/l5m/#{package}/engine/servicer/#{application}ServicerImpl.java" , replacements )
|
67
|
+
|
68
|
+
copy_with_replace( TEMPLATE_DIR+"TemplateViewer.java" ,
|
69
|
+
"#{WORKSPACE}/#{package}/src/com/l5m/#{package}/engine/exporter/#{application}Viewer.java" , replacements )
|
70
|
+
|
45
71
|
if File.exist?( TEMPLATE_DIR+"#{package}.jsp")
|
46
72
|
copy_with_replace( TEMPLATE_DIR+"#{package}.jsp" ,
|
47
73
|
"#{WORKSPACE}/#{package}/src/jsp/#{application}.jsp" , replacements )
|
@@ -51,8 +77,5 @@ module L5MTools
|
|
51
77
|
end
|
52
78
|
block.call(Time.now, package, application, use_base_worker) if block_given?
|
53
79
|
end
|
54
|
-
|
55
|
-
|
56
|
-
|
57
80
|
end
|
58
81
|
end
|
data/lib/l5m-tools/array.rb
CHANGED
File without changes
|
data/lib/l5m-tools/env.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module L5MTools
|
2
|
-
raise "no WORKSPACE env " unless WORKSPACE = ENV["WORKSPACE"] || ENV["workspace"]
|
3
|
-
raise "no CATALINA_HOME env" unless CATALINA_HOME = ENV["CATALINA_HOME"]
|
2
|
+
raise "no WORKSPACE env " unless WORKSPACE = (ENV["WORKSPACE"] || ENV["workspace"]).gsub(/[\\]/, '/')
|
3
|
+
raise "no CATALINA_HOME env" unless CATALINA_HOME = ENV["CATALINA_HOME"]
|
4
4
|
raise "no SVN_USER env" unless SVN_USER = ENV["SVN_USER"]
|
5
5
|
raise "no SENDER_EMAIL env" unless SENDER_EMAIL = ENV["SENDER_EMAIL"]
|
6
6
|
PACKAGES = ENV["PACKAGES"].split(/[,;:]/) if ENV["PACKAGES"]
|
File without changes
|
File without changes
|
data/lib/l5m-tools/svn.rb
CHANGED
File without changes
|
@@ -6,7 +6,7 @@
|
|
6
6
|
com.l5m.common.l5m_util.rld.*,
|
7
7
|
com.l5m.common.util.*,
|
8
8
|
org.ajaxanywhere.AAUtils,
|
9
|
-
com.l5m.!REPLACE_STYLE!.bean.*,
|
9
|
+
com.l5m.!REPLACE_STYLE!.bean.*, com.l5m.customtags.beans.*, com.l5m.customtags.tags*,
|
10
10
|
com.l5m.!REPLACE_STYLE!.engine.worker.*,
|
11
11
|
com.l5m.common.l5m_util.module.*"
|
12
12
|
%>
|
@@ -26,15 +26,25 @@
|
|
26
26
|
<c:set var="formName" value="${worker.FORM_NAME}" scope="request"/>
|
27
27
|
<c:set var="packageLowerCase" value="${worker.packageLowerCase}" scope="request"/>
|
28
28
|
<c:set var="packageUpperCase" value="${worker.packageUpperCase}" scope="request"/>
|
29
|
-
<c:set var="styleLowerCase" value="${
|
30
|
-
<c:set var="styleUpperCase" value="${
|
29
|
+
<c:set var="styleLowerCase" value="${worker.styleLowerCase}" />
|
30
|
+
<c:set var="styleUpperCase" value="${worker.styleUpperCase}" />
|
31
31
|
<c:set var="PANEL" value="${worker.PANEL}"/>
|
32
32
|
<%
|
33
33
|
if(AAUtils.isAjaxRequest(request)){
|
34
34
|
AAUtils.addZonesToRefresh(request, "alwaysRefreshZone,"+ ((String)request.getAttribute("refreshZones")));
|
35
35
|
}
|
36
36
|
%><!-- -->
|
37
|
+
<c:set var="soc" value='${servicer.sourceOptionController}'/>
|
38
|
+
<c:set var='jsCache' value='<%="&__jstimeunique="+System.currentTimeMillis()%>'/>
|
39
|
+
<c:set var='theme' value='${worker.navigationBean.theme}' />
|
40
|
+
<c:set var='_request' value="<%=request%>"/>
|
41
|
+
<c:set var="isIE9Below" value="${l5mfunctions:isIE9Below(_request)}"/>
|
42
|
+
<%
|
37
43
|
|
44
|
+
CSSImportParaBean _cssImport = new CSSImportParaBean(request.getContextPath(), "ms2", 1);
|
45
|
+
JSImportParaBean _jsImport = new JSImportParaBean(request.getContextPath());
|
46
|
+
|
47
|
+
%>
|
38
48
|
|
39
49
|
<html>
|
40
50
|
|
@@ -42,7 +52,7 @@ if(AAUtils.isAjaxRequest(request)){
|
|
42
52
|
|
43
53
|
|
44
54
|
|
45
|
-
<l5m:jspHead useIE7Compatible="true" includeJQuery='true' title="${worker.APP_NAME}" formName="${formName}" packageName="${packageLowerCase}" planingCss="L001;L004">
|
55
|
+
<l5m:jspHead useIE7Compatible="true" useCssImport='1' includeJQuery='true' title="${worker.APP_NAME}" formName="${formName}" packageName="${packageLowerCase}" planingCss="L001;L004">
|
46
56
|
|
47
57
|
<!-- add additinal js css in here -->
|
48
58
|
<link href="<%=request.getContextPath()%>/htdoc/datepicker-lite.css" rel="stylesheet" type="text/css" />
|
@@ -84,11 +94,22 @@ if(AAUtils.isAjaxRequest(request)){
|
|
84
94
|
table{
|
85
95
|
border-collapse:collapse;
|
86
96
|
}
|
97
|
+
.grid .TD{border-top:1px dotted #888888;}
|
98
|
+
.grid .LD{border-left:1px dotted #888888;}
|
99
|
+
.grid .row{line-height:33px;}
|
100
|
+
.grid label{white-space:nowrap;}
|
87
101
|
</style>
|
88
102
|
|
89
103
|
|
90
104
|
|
91
|
-
|
105
|
+
<%=_cssImport.getCSSFileImports3(
|
106
|
+
|
107
|
+
)%>
|
108
|
+
|
109
|
+
|
110
|
+
<%=_jsImport.getJSFileImports3(
|
111
|
+
|
112
|
+
)%>
|
92
113
|
|
93
114
|
|
94
115
|
<l5m:LoadResources/>
|
@@ -115,10 +136,8 @@ if(AAUtils.isAjaxRequest(request)){
|
|
115
136
|
|
116
137
|
<aa:zone name="topNavigationZone">
|
117
138
|
<l5m:TopBar2
|
118
|
-
|
119
|
-
|
120
|
-
iconsStatus = "${worker.iconsStatus}"
|
121
|
-
actions = "${worker.actions}"
|
139
|
+
id="${paraBean.topBarStateBean.id}"
|
140
|
+
topBarItems='${worker.topBarItems}'
|
122
141
|
decimalControlList = "${servicer.reportDecimalControlList}"
|
123
142
|
startControlZone = "topPanel"
|
124
143
|
style = "${styleLowerCase}"
|
@@ -127,38 +146,18 @@ if(AAUtils.isAjaxRequest(request)){
|
|
127
146
|
incSingleSelected = "${paraBean.selectedSortBy}"
|
128
147
|
/>
|
129
148
|
</aa:zone>
|
130
|
-
|
131
|
-
<!--
|
132
|
-
function loadjscssfile(filename,filetype){
|
133
|
-
|
134
|
-
if (filetype=="js"){ //if filename is a external JavaScript file
|
135
|
-
if($$('script[src="'+filename+'"]').length >= 1) return;
|
136
|
-
var fileref=document.createElement('script')
|
137
|
-
fileref.setAttribute("type","text/javascript")
|
138
|
-
fileref.setAttribute("src", filename)
|
139
|
-
}
|
140
|
-
else if (filetype=="css"){ //if filename is an external CSS file
|
141
|
-
if($$('link[href="'+filename+'"]').length >= 1) return;
|
142
|
-
var fileref=document.createElement("link")
|
143
|
-
fileref.setAttribute("rel", "stylesheet")
|
144
|
-
fileref.setAttribute("type", "text/css")
|
145
|
-
fileref.setAttribute("href", filename)
|
146
|
-
}
|
147
|
-
if (typeof fileref!="undefined"){
|
148
|
-
document.getElementsByTagName("head")[0].appendChild(fileref)
|
149
|
-
}
|
150
|
-
}
|
151
|
-
//-->
|
152
|
-
</script>
|
149
|
+
|
153
150
|
<div id="topPanel" style="display:${paraBean.selectionPanelStatusOpen?'inline':'none'}" >
|
154
151
|
<!--source panel begin-->
|
155
152
|
<div id="accordionNavigationTab">
|
156
153
|
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
157
154
|
<tr>
|
158
155
|
<td>
|
159
|
-
|
156
|
+
<c:set var='leftstyle' value='line-height:33px;width:200px;padding-left:7px;border-bottom:1px dotted #888; font-weight:bold;' />
|
157
|
+
<c:set var='righstyle' value='padding-left:10px;border-bottom:1px dotted #888;border-left:1px dotted #888;'/>
|
158
|
+
|
160
159
|
<l5m:tabPanel2
|
161
|
-
id="
|
160
|
+
id="${baseServicerParameterBean.tabPanelID}"
|
162
161
|
captions="${baseServicerParameterBean.tabbedPanelCaptions}"
|
163
162
|
selected="${baseServicerParameterBean.selectedTab}"
|
164
163
|
style="${styleLowerCase}"
|
@@ -184,7 +183,12 @@ if(AAUtils.isAjaxRequest(request)){
|
|
184
183
|
|
185
184
|
<aa:zone name="sourcePanelZone">
|
186
185
|
<table id='sourcePanel' border="0" cellspacing="0" cellpadding="0" width="100%">
|
187
|
-
|
186
|
+
<tr class="row">
|
187
|
+
<td class="TD" style="${leftstyle};" nowrap valign="top"> /td>
|
188
|
+
<td class="TD LD" style="${righstyle}; line-height:16px;">
|
189
|
+
|
190
|
+
</td>
|
191
|
+
</tr>
|
188
192
|
</table>
|
189
193
|
</aa:zone>
|
190
194
|
</td>
|
@@ -226,80 +230,14 @@ if(AAUtils.isAjaxRequest(request)){
|
|
226
230
|
<tr>
|
227
231
|
<td align="left" valign="top" width="99%">
|
228
232
|
<aa:zone name="result">
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
${panel.label}
|
238
|
-
</div>
|
239
|
-
</c:if>
|
240
|
-
<c:if test="${false}">
|
241
|
-
<div style=' ${worker.servicer.panelIndex == panelIndex.index || !true ?"cursor: none" : ""} ; white-space:nowrap; ${worker.servicer.panelIndex == panelIndex.index || true ?"font-weight: bold" : ""} ; font-size:11px; border-top-width:0px;${panelIndex.first?"border-left-width:0px":""}' nowrap id="displayBy_${panelIndex.index }" onclick="${baseServicerParameterBean.panelIndex== panelIndex.index ? '':(true? jsChangePanel:'')}" class="${worker.servicer.panelIndex== panelIndex.index? 'focus' :true?'base':'base'}" >
|
242
|
-
${panel.label }
|
243
|
-
</div>
|
244
|
-
</c:if>
|
245
|
-
</c:if>
|
246
|
-
</c:forEach>
|
247
|
-
<div class="last"> </div>
|
248
|
-
</div>
|
249
|
-
<div style='clear:both'/>
|
250
|
-
<table width="100%">
|
251
|
-
<tr>
|
252
|
-
<td nowrap="nowrap" height="40px" style="padding-left:5px;" >
|
253
|
-
</td>
|
254
|
-
<td nowrap="nowrap" height="40px" style="text-align:right; float:right ;padding-right:10px;">
|
255
|
-
${worker.renderPaginatorHTML}
|
256
|
-
</td>
|
257
|
-
</tr>
|
258
|
-
</table>
|
259
|
-
|
260
|
-
|
261
|
-
<table border="0" cellpadding="0" cellspacing="0" width="100%" >
|
262
|
-
<tr> <td nowrap="nowrap" align='left' >
|
263
|
-
<c:if test="${baseServicerParameterBean.panelIndex !=worker.help && baseServicerParameterBean.panelIndex !=worker.dataAvailability}" >
|
264
|
-
</c:if>
|
265
|
-
</td></tr>
|
266
|
-
<tr>
|
267
|
-
<td nowrap="nowrap" align='center' >
|
268
|
-
${worker.renderHTML}
|
269
|
-
</td>
|
270
|
-
</tr>
|
271
|
-
</table>
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
<c:if test="${baseServicerParameterBean.panelIndex ==worker.help}">
|
280
|
-
<!-- the div of descriptionTab -->
|
281
|
-
<div id="descriptionTab"><br/><br/><l5m:appDesc
|
282
|
-
navigationBean="${worker.navigationBean}" style="${styleLowerCase}" id="navDesc" />
|
283
|
-
</div>
|
284
|
-
<!-- the end descriptionTab-->
|
285
|
-
</c:if>
|
286
|
-
|
287
|
-
<c:if test="${baseServicerParameterBean.panelIndex ==worker.dataAvailability}">
|
288
|
-
<table width="100%">
|
289
|
-
<tr>
|
290
|
-
<td width="15%" rowspan="4"> </td>
|
291
|
-
<td width="70%">
|
292
|
-
<c:set var="moduleGeneralAvailability" scope="request" value="${worker.servicer.generalAvailabilityModule}"/>
|
293
|
-
<!-- GeneralAvailabilityModule.SESSION_NAME -->
|
294
|
-
<table border="0" cellpadding="0" cellspacing="2" width="100%">
|
295
|
-
<jsp:include page="GeneralAvailabilityModule.jsp" flush="true"/>
|
296
|
-
</table>
|
297
|
-
</td>
|
298
|
-
<td width="15%" rowspan="4"> </td>
|
299
|
-
</tr>
|
300
|
-
</table>
|
301
|
-
|
302
|
-
</c:if>
|
233
|
+
<l5m:resultZone
|
234
|
+
panels='${PANEL}'
|
235
|
+
formName="${worker.FORM_NAME}" packageName="${packageLowerCase}" style="${styleLowerCase}"
|
236
|
+
groupId="${servicer.groupId}" companyId="${servicer.companyId}"
|
237
|
+
userId="${servicer.userId}"
|
238
|
+
dbHandler="${servicer.dbHandler}" usingDefaultPaginatorRender='false'
|
239
|
+
|
240
|
+
/>
|
303
241
|
</aa:zone>
|
304
242
|
</td>
|
305
243
|
</tr>
|
@@ -366,14 +304,16 @@ if(AAUtils.isAjaxRequest(request)){
|
|
366
304
|
<c:if test="${!empty paraBean.displayWrappers[paraBean.panelIndex]}">
|
367
305
|
<c:forEach var="displayWrapper" items="${paraBean.displayWrappers[paraBean.panelIndex]}">
|
368
306
|
<c:if test="${!empty displayWrapper.columnsMap}">
|
307
|
+
<div style="${displayWrapper.hidden?'display:none;':''}">
|
369
308
|
<l5m:multipleSelect
|
370
309
|
id="${displayWrapper.id}"
|
371
310
|
style="${styleLowerCase}"
|
372
311
|
title="${displayWrapper.title}"
|
373
312
|
sourceValues="${displayWrapper.columnsMap}"
|
374
313
|
selectedValues="${displayWrapper.selectedColumns }"
|
314
|
+
selectedValue="${displayWrapper.selectedValue}"
|
375
315
|
onChange=""
|
376
|
-
displayMode="
|
316
|
+
displayMode="${displayWrapper.displayMode}"
|
377
317
|
useSortBy="true"
|
378
318
|
sortBy="1"
|
379
319
|
sortField="2"
|
@@ -383,7 +323,8 @@ if(AAUtils.isAjaxRequest(request)){
|
|
383
323
|
destinationWidth="200"
|
384
324
|
sourceSize="5"
|
385
325
|
destinationSize="5"
|
386
|
-
/>
|
326
|
+
/>
|
327
|
+
</div>
|
387
328
|
</c:if>
|
388
329
|
</c:forEach>
|
389
330
|
</c:if>
|
@@ -459,11 +400,7 @@ if(AAUtils.isAjaxRequest(request)){
|
|
459
400
|
</l5m:dialogBottom>
|
460
401
|
</l5m:dialog>
|
461
402
|
|
462
|
-
|
463
|
-
<l5m:jspFoot id="jspFoot"/>
|
464
|
-
</aa:zone>
|
465
|
-
|
466
|
-
|
403
|
+
|
467
404
|
<!-- end dialog -->
|
468
405
|
|
469
406
|
</l5m:jspBody>
|
@@ -10,6 +10,7 @@ import com.l5m.customtags.tags.utils.IconStatus;
|
|
10
10
|
import com.l5m.customtags.tags.utils.TopBarIcon;
|
11
11
|
import com.l5m.!REPLACE_STYLE!.engine.servicer.!REPLACE_ME_FILE!ServicerImpl;
|
12
12
|
import com.l5m.!REPLACE_STYLE!.engine.servicer.!REPLACE_ME_FILE!ServicerImpl.PANEL;
|
13
|
+
import com.l5m.!REPLACE_STYLE!.engine.exporter.!REPLACE_ME_FILE!Viewer;
|
13
14
|
|
14
15
|
public class !REPLACE_ME_FILE!Worker extends AbstractBaseWorker {
|
15
16
|
private static final long serialVersionUID = 1L;
|
@@ -132,14 +133,15 @@ public class !REPLACE_ME_FILE!Worker extends AbstractBaseWorker {
|
|
132
133
|
|
133
134
|
@Override
|
134
135
|
protected void initWorker() {
|
135
|
-
this.servicer.getBaseServicerParameterBean().
|
136
|
+
this.servicer.getBaseServicerParameterBean().resetPanelIndex2Default();
|
136
137
|
|
137
138
|
}
|
138
139
|
|
139
140
|
@Override
|
140
141
|
public void clearResultAction() {
|
141
142
|
super.clearResultAction();
|
142
|
-
this.servicer.
|
143
|
+
this.servicer.getBaseServicerParameterBean().resetPanelIndex2Default();
|
144
|
+
|
143
145
|
}
|
144
146
|
|
145
147
|
public void updateExportInformationBean(){
|
@@ -155,4 +157,10 @@ public class !REPLACE_ME_FILE!Worker extends AbstractBaseWorker {
|
|
155
157
|
super.submitAction();
|
156
158
|
|
157
159
|
}
|
160
|
+
|
161
|
+
@Override
|
162
|
+
public !REPLACE_ME_FILE!Viewer getViewer (boolean isHTML) {
|
163
|
+
!REPLACE_ME_FILE!Viewer viewer = new !REPLACE_ME_FILE!Viewer(this, this.servicer.getExcelOption(), isHTML );
|
164
|
+
return viewer;
|
165
|
+
}
|
158
166
|
}
|
@@ -9,6 +9,13 @@ import com.l5m.common.bean.GeneralAvailabilityModule;
|
|
9
9
|
import com.l5m.common.util.dcnds.QHTCommonUtil;
|
10
10
|
import com.l5m.customtags.beans.BaseServicerParaBean;
|
11
11
|
import com.l5m.customtags.tags.utils.GenerateTagUtil;
|
12
|
+
import java.sql.SQLException;
|
13
|
+
import java.util.ArrayList;
|
14
|
+
|
15
|
+
import com.l5m.customtags.beans.annotation.ParseMethodType;
|
16
|
+
import com.l5m.customtags.beans.annotation.RequestParse;
|
17
|
+
import com.l5m.customtags.module.statebean.ExcelOptionStateBean;
|
18
|
+
|
12
19
|
import com.l5m.!REPLACE_STYLE!.engine.worker.UserCompanyWorker;
|
13
20
|
/**
|
14
21
|
* make sure code as clear as possible.
|
@@ -24,7 +31,7 @@ import com.l5m.!REPLACE_STYLE!.engine.worker.UserCompanyWorker;
|
|
24
31
|
*/
|
25
32
|
public class !REPLACE_ME_FILE!ServicerImpl extends BaseServicerParaBean.AbstractBaseServicer{
|
26
33
|
private static final long serialVersionUID = 1L;
|
27
|
-
public static enum PANEL {
|
34
|
+
public static enum PANEL implements com.l5m.customtags.beans.PanelTab{
|
28
35
|
REPORT("REPORT") ,
|
29
36
|
Help("Help"), DataAvailability("Data Availability")
|
30
37
|
; //Total Day/Prime * LSD/C3
|
@@ -51,6 +58,10 @@ public class !REPLACE_ME_FILE!ServicerImpl extends BaseServicerParaBean.Abstract
|
|
51
58
|
public int panelIndex(){
|
52
59
|
return this.ordinal();
|
53
60
|
}
|
61
|
+
@Override
|
62
|
+
public int getPanelIndex() {
|
63
|
+
return panelIndex();
|
64
|
+
}
|
54
65
|
}
|
55
66
|
|
56
67
|
|
@@ -59,14 +70,16 @@ public class !REPLACE_ME_FILE!ServicerImpl extends BaseServicerParaBean.Abstract
|
|
59
70
|
@Override
|
60
71
|
public void clearCache() {
|
61
72
|
super.clearCache();
|
62
|
-
this.servicerParamBean.
|
63
|
-
|
73
|
+
this.servicerParamBean.resetPanelIndex2Default();
|
64
74
|
System.gc();
|
65
75
|
}
|
66
76
|
|
67
77
|
|
68
78
|
@Override
|
69
79
|
public void handlePaginator(int panelIndex) {
|
80
|
+
if(panelIndex == PANEL.DataAvailability.panelIndex() || panelIndex == PANEL.Help.panelIndex() ){
|
81
|
+
return ;
|
82
|
+
}
|
70
83
|
if (this.servicerParamBean.getPaginatorStateBean(panelIndex) == null) {
|
71
84
|
this.servicerParamBean.setPaginatorStateBean(GenerateTagUtil.initPaginatorStateBean("PaginatorStateBeanTag"), panelIndex);
|
72
85
|
this.servicerParamBean.getPaginatorStateBean(panelIndex).setRowsPerPage(1);
|
@@ -88,8 +101,12 @@ public class !REPLACE_ME_FILE!ServicerImpl extends BaseServicerParaBean.Abstract
|
|
88
101
|
public void init( ) {
|
89
102
|
super.init();
|
90
103
|
try {
|
91
|
-
this.servicerParamBean
|
104
|
+
if(this.servicerParamBean == null){
|
105
|
+
this.servicerParamBean = new BaseServicerParaBean();
|
106
|
+
}
|
107
|
+
this.servicerParamBean .init(this.dh, this.companyId, this.groupId , this.userId, this.userCompanyId, PANEL.values().length);
|
92
108
|
this.servicerParamBean.initDisplayAndSortBy();
|
109
|
+
this.servicerParamBean.setDefaultPanelIndex(PANEL.REPORT.panelIndex());
|
93
110
|
try{
|
94
111
|
this.initTimeSpan();
|
95
112
|
}catch(Exception e){
|
@@ -0,0 +1,60 @@
|
|
1
|
+
package com.l5m.!REPLACE_STYLE!.engine.exporter;
|
2
|
+
|
3
|
+
import java.util.ArrayList;
|
4
|
+
import java.util.Arrays;
|
5
|
+
import java.util.List;
|
6
|
+
|
7
|
+
import com.l5m.customtags.export.BaseExcelHandler;
|
8
|
+
import com.l5m.customtags.export.BaseViewer;
|
9
|
+
import com.l5m.customtags.module.statebean.ExcelOptionStateBean;
|
10
|
+
import com.l5m.!REPLACE_STYLE!.engine.servicer.!REPLACE_ME_FILE!ServicerImpl;
|
11
|
+
import com.l5m.!REPLACE_STYLE!.engine.servicer.!REPLACE_ME_FILE!ServicerImpl.PANEL;
|
12
|
+
import com.l5m.!REPLACE_STYLE!.engine.worker.!REPLACE_ME_FILE!Worker;
|
13
|
+
|
14
|
+
public class !REPLACE_ME_FILE!Viewer extends BaseViewer {
|
15
|
+
protected boolean[] panelController;
|
16
|
+
|
17
|
+
public !REPLACE_ME_FILE!Viewer(!REPLACE_ME_FILE!Worker worker, ExcelOptionStateBean excelOption, boolean isHTML) {
|
18
|
+
super(excelOption, isHTML);
|
19
|
+
this.servicer = worker.getServicer();
|
20
|
+
this.exportInformationBean = this.servicer.getExportInformationBean();
|
21
|
+
boolean[] panelController = servicer.getPanelController();
|
22
|
+
if(panelController == null){
|
23
|
+
panelController = new boolean[PANEL.values().length - 2];
|
24
|
+
Arrays.fill(panelController, true);
|
25
|
+
}
|
26
|
+
this.UPPERCASE_STYLE = this.servicer.getExportInformationBean().getStyleLowerCase().toUpperCase();
|
27
|
+
|
28
|
+
this.sheets = new String[PANEL.values().length - 2];
|
29
|
+
List<String> list = new ArrayList<String>();
|
30
|
+
for (int i = 0; i < sheets.length; i++) {
|
31
|
+
if(!PANEL.values()[i].isEnable()){
|
32
|
+
panelController[i] = false;
|
33
|
+
}
|
34
|
+
if(panelController[i]){
|
35
|
+
list.add( PANEL.values()[i].getLabel());
|
36
|
+
}
|
37
|
+
}
|
38
|
+
this.sheets = list.toArray(new String[list.size()]);
|
39
|
+
this.rowPositions = new int[this.sheets.length];
|
40
|
+
Arrays.fill(this.rowPositions, 4);
|
41
|
+
this.panelController = panelController;
|
42
|
+
}
|
43
|
+
|
44
|
+
|
45
|
+
private static final long serialVersionUID = 1L;
|
46
|
+
!REPLACE_ME_FILE!ServicerImpl servicer;
|
47
|
+
|
48
|
+
@Override
|
49
|
+
public void generateBody (BaseExcelHandler handler, boolean onlyCurrentReport) {
|
50
|
+
if(!this.servicer.isDisplayStage()){
|
51
|
+
return;
|
52
|
+
}
|
53
|
+
final int panelIndex = this.servicer.getPanelIndex();
|
54
|
+
|
55
|
+
|
56
|
+
this.servicer.setPanelIndex(panelIndex);
|
57
|
+
|
58
|
+
}
|
59
|
+
|
60
|
+
}
|