From 7bf303dbe3eda591b2f92267b886eeed53e751cd Mon Sep 17 00:00:00 2001 From: Christoph Thelen Date: Tue, 18 Jun 2013 14:02:11 +0200 Subject: [PATCH] Minify JS files and package inside war archive --- build.xml | 31 +++++++++++++++--- pom.xml | 32 +++++++++++++------ src/main/webapp/app/view/Caption.js | 2 +- .../webapp/app/view/FreetextAnswerPanel.js | 8 ++--- .../webapp/app/view/FreetextDetailAnswer.js | 8 ++--- src/main/webapp/app/view/FreetextQuestion.js | 8 ++--- .../webapp/app/view/QuestionStatusButton.js | 6 ++-- src/main/webapp/app/view/TextCheckfield.js | 2 +- .../app/view/feedback/StatisticPanel.js | 2 +- .../view/feedbackQuestions/DetailsPanel.js | 6 ++-- .../webapp/app/view/home/NewSessionPanel.js | 8 ++--- src/main/webapp/app/view/speaker/InClass.js | 2 +- .../app/view/speaker/QuestionDetailsPanel.js | 6 ++-- .../view/speaker/QuestionStatisticChart.js | 8 ++--- 14 files changed, 82 insertions(+), 47 deletions(-) diff --git a/build.xml b/build.xml index aeb501ed..e20c0ca9 100755 --- a/build.xml +++ b/build.xml @@ -4,8 +4,12 @@ + + + + - + @@ -13,21 +17,40 @@ - + + + + + + - + - + + + + + + + + + + + + + + + diff --git a/pom.xml b/pom.xml index 6631a685..386288d7 100755 --- a/pom.xml +++ b/pom.xml @@ -54,6 +54,25 @@ + + org.apache.maven.plugins + maven-antrun-plugin + 1.7 + + + compile + + + + + + + + run + + + + org.apache.maven.plugins maven-compiler-plugin @@ -68,16 +87,11 @@ maven-war-plugin 2.3 - - st2-index.html, - st2-developer.html, - resources/**, - screenshots/**, - app/**, - lib/** - + + src/main/build + - src/main/webapp/WEB-INF/web.xml + src/main/build/WEB-INF/web.xml diff --git a/src/main/webapp/app/view/Caption.js b/src/main/webapp/app/view/Caption.js index 2fb07afb..7ae4884e 100755 --- a/src/main/webapp/app/view/Caption.js +++ b/src/main/webapp/app/view/Caption.js @@ -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 ? [{ diff --git a/src/main/webapp/app/view/FreetextAnswerPanel.js b/src/main/webapp/app/view/FreetextAnswerPanel.js index 2c768315..c6e22065 100755 --- a/src/main/webapp/app/view/FreetextAnswerPanel.js +++ b/src/main/webapp/app/view/FreetextAnswerPanel.js @@ -39,11 +39,11 @@ Ext.define('ARSnova.view.FreetextAnswerPanel', { freetextAnswerStore: null }, - constructor: function(arguments) { - this.callParent(arguments); + constructor: function(args) { + this.callParent(args); - this.questionObj = arguments.question; - this.lastPanel = arguments.lastPanel; + this.questionObj = args.question; + this.lastPanel = args.lastPanel; var self = this; this.checkFreetextAnswersTask = { diff --git a/src/main/webapp/app/view/FreetextDetailAnswer.js b/src/main/webapp/app/view/FreetextDetailAnswer.js index 47c2a374..bd674fe9 100755 --- a/src/main/webapp/app/view/FreetextDetailAnswer.js +++ b/src/main/webapp/app/view/FreetextDetailAnswer.js @@ -30,11 +30,11 @@ Ext.define('ARSnova.view.FreetextDetailAnswer', { } }, - constructor: function(arguments) { - this.callParent(arguments); + constructor: function(args) { + this.callParent(args); - this.answer = arguments.answer; - this.sTP = arguments.sTP; + this.answer = args.answer; + this.sTP = args.sTP; var self = this; diff --git a/src/main/webapp/app/view/FreetextQuestion.js b/src/main/webapp/app/view/FreetextQuestion.js index 7edad333..cf46729e 100755 --- a/src/main/webapp/app/view/FreetextQuestion.js +++ b/src/main/webapp/app/view/FreetextQuestion.js @@ -29,12 +29,12 @@ Ext.define('ARSnova.view.FreetextQuestion', { } }, - constructor: function(arguments) { - this.callParent(arguments); + constructor: function(args) { + this.callParent(args); var self = this; - this.questionObj = arguments.questionObj; - this.viewOnly = typeof arguments.viewOnly === "undefined" ? false : arguments.viewOnly; + this.questionObj = args.questionObj; + this.viewOnly = typeof args.viewOnly === "undefined" ? false : args.viewOnly; this.on('preparestatisticsbutton', function(button) { button.scope = this; diff --git a/src/main/webapp/app/view/QuestionStatusButton.js b/src/main/webapp/app/view/QuestionStatusButton.js index 3a9b8c2f..eed01cd2 100755 --- a/src/main/webapp/app/view/QuestionStatusButton.js +++ b/src/main/webapp/app/view/QuestionStatusButton.js @@ -33,10 +33,10 @@ Ext.define('ARSnova.view.QuestionStatusButton', { questionIsOpenButton: null, questionIsClosedButton: null, - constructor: function(arguments) { - this.callParent(arguments); + constructor: function(args) { + this.callParent(args); - this.questionObj = arguments.questionObj; + this.questionObj = args.questionObj; this.questionIsClosedButton = Ext.create('Ext.Button', { cls : 'closedSession', diff --git a/src/main/webapp/app/view/TextCheckfield.js b/src/main/webapp/app/view/TextCheckfield.js index aec4827e..db72a093 100644 --- a/src/main/webapp/app/view/TextCheckfield.js +++ b/src/main/webapp/app/view/TextCheckfield.js @@ -85,5 +85,5 @@ Ext.define('ARSnova.view.TextCheckfield', { } this.config.checked = !this.config.checked; - }, + } }); diff --git a/src/main/webapp/app/view/feedback/StatisticPanel.js b/src/main/webapp/app/view/feedback/StatisticPanel.js index 966e3faf..7f19563f 100755 --- a/src/main/webapp/app/view/feedback/StatisticPanel.js +++ b/src/main/webapp/app/view/feedback/StatisticPanel.js @@ -226,7 +226,7 @@ Ext.define('ARSnova.view.feedback.StatisticPanel', { color:0x6238A7, size:8, fill: 'blue' - }, + } }] }); diff --git a/src/main/webapp/app/view/feedbackQuestions/DetailsPanel.js b/src/main/webapp/app/view/feedbackQuestions/DetailsPanel.js index 54cfecf3..b7667dec 100755 --- a/src/main/webapp/app/view/feedbackQuestions/DetailsPanel.js +++ b/src/main/webapp/app/view/feedbackQuestions/DetailsPanel.js @@ -38,10 +38,10 @@ Ext.define('ARSnova.view.feedbackQuestions.DetailsPanel', { backButton : null, questionObj : null, - constructor: function(arguments){ - this.callParent(arguments); + constructor: function(args){ + this.callParent(args); - this.questionObj = arguments.question; + this.questionObj = args.question; this.backButton = Ext.create('Ext.Button', { text : Messages.QUESTIONS, diff --git a/src/main/webapp/app/view/home/NewSessionPanel.js b/src/main/webapp/app/view/home/NewSessionPanel.js index 18fa358f..e506bacb 100755 --- a/src/main/webapp/app/view/home/NewSessionPanel.js +++ b/src/main/webapp/app/view/home/NewSessionPanel.js @@ -39,15 +39,13 @@ Ext.define('ARSnova.view.home.NewSessionPanel', { toolbar : null, backButton : null, - constructor: function(arguments) { - this.callParent(arguments); + 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, diff --git a/src/main/webapp/app/view/speaker/InClass.js b/src/main/webapp/app/view/speaker/InClass.js index d66a8150..43c31b6b 100755 --- a/src/main/webapp/app/view/speaker/InClass.js +++ b/src/main/webapp/app/view/speaker/InClass.js @@ -165,7 +165,7 @@ Ext.define('ARSnova.view.speaker.InClass', { style : { marginTop: '50px' }, layout : { type: 'hbox', - pack: 'center', + pack: 'center' }, items: [ diff --git a/src/main/webapp/app/view/speaker/QuestionDetailsPanel.js b/src/main/webapp/app/view/speaker/QuestionDetailsPanel.js index b1c7f95d..d89942bd 100755 --- a/src/main/webapp/app/view/speaker/QuestionDetailsPanel.js +++ b/src/main/webapp/app/view/speaker/QuestionDetailsPanel.js @@ -75,11 +75,11 @@ Ext.define('ARSnova.view.speaker.QuestionDetailsPanel', { interval: 20000 //20 seconds }, - constructor: function(arguments){ - this.callParent(arguments); + constructor: function(args){ + this.callParent(args); var me = this; - this.questionObj = arguments.question; + this.questionObj = args.question; if( this.questionObj.questionType == "yesno" || this.questionObj.questionType == "mc" || diff --git a/src/main/webapp/app/view/speaker/QuestionStatisticChart.js b/src/main/webapp/app/view/speaker/QuestionStatisticChart.js index f62d4109..68370cfe 100755 --- a/src/main/webapp/app/view/speaker/QuestionStatisticChart.js +++ b/src/main/webapp/app/view/speaker/QuestionStatisticChart.js @@ -58,11 +58,11 @@ Ext.define('ARSnova.view.speaker.QuestionStatisticChart', { interval: 15000 }, - constructor: function(arguments){ - this.callParent(arguments); + constructor: function(args){ + this.callParent(args); - this.questionObj = arguments.question; - this.lastPanel = arguments.lastPanel; + this.questionObj = args.question; + this.lastPanel = args.lastPanel; this.questionStore = Ext.create('Ext.data.Store', { fields: ['text', 'value', 'percent'] -- GitLab