Initial import of arsnova-legacy-js

This project holds an WAR overlay for the legacy ARSnova 1.x
based on Sencha and PHP.
parents
.project
.classpath
.settings/*
target/*
<project name="ARSnova" default="run">
<property name="lib.dir" value="lib" />
<property name="sencha.dir" value="${lib.dir}/sencha1.1.1" />
<target name="min:js">
<chmod file="${sencha.dir}/jsbuilder/jsdb/linux/jsdb" perm="+x" />
<exec executable="sh" dir="${sencha.dir}/jsbuilder" failonerror="true">
<arg value="JSBuilder.sh" />
<arg value="-p ../ARSnovaCombined.jsb3" />
<arg value="-d ../" />
<arg value="-v" />
</exec>
</target>
<target name="min:css">
<java jar="${sencha.dir}/jsbuilder/ycompressor/ycompressor.jar" fork="true" failonerror="true" output="resources/css/arsnova_min.css">
<arg value="resources/css/arsnova_new.css" />
</java>
</target>
</project>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.thm.arsnova</groupId>
<artifactId>arsnova-legacy-js</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>war</packaging>
</project>
\ No newline at end of file
Instruktionen für ARSnova
1. CouchDB installieren.
2. In der Apache-Konfiguration einen ProxyPass einrichten:
ProxyPass /couchdb http://localhost:5984
3. Die Datenbank inkl. aller Views für ARSnova anlegen lassen:
http://localhost/arsnova/couchdb_views/update.php
4. ARSnova über localhost/arsnova/developer.html aufrufen
5. Für die Produktion (ars.thm.de macht dies automatisch):
- arsnova_min.css (minifiziert) erzeugen.
- arsnovaCombined.js erzeugen. Beachte hierzu: lib/sencha1.1.1/ARSnovaCombinedHowTo
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id="WebApp_ID" version="3.0">
<display-name>
arsnova-legacy-js
</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
\ No newline at end of file
/*--------------------------------------------------------------------------+
This file is part of ARSnova.
app.js
- Beschreibung: Einstiegsseite für ARSnova.
- Version: 1.0, 01/05/12
- Autor(en): Christian Thomas Weber <christian.t.weber@gmail.com>
+---------------------------------------------------------------------------+
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or any later version.
+---------------------------------------------------------------------------+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+--------------------------------------------------------------------------*/
Ext.regApplication({
name: "ARSnova",
/* const */
WEBAPP : 'webapp',
NATIVE : 'native',
APP_URL : window.location.origin + window.location.pathname,
WEBSERVICE_URL : "app/webservices/",
LOGIN_GUEST : "0",
LOGIN_THM : "1",
LOGIN_OPENID : "2",
LOGIN_TWITTER : "3",
LOGIN_FACEBOOK : "4",
LOGIN_GOOGLE : "5",
USER_ROLE_STUDENT: "0",
USER_ROLE_SPEAKER: "1",
CANTEEN_LOCATION: "THM Mensa Gießen",
CANTEEN_DAY : "26.03.2012",
glossOnIcon: false,
icon: 'resources/images/ARSnova_Grafiken/01_AppIcon_114x114px.png',
/* items */
mainTabPanel: null,
tabPanel : null,
loginPanel : null,
loadingMask : null,
taskManager : null,
previousActiveItem: null,
/* infos */
loginMode : null, /* ARSnova.LOGIN_GUEST, ... */
appStatus : null, /* ARSnova.WEBAPP || ARSnova.NATIVE */
isSessionOwner : false, /* boolean */
loggedIn : false, /* boolean */
userRole : null, /* ARSnova.USER_ROLE_STUDENT || ARSnova.USER_ROLE_SPEAKER */
isNative : function () { return this.appStatus === this.NATIVE; },
isWebApp : function () { return this.appStatus === this.WEBAPP; },
/* models */
answerModel : null,
feedbackModel : null,
foodVoteModel : null,
loggedInModel : null,
questionModel : null,
sessionModel : null,
statisticModel : null,
userRankingModel: null,
/* other*/
cardSwitchDuration: 500,
/* tasks */
/**
* delete feedbacks that can be removed
*/
cleanFeedbackVotes: {
name: 'looking for feedbacks that have to be remove',
run: function(){
restProxy.cleanSessionFeedback();
},
interval: 60000 //60 seconds
},
/**
* update every x seconds the user timestamp
* important for all "who is online"-requests
*/
loggedInTask: {
name: 'save that user is logged in',
run: function(){
restProxy.loggedInTask();
},
interval: 60000 //60 seconds
},
/**
* This is called automatically when the page loads. Here we set up the main component on the page
*/
launch: function(){
if (!this.checkWebKit()) return;
if (!this.checkLocalStorage()) return;
this.checkEstudyURL();
this.setupAppStatus();
taskManager = new Ext.util.TaskRunner();
this.initModels();
this.mainTabPanel = new ARSnova.views.MainTabPanel();