Commit 5402bd2b authored by Romain Courteaud's avatar Romain Courteaud

Keep header in a fixed position.

It is not necessary to say that a cleaner solution is needed...
parent 2b15810c
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
<body>\n <body>\n
\n \n
<!-- data-position="fixed" -->\n <!-- data-position="fixed" -->\n
<div data-role="header"data-theme="a" class="custom-headroom-header ui-header ui-bar-a">\n <div data-role="header" data-theme="a" class="custom-headroom-header ui-header ui-bar-a" data-position="fixed">\n
\n \n
<div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-left">\n <div class="ui-controlgroup ui-controlgroup-horizontal ui-btn-left">\n
<div class="ui-controlgroup-controls">\n <div class="ui-controlgroup-controls">\n
...@@ -310,7 +310,7 @@ ...@@ -310,7 +310,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>937.58644.46215.53674</string> </value> <value> <string>937.65430.11917.20872</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -328,7 +328,7 @@ ...@@ -328,7 +328,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1412241646.76</float> <float>1412326537.12</float>
<string>GMT</string> <string>GMT</string>
</tuple> </tuple>
</state> </state>
......
...@@ -372,13 +372,18 @@ ...@@ -372,13 +372,18 @@
if (main_gadget !== undefined) {\n if (main_gadget !== undefined) {\n
return main_gadget.getElement()\n return main_gadget.getElement()\n
.push(function (fragment) {\n .push(function (fragment) {\n
var element = gadget.props.article;\n var element = gadget.props.article,\n
\n hack = document.createElement("div");\n
// XXX Horrible temporary hack to get the header fixed and content not hidden behind it...\n
hack.innerHTML = "<p><br/><br/><br/></p>";\n
// Go to the top of the page\n
window.scrollTo(0, 0);\n
// Clear first to DOM, append after to reduce flickering/manip\n // Clear first to DOM, append after to reduce flickering/manip\n
while (element.firstChild) {\n while (element.firstChild) {\n
element.removeChild(element.firstChild);\n element.removeChild(element.firstChild);\n
}\n }\n
element.appendChild(fragment);\n hack.appendChild(fragment);\n
element.appendChild(hack);\n
$(element).trigger("create");\n $(element).trigger("create");\n
return header_gadget.notifyLoaded();\n return header_gadget.notifyLoaded();\n
});\n });\n
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment