summaryrefslogtreecommitdiff
path: root/js/apps.js
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2014-09-20 22:07:33 (GMT)
committerChristian Pointner <equinox@helsinki.at>2014-09-20 22:07:33 (GMT)
commit07cdbb3c6b86a783f23f70a92f90ddf97e597b2c (patch)
treef63480075a3d2e6bb97dcbd22501184e7c4900c8 /js/apps.js
parentd54ed61ac57c905ed10235ed49ddc4e2c080970d (diff)
moved javascript code to external files
Diffstat (limited to 'js/apps.js')
-rw-r--r--js/apps.js34
1 files changed, 34 insertions, 0 deletions
diff --git a/js/apps.js b/js/apps.js
new file mode 100644
index 0000000..c852cd4
--- /dev/null
+++ b/js/apps.js
@@ -0,0 +1,34 @@
+ var apps_current;
+
+ function apps_select(app) {
+ switch(app) {
+ case "musicpools":
+ $('#app-shows').hide();
+ $('#nav-btn-shows').removeClass('active');
+ $('#app-musicpools').show();
+ $('#nav-btn-musicpools').addClass('active');
+ musicpools_init();
+ break;
+ default:
+ $('#app-shows').show();
+ $('#nav-btn-shows').addClass('active');
+ $('#app-musicpools').hide();
+ $('#nav-btn-musicpools').removeClass('active');
+ apps_current = 'shows';
+ shows_init();
+ }
+ sessionStorage.setItem("apps_current", apps_current);
+ }
+
+ function apps_init() {
+ apps_current = sessionStorage.getItem("apps_current");
+ apps_select(apps_current);
+ }
+
+ function apps_cleanup() {
+ shows_cleanup();
+ musicpools_cleanup();
+
+ sessionStorage.removeItem("apps_current");
+ delete apps_current;
+ }