2 * stafforg: crew organizaion app
3 * author: hackbard@hackdaworld.org
8 * Licensed to the Apache Software Foundation (ASF) under one
9 * or more contributor license agreements. See the NOTICE file
10 * distributed with this work for additional information
11 * regarding copyright ownership. The ASF licenses this file
12 * to you under the Apache License, Version 2.0 (the
13 * "License"); you may not use this file except in compliance
14 * with the License. You may obtain a copy of the License at
16 * http://www.apache.org/licenses/LICENSE-2.0
18 * Unless required by applicable law or agreed to in writing,
19 * software distributed under the License is distributed on an
20 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 * KIND, either express or implied. See the License for the
22 * specific language governing permissions and limitations
28 document.addEventListener('deviceready',this.startup,false);
29 window.addEventListener('orientationchange',function() {
30 setTimeout(function() {
31 cl("orientation change ...");
36 cl("starting stafforg app ...");
38 stafforg.activate_subapp('start');
39 $('.startbtn').click(function(event) {
40 cl("clicked "+event.target.id);
41 stafforg.event_action(event,'start');
47 activate_subapp: function(sapp) {
48 $('.startbtn').each(function() {
49 var sappname=this.id.replace(/^sel/,'');
50 var sappid='#'+sappname;
51 $(sappid).css('height','100%');
53 $(sappid).css('display','block');
55 $(sappid).css('display','none');
59 $(sappid).css('height','100%');
60 $(sappid).css('display','block');
63 event_action: function() {
67 $(document).ready(function() {
68 if('cordova' in window) {