Final Update From Caleb

Incorporated all Caleb's changes
This commit is contained in:
2018-08-23 16:58:50 -07:00
parent 2593d0f977
commit 14bd554d35
206 changed files with 2661 additions and 84 deletions

View File

@@ -13,7 +13,7 @@
<li>to raise and allocate revenue to support educational programs and scholarships.</li>
<li>to receive, hold, and disperse gifts, bequests, grants and other funds for these purposes."</li>
</ol>
<p>The Foundation is managed by a <a href="#!/current-board">board of directors</a> according to the aforementioned Bylaws. Particular effort has been made to include on the board individuals who can share different perspectives on education in the valley. Typically this has included students, parents, teachers and retired school administrators. The board serves without compensation and meets monthly.</p>
<p>The Foundation is managed by a <a href="{{pathFor 'CurrentBoard'}}">board of directors</a> according to the aforementioned Bylaws. Particular effort has been made to include on the board individuals who can share different perspectives on education in the valley. Typically this has included students, parents, teachers and retired school administrators. The board serves without compensation and meets monthly.</p>
<p>Since its inception the Foundation has developed and maintained a variety of effective programs: Grants, Internships, Fellowships and Scholarships. These are detailed elsewhere on this website. In addition, the Foundation has succeeded in attracting financial support sufficient to maintain these programs. The majority of this support has come from the residents and businesses in Anderson Valley.</p>
</div>
</div>

View File

@@ -1,7 +1,7 @@
<template name="AppreciationEditor">
<div id="appreciationEditor">
<h1>Appreciation Editor</h1>
<div id="editor"></div>
<div class="editor"></div>
<button id="save">Save</button>
</div>
</template>

View File

@@ -12,22 +12,32 @@ Template.AppreciationEditor.onRendered(function() {
let _this = this;
//#appreciationEditor'
CKEditor.create(document.querySelector('#editor'), {}).then(editor => {
_this.ckEditor = editor;
// CKEditor.create(document.querySelector('#editor'), {}).then(editor => {
// _this.ckEditor = editor;
//
// Tracker.autorun(function() {
// let doc = Meteor.collections.Pages.findOne({name: 'Appreciation'});
//
// originalData = (doc === undefined ? "" : doc.html);
// editor.setData(originalData);
// });
// }).catch(err => {
// console.error(err);
// });
$('.editor').tinymce({
inline: true
});
Tracker.autorun(function() {
let doc = Meteor.collections.Pages.findOne({name: 'Appreciation'});
Tracker.autorun(function() {
let doc = Meteor.collections.Pages.findOne({name: 'Appreciation'});
originalData = (doc === undefined ? "" : doc.html);
editor.setData(originalData);
});
}).catch(err => {
console.error(err);
originalData = (doc === undefined ? "" : doc.html);
$('.editor').html(originalData);
});
});
Template.AppreciationEditor.onDestroyed(function() {
let data = this.ckEditor.getData();
// let data = this.ckEditor.getData();
let data = $('.editor').html();
if(data != originalData) {
swal({
@@ -62,7 +72,8 @@ Template.AppreciationEditor.helpers({
Template.AppreciationEditor.events({
'click #save': function(event, template) {
let data = template.ckEditor.getData();
// let data = template.ckEditor.getData();
let data = $('.editor').html();
if(data != originalData) {
Meteor.call('updatePage', 'Appreciation', data, function (error, result) {

View File

@@ -1,4 +1,7 @@
<template name="BoardEditor">
<div id="boardEditor" >
<div id="boardEditor">
<h1>Current Board Editor</h1>
<div id="editor"></div>
<button id="save">Save</button>
</div>
</template>

View File

@@ -1,2 +1,6 @@
#boardEditor
display: block
display: block
.ck.ck-editor__editable_inline
border-color: rgba(0,0,0,.2)
.ck.ck-editor__editable_inline.ck-focused
border-color: rgba(0,0,0,1)

View File

@@ -1,2 +1,69 @@
import './BoardEditor.html';
import CKEditor from '@ckeditor/ckeditor5-build-balloon';
import './BoardEditor.html';
import swal from "sweetalert2";
let originalData = "";
Tracker.autorun(function() {
Meteor.subscribe("pages");
});
Template.BoardEditor.onRendered(function() {
let _this = this;
CKEditor.create(document.querySelector('#editor'), {}).then(editor => {
_this.ckEditor = editor;
Tracker.autorun(function() {
let doc = Meteor.collections.Pages.findOne({name: 'Board'});
originalData = (doc === undefined ? "" : doc.html);
editor.setData(originalData);
});
}).catch(err => {
console.error(err);
});
});
Template.BoardEditor.onDestroyed(function() {
let data = this.ckEditor.getData();
if(data != originalData) {
swal({
title: "Save Changes",
text: "Would you like to save any changes you have made to this sheet?",
type: "question",
showCancelButton: true,
confirmButtonColor: "#7cdd7f",
confirmButtonText: "Yes",
cancelButtonText: "No"
}).then(
function(isConfirm) {
if(isConfirm) {
Meteor.call('updatePage', 'Board', data, function (error, result) {
if (error) sAlert.error(error);
else sAlert.success("Content Saved Successfully");
});
}
},
function(dismiss) {}
);
}
});
Template.BoardEditor.events({
'click #save': function(event, template) {
let data = template.ckEditor.getData();
if(data != originalData) {
Meteor.call('updatePage', 'Board', data, function (error, result) {
if (error) sAlert.error(error);
else sAlert.success("Content Saved Successfully");
});
}
else {
sAlert.success("Data has not changed!");
}
}
});

View File

@@ -1,4 +1,7 @@
<template name="DatesEditor">
<div id="datesEditor">
<h1>Important Dates Editor</h1>
<div id="editor"></div>
<button id="save">Save</button>
</div>
</template>

View File

@@ -1,2 +1,6 @@
#datesEditor
display: block
display: block
.ck.ck-editor__editable_inline
border-color: rgba(0,0,0,.2)
.ck.ck-editor__editable_inline.ck-focused
border-color: rgba(0,0,0,1)

View File

@@ -1,2 +1,70 @@
import './DatesEditor.html';
import CKEditor from '@ckeditor/ckeditor5-build-balloon';
import './DatesEditor.html';
import swal from "sweetalert2";
let originalData = "";
Tracker.autorun(function() {
Meteor.subscribe("pages");
});
Template.DatesEditor.onRendered(function() {
let _this = this;
CKEditor.create(document.querySelector('#editor'), {}).then(editor => {
_this.ckEditor = editor;
Tracker.autorun(function() {
let doc = Meteor.collections.Pages.findOne({name: 'Dates'});
originalData = (doc === undefined ? "" : doc.html);
editor.setData(originalData);
});
}).catch(err => {
console.error(err);
});
});
Template.DatesEditor.onDestroyed(function() {
let data = this.ckEditor.getData();
if(data != originalData) {
swal({
title: "Save Changes",
text: "Would you like to save any changes you have made to this sheet?",
type: "question",
showCancelButton: true,
confirmButtonColor: "#7cdd7f",
confirmButtonText: "Yes",
cancelButtonText: "No"
}).then(
function(isConfirm) {
if(isConfirm) {
Meteor.call('updatePage', 'Dates', data, function (error, result) {
if (error) sAlert.error(error);
else sAlert.success("Content Saved Successfully");
});
}
},
function(dismiss) {}
);
}
});
Template.DatesEditor.events({
'click #save': function(event, template) {
let data = template.ckEditor.getData();
if(data != originalData) {
Meteor.call('updatePage', 'Dates', data, function (error, result) {
if (error) sAlert.error(error);
else sAlert.success("Content Saved Successfully");
});
}
else {
sAlert.success("Data has not changed!");
}
}
});
s

View File

@@ -1,4 +1,7 @@
<template name="NewsEditor">
<div id="newsEditor">
<h1>News Editor</h1>
<div class="editor"></div>
<button id="save">Save</button>
</div>
</template>

View File

@@ -1,2 +1,6 @@
#newsEditor
display: block
display: block
.ck.ck-editor__editable_inline
border-color: rgba(0,0,0,.2)
.ck.ck-editor__editable_inline.ck-focused
border-color: rgba(0,0,0,1)

View File

@@ -1,2 +1,87 @@
import './NewsEditor.html';
import CKEditor from '@ckeditor/ckeditor5-build-balloon';
import './NewsEditor.html';
import swal from "sweetalert2";
let originalData = "";
Tracker.autorun(function() {
Meteor.subscribe("pages");
});
Template.NewsEditor.onRendered(function() {
let _this = this;
//#appreciationEditor'
// CKEditor.create(document.querySelector('#editor'), {}).then(editor => {
// _this.ckEditor = editor;
//
// Tracker.autorun(function() {
// let doc = Meteor.collections.Pages.findOne({name: 'Appreciation'});
//
// originalData = (doc === undefined ? "" : doc.html);
// editor.setData(originalData);
// });
// }).catch(err => {
// console.error(err);
// });
$('.editor').tinymce({
inline: true
});
Tracker.autorun(function() {
let doc = Meteor.collections.Pages.findOne({name: 'News'});
originalData = (doc === undefined ? "" : doc.html);
$('.editor').html(originalData);
});
});
Template.NewsEditor.onDestroyed(function() {
let data = this.ckEditor.getData();
if(data != originalData) {
swal({
title: "Save Changes",
text: "Would you like to save any changes you have made to this sheet?",
type: "question",
showCancelButton: true,
confirmButtonColor: "#7cdd7f",
confirmButtonText: "Yes",
cancelButtonText: "No"
}).then(
function(isConfirm) {
if(isConfirm) {
Meteor.call('updatePage', 'News', data, function (error, result) {
if (error) sAlert.error(error);
else sAlert.success("Content Saved Successfully");
});
}
},
function(dismiss) {}
);
}
});
Template.NewsEditor.helpers({
// html: function() {
// let doc = Meteor.collections.Pages.findOne({name: 'News'});
//
// return doc == undefined ? "" : doc.html;
// }
});
Template.NewsEditor.events({
'click #save': function(event, template) {
let data = template.ckEditor.getData();
if(data != originalData) {
Meteor.call('updatePage', 'News', data, function (error, result) {
if (error) sAlert.error(error);
else sAlert.success("Content Saved Successfully");
});
}
else {
sAlert.success("Data has not changed!");
}
}
});

View File

@@ -1,4 +1,5 @@
<template name="Appreciation">
<div id="appreciationView" class="textView">
<div id="appreciation" class="textView">
{{{appreciationHTML}}}
</div>
</template>

View File

@@ -1,2 +1,21 @@
#appreciationView
display: block
#appreciation p, #appreciationEditor p
font-family: Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif
font-size: 16px
margin: 16px 0
#appreciation h2, #appreciationEditor h2
font-family: "Arial Black", "Arial Bold", Gadget, sans-serif
font-size: 19px
text-transform: uppercase
background-color: #EEE
font-weight: bold
padding-left: 40px
#appreciation h4, #appreciationEditor h4
font-family: "Century Gothic", CenturyGothic, AppleGothic, sans-serif
font-size: 16px
font-weight: 800
clear: left

View File

@@ -1,2 +1,14 @@
import './Appreciation.html';
import './Appreciation.html';
Tracker.autorun(function() {
Meteor.subscribe("pages");
});
Template.Appreciation.helpers({
appreciationHTML: function() {
let doc = Meteor.collections.Pages.findOne({name: 'Appreciation'});
return doc === undefined ? "" : doc.html;
}
});

View File

@@ -1,42 +1,35 @@
<template name="Contact">
<!-- <div id="contactView" class="textView">
<div id="contactView" class="textView">
<p>If you would like to know more about our programs or become involved please contact us in any of the following ways:</p>
<h3>By mail:</h3>
<br style="margin-left: 15px;">
Anderson Valley Education Foundation, Inc.<br/>
P.O. Box 242<br/>
Boonville, CA 95415<br/>
<div style="margin-left: 15px;">
<li>Anderson Valley Education Foundation, Inc.</li>
<li>P.O. Box 242</li>
<li>Boonville, CA 95415</li>
</div>
<h3>In person:</h3>
<div style="margin-left: 15px;">
Please see the list of current board members linked here: <a href="#!/current-board">Current Board of Directors</a>
Please see the list of current board members linked here: <a href="{{pathFor 'CurrentBoard'}}">board of directors</a>
</div>
<h3>By email:</h3>
<div style='margin-left: 15px;'>
<form name="contactForm" id="contactForm" action="submit()">
<form name="contactForm" id="contactForm" onsubmit="javascript:">
<div style="margin: 6px 0;">
<div class="fieldHeading">Your Name:</div>
<div><input type="text" name="name" ng-model="message.name" required ng-maxlength="255"></input></div>
<div><input type="text" name="name" required maxlength="255"></div>
</div>
<div style="margin: 6px 0;">
<div class="fieldHeading">Your Email:</div>
<div>
<input type="email" name="email" ng-model="message.email" required ng-maxlength="255">
sAlert.error('Your message', configOverwrite);
</input>
<input type="email" name="email" required maxlength="255"/>
</div>
</div>
<div style="margin: 6px 0;">
<textarea name="content" ng-model="message.content" required ng-maxlength="65000">
<span class="error" ng-show="contactForm.content.$error.required"></span>
<span class="error" ng-show="contactForm.name.$error.maxlength">Message is too long!</span>
</textarea>
</div>
<div style="margin: 6px 0;"><textarea name="content" required maxlength="65000"></textarea></div>
<div style="text-align: right">
<button form="contactForm" type="button" value="Send" style="width: 100px; height: 20px;" ng-click="submit()" ng-disabled="contactForm.$invalid">Send</button>
<button class="send" type="button" value="Send" style="width: 100px; height: 20px;">Send</button>
</div>
</form>
<div id="contactFormSuccess" style="display:none">
@@ -45,5 +38,5 @@
<br/>
</div>
</div>
</div>-->
</div>
</template>

View File

@@ -1,14 +1,41 @@
#contactView p
font-family: Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif
font-size: 16px
#contactView h3
font-family: "Arial Black", "Arial Bold", Gadget, sans-serif
text-transform: uppercase
margin-bottom: 4px
#contactView
.textView
margin: 6px auto 0 auto
border: 1px solid #DDD
padding: 0 20px
max-width: 960px
.fieldHeading
width: 100px
text-align: left
float: left
padding-top: 5px
line-height: 15px
.fieldHeading
margin: 6px 0
#contactView input
height: 20px
width: 200px
#contactView textarea
min-width: 200px
width: 100%
#contactForm
font-family: "Andale Mono", AndaleMono, monospace
font-size: 14px
line-height: 20px
#contactForm input
height: 20px
font-family: "Andale Mono", AndaleMono, monospace
font-size: 14px
line-height: 20px
#contactForm textarea
height: 100px
font-family: "Andale Mono", AndaleMono, monospace
font-size: 14px
line-height: 20px

View File

@@ -1 +1,20 @@
import './Contact.html';
import './Contact.html';
Template.Contact.events({
'click .send': function(event, template) {
let name = $('input[name="name"]').val();
let email = $('input[name="email"]').val();
let message = $('textarea[name="content"]').val();
if(template.$('form')[0].checkValidity() && name !== undefined && name.length > 0 && email !== undefined && email.length > 0 && message !== undefined && message.length > 0){
Meteor.call("submitContactForm", name, email, message, function(error, result) {
if(error) sAlert.error(error);
else sAlert.success("Your message has been received!");
});
}
else {
sAlert.error("Form not valid! Try again...");
}
}
});

View File

@@ -0,0 +1,5 @@
<template name="CurrentBoard">
<div id="currentBoardView" class="textView">
{{{currentBoardHTML}}}
</div>
</template>

16
imports/ui/CurrentBoard.import.styl vendored Normal file
View File

@@ -0,0 +1,16 @@
#currentBoardView
display: block
#currentBoardView li, #boardEditor li
list-style-type: square
font-family: Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif
font-size: 16px
#currentBoardView h2, #boardEditor h2
font-family: "Arial Black", "Arial Bold", Gadget, sans-serif
font-size: 19px
text-transform: uppercase
background-color: #EEE
font-weight: bold
padding-left: 40px

View File

@@ -0,0 +1,15 @@
import './CurrentBoard.html';
Tracker.autorun(function() {
Meteor.subscribe("pages");
});
Template.CurrentBoard.helpers({
currentBoardHTML: function() {
let doc = Meteor.collections.Pages.findOne({name: 'Board'});
return doc === undefined ? "" : doc.html;
}
});

View File

@@ -1,6 +1,5 @@
<template name="ImportantDates">
<div id="datesView" class="textView">
<!-- TODO: Load dates from the server and place the html in $("importantDatesContainer") -->
<div id="contentContainer"></div>
<div id="importantDates" class="textView">
{{{importantDatesHTML}}}
</div>
</template>

View File

@@ -0,0 +1,21 @@
#importantDatesView
display: block
#importantDates p, #datesEditor p
font-family: Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif
font-size: 16px
margin: 16px 0
#importantDates h2, #datesEditor h2
font-family: "Arial Black", "Arial Bold", Gadget, sans-serif
font-size: 19px
text-transform: uppercase
background-color: #EEE
font-weight: bold
padding-left: 40px
#importantDates h4, #datesEditor h4
font-family: "Century Gothic", CenturyGothic, AppleGothic, sans-serif
font-size: 16px
font-weight: 800
clear: left

View File

@@ -1,2 +1,15 @@
import './ImportantDates.html';
Tracker.autorun(function() {
Meteor.subscribe("pages");
});
Template.ImportantDates.helpers({
importantDatesHTML: function() {
let doc = Meteor.collections.Pages.findOne({name: 'Dates'});
return doc === undefined ? "" : doc.html;
}
});

View File

@@ -1,18 +1,5 @@
<template name="News&Notices">
<div id="news&NoticesView" class="textView">
<!-- TODO: Load dates from the server and place the html in $("importantDatesContainer") -->
<div id="contentContainer"></div>
<template name="NewsNotices">
<div id="newsNotices" class="textView">
{{{newsHTML}}}
</div>
<script>
$(document).ready(function() {
$.ajax({url: "/AdminController.java", cache:false, data: {Request: "GetContent", Name: "news.html"},
success: function(serverReply) {
$('#contentContainer').html(serverReply.result);
},
error: function(request, message, e) {
alert(message);
}
});
});
</script>
</template>

View File

@@ -1,6 +1,21 @@
#news&NoticesView
.textView
margin: 6px auto 0 auto
border: 1px solid #DDD
padding: 0 20px
max-width: 960px
#newsView
display: block
#newsNotices p, #newsEditor p
font-family: Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif
font-size: 16px
margin: 16px 0
#newsNotices h2, #newsEditor h2
font-family: "Arial Black", "Arial Bold", Gadget, sans-serif
font-size: 19px
text-transform: uppercase
background-color: #EEE
font-weight: bold
padding-left: 40px
#newsNotices h4, #newsEditor h4
font-family: "Century Gothic", CenturyGothic, AppleGothic, sans-serif
font-size: 16px
font-weight: 800
clear: left

View File

@@ -1,2 +1,13 @@
import './News&Notices.html';
import './News&Notices.html';
Tracker.autorun(function() {
Meteor.subscribe("pages");
});
Template.NewsNotices.helpers({
newsHTML: function() {
let doc = Meteor.collections.Pages.findOne({name: 'News'});
return doc === undefined ? "" : doc.html;
}
});