How to use the meteor/session.Session.get function in meteor

To help you get started, we’ve selected a few meteor examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SparkEdUAB / SparkEd / imports / ui / components / Dashboard / ManageUnits.jsx View on Github external
this.computation = Tracker.autorun(() => {
      if (this._ismounted) {
        this.setState({
          data: Session.get("UNIT_RESULTS"),
          resultsCount: Session.get("UNIT_RESULTS_COUNT")
        });
      }
    });
    // don't clean the courseId on unmount
github thm-projects / arsnova-flashcards / imports / ui / cardset / info / box / item / transcript / lectureDates.js View on Github external
getMonth: function () {
		return moment().month(lastMonth).locale(Session.get('activeLanguage')).format('MMMM');
	},
	getYear: function () {
github thm-projects / arsnova-flashcards / imports / ui / card / card.js View on Github external
function editBack() {
	activeEditMode = 1;
	$('#contentEditor').focus();
	$('#contentEditor').attr('tabindex', 6);
	$('#contentEditor').val(Session.get('backText'));
	$('#editor').attr('data-content', Session.get('backText'));
	$('#editBack').removeClass('btn-default').addClass('btn-primary');
	$('#editFront').removeClass('btn-primary').addClass('btn-default');
	$('#editHint').removeClass('btn-primary').addClass('btn-default');
	turnBack();
}
github paladinarcher / padawan / imports / ui / pages / mbti_roles / mbti_roles.js View on Github external
Template.mbti_roles.onRendered(function() {
    let s = Session.get('records');
    if(!s) {
        Session.set('records', plotActivities());
    }
});
github DemocracyEarth / sovereign / imports / ui / templates / widgets / inbox / inbox.js View on Github external
'click #menuButton'() {
    Session.set('sidebarMenuSelectedId', this.id);
    if (typeof this.id === 'string') {
      toggleSelectedItem(Session.get('menuDelegates'));
    } else {
      toggleSelectedItem(Session.get('menuDecisions'));
    }
  },
});
github thm-projects / arsnova-flashcards / imports / ui / cardset / cardset.js View on Github external
Template.cardset.onCreated(function () {
	CardVisuals.toggleFullscreen(true);
	if (Session.get('activeCardset') === undefined || Session.get('activeCardset')._id !== Router.current().params._id) {
		Session.set('activeCardset', Cardsets.findOne(Router.current().params._id));
		Session.set('activeCard', undefined);
	}
	if (Number(Session.get('activeCard')) === Number(-1)) {
		Session.set('activeCard', undefined);
	}
	Session.set('shuffled', Cardsets.findOne(Router.current().params._id).shuffled);
	Session.set('cameFromEditMode', false);
	CardNavigation.toggleVisibility(true);
	Session.set('hideSidebar', false);
});
github DemocracyEarth / sovereign / imports / ui / templates / components / decision / signatures / signatures.js View on Github external
timestamp() {
    if (Session.get('contract')) {
      let d = Date();
      if (Session.get('contract').timestamp !== undefined) {
        d = Session.get('contract').timestamp;
        return d.format('{Month} {d}, {yyyy}');
      }
    }
    return '';
  },
});
github DemocracyEarth / sovereign / imports / ui / templates / widgets / popup / popup.js View on Github external
content() {
    return Session.get(this.id).template;
  },
  dataObject() {
github DemocracyEarth / sovereign / imports / ui / modules / ballot.js View on Github external
const _setBallot = (contractId, ballot) => {
  let manager = [];
  let found = false;

  if (Session.get('ballotManager')) {
    manager = Session.get('ballotManager');
  }

  for (const i in manager) {
    if (manager[i].contractId === contractId) {
      manager[i].candidateBallot = ballot;
      found = true;
      break;
    }
  }

  if (!found) {
    manager.push({
      contractId,
      candidateBallot: ballot,
    });
  }