mirror of
https://github.com/wekan/wekan.git
synced 2025-12-24 03:10:12 +01:00
Fixing opening cards and slow performance of closing cards
Fixes: #5533
Fixes: #5548
Revert "Switch from kadira:flow-router to ostrio:flow-router-extra"
This reverts commit 718c1a393d.
This commit is contained in:
parent
d31403a918
commit
c925a27870
63 changed files with 4797 additions and 52 deletions
40
packages/kadira-flow-router/server/plugins/fast_render.js
Normal file
40
packages/kadira-flow-router/server/plugins/fast_render.js
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
if(!Package['meteorhacks:fast-render']) {
|
||||
return;
|
||||
}
|
||||
|
||||
FastRender = Package['meteorhacks:fast-render'].FastRender;
|
||||
|
||||
// hack to run after eveything else on startup
|
||||
Meteor.startup(function () {
|
||||
Meteor.startup(function () {
|
||||
setupFastRender();
|
||||
});
|
||||
});
|
||||
|
||||
function setupFastRender () {
|
||||
_.each(FlowRouter._routes, function (route) {
|
||||
FastRender.route(route.pathDef, function (routeParams, path) {
|
||||
var self = this;
|
||||
|
||||
// anyone using Meteor.subscribe for something else?
|
||||
var original = Meteor.subscribe;
|
||||
Meteor.subscribe = function () {
|
||||
return _.toArray(arguments);
|
||||
};
|
||||
|
||||
route._subsMap = {};
|
||||
FlowRouter.subscriptions.call(route, path);
|
||||
if(route.subscriptions) {
|
||||
var queryParams = routeParams.query;
|
||||
var params = _.omit(routeParams, 'query');
|
||||
route.subscriptions(params, queryParams);
|
||||
}
|
||||
_.each(route._subsMap, function (args) {
|
||||
self.subscribe.apply(self, args);
|
||||
});
|
||||
|
||||
// restore Meteor.subscribe, ... on server side
|
||||
Meteor.subscribe = original;
|
||||
});
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue