File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -672,14 +672,16 @@ function _init() {
672
672
673
673
} ) ( jQuery ) ;
674
674
675
- /*
676
- * EXPLICIT BOX ACTIVATION
675
+ /*
676
+ * EXPLICIT BOX CONTROLS
677
677
* -----------------------
678
678
* This is a custom plugin to use with the component BOX. It allows you to activate
679
- * a box inserted in the DOM after the app.js was loaded.
679
+ * a box inserted in the DOM after the app.js was loaded, toggle and remove box .
680
680
*
681
681
* @type plugin
682
682
* @usage $("#box-widget").activateBox();
683
+ * @usage $("#box-widget").toggleBox();
684
+ * @usage $("#box-widget").removeBox();
683
685
*/
684
686
( function ( $ ) {
685
687
@@ -688,6 +690,16 @@ function _init() {
688
690
$ . fn . activateBox = function ( ) {
689
691
$ . AdminLTE . boxWidget . activate ( this ) ;
690
692
} ;
693
+
694
+ $ . fn . toggleBox = function ( ) {
695
+ var button = $ ( $ . AdminLTE . boxWidget . selectors . collapse , this ) ;
696
+ $ . AdminLTE . boxWidget . collapse ( button ) ;
697
+ } ;
698
+
699
+ $ . fn . removeBox = function ( ) {
700
+ var button = $ ( $ . AdminLTE . boxWidget . selectors . remove , this ) ;
701
+ $ . AdminLTE . boxWidget . remove ( button ) ;
702
+ } ;
691
703
692
704
} ) ( jQuery ) ;
693
705
@@ -743,4 +755,4 @@ function _init() {
743
755
}
744
756
} ) ;
745
757
} ;
746
- } ( jQuery ) ) ;
758
+ } ( jQuery ) ) ;
You can’t perform that action at this time.
0 commit comments