Browse Source

Fix box widget icons and chart js version in bower issue

Abdullah Almsaeed 7 years ago
parent
commit
76ce5a9c1f
8 changed files with 29 additions and 23 deletions
  1. 11 9
      Gruntfile.js
  2. 1 1
      bower.json
  3. 7 5
      build/js/BoxWidget.js
  4. 1 1
      build/js/PushMenu.js
  5. 8 6
      dist/js/adminlte.js
  6. 0 0
      dist/js/adminlte.min.js
  7. 0 0
      dist/js/app.min.js
  8. 1 1
      pages/forms/advanced.html

+ 11 - 9
Gruntfile.js

@@ -1,6 +1,5 @@
 // AdminLTE Gruntfile
 module.exports = function (grunt) { // jshint ignore:line
-
   'use strict'
 
   grunt.initConfig({
@@ -9,27 +8,30 @@ module.exports = function (grunt) { // jshint ignore:line
       less : {
         // Compiles less files upon saving
         files: ['build/less/*.less'],
-        tasks: ['less:development', 'less:production']
+        tasks: ['less:development', 'less:production', 'notify:less']
       },
       js   : {
         // Compile js files upon saving
         files: ['build/js/*.js', 'dist/js/app.js'],
-        tasks: ['js']
+        tasks: ['js', 'notify:js']
       },
       skins: {
         // Compile any skin less files upon saving
         files: ['build/less/skins/*.less'],
-        tasks: ['less:skins', 'less:minifiedSkins']
+        tasks: ['less:skins', 'less:minifiedSkins', 'notify:less']
       }
     },
+    // Notify end of tasks
     notify: {
-      less  : {
-        title  : 'LESS Compiler',
-        message: 'LESS finished running'
+      less: {
+        options: {
+          title  : 'AdminLTE',
+          message: 'LESS finished running'
+        }
       },
-      uglify: {
+      js  : {
         options: {
-          title  : 'JS Compiler',
+          title  : 'AdminLTE',
           message: 'JS bundler finished running'
         }
       }

+ 1 - 1
bower.json

@@ -32,7 +32,7 @@
   ],
   "dependencies": {
     "bootstrap-slider": "*",
-    "chart.js": "^1.0.*",
+    "chart.js": "1.0.*",
     "ckeditor": "^4.7.0",
     "bootstrap-colorpicker": "^2.5.1",
     "bootstrap": "^3.3.7",

+ 7 - 5
build/js/BoxWidget.js

@@ -3,7 +3,7 @@
  * Adds box widget functions to boxes.
  *
  * @Usage: $('.my-box').boxWidget(options)
- *         or add [data-widget="box-widget"] to the ul element
+ *         This plugin auto activates on any element using the `.box` class
  *         Pass any option as data-option="value"
  */
 +function ($) {
@@ -64,7 +64,8 @@
 
     $(this.element).removeClass(ClassName.collapsed)
 
-    $(Selector.tools)
+    $(this.element)
+      .find(Selector.tools)
       .find('.' + expandIcon)
       .removeClass(expandIcon)
       .addClass(collapseIcon)
@@ -80,7 +81,8 @@
     var collapseIcon   = this.options.collapseIcon
     var expandIcon     = this.options.expandIcon
 
-    $(Selector.tools)
+    $(this.element)
+      .find(Selector.tools)
       .find('.' + collapseIcon)
       .removeClass(collapseIcon)
       .addClass(expandIcon)
@@ -108,12 +110,12 @@
 
     $(this.element).on('click', this.options.collapseTrigger, function (event) {
       if (event) event.preventDefault()
-      that.toggle($(this))
+      that.toggle()
     })
 
     $(this.element).on('click', this.options.removeTrigger, function (event) {
       if (event) event.preventDefault()
-      that.remove($(this))
+      that.remove()
     })
   }
 

+ 1 - 1
build/js/PushMenu.js

@@ -3,7 +3,7 @@
  * Adds the push menu functionality to the sidebar.
  *
  * @usage: $('.btn').pushMenu(options)
- *          or add [data-toggle="push-menu"] to any toggle button
+ *          or add [data-toggle="push-menu"] to any button
  *          Pass any option as data-option="value"
  */
 +function ($) {

+ 8 - 6
dist/js/adminlte.js

@@ -203,7 +203,7 @@ throw new Error('AdminLTE requires jQuery')
  * Adds the push menu functionality to the sidebar.
  *
  * @usage: $('.btn').pushMenu(options)
- *          or add [data-toggle="push-menu"] to any toggle button
+ *          or add [data-toggle="push-menu"] to any button
  *          Pass any option as data-option="value"
  */
 +function ($) {
@@ -668,7 +668,7 @@ throw new Error('AdminLTE requires jQuery')
  * Adds box widget functions to boxes.
  *
  * @Usage: $('.my-box').boxWidget(options)
- *         or add [data-widget="box-widget"] to the ul element
+ *         This plugin auto activates on any element using the `.box` class
  *         Pass any option as data-option="value"
  */
 +function ($) {
@@ -729,7 +729,8 @@ throw new Error('AdminLTE requires jQuery')
 
     $(this.element).removeClass(ClassName.collapsed)
 
-    $(Selector.tools)
+    $(this.element)
+      .find(Selector.tools)
       .find('.' + expandIcon)
       .removeClass(expandIcon)
       .addClass(collapseIcon)
@@ -745,7 +746,8 @@ throw new Error('AdminLTE requires jQuery')
     var collapseIcon   = this.options.collapseIcon
     var expandIcon     = this.options.expandIcon
 
-    $(Selector.tools)
+    $(this.element)
+      .find(Selector.tools)
       .find('.' + collapseIcon)
       .removeClass(collapseIcon)
       .addClass(expandIcon)
@@ -773,12 +775,12 @@ throw new Error('AdminLTE requires jQuery')
 
     $(this.element).on('click', this.options.collapseTrigger, function (event) {
       if (event) event.preventDefault()
-      that.toggle($(this))
+      that.toggle()
     })
 
     $(this.element).on('click', this.options.removeTrigger, function (event) {
       if (event) event.preventDefault()
-      that.remove($(this))
+      that.remove()
     })
   }
 

File diff suppressed because it is too large
+ 0 - 0
dist/js/adminlte.min.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/app.min.js


+ 1 - 1
pages/forms/advanced.html

@@ -1134,7 +1134,7 @@
 <!-- Bootstrap 3.3.7 -->
 <script src="../../bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
 <!-- Select2 -->
-<script src="../../plugins/select2/select2.full.min.js"></script>
+<script src="../../bower_components/select2/dist/js/select2.full.min.js"></script>
 <!-- InputMask -->
 <script src="../../plugins/input-mask/jquery.inputmask.js"></script>
 <script src="../../plugins/input-mask/jquery.inputmask.date.extensions.js"></script>

Some files were not shown because too many files changed in this diff