mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
28 lines
628 B
JavaScript
28 lines
628 B
JavaScript
Template.registerHelper("fullApi", function () {
|
|
return Session.get("fullApi");
|
|
});
|
|
|
|
Template.basicOrFullSelect.events({
|
|
"change .basic-or-full": function (event) {
|
|
// XXX might not work in IE9?
|
|
window.location.replace(Session.equals("fullApi", true) ? "#/full/" : "#/basic/");
|
|
}
|
|
});
|
|
|
|
Template.basicOrFullSelect.helpers({
|
|
isBasic: function () {
|
|
return ! Session.get("fullApi");
|
|
},
|
|
isFull: function () {
|
|
return Session.get("fullApi");
|
|
}
|
|
});
|
|
|
|
Template.sidebar.helpers({
|
|
topLink: function () {
|
|
var docsType = Session.get("fullApi") ? "full" : "basic";
|
|
return "#/" + docsType + "/";
|
|
}
|
|
});
|
|
|