From 993657a1cc1c1a806fc31e747b5d817de4d32f44 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 2 Mar 2017 18:39:42 +0100 Subject: [PATCH] Use the same ordering in view and main sitemap. Related #68 --- frontend/src/uxbox/view/ui/viewer/sitemap.cljs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/src/uxbox/view/ui/viewer/sitemap.cljs b/frontend/src/uxbox/view/ui/viewer/sitemap.cljs index 6f1a104d67..8cc45293d5 100644 --- a/frontend/src/uxbox/view/ui/viewer/sitemap.cljs +++ b/frontend/src/uxbox/view/ui/viewer/sitemap.cljs @@ -8,9 +8,9 @@ (ns uxbox.view.ui.viewer.sitemap (:require [sablono.core :refer-macros (html)] [lentes.core :as l] - [uxbox.util.i18n :refer (tr)] + [uxbox.util.i18n :refer [tr]] [uxbox.util.mixins :as mx :include-macros true] - [uxbox.util.data :refer (parse-int)] + [uxbox.util.data :refer [parse-int]] [potok.core :as ptk] [uxbox.view.store :as st] [uxbox.builtins.icons :as i] @@ -37,7 +37,8 @@ {:mixins [mx/static mx/reactive]} [] (let [project-name (mx/react project-name-ref) - pages (mx/react pages-ref) + pages (->> (mx/react pages-ref) + (sort-by #(get-in % [:metadata :order]))) selected (mx/react selected-ref) on-click #(st/emit! (dv/select-page %))] [:div.view-sitemap