From 5a49b88c608774dc3ba937cd270339155766cd93 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 15 Mar 2016 20:59:33 +0200 Subject: [PATCH] Integrate workspace and dashboard pages with backend (initial data loading). This does not includes any crud methods. --- src/uxbox/ui/dashboard.cljs | 5 ++++- src/uxbox/ui/workspace.cljs | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/uxbox/ui/dashboard.cljs b/src/uxbox/ui/dashboard.cljs index e33b31c5d..fedc817ff 100644 --- a/src/uxbox/ui/dashboard.cljs +++ b/src/uxbox/ui/dashboard.cljs @@ -7,6 +7,7 @@ [uxbox.ui.mixins :as mx] [uxbox.util.dom :as dom] [uxbox.data.dashboard :as dd] + [uxbox.data.projects :as dp] [uxbox.ui.messages :as uum] [uxbox.ui.library-bar :as ui.library-bar] [uxbox.ui.dashboard.header :refer (header)] @@ -31,7 +32,9 @@ (defn projects-page-will-mount [own] - (rs/emit! (dd/initialize :dashboard/projects)) + (rs/emit! (dd/initialize :dashboard/projects) + (dp/load-projects) + (dp/load-pages)) own) (defn projects-page-transfer-state diff --git a/src/uxbox/ui/workspace.cljs b/src/uxbox/ui/workspace.cljs index c2b5e4cc8..ec70df988 100644 --- a/src/uxbox/ui/workspace.cljs +++ b/src/uxbox/ui/workspace.cljs @@ -6,6 +6,7 @@ [uxbox.rstore :as rs] [uxbox.state :as st] [uxbox.data.workspace :as dw] + [uxbox.data.projects :as dp] [uxbox.util.geom.point :as gpt] [uxbox.util.data :refer (classnames)] [uxbox.ui.core :as uuc] @@ -66,7 +67,9 @@ (defn- workspace-will-mount [own] (let [[projectid pageid] (:rum/props own)] - (rs/emit! (dw/initialize projectid pageid)) + (rs/emit! (dw/initialize projectid pageid) + (dp/load-projects) + (dp/load-pages)) own)) (defn- workspace-did-mount