Permalink
Browse files

Add semicolons to support webpack

  • Loading branch information...
almasaeed2010 committed Oct 26, 2017
1 parent d4ed1e4 commit 278785ad492d9a17f0183a0eb554ce24abf670d9
Showing with 814 additions and 812 deletions.
  1. +20 −20 Gruntfile.js
  2. +44 −44 build/js/BoxRefresh.js
  3. +62 −62 build/js/BoxWidget.js
  4. +48 −48 build/js/ControlSidebar.js
  5. +23 −23 build/js/DirectChat.js
  6. +61 −61 build/js/Layout.js
  7. +58 −58 build/js/PushMenu.js
  8. +41 −41 build/js/TodoList.js
  9. +54 −54 build/js/Tree.js
  10. +401 −399 dist/js/adminlte.js
  11. +2 −2 dist/js/adminlte.min.js
@@ -1,6 +1,6 @@
// AdminLTE Gruntfile
module.exports = function (grunt) { // jshint ignore:line
'use strict'
'use strict';
grunt.initConfig({
pkg : grunt.file.readJSON('package.json'),
@@ -269,43 +269,43 @@ module.exports = function (grunt) { // jshint ignore:line
clean: {
build: ['build/img/*']
}
})
});
// Load all grunt tasks
// LESS Compiler
grunt.loadNpmTasks('grunt-contrib-less')
grunt.loadNpmTasks('grunt-contrib-less');
// Watch File Changes
grunt.loadNpmTasks('grunt-contrib-watch')
grunt.loadNpmTasks('grunt-contrib-watch');
// Compress JS Files
grunt.loadNpmTasks('grunt-contrib-uglify')
grunt.loadNpmTasks('grunt-contrib-uglify');
// Include Files Within HTML
grunt.loadNpmTasks('grunt-includes')
grunt.loadNpmTasks('grunt-includes');
// Optimize images
grunt.loadNpmTasks('grunt-image')
grunt.loadNpmTasks('grunt-image');
// Validate JS code
grunt.loadNpmTasks('grunt-contrib-jshint')
grunt.loadNpmTasks('grunt-jscs')
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-jscs');
// Delete not needed files
grunt.loadNpmTasks('grunt-contrib-clean')
grunt.loadNpmTasks('grunt-contrib-clean');
// Lint CSS
grunt.loadNpmTasks('grunt-contrib-csslint')
grunt.loadNpmTasks('grunt-contrib-csslint');
// Lint Bootstrap
grunt.loadNpmTasks('grunt-bootlint')
grunt.loadNpmTasks('grunt-bootlint');
// Concatenate JS files
grunt.loadNpmTasks('grunt-contrib-concat')
grunt.loadNpmTasks('grunt-contrib-concat');
// Notify
grunt.loadNpmTasks('grunt-notify')
grunt.loadNpmTasks('grunt-notify');
// Replace
grunt.loadNpmTasks('grunt-text-replace')
grunt.loadNpmTasks('grunt-text-replace');
// Linting task
grunt.registerTask('lint', ['jshint', 'csslint', 'bootlint'])
grunt.registerTask('lint', ['jshint', 'csslint', 'bootlint']);
// JS task
grunt.registerTask('js', ['concat', 'uglify'])
grunt.registerTask('js', ['concat', 'uglify']);
// CSS Task
grunt.registerTask('css', ['less:development', 'less:production', 'replace'])
grunt.registerTask('css', ['less:development', 'less:production', 'replace']);
// The default task (running 'grunt' in console) is 'watch'
grunt.registerTask('default', ['watch'])
}
grunt.registerTask('default', ['watch']);
};
@@ -7,9 +7,9 @@
* Pass any option as data-option="value"
*/
+function ($) {
'use strict'
'use strict';
var DataKey = 'lte.boxrefresh'
var DataKey = 'lte.boxrefresh';
var Default = {
source : '',
@@ -22,98 +22,98 @@
onLoadStart : function () {
},
onLoadDone : function (response) {
return response
return response;
}
}
};
var Selector = {
data: '[data-widget="box-refresh"]'
}
};
// BoxRefresh Class Definition
// =========================
var BoxRefresh = function (element, options) {
this.element = element
this.options = options
this.$overlay = $(options.overlay)
this.element = element;
this.options = options;
this.$overlay = $(options.overlay);
if (options.source === '') {
throw new Error('Source url was not defined. Please specify a url in your BoxRefresh source option.')
throw new Error('Source url was not defined. Please specify a url in your BoxRefresh source option.');
}
this._setUpListeners()
this.load()
}
this._setUpListeners();
this.load();
};
BoxRefresh.prototype.load = function () {
this._addOverlay()
this.options.onLoadStart.call($(this))
this._addOverlay();
this.options.onLoadStart.call($(this));
$.get(this.options.source, this.options.params, function (response) {
if (this.options.loadInContent) {
$(this.options.content).html(response)
$(this.options.content).html(response);
}
this.options.onLoadDone.call($(this), response)
this._removeOverlay()
}.bind(this), this.options.responseType !== '' && this.options.responseType)
}
this.options.onLoadDone.call($(this), response);
this._removeOverlay();
}.bind(this), this.options.responseType !== '' && this.options.responseType);
};
// Private
BoxRefresh.prototype._setUpListeners = function () {
$(this.element).on('click', Selector.trigger, function (event) {
if (event) event.preventDefault()
this.load()
}.bind(this))
}
if (event) event.preventDefault();
this.load();
}.bind(this));
};
BoxRefresh.prototype._addOverlay = function () {
$(this.element).append(this.$overlay)
}
$(this.element).append(this.$overlay);
};
BoxRefresh.prototype._removeOverlay = function () {
$(this.element).remove(this.$overlay)
}
$(this.element).remove(this.$overlay);
};
// Plugin Definition
// =================
function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data(DataKey)
var $this = $(this);
var data = $this.data(DataKey);
if (!data) {
var options = $.extend({}, Default, $this.data(), typeof option == 'object' && option)
$this.data(DataKey, (data = new BoxRefresh($this, options)))
var options = $.extend({}, Default, $this.data(), typeof option == 'object' && option);
$this.data(DataKey, (data = new BoxRefresh($this, options)));
}
if (typeof data == 'string') {
if (typeof data[option] == 'undefined') {
throw new Error('No method named ' + option)
throw new Error('No method named ' + option);
}
data[option]()
data[option]();
}
})
});
}
var old = $.fn.boxRefresh
var old = $.fn.boxRefresh;
$.fn.boxRefresh = Plugin
$.fn.boxRefresh.Constructor = BoxRefresh
$.fn.boxRefresh = Plugin;
$.fn.boxRefresh.Constructor = BoxRefresh;
// No Conflict Mode
// ================
$.fn.boxRefresh.noConflict = function () {
$.fn.boxRefresh = old
return this
}
$.fn.boxRefresh = old;
return this;
};
// BoxRefresh Data API
// =================
$(window).on('load', function () {
$(Selector.data).each(function () {
Plugin.call($(this))
})
})
Plugin.call($(this));
});
});
}(jQuery)
}(jQuery);
Oops, something went wrong.

0 comments on commit 278785a

Please sign in to comment.