From 3b2d37e057a0935938e9e719409038e0943a64b3 Mon Sep 17 00:00:00 2001 From: nek0 Date: Sun, 11 Jan 2015 17:59:02 +0100 Subject: [PATCH] introducing parallelism template in admin interface --- Handler/AdminProfileSettings.hs | 2 +- static/js/init.js | 1 + templates/adminBase.hamlet | 36 ++++++++++++++++++--------- templates/adminProfileSettings.hamlet | 20 +++++++-------- templates/adminProfiles.hamlet | 16 ++++++------ templates/adminUserAlbums.hamlet | 19 ++++++++------ templates/adminUserMedia.hamlet | 19 ++++++++------ 7 files changed, 67 insertions(+), 46 deletions(-) diff --git a/Handler/AdminProfileSettings.hs b/Handler/AdminProfileSettings.hs index 50af191..16ed51c 100644 --- a/Handler/AdminProfileSettings.hs +++ b/Handler/AdminProfileSettings.hs @@ -70,7 +70,7 @@ getAdminProfileSettingsR ownerId = do tempUserId <- lookupSession "userId" userId <- return $ getUserIdFromText $ fromJust tempUserId (adminProfileSetWidget, enctype) <- generateFormPost $ adminProfileForm owner - defaultLayout $ do + formLayout $ do setTitle "Administration: Profile settings" $(widgetFile "adminProfileSettings") Nothing -> do diff --git a/static/js/init.js b/static/js/init.js index f9e602c..015e917 100644 --- a/static/js/init.js +++ b/static/js/init.js @@ -133,6 +133,7 @@ var parallelism = (function($) { var _ = { // Window. _.objects.window._parallelism_update = function() { var i, j, x, y, t; +console.log(itemsWidth,itemHeight) // Calculate number of rows we can fit on the screen. rows = Math.min(Math.max(Math.floor(windowHeight / itemHeight) - 1, 1), _.settings.maxRows); diff --git a/templates/adminBase.hamlet b/templates/adminBase.hamlet index de03f36..6ee0f64 100644 --- a/templates/adminBase.hamlet +++ b/templates/adminBase.hamlet @@ -1,15 +1,27 @@ $newline always -

Admin interface +