Author: rgardler
Date: Mon Oct 31 01:08:28 2011
New Revision: 1195293
URL: http://svn.apache.org/viewvc?rev=1195293&view=rev
Log:
ensure the footer is always at the bottom of the viewport and ake the primary
content independently scrollable
Modified:
incubator/wookie/trunk/widgets/templates/base/index.html
incubator/wookie/trunk/widgets/templates/base/scripts/controller.js
incubator/wookie/trunk/widgets/templates/base/style/screen.css.add
incubator/wookie/trunk/widgets/templates/browse/index.html
incubator/wookie/trunk/widgets/templates/itemDetail/index.html
Modified: incubator/wookie/trunk/widgets/templates/base/index.html
URL:
http://svn.apache.org/viewvc/incubator/wookie/trunk/widgets/templates/base/index.html?rev=1195293&r1=1195292&r2=1195293&view=diff
==============================================================================
--- incubator/wookie/trunk/widgets/templates/base/index.html (original)
+++ incubator/wookie/trunk/widgets/templates/base/index.html Mon Oct 31
01:08:28 2011
@@ -34,7 +34,7 @@
<body>
<div data-role="page" class="type-home" id="home" data-theme="d" >
- <div data-role="header">
+ <div class="header" data-role="header">
${content.header}
</div> <!-- /header -->
Modified: incubator/wookie/trunk/widgets/templates/base/scripts/controller.js
URL:
http://svn.apache.org/viewvc/incubator/wookie/trunk/widgets/templates/base/scripts/controller.js?rev=1195293&r1=1195292&r2=1195293&view=diff
==============================================================================
--- incubator/wookie/trunk/widgets/templates/base/scripts/controller.js
(original)
+++ incubator/wookie/trunk/widgets/templates/base/scripts/controller.js Mon Oct
31 01:08:28 2011
@@ -28,6 +28,11 @@ var ${widget.shortname}_controller = {
* Update the display
*/
update:function() {
+ var viewport = ${widget.shortname}_controller.getViewport();
+ var header = $(".header").outerHeight(true);
+ var footer = $(".footer").outerHeight(true);
+ var space = $(".ui-content").outerHeight(true) -
$(".ui-content").height();
+ $(".content-primary").height(viewport.height - space - header - footer);
},
/**
@@ -44,12 +49,11 @@ var ${widget.shortname}_controller = {
getViewport:function() {
var e = window
, a = 'inner';
- if ( !( 'innerWidth' in window ) )
- {
+ if ( !( 'innerWidth' in window ) ) {
a = 'client';
e = document.documentElement || document.body;
}
- return { width : e[ a+'Width' ] , height : e[ a+'Height' ] }
+ return { width : e[ a + 'Width' ] , height : e[ a + 'Height' ] }
}
};
Modified: incubator/wookie/trunk/widgets/templates/base/style/screen.css.add
URL:
http://svn.apache.org/viewvc/incubator/wookie/trunk/widgets/templates/base/style/screen.css.add?rev=1195293&r1=1195292&r2=1195293&view=diff
==============================================================================
--- incubator/wookie/trunk/widgets/templates/base/style/screen.css.add
(original)
+++ incubator/wookie/trunk/widgets/templates/base/style/screen.css.add Mon Oct
31 01:08:28 2011
@@ -14,6 +14,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
+.ui-content {
+ padding-top: 0px;
+ padding-bottom: 0px;
+}
+
+.content-primary {
+ overflow: auto;
+}
.ui-content {
padding: 5px;
Modified: incubator/wookie/trunk/widgets/templates/browse/index.html
URL:
http://svn.apache.org/viewvc/incubator/wookie/trunk/widgets/templates/browse/index.html?rev=1195293&r1=1195292&r2=1195293&view=diff
==============================================================================
--- incubator/wookie/trunk/widgets/templates/browse/index.html (original)
+++ incubator/wookie/trunk/widgets/templates/browse/index.html Mon Oct 31
01:08:28 2011
@@ -39,7 +39,7 @@
<body>
<div data-role="page" class="type-home" id="home" data-theme="d">
- <div data-role="header">
+ <div class="header" data-role="header">
<img class="logo" src="images/myExperiment_logo_32h.png"
alt="MyExperiment" title="MyExperiment Logo" />
<div class="header_title"
id="view_title">${widget.name}</div>
Modified: incubator/wookie/trunk/widgets/templates/itemDetail/index.html
URL:
http://svn.apache.org/viewvc/incubator/wookie/trunk/widgets/templates/itemDetail/index.html?rev=1195293&r1=1195292&r2=1195293&view=diff
==============================================================================
--- incubator/wookie/trunk/widgets/templates/itemDetail/index.html (original)
+++ incubator/wookie/trunk/widgets/templates/itemDetail/index.html Mon Oct 31
01:08:28 2011
@@ -38,7 +38,7 @@
<body>
<div data-role="page" class="type-home" id="home" data-theme="d">
- <div data-role="header">
+ <div class="header" data-role="header">
<img class="logo" src="images/myExperiment_logo_32h.png"
alt="MyExperiment" title="MyExperiment Logo" />
<div class="header_title"
id="view_title">${widget.name}</div>