Skip to content

Commit

Permalink
Attach collapse event handler to document (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
wch committed Jun 3, 2015
1 parent a3d4a5e commit a31c58d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion inst/AdminLTE/README-shiny-mods.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This branch of AdminLTE contains the following changes from the stock version, to make it work better with Shiny.

* Attached collapse click event handler to document, instead of to each collapse button. This is the same fix as https://github.com/almasaeed2010/AdminLTE/pull/304; if that is merged, then it should be possible to go to the stock version.
* Attached collapse click event handler to document, instead of to each collapse button. This is the same fix as https://github.com/almasaeed2010/AdminLTE/pull/304; if that is merged, then it should be possible to go to the stock version. Also see https://github.com/rstudio/shinydashboard/issues/17 for a test app.
* In AdminLTE.css, the fonts are fetched from the local host, instead of from Google fonts.
4 changes: 2 additions & 2 deletions inst/AdminLTE/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -539,13 +539,13 @@ function _init() {
_box = document; // activate all boxes per default
}
//Listen for collapse event triggers
$(_box).find(_this.selectors.collapse).on('click', function (e) {
$(_box).on('click', _this.selectors.collapse, function (e) {
e.preventDefault();
_this.collapse($(this));
});

//Listen for remove event triggers
$(_box).find(_this.selectors.remove).on('click', function (e) {
$(_box).on('click', _this.selectors.remove, function (e) {
e.preventDefault();
_this.remove($(this));
});
Expand Down

0 comments on commit a31c58d

Please sign in to comment.