From 642f1381cc9653384f8e8ece595bf8201d1f431b Mon Sep 17 00:00:00 2001 From: hackbard <hackbard@hackdaworld.org> Date: Sun, 19 Jun 2016 23:16:22 +0200 Subject: [PATCH] initial checkin (start dialog basically finished) --- app/config.xml | 26 +++++++++++++++ app/www/css/index.css | 62 +++++++++++++++++++++++++++++++++++ app/www/index.html | 62 +++++++++++++++++++++++++++++++++++ app/www/js/index.js | 75 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 225 insertions(+) create mode 100644 app/config.xml create mode 100644 app/www/css/index.css create mode 100644 app/www/index.html create mode 100644 app/www/js/index.js diff --git a/app/config.xml b/app/config.xml new file mode 100644 index 0000000..a9ded24 --- /dev/null +++ b/app/config.xml @@ -0,0 +1,26 @@ +<?xml version='1.0' encoding='utf-8'?> +<widget id="org.hackdaworld.stafforg" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> + <name>StaffOrg</name> + <description> + Crew organization app. + </description> + <author email="hackbard@hackdaworld.org" href="http://hackdaworld.org"> + hackbard + </author> + <content src="index.html" /> + <plugin name="cordova-plugin-whitelist" spec="1" /> + <access origin="*" /> + <allow-intent href="http://*/*" /> + <allow-intent href="https://*/*" /> + <allow-intent href="tel:*" /> + <allow-intent href="sms:*" /> + <allow-intent href="mailto:*" /> + <allow-intent href="geo:*" /> + <platform name="android"> + <allow-intent href="market:*" /> + </platform> + <platform name="ios"> + <allow-intent href="itms:*" /> + <allow-intent href="itms-apps:*" /> + </platform> +</widget> diff --git a/app/www/css/index.css b/app/www/css/index.css new file mode 100644 index 0000000..c48c225 --- /dev/null +++ b/app/www/css/index.css @@ -0,0 +1,62 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +html { + height: 100%; +} + +body { + height: 100%; + margin: 0; + background-color: black; +} + +#start { + width: 100%; + display: none; +} + +.startbtn { + width: 16%; + height: 20%; + margin-left: 3%; + margin-top: 20%; + float: left; +} + +#clock { + display: none; +} + +#roster { + display: none; +} + +#ideas { + display: none; +} + +#todo { + display: none; +} + +#admin { + display: none; +} + diff --git a/app/www/index.html b/app/www/index.html new file mode 100644 index 0000000..b0777cc --- /dev/null +++ b/app/www/index.html @@ -0,0 +1,62 @@ +<!DOCTYPE html> + +<!-- + staofforg: crew organization app + author: hackbard@hackdaworld.org +--> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> + +<html> + <head> + <title>StaffOrg</title> + <meta charset="utf-8"> + <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width"> + + <link rel="stylesheet" type="text/css" href="css/index.css"> + + <script type="text/javascript" src="cordova.js"></script> + <script type="text/javascript" src="js/jquery.js"></script> + <script type="text/javascript" src="js/jsutils/utils.js"> + </script> + <script type="text/javascript" src="js/jsutils/idb.js"> + </script> + <script type="text/javascript" src="js/jsutils/xhr.js"> + </script> + <script type="text/javascript" src="js/index.js"></script> + </head> + + <body> + <div id=start> + <button id=selclock class=startbtn>Time Clock</button> + <button id=selroster class=startbtn>Roster</button> + <button id=selideas class=startbtn>Brainstorming + </button> + <button id=seltodo class=startbtn>ToDo</button> + <button id=seladmin class=startbtn>Administration + </button> + </div> + <div id=clock></div> + <div id=roster</div> + <div id=ideas</div> + <div id=todo</div> + </body> +</html> + diff --git a/app/www/js/index.js b/app/www/js/index.js new file mode 100644 index 0000000..98eaa9f --- /dev/null +++ b/app/www/js/index.js @@ -0,0 +1,75 @@ +/* + * stafforg: crew organizaion app + * author: hackbard@hackdaworld.org + * + */ + +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +var stafforg = { + init: function() { + document.addEventListener('deviceready',this.startup,false); + window.addEventListener('orientationchange',function() { + setTimeout(function() { + cl("orientation change ..."); + },200); + }); + }, + startup: function() { + cl("starting stafforg app ..."); + // ui + stafforg.activate_subapp('start'); + $('.startbtn').click(function(event) { + cl("clicked "+event.target.id); + stafforg.event_action(event,'start'); + }); + // db + }, + dbcb: function() { + }, + activate_subapp: function(sapp) { + $('.startbtn').each(function() { + var sappname=this.id.replace(/^sel/,''); + var sappid='#'+sappname; + $(sappid).css('height','100%'); + if(sappname==sapp) + $(sappid).css('display','block'); + else + $(sappid).css('display','none'); + }); + if(sapp=='start') { + var sappid='#'+sapp; + $(sappid).css('height','100%'); + $(sappid).css('display','block'); + } + }, + event_action: function() { + } +}; + +$(document).ready(function() { + if('cordova' in window) { + stafforg.init(); + } + else { + stafforg.startup(); + } +}); + -- 2.39.5