1
0
Fork 0

Phi: some tweaks

- show at least one stopwatch
- add a refresh button (for web-apps)
- no-cache for index.html
- reorder buttons for Aircraft topic
- add aircraft thumbnail to Aircraft topic
This commit is contained in:
Torsten Dreyer 2015-02-22 21:18:23 +01:00
parent e3d38a6228
commit 1c55371a56
6 changed files with 27 additions and 16 deletions

View file

@ -8,18 +8,21 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="Phi (FI)">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<link rel="manifest" href="manifest.json">
<!-- non-retina iPhone vor iOS 7 -->
<!-- non-retina iPhone pre iOS 7 -->
<link rel="apple-touch-icon" href="images/FI_logo-57.png" sizes="57x57">
<!-- non-retina iPad vor iOS 7 -->
<link rel="apple-touch-icon" href="images/FI_logo-72.png" sizes="72x72">
<!-- non-retina iPad iOS 7 -->
<link rel="apple-touch-icon" href="images/FI_logo-76.png" sizes="76x76">
<!-- retina iPhone vor iOS 7 -->
<!-- retina iPhone pre iOS 7 -->
<link rel="apple-touch-icon" href="images/FI_logo-114.png" sizes="114x114">
<!-- retina iPhone iOS 7 -->
<link rel="apple-touch-icon" href="images/FI_logo-120.png" sizes="120x120">
<!-- retina iPad vor iOS 7 -->
<!-- retina iPad pre iOS 7 -->
<link rel="apple-touch-icon" href="images/FI_logo-144.png" sizes="144x144">
<!-- retina iPad iOS 7 -->
<link rel="apple-touch-icon" href="images/FI_logo-152.png" sizes="152x152">
@ -200,6 +203,10 @@ html, body, #wrapper {
height: 100%;
}
#refresh-button {
float: right;
}
.switcher_container:before {
content: 'Theme';
padding-right: 0.5em;
@ -220,8 +227,6 @@ html, body, #wrapper {
}
</style>
<link href="widgets/radiostack.css" rel="stylesheet" type="text/css" />
</head>
<body>
@ -238,6 +243,8 @@ html, body, #wrapper {
click: $root.selectTopic">
</li>
</ul>
<button id="refresh-button"
data-bind="button: { icons: { primary: 'ui-icon-refresh' }, text: false }, click: refresh">Refresh Page</button>
<div id="ui-theme-switcher"></div>
</div>
<div id="htabs-content" data-bind="component: { name: selectedTopic }"></div>

View file

@ -14,7 +14,7 @@ require.config({
});
require([
'knockout', 'jquery', 'themeswitch'
'knockout', 'jquery', 'themeswitch', 'kojqui/button'
], function(ko, jquery) {
function KnockProps(aliases) {
@ -291,6 +291,10 @@ require([
}
self.selectTopic(self.topics[0]);
self.refresh = function() {
location.reload();
}
}
ko.components.register('Aircraft', {

View file

@ -1,12 +1,12 @@
<div class="tabs vtabs">
<img src="/aircraft-dir/thumbnail.jpg" style="width: 100%; border-radius: 10px; box-shadow: 0px 7px 9px #666666;">
<ul data-bind="foreach: topics">
<li data-bind="text: $data,
<li
data-bind="text: $data,
css: { selected: $data == $parent.selectedTopic() },
click: $parent.selectTopic"></li>
</ul>
</div>
<div id="vtabs-content" data-bind="component: { name: selectedComponent, params: { props: $root.props }}">
</div>
<div id="vtabs-content" data-bind="component: { name: selectedComponent, params: { props: $root.props }}"></div>

View file

@ -21,7 +21,7 @@ define([
var self = this;
self.topics = [
'Select', 'Mass & Balance', 'Checklists', 'Failures', 'Panel', 'Help'
'Mass & Balance', 'Checklists', 'Failures', 'Panel', 'Select', 'Help'
];
self.selectedTopic = ko.observable();
@ -34,7 +34,7 @@ define([
self.selectedTopic(topic);
}
self.selectTopic(self.topics[0]);
self.selectTopic(self.topics[self.topics.length-1]);
}

View file

@ -9,9 +9,9 @@
<td colspan="2" data-bind="text: $data.text"></td>
<!-- /ko -->
<!-- ko if: $data.type == 'key' -->
<td data-bind="text: $data.name" style="text-align: right; padding-right: 1em;"></td>
<td data-bind="text: $data.desc"></td>
<td data-bind="text: $data.name" style="text-align: right; padding-right: 1em;"></td>
<td data-bind="text: $data.desc"></td>
<!-- /ko -->
</tr>
</tbody>
</table>
</table>

View file

@ -5,7 +5,7 @@ define([
function ViewModel(params) {
var self = this;
self.watches = ko.observableArray([0]);
self.watches = ko.observableArray([]);
self.addWatch = function() {
self.watches.push(self.watches().length);