common.js 443 字节
Newer Older
S
Sercan 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/**
 * Created by RSercan on 26.12.2015.
 */
strSessionConnection = 'connection';
strSessionCollectionNames = 'collectionNames';

Template.registerHelper(strSessionConnection, function () {
    if (Session.get(strSessionConnection)) {
        return Connections.findOne({_id: Session.get(strSessionConnection)});
    }
});

Template.registerHelper(strSessionCollectionNames, function () {
    return Session.get(strSessionCollectionNames);
});