Closed Safranil closed 8 years ago
I agree with you. Thank you for the suggestion!
this is just what i'm looking for! but i couldn't make it work.. any ideas? I copied your code and add both of them entries into the app.js like you said.. thank you
You need to add data-widget="collapse-header"
to your .box-header
element.
This is the code of the box
<div class="box box-default collapsed-box">
<div class="box-header with-border" data-widget="collapse-header">
<h3 class="box-title">Datos Avanzados</h3>
<div class="box-tools pull-right">
<button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-plus"></i></button>
</div><!-- /.box-tools -->
</div><!-- /.box-header -->
<div class="box-body">
That's my code, and I had already included data-widget="collapse-header" to the .box-header
I'm sorry for the way the code is displayed.. but i'm new on commenting on forums..
When this functionality will be implemented? Thanks
You need to modify the app.js further with the following around line 568.. below
//Listen for collapseHeader event triggers
$(_box).on('click', _this.selectors.collapseHeader, function (e) {
e.preventDefault();
_this.collapseHeader($(this));
});
@almasaeed2010 why you close this one? would you accept a PR?
+1 for implementing this into core. Why is it closed without any comment? We can create PR if you want.
Would also appreciate if this would be in the next release :)
Can anyone provide a working JS copy with this feature, as around line x mentioned is not enough clear ...
Hi,
I changed the app.js to allow the user to collapse a box when he clicks on .box-header :
Add the function (around line 580) :
And the config (around line 90) :
And finaly use
data-widget="collapse-header"
on thebox-header
:Can you add this functionality in the template (I think it needs to be rewrite :smile:) ?