This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var liArray = document.querySelector('.button'); | |
| liArray.forEach(function(element) { | |
| // Grab the class name you need: | |
| var theClass = element.id.substr(0, element.id.length-7); | |
| // Grab the link inside. | |
| var theLink = element.querySelector('a'); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Meteor.call('changeSettings', settingsDoc, function(err, result) { | |
| if (err && err.error === "not-admin") { | |
| console.log("Unable to update settings, not an admin!"); | |
| } else { | |
| console.log(result); | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Template.adminSystem.events({ | |
| "submit form": function(event) { | |
| event.preventDefault(); | |
| // Fetch current settings | |
| CurrentSettings = Settings.findOne(); | |
| theID = CurrentSettings._id; | |
| // Check options set. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var personDoc = { | |
| fname: fname, | |
| lname: lname, | |
| phone: phone | |
| }; | |
| var ownerId = Meteor.call("addPerson", personDoc); | |
| console.log(ownerId); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var ownerId; | |
| Meteor.call("addPerson", personDoc, function(result) { | |
| ownerId = result; | |
| }); | |
| console.log(ownerId); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template name="layout"> | |
| <!-- Nav Menu --> | |
| {{> Template.dynamic template=nav}} | |
| <!-- Rest of page --> | |
| {{> Template.dynamic template=main}} | |
| </template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| App = React.createClass({ | |
| //mixins: [ReactMeteorData], | |
| // Initial State declared here. | |
| getInitialState() { | |
| return { | |
| deckState: null | |
| }; | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| componentDidMount() { | |
| $('.dropdown').dropdown({ | |
| on: 'hover' | |
| }); | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ProxyDisplay = React.createClass({ | |
| mixins: [ReactMeteorData], | |
| getMeteorData() { | |
| let data = {}; | |
| let names = _.pluck(this.props.proxyState, 'name'); | |
| let handle = Meteor.subscribe('cardsFromList', names); | |
| if (handle.ready()) { | |
| data.cards = Cards.find({}).fetch(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import { render } from 'react-dom'; | |
| import { Router, Route, IndexRoute, Link } from 'react-router' | |
| // Page Components, etc. | |
| import Navigation from './navigation.jsx'; | |
| import Home from './home.jsx'; | |
| const App = React.createClass({ |