Skip to content

Commit

Permalink
some more mobile improvements - text date, fix misaligned title and f…
Browse files Browse the repository at this point in the history
…ix sidebar opener on new ios safari
  • Loading branch information
florpor committed Dec 29, 2014
1 parent a6c9817 commit 9df5ac7
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 10 deletions.
26 changes: 17 additions & 9 deletions css/stylesheet.css
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,14 @@ p.status {
margin-right: 10px;
}

.plan-date-normal {
display: block;
}

.plan-date-text {
display: none;
}

#search-text {
width: 84%;
}
Expand Down Expand Up @@ -226,11 +234,12 @@ p.status {
}

.navbar-toggle {
right: 0%;
position: absolute;
right: 2%;
}

.navbar-toggle.active {
right: 80%;
right: -2%;
}

body, html {
Expand All @@ -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;
}
}
22 changes: 22 additions & 0 deletions lib/handlebars-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -55,6 +70,13 @@ Handlebars.registerHelper('statusWithTooltipAndBG', function(status, day, month,
return new Handlebars.SafeString('<p class="status" rel="tooltip" data-container="#info" title="' + tooltip + '">' + status + "</p>");
});

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);
Expand Down
9 changes: 8 additions & 1 deletion templates/plans.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,14 @@ <h3 style="color: grey;">
<div style="vertical-align:top" class="row item">
<div class="col-xs-6 col-sm-7"><b>{{essence}}</b></div>
<div class="col-xs-3">{{statusWithTooltipAndBG status day month year}}</div>
<div class="col-xs-3 col-sm-2"><b class="plan-date">{{day}}/{{month}}/{{year}}</b></div>
<div class="col-xs-3 col-sm-2">
<b class="plan-date-normal">{{day}}/{{month}}/{{year}}</b>
<b class="plan-date-text">
<span>{{day}}</span>
<span>ב{{monthName month}}</span>
<span>{{year}}</span>
</b>
</div>
</div>

<div class="row details">
Expand Down

0 comments on commit 9df5ac7

Please sign in to comment.