Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
getEntriesCount = (e, count) => {
Session.set("limit", count);
};
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);
}
});
}
static toggleVisibility (status) {
if (CardIndex.getCardIndex().length > 1) {
Session.set('navigationVisible', status);
} else {
Session.set('navigationVisible', true);
}
}
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 () {
handleStart() {
const { closeModal, takeOwnership } = this.props;
const { locale } = this.state;
takeOwnership(locale);
Session.set('captionsLocale', locale);
Session.set('openPanel', 'captions');
closeModal();
}
const openAddItemDialog = (itemType, topicId) => {
Session.set('topicInfoItemEditTopicId', topicId);
Session.set('topicInfoItemType', itemType);
};
Template.productResults.onCreated(function () {
Session.set("productGrid/selectedProducts", []);
});
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)
}
$('#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);
}
});
});
});