Quellcode durchsuchen

fix for issue #1976 (#1981)

* issue1976

* issue1976_grunt_js
Olda Horák vor 6 Jahren
Ursprung
Commit
cbda6b5c3b
3 geänderte Dateien mit 8 neuen und 21 gelöschten Zeilen
  1. 4 4
      build/js/BoxRefresh.js
  2. 4 4
      dist/js/adminlte.js
  3. 0 13
      dist/js/adminlte.min.js

+ 4 - 4
build/js/BoxRefresh.js

@@ -35,7 +35,7 @@
   var BoxRefresh = function (element, options) {
     this.element  = element;
     this.options  = options;
-    this.$overlay = $(options.overlay);
+    this.$overlay = $(options.overlayTemplate);
 
     if (options.source === '') {
       throw new Error('Source url was not defined. Please specify a url in your BoxRefresh source option.');
@@ -51,7 +51,7 @@
 
     $.get(this.options.source, this.options.params, function (response) {
       if (this.options.loadInContent) {
-        $(this.options.content).html(response);
+        $(this.element).find(this.options.content).html(response);
       }
       this.options.onLoadDone.call($(this), response);
       this._removeOverlay();
@@ -61,7 +61,7 @@
   // Private
 
   BoxRefresh.prototype._setUpListeners = function () {
-    $(this.element).on('click', Selector.trigger, function (event) {
+    $(this.element).on('click', this.options.trigger, function (event) {
       if (event) event.preventDefault();
       this.load();
     }.bind(this));
@@ -72,7 +72,7 @@
   };
 
   BoxRefresh.prototype._removeOverlay = function () {
-    $(this.element).remove(this.$overlay);
+    $(this.$overlay).remove();
   };
 
   // Plugin Definition

+ 4 - 4
dist/js/adminlte.js

@@ -54,7 +54,7 @@ throw new Error('AdminLTE requires jQuery')
   var BoxRefresh = function (element, options) {
     this.element  = element;
     this.options  = options;
-    this.$overlay = $(options.overlay);
+    this.$overlay = $(options.overlayTemplate);
 
     if (options.source === '') {
       throw new Error('Source url was not defined. Please specify a url in your BoxRefresh source option.');
@@ -70,7 +70,7 @@ throw new Error('AdminLTE requires jQuery')
 
     $.get(this.options.source, this.options.params, function (response) {
       if (this.options.loadInContent) {
-        $(this.options.content).html(response);
+        $(this.element).find(this.options.content).html(response);
       }
       this.options.onLoadDone.call($(this), response);
       this._removeOverlay();
@@ -80,7 +80,7 @@ throw new Error('AdminLTE requires jQuery')
   // Private
 
   BoxRefresh.prototype._setUpListeners = function () {
-    $(this.element).on('click', Selector.trigger, function (event) {
+    $(this.element).on('click', this.options.trigger, function (event) {
       if (event) event.preventDefault();
       this.load();
     }.bind(this));
@@ -91,7 +91,7 @@ throw new Error('AdminLTE requires jQuery')
   };
 
   BoxRefresh.prototype._removeOverlay = function () {
-    $(this.element).remove(this.$overlay);
+    $(this.$overlay).remove();
   };
 
   // Plugin Definition

Datei-Diff unterdrückt, da er zu groß ist
+ 0 - 13
dist/js/adminlte.min.js


Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.