moksha/public/javascript/moksha.js | 6 ++++++ moksha/public/javascript/ui/moksha.ui.tabs.js | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-)
New commits: commit e8713689c859b6b80ba20508b8fdd945a90dd847 Author: John (J5) Palmieri johnp@redhat.com Date: Thu Apr 2 17:37:39 2009 -0400
fix tab selection issue due to nested lists
diff --git a/moksha/public/javascript/moksha.js b/moksha/public/javascript/moksha.js index 4248a09..1502e9f 100644 --- a/moksha/public/javascript/moksha.js +++ b/moksha/public/javascript/moksha.js @@ -279,6 +279,12 @@ moksha = { // TODO: Make this do something to indicate it is different from a // warning or info message moksha.debug(msg); + }, + + info: function(msg) { + // TODO: Make this do something to indicate it is different from a + // warning or error message + moksha.debug(msg); } }
diff --git a/moksha/public/javascript/ui/moksha.ui.tabs.js b/moksha/public/javascript/ui/moksha.ui.tabs.js index 8497396..1ffbbac 100644 --- a/moksha/public/javascript/ui/moksha.ui.tabs.js +++ b/moksha/public/javascript/ui/moksha.ui.tabs.js @@ -59,7 +59,7 @@ $.widget("ui.mokshatabs", { }, tabify: function(init) {
- this.$lis = $('ul li:has(a[href])', this.element); + this.$lis = $('ul li:has(>a[href])', this.element); this.$tabs = this.$lis.map(function() { return $('a', this)[0]; }); this.$panels = $([]);
@@ -179,7 +179,8 @@ $.widget("ui.mokshatabs", { this.$lis.removeClass(o.selectedClass); if (o.selected !== null) {
- this.$panels.eq(o.selected).show().removeClass(o.hideClass); // use show and remove class to show in any case no matter how it has been hidden before + + var p = this.$panels.eq(o.selected).show().removeClass(o.hideClass); // use show and remove class to show in any case no matter how it has been hidden before this.$lis.eq(o.selected).addClass(o.selectedClass);
// seems to be expected behavior that the show callback is fired @@ -504,6 +505,7 @@ $.widget("ui.mokshatabs", { if (this.options.passPathRemainder && hash.length > remainder) this.path_remainder = '/' + hash.splice(level + offset + 1).join('/');
+ moksha.info('moksha.ui.tabs.js (hashToIndex): Selecting element ' + level + '(' + id + ') from hash "' + hash + '"'); return this.idToIndex(id); }, idToIndex: function(id) {
moksha-commits@lists.fedorahosted.org