incubator-bloodhound-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apache Bloodhound" <bloodhound-...@incubator.apache.org>
Subject Re: [Apache Bloodhound] #77: Wrong version of bootstrap in dashboard plugins
Date Thu, 14 Jun 2012 09:55:01 GMT
#77: Wrong version of bootstrap in dashboard plugins
------------------------+-------------------------------------
  Reporter:  gjm        |      Owner:  olemis
      Type:  defect     |     Status:  accepted
  Priority:  critical   |  Milestone:  RC1 for initial release
 Component:  dashboard  |    Version:
Resolution:             |   Keywords:
------------------------+-------------------------------------

Comment (by gjm):

 Replying to [comment:9 olemis]:
 > Patch is tiny indeed . I think we should consider forwarding it to
 Bootstrap to see whether they'll include it or not . Solution is quite
 generic as it only uses `jquery.closest` rather than `jquery.parent` to
 limit the scope of radio groups .

 I am not convinced that is correct though. What would be wrong with this:

 {{{
 #!diff
 Index: bhdashboard/layouts/templates/bs_btnbar.html
 ===================================================================
 --- bhdashboard/layouts/templates/bs_btnbar.html        (revision 1349952)
 +++ bhdashboard/layouts/templates/bs_btnbar.html        (working copy)
 @@ -6,8 +6,8 @@

    <xi:include href="widget_macros.html" />

 -  <div class="btn-toolbar" data-toggle="buttons-radio">
 -    <div class="btn-group offset1"
 +  <div class="btn-toolbar">
 +    <div class="btn-group offset1" data-toggle="buttons-radio"
          py:for="g in layout.toolbar" >
        <button data-target="#tb-item-${tb_item.id}" data-toggle="tab"
            disabled="${tb_item.widget is None and 'true' or None}"
 Index: bhdashboard/htdocs/js/bootstrap-button.js
 ===================================================================
 --- bhdashboard/htdocs/js/bootstrap-button.js   (revision 1349952)
 +++ bhdashboard/htdocs/js/bootstrap-button.js   (working copy)
 @@ -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')
 }}}

 I struggle to find a reason to justify looking beyond the parent for any
 case. It looks to me like the {{{data-toggle}}} attribute should be on the
 {{{DIV.btn-group}}}.

-- 
Ticket URL: <https://issues.apache.org/bloodhound/ticket/77#comment:11>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker

Mime
View raw message