How to use the meteor/session.Session.set 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 / EditUnit.jsx View on Github external
getEntriesCount = (e, count) => {
    Session.set("limit", count);
  };
github DemocracyEarth / sovereign / imports / ui / templates / components / decision / editor / editor.js View on Github external
window.addEventListener('click', function (e) {
      if (_contextCheck('feedItem-editor', e)) {
        const reset = _resetDraft();
        if (!Session.get('minimizedEditor')) {
          Session.set('minimizedEditor', true);
        }
        if (reset.replyId) {
          reset.replyId = '';
          Session.set('draftContract', reset);
        }
        $('#thread-editor-depth').remove();
        Session.set('showPostEditor', false);
      }
    });
  }
github thm-projects / arsnova-flashcards / imports / api / cardNavigation.js View on Github external
static toggleVisibility (status) {
		if (CardIndex.getCardIndex().length > 1) {
			Session.set('navigationVisible', status);
		} else {
			Session.set('navigationVisible', true);
		}
	}
github thm-projects / arsnova-flashcards / imports / ui / card / card.js View on Github external
countBox: function () {
		var maxIndex = Learned.find({
			cardset_id: Session.get('activeCardset')._id,
			user_id: Meteor.userId(),
			box: parseInt(Session.get('selectedBox'))
		}).count();
		Session.set('maxIndex', maxIndex);
		return maxIndex;
	},
	countLeitner: function () {
github bigbluebutton / bigbluebutton / bigbluebutton-html5 / imports / ui / components / captions / writer-menu / component.jsx View on Github external
handleStart() {
    const { closeModal, takeOwnership } = this.props;
    const { locale } = this.state;

    takeOwnership(locale);
    Session.set('captionsLocale', locale);
    Session.set('openPanel', 'captions');

    closeModal();
  }
github 4minitz / 4minitz / client / templates / topic / topicElement.js View on Github external
const openAddItemDialog = (itemType, topicId) => {
    Session.set('topicInfoItemEditTopicId', topicId);
    Session.set('topicInfoItemType', itemType);
};
github reactioncommerce / reaction / imports / plugins / included / ui-search / client / templates / productSearch / productResults.js View on Github external
Template.productResults.onCreated(function () {
  Session.set("productGrid/selectedProducts", []);
});
github topogram / topogram / imports / ui / components / network / networkMethods.js View on Github external
graph.selectElement = function(el, type){

    if(el.data("group") != "ghosts") {
      Session.set('currentType', type)
      Session.set('currentId', el.data("_id"))

      var url = graph.getElementUrl(el, type)
      FlowRouter.go(url)

      if( type == "node") {
        Session.set('prevNode', el.data('_id'))
        graph.focusOnNodes(el)
      }
      else if ( type == "edge") {
        Session.set('prevNode', null)
        Session.set('edgeClicked', el.data('_id'))
        graph.focusOnEdges(el)

      }
github thm-projects / arsnova-flashcards / imports / ui / useCases / modal / modal.js View on Github external
$('#useCasesModal').on('show.bs.modal', function () {
		Session.set('useCasesModalOpen', true);
		Session.set('isNewCardset', true);
		Session.set('useCaseType', 0);
		Session.set('useCaseSelectedCardType', -1);
		Session.set('useCaseTarget', undefined);
		$('.setCardTypeUseCase').html(TAPi18n.__('card.chooseCardType'));
		$('.setCardTypeUseCase').val(-1);
		Meteor.call('getUseCaseCardsets',function (error, result) {
			if (result) {
				Session.set('useCaseCardsets', result);
			}
		});
	});
});