From 9df5ac7c14b96c5799b4a86dfb11311357943073 Mon Sep 17 00:00:00 2001 From: florpor Date: Mon, 29 Dec 2014 19:26:22 +0200 Subject: [PATCH] some more mobile improvements - text date, fix misaligned title and fix sidebar opener on new ios safari --- css/stylesheet.css | 26 +++++++++++++++++--------- lib/handlebars-helpers.js | 22 ++++++++++++++++++++++ templates/plans.html | 9 ++++++++- 3 files changed, 47 insertions(+), 10 deletions(-) diff --git a/css/stylesheet.css b/css/stylesheet.css index d9e95bb..4f19dd6 100644 --- a/css/stylesheet.css +++ b/css/stylesheet.css @@ -153,6 +153,14 @@ p.status { margin-right: 10px; } +.plan-date-normal { + display: block; +} + +.plan-date-text { + display: none; +} + #search-text { width: 84%; } @@ -226,11 +234,12 @@ p.status { } .navbar-toggle { - right: 0%; + position: absolute; + right: 2%; } .navbar-toggle.active { - right: 80%; + right: -2%; } body, html { @@ -256,16 +265,15 @@ p.status { margin-top: 5px; } - #jump-to { - margin-top: 5px; - } - p.status { margin-right: 0px; } - .plan-date { - float: right !important; - width: 150% !important; + .plan-date-normal { + display: none; } + + .plan-date-text { + display: block; + } } diff --git a/lib/handlebars-helpers.js b/lib/handlebars-helpers.js index ec4f8f5..80414ba 100644 --- a/lib/handlebars-helpers.js +++ b/lib/handlebars-helpers.js @@ -24,6 +24,21 @@ var status_tooltips = { 'בדיקת אפשרויות' : 'שלב תכנוני לפני הפקדה' }; +var month_names = { + 1 : 'ינואר', + 2 : 'פברואר', + 3 : 'מרץ', + 4 : 'אפריל', + 5 : 'מאי', + 6 : 'יוני', + 7 : 'יולי', + 8 : 'אוגוסט', + 9 : 'ספטמבר', + 10 : 'אוקטובר', + 11 : 'נובמבר', + 12 : 'דצמבר' +}; + Handlebars.registerHelper('statusWithTooltipAndBG', function(status, day, month, year, options) { var tooltip = ''; if (status in status_tooltips) @@ -55,6 +70,13 @@ Handlebars.registerHelper('statusWithTooltipAndBG', function(status, day, month, return new Handlebars.SafeString('

' + status + "

"); }); +Handlebars.registerHelper('monthName', function(month, options) { + if (month in month_names) + return month_names[month]; + else + return ''; +}); + Handlebars.registerHelper('ifEq', function(v1, v2, options) { if(v1 == v2) { return options.fn(this); diff --git a/templates/plans.html b/templates/plans.html index 0437343..dffbe5c 100644 --- a/templates/plans.html +++ b/templates/plans.html @@ -26,7 +26,14 @@

{{essence}}
{{statusWithTooltipAndBG status day month year}}
-
{{day}}/{{month}}/{{year}}
+
+ {{day}}/{{month}}/{{year}} + + {{day}} + ב{{monthName month}} + {{year}} + +