Skip to content

Commit

Permalink
Fixed some responsiveness
Browse files Browse the repository at this point in the history
  • Loading branch information
vaslabs committed Apr 9, 2016
1 parent efb934f commit ed0dec7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
11 changes: 10 additions & 1 deletion usr/libexec/pi-web-agent/js/framework.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ function View() {
self.fetchViewData();

}
var showing = false;

$(function() {
ko.bindingHandlers.foreachprop = {
transformObject: function (obj) {
Expand All @@ -72,11 +74,18 @@ $(function() {
};
var view = new View();
ko.applyBindings(view, document.getElementById("awesome-navbar"));
$('.button-collapse').sideNav({
$('.button-collapse').sideNav({
menuWidth: 340, // Default is 240
edge: 'right', // Choose the horizontal origin
}
);

$('#menu-controller').click(function() {
var status = showing ? 'hide' : 'show';
console.log(status);
$('.button-collapse').sideNav( status );
showing = !showing;
});

});

Expand Down
9 changes: 6 additions & 3 deletions usr/libexec/pi-web-agent/templates/_main_part1.htm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<script src="/js/knockout.js"></script>
<script src="/js/system_scripts.js"></script>
<script src="/js/appDefinitions.js" type="text/javascript"></script>
<link href="/css/installUninstallSwitch.css" rel="stylesheet" type="text/css">
<link href="/css/system/css/system.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="/css/jquery-ui.min.css">
<script src="/js/jquery-ui.min.js"></script>
Expand Down Expand Up @@ -59,7 +58,11 @@
<nav id="awesome-navbar">
<div class="container">
<div class="nav-wrapper">
<a class="page-title">pi-web-agent</a></div>
<a class="page-title">pi-web-agent</a>
<ul class="right hide-on-med-and-up">
<li><a id="menu-controller" href="#"><i class="material-icons">view_module</i></a></li>
</ul>
</div>
</div>
<ul id="slide-out" class="side-nav fixed">
<li class="logo">
Expand Down Expand Up @@ -95,7 +98,7 @@
</nav>
<div class="container">
<div style="position: absolute; left: 0;">
<div class="well" style="padding: 8px 0;">
<div class="hide-on-med-and-down" style="padding: 8px 0;">
<ul id="pwa-live-info" class="nav nav-list">
<li class="nav-header">Information</li></hl>
<li class="divider"></li>
Expand Down

0 comments on commit ed0dec7

Please sign in to comment.