You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bloodhound.apache.org by gj...@apache.org on 2012/06/18 11:54:24 UTC
svn commit: r1351253 - in
/incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard:
htdocs/js/bootstrap-button.js layouts/templates/bs_btnbar.html
Author: gjm
Date: Mon Jun 18 09:54:24 2012
New Revision: 1351253
URL: http://svn.apache.org/viewvc?rev=1351253&view=rev
Log:
dashboard: revert to vanilla bootstrap-buttons.js - towards #77
Modified:
incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/htdocs/js/bootstrap-button.js
incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/layouts/templates/bs_btnbar.html
Modified: incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/htdocs/js/bootstrap-button.js
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/htdocs/js/bootstrap-button.js?rev=1351253&r1=1351252&r2=1351253&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/htdocs/js/bootstrap-button.js (original)
+++ incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/htdocs/js/bootstrap-button.js Mon Jun 18 09:54:24 2012
@@ -51,7 +51,7 @@
}
Button.prototype.toggle = function () {
- var $parent = this.$element.closest('[data-toggle="buttons-radio"]')
+ var $parent = this.$element.parent('[data-toggle="buttons-radio"]')
$parent && $parent
.find('.active')
Modified: incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/layouts/templates/bs_btnbar.html
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/layouts/templates/bs_btnbar.html?rev=1351253&r1=1351252&r2=1351253&view=diff
==============================================================================
--- incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/layouts/templates/bs_btnbar.html (original)
+++ incubator/bloodhound/trunk/bloodhound_dashboard/bhdashboard/layouts/templates/bs_btnbar.html Mon Jun 18 09:54:24 2012
@@ -6,15 +6,23 @@
<xi:include href="widget_macros.html" />
- <div class="btn-toolbar" data-toggle="buttons-radio">
- <div class="btn-group offset1"
- py:for="g in layout.toolbar" >
+ <div class="btn-toolbar">
+ <div class="btn-group offset1" data-toggle="buttons-radio">
+ <py:with vars="max_idx = len(layout.toolbar) - 1">
+ <py:for each="idx, g in enumerate(layout.toolbar)" >
+ <py:for each="tb_item in g" >
<button data-target="#tb-item-${tb_item.id}" data-toggle="tab"
disabled="${tb_item.widget is None and 'true' or None}"
- class="btn ${tb_item.widget is None and 'disabled' or None} ${tb_item.active and 'active' or None}"
- py:for="tb_item in g">
+ class="btn ${tb_item.widget is None and 'disabled' or None} ${tb_item.active and 'active' or None}">
${tb_item.caption}
</button>
+ </py:for>
+ <py:if test="idx != max_idx">
+ <button disabled="true" class="btn disabled invisible">
+ </button>
+ </py:if>
+ </py:for>
+ </py:with>
</div>
</div>
<div class="tab-content">