Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Privacy
Imprint
Contact
Login methods
Sign in
Toggle navigation
Menu
Open sidebar
Thomas Rehm
ARSnova Mobile
Commits
7bf303db
Commit
7bf303db
authored
Jun 18, 2013
by
Christoph Thelen
Browse files
Minify JS files and package inside war archive
parent
1bf9e0f5
Changes
14
Hide whitespace changes
Inline
Side-by-side
build.xml
View file @
7bf303db
...
...
@@ -4,8 +4,12 @@
<property
name=
"sencha.dir"
value=
"${lib.dir}/sencha1.1.1"
/>
<property
name=
"build.dir"
value=
"src/main/build"
/>
<target
name=
"-build:init"
>
<mkdir
dir=
"${build.dir}"
/>
</target>
<target
name=
"-min:js:minify"
>
<apply
executable=
"java"
dest=
"${main.dir}
/app
"
>
<apply
executable=
"java"
dest=
"${main.dir}
"
failonerror=
"true
"
>
<arg
value=
"-jar"
/>
<arg
value=
"${lib.dir}/compiler.jar"
/>
<arg
value=
"--js"
/>
...
...
@@ -13,21 +17,40 @@
<arg
value=
"--js_output_file"
/>
<targetfile/>
<fileset
dir=
"${main.dir}/app"
includes=
"**/*.js"
/>
<fileset
dir=
"${main.dir}"
>
<include
name=
"**/*.js"
/>
<!-- do not process Touch Charts - it throws errors! -->
<exclude
name=
"**/*touch-charts-debug.js"
/>
<exclude
name=
"**/*touch-charts.js"
/>
</fileset>
<mapper
type=
"glob"
from=
"*.js"
to=
"*.js.min"
/>
</apply>
</target>
<target
name=
"-min:js:move"
depends=
"-min:js:minify"
>
<move
todir=
"${build.dir}"
verbose=
"true"
>
<fileset
dir=
"${main.dir}
/app
"
>
<fileset
dir=
"${main.dir}"
>
<include
name=
"**/*.js.min"
/>
</fileset>
<mapper
type=
"glob"
from=
"*.min"
to=
"*"
/>
</move>
</target>
<target
name=
"min:js"
depends=
"-min:js:move"
/>
<target
name=
"-assets:copy"
depends=
"-build:init"
>
<copy
todir=
"${build.dir}/resources"
>
<fileset
dir=
"${main.dir}/resources"
/>
</copy>
<copy
todir=
"${build.dir}"
>
<fileset
dir=
"${main.dir}"
>
<include
name=
"st2-index.html"
/>
<include
name=
"st2-arsnova.manifest"
/>
<include
name=
"favicon.png"
/>
<include
name=
"WEB-INF/**"
/>
</fileset>
</copy>
</target>
<target
name=
"min:js"
depends=
"-build:init,-assets:copy,-min:js:move"
/>
<target
name=
"min:css"
>
<java
jar=
"${sencha.dir}/jsbuilder/ycompressor/ycompressor.jar"
fork=
"true"
failonerror=
"true"
output=
"${main.dir}/resources/css/arsnova_min.css"
>
...
...
pom.xml
View file @
7bf303db
...
...
@@ -54,6 +54,25 @@
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-antrun-plugin
</artifactId>
<version>
1.7
</version>
<executions>
<execution>
<phase>
compile
</phase>
<configuration>
<target>
<!-- ant target="min:css" /-->
<ant
target=
"min:js"
/>
</target>
</configuration>
<goals>
<goal>
run
</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-compiler-plugin
</artifactId>
...
...
@@ -68,16 +87,11 @@
<artifactId>
maven-war-plugin
</artifactId>
<version>
2.3
</version>
<configuration>
<warSourceIncludes>
st2-index.html,
st2-developer.html,
resources/**,
screenshots/**,
app/**,
lib/**
</warSourceIncludes>
<warSourceDirectory>
src/main/build
</warSourceDirectory>
<webXml>
src/main/
webapp
/WEB-INF/web.xml
src/main/
build
/WEB-INF/web.xml
</webXml>
</configuration>
</plugin>
...
...
src/main/webapp/app/view/Caption.js
View file @
7bf303db
...
...
@@ -25,7 +25,7 @@ Ext.define('ARSnova.view.Caption', {
this
.
listButton
=
Ext
.
create
(
'
ARSnova.view.MultiBadgeButton
'
,
{
ui
:
'
small
'
,
text
:
""
,
cls
:
'
forwardListButton caption
'
,
cls
:
'
forwardListButton caption
'
});
this
.
add
([].
concat
(
window
.
innerWidth
>
320
?
[{
...
...
src/main/webapp/app/view/FreetextAnswerPanel.js
View file @
7bf303db
...
...
@@ -39,11 +39,11 @@ Ext.define('ARSnova.view.FreetextAnswerPanel', {
freetextAnswerStore
:
null
},
constructor
:
function
(
arg
ument
s
)
{
this
.
callParent
(
arg
ument
s
);
constructor
:
function
(
args
)
{
this
.
callParent
(
args
);
this
.
questionObj
=
arg
ument
s
.
question
;
this
.
lastPanel
=
arg
ument
s
.
lastPanel
;
this
.
questionObj
=
args
.
question
;
this
.
lastPanel
=
args
.
lastPanel
;
var
self
=
this
;
this
.
checkFreetextAnswersTask
=
{
...
...
src/main/webapp/app/view/FreetextDetailAnswer.js
View file @
7bf303db
...
...
@@ -30,11 +30,11 @@ Ext.define('ARSnova.view.FreetextDetailAnswer', {
}
},
constructor
:
function
(
arg
ument
s
)
{
this
.
callParent
(
arg
ument
s
);
constructor
:
function
(
args
)
{
this
.
callParent
(
args
);
this
.
answer
=
arg
ument
s
.
answer
;
this
.
sTP
=
arg
ument
s
.
sTP
;
this
.
answer
=
args
.
answer
;
this
.
sTP
=
args
.
sTP
;
var
self
=
this
;
...
...
src/main/webapp/app/view/FreetextQuestion.js
View file @
7bf303db
...
...
@@ -29,12 +29,12 @@ Ext.define('ARSnova.view.FreetextQuestion', {
}
},
constructor
:
function
(
arg
ument
s
)
{
this
.
callParent
(
arg
ument
s
);
constructor
:
function
(
args
)
{
this
.
callParent
(
args
);
var
self
=
this
;
this
.
questionObj
=
arg
ument
s
.
questionObj
;
this
.
viewOnly
=
typeof
arg
ument
s
.
viewOnly
===
"
undefined
"
?
false
:
arg
ument
s
.
viewOnly
;
this
.
questionObj
=
args
.
questionObj
;
this
.
viewOnly
=
typeof
args
.
viewOnly
===
"
undefined
"
?
false
:
args
.
viewOnly
;
this
.
on
(
'
preparestatisticsbutton
'
,
function
(
button
)
{
button
.
scope
=
this
;
...
...
src/main/webapp/app/view/QuestionStatusButton.js
View file @
7bf303db
...
...
@@ -33,10 +33,10 @@ Ext.define('ARSnova.view.QuestionStatusButton', {
questionIsOpenButton
:
null
,
questionIsClosedButton
:
null
,
constructor
:
function
(
arg
ument
s
)
{
this
.
callParent
(
arg
ument
s
);
constructor
:
function
(
args
)
{
this
.
callParent
(
args
);
this
.
questionObj
=
arg
ument
s
.
questionObj
;
this
.
questionObj
=
args
.
questionObj
;
this
.
questionIsClosedButton
=
Ext
.
create
(
'
Ext.Button
'
,
{
cls
:
'
closedSession
'
,
...
...
src/main/webapp/app/view/TextCheckfield.js
View file @
7bf303db
...
...
@@ -85,5 +85,5 @@ Ext.define('ARSnova.view.TextCheckfield', {
}
this
.
config
.
checked
=
!
this
.
config
.
checked
;
}
,
}
});
src/main/webapp/app/view/feedback/StatisticPanel.js
View file @
7bf303db
...
...
@@ -226,7 +226,7 @@ Ext.define('ARSnova.view.feedback.StatisticPanel', {
color
:
0x6238A7
,
size
:
8
,
fill
:
'
blue
'
}
,
}
}]
});
...
...
src/main/webapp/app/view/feedbackQuestions/DetailsPanel.js
View file @
7bf303db
...
...
@@ -38,10 +38,10 @@ Ext.define('ARSnova.view.feedbackQuestions.DetailsPanel', {
backButton
:
null
,
questionObj
:
null
,
constructor
:
function
(
arg
ument
s
){
this
.
callParent
(
arg
ument
s
);
constructor
:
function
(
args
){
this
.
callParent
(
args
);
this
.
questionObj
=
arg
ument
s
.
question
;
this
.
questionObj
=
args
.
question
;
this
.
backButton
=
Ext
.
create
(
'
Ext.Button
'
,
{
text
:
Messages
.
QUESTIONS
,
...
...
src/main/webapp/app/view/home/NewSessionPanel.js
View file @
7bf303db
...
...
@@ -39,15 +39,13 @@ Ext.define('ARSnova.view.home.NewSessionPanel', {
toolbar
:
null
,
backButton
:
null
,
constructor
:
function
(
arg
ument
s
)
{
this
.
callParent
(
arg
ument
s
);
constructor
:
function
(
args
)
{
this
.
callParent
(
args
);
this
.
mycoursesStore
=
new
Ext
.
data
.
JsonStore
({
model
:
'
ARSnova.model.Course
'
});
var
mycoursesStore
=
this
.
mycoursesStore
;
this
.
mycourses
=
Ext
.
create
(
'
Ext.List
'
,
{
store
:
this
.
mycoursesStore
,
hidden
:
true
,
...
...
@@ -104,7 +102,7 @@ Ext.define('ARSnova.view.home.NewSessionPanel', {
this
.
add
([
this
.
toolbar
,
{
title
:
'
createSession
'
,
style
:
{
marginTop
:
'
15px
'
,
marginTop
:
'
15px
'
},
xtype
:
'
formpanel
'
,
scrollable
:
null
,
...
...
src/main/webapp/app/view/speaker/InClass.js
View file @
7bf303db
...
...
@@ -165,7 +165,7 @@ Ext.define('ARSnova.view.speaker.InClass', {
style
:
{
marginTop
:
'
50px
'
},
layout
:
{
type
:
'
hbox
'
,
pack
:
'
center
'
,
pack
:
'
center
'
},
items
:
[
...
...
src/main/webapp/app/view/speaker/QuestionDetailsPanel.js
View file @
7bf303db
...
...
@@ -75,11 +75,11 @@ Ext.define('ARSnova.view.speaker.QuestionDetailsPanel', {
interval
:
20000
//20 seconds
},
constructor
:
function
(
arg
ument
s
){
this
.
callParent
(
arg
ument
s
);
constructor
:
function
(
args
){
this
.
callParent
(
args
);
var
me
=
this
;
this
.
questionObj
=
arg
ument
s
.
question
;
this
.
questionObj
=
args
.
question
;
if
(
this
.
questionObj
.
questionType
==
"
yesno
"
||
this
.
questionObj
.
questionType
==
"
mc
"
||
...
...
src/main/webapp/app/view/speaker/QuestionStatisticChart.js
View file @
7bf303db
...
...
@@ -58,11 +58,11 @@ Ext.define('ARSnova.view.speaker.QuestionStatisticChart', {
interval
:
15000
},
constructor
:
function
(
arg
ument
s
){
this
.
callParent
(
arg
ument
s
);
constructor
:
function
(
args
){
this
.
callParent
(
args
);
this
.
questionObj
=
arg
ument
s
.
question
;
this
.
lastPanel
=
arg
ument
s
.
lastPanel
;
this
.
questionObj
=
args
.
question
;
this
.
lastPanel
=
args
.
lastPanel
;
this
.
questionStore
=
Ext
.
create
(
'
Ext.data.Store
'
,
{
fields
:
[
'
text
'
,
'
value
'
,
'
percent
'
]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment