From 639e67ae23f36fdec61eeab7da32bbb6e0f1681d Mon Sep 17 00:00:00 2001 From: Rolux Date: Tue, 29 Jun 2010 23:58:17 +0200 Subject: [PATCH] make list scrollable --- build/css/ox.ui.css | 11 +++++++---- build/js/ox.ui.js | 9 ++++++--- demos/test/list.js | 2 +- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/build/css/ox.ui.css b/build/css/ox.ui.css index a5a9ef6..1af5176 100644 --- a/build/css/ox.ui.css +++ b/build/css/ox.ui.css @@ -37,10 +37,11 @@ Core top: 0; right: 0; bottom: 0; - overflow: hidden; + //overflow: hidden; + overflow: auto; } .OxContent { - overflow: auto; + //overflow: auto; } /* @@ -555,7 +556,7 @@ Lists bottom: 0; } .OxTextList .OxBody .OxContent { - width: 100%; + //width: 100%; } .OxTextList .OxBody .OxItem { height: 16px; @@ -578,7 +579,9 @@ Lists width: 1px; height: 16px; } - +.OxTextList .OxPage { + position: absolute; +} /* ================================================================================ Menus diff --git a/build/js/ox.ui.js b/build/js/ox.ui.js index fb41fc6..118515d 100644 --- a/build/js/ox.ui.js +++ b/build/js/ox.ui.js @@ -2404,6 +2404,10 @@ requires pageHeight: self.options.orientation == "horizontal" ? 0 : self.pageLength * self.options.itemHeight / self.options.rowLength }); + Ox.print("listHeight", self.listHeight) + that.$content.css({ + height: self.listHeight + "px" + }); loadPages(self.page); } }); @@ -2714,7 +2718,7 @@ requires Ox.ListPage = function(options, self) { var self = self || {}, that = new Ox.Element({}, self) - .addClass("OxListPage"); + .addClass("OxPage"); return that; }; @@ -2843,8 +2847,7 @@ requires }) .appendTo(that); that.$body.$content.css({ - width: Math.max(Ox.sum(self.columnWidths), that.$element.width() - 12) + "px", - height: self.listHeight + "px" + width: Math.max(Ox.sum(self.columnWidths), that.$element.width() - 12) + "px" }); function addColumn(id) { diff --git a/demos/test/list.js b/demos/test/list.js index 64130c9..461e1ff 100644 --- a/demos/test/list.js +++ b/demos/test/list.js @@ -79,7 +79,7 @@ $(function() { id: "runtime", operator: "-", title: "Runtime", - visible: false, + visible: true, width: 80 } ],