From ce9f9da8b7856f7362cd8581f60625f912bf0762 Mon Sep 17 00:00:00 2001 From: yamanq Date: Sat, 6 Feb 2016 15:21:25 -0500 Subject: [PATCH] initial --- scheduleac/.meteor/.finished-upgraders | 12 ++++ scheduleac/.meteor/.gitignore | 1 + scheduleac/.meteor/.id | 7 +++ scheduleac/.meteor/packages | 24 ++++++++ scheduleac/.meteor/platforms | 2 + scheduleac/.meteor/release | 1 + scheduleac/.meteor/versions | 81 ++++++++++++++++++++++++++ scheduleac/client/client.css | 5 ++ scheduleac/client/client.html | 22 +++++++ scheduleac/client/client.js | 34 +++++++++++ scheduleac/collections/schedule.js | 1 + scheduleac/server/serve.js | 26 +++++++++ 12 files changed, 216 insertions(+) create mode 100644 scheduleac/.meteor/.finished-upgraders create mode 100644 scheduleac/.meteor/.gitignore create mode 100644 scheduleac/.meteor/.id create mode 100644 scheduleac/.meteor/packages create mode 100644 scheduleac/.meteor/platforms create mode 100644 scheduleac/.meteor/release create mode 100644 scheduleac/.meteor/versions create mode 100644 scheduleac/client/client.css create mode 100644 scheduleac/client/client.html create mode 100644 scheduleac/client/client.js create mode 100644 scheduleac/collections/schedule.js create mode 100644 scheduleac/server/serve.js diff --git a/scheduleac/.meteor/.finished-upgraders b/scheduleac/.meteor/.finished-upgraders new file mode 100644 index 0000000..61ee313 --- /dev/null +++ b/scheduleac/.meteor/.finished-upgraders @@ -0,0 +1,12 @@ +# This file contains information which helps Meteor properly upgrade your +# app when you run 'meteor update'. You should check it into version control +# with your project. + +notices-for-0.9.0 +notices-for-0.9.1 +0.9.4-platform-file +notices-for-facebook-graph-api-2 +1.2.0-standard-minifiers-package +1.2.0-meteor-platform-split +1.2.0-cordova-changes +1.2.0-breaking-changes diff --git a/scheduleac/.meteor/.gitignore b/scheduleac/.meteor/.gitignore new file mode 100644 index 0000000..4083037 --- /dev/null +++ b/scheduleac/.meteor/.gitignore @@ -0,0 +1 @@ +local diff --git a/scheduleac/.meteor/.id b/scheduleac/.meteor/.id new file mode 100644 index 0000000..9b73a81 --- /dev/null +++ b/scheduleac/.meteor/.id @@ -0,0 +1,7 @@ +# This file contains a token that is unique to your project. +# Check it into your repository along with the rest of this directory. +# It can be used for purposes such as: +# - ensuring you don't accidentally deploy one app on top of another +# - providing package authors with aggregated statistics + +19rhzs13b9azhvowgeq diff --git a/scheduleac/.meteor/packages b/scheduleac/.meteor/packages new file mode 100644 index 0000000..dbeddf0 --- /dev/null +++ b/scheduleac/.meteor/packages @@ -0,0 +1,24 @@ +# Meteor packages used by this project, one per line. +# Check this file (and the other files in this directory) into your repository. +# +# 'meteor add' and 'meteor remove' will edit this file for you, +# but you can also edit it by hand. + +meteor-base # Packages every Meteor app needs to have +mobile-experience # Packages for a great mobile UX +mongo # The database Meteor supports right now +blaze-html-templates # Compile .html files into Meteor Blaze views +session # Client-side reactive dictionary for your app +jquery # Helpful client-side library +tracker # Meteor's client-side reactive programming library + +standard-minifiers # JS/CSS minifiers run for production mode +es5-shim # ECMAScript 5 compatibility for older browsers. +ecmascript # Enable ECMAScript2015+ syntax in app code + +autopublish # Publish all data to the clients (for prototyping) +insecure # Allow all DB writes from clients (for prototyping) +rajit:bootstrap3-datepicker +twbs:bootstrap +accounts-google +accounts-ui diff --git a/scheduleac/.meteor/platforms b/scheduleac/.meteor/platforms new file mode 100644 index 0000000..efeba1b --- /dev/null +++ b/scheduleac/.meteor/platforms @@ -0,0 +1,2 @@ +server +browser diff --git a/scheduleac/.meteor/release b/scheduleac/.meteor/release new file mode 100644 index 0000000..3a05e0a --- /dev/null +++ b/scheduleac/.meteor/release @@ -0,0 +1 @@ +METEOR@1.2.1 diff --git a/scheduleac/.meteor/versions b/scheduleac/.meteor/versions new file mode 100644 index 0000000..69ede1b --- /dev/null +++ b/scheduleac/.meteor/versions @@ -0,0 +1,81 @@ +accounts-base@1.2.2 +accounts-google@1.0.6 +accounts-oauth@1.1.8 +accounts-ui@1.1.6 +accounts-ui-unstyled@1.1.8 +autopublish@1.0.4 +autoupdate@1.2.4 +babel-compiler@5.8.24_1 +babel-runtime@0.1.4 +base64@1.0.4 +binary-heap@1.0.4 +blaze@2.1.3 +blaze-html-templates@1.0.1 +blaze-tools@1.0.4 +boilerplate-generator@1.0.4 +caching-compiler@1.0.0 +caching-html-compiler@1.0.2 +callback-hook@1.0.4 +check@1.1.0 +ddp@1.2.2 +ddp-client@1.2.1 +ddp-common@1.2.2 +ddp-rate-limiter@1.0.0 +ddp-server@1.2.2 +deps@1.0.9 +diff-sequence@1.0.1 +ecmascript@0.1.6 +ecmascript-runtime@0.2.6 +ejson@1.0.7 +es5-shim@4.1.14 +fastclick@1.0.7 +geojson-utils@1.0.4 +google@1.1.7 +hot-code-push@1.0.0 +html-tools@1.0.5 +htmljs@1.0.5 +http@1.1.1 +id-map@1.0.4 +insecure@1.0.4 +jquery@1.11.4 +launch-screen@1.0.4 +less@2.5.1 +livedata@1.0.15 +localstorage@1.0.5 +logging@1.0.8 +meteor@1.1.10 +meteor-base@1.0.1 +minifiers@1.1.7 +minimongo@1.0.10 +mobile-experience@1.0.1 +mobile-status-bar@1.0.6 +mongo@1.1.3 +mongo-id@1.0.1 +npm-mongo@1.4.39_1 +oauth@1.1.6 +oauth2@1.1.5 +observe-sequence@1.0.7 +ordered-dict@1.0.4 +promise@0.5.1 +rajit:bootstrap3-datepicker@1.5.0 +random@1.0.5 +rate-limit@1.0.0 +reactive-dict@1.1.3 +reactive-var@1.0.6 +reload@1.1.4 +retry@1.0.4 +routepolicy@1.0.6 +service-configuration@1.0.5 +session@1.1.1 +spacebars@1.0.7 +spacebars-compiler@1.0.7 +standard-minifiers@1.0.2 +templating@1.1.5 +templating-tools@1.0.0 +tracker@1.0.9 +twbs:bootstrap@3.3.6 +ui@1.0.8 +underscore@1.0.4 +url@1.0.5 +webapp@1.2.3 +webapp-hashing@1.0.5 diff --git a/scheduleac/client/client.css b/scheduleac/client/client.css new file mode 100644 index 0000000..7481a79 --- /dev/null +++ b/scheduleac/client/client.css @@ -0,0 +1,5 @@ + +#date { + max-width: 40%; + margin-left: 5%; +} \ No newline at end of file diff --git a/scheduleac/client/client.html b/scheduleac/client/client.html new file mode 100644 index 0000000..b7d1029 --- /dev/null +++ b/scheduleac/client/client.html @@ -0,0 +1,22 @@ + + scheduleac + + + +

Welcome to Meteor!

+ {{> loginButtons}} + {{> client}} + + + + + diff --git a/scheduleac/client/client.js b/scheduleac/client/client.js new file mode 100644 index 0000000..aade5e9 --- /dev/null +++ b/scheduleac/client/client.js @@ -0,0 +1,34 @@ +Meteor.subscribe('schedule'); + +Template.client.rendered=function() { + today = new Date() + $('#date').datepicker({ + startDate: today.toLocaleDateString(), + orientation: "top auto", + daysOfWeekDisabled: "0,6", + autoclose: true, + todayHighlight: true + }); +} + + + + +Template.client.helpers({ + + + status_class: function() { + return statusmap[this.status]; + } + + +}) + +Template.client.events({ + "click button": function() { + pre = document.getElementById("date").value; + document.getElementById("date").value = ""; + post = document.getElementById('post').value; + Meteor.call('add_button', this, pre, post); + } +}) \ No newline at end of file diff --git a/scheduleac/collections/schedule.js b/scheduleac/collections/schedule.js new file mode 100644 index 0000000..f3ead9b --- /dev/null +++ b/scheduleac/collections/schedule.js @@ -0,0 +1 @@ +schedule = new Mongo.Collection("schedule"); \ No newline at end of file diff --git a/scheduleac/server/serve.js b/scheduleac/server/serve.js new file mode 100644 index 0000000..3885bdc --- /dev/null +++ b/scheduleac/server/serve.js @@ -0,0 +1,26 @@ +var currentpass = "test"; +var allowed = {}; +allowed["ybq987@gmail.com"] = true; +allowed["dweinger@bloomfield.org"] = true; + + +// schedule.permit(['insert', 'update', 'remove']).never().apply(); + +Meteor.methods({ + + add_button: function(chrome, pre, post) { + if (Meteor.user().services.google.email in allowed) { + + madate = pre.split("/"); + date = new Date(); + date.setMonth(madate[0]); + date.setDate(madate[1]); + date.setFullYear(madate[2]); + + schedule.insert({ + "pretext": date.toDateString().slice(0,date.length), + "aftertext": post + }); + } + } +}) \ No newline at end of file