Rafał Pitoń 9 лет назад
Родитель
Сommit
68ad78d318
1 измененных файлов с 18 добавлено и 0 удалено
  1. 18 0
      misago/frontend/misago/services/forum-layout.js

+ 18 - 0
misago/frontend/misago/services/forum-layout.js

@@ -0,0 +1,18 @@
+(function (Misago) {
+  'use strict';
+
+  Misago.addService('forum-layout', {
+    factory: function(_) {
+      if (_.setup.fixture) {
+        m.mount(document.getElementById(_.setup.fixture),
+                _.component(Misago.ForumLayout));
+      }
+    },
+
+    destroy: function(_) {
+      if (_.setup.fixture) {
+        m.mount(_.setup.fixture, null);
+      }
+    }
+  }, {before: 'start-routing'});
+}(Misago.prototype));