diff --git a/resources/assets/js/app.js b/resources/assets/js/app.js deleted file mode 100755 index 6453fc7347..0000000000 --- a/resources/assets/js/app.js +++ /dev/null @@ -1,695 +0,0 @@ -/*! AdminLTE app.js - * ================ - * Main JS application file for AdminLTE v2. This file - * should be included in all pages. It controls some layout - * options and implements exclusive AdminLTE plugins. - * - * @Author Almsaeed Studio - * @Support - * @Email - * @version 2.3.0 - * @license MIT - */ - -//Make sure jQuery has been loaded before app.js -if (typeof jQuery === "undefined") { - throw new Error("AdminLTE requires jQuery"); -} - - -/* AdminLTE - * - * @type Object - * @description $.AdminLTE is the main object for the template's app. - * It's used for implementing functions and options related - * to the template. Keeping everything wrapped in an object - * prevents conflict with other plugins and is a better - * way to organize our code. - */ -$.AdminLTE = {}; - -/* -------------------- - * - AdminLTE Options - - * -------------------- - * Modify these options to suit your implementation - */ -$.AdminLTE.options = { - //Add slimscroll to navbar menus - //This requires you to load the slimscroll plugin - //in every page before app.js - navbarMenuSlimscroll: true, - navbarMenuSlimscrollWidth: "3px", //The width of the scroll bar - navbarMenuHeight: "200px", //The height of the inner menu - //General animation speed for JS animated elements such as box collapse/expand and - //sidebar treeview slide up/down. This options accepts an integer as milliseconds, - //'fast', 'normal', or 'slow' - animationSpeed: 500, - //Sidebar push menu toggle button selector - sidebarToggleSelector: "[data-toggle='offcanvas']", - //Activate sidebar push menu - sidebarPushMenu: true, - //Activate sidebar slimscroll if the fixed layout is set (requires SlimScroll Plugin) - sidebarSlimScroll: true, - //Enable sidebar expand on hover effect for sidebar mini - //This option is forced to true if both the fixed layout and sidebar mini - //are used together - sidebarExpandOnHover: false, - //BoxRefresh Plugin - enableBoxRefresh: true, - //Bootstrap.js tooltip - enableBSToppltip: true, - BSTooltipSelector: "[data-toggle='tooltip']", - //Enable Fast Click. Fastclick.js creates a more - //native touch experience with touch devices. If you - //choose to enable the plugin, make sure you load the script - //before AdminLTE's app.js - enableFastclick: false, - //Control Sidebar Options - enableControlSidebar: true, - controlSidebarOptions: { - //Which button should trigger the open/close event - toggleBtnSelector: "[data-toggle='control-sidebar']", - //The sidebar selector - selector: ".control-sidebar", - //Enable slide over content - slide: true - }, - //Box Widget Plugin. Enable this plugin - //to allow boxes to be collapsed and/or removed - enableBoxWidget: true, - //Box Widget plugin options - boxWidgetOptions: { - boxWidgetIcons: { - //Collapse icon - collapse: 'fa-minus', - //Open icon - open: 'fa-plus', - //Remove icon - remove: 'fa-times' - }, - boxWidgetSelectors: { - //Remove button selector - remove: '[data-widget="remove"]', - //Collapse button selector - collapse: '[data-widget="collapse"]' - } - }, - //Direct Chat plugin options - directChat: { - //Enable direct chat by default - enable: true, - //The button to open and close the chat contacts pane - contactToggleSelector: '[data-widget="chat-pane-toggle"]' - }, - //Define the set of colors to use globally around the website - colors: { - lightBlue: "#3c8dbc", - red: "#f56954", - green: "#00a65a", - aqua: "#00c0ef", - yellow: "#f39c12", - blue: "#0073b7", - navy: "#001F3F", - teal: "#39CCCC", - olive: "#3D9970", - lime: "#01FF70", - orange: "#FF851B", - fuchsia: "#F012BE", - purple: "#8E24AA", - maroon: "#D81B60", - black: "#222222", - gray: "#d2d6de" - }, - //The standard screen sizes that bootstrap uses. - //If you change these in the variables.less file, change - //them here too. - screenSizes: { - xs: 480, - sm: 768, - md: 992, - lg: 1200 - } -}; - -/* ------------------ - * - Implementation - - * ------------------ - * The next block of code implements AdminLTE's - * functions and plugins as specified by the - * options above. - */ -$(function () { - "use strict"; - - //Fix for IE page transitions - $("body").removeClass("hold-transition"); - - //Extend options if external options exist - if (typeof AdminLTEOptions !== "undefined") { - $.extend(true, - $.AdminLTE.options, - AdminLTEOptions); - } - - //Easy access to options - var o = $.AdminLTE.options; - - //Set up the object - _init(); - - //Activate the layout maker - $.AdminLTE.layout.activate(); - - //Enable sidebar tree view controls - $.AdminLTE.tree('.sidebar'); - - //Enable control sidebar - if (o.enableControlSidebar) { - $.AdminLTE.controlSidebar.activate(); - } - - //Add slimscroll to navbar dropdown - if (o.navbarMenuSlimscroll && typeof $.fn.slimscroll != 'undefined') { - $(".navbar .menu").slimscroll({ - height: o.navbarMenuHeight, - alwaysVisible: false, - size: o.navbarMenuSlimscrollWidth - }).css("width", "100%"); - } - - //Activate sidebar push menu - if (o.sidebarPushMenu) { - $.AdminLTE.pushMenu.activate(o.sidebarToggleSelector); - } - - //Activate Bootstrap tooltip - if (o.enableBSToppltip) { - $.widget.bridge('uitooltip', $.ui.tooltip); - $('body').tooltip({ - selector: o.BSTooltipSelector - }); - - } - - //Activate box widget - if (o.enableBoxWidget) { - $.AdminLTE.boxWidget.activate(); - } - - //Activate fast click - if (o.enableFastclick && typeof FastClick != 'undefined') { - FastClick.attach(document.body); - } - - //Activate direct chat widget - if (o.directChat.enable) { - $(document).on('click', o.directChat.contactToggleSelector, function () { - var box = $(this).parents('.direct-chat').first(); - box.toggleClass('direct-chat-contacts-open'); - }); - } - - /* - * INITIALIZE BUTTON TOGGLE - * ------------------------ - */ - $('.btn-group[data-toggle="btn-toggle"]').each(function () { - var group = $(this); - $(this).find(".btn").on('click', function (e) { - group.find(".btn.active").removeClass("active"); - $(this).addClass("active"); - e.preventDefault(); - }); - - }); -}); - -/* ---------------------------------- - * - Initialize the AdminLTE Object - - * ---------------------------------- - * All AdminLTE functions are implemented below. - */ -function _init() { - 'use strict'; - /* Layout - * ====== - * Fixes the layout height in case min-height fails. - * - * @type Object - * @usage $.AdminLTE.layout.activate() - * $.AdminLTE.layout.fix() - * $.AdminLTE.layout.fixSidebar() - */ - $.AdminLTE.layout = { - activate: function () { - var _this = this; - _this.fix(); - _this.fixSidebar(); - $(window, ".wrapper").resize(function () { - _this.fix(); - _this.fixSidebar(); - }); - }, - fix: function () { - //Get window height and the wrapper height - var neg = $('.main-header').outerHeight() + $('.main-footer').outerHeight(); - var window_height = $(window).height(); - var sidebar_height = $(".sidebar").height(); - //Set the min-height of the content and sidebar based on the - //the height of the document. - if ($("body").hasClass("fixed")) { - $(".content-wrapper, .right-side").css('min-height', window_height - $('.main-footer').outerHeight()); - } else { - var postSetWidth; - if (window_height >= sidebar_height) { - $(".content-wrapper, .right-side").css('min-height', window_height - neg); - postSetWidth = window_height - neg; - } else { - $(".content-wrapper, .right-side").css('min-height', sidebar_height); - postSetWidth = sidebar_height; - } - - //Fix for the control sidebar height - var controlSidebar = $($.AdminLTE.options.controlSidebarOptions.selector); - if (typeof controlSidebar !== "undefined") { - if (controlSidebar.height() > postSetWidth) - $(".content-wrapper, .right-side").css('min-height', controlSidebar.height()); - } - - } - }, - fixSidebar: function () { - //Make sure the body tag has the .fixed class - if (!$("body").hasClass("fixed")) { - if (typeof $.fn.slimScroll != 'undefined') { - $(".sidebar").slimScroll({destroy: true}).height("auto"); - } - return; - } else if (typeof $.fn.slimScroll == 'undefined' && window.console) { - window.console.error("Error: the fixed layout requires the slimscroll plugin!"); - } - //Enable slimscroll for fixed layout - if ($.AdminLTE.options.sidebarSlimScroll) { - if (typeof $.fn.slimScroll != 'undefined') { - //Destroy if it exists - $(".sidebar").slimScroll({destroy: true}).height("auto"); - //Add slimscroll - $(".sidebar").slimscroll({ - height: ($(window).height() - $(".main-header").height()) + "px", - color: "rgba(0,0,0,0.2)", - size: "3px" - }); - } - } - } - }; - - /* PushMenu() - * ========== - * Adds the push menu functionality to the sidebar. - * - * @type Function - * @usage: $.AdminLTE.pushMenu("[data-toggle='offcanvas']") - */ - $.AdminLTE.pushMenu = { - activate: function (toggleBtn) { - //Get the screen sizes - var screenSizes = $.AdminLTE.options.screenSizes; - - //Enable sidebar toggle - $(toggleBtn).on('click', function (e) { - e.preventDefault(); - - //Enable sidebar push menu - if ($(window).width() > (screenSizes.sm - 1)) { - if ($("body").hasClass('sidebar-collapse')) { - $("body").removeClass('sidebar-collapse').trigger('expanded.pushMenu'); - } else { - $("body").addClass('sidebar-collapse').trigger('collapsed.pushMenu'); - } - } - //Handle sidebar push menu for small screens - else { - if ($("body").hasClass('sidebar-open')) { - $("body").removeClass('sidebar-open').removeClass('sidebar-collapse').trigger('collapsed.pushMenu'); - } else { - $("body").addClass('sidebar-open').trigger('expanded.pushMenu'); - } - } - }); - - $(".content-wrapper").click(function () { - //Enable hide menu when clicking on the content-wrapper on small screens - if ($(window).width() <= (screenSizes.sm - 1) && $("body").hasClass("sidebar-open")) { - $("body").removeClass('sidebar-open'); - } - }); - - //Enable expand on hover for sidebar mini - if ($.AdminLTE.options.sidebarExpandOnHover - || ($('body').hasClass('fixed') - && $('body').hasClass('sidebar-mini'))) { - this.expandOnHover(); - } - }, - expandOnHover: function () { - var _this = this; - var screenWidth = $.AdminLTE.options.screenSizes.sm - 1; - //Expand sidebar on hover - $('.main-sidebar').hover(function () { - if ($('body').hasClass('sidebar-mini') - && $("body").hasClass('sidebar-collapse') - && $(window).width() > screenWidth) { - _this.expand(); - } - }, function () { - if ($('body').hasClass('sidebar-mini') - && $('body').hasClass('sidebar-expanded-on-hover') - && $(window).width() > screenWidth) { - _this.collapse(); - } - }); - }, - expand: function () { - $("body").removeClass('sidebar-collapse').addClass('sidebar-expanded-on-hover'); - }, - collapse: function () { - if ($('body').hasClass('sidebar-expanded-on-hover')) { - $('body').removeClass('sidebar-expanded-on-hover').addClass('sidebar-collapse'); - } - } - }; - - /* Tree() - * ====== - * Converts the sidebar into a multilevel - * tree view menu. - * - * @type Function - * @Usage: $.AdminLTE.tree('.sidebar') - */ - $.AdminLTE.tree = function (menu) { - var _this = this; - var animationSpeed = $.AdminLTE.options.animationSpeed; - $(document).on('click', menu + ' li a', function (e) { - //Get the clicked link and the next element - var $this = $(this); - var checkElement = $this.next(); - - //Check if the next element is a menu and is visible - if ((checkElement.is('.treeview-menu')) && (checkElement.is(':visible'))) { - //Close the menu - checkElement.slideUp(animationSpeed, function () { - checkElement.removeClass('menu-open'); - //Fix the layout in case the sidebar stretches over the height of the window - //_this.layout.fix(); - }); - checkElement.parent("li").removeClass("active"); - } - //If the menu is not visible - else if ((checkElement.is('.treeview-menu')) && (!checkElement.is(':visible'))) { - //Get the parent menu - var parent = $this.parents('ul').first(); - //Close all open menus within the parent - var ul = parent.find('ul:visible').slideUp(animationSpeed); - //Remove the menu-open class from the parent - ul.removeClass('menu-open'); - //Get the parent li - var parent_li = $this.parent("li"); - - //Open the target menu and add the menu-open class - checkElement.slideDown(animationSpeed, function () { - //Add the class active to the parent li - checkElement.addClass('menu-open'); - parent.find('li.active').removeClass('active'); - parent_li.addClass('active'); - //Fix the layout in case the sidebar stretches over the height of the window - _this.layout.fix(); - }); - } - //if this isn't a link, prevent the page from being redirected - if (checkElement.is('.treeview-menu')) { - e.preventDefault(); - } - }); - }; - - /* ControlSidebar - * ============== - * Adds functionality to the right sidebar - * - * @type Object - * @usage $.AdminLTE.controlSidebar.activate(options) - */ - $.AdminLTE.controlSidebar = { - //instantiate the object - activate: function () { - //Get the object - var _this = this; - //Update options - var o = $.AdminLTE.options.controlSidebarOptions; - //Get the sidebar - var sidebar = $(o.selector); - //The toggle button - var btn = $(o.toggleBtnSelector); - - //Listen to the click event - btn.on('click', function (e) { - e.preventDefault(); - //If the sidebar is not open - if (!sidebar.hasClass('control-sidebar-open') - && !$('body').hasClass('control-sidebar-open')) { - //Open the sidebar - _this.open(sidebar, o.slide); - } else { - _this.close(sidebar, o.slide); - } - }); - - //If the body has a boxed layout, fix the sidebar bg position - var bg = $(".control-sidebar-bg"); - _this._fix(bg); - - //If the body has a fixed layout, make the control sidebar fixed - if ($('body').hasClass('fixed')) { - _this._fixForFixed(sidebar); - } else { - //If the content height is less than the sidebar's height, force max height - if ($('.content-wrapper, .right-side').height() < sidebar.height()) { - _this._fixForContent(sidebar); - } - } - }, - //Open the control sidebar - open: function (sidebar, slide) { - //Slide over content - if (slide) { - sidebar.addClass('control-sidebar-open'); - } else { - //Push the content by adding the open class to the body instead - //of the sidebar itself - $('body').addClass('control-sidebar-open'); - } - }, - //Close the control sidebar - close: function (sidebar, slide) { - if (slide) { - sidebar.removeClass('control-sidebar-open'); - } else { - $('body').removeClass('control-sidebar-open'); - } - }, - _fix: function (sidebar) { - var _this = this; - if ($("body").hasClass('layout-boxed')) { - sidebar.css('position', 'absolute'); - sidebar.height($(".wrapper").height()); - $(window).resize(function () { - _this._fix(sidebar); - }); - } else { - sidebar.css({ - 'position': 'fixed', - 'height': 'auto' - }); - } - }, - _fixForFixed: function (sidebar) { - sidebar.css({ - 'position': 'fixed', - 'max-height': '100%', - 'overflow': 'auto', - 'padding-bottom': '50px' - }); - }, - _fixForContent: function (sidebar) { - $(".content-wrapper, .right-side").css('min-height', sidebar.height()); - } - }; - - /* BoxWidget - * ========= - * BoxWidget is a plugin to handle collapsing and - * removing boxes from the screen. - * - * @type Object - * @usage $.AdminLTE.boxWidget.activate() - * Set all your options in the main $.AdminLTE.options object - */ - $.AdminLTE.boxWidget = { - selectors: $.AdminLTE.options.boxWidgetOptions.boxWidgetSelectors, - icons: $.AdminLTE.options.boxWidgetOptions.boxWidgetIcons, - animationSpeed: $.AdminLTE.options.animationSpeed, - activate: function (_box) { - var _this = this; - if (!_box) { - _box = document; // activate all boxes per default - } - //Listen for collapse event triggers - $(_box).on('click', _this.selectors.collapse, function (e) { - e.preventDefault(); - _this.collapse($(this)); - }); - - //Listen for remove event triggers - $(_box).on('click', _this.selectors.remove, function (e) { - e.preventDefault(); - _this.remove($(this)); - }); - }, - collapse: function (element) { - var _this = this; - //Find the box parent - var box = element.parents(".box").first(); - //Find the body and the footer - var box_content = box.find("> .box-body, > .box-footer, > form >.box-body, > form > .box-footer"); - if (!box.hasClass("collapsed-box")) { - //Convert minus into plus - element.children(":first") - .removeClass(_this.icons.collapse) - .addClass(_this.icons.open); - //Hide the content - box_content.slideUp(_this.animationSpeed, function () { - box.addClass("collapsed-box"); - }); - } else { - //Convert plus into minus - element.children(":first") - .removeClass(_this.icons.open) - .addClass(_this.icons.collapse); - //Show the content - box_content.slideDown(_this.animationSpeed, function () { - box.removeClass("collapsed-box"); - }); - } - }, - remove: function (element) { - //Find the box parent - var box = element.parents(".box").first(); - box.slideUp(this.animationSpeed); - } - }; -} - -/* ------------------ - * - Custom Plugins - - * ------------------ - * All custom plugins are defined below. - */ - -/* - * BOX REFRESH BUTTON - * ------------------ - * This is a custom plugin to use with the component BOX. It allows you to add - * a refresh button to the box. It converts the box's state to a loading state. - * - * @type plugin - * @usage $("#box-widget").boxRefresh( options ); - */ -(function ($) { - - "use strict"; - - $.fn.boxRefresh = function (options) { - - // Render options - var settings = $.extend({ - //Refresh button selector - trigger: ".refresh-btn", - //File source to be loaded (e.g: ajax/src.php) - source: "", - //Callbacks - onLoadStart: function (box) { - return box; - }, //Right after the button has been clicked - onLoadDone: function (box) { - return box; - } //When the source has been loaded - - }, options); - - //The overlay - var overlay = $('
'); - - return this.each(function () { - //if a source is specified - if (settings.source === "") { - if (window.console) { - window.console.log("Please specify a source first - boxRefresh()"); - } - return; - } - //the box - var box = $(this); - //the button - var rBtn = box.find(settings.trigger).first(); - - //On trigger click - rBtn.on('click', function (e) { - e.preventDefault(); - //Add loading overlay - start(box); - - //Perform ajax call - box.find(".box-body").load(settings.source, function () { - done(box); - }); - }); - }); - - function start(box) { - //Add overlay and loading img - box.append(overlay); - - settings.onLoadStart.call(box); - } - - function done(box) { - //Remove overlay and loading img - box.find(overlay).remove(); - - settings.onLoadDone.call(box); - } - - }; - -})(jQuery); - -/* - * EXPLICIT BOX ACTIVATION - * ----------------------- - * This is a custom plugin to use with the component BOX. It allows you to activate - * a box inserted in the DOM after the app.js was loaded. - * - * @type plugin - * @usage $("#box-widget").activateBox(); - */ -(function ($) { - - 'use strict'; - - $.fn.activateBox = function () { - $.AdminLTE.boxWidget.activate(this); - }; - -})(jQuery); diff --git a/resources/assets/js/bootstrap-js.js b/resources/assets/js/bootstrap-js.js deleted file mode 100644 index d4fbad71b7..0000000000 --- a/resources/assets/js/bootstrap-js.js +++ /dev/null @@ -1,2363 +0,0 @@ -/*! - * Bootstrap v3.3.6 (http://getbootstrap.com) - * Copyright 2011-2015 Twitter, Inc. - * Licensed under the MIT license - */ - -if (typeof jQuery === 'undefined') { - throw new Error('Bootstrap\'s JavaScript requires jQuery') -} - -+function ($) { - 'use strict'; - var version = $.fn.jquery.split(' ')[0].split('.') - if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 2)) { - throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3') - } -}(jQuery); - -/* ======================================================================== - * Bootstrap: transition.js v3.3.6 - * http://getbootstrap.com/javascript/#transitions - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) - // ============================================================ - - function transitionEnd() { - var el = document.createElement('bootstrap') - - var transEndEventNames = { - WebkitTransition : 'webkitTransitionEnd', - MozTransition : 'transitionend', - OTransition : 'oTransitionEnd otransitionend', - transition : 'transitionend' - } - - for (var name in transEndEventNames) { - if (el.style[name] !== undefined) { - return { end: transEndEventNames[name] } - } - } - - return false // explicit for ie8 ( ._.) - } - - // http://blog.alexmaccaw.com/css-transitions - $.fn.emulateTransitionEnd = function (duration) { - var called = false - var $el = this - $(this).one('bsTransitionEnd', function () { called = true }) - var callback = function () { if (!called) $($el).trigger($.support.transition.end) } - setTimeout(callback, duration) - return this - } - - $(function () { - $.support.transition = transitionEnd() - - if (!$.support.transition) return - - $.event.special.bsTransitionEnd = { - bindType: $.support.transition.end, - delegateType: $.support.transition.end, - handle: function (e) { - if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments) - } - } - }) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: alert.js v3.3.6 - * http://getbootstrap.com/javascript/#alerts - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // ALERT CLASS DEFINITION - // ====================== - - var dismiss = '[data-dismiss="alert"]' - var Alert = function (el) { - $(el).on('click', dismiss, this.close) - } - - Alert.VERSION = '3.3.6' - - Alert.TRANSITION_DURATION = 150 - - Alert.prototype.close = function (e) { - var $this = $(this) - var selector = $this.attr('data-target') - - if (!selector) { - selector = $this.attr('href') - selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 - } - - var $parent = $(selector) - - if (e) e.preventDefault() - - if (!$parent.length) { - $parent = $this.closest('.alert') - } - - $parent.trigger(e = $.Event('close.bs.alert')) - - if (e.isDefaultPrevented()) return - - $parent.removeClass('in') - - function removeElement() { - // detach from parent, fire event then clean up data - $parent.detach().trigger('closed.bs.alert').remove() - } - - $.support.transition && $parent.hasClass('fade') ? - $parent - .one('bsTransitionEnd', removeElement) - .emulateTransitionEnd(Alert.TRANSITION_DURATION) : - removeElement() - } - - - // ALERT PLUGIN DEFINITION - // ======================= - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.alert') - - if (!data) $this.data('bs.alert', (data = new Alert(this))) - if (typeof option == 'string') data[option].call($this) - }) - } - - var old = $.fn.alert - - $.fn.alert = Plugin - $.fn.alert.Constructor = Alert - - - // ALERT NO CONFLICT - // ================= - - $.fn.alert.noConflict = function () { - $.fn.alert = old - return this - } - - - // ALERT DATA-API - // ============== - - $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: button.js v3.3.6 - * http://getbootstrap.com/javascript/#buttons - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // BUTTON PUBLIC CLASS DEFINITION - // ============================== - - var Button = function (element, options) { - this.$element = $(element) - this.options = $.extend({}, Button.DEFAULTS, options) - this.isLoading = false - } - - Button.VERSION = '3.3.6' - - Button.DEFAULTS = { - loadingText: 'loading...' - } - - Button.prototype.setState = function (state) { - var d = 'disabled' - var $el = this.$element - var val = $el.is('input') ? 'val' : 'html' - var data = $el.data() - - state += 'Text' - - if (data.resetText == null) $el.data('resetText', $el[val]()) - - // push to event loop to allow forms to submit - setTimeout($.proxy(function () { - $el[val](data[state] == null ? this.options[state] : data[state]) - - if (state == 'loadingText') { - this.isLoading = true - $el.addClass(d).attr(d, d) - } else if (this.isLoading) { - this.isLoading = false - $el.removeClass(d).removeAttr(d) - } - }, this), 0) - } - - Button.prototype.toggle = function () { - var changed = true - var $parent = this.$element.closest('[data-toggle="buttons"]') - - if ($parent.length) { - var $input = this.$element.find('input') - if ($input.prop('type') == 'radio') { - if ($input.prop('checked')) changed = false - $parent.find('.active').removeClass('active') - this.$element.addClass('active') - } else if ($input.prop('type') == 'checkbox') { - if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false - this.$element.toggleClass('active') - } - $input.prop('checked', this.$element.hasClass('active')) - if (changed) $input.trigger('change') - } else { - this.$element.attr('aria-pressed', !this.$element.hasClass('active')) - this.$element.toggleClass('active') - } - } - - - // BUTTON PLUGIN DEFINITION - // ======================== - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.button') - var options = typeof option == 'object' && option - - if (!data) $this.data('bs.button', (data = new Button(this, options))) - - if (option == 'toggle') data.toggle() - else if (option) data.setState(option) - }) - } - - var old = $.fn.button - - $.fn.button = Plugin - $.fn.button.Constructor = Button - - - // BUTTON NO CONFLICT - // ================== - - $.fn.button.noConflict = function () { - $.fn.button = old - return this - } - - - // BUTTON DATA-API - // =============== - - $(document) - .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) { - var $btn = $(e.target) - if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') - Plugin.call($btn, 'toggle') - if (!($(e.target).is('input[type="radio"]') || $(e.target).is('input[type="checkbox"]'))) e.preventDefault() - }) - .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) { - $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type)) - }) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: carousel.js v3.3.6 - * http://getbootstrap.com/javascript/#carousel - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // CAROUSEL CLASS DEFINITION - // ========================= - - var Carousel = function (element, options) { - this.$element = $(element) - this.$indicators = this.$element.find('.carousel-indicators') - this.options = options - this.paused = null - this.sliding = null - this.interval = null - this.$active = null - this.$items = null - - this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this)) - - this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element - .on('mouseenter.bs.carousel', $.proxy(this.pause, this)) - .on('mouseleave.bs.carousel', $.proxy(this.cycle, this)) - } - - Carousel.VERSION = '3.3.6' - - Carousel.TRANSITION_DURATION = 600 - - Carousel.DEFAULTS = { - interval: 5000, - pause: 'hover', - wrap: true, - keyboard: true - } - - Carousel.prototype.keydown = function (e) { - if (/input|textarea/i.test(e.target.tagName)) return - switch (e.which) { - case 37: this.prev(); break - case 39: this.next(); break - default: return - } - - e.preventDefault() - } - - Carousel.prototype.cycle = function (e) { - e || (this.paused = false) - - this.interval && clearInterval(this.interval) - - this.options.interval - && !this.paused - && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) - - return this - } - - Carousel.prototype.getItemIndex = function (item) { - this.$items = item.parent().children('.item') - return this.$items.index(item || this.$active) - } - - Carousel.prototype.getItemForDirection = function (direction, active) { - var activeIndex = this.getItemIndex(active) - var willWrap = (direction == 'prev' && activeIndex === 0) - || (direction == 'next' && activeIndex == (this.$items.length - 1)) - if (willWrap && !this.options.wrap) return active - var delta = direction == 'prev' ? -1 : 1 - var itemIndex = (activeIndex + delta) % this.$items.length - return this.$items.eq(itemIndex) - } - - Carousel.prototype.to = function (pos) { - var that = this - var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active')) - - if (pos > (this.$items.length - 1) || pos < 0) return - - if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid" - if (activeIndex == pos) return this.pause().cycle() - - return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos)) - } - - Carousel.prototype.pause = function (e) { - e || (this.paused = true) - - if (this.$element.find('.next, .prev').length && $.support.transition) { - this.$element.trigger($.support.transition.end) - this.cycle(true) - } - - this.interval = clearInterval(this.interval) - - return this - } - - Carousel.prototype.next = function () { - if (this.sliding) return - return this.slide('next') - } - - Carousel.prototype.prev = function () { - if (this.sliding) return - return this.slide('prev') - } - - Carousel.prototype.slide = function (type, next) { - var $active = this.$element.find('.item.active') - var $next = next || this.getItemForDirection(type, $active) - var isCycling = this.interval - var direction = type == 'next' ? 'left' : 'right' - var that = this - - if ($next.hasClass('active')) return (this.sliding = false) - - var relatedTarget = $next[0] - var slideEvent = $.Event('slide.bs.carousel', { - relatedTarget: relatedTarget, - direction: direction - }) - this.$element.trigger(slideEvent) - if (slideEvent.isDefaultPrevented()) return - - this.sliding = true - - isCycling && this.pause() - - if (this.$indicators.length) { - this.$indicators.find('.active').removeClass('active') - var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)]) - $nextIndicator && $nextIndicator.addClass('active') - } - - var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid" - if ($.support.transition && this.$element.hasClass('slide')) { - $next.addClass(type) - $next[0].offsetWidth // force reflow - $active.addClass(direction) - $next.addClass(direction) - $active - .one('bsTransitionEnd', function () { - $next.removeClass([type, direction].join(' ')).addClass('active') - $active.removeClass(['active', direction].join(' ')) - that.sliding = false - setTimeout(function () { - that.$element.trigger(slidEvent) - }, 0) - }) - .emulateTransitionEnd(Carousel.TRANSITION_DURATION) - } else { - $active.removeClass('active') - $next.addClass('active') - this.sliding = false - this.$element.trigger(slidEvent) - } - - isCycling && this.cycle() - - return this - } - - - // CAROUSEL PLUGIN DEFINITION - // ========================== - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.carousel') - var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option) - var action = typeof option == 'string' ? option : options.slide - - if (!data) $this.data('bs.carousel', (data = new Carousel(this, options))) - if (typeof option == 'number') data.to(option) - else if (action) data[action]() - else if (options.interval) data.pause().cycle() - }) - } - - var old = $.fn.carousel - - $.fn.carousel = Plugin - $.fn.carousel.Constructor = Carousel - - - // CAROUSEL NO CONFLICT - // ==================== - - $.fn.carousel.noConflict = function () { - $.fn.carousel = old - return this - } - - - // CAROUSEL DATA-API - // ================= - - var clickHandler = function (e) { - var href - var $this = $(this) - var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7 - if (!$target.hasClass('carousel')) return - var options = $.extend({}, $target.data(), $this.data()) - var slideIndex = $this.attr('data-slide-to') - if (slideIndex) options.interval = false - - Plugin.call($target, options) - - if (slideIndex) { - $target.data('bs.carousel').to(slideIndex) - } - - e.preventDefault() - } - - $(document) - .on('click.bs.carousel.data-api', '[data-slide]', clickHandler) - .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler) - - $(window).on('load', function () { - $('[data-ride="carousel"]').each(function () { - var $carousel = $(this) - Plugin.call($carousel, $carousel.data()) - }) - }) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: collapse.js v3.3.6 - * http://getbootstrap.com/javascript/#collapse - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // COLLAPSE PUBLIC CLASS DEFINITION - // ================================ - - var Collapse = function (element, options) { - this.$element = $(element) - this.options = $.extend({}, Collapse.DEFAULTS, options) - this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' + - '[data-toggle="collapse"][data-target="#' + element.id + '"]') - this.transitioning = null - - if (this.options.parent) { - this.$parent = this.getParent() - } else { - this.addAriaAndCollapsedClass(this.$element, this.$trigger) - } - - if (this.options.toggle) this.toggle() - } - - Collapse.VERSION = '3.3.6' - - Collapse.TRANSITION_DURATION = 350 - - Collapse.DEFAULTS = { - toggle: true - } - - Collapse.prototype.dimension = function () { - var hasWidth = this.$element.hasClass('width') - return hasWidth ? 'width' : 'height' - } - - Collapse.prototype.show = function () { - if (this.transitioning || this.$element.hasClass('in')) return - - var activesData - var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing') - - if (actives && actives.length) { - activesData = actives.data('bs.collapse') - if (activesData && activesData.transitioning) return - } - - var startEvent = $.Event('show.bs.collapse') - this.$element.trigger(startEvent) - if (startEvent.isDefaultPrevented()) return - - if (actives && actives.length) { - Plugin.call(actives, 'hide') - activesData || actives.data('bs.collapse', null) - } - - var dimension = this.dimension() - - this.$element - .removeClass('collapse') - .addClass('collapsing')[dimension](0) - .attr('aria-expanded', true) - - this.$trigger - .removeClass('collapsed') - .attr('aria-expanded', true) - - this.transitioning = 1 - - var complete = function () { - this.$element - .removeClass('collapsing') - .addClass('collapse in')[dimension]('') - this.transitioning = 0 - this.$element - .trigger('shown.bs.collapse') - } - - if (!$.support.transition) return complete.call(this) - - var scrollSize = $.camelCase(['scroll', dimension].join('-')) - - this.$element - .one('bsTransitionEnd', $.proxy(complete, this)) - .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize]) - } - - Collapse.prototype.hide = function () { - if (this.transitioning || !this.$element.hasClass('in')) return - - var startEvent = $.Event('hide.bs.collapse') - this.$element.trigger(startEvent) - if (startEvent.isDefaultPrevented()) return - - var dimension = this.dimension() - - this.$element[dimension](this.$element[dimension]())[0].offsetHeight - - this.$element - .addClass('collapsing') - .removeClass('collapse in') - .attr('aria-expanded', false) - - this.$trigger - .addClass('collapsed') - .attr('aria-expanded', false) - - this.transitioning = 1 - - var complete = function () { - this.transitioning = 0 - this.$element - .removeClass('collapsing') - .addClass('collapse') - .trigger('hidden.bs.collapse') - } - - if (!$.support.transition) return complete.call(this) - - this.$element - [dimension](0) - .one('bsTransitionEnd', $.proxy(complete, this)) - .emulateTransitionEnd(Collapse.TRANSITION_DURATION) - } - - Collapse.prototype.toggle = function () { - this[this.$element.hasClass('in') ? 'hide' : 'show']() - } - - Collapse.prototype.getParent = function () { - return $(this.options.parent) - .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]') - .each($.proxy(function (i, element) { - var $element = $(element) - this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element) - }, this)) - .end() - } - - Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) { - var isOpen = $element.hasClass('in') - - $element.attr('aria-expanded', isOpen) - $trigger - .toggleClass('collapsed', !isOpen) - .attr('aria-expanded', isOpen) - } - - function getTargetFromTrigger($trigger) { - var href - var target = $trigger.attr('data-target') - || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7 - - return $(target) - } - - - // COLLAPSE PLUGIN DEFINITION - // ========================== - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.collapse') - var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option) - - if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false - if (!data) $this.data('bs.collapse', (data = new Collapse(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.collapse - - $.fn.collapse = Plugin - $.fn.collapse.Constructor = Collapse - - - // COLLAPSE NO CONFLICT - // ==================== - - $.fn.collapse.noConflict = function () { - $.fn.collapse = old - return this - } - - - // COLLAPSE DATA-API - // ================= - - $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) { - var $this = $(this) - - if (!$this.attr('data-target')) e.preventDefault() - - var $target = getTargetFromTrigger($this) - var data = $target.data('bs.collapse') - var option = data ? 'toggle' : $this.data() - - Plugin.call($target, option) - }) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: dropdown.js v3.3.6 - * http://getbootstrap.com/javascript/#dropdowns - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // DROPDOWN CLASS DEFINITION - // ========================= - - var backdrop = '.dropdown-backdrop' - var toggle = '[data-toggle="dropdown"]' - var Dropdown = function (element) { - $(element).on('click.bs.dropdown', this.toggle) - } - - Dropdown.VERSION = '3.3.6' - - function getParent($this) { - var selector = $this.attr('data-target') - - if (!selector) { - selector = $this.attr('href') - selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 - } - - var $parent = selector && $(selector) - - return $parent && $parent.length ? $parent : $this.parent() - } - - function clearMenus(e) { - if (e && e.which === 3) return - $(backdrop).remove() - $(toggle).each(function () { - var $this = $(this) - var $parent = getParent($this) - var relatedTarget = { relatedTarget: this } - - if (!$parent.hasClass('open')) return - - if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return - - $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget)) - - if (e.isDefaultPrevented()) return - - $this.attr('aria-expanded', 'false') - $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget)) - }) - } - - Dropdown.prototype.toggle = function (e) { - var $this = $(this) - - if ($this.is('.disabled, :disabled')) return - - var $parent = getParent($this) - var isActive = $parent.hasClass('open') - - clearMenus() - - if (!isActive) { - if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) { - // if mobile we use a backdrop because click events don't delegate - $(document.createElement('div')) - .addClass('dropdown-backdrop') - .insertAfter($(this)) - .on('click', clearMenus) - } - - var relatedTarget = { relatedTarget: this } - $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget)) - - if (e.isDefaultPrevented()) return - - $this - .trigger('focus') - .attr('aria-expanded', 'true') - - $parent - .toggleClass('open') - .trigger($.Event('shown.bs.dropdown', relatedTarget)) - } - - return false - } - - Dropdown.prototype.keydown = function (e) { - if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return - - var $this = $(this) - - e.preventDefault() - e.stopPropagation() - - if ($this.is('.disabled, :disabled')) return - - var $parent = getParent($this) - var isActive = $parent.hasClass('open') - - if (!isActive && e.which != 27 || isActive && e.which == 27) { - if (e.which == 27) $parent.find(toggle).trigger('focus') - return $this.trigger('click') - } - - var desc = ' li:not(.disabled):visible a' - var $items = $parent.find('.dropdown-menu' + desc) - - if (!$items.length) return - - var index = $items.index(e.target) - - if (e.which == 38 && index > 0) index-- // up - if (e.which == 40 && index < $items.length - 1) index++ // down - if (!~index) index = 0 - - $items.eq(index).trigger('focus') - } - - - // DROPDOWN PLUGIN DEFINITION - // ========================== - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.dropdown') - - if (!data) $this.data('bs.dropdown', (data = new Dropdown(this))) - if (typeof option == 'string') data[option].call($this) - }) - } - - var old = $.fn.dropdown - - $.fn.dropdown = Plugin - $.fn.dropdown.Constructor = Dropdown - - - // DROPDOWN NO CONFLICT - // ==================== - - $.fn.dropdown.noConflict = function () { - $.fn.dropdown = old - return this - } - - - // APPLY TO STANDARD DROPDOWN ELEMENTS - // =================================== - - $(document) - .on('click.bs.dropdown.data-api', clearMenus) - .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) - .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle) - .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown) - .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: modal.js v3.3.6 - * http://getbootstrap.com/javascript/#modals - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // MODAL CLASS DEFINITION - // ====================== - - var Modal = function (element, options) { - this.options = options - this.$body = $(document.body) - this.$element = $(element) - this.$dialog = this.$element.find('.modal-dialog') - this.$backdrop = null - this.isShown = null - this.originalBodyPad = null - this.scrollbarWidth = 0 - this.ignoreBackdropClick = false - - if (this.options.remote) { - this.$element - .find('.modal-content') - .load(this.options.remote, $.proxy(function () { - this.$element.trigger('loaded.bs.modal') - }, this)) - } - } - - Modal.VERSION = '3.3.6' - - Modal.TRANSITION_DURATION = 300 - Modal.BACKDROP_TRANSITION_DURATION = 150 - - Modal.DEFAULTS = { - backdrop: true, - keyboard: true, - show: true - } - - Modal.prototype.toggle = function (_relatedTarget) { - return this.isShown ? this.hide() : this.show(_relatedTarget) - } - - Modal.prototype.show = function (_relatedTarget) { - var that = this - var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget }) - - this.$element.trigger(e) - - if (this.isShown || e.isDefaultPrevented()) return - - this.isShown = true - - this.checkScrollbar() - this.setScrollbar() - this.$body.addClass('modal-open') - - this.escape() - this.resize() - - this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this)) - - this.$dialog.on('mousedown.dismiss.bs.modal', function () { - that.$element.one('mouseup.dismiss.bs.modal', function (e) { - if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true - }) - }) - - this.backdrop(function () { - var transition = $.support.transition && that.$element.hasClass('fade') - - if (!that.$element.parent().length) { - that.$element.appendTo(that.$body) // don't move modals dom position - } - - that.$element - .show() - .scrollTop(0) - - that.adjustDialog() - - if (transition) { - that.$element[0].offsetWidth // force reflow - } - - that.$element.addClass('in') - - that.enforceFocus() - - var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget }) - - transition ? - that.$dialog // wait for modal to slide in - .one('bsTransitionEnd', function () { - that.$element.trigger('focus').trigger(e) - }) - .emulateTransitionEnd(Modal.TRANSITION_DURATION) : - that.$element.trigger('focus').trigger(e) - }) - } - - Modal.prototype.hide = function (e) { - if (e) e.preventDefault() - - e = $.Event('hide.bs.modal') - - this.$element.trigger(e) - - if (!this.isShown || e.isDefaultPrevented()) return - - this.isShown = false - - this.escape() - this.resize() - - $(document).off('focusin.bs.modal') - - this.$element - .removeClass('in') - .off('click.dismiss.bs.modal') - .off('mouseup.dismiss.bs.modal') - - this.$dialog.off('mousedown.dismiss.bs.modal') - - $.support.transition && this.$element.hasClass('fade') ? - this.$element - .one('bsTransitionEnd', $.proxy(this.hideModal, this)) - .emulateTransitionEnd(Modal.TRANSITION_DURATION) : - this.hideModal() - } - - Modal.prototype.enforceFocus = function () { - $(document) - .off('focusin.bs.modal') // guard against infinite focus loop - .on('focusin.bs.modal', $.proxy(function (e) { - if (this.$element[0] !== e.target && !this.$element.has(e.target).length) { - this.$element.trigger('focus') - } - }, this)) - } - - Modal.prototype.escape = function () { - if (this.isShown && this.options.keyboard) { - this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) { - e.which == 27 && this.hide() - }, this)) - } else if (!this.isShown) { - this.$element.off('keydown.dismiss.bs.modal') - } - } - - Modal.prototype.resize = function () { - if (this.isShown) { - $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this)) - } else { - $(window).off('resize.bs.modal') - } - } - - Modal.prototype.hideModal = function () { - var that = this - this.$element.hide() - this.backdrop(function () { - that.$body.removeClass('modal-open') - that.resetAdjustments() - that.resetScrollbar() - that.$element.trigger('hidden.bs.modal') - }) - } - - Modal.prototype.removeBackdrop = function () { - this.$backdrop && this.$backdrop.remove() - this.$backdrop = null - } - - Modal.prototype.backdrop = function (callback) { - var that = this - var animate = this.$element.hasClass('fade') ? 'fade' : '' - - if (this.isShown && this.options.backdrop) { - var doAnimate = $.support.transition && animate - - this.$backdrop = $(document.createElement('div')) - .addClass('modal-backdrop ' + animate) - .appendTo(this.$body) - - this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) { - if (this.ignoreBackdropClick) { - this.ignoreBackdropClick = false - return - } - if (e.target !== e.currentTarget) return - this.options.backdrop == 'static' - ? this.$element[0].focus() - : this.hide() - }, this)) - - if (doAnimate) this.$backdrop[0].offsetWidth // force reflow - - this.$backdrop.addClass('in') - - if (!callback) return - - doAnimate ? - this.$backdrop - .one('bsTransitionEnd', callback) - .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) : - callback() - - } else if (!this.isShown && this.$backdrop) { - this.$backdrop.removeClass('in') - - var callbackRemove = function () { - that.removeBackdrop() - callback && callback() - } - $.support.transition && this.$element.hasClass('fade') ? - this.$backdrop - .one('bsTransitionEnd', callbackRemove) - .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) : - callbackRemove() - - } else if (callback) { - callback() - } - } - - // these following methods are used to handle overflowing modals - - Modal.prototype.handleUpdate = function () { - this.adjustDialog() - } - - Modal.prototype.adjustDialog = function () { - var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight - - this.$element.css({ - paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '', - paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : '' - }) - } - - Modal.prototype.resetAdjustments = function () { - this.$element.css({ - paddingLeft: '', - paddingRight: '' - }) - } - - Modal.prototype.checkScrollbar = function () { - var fullWindowWidth = window.innerWidth - if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8 - var documentElementRect = document.documentElement.getBoundingClientRect() - fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left) - } - this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth - this.scrollbarWidth = this.measureScrollbar() - } - - Modal.prototype.setScrollbar = function () { - var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10) - this.originalBodyPad = document.body.style.paddingRight || '' - if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth) - } - - Modal.prototype.resetScrollbar = function () { - this.$body.css('padding-right', this.originalBodyPad) - } - - Modal.prototype.measureScrollbar = function () { // thx walsh - var scrollDiv = document.createElement('div') - scrollDiv.className = 'modal-scrollbar-measure' - this.$body.append(scrollDiv) - var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth - this.$body[0].removeChild(scrollDiv) - return scrollbarWidth - } - - - // MODAL PLUGIN DEFINITION - // ======================= - - function Plugin(option, _relatedTarget) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.modal') - var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option) - - if (!data) $this.data('bs.modal', (data = new Modal(this, options))) - if (typeof option == 'string') data[option](_relatedTarget) - else if (options.show) data.show(_relatedTarget) - }) - } - - var old = $.fn.modal - - $.fn.modal = Plugin - $.fn.modal.Constructor = Modal - - - // MODAL NO CONFLICT - // ================= - - $.fn.modal.noConflict = function () { - $.fn.modal = old - return this - } - - - // MODAL DATA-API - // ============== - - $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) { - var $this = $(this) - var href = $this.attr('href') - var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7 - var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data()) - - if ($this.is('a')) e.preventDefault() - - $target.one('show.bs.modal', function (showEvent) { - if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown - $target.one('hidden.bs.modal', function () { - $this.is(':visible') && $this.trigger('focus') - }) - }) - Plugin.call($target, option, this) - }) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: tooltip.js v3.3.6 - * http://getbootstrap.com/javascript/#tooltip - * Inspired by the original jQuery.tipsy by Jason Frame - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // TOOLTIP PUBLIC CLASS DEFINITION - // =============================== - - var Tooltip = function (element, options) { - this.type = null - this.options = null - this.enabled = null - this.timeout = null - this.hoverState = null - this.$element = null - this.inState = null - - this.init('tooltip', element, options) - } - - Tooltip.VERSION = '3.3.6' - - Tooltip.TRANSITION_DURATION = 150 - - Tooltip.DEFAULTS = { - animation: true, - placement: 'top', - selector: false, - template: '', - trigger: 'hover focus', - title: '', - delay: 0, - html: false, - container: false, - viewport: { - selector: 'body', - padding: 0 - } - } - - Tooltip.prototype.init = function (type, element, options) { - this.enabled = true - this.type = type - this.$element = $(element) - this.options = this.getOptions(options) - this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport)) - this.inState = { click: false, hover: false, focus: false } - - if (this.$element[0] instanceof document.constructor && !this.options.selector) { - throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!') - } - - var triggers = this.options.trigger.split(' ') - - for (var i = triggers.length; i--;) { - var trigger = triggers[i] - - if (trigger == 'click') { - this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this)) - } else if (trigger != 'manual') { - var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin' - var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout' - - this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this)) - this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this)) - } - } - - this.options.selector ? - (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) : - this.fixTitle() - } - - Tooltip.prototype.getDefaults = function () { - return Tooltip.DEFAULTS - } - - Tooltip.prototype.getOptions = function (options) { - options = $.extend({}, this.getDefaults(), this.$element.data(), options) - - if (options.delay && typeof options.delay == 'number') { - options.delay = { - show: options.delay, - hide: options.delay - } - } - - return options - } - - Tooltip.prototype.getDelegateOptions = function () { - var options = {} - var defaults = this.getDefaults() - - this._options && $.each(this._options, function (key, value) { - if (defaults[key] != value) options[key] = value - }) - - return options - } - - Tooltip.prototype.enter = function (obj) { - var self = obj instanceof this.constructor ? - obj : $(obj.currentTarget).data('bs.' + this.type) - - if (!self) { - self = new this.constructor(obj.currentTarget, this.getDelegateOptions()) - $(obj.currentTarget).data('bs.' + this.type, self) - } - - if (obj instanceof $.Event) { - self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true - } - - if (self.tip().hasClass('in') || self.hoverState == 'in') { - self.hoverState = 'in' - return - } - - clearTimeout(self.timeout) - - self.hoverState = 'in' - - if (!self.options.delay || !self.options.delay.show) return self.show() - - self.timeout = setTimeout(function () { - if (self.hoverState == 'in') self.show() - }, self.options.delay.show) - } - - Tooltip.prototype.isInStateTrue = function () { - for (var key in this.inState) { - if (this.inState[key]) return true - } - - return false - } - - Tooltip.prototype.leave = function (obj) { - var self = obj instanceof this.constructor ? - obj : $(obj.currentTarget).data('bs.' + this.type) - - if (!self) { - self = new this.constructor(obj.currentTarget, this.getDelegateOptions()) - $(obj.currentTarget).data('bs.' + this.type, self) - } - - if (obj instanceof $.Event) { - self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false - } - - if (self.isInStateTrue()) return - - clearTimeout(self.timeout) - - self.hoverState = 'out' - - if (!self.options.delay || !self.options.delay.hide) return self.hide() - - self.timeout = setTimeout(function () { - if (self.hoverState == 'out') self.hide() - }, self.options.delay.hide) - } - - Tooltip.prototype.show = function () { - var e = $.Event('show.bs.' + this.type) - - if (this.hasContent() && this.enabled) { - this.$element.trigger(e) - - var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]) - if (e.isDefaultPrevented() || !inDom) return - var that = this - - var $tip = this.tip() - - var tipId = this.getUID(this.type) - - this.setContent() - $tip.attr('id', tipId) - this.$element.attr('aria-describedby', tipId) - - if (this.options.animation) $tip.addClass('fade') - - var placement = typeof this.options.placement == 'function' ? - this.options.placement.call(this, $tip[0], this.$element[0]) : - this.options.placement - - var autoToken = /\s?auto?\s?/i - var autoPlace = autoToken.test(placement) - if (autoPlace) placement = placement.replace(autoToken, '') || 'top' - - $tip - .detach() - .css({ top: 0, left: 0, display: 'block' }) - .addClass(placement) - .data('bs.' + this.type, this) - - this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element) - this.$element.trigger('inserted.bs.' + this.type) - - var pos = this.getPosition() - var actualWidth = $tip[0].offsetWidth - var actualHeight = $tip[0].offsetHeight - - if (autoPlace) { - var orgPlacement = placement - var viewportDim = this.getPosition(this.$viewport) - - placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' : - placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' : - placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' : - placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' : - placement - - $tip - .removeClass(orgPlacement) - .addClass(placement) - } - - var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight) - - this.applyPlacement(calculatedOffset, placement) - - var complete = function () { - var prevHoverState = that.hoverState - that.$element.trigger('shown.bs.' + that.type) - that.hoverState = null - - if (prevHoverState == 'out') that.leave(that) - } - - $.support.transition && this.$tip.hasClass('fade') ? - $tip - .one('bsTransitionEnd', complete) - .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) : - complete() - } - } - - Tooltip.prototype.applyPlacement = function (offset, placement) { - var $tip = this.tip() - var width = $tip[0].offsetWidth - var height = $tip[0].offsetHeight - - // manually read margins because getBoundingClientRect includes difference - var marginTop = parseInt($tip.css('margin-top'), 10) - var marginLeft = parseInt($tip.css('margin-left'), 10) - - // we must check for NaN for ie 8/9 - if (isNaN(marginTop)) marginTop = 0 - if (isNaN(marginLeft)) marginLeft = 0 - - offset.top += marginTop - offset.left += marginLeft - - // $.fn.offset doesn't round pixel values - // so we use setOffset directly with our own function B-0 - $.offset.setOffset($tip[0], $.extend({ - using: function (props) { - $tip.css({ - top: Math.round(props.top), - left: Math.round(props.left) - }) - } - }, offset), 0) - - $tip.addClass('in') - - // check to see if placing tip in new offset caused the tip to resize itself - var actualWidth = $tip[0].offsetWidth - var actualHeight = $tip[0].offsetHeight - - if (placement == 'top' && actualHeight != height) { - offset.top = offset.top + height - actualHeight - } - - var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight) - - if (delta.left) offset.left += delta.left - else offset.top += delta.top - - var isVertical = /top|bottom/.test(placement) - var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight - var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight' - - $tip.offset(offset) - this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical) - } - - Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) { - this.arrow() - .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%') - .css(isVertical ? 'top' : 'left', '') - } - - Tooltip.prototype.setContent = function () { - var $tip = this.tip() - var title = this.getTitle() - - $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title) - $tip.removeClass('fade in top bottom left right') - } - - Tooltip.prototype.hide = function (callback) { - var that = this - var $tip = $(this.$tip) - var e = $.Event('hide.bs.' + this.type) - - function complete() { - if (that.hoverState != 'in') $tip.detach() - that.$element - .removeAttr('aria-describedby') - .trigger('hidden.bs.' + that.type) - callback && callback() - } - - this.$element.trigger(e) - - if (e.isDefaultPrevented()) return - - $tip.removeClass('in') - - $.support.transition && $tip.hasClass('fade') ? - $tip - .one('bsTransitionEnd', complete) - .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) : - complete() - - this.hoverState = null - - return this - } - - Tooltip.prototype.fixTitle = function () { - var $e = this.$element - if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') { - $e.attr('data-original-title', $e.attr('title') || '').attr('title', '') - } - } - - Tooltip.prototype.hasContent = function () { - return this.getTitle() - } - - Tooltip.prototype.getPosition = function ($element) { - $element = $element || this.$element - - var el = $element[0] - var isBody = el.tagName == 'BODY' - - var elRect = el.getBoundingClientRect() - if (elRect.width == null) { - // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093 - elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top }) - } - var elOffset = isBody ? { top: 0, left: 0 } : $element.offset() - var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() } - var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null - - return $.extend({}, elRect, scroll, outerDims, elOffset) - } - - Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) { - return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } : - placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } : - placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } : - /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width } - - } - - Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) { - var delta = { top: 0, left: 0 } - if (!this.$viewport) return delta - - var viewportPadding = this.options.viewport && this.options.viewport.padding || 0 - var viewportDimensions = this.getPosition(this.$viewport) - - if (/right|left/.test(placement)) { - var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll - var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight - if (topEdgeOffset < viewportDimensions.top) { // top overflow - delta.top = viewportDimensions.top - topEdgeOffset - } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow - delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset - } - } else { - var leftEdgeOffset = pos.left - viewportPadding - var rightEdgeOffset = pos.left + viewportPadding + actualWidth - if (leftEdgeOffset < viewportDimensions.left) { // left overflow - delta.left = viewportDimensions.left - leftEdgeOffset - } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow - delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset - } - } - - return delta - } - - Tooltip.prototype.getTitle = function () { - var title - var $e = this.$element - var o = this.options - - title = $e.attr('data-original-title') - || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title) - - return title - } - - Tooltip.prototype.getUID = function (prefix) { - do prefix += ~~(Math.random() * 1000000) - while (document.getElementById(prefix)) - return prefix - } - - Tooltip.prototype.tip = function () { - if (!this.$tip) { - this.$tip = $(this.options.template) - if (this.$tip.length != 1) { - throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!') - } - } - return this.$tip - } - - Tooltip.prototype.arrow = function () { - return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow')) - } - - Tooltip.prototype.enable = function () { - this.enabled = true - } - - Tooltip.prototype.disable = function () { - this.enabled = false - } - - Tooltip.prototype.toggleEnabled = function () { - this.enabled = !this.enabled - } - - Tooltip.prototype.toggle = function (e) { - var self = this - if (e) { - self = $(e.currentTarget).data('bs.' + this.type) - if (!self) { - self = new this.constructor(e.currentTarget, this.getDelegateOptions()) - $(e.currentTarget).data('bs.' + this.type, self) - } - } - - if (e) { - self.inState.click = !self.inState.click - if (self.isInStateTrue()) self.enter(self) - else self.leave(self) - } else { - self.tip().hasClass('in') ? self.leave(self) : self.enter(self) - } - } - - Tooltip.prototype.destroy = function () { - var that = this - clearTimeout(this.timeout) - this.hide(function () { - that.$element.off('.' + that.type).removeData('bs.' + that.type) - if (that.$tip) { - that.$tip.detach() - } - that.$tip = null - that.$arrow = null - that.$viewport = null - }) - } - - - // TOOLTIP PLUGIN DEFINITION - // ========================= - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.tooltip') - var options = typeof option == 'object' && option - - if (!data && /destroy|hide/.test(option)) return - if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.tooltip - - $.fn.tooltip = Plugin - $.fn.tooltip.Constructor = Tooltip - - - // TOOLTIP NO CONFLICT - // =================== - - $.fn.tooltip.noConflict = function () { - $.fn.tooltip = old - return this - } - -}(jQuery); - -/* ======================================================================== - * Bootstrap: popover.js v3.3.6 - * http://getbootstrap.com/javascript/#popovers - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // POPOVER PUBLIC CLASS DEFINITION - // =============================== - - var Popover = function (element, options) { - this.init('popover', element, options) - } - - if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js') - - Popover.VERSION = '3.3.6' - - Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, { - placement: 'right', - trigger: 'click', - content: '', - template: '' - }) - - - // NOTE: POPOVER EXTENDS tooltip.js - // ================================ - - Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype) - - Popover.prototype.constructor = Popover - - Popover.prototype.getDefaults = function () { - return Popover.DEFAULTS - } - - Popover.prototype.setContent = function () { - var $tip = this.tip() - var title = this.getTitle() - var content = this.getContent() - - $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title) - $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events - this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text' - ](content) - - $tip.removeClass('fade top bottom left right in') - - // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do - // this manually by checking the contents. - if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide() - } - - Popover.prototype.hasContent = function () { - return this.getTitle() || this.getContent() - } - - Popover.prototype.getContent = function () { - var $e = this.$element - var o = this.options - - return $e.attr('data-content') - || (typeof o.content == 'function' ? - o.content.call($e[0]) : - o.content) - } - - Popover.prototype.arrow = function () { - return (this.$arrow = this.$arrow || this.tip().find('.arrow')) - } - - - // POPOVER PLUGIN DEFINITION - // ========================= - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.popover') - var options = typeof option == 'object' && option - - if (!data && /destroy|hide/.test(option)) return - if (!data) $this.data('bs.popover', (data = new Popover(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.popover - - $.fn.popover = Plugin - $.fn.popover.Constructor = Popover - - - // POPOVER NO CONFLICT - // =================== - - $.fn.popover.noConflict = function () { - $.fn.popover = old - return this - } - -}(jQuery); - -/* ======================================================================== - * Bootstrap: scrollspy.js v3.3.6 - * http://getbootstrap.com/javascript/#scrollspy - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // SCROLLSPY CLASS DEFINITION - // ========================== - - function ScrollSpy(element, options) { - this.$body = $(document.body) - this.$scrollElement = $(element).is(document.body) ? $(window) : $(element) - this.options = $.extend({}, ScrollSpy.DEFAULTS, options) - this.selector = (this.options.target || '') + ' .nav li > a' - this.offsets = [] - this.targets = [] - this.activeTarget = null - this.scrollHeight = 0 - - this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this)) - this.refresh() - this.process() - } - - ScrollSpy.VERSION = '3.3.6' - - ScrollSpy.DEFAULTS = { - offset: 10 - } - - ScrollSpy.prototype.getScrollHeight = function () { - return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight) - } - - ScrollSpy.prototype.refresh = function () { - var that = this - var offsetMethod = 'offset' - var offsetBase = 0 - - this.offsets = [] - this.targets = [] - this.scrollHeight = this.getScrollHeight() - - if (!$.isWindow(this.$scrollElement[0])) { - offsetMethod = 'position' - offsetBase = this.$scrollElement.scrollTop() - } - - this.$body - .find(this.selector) - .map(function () { - var $el = $(this) - var href = $el.data('target') || $el.attr('href') - var $href = /^#./.test(href) && $(href) - - return ($href - && $href.length - && $href.is(':visible') - && [[$href[offsetMethod]().top + offsetBase, href]]) || null - }) - .sort(function (a, b) { return a[0] - b[0] }) - .each(function () { - that.offsets.push(this[0]) - that.targets.push(this[1]) - }) - } - - ScrollSpy.prototype.process = function () { - var scrollTop = this.$scrollElement.scrollTop() + this.options.offset - var scrollHeight = this.getScrollHeight() - var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height() - var offsets = this.offsets - var targets = this.targets - var activeTarget = this.activeTarget - var i - - if (this.scrollHeight != scrollHeight) { - this.refresh() - } - - if (scrollTop >= maxScroll) { - return activeTarget != (i = targets[targets.length - 1]) && this.activate(i) - } - - if (activeTarget && scrollTop < offsets[0]) { - this.activeTarget = null - return this.clear() - } - - for (i = offsets.length; i--;) { - activeTarget != targets[i] - && scrollTop >= offsets[i] - && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1]) - && this.activate(targets[i]) - } - } - - ScrollSpy.prototype.activate = function (target) { - this.activeTarget = target - - this.clear() - - var selector = this.selector + - '[data-target="' + target + '"],' + - this.selector + '[href="' + target + '"]' - - var active = $(selector) - .parents('li') - .addClass('active') - - if (active.parent('.dropdown-menu').length) { - active = active - .closest('li.dropdown') - .addClass('active') - } - - active.trigger('activate.bs.scrollspy') - } - - ScrollSpy.prototype.clear = function () { - $(this.selector) - .parentsUntil(this.options.target, '.active') - .removeClass('active') - } - - - // SCROLLSPY PLUGIN DEFINITION - // =========================== - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.scrollspy') - var options = typeof option == 'object' && option - - if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.scrollspy - - $.fn.scrollspy = Plugin - $.fn.scrollspy.Constructor = ScrollSpy - - - // SCROLLSPY NO CONFLICT - // ===================== - - $.fn.scrollspy.noConflict = function () { - $.fn.scrollspy = old - return this - } - - - // SCROLLSPY DATA-API - // ================== - - $(window).on('load.bs.scrollspy.data-api', function () { - $('[data-spy="scroll"]').each(function () { - var $spy = $(this) - Plugin.call($spy, $spy.data()) - }) - }) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: tab.js v3.3.6 - * http://getbootstrap.com/javascript/#tabs - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // TAB CLASS DEFINITION - // ==================== - - var Tab = function (element) { - // jscs:disable requireDollarBeforejQueryAssignment - this.element = $(element) - // jscs:enable requireDollarBeforejQueryAssignment - } - - Tab.VERSION = '3.3.6' - - Tab.TRANSITION_DURATION = 150 - - Tab.prototype.show = function () { - var $this = this.element - var $ul = $this.closest('ul:not(.dropdown-menu)') - var selector = $this.data('target') - - if (!selector) { - selector = $this.attr('href') - selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 - } - - if ($this.parent('li').hasClass('active')) return - - var $previous = $ul.find('.active:last a') - var hideEvent = $.Event('hide.bs.tab', { - relatedTarget: $this[0] - }) - var showEvent = $.Event('show.bs.tab', { - relatedTarget: $previous[0] - }) - - $previous.trigger(hideEvent) - $this.trigger(showEvent) - - if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return - - var $target = $(selector) - - this.activate($this.closest('li'), $ul) - this.activate($target, $target.parent(), function () { - $previous.trigger({ - type: 'hidden.bs.tab', - relatedTarget: $this[0] - }) - $this.trigger({ - type: 'shown.bs.tab', - relatedTarget: $previous[0] - }) - }) - } - - Tab.prototype.activate = function (element, container, callback) { - var $active = container.find('> .active') - var transition = callback - && $.support.transition - && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length) - - function next() { - $active - .removeClass('active') - .find('> .dropdown-menu > .active') - .removeClass('active') - .end() - .find('[data-toggle="tab"]') - .attr('aria-expanded', false) - - element - .addClass('active') - .find('[data-toggle="tab"]') - .attr('aria-expanded', true) - - if (transition) { - element[0].offsetWidth // reflow for transition - element.addClass('in') - } else { - element.removeClass('fade') - } - - if (element.parent('.dropdown-menu').length) { - element - .closest('li.dropdown') - .addClass('active') - .end() - .find('[data-toggle="tab"]') - .attr('aria-expanded', true) - } - - callback && callback() - } - - $active.length && transition ? - $active - .one('bsTransitionEnd', next) - .emulateTransitionEnd(Tab.TRANSITION_DURATION) : - next() - - $active.removeClass('in') - } - - - // TAB PLUGIN DEFINITION - // ===================== - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.tab') - - if (!data) $this.data('bs.tab', (data = new Tab(this))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.tab - - $.fn.tab = Plugin - $.fn.tab.Constructor = Tab - - - // TAB NO CONFLICT - // =============== - - $.fn.tab.noConflict = function () { - $.fn.tab = old - return this - } - - - // TAB DATA-API - // ============ - - var clickHandler = function (e) { - e.preventDefault() - Plugin.call($(this), 'show') - } - - $(document) - .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler) - .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler) - -}(jQuery); - -/* ======================================================================== - * Bootstrap: affix.js v3.3.6 - * http://getbootstrap.com/javascript/#affix - * ======================================================================== - * Copyright 2011-2015 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+function ($) { - 'use strict'; - - // AFFIX CLASS DEFINITION - // ====================== - - var Affix = function (element, options) { - this.options = $.extend({}, Affix.DEFAULTS, options) - - this.$target = $(this.options.target) - .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this)) - .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this)) - - this.$element = $(element) - this.affixed = null - this.unpin = null - this.pinnedOffset = null - - this.checkPosition() - } - - Affix.VERSION = '3.3.6' - - Affix.RESET = 'affix affix-top affix-bottom' - - Affix.DEFAULTS = { - offset: 0, - target: window - } - - Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) { - var scrollTop = this.$target.scrollTop() - var position = this.$element.offset() - var targetHeight = this.$target.height() - - if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false - - if (this.affixed == 'bottom') { - if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom' - return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom' - } - - var initializing = this.affixed == null - var colliderTop = initializing ? scrollTop : position.top - var colliderHeight = initializing ? targetHeight : height - - if (offsetTop != null && scrollTop <= offsetTop) return 'top' - if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom' - - return false - } - - Affix.prototype.getPinnedOffset = function () { - if (this.pinnedOffset) return this.pinnedOffset - this.$element.removeClass(Affix.RESET).addClass('affix') - var scrollTop = this.$target.scrollTop() - var position = this.$element.offset() - return (this.pinnedOffset = position.top - scrollTop) - } - - Affix.prototype.checkPositionWithEventLoop = function () { - setTimeout($.proxy(this.checkPosition, this), 1) - } - - Affix.prototype.checkPosition = function () { - if (!this.$element.is(':visible')) return - - var height = this.$element.height() - var offset = this.options.offset - var offsetTop = offset.top - var offsetBottom = offset.bottom - var scrollHeight = Math.max($(document).height(), $(document.body).height()) - - if (typeof offset != 'object') offsetBottom = offsetTop = offset - if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element) - if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element) - - var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom) - - if (this.affixed != affix) { - if (this.unpin != null) this.$element.css('top', '') - - var affixType = 'affix' + (affix ? '-' + affix : '') - var e = $.Event(affixType + '.bs.affix') - - this.$element.trigger(e) - - if (e.isDefaultPrevented()) return - - this.affixed = affix - this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null - - this.$element - .removeClass(Affix.RESET) - .addClass(affixType) - .trigger(affixType.replace('affix', 'affixed') + '.bs.affix') - } - - if (affix == 'bottom') { - this.$element.offset({ - top: scrollHeight - height - offsetBottom - }) - } - } - - - // AFFIX PLUGIN DEFINITION - // ======================= - - function Plugin(option) { - return this.each(function () { - var $this = $(this) - var data = $this.data('bs.affix') - var options = typeof option == 'object' && option - - if (!data) $this.data('bs.affix', (data = new Affix(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - var old = $.fn.affix - - $.fn.affix = Plugin - $.fn.affix.Constructor = Affix - - - // AFFIX NO CONFLICT - // ================= - - $.fn.affix.noConflict = function () { - $.fn.affix = old - return this - } - - - // AFFIX DATA-API - // ============== - - $(window).on('load', function () { - $('[data-spy="affix"]').each(function () { - var $spy = $(this) - var data = $spy.data() - - data.offset = data.offset || {} - - if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom - if (data.offsetTop != null) data.offset.top = data.offsetTop - - Plugin.call($spy, data) - }) - }) - -}(jQuery); diff --git a/resources/assets/js/bootstrap-table-locale-all.js b/resources/assets/js/bootstrap-table-locale-all.js deleted file mode 100755 index 2e02e8cc43..0000000000 --- a/resources/assets/js/bootstrap-table-locale-all.js +++ /dev/null @@ -1,1657 +0,0 @@ -/** - * Bootstrap Table Afrikaans translation - * Author: Phillip Kruger - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['af-ZA'] = { - formatLoadingMessage: function () { - return 'Besig om te laai, wag asseblief ...'; - }, - formatRecordsPerPage: function (pageNumber) { - return pageNumber + ' rekords per bladsy'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return 'Resultate ' + pageFrom + ' tot ' + pageTo + ' van ' + totalRows + ' rye'; - }, - formatSearch: function () { - return 'Soek'; - }, - formatNoMatches: function () { - return 'Geen rekords gevind nie'; - }, - formatPaginationSwitch: function () { - return 'Wys/verberg bladsy nummering'; - }, - formatRefresh: function () { - return 'Herlaai'; - }, - formatToggle: function () { - return 'Wissel'; - }, - formatColumns: function () { - return 'Kolomme'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['af-ZA']); - -})(jQuery); - -/** - * Bootstrap Table English translation - * Author: Zhixin Wen - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['ar-SA'] = { - formatLoadingMessage: function () { - return 'جاري التحميل, يرجى الإنتظار...'; - }, - formatRecordsPerPage: function (pageNumber) { - return pageNumber + ' سجل لكل صفحة'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return 'الظاهر ' + pageFrom + ' إلى ' + pageTo + ' من ' + totalRows + ' سجل'; - }, - formatSearch: function () { - return 'بحث'; - }, - formatNoMatches: function () { - return 'لا توجد نتائج مطابقة للبحث'; - }, - formatPaginationSwitch: function () { - return 'إخفاء\إظهار ترقيم الصفحات'; - }, - formatRefresh: function () { - return 'تحديث'; - }, - formatToggle: function () { - return 'تغيير'; - }, - formatColumns: function () { - return 'أعمدة'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['ar-SA']); - -})(jQuery); - -/** - * Bootstrap Table Catalan translation - * Authors: Marc Pina - * Claudi Martinez - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['ca-ES'] = { - formatLoadingMessage: function () { - return 'Espereu, si us plau...'; - }, - formatRecordsPerPage: function (pageNumber) { - return pageNumber + ' resultats per pàgina'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return 'Mostrant de ' + pageFrom + ' fins ' + pageTo + ' - total ' + totalRows + ' resultats'; - }, - formatSearch: function () { - return 'Cerca'; - }, - formatNoMatches: function () { - return 'No s\'han trobat resultats'; - }, - formatPaginationSwitch: function () { - return 'Amaga/Mostra paginació'; - }, - formatRefresh: function () { - return 'Refresca'; - }, - formatToggle: function () { - return 'Alterna formatació'; - }, - formatColumns: function () { - return 'Columnes'; - }, - formatAllRows: function () { - return 'Tots'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['ca-ES']); - -})(jQuery); - -/** - * Bootstrap Table Czech translation - * Author: Lukas Kral (monarcha@seznam.cz) - * Author: Jakub Svestka - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['cs-CZ'] = { - formatLoadingMessage: function () { - return 'Čekejte, prosím...'; - }, - formatRecordsPerPage: function (pageNumber) { - return pageNumber + ' položek na stránku'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return 'Zobrazena ' + pageFrom + '. - ' + pageTo + '. položka z celkových ' + totalRows; - }, - formatSearch: function () { - return 'Vyhledávání'; - }, - formatNoMatches: function () { - return 'Nenalezena žádná vyhovující položka'; - }, - formatPaginationSwitch: function () { - return 'Skrýt/Zobrazit stránkování'; - }, - formatRefresh: function () { - return 'Aktualizovat'; - }, - formatToggle: function () { - return 'Přepni'; - }, - formatColumns: function () { - return 'Sloupce'; - }, - formatAllRows: function () { - return 'Vše'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['cs-CZ']); - -})(jQuery); - -/** - * Bootstrap Table danish translation - * Author: Your Name Jan Borup Coyle, github@coyle.dk - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['da-DK'] = { - formatLoadingMessage: function () { - return 'Indlæser, vent venligst...'; - }, - formatRecordsPerPage: function (pageNumber) { - return pageNumber + ' poster pr side'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return 'Viser ' + pageFrom + ' til ' + pageTo + ' af ' + totalRows + ' rækker'; - }, - formatSearch: function () { - return 'Søg'; - }, - formatNoMatches: function () { - return 'Ingen poster fundet'; - }, - formatRefresh: function () { - return 'Opdater'; - }, - formatToggle: function () { - return 'Skift'; - }, - formatColumns: function () { - return 'Kolonner'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['da-DK']); - -})(jQuery); -/** -* Bootstrap Table German translation -* Author: Paul Mohr - Sopamo -*/ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['de-DE'] = { - formatLoadingMessage: function () { - return 'Lade, bitte warten...'; - }, - formatRecordsPerPage: function (pageNumber) { - return pageNumber + ' Einträge pro Seite'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return 'Zeige ' + pageFrom + ' bis ' + pageTo + ' von ' + totalRows + ' Zeile' + ((totalRows > 1) ? "n" : ""); - }, - formatSearch: function () { - return 'Suchen'; - }, - formatNoMatches: function () { - return 'Keine passenden Ergebnisse gefunden'; - }, - formatRefresh: function () { - return 'Neu laden'; - }, - formatToggle: function () { - return 'Umschalten'; - }, - formatColumns: function () { - return 'Spalten'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['de-DE']); - -})(jQuery); - -/** - * Bootstrap Table Greek translation - * Author: giannisdallas - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['el-GR'] = { - formatLoadingMessage: function () { - return 'Φορτώνει, παρακαλώ περιμένετε...'; - }, - formatRecordsPerPage: function (pageNumber) { - return pageNumber + ' αποτελέσματα ανά σελίδα'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return 'Εμφανίζονται από την ' + pageFrom + ' ως την ' + pageTo + ' από σύνολο ' + totalRows + ' σειρών'; - }, - formatSearch: function () { - return 'Αναζητήστε'; - }, - formatNoMatches: function () { - return 'Δεν βρέθηκαν αποτελέσματα'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['el-GR']); - -})(jQuery); - -/** - * Bootstrap Table English translation - * Author: Zhixin Wen - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['en-US'] = { - formatLoadingMessage: function () { - return 'Loading, please wait...'; - }, - formatRecordsPerPage: function (pageNumber) { - return pageNumber + ' rows per page'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return 'Showing ' + pageFrom + ' to ' + pageTo + ' of ' + totalRows + ' rows'; - }, - formatSearch: function () { - return 'Search'; - }, - formatNoMatches: function () { - return 'No matching records found'; - }, - formatPaginationSwitch: function () { - return 'Hide/Show pagination'; - }, - formatRefresh: function () { - return 'Refresh'; - }, - formatToggle: function () { - return 'Toggle'; - }, - formatColumns: function () { - return 'Columns'; - }, - formatAllRows: function () { - return 'All'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['en-US']); - -})(jQuery); - -/** - * Bootstrap Table Spanish (Argentina) translation - * Author: Felix Vera (felix.vera@gmail.com) - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['es-AR'] = { - formatLoadingMessage: function () { - return 'Cargando, espere por favor...'; - }, - formatRecordsPerPage: function (pageNumber) { - return pageNumber + ' registros por página'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return 'Mostrando ' + pageFrom + ' a ' + pageTo + ' de ' + totalRows + ' filas'; - }, - formatSearch: function () { - return 'Buscar'; - }, - formatNoMatches: function () { - return 'No se encontraron registros'; - }, - formatAllRows: function () { - return 'Todo'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['es-AR']); - -})(jQuery); -/** - * Bootstrap Table Spanish (Costa Rica) translation - * Author: Dennis Hernández (http://djhvscf.github.io/Blog/) - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['es-CR'] = { - formatLoadingMessage: function () { - return 'Cargando, por favor espere...'; - }, - formatRecordsPerPage: function (pageNumber) { - return pageNumber + ' registros por página'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return 'Mostrando de ' + pageFrom + ' a ' + pageTo + ' registros de ' + totalRows + ' registros en total'; - }, - formatSearch: function () { - return 'Buscar'; - }, - formatNoMatches: function () { - return 'No se encontraron registros'; - }, - formatRefresh: function () { - return 'Refrescar'; - }, - formatToggle: function () { - return 'Alternar'; - }, - formatColumns: function () { - return 'Columnas'; - }, - formatAllRows: function () { - return 'Todo'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['es-CR']); - -})(jQuery); - -/** - * Bootstrap Table Spanish Spain translation - * Author: Marc Pina - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['es-ES'] = { - formatLoadingMessage: function () { - return 'Por favor espere...'; - }, - formatRecordsPerPage: function (pageNumber) { - return pageNumber + ' resultados por página'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return 'Mostrando desde ' + pageFrom + ' hasta ' + pageTo + ' - En total ' + totalRows + ' resultados'; - }, - formatSearch: function () { - return 'Buscar'; - }, - formatNoMatches: function () { - return 'No se encontraron resultados'; - }, - formatPaginationSwitch: function () { - return 'Ocultar/Mostrar paginación'; - }, - formatRefresh: function () { - return 'Refrescar'; - }, - formatToggle: function () { - return 'Ocultar/Mostrar'; - }, - formatColumns: function () { - return 'Columnas'; - }, - formatAllRows: function () { - return 'Todos'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['es-ES']); - -})(jQuery); - -/** - * Bootstrap Table Spanish (México) translation (Obtenido de traducción de Argentina) - * Author: Felix Vera (felix.vera@gmail.com) - * Copiado: Mauricio Vera (mauricioa.vera@gmail.com) - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['es-MX'] = { - formatLoadingMessage: function () { - return 'Cargando, espere por favor...'; - }, - formatRecordsPerPage: function (pageNumber) { - return pageNumber + ' registros por página'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return 'Mostrando ' + pageFrom + ' a ' + pageTo + ' de ' + totalRows + ' filas'; - }, - formatSearch: function () { - return 'Buscar'; - }, - formatNoMatches: function () { - return 'No se encontraron registros'; - }, - formatAllRows: function () { - return 'Todo'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['es-MX']); - -})(jQuery); - -/** - * Bootstrap Table Spanish (Nicaragua) translation - * Author: Dennis Hernández (http://djhvscf.github.io/Blog/) - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['es-NI'] = { - formatLoadingMessage: function () { - return 'Cargando, por favor espere...'; - }, - formatRecordsPerPage: function (pageNumber) { - return pageNumber + ' registros por página'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return 'Mostrando de ' + pageFrom + ' a ' + pageTo + ' registros de ' + totalRows + ' registros en total'; - }, - formatSearch: function () { - return 'Buscar'; - }, - formatNoMatches: function () { - return 'No se encontraron registros'; - }, - formatRefresh: function () { - return 'Refrescar'; - }, - formatToggle: function () { - return 'Alternar'; - }, - formatColumns: function () { - return 'Columnas'; - }, - formatAllRows: function () { - return 'Todo'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['es-NI']); - -})(jQuery); - -/** - * Bootstrap Table Spanish (España) translation - * Author: Antonio Pérez - */ - (function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['es-SP'] = { - formatLoadingMessage: function () { - return 'Cargando, por favor espera...'; - }, - formatRecordsPerPage: function (pageNumber) { - return pageNumber + ' registros por página.'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return pageFrom + ' - ' + pageTo + ' de ' + totalRows + ' registros.'; - }, - formatSearch: function () { - return 'Buscar'; - }, - formatNoMatches: function () { - return 'No se han encontrado registros.'; - }, - formatRefresh: function () { - return 'Actualizar'; - }, - formatToggle: function () { - return 'Alternar'; - }, - formatColumns: function () { - return 'Columnas'; - }, - formatAllRows: function () { - return 'Todo'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['es-SP']); - -})(jQuery); -/** - * Bootstrap Table Estonian translation - * Author: kristjan@logist.it> - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['et-EE'] = { - formatLoadingMessage: function () { - return 'Päring käib, palun oota...'; - }, - formatRecordsPerPage: function (pageNumber) { - return pageNumber + ' rida lehe kohta'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return 'Näitan tulemusi ' + pageFrom + ' kuni ' + pageTo + ' - kokku ' + totalRows + ' tulemust'; - }, - formatSearch: function () { - return 'Otsi'; - }, - formatNoMatches: function () { - return 'Päringu tingimustele ei vastanud ühtegi tulemust'; - }, - formatPaginationSwitch: function () { - return 'Näita/Peida lehtedeks jagamine'; - }, - formatRefresh: function () { - return 'Värskenda'; - }, - formatToggle: function () { - return 'Lülita'; - }, - formatColumns: function () { - return 'Veerud'; - }, - formatAllRows: function () { - return 'Kõik'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['et-EE']); - -})(jQuery); -/** - * Bootstrap Table Persian translation - * Author: MJ Vakili - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['fa-IR'] = { - formatLoadingMessage: function () { - return 'در حال بارگذاری, لطفا صبر کنید...'; - }, - formatRecordsPerPage: function (pageNumber) { - return pageNumber + ' رکورد در صفحه'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return 'نمایش ' + pageFrom + ' تا ' + pageTo + ' از ' + totalRows + ' ردیف'; - }, - formatSearch: function () { - return 'جستجو'; - }, - formatNoMatches: function () { - return 'رکوردی یافت نشد.'; - }, - formatPaginationSwitch: function () { - return 'نمایش/مخفی صفحه بندی'; - }, - formatRefresh: function () { - return 'به روز رسانی'; - }, - formatToggle: function () { - return 'تغییر نمایش'; - }, - formatColumns: function () { - return 'سطر ها'; - }, - formatAllRows: function () { - return 'همه'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['fa-IR']); - -})(jQuery); -/** - * Bootstrap Table French (Belgium) translation - * Author: Julien Bisconti (julien.bisconti@gmail.com) - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['fr-BE'] = { - formatLoadingMessage: function () { - return 'Chargement en cours...'; - }, - formatRecordsPerPage: function (pageNumber) { - return pageNumber + ' entrées par page'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return 'Affiche de' + pageFrom + ' à ' + pageTo + ' sur ' + totalRows + ' lignes'; - }, - formatSearch: function () { - return 'Recherche'; - }, - formatNoMatches: function () { - return 'Pas de fichiers trouvés'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['fr-BE']); - -})(jQuery); - -/** - * Bootstrap Table French (France) translation - * Author: Dennis Hernández (http://djhvscf.github.io/Blog/) - * Modification: Tidalf (https://github.com/TidalfFR) - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['fr-FR'] = { - formatLoadingMessage: function () { - return 'Chargement en cours, patientez, s´il vous plaît ...'; - }, - formatRecordsPerPage: function (pageNumber) { - return pageNumber + ' lignes par page'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return 'Affichage des lignes ' + pageFrom + ' à ' + pageTo + ' sur ' + totalRows + ' lignes au total'; - }, - formatSearch: function () { - return 'Rechercher'; - }, - formatNoMatches: function () { - return 'Aucun résultat trouvé'; - }, - formatRefresh: function () { - return 'Rafraîchir'; - }, - formatToggle: function () { - return 'Alterner'; - }, - formatColumns: function () { - return 'Colonnes'; - }, - formatAllRows: function () { - return 'Tous'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['fr-FR']); - -})(jQuery); - -/** - * Bootstrap Table Hebrew translation - * Author: legshooter - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['he-IL'] = { - formatLoadingMessage: function () { - return 'טוען, נא להמתין...'; - }, - formatRecordsPerPage: function (pageNumber) { - return pageNumber + ' שורות בעמוד'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return 'מציג ' + pageFrom + ' עד ' + pageTo + ' מ-' + totalRows + ' שורות'; - }, - formatSearch: function () { - return 'חיפוש'; - }, - formatNoMatches: function () { - return 'לא נמצאו רשומות תואמות'; - }, - formatPaginationSwitch: function () { - return 'הסתר/הצג מספור דפים'; - }, - formatRefresh: function () { - return 'רענן'; - }, - formatToggle: function () { - return 'החלף תצוגה'; - }, - formatColumns: function () { - return 'עמודות'; - }, - formatAllRows: function () { - return 'הכל'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['he-IL']); - -})(jQuery); - -/** - * Bootstrap Table Croatian translation - * Author: Petra Štrbenac (petra.strbenac@gmail.com) - * Author: Petra Štrbenac (petra.strbenac@gmail.com) - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['hr-HR'] = { - formatLoadingMessage: function () { - return 'Molimo pričekajte ...'; - }, - formatRecordsPerPage: function (pageNumber) { - return pageNumber + ' broj zapisa po stranici'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return 'Prikazujem ' + pageFrom + '. - ' + pageTo + '. od ukupnog broja zapisa ' + totalRows; - }, - formatSearch: function () { - return 'Pretraži'; - }, - formatNoMatches: function () { - return 'Nije pronađen niti jedan zapis'; - }, - formatPaginationSwitch: function () { - return 'Prikaži/sakrij stranice'; - }, - formatRefresh: function () { - return 'Osvježi'; - }, - formatToggle: function () { - return 'Promijeni prikaz'; - }, - formatColumns: function () { - return 'Kolone'; - }, - formatAllRows: function () { - return 'Sve'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['hr-HR']); - -})(jQuery); - -/** - * Bootstrap Table Hungarian translation - * Author: Nagy Gergely - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['hu-HU'] = { - formatLoadingMessage: function () { - return 'Betöltés, kérem várjon...'; - }, - formatRecordsPerPage: function (pageNumber) { - return pageNumber + ' rekord per oldal'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return 'Megjelenítve ' + pageFrom + ' - ' + pageTo + ' / ' + totalRows + ' összesen'; - }, - formatSearch: function () { - return 'Keresés'; - }, - formatNoMatches: function () { - return 'Nincs találat'; - }, - formatPaginationSwitch: function () { - return 'Lapozó elrejtése/megjelenítése'; - }, - formatRefresh: function () { - return 'Frissítés'; - }, - formatToggle: function () { - return 'Összecsuk/Kinyit'; - }, - formatColumns: function () { - return 'Oszlopok'; - }, - formatAllRows: function () { - return 'Összes'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['hu-HU']); - -})(jQuery); - -/** - * Bootstrap Table Italian translation - * Author: Davide Renzi - * Author: Davide Borsatto - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['it-IT'] = { - formatLoadingMessage: function () { - return 'Caricamento in corso...'; - }, - formatRecordsPerPage: function (pageNumber) { - return pageNumber + ' elementi per pagina'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return 'Pagina ' + pageFrom + ' di ' + pageTo + ' (' + totalRows + ' records)'; - }, - formatSearch: function () { - return 'Cerca'; - }, - formatNoMatches: function () { - return 'Nessun elemento trovato'; - }, - formatRefresh: function () { - return 'Aggiorna'; - }, - formatToggle: function () { - return 'Alterna'; - }, - formatColumns: function () { - return 'Colonne'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['it-IT']); - -})(jQuery); - -/** - * Bootstrap Table Japanese translation - * Author: Azamshul Azizy - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['ja-JP'] = { - formatLoadingMessage: function () { - return '読み込み中です。少々お待ちください。'; - }, - formatRecordsPerPage: function (pageNumber) { - return 'ページ当たり最大' + pageNumber + '件'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return '全' + totalRows + '件から、'+ pageFrom + 'から' + pageTo + '件目まで表示しています'; - }, - formatSearch: function () { - return '検索'; - }, - formatNoMatches: function () { - return '該当するレコードが見つかりません'; - }, - formatPaginationSwitch: function () { - return 'ページ数を表示・非表示'; - }, - formatRefresh: function () { - return '更新'; - }, - formatToggle: function () { - return 'トグル'; - }, - formatColumns: function () { - return '列'; - }, - formatAllRows: function () { - return 'すべて'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['ja-JP']); - -})(jQuery); -/** - * Bootstrap Table Georgian translation - * Author: Levan Lotuashvili - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['ka-GE'] = { - formatLoadingMessage: function() { - return 'იტვირთება, გთხოვთ მოიცადოთ...'; - }, - formatRecordsPerPage: function(pageNumber) { - return pageNumber + ' ჩანაწერი თითო გვერდზე'; - }, - formatShowingRows: function(pageFrom, pageTo, totalRows) { - return 'ნაჩვენებია ' + pageFrom + '-დან ' + pageTo + '-მდე ჩანაწერი ჯამური ' + totalRows + '-დან'; - }, - formatSearch: function() { - return 'ძებნა'; - }, - formatNoMatches: function() { - return 'მონაცემები არ არის'; - }, - formatPaginationSwitch: function() { - return 'გვერდების გადამრთველის დამალვა/გამოჩენა'; - }, - formatRefresh: function() { - return 'განახლება'; - }, - formatToggle: function() { - return 'ჩართვა/გამორთვა'; - }, - formatColumns: function() { - return 'სვეტები'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['ka-GE']); - -})(jQuery); - -/** - * Bootstrap Table Korean translation - * Author: Yi Tae-Hyeong (jsonobject@gmail.com) - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['ko-KR'] = { - formatLoadingMessage: function () { - return '데이터를 불러오는 중입니다...'; - }, - formatRecordsPerPage: function (pageNumber) { - return '페이지 당 ' + pageNumber + '개 데이터 출력'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return '전체 ' + totalRows + '개 중 ' + pageFrom + '~' + pageTo + '번째 데이터 출력,'; - }, - formatSearch: function () { - return '검색'; - }, - formatNoMatches: function () { - return '조회된 데이터가 없습니다.'; - }, - formatRefresh: function () { - return '새로 고침'; - }, - formatToggle: function () { - return '전환'; - }, - formatColumns: function () { - return '컬럼 필터링'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['ko-KR']); - -})(jQuery); -/** - * Bootstrap Table Malay translation - * Author: Azamshul Azizy - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['ms-MY'] = { - formatLoadingMessage: function () { - return 'Permintaan sedang dimuatkan. Sila tunggu sebentar...'; - }, - formatRecordsPerPage: function (pageNumber) { - return pageNumber + ' rekod setiap muka surat'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return 'Sedang memaparkan rekod ' + pageFrom + ' hingga ' + pageTo + ' daripada jumlah ' + totalRows + ' rekod'; - }, - formatSearch: function () { - return 'Cari'; - }, - formatNoMatches: function () { - return 'Tiada rekod yang menyamai permintaan'; - }, - formatPaginationSwitch: function () { - return 'Tunjuk/sembunyi muka surat'; - }, - formatRefresh: function () { - return 'Muatsemula'; - }, - formatToggle: function () { - return 'Tukar'; - }, - formatColumns: function () { - return 'Lajur'; - }, - formatAllRows: function () { - return 'Semua'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['ms-MY']); - -})(jQuery); - -/** - * Bootstrap Table norwegian translation - * Author: Jim Nordbø, jim@nordb.no - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['nb-NO'] = { - formatLoadingMessage: function () { - return 'Oppdaterer, vennligst vent...'; - }, - formatRecordsPerPage: function (pageNumber) { - return pageNumber + ' poster pr side'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return 'Viser ' + pageFrom + ' til ' + pageTo + ' av ' + totalRows + ' rekker'; - }, - formatSearch: function () { - return 'Søk'; - }, - formatNoMatches: function () { - return 'Ingen poster funnet'; - }, - formatRefresh: function () { - return 'Oppdater'; - }, - formatToggle: function () { - return 'Endre'; - }, - formatColumns: function () { - return 'Kolonner'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['nb-NO']); - -})(jQuery); -/** - * Bootstrap Table Dutch translation - * Author: Your Name - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['nl-NL'] = { - formatLoadingMessage: function () { - return 'Laden, even geduld...'; - }, - formatRecordsPerPage: function (pageNumber) { - return pageNumber + ' records per pagina'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return 'Toon ' + pageFrom + ' tot ' + pageTo + ' van ' + totalRows + ' record' + ((totalRows > 1) ? 's' : ''); - }, - formatDetailPagination: function (totalRows) { - return 'Toon ' + totalRows + ' record' + ((totalRows > 1) ? 's' : ''); - }, - formatSearch: function () { - return 'Zoeken'; - }, - formatNoMatches: function () { - return 'Geen resultaten gevonden'; - }, - formatRefresh: function () { - return 'Vernieuwen'; - }, - formatToggle: function () { - return 'Omschakelen'; - }, - formatColumns: function () { - return 'Kolommen'; - }, - formatAllRows: function () { - return 'Alle'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['nl-NL']); - -})(jQuery); - -/** - * Bootstrap Table Polish translation - * Author: zergu - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['pl-PL'] = { - formatLoadingMessage: function () { - return 'Ładowanie, proszę czekać...'; - }, - formatRecordsPerPage: function (pageNumber) { - return pageNumber + ' rekordów na stronę'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return 'Wyświetlanie rekordów od ' + pageFrom + ' do ' + pageTo + ' z ' + totalRows; - }, - formatSearch: function () { - return 'Szukaj'; - }, - formatNoMatches: function () { - return 'Niestety, nic nie znaleziono'; - }, - formatRefresh: function () { - return 'Odśwież'; - }, - formatToggle: function () { - return 'Przełącz'; - }, - formatColumns: function () { - return 'Kolumny'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['pl-PL']); - -})(jQuery); - -/** - * Bootstrap Table Brazilian Portuguese Translation - * Author: Eduardo Cerqueira - * Update: João Mello - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['pt-BR'] = { - formatLoadingMessage: function () { - return 'Carregando, aguarde...'; - }, - formatRecordsPerPage: function (pageNumber) { - return pageNumber + ' registros por página'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return 'Exibindo ' + pageFrom + ' até ' + pageTo + ' de ' + totalRows + ' linhas'; - }, - formatSearch: function () { - return 'Pesquisar'; - }, - formatRefresh: function () { - return 'Recarregar'; - }, - formatToggle: function () { - return 'Alternar'; - }, - formatColumns: function () { - return 'Colunas'; - }, - formatPaginationSwitch: function () { - return 'Ocultar/Exibir paginação'; - }, - formatNoMatches: function () { - return 'Nenhum registro encontrado'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['pt-BR']); - -})(jQuery); - -/** - * Bootstrap Table Portuguese Portugal Translation - * Author: Burnspirit - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['pt-PT'] = { - formatLoadingMessage: function () { - return 'A carregar, aguarde...'; - }, - formatRecordsPerPage: function (pageNumber) { - return pageNumber + ' registos por página'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return 'A mostrar ' + pageFrom + ' até ' + pageTo + ' de ' + totalRows + ' linhas'; - }, - formatSearch: function () { - return 'Pesquisa'; - }, - formatNoMatches: function () { - return 'Nenhum registo encontrado'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['pt-PT']); - -})(jQuery); - -/** - * Bootstrap Table Romanian translation - * Author: cristake - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['ro-RO'] = { - formatLoadingMessage: function () { - return 'Se incarca, va rugam asteptati...'; - }, - formatRecordsPerPage: function (pageNumber) { - return pageNumber + ' inregistrari pe pagina'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return 'Arata de la ' + pageFrom + ' pana la ' + pageTo + ' din ' + totalRows + ' randuri'; - }, - formatSearch: function () { - return 'Cauta'; - }, - formatNoMatches: function () { - return 'Nu au fost gasite inregistrari'; - }, - formatPaginationSwitch: function () { - return 'Ascunde/Arata paginatia'; - }, - formatRefresh: function () { - return 'Reincarca'; - }, - formatToggle: function () { - return 'Comuta'; - }, - formatColumns: function () { - return 'Coloane'; - }, - formatAllRows: function () { - return 'Toate'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['ro-RO']); - -})(jQuery); -/** - * Bootstrap Table Russian translation - * Author: Dunaevsky Maxim - */ -(function ($) { - 'use strict'; - $.fn.bootstrapTable.locales['ru-RU'] = { - formatLoadingMessage: function () { - return 'Пожалуйста, подождите, идёт загрузка...'; - }, - formatRecordsPerPage: function (pageNumber) { - return pageNumber + ' записей на страницу'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return 'Записи с ' + pageFrom + ' по ' + pageTo + ' из ' + totalRows; - }, - formatSearch: function () { - return 'Поиск'; - }, - formatNoMatches: function () { - return 'Ничего не найдено'; - }, - formatRefresh: function () { - return 'Обновить'; - }, - formatToggle: function () { - return 'Переключить'; - }, - formatColumns: function () { - return 'Колонки'; - }, - formatClearFilters: function () { - return 'Очистить фильтры'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['ru-RU']); - -})(jQuery); - -/** - * Bootstrap Table Slovak translation - * Author: Jozef Dúc - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['sk-SK'] = { - formatLoadingMessage: function () { - return 'Prosím čakajte ...'; - }, - formatRecordsPerPage: function (pageNumber) { - return pageNumber + ' záznamov na stranu'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return 'Zobrazená ' + pageFrom + '. - ' + pageTo + '. položka z celkových ' + totalRows; - }, - formatSearch: function () { - return 'Vyhľadávanie'; - }, - formatNoMatches: function () { - return 'Nenájdená žiadna vyhovujúca položka'; - }, - formatRefresh: function () { - return 'Obnoviť'; - }, - formatToggle: function () { - return 'Prepni'; - }, - formatColumns: function () { - return 'Stĺpce'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['sk-SK']); - -})(jQuery); - -/** - * Bootstrap Table Swedish translation - * Author: C Bratt - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['sv-SE'] = { - formatLoadingMessage: function () { - return 'Laddar, vänligen vänta...'; - }, - formatRecordsPerPage: function (pageNumber) { - return pageNumber + ' rader per sida'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return 'Visa ' + pageFrom + ' till ' + pageTo + ' av ' + totalRows + ' rader'; - }, - formatSearch: function () { - return 'Sök'; - }, - formatNoMatches: function () { - return 'Inga matchande resultat funna.'; - }, - formatRefresh: function () { - return 'Uppdatera'; - }, - formatToggle: function () { - return 'Skifta'; - }, - formatColumns: function () { - return 'kolumn'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['sv-SE']); - -})(jQuery); - -/** - * Bootstrap Table Thai translation - * Author: Monchai S. - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['th-TH'] = { - formatLoadingMessage: function () { - return 'กำลังโหลดข้อมูล, กรุณารอสักครู่...'; - }, - formatRecordsPerPage: function (pageNumber) { - return pageNumber + ' รายการต่อหน้า'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return 'รายการที่ ' + pageFrom + ' ถึง ' + pageTo + ' จากทั้งหมด ' + totalRows + ' รายการ'; - }, - formatSearch: function () { - return 'ค้นหา'; - }, - formatNoMatches: function () { - return 'ไม่พบรายการที่ค้นหา !'; - }, - formatRefresh: function () { - return 'รีเฟรส'; - }, - formatToggle: function () { - return 'สลับมุมมอง'; - }, - formatColumns: function () { - return 'คอลัมน์'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['th-TH']); - -})(jQuery); - -/** - * Bootstrap Table Turkish translation - * Author: Emin Şen - * Author: Sercan Cakir - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['tr-TR'] = { - formatLoadingMessage: function () { - return 'Yükleniyor, lütfen bekleyin...'; - }, - formatRecordsPerPage: function (pageNumber) { - return 'Sayfa başına ' + pageNumber + ' kayıt.'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return totalRows + ' kayıttan ' + pageFrom + '-' + pageTo + ' arası gösteriliyor.'; - }, - formatSearch: function () { - return 'Ara'; - }, - formatNoMatches: function () { - return 'Eşleşen kayıt bulunamadı.'; - }, - formatRefresh: function () { - return 'Yenile'; - }, - formatToggle: function () { - return 'Değiştir'; - }, - formatColumns: function () { - return 'Sütunlar'; - }, - formatAllRows: function () { - return 'Tüm Satırlar'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['tr-TR']); - -})(jQuery); - -/** - * Bootstrap Table Ukrainian translation - * Author: Vitaliy Timchenko - */ - (function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['uk-UA'] = { - formatLoadingMessage: function () { - return 'Завантаження, будь ласка, зачекайте...'; - }, - formatRecordsPerPage: function (pageNumber) { - return pageNumber + ' записів на сторінку'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return 'Показано з ' + pageFrom + ' по ' + pageTo + '. Всього: ' + totalRows; - }, - formatSearch: function () { - return 'Пошук'; - }, - formatNoMatches: function () { - return 'Не знайдено жодного запису'; - }, - formatRefresh: function () { - return 'Оновити'; - }, - formatToggle: function () { - return 'Змінити'; - }, - formatColumns: function () { - return 'Стовпці'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['uk-UA']); - -})(jQuery); - -/** - * Bootstrap Table Urdu translation - * Author: Malik - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['ur-PK'] = { - formatLoadingMessage: function () { - return 'براۓ مہربانی انتظار کیجئے'; - }, - formatRecordsPerPage: function (pageNumber) { - return pageNumber + ' ریکارڈز فی صفہ '; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return 'دیکھیں ' + pageFrom + ' سے ' + pageTo + ' کے ' + totalRows + 'ریکارڈز'; - }, - formatSearch: function () { - return 'تلاش'; - }, - formatNoMatches: function () { - return 'کوئی ریکارڈ نہیں ملا'; - }, - formatRefresh: function () { - return 'تازہ کریں'; - }, - formatToggle: function () { - return 'تبدیل کریں'; - }, - formatColumns: function () { - return 'کالم'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['ur-PK']); - -})(jQuery); - -/** - * Bootstrap Table Vietnamese translation - * Author: Duc N. PHAM - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['vi-VN'] = { - formatLoadingMessage: function () { - return 'Đang tải...'; - }, - formatRecordsPerPage: function (pageNumber) { - return pageNumber + ' bản ghi mỗi trang'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return 'Hiển thị từ trang ' + pageFrom + ' đến ' + pageTo + ' của ' + totalRows + ' bảng ghi'; - }, - formatSearch: function () { - return 'Tìm kiếm'; - }, - formatNoMatches: function () { - return 'Không có dữ liệu'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['vi-VN']); - -})(jQuery); -/** - * Bootstrap Table Chinese translation - * Author: Zhixin Wen - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['zh-CN'] = { - formatLoadingMessage: function () { - return '正在努力地加载数据中,请稍候……'; - }, - formatRecordsPerPage: function (pageNumber) { - return '每页显示 ' + pageNumber + ' 条记录'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return '显示第 ' + pageFrom + ' 到第 ' + pageTo + ' 条记录,总共 ' + totalRows + ' 条记录'; - }, - formatSearch: function () { - return '搜索'; - }, - formatNoMatches: function () { - return '没有找到匹配的记录'; - }, - formatPaginationSwitch: function () { - return '隐藏/显示分页'; - }, - formatRefresh: function () { - return '刷新'; - }, - formatToggle: function () { - return '切换'; - }, - formatColumns: function () { - return '列'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['zh-CN']); - -})(jQuery); -/** - * Bootstrap Table Chinese translation - * Author: Zhixin Wen - */ -(function ($) { - 'use strict'; - - $.fn.bootstrapTable.locales['zh-TW'] = { - formatLoadingMessage: function () { - return '正在努力地載入資料,請稍候……'; - }, - formatRecordsPerPage: function (pageNumber) { - return '每頁顯示 ' + pageNumber + ' 項記錄'; - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return '顯示第 ' + pageFrom + ' 到第 ' + pageTo + ' 項記錄,總共 ' + totalRows + ' 項記錄'; - }, - formatSearch: function () { - return '搜尋'; - }, - formatNoMatches: function () { - return '沒有找到符合的結果'; - }, - formatPaginationSwitch: function () { - return '隱藏/顯示分頁'; - }, - formatRefresh: function () { - return '重新整理'; - }, - formatToggle: function () { - return '切換'; - }, - formatColumns: function () { - return '列'; - } - }; - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales['zh-TW']); - -})(jQuery); diff --git a/resources/assets/js/bootstrap-table-locale-all.min.js b/resources/assets/js/bootstrap-table-locale-all.min.js deleted file mode 100755 index 38d47669de..0000000000 --- a/resources/assets/js/bootstrap-table-locale-all.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/* -* bootstrap-table - v1.10.1 - 2016-02-17 -* https://github.com/wenzhixin/bootstrap-table -* Copyright (c) 2016 zhixin wen -* Licensed MIT License -*/ -!function(a){"use strict";a.fn.bootstrapTable.locales["af-ZA"]={formatLoadingMessage:function(){return"Besig om te laai, wag asseblief ..."},formatRecordsPerPage:function(a){return a+" rekords per bladsy"},formatShowingRows:function(a,b,c){return"Resultate "+a+" tot "+b+" van "+c+" rye"},formatSearch:function(){return"Soek"},formatNoMatches:function(){return"Geen rekords gevind nie"},formatPaginationSwitch:function(){return"Wys/verberg bladsy nummering"},formatRefresh:function(){return"Herlaai"},formatToggle:function(){return"Wissel"},formatColumns:function(){return"Kolomme"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["af-ZA"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["ar-SA"]={formatLoadingMessage:function(){return"جاري التحميل, يرجى الإنتظار..."},formatRecordsPerPage:function(a){return a+" سجل لكل صفحة"},formatShowingRows:function(a,b,c){return"الظاهر "+a+" إلى "+b+" من "+c+" سجل"},formatSearch:function(){return"بحث"},formatNoMatches:function(){return"لا توجد نتائج مطابقة للبحث"},formatPaginationSwitch:function(){return"إخفاءإظهار ترقيم الصفحات"},formatRefresh:function(){return"تحديث"},formatToggle:function(){return"تغيير"},formatColumns:function(){return"أعمدة"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["ar-SA"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["ca-ES"]={formatLoadingMessage:function(){return"Espereu, si us plau..."},formatRecordsPerPage:function(a){return a+" resultats per pàgina"},formatShowingRows:function(a,b,c){return"Mostrant de "+a+" fins "+b+" - total "+c+" resultats"},formatSearch:function(){return"Cerca"},formatNoMatches:function(){return"No s'han trobat resultats"},formatPaginationSwitch:function(){return"Amaga/Mostra paginació"},formatRefresh:function(){return"Refresca"},formatToggle:function(){return"Alterna formatació"},formatColumns:function(){return"Columnes"},formatAllRows:function(){return"Tots"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["ca-ES"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["cs-CZ"]={formatLoadingMessage:function(){return"Čekejte, prosím..."},formatRecordsPerPage:function(a){return a+" položek na stránku"},formatShowingRows:function(a,b,c){return"Zobrazena "+a+". - "+b+". položka z celkových "+c},formatSearch:function(){return"Vyhledávání"},formatNoMatches:function(){return"Nenalezena žádná vyhovující položka"},formatPaginationSwitch:function(){return"Skrýt/Zobrazit stránkování"},formatRefresh:function(){return"Aktualizovat"},formatToggle:function(){return"Přepni"},formatColumns:function(){return"Sloupce"},formatAllRows:function(){return"Vše"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["cs-CZ"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["da-DK"]={formatLoadingMessage:function(){return"Indlæser, vent venligst..."},formatRecordsPerPage:function(a){return a+" poster pr side"},formatShowingRows:function(a,b,c){return"Viser "+a+" til "+b+" af "+c+" rækker"},formatSearch:function(){return"Søg"},formatNoMatches:function(){return"Ingen poster fundet"},formatRefresh:function(){return"Opdater"},formatToggle:function(){return"Skift"},formatColumns:function(){return"Kolonner"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["da-DK"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["de-DE"]={formatLoadingMessage:function(){return"Lade, bitte warten..."},formatRecordsPerPage:function(a){return a+" Einträge pro Seite"},formatShowingRows:function(a,b,c){return"Zeige "+a+" bis "+b+" von "+c+" Zeile"+(c>1?"n":"")},formatSearch:function(){return"Suchen"},formatNoMatches:function(){return"Keine passenden Ergebnisse gefunden"},formatRefresh:function(){return"Neu laden"},formatToggle:function(){return"Umschalten"},formatColumns:function(){return"Spalten"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["de-DE"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["el-GR"]={formatLoadingMessage:function(){return"Φορτώνει, παρακαλώ περιμένετε..."},formatRecordsPerPage:function(a){return a+" αποτελέσματα ανά σελίδα"},formatShowingRows:function(a,b,c){return"Εμφανίζονται από την "+a+" ως την "+b+" από σύνολο "+c+" σειρών"},formatSearch:function(){return"Αναζητήστε"},formatNoMatches:function(){return"Δεν βρέθηκαν αποτελέσματα"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["el-GR"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["en-US"]={formatLoadingMessage:function(){return"Loading, please wait..."},formatRecordsPerPage:function(a){return a+" rows per page"},formatShowingRows:function(a,b,c){return"Showing "+a+" to "+b+" of "+c+" rows"},formatSearch:function(){return"Search"},formatNoMatches:function(){return"No matching records found"},formatPaginationSwitch:function(){return"Hide/Show pagination"},formatRefresh:function(){return"Refresh"},formatToggle:function(){return"Toggle"},formatColumns:function(){return"Columns"},formatAllRows:function(){return"All"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["en-US"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["es-AR"]={formatLoadingMessage:function(){return"Cargando, espere por favor..."},formatRecordsPerPage:function(a){return a+" registros por página"},formatShowingRows:function(a,b,c){return"Mostrando "+a+" a "+b+" de "+c+" filas"},formatSearch:function(){return"Buscar"},formatNoMatches:function(){return"No se encontraron registros"},formatAllRows:function(){return"Todo"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["es-AR"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["es-CR"]={formatLoadingMessage:function(){return"Cargando, por favor espere..."},formatRecordsPerPage:function(a){return a+" registros por página"},formatShowingRows:function(a,b,c){return"Mostrando de "+a+" a "+b+" registros de "+c+" registros en total"},formatSearch:function(){return"Buscar"},formatNoMatches:function(){return"No se encontraron registros"},formatRefresh:function(){return"Refrescar"},formatToggle:function(){return"Alternar"},formatColumns:function(){return"Columnas"},formatAllRows:function(){return"Todo"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["es-CR"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["es-ES"]={formatLoadingMessage:function(){return"Por favor espere..."},formatRecordsPerPage:function(a){return a+" resultados por página"},formatShowingRows:function(a,b,c){return"Mostrando desde "+a+" hasta "+b+" - En total "+c+" resultados"},formatSearch:function(){return"Buscar"},formatNoMatches:function(){return"No se encontraron resultados"},formatPaginationSwitch:function(){return"Ocultar/Mostrar paginación"},formatRefresh:function(){return"Refrescar"},formatToggle:function(){return"Ocultar/Mostrar"},formatColumns:function(){return"Columnas"},formatAllRows:function(){return"Todos"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["es-ES"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["es-MX"]={formatLoadingMessage:function(){return"Cargando, espere por favor..."},formatRecordsPerPage:function(a){return a+" registros por página"},formatShowingRows:function(a,b,c){return"Mostrando "+a+" a "+b+" de "+c+" filas"},formatSearch:function(){return"Buscar"},formatNoMatches:function(){return"No se encontraron registros"},formatAllRows:function(){return"Todo"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["es-MX"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["es-NI"]={formatLoadingMessage:function(){return"Cargando, por favor espere..."},formatRecordsPerPage:function(a){return a+" registros por página"},formatShowingRows:function(a,b,c){return"Mostrando de "+a+" a "+b+" registros de "+c+" registros en total"},formatSearch:function(){return"Buscar"},formatNoMatches:function(){return"No se encontraron registros"},formatRefresh:function(){return"Refrescar"},formatToggle:function(){return"Alternar"},formatColumns:function(){return"Columnas"},formatAllRows:function(){return"Todo"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["es-NI"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["es-SP"]={formatLoadingMessage:function(){return"Cargando, por favor espera..."},formatRecordsPerPage:function(a){return a+" registros por página."},formatShowingRows:function(a,b,c){return a+" - "+b+" de "+c+" registros."},formatSearch:function(){return"Buscar"},formatNoMatches:function(){return"No se han encontrado registros."},formatRefresh:function(){return"Actualizar"},formatToggle:function(){return"Alternar"},formatColumns:function(){return"Columnas"},formatAllRows:function(){return"Todo"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["es-SP"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["et-EE"]={formatLoadingMessage:function(){return"Päring käib, palun oota..."},formatRecordsPerPage:function(a){return a+" rida lehe kohta"},formatShowingRows:function(a,b,c){return"Näitan tulemusi "+a+" kuni "+b+" - kokku "+c+" tulemust"},formatSearch:function(){return"Otsi"},formatNoMatches:function(){return"Päringu tingimustele ei vastanud ühtegi tulemust"},formatPaginationSwitch:function(){return"Näita/Peida lehtedeks jagamine"},formatRefresh:function(){return"Värskenda"},formatToggle:function(){return"Lülita"},formatColumns:function(){return"Veerud"},formatAllRows:function(){return"Kõik"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["et-EE"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["fa-IR"]={formatLoadingMessage:function(){return"در حال بارگذاری, لطفا صبر کنید..."},formatRecordsPerPage:function(a){return a+" رکورد در صفحه"},formatShowingRows:function(a,b,c){return"نمایش "+a+" تا "+b+" از "+c+" ردیف"},formatSearch:function(){return"جستجو"},formatNoMatches:function(){return"رکوردی یافت نشد."},formatPaginationSwitch:function(){return"نمایش/مخفی صفحه بندی"},formatRefresh:function(){return"به روز رسانی"},formatToggle:function(){return"تغییر نمایش"},formatColumns:function(){return"سطر ها"},formatAllRows:function(){return"همه"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["fa-IR"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["fr-BE"]={formatLoadingMessage:function(){return"Chargement en cours..."},formatRecordsPerPage:function(a){return a+" entrées par page"},formatShowingRows:function(a,b,c){return"Affiche de"+a+" à "+b+" sur "+c+" lignes"},formatSearch:function(){return"Recherche"},formatNoMatches:function(){return"Pas de fichiers trouvés"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["fr-BE"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["fr-FR"]={formatLoadingMessage:function(){return"Chargement en cours, patientez, s´il vous plaît ..."},formatRecordsPerPage:function(a){return a+" lignes par page"},formatShowingRows:function(a,b,c){return"Affichage des lignes "+a+" à "+b+" sur "+c+" lignes au total"},formatSearch:function(){return"Rechercher"},formatNoMatches:function(){return"Aucun résultat trouvé"},formatRefresh:function(){return"Rafraîchir"},formatToggle:function(){return"Alterner"},formatColumns:function(){return"Colonnes"},formatAllRows:function(){return"Tous"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["fr-FR"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["he-IL"]={formatLoadingMessage:function(){return"טוען, נא להמתין..."},formatRecordsPerPage:function(a){return a+" שורות בעמוד"},formatShowingRows:function(a,b,c){return"מציג "+a+" עד "+b+" מ-"+c+" שורות"},formatSearch:function(){return"חיפוש"},formatNoMatches:function(){return"לא נמצאו רשומות תואמות"},formatPaginationSwitch:function(){return"הסתר/הצג מספור דפים"},formatRefresh:function(){return"רענן"},formatToggle:function(){return"החלף תצוגה"},formatColumns:function(){return"עמודות"},formatAllRows:function(){return"הכל"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["he-IL"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["hr-HR"]={formatLoadingMessage:function(){return"Molimo pričekajte ..."},formatRecordsPerPage:function(a){return a+" broj zapisa po stranici"},formatShowingRows:function(a,b,c){return"Prikazujem "+a+". - "+b+". od ukupnog broja zapisa "+c},formatSearch:function(){return"Pretraži"},formatNoMatches:function(){return"Nije pronađen niti jedan zapis"},formatPaginationSwitch:function(){return"Prikaži/sakrij stranice"},formatRefresh:function(){return"Osvježi"},formatToggle:function(){return"Promijeni prikaz"},formatColumns:function(){return"Kolone"},formatAllRows:function(){return"Sve"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["hr-HR"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["hu-HU"]={formatLoadingMessage:function(){return"Betöltés, kérem várjon..."},formatRecordsPerPage:function(a){return a+" rekord per oldal"},formatShowingRows:function(a,b,c){return"Megjelenítve "+a+" - "+b+" / "+c+" összesen"},formatSearch:function(){return"Keresés"},formatNoMatches:function(){return"Nincs találat"},formatPaginationSwitch:function(){return"Lapozó elrejtése/megjelenítése"},formatRefresh:function(){return"Frissítés"},formatToggle:function(){return"Összecsuk/Kinyit"},formatColumns:function(){return"Oszlopok"},formatAllRows:function(){return"Összes"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["hu-HU"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["it-IT"]={formatLoadingMessage:function(){return"Caricamento in corso..."},formatRecordsPerPage:function(a){return a+" elementi per pagina"},formatShowingRows:function(a,b,c){return"Pagina "+a+" di "+b+" ("+c+" records)"},formatSearch:function(){return"Cerca"},formatNoMatches:function(){return"Nessun elemento trovato"},formatRefresh:function(){return"Aggiorna"},formatToggle:function(){return"Alterna"},formatColumns:function(){return"Colonne"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["it-IT"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["ja-JP"]={formatLoadingMessage:function(){return"読み込み中です。少々お待ちください。"},formatRecordsPerPage:function(a){return"ページ当たり最大"+a+"件"},formatShowingRows:function(a,b,c){return"全"+c+"件から、"+a+"から"+b+"件目まで表示しています"},formatSearch:function(){return"検索"},formatNoMatches:function(){return"該当するレコードが見つかりません"},formatPaginationSwitch:function(){return"ページ数を表示・非表示"},formatRefresh:function(){return"更新"},formatToggle:function(){return"トグル"},formatColumns:function(){return"列"},formatAllRows:function(){return"すべて"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["ja-JP"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["ka-GE"]={formatLoadingMessage:function(){return"იტვირთება, გთხოვთ მოიცადოთ..."},formatRecordsPerPage:function(a){return a+" ჩანაწერი თითო გვერდზე"},formatShowingRows:function(a,b,c){return"ნაჩვენებია "+a+"-დან "+b+"-მდე ჩანაწერი ჯამური "+c+"-დან"},formatSearch:function(){return"ძებნა"},formatNoMatches:function(){return"მონაცემები არ არის"},formatPaginationSwitch:function(){return"გვერდების გადამრთველის დამალვა/გამოჩენა"},formatRefresh:function(){return"განახლება"},formatToggle:function(){return"ჩართვა/გამორთვა"},formatColumns:function(){return"სვეტები"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["ka-GE"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["ko-KR"]={formatLoadingMessage:function(){return"데이터를 불러오는 중입니다..."},formatRecordsPerPage:function(a){return"페이지 당 "+a+"개 데이터 출력"},formatShowingRows:function(a,b,c){return"전체 "+c+"개 중 "+a+"~"+b+"번째 데이터 출력,"},formatSearch:function(){return"검색"},formatNoMatches:function(){return"조회된 데이터가 없습니다."},formatRefresh:function(){return"새로 고침"},formatToggle:function(){return"전환"},formatColumns:function(){return"컬럼 필터링"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["ko-KR"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["ms-MY"]={formatLoadingMessage:function(){return"Permintaan sedang dimuatkan. Sila tunggu sebentar..."},formatRecordsPerPage:function(a){return a+" rekod setiap muka surat"},formatShowingRows:function(a,b,c){return"Sedang memaparkan rekod "+a+" hingga "+b+" daripada jumlah "+c+" rekod"},formatSearch:function(){return"Cari"},formatNoMatches:function(){return"Tiada rekod yang menyamai permintaan"},formatPaginationSwitch:function(){return"Tunjuk/sembunyi muka surat"},formatRefresh:function(){return"Muatsemula"},formatToggle:function(){return"Tukar"},formatColumns:function(){return"Lajur"},formatAllRows:function(){return"Semua"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["ms-MY"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["nb-NO"]={formatLoadingMessage:function(){return"Oppdaterer, vennligst vent..."},formatRecordsPerPage:function(a){return a+" poster pr side"},formatShowingRows:function(a,b,c){return"Viser "+a+" til "+b+" av "+c+" rekker"},formatSearch:function(){return"Søk"},formatNoMatches:function(){return"Ingen poster funnet"},formatRefresh:function(){return"Oppdater"},formatToggle:function(){return"Endre"},formatColumns:function(){return"Kolonner"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["nb-NO"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["nl-NL"]={formatLoadingMessage:function(){return"Laden, even geduld..."},formatRecordsPerPage:function(a){return a+" records per pagina"},formatShowingRows:function(a,b,c){return"Toon "+a+" tot "+b+" van "+c+" record"+(c>1?"s":"")},formatDetailPagination:function(a){return"Toon "+a+" record"+(a>1?"s":"")},formatSearch:function(){return"Zoeken"},formatNoMatches:function(){return"Geen resultaten gevonden"},formatRefresh:function(){return"Vernieuwen"},formatToggle:function(){return"Omschakelen"},formatColumns:function(){return"Kolommen"},formatAllRows:function(){return"Alle"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["nl-NL"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["pl-PL"]={formatLoadingMessage:function(){return"Ładowanie, proszę czekać..."},formatRecordsPerPage:function(a){return a+" rekordów na stronę"},formatShowingRows:function(a,b,c){return"Wyświetlanie rekordów od "+a+" do "+b+" z "+c},formatSearch:function(){return"Szukaj"},formatNoMatches:function(){return"Niestety, nic nie znaleziono"},formatRefresh:function(){return"Odśwież"},formatToggle:function(){return"Przełącz"},formatColumns:function(){return"Kolumny"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["pl-PL"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["pt-BR"]={formatLoadingMessage:function(){return"Carregando, aguarde..."},formatRecordsPerPage:function(a){return a+" registros por página"},formatShowingRows:function(a,b,c){return"Exibindo "+a+" até "+b+" de "+c+" linhas"},formatSearch:function(){return"Pesquisar"},formatRefresh:function(){return"Recarregar"},formatToggle:function(){return"Alternar"},formatColumns:function(){return"Colunas"},formatPaginationSwitch:function(){return"Ocultar/Exibir paginação"},formatNoMatches:function(){return"Nenhum registro encontrado"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["pt-BR"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["pt-PT"]={formatLoadingMessage:function(){return"A carregar, aguarde..."},formatRecordsPerPage:function(a){return a+" registos por página"},formatShowingRows:function(a,b,c){return"A mostrar "+a+" até "+b+" de "+c+" linhas"},formatSearch:function(){return"Pesquisa"},formatNoMatches:function(){return"Nenhum registo encontrado"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["pt-PT"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["ro-RO"]={formatLoadingMessage:function(){return"Se incarca, va rugam asteptati..."},formatRecordsPerPage:function(a){return a+" inregistrari pe pagina"},formatShowingRows:function(a,b,c){return"Arata de la "+a+" pana la "+b+" din "+c+" randuri"},formatSearch:function(){return"Cauta"},formatNoMatches:function(){return"Nu au fost gasite inregistrari"},formatPaginationSwitch:function(){return"Ascunde/Arata paginatia"},formatRefresh:function(){return"Reincarca"},formatToggle:function(){return"Comuta"},formatColumns:function(){return"Coloane"},formatAllRows:function(){return"Toate"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["ro-RO"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["ru-RU"]={formatLoadingMessage:function(){return"Пожалуйста, подождите, идёт загрузка..."},formatRecordsPerPage:function(a){return a+" записей на страницу"},formatShowingRows:function(a,b,c){return"Записи с "+a+" по "+b+" из "+c},formatSearch:function(){return"Поиск"},formatNoMatches:function(){return"Ничего не найдено"},formatRefresh:function(){return"Обновить"},formatToggle:function(){return"Переключить"},formatColumns:function(){return"Колонки"},formatClearFilters:function(){return"Очистить фильтры"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["ru-RU"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["sk-SK"]={formatLoadingMessage:function(){return"Prosím čakajte ..."},formatRecordsPerPage:function(a){return a+" záznamov na stranu"},formatShowingRows:function(a,b,c){return"Zobrazená "+a+". - "+b+". položka z celkových "+c},formatSearch:function(){return"Vyhľadávanie"},formatNoMatches:function(){return"Nenájdená žiadna vyhovujúca položka"},formatRefresh:function(){return"Obnoviť"},formatToggle:function(){return"Prepni"},formatColumns:function(){return"Stĺpce"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["sk-SK"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["sv-SE"]={formatLoadingMessage:function(){return"Laddar, vänligen vänta..."},formatRecordsPerPage:function(a){return a+" rader per sida"},formatShowingRows:function(a,b,c){return"Visa "+a+" till "+b+" av "+c+" rader"},formatSearch:function(){return"Sök"},formatNoMatches:function(){return"Inga matchande resultat funna."},formatRefresh:function(){return"Uppdatera"},formatToggle:function(){return"Skifta"},formatColumns:function(){return"kolumn"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["sv-SE"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["th-TH"]={formatLoadingMessage:function(){return"กำลังโหลดข้อมูล, กรุณารอสักครู่..."},formatRecordsPerPage:function(a){return a+" รายการต่อหน้า"},formatShowingRows:function(a,b,c){return"รายการที่ "+a+" ถึง "+b+" จากทั้งหมด "+c+" รายการ"},formatSearch:function(){return"ค้นหา"},formatNoMatches:function(){return"ไม่พบรายการที่ค้นหา !"},formatRefresh:function(){return"รีเฟรส"},formatToggle:function(){return"สลับมุมมอง"},formatColumns:function(){return"คอลัมน์"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["th-TH"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["tr-TR"]={formatLoadingMessage:function(){return"Yükleniyor, lütfen bekleyin..."},formatRecordsPerPage:function(a){return"Sayfa başına "+a+" kayıt."},formatShowingRows:function(a,b,c){return c+" kayıttan "+a+"-"+b+" arası gösteriliyor."},formatSearch:function(){return"Ara"},formatNoMatches:function(){return"Eşleşen kayıt bulunamadı."},formatRefresh:function(){return"Yenile"},formatToggle:function(){return"Değiştir"},formatColumns:function(){return"Sütunlar"},formatAllRows:function(){return"Tüm Satırlar"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["tr-TR"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["uk-UA"]={formatLoadingMessage:function(){return"Завантаження, будь ласка, зачекайте..."},formatRecordsPerPage:function(a){return a+" записів на сторінку"},formatShowingRows:function(a,b,c){return"Показано з "+a+" по "+b+". Всього: "+c},formatSearch:function(){return"Пошук"},formatNoMatches:function(){return"Не знайдено жодного запису"},formatRefresh:function(){return"Оновити"},formatToggle:function(){return"Змінити"},formatColumns:function(){return"Стовпці"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["uk-UA"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["ur-PK"]={formatLoadingMessage:function(){return"براۓ مہربانی انتظار کیجئے"},formatRecordsPerPage:function(a){return a+" ریکارڈز فی صفہ "},formatShowingRows:function(a,b,c){return"دیکھیں "+a+" سے "+b+" کے "+c+"ریکارڈز"},formatSearch:function(){return"تلاش"},formatNoMatches:function(){return"کوئی ریکارڈ نہیں ملا"},formatRefresh:function(){return"تازہ کریں"},formatToggle:function(){return"تبدیل کریں"},formatColumns:function(){return"کالم"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["ur-PK"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["vi-VN"]={formatLoadingMessage:function(){return"Đang tải..."},formatRecordsPerPage:function(a){return a+" bản ghi mỗi trang"},formatShowingRows:function(a,b,c){return"Hiển thị từ trang "+a+" đến "+b+" của "+c+" bảng ghi"},formatSearch:function(){return"Tìm kiếm"},formatNoMatches:function(){return"Không có dữ liệu"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["vi-VN"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["zh-CN"]={formatLoadingMessage:function(){return"正在努力地加载数据中,请稍候……"},formatRecordsPerPage:function(a){return"每页显示 "+a+" 条记录"},formatShowingRows:function(a,b,c){return"显示第 "+a+" 到第 "+b+" 条记录,总共 "+c+" 条记录"},formatSearch:function(){return"搜索"},formatNoMatches:function(){return"没有找到匹配的记录"},formatPaginationSwitch:function(){return"隐藏/显示分页"},formatRefresh:function(){return"刷新"},formatToggle:function(){return"切换"},formatColumns:function(){return"列"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["zh-CN"])}(jQuery),function(a){"use strict";a.fn.bootstrapTable.locales["zh-TW"]={formatLoadingMessage:function(){return"正在努力地載入資料,請稍候……"},formatRecordsPerPage:function(a){return"每頁顯示 "+a+" 項記錄"},formatShowingRows:function(a,b,c){return"顯示第 "+a+" 到第 "+b+" 項記錄,總共 "+c+" 項記錄"},formatSearch:function(){return"搜尋"},formatNoMatches:function(){return"沒有找到符合的結果"},formatPaginationSwitch:function(){return"隱藏/顯示分頁"},formatRefresh:function(){return"重新整理"},formatToggle:function(){return"切換"},formatColumns:function(){return"列"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["zh-TW"])}(jQuery); \ No newline at end of file diff --git a/resources/assets/js/bootstrap-table.css b/resources/assets/js/bootstrap-table.css deleted file mode 100755 index b557667625..0000000000 --- a/resources/assets/js/bootstrap-table.css +++ /dev/null @@ -1,302 +0,0 @@ -/** - * @author zhixin wen - * version: 1.10.1 - * https://github.com/wenzhixin/bootstrap-table/ - */ - -.bootstrap-table .table { - margin-bottom: 0 !important; - border-bottom: 1px solid #dddddd; - border-collapse: collapse !important; - border-radius: 1px; -} - -.bootstrap-table .table:not(.table-condensed), -.bootstrap-table .table:not(.table-condensed) > tbody > tr > th, -.bootstrap-table .table:not(.table-condensed) > tfoot > tr > th, -.bootstrap-table .table:not(.table-condensed) > thead > tr > td, -.bootstrap-table .table:not(.table-condensed) > tbody > tr > td, -.bootstrap-table .table:not(.table-condensed) > tfoot > tr > td { - padding: 8px; -} - -.bootstrap-table .table.table-no-bordered > thead > tr > th, -.bootstrap-table .table.table-no-bordered > tbody > tr > td { - border-right: 2px solid transparent; -} - -.fixed-table-container { - position: relative; - clear: both; - border: 1px solid #dddddd; - border-radius: 4px; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; -} - -.fixed-table-container.table-no-bordered { - border: 1px solid transparent; -} - -.fixed-table-footer, -.fixed-table-header { - overflow: hidden; -} - -.fixed-table-footer { - border-top: 1px solid #dddddd; -} - -.fixed-table-body { - overflow-x: auto; - overflow-y: auto; - height: 100%; -} - -.fixed-table-container table { - width: 100%; -} - -.fixed-table-container thead th { - height: 0; - padding: 0; - margin: 0; - border-left: 1px solid #dddddd; -} - -.fixed-table-container thead th:focus { - outline: 0 solid transparent; -} - -.fixed-table-container thead th:first-child { - border-left: none; - border-top-left-radius: 4px; - -webkit-border-top-left-radius: 4px; - -moz-border-radius-topleft: 4px; -} - -.fixed-table-container thead th .th-inner, -.fixed-table-container tbody td .th-inner { - padding: 8px; - line-height: 24px; - vertical-align: top; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.fixed-table-container thead th .sortable { - cursor: pointer; - background-position: right; - background-repeat: no-repeat; - padding-right: 30px; -} - -.fixed-table-container thead th .both { - background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAkElEQVQoz7X QMQ5AQBCF4dWQSJxC5wwax1Cq1e7BAdxD5SL+Tq/QCM1oNiJidwox0355mXnG/DrEtIQ6azioNZQxI0ykPhTQIwhCR+BmBYtlK7kLJYwWCcJA9M4qdrZrd8pPjZWPtOqdRQy320YSV17OatFC4euts6z39GYMKRPCTKY9UnPQ6P+GtMRfGtPnBCiqhAeJPmkqAAAAAElFTkSuQmCC'); -} - -.fixed-table-container thead th .asc { - background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZ0lEQVQ4y2NgGLKgquEuFxBPAGI2ahhWCsS/gDibUoO0gPgxEP8H4ttArEyuQYxAPBdqEAxPBImTY5gjEL9DM+wTENuQahAvEO9DMwiGdwAxOymGJQLxTyD+jgWDxCMZRsEoGAVoAADeemwtPcZI2wAAAABJRU5ErkJggg=='); -} - -.fixed-table-container thead th .desc { - background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZUlEQVQ4y2NgGAWjYBSggaqGu5FA/BOIv2PBIPFEUgxjB+IdQPwfC94HxLykus4GiD+hGfQOiB3J8SojEE9EM2wuSJzcsFMG4ttQgx4DsRalkZENxL+AuJQaMcsGxBOAmGvopk8AVz1sLZgg0bsAAAAASUVORK5CYII= '); -} - -.fixed-table-container th.detail { - width: 30px; -} - -.fixed-table-container tbody td { - border-left: 1px solid #dddddd; -} - -.fixed-table-container tbody tr:first-child td { - border-top: none; -} - -.fixed-table-container tbody td:first-child { - border-left: none; -} - -/* the same color with .active */ -.fixed-table-container tbody .selected td { - background-color: #f5f5f5; -} - -.fixed-table-container .bs-checkbox { - text-align: center; -} - -.fixed-table-container .bs-checkbox .th-inner { - padding: 8px 0; -} - -.fixed-table-container input[type="radio"], -.fixed-table-container input[type="checkbox"] { - margin: 0 auto !important; -} - -.fixed-table-container .no-records-found { - text-align: center; -} - -.fixed-table-pagination div.pagination, -.fixed-table-pagination .pagination-detail { - margin-top: 10px; - margin-bottom: 10px; -} - -.fixed-table-pagination div.pagination .pagination { - margin: 0; -} - -.fixed-table-pagination .pagination a { - padding: 6px 12px; - line-height: 1.428571429; -} - -.fixed-table-pagination .pagination-info { - line-height: 34px; - margin-right: 5px; -} - -.fixed-table-pagination .btn-group { - position: relative; - display: inline-block; - vertical-align: middle; -} - -.fixed-table-pagination .dropup .dropdown-menu { - margin-bottom: 0; -} - -.fixed-table-pagination .page-list { - display: inline-block; -} - -.fixed-table-toolbar .columns-left { - margin-right: 5px; -} - -.fixed-table-toolbar .columns-right { - margin-left: 5px; -} - -.fixed-table-toolbar .columns label { - display: block; - padding: 3px 20px; - clear: both; - font-weight: normal; - line-height: 1.428571429; -} - -.fixed-table-toolbar .bars, -.fixed-table-toolbar .search, -.fixed-table-toolbar .columns { - position: relative; - margin-top: 10px; - margin-bottom: 10px; - line-height: 34px; -} - -.fixed-table-pagination li.disabled a { - pointer-events: none; - cursor: default; -} - -.fixed-table-loading { - display: none; - position: absolute; - top: 42px; - right: 0; - bottom: 0; - left: 0; - z-index: 99; - background-color: #fff; - text-align: center; -} - -.fixed-table-body .card-view .title { - font-weight: bold; - display: inline-block; - min-width: 30%; - text-align: left !important; -} - -/* support bootstrap 2 */ -.fixed-table-body thead th .th-inner { - box-sizing: border-box; -} - -.table th, .table td { - vertical-align: middle; - box-sizing: border-box; -} - -.fixed-table-toolbar .dropdown-menu { - text-align: left; - max-height: 300px; - overflow: auto; -} - -.fixed-table-toolbar .btn-group > .btn-group { - display: inline-block; - margin-left: -1px !important; -} - -.fixed-table-toolbar .btn-group > .btn-group > .btn { - border-radius: 0; -} - -.fixed-table-toolbar .btn-group > .btn-group:first-child > .btn { - border-top-left-radius: 4px; - border-bottom-left-radius: 4px; -} - -.fixed-table-toolbar .btn-group > .btn-group:last-child > .btn { - border-top-right-radius: 4px; - border-bottom-right-radius: 4px; -} - -.bootstrap-table .table > thead > tr > th { - vertical-align: bottom; - border-bottom: 1px solid #ddd; -} - -/* support bootstrap 3 */ -.bootstrap-table .table thead > tr > th { - padding: 0; - margin: 0; -} - -.bootstrap-table .fixed-table-footer tbody > tr > td { - padding: 0 !important; -} - -.bootstrap-table .fixed-table-footer .table { - border-bottom: none; - border-radius: 0; - padding: 0 !important; -} - -.pull-right .dropdown-menu { - right: 0; - left: auto; -} - -/* calculate scrollbar width */ -p.fixed-table-scroll-inner { - width: 100%; - height: 200px; -} - -div.fixed-table-scroll-outer { - top: 0; - left: 0; - visibility: hidden; - width: 200px; - height: 150px; - overflow: hidden; -} diff --git a/resources/assets/js/bootstrap-table.js b/resources/assets/js/bootstrap-table.js deleted file mode 100755 index 17fcd81b9b..0000000000 --- a/resources/assets/js/bootstrap-table.js +++ /dev/null @@ -1,3096 +0,0 @@ -/** - * @author zhixin wen - * version: 1.11.1 - * https://github.com/wenzhixin/bootstrap-table/ - */ - -(function ($) { - 'use strict'; - - // TOOLS DEFINITION - // ====================== - - var cachedWidth = null; - - // it only does '%s', and return '' when arguments are undefined - var sprintf = function (str) { - var args = arguments, - flag = true, - i = 1; - - str = str.replace(/%s/g, function () { - var arg = args[i++]; - - if (typeof arg === 'undefined') { - flag = false; - return ''; - } - return arg; - }); - return flag ? str : ''; - }; - - var getPropertyFromOther = function (list, from, to, value) { - var result = ''; - $.each(list, function (i, item) { - if (item[from] === value) { - result = item[to]; - return false; - } - return true; - }); - return result; - }; - - var getFieldIndex = function (columns, field) { - var index = -1; - - $.each(columns, function (i, column) { - if (column.field === field) { - index = i; - return false; - } - return true; - }); - return index; - }; - - // http://jsfiddle.net/wenyi/47nz7ez9/3/ - var setFieldIndex = function (columns) { - var i, j, k, - totalCol = 0, - flag = []; - - for (i = 0; i < columns[0].length; i++) { - totalCol += columns[0][i].colspan || 1; - } - - for (i = 0; i < columns.length; i++) { - flag[i] = []; - for (j = 0; j < totalCol; j++) { - flag[i][j] = false; - } - } - - for (i = 0; i < columns.length; i++) { - for (j = 0; j < columns[i].length; j++) { - var r = columns[i][j], - rowspan = r.rowspan || 1, - colspan = r.colspan || 1, - index = $.inArray(false, flag[i]); - - if (colspan === 1) { - r.fieldIndex = index; - // when field is undefined, use index instead - if (typeof r.field === 'undefined') { - r.field = index; - } - } - - for (k = 0; k < rowspan; k++) { - flag[i + k][index] = true; - } - for (k = 0; k < colspan; k++) { - flag[i][index + k] = true; - } - } - } - }; - - var getScrollBarWidth = function () { - if (cachedWidth === null) { - var inner = $('

').addClass('fixed-table-scroll-inner'), - outer = $('

').addClass('fixed-table-scroll-outer'), - w1, w2; - - outer.append(inner); - $('body').append(outer); - - w1 = inner[0].offsetWidth; - outer.css('overflow', 'scroll'); - w2 = inner[0].offsetWidth; - - if (w1 === w2) { - w2 = outer[0].clientWidth; - } - - outer.remove(); - cachedWidth = w1 - w2; - } - return cachedWidth; - }; - - var calculateObjectValue = function (self, name, args, defaultValue) { - var func = name; - - if (typeof name === 'string') { - // support obj.func1.func2 - var names = name.split('.'); - - if (names.length > 1) { - func = window; - $.each(names, function (i, f) { - func = func[f]; - }); - } else { - func = window[name]; - } - } - if (typeof func === 'object') { - return func; - } - if (typeof func === 'function') { - return func.apply(self, args || []); - } - if (!func && typeof name === 'string' && sprintf.apply(this, [name].concat(args))) { - return sprintf.apply(this, [name].concat(args)); - } - return defaultValue; - }; - - var compareObjects = function (objectA, objectB, compareLength) { - // Create arrays of property names - var objectAProperties = Object.getOwnPropertyNames(objectA), - objectBProperties = Object.getOwnPropertyNames(objectB), - propName = ''; - - if (compareLength) { - // If number of properties is different, objects are not equivalent - if (objectAProperties.length !== objectBProperties.length) { - return false; - } - } - - for (var i = 0; i < objectAProperties.length; i++) { - propName = objectAProperties[i]; - - // If the property is not in the object B properties, continue with the next property - if ($.inArray(propName, objectBProperties) > -1) { - // If values of same property are not equal, objects are not equivalent - if (objectA[propName] !== objectB[propName]) { - return false; - } - } - } - - // If we made it this far, objects are considered equivalent - return true; - }; - - var escapeHTML = function (text) { - if (typeof text === 'string') { - return text - .replace(/&/g, '&') - .replace(//g, '>') - .replace(/"/g, '"') - .replace(/'/g, ''') - .replace(/`/g, '`'); - } - return text; - }; - - var getRealDataAttr = function (dataAttr) { - for (var attr in dataAttr) { - var auxAttr = attr.split(/(?=[A-Z])/).join('-').toLowerCase(); - if (auxAttr !== attr) { - dataAttr[auxAttr] = dataAttr[attr]; - delete dataAttr[attr]; - } - } - - return dataAttr; - }; - - var getItemField = function (item, field, escape) { - var value = item; - - if (typeof field !== 'string' || item.hasOwnProperty(field)) { - return escape ? escapeHTML(item[field]) : item[field]; - } - var props = field.split('.'); - for (var p in props) { - if (props.hasOwnProperty(p)) { - value = value && value[props[p]]; - } - } - return escape ? escapeHTML(value) : value; - }; - - var isIEBrowser = function () { - return !!(navigator.userAgent.indexOf("MSIE ") > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)); - }; - - var objectKeys = function () { - // From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys - if (!Object.keys) { - Object.keys = (function() { - var hasOwnProperty = Object.prototype.hasOwnProperty, - hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString'), - dontEnums = [ - 'toString', - 'toLocaleString', - 'valueOf', - 'hasOwnProperty', - 'isPrototypeOf', - 'propertyIsEnumerable', - 'constructor' - ], - dontEnumsLength = dontEnums.length; - - return function(obj) { - if (typeof obj !== 'object' && (typeof obj !== 'function' || obj === null)) { - throw new TypeError('Object.keys called on non-object'); - } - - var result = [], prop, i; - - for (prop in obj) { - if (hasOwnProperty.call(obj, prop)) { - result.push(prop); - } - } - - if (hasDontEnumBug) { - for (i = 0; i < dontEnumsLength; i++) { - if (hasOwnProperty.call(obj, dontEnums[i])) { - result.push(dontEnums[i]); - } - } - } - return result; - }; - }()); - } - }; - - // BOOTSTRAP TABLE CLASS DEFINITION - // ====================== - - var BootstrapTable = function (el, options) { - this.options = options; - this.$el = $(el); - this.$el_ = this.$el.clone(); - this.timeoutId_ = 0; - this.timeoutFooter_ = 0; - - this.init(); - }; - - BootstrapTable.DEFAULTS = { - classes: 'table table-hover', - sortClass: undefined, - locale: undefined, - height: undefined, - undefinedText: '-', - sortName: undefined, - sortOrder: 'asc', - sortStable: false, - striped: false, - columns: [[]], - data: [], - totalField: 'total', - dataField: 'rows', - method: 'get', - url: undefined, - ajax: undefined, - cache: true, - contentType: 'application/json', - dataType: 'json', - ajaxOptions: {}, - queryParams: function (params) { - return params; - }, - queryParamsType: 'limit', // undefined - responseHandler: function (res) { - return res; - }, - pagination: false, - onlyInfoPagination: false, - paginationLoop: true, - sidePagination: 'client', // client or server - totalRows: 0, // server side need to set - pageNumber: 1, - pageSize: 10, - pageList: [10, 25, 50, 100], - paginationHAlign: 'right', //right, left - paginationVAlign: 'bottom', //bottom, top, both - paginationDetailHAlign: 'left', //right, left - paginationPreText: '‹', - paginationNextText: '›', - search: false, - searchOnEnterKey: false, - strictSearch: false, - searchAlign: 'right', - selectItemName: 'btSelectItem', - showHeader: true, - showFooter: false, - showColumns: false, - showPaginationSwitch: false, - showRefresh: false, - showToggle: false, - buttonsAlign: 'right', - smartDisplay: true, - escape: false, - minimumCountColumns: 1, - idField: undefined, - uniqueId: undefined, - cardView: false, - detailView: false, - detailFormatter: function (index, row) { - return ''; - }, - trimOnSearch: true, - clickToSelect: false, - singleSelect: false, - toolbar: undefined, - toolbarAlign: 'left', - checkboxHeader: true, - sortable: true, - silentSort: true, - maintainSelected: false, - searchTimeOut: 500, - searchText: '', - iconSize: undefined, - buttonsClass: 'default', - iconsPrefix: 'glyphicon', // glyphicon of fa (font awesome) - icons: { - paginationSwitchDown: 'glyphicon-collapse-down icon-chevron-down', - paginationSwitchUp: 'glyphicon-collapse-up icon-chevron-up', - refresh: 'glyphicon-refresh icon-refresh', - toggle: 'glyphicon-list-alt icon-list-alt', - columns: 'glyphicon-th icon-th', - detailOpen: 'glyphicon-plus icon-plus', - detailClose: 'glyphicon-minus icon-minus' - }, - - customSearch: $.noop, - - customSort: $.noop, - - rowStyle: function (row, index) { - return {}; - }, - - rowAttributes: function (row, index) { - return {}; - }, - - footerStyle: function (row, index) { - return {}; - }, - - onAll: function (name, args) { - return false; - }, - onClickCell: function (field, value, row, $element) { - return false; - }, - onDblClickCell: function (field, value, row, $element) { - return false; - }, - onClickRow: function (item, $element) { - return false; - }, - onDblClickRow: function (item, $element) { - return false; - }, - onSort: function (name, order) { - return false; - }, - onCheck: function (row) { - return false; - }, - onUncheck: function (row) { - return false; - }, - onCheckAll: function (rows) { - return false; - }, - onUncheckAll: function (rows) { - return false; - }, - onCheckSome: function (rows) { - return false; - }, - onUncheckSome: function (rows) { - return false; - }, - onLoadSuccess: function (data) { - return false; - }, - onLoadError: function (status) { - return false; - }, - onColumnSwitch: function (field, checked) { - return false; - }, - onPageChange: function (number, size) { - return false; - }, - onSearch: function (text) { - return false; - }, - onToggle: function (cardView) { - return false; - }, - onPreBody: function (data) { - return false; - }, - onPostBody: function () { - return false; - }, - onPostHeader: function () { - return false; - }, - onExpandRow: function (index, row, $detail) { - return false; - }, - onCollapseRow: function (index, row) { - return false; - }, - onRefreshOptions: function (options) { - return false; - }, - onRefresh: function (params) { - return false; - }, - onResetView: function () { - return false; - } - }; - - BootstrapTable.LOCALES = {}; - - BootstrapTable.LOCALES['en-US'] = BootstrapTable.LOCALES.en = { - formatLoadingMessage: function () { - return 'Loading, please wait...'; - }, - formatRecordsPerPage: function (pageNumber) { - return sprintf('%s rows per page', pageNumber); - }, - formatShowingRows: function (pageFrom, pageTo, totalRows) { - return sprintf('Showing %s to %s of %s rows', pageFrom, pageTo, totalRows); - }, - formatDetailPagination: function (totalRows) { - return sprintf('Showing %s rows', totalRows); - }, - formatSearch: function () { - return 'Search'; - }, - formatNoMatches: function () { - return 'No matching records found'; - }, - formatPaginationSwitch: function () { - return 'Hide/Show pagination'; - }, - formatRefresh: function () { - return 'Refresh'; - }, - formatToggle: function () { - return 'Toggle'; - }, - formatColumns: function () { - return 'Columns'; - }, - formatAllRows: function () { - return 'All'; - } - }; - - $.extend(BootstrapTable.DEFAULTS, BootstrapTable.LOCALES['en-US']); - - BootstrapTable.COLUMN_DEFAULTS = { - radio: false, - checkbox: false, - checkboxEnabled: true, - field: undefined, - title: undefined, - titleTooltip: undefined, - 'class': undefined, - align: undefined, // left, right, center - halign: undefined, // left, right, center - falign: undefined, // left, right, center - valign: undefined, // top, middle, bottom - width: undefined, - sortable: false, - order: 'asc', // asc, desc - visible: true, - switchable: true, - clickToSelect: true, - formatter: undefined, - footerFormatter: undefined, - events: undefined, - sorter: undefined, - sortName: undefined, - cellStyle: undefined, - searchable: true, - searchFormatter: true, - cardVisible: true, - escape : false - }; - - BootstrapTable.EVENTS = { - 'all.bs.table': 'onAll', - 'click-cell.bs.table': 'onClickCell', - 'dbl-click-cell.bs.table': 'onDblClickCell', - 'click-row.bs.table': 'onClickRow', - 'dbl-click-row.bs.table': 'onDblClickRow', - 'sort.bs.table': 'onSort', - 'check.bs.table': 'onCheck', - 'uncheck.bs.table': 'onUncheck', - 'check-all.bs.table': 'onCheckAll', - 'uncheck-all.bs.table': 'onUncheckAll', - 'check-some.bs.table': 'onCheckSome', - 'uncheck-some.bs.table': 'onUncheckSome', - 'load-success.bs.table': 'onLoadSuccess', - 'load-error.bs.table': 'onLoadError', - 'column-switch.bs.table': 'onColumnSwitch', - 'page-change.bs.table': 'onPageChange', - 'search.bs.table': 'onSearch', - 'toggle.bs.table': 'onToggle', - 'pre-body.bs.table': 'onPreBody', - 'post-body.bs.table': 'onPostBody', - 'post-header.bs.table': 'onPostHeader', - 'expand-row.bs.table': 'onExpandRow', - 'collapse-row.bs.table': 'onCollapseRow', - 'refresh-options.bs.table': 'onRefreshOptions', - 'reset-view.bs.table': 'onResetView', - 'refresh.bs.table': 'onRefresh' - }; - - BootstrapTable.prototype.init = function () { - this.initLocale(); - this.initContainer(); - this.initTable(); - this.initHeader(); - this.initData(); - this.initHiddenRows(); - this.initFooter(); - this.initToolbar(); - this.initPagination(); - this.initBody(); - this.initSearchText(); - this.initServer(); - }; - - BootstrapTable.prototype.initLocale = function () { - if (this.options.locale) { - var parts = this.options.locale.split(/-|_/); - parts[0].toLowerCase(); - if (parts[1]) parts[1].toUpperCase(); - if ($.fn.bootstrapTable.locales[this.options.locale]) { - // locale as requested - $.extend(this.options, $.fn.bootstrapTable.locales[this.options.locale]); - } else if ($.fn.bootstrapTable.locales[parts.join('-')]) { - // locale with sep set to - (in case original was specified with _) - $.extend(this.options, $.fn.bootstrapTable.locales[parts.join('-')]); - } else if ($.fn.bootstrapTable.locales[parts[0]]) { - // short locale language code (i.e. 'en') - $.extend(this.options, $.fn.bootstrapTable.locales[parts[0]]); - } - } - }; - - BootstrapTable.prototype.initContainer = function () { - this.$container = $([ - '
', - '
', - this.options.paginationVAlign === 'top' || this.options.paginationVAlign === 'both' ? - '
' : - '', - '
', - '
', - '
', - '
', - this.options.formatLoadingMessage(), - '
', - '
', - '', - this.options.paginationVAlign === 'bottom' || this.options.paginationVAlign === 'both' ? - '
' : - '', - '
', - '
' - ].join('')); - - this.$container.insertAfter(this.$el); - this.$tableContainer = this.$container.find('.fixed-table-container'); - this.$tableHeader = this.$container.find('.fixed-table-header'); - this.$tableBody = this.$container.find('.fixed-table-body'); - this.$tableLoading = this.$container.find('.fixed-table-loading'); - this.$tableFooter = this.$container.find('.fixed-table-footer'); - this.$toolbar = this.$container.find('.fixed-table-toolbar'); - this.$pagination = this.$container.find('.fixed-table-pagination'); - - this.$tableBody.append(this.$el); - this.$container.after('
'); - - this.$el.addClass(this.options.classes); - if (this.options.striped) { - this.$el.addClass('table-striped'); - } - if ($.inArray('table-no-bordered', this.options.classes.split(' ')) !== -1) { - this.$tableContainer.addClass('table-no-bordered'); - } - }; - - BootstrapTable.prototype.initTable = function () { - var that = this, - columns = [], - data = []; - - this.$header = this.$el.find('>thead'); - if (!this.$header.length) { - this.$header = $('').appendTo(this.$el); - } - this.$header.find('tr').each(function () { - var column = []; - - $(this).find('th').each(function () { - // Fix #2014 - getFieldIndex and elsewhere assume this is string, causes issues if not - if (typeof $(this).data('field') !== 'undefined') { - $(this).data('field', $(this).data('field') + ''); - } - column.push($.extend({}, { - title: $(this).html(), - 'class': $(this).attr('class'), - titleTooltip: $(this).attr('title'), - rowspan: $(this).attr('rowspan') ? +$(this).attr('rowspan') : undefined, - colspan: $(this).attr('colspan') ? +$(this).attr('colspan') : undefined - }, $(this).data())); - }); - columns.push(column); - }); - if (!$.isArray(this.options.columns[0])) { - this.options.columns = [this.options.columns]; - } - this.options.columns = $.extend(true, [], columns, this.options.columns); - this.columns = []; - - setFieldIndex(this.options.columns); - $.each(this.options.columns, function (i, columns) { - $.each(columns, function (j, column) { - column = $.extend({}, BootstrapTable.COLUMN_DEFAULTS, column); - - if (typeof column.fieldIndex !== 'undefined') { - that.columns[column.fieldIndex] = column; - } - - that.options.columns[i][j] = column; - }); - }); - - // if options.data is setting, do not process tbody data - if (this.options.data.length) { - return; - } - - var m = []; - this.$el.find('>tbody>tr').each(function (y) { - var row = {}; - - // save tr's id, class and data-* attributes - row._id = $(this).attr('id'); - row._class = $(this).attr('class'); - row._data = getRealDataAttr($(this).data()); - - $(this).find('>td').each(function (x) { - var $this = $(this), - cspan = +$this.attr('colspan') || 1, - rspan = +$this.attr('rowspan') || 1, - tx, ty; - - for (; m[y] && m[y][x]; x++); //skip already occupied cells in current row - - for (tx = x; tx < x + cspan; tx++) { //mark matrix elements occupied by current cell with true - for (ty = y; ty < y + rspan; ty++) { - if (!m[ty]) { //fill missing rows - m[ty] = []; - } - m[ty][tx] = true; - } - } - - var field = that.columns[x].field; - - row[field] = $(this).html(); - // save td's id, class and data-* attributes - row['_' + field + '_id'] = $(this).attr('id'); - row['_' + field + '_class'] = $(this).attr('class'); - row['_' + field + '_rowspan'] = $(this).attr('rowspan'); - row['_' + field + '_colspan'] = $(this).attr('colspan'); - row['_' + field + '_title'] = $(this).attr('title'); - row['_' + field + '_data'] = getRealDataAttr($(this).data()); - }); - data.push(row); - }); - this.options.data = data; - if (data.length) this.fromHtml = true; - }; - - BootstrapTable.prototype.initHeader = function () { - var that = this, - visibleColumns = {}, - html = []; - - this.header = { - fields: [], - styles: [], - classes: [], - formatters: [], - events: [], - sorters: [], - sortNames: [], - cellStyles: [], - searchables: [] - }; - - $.each(this.options.columns, function (i, columns) { - html.push(''); - - if (i === 0 && !that.options.cardView && that.options.detailView) { - html.push(sprintf('
', - that.options.columns.length)); - } - - $.each(columns, function (j, column) { - var text = '', - halign = '', // header align style - align = '', // body align style - style = '', - class_ = sprintf(' class="%s"', column['class']), - order = that.options.sortOrder || column.order, - unitWidth = 'px', - width = column.width; - - if (column.width !== undefined && (!that.options.cardView)) { - if (typeof column.width === 'string') { - if (column.width.indexOf('%') !== -1) { - unitWidth = '%'; - } - } - } - if (column.width && typeof column.width === 'string') { - width = column.width.replace('%', '').replace('px', ''); - } - - halign = sprintf('text-align: %s; ', column.halign ? column.halign : column.align); - align = sprintf('text-align: %s; ', column.align); - style = sprintf('vertical-align: %s; ', column.valign); - style += sprintf('width: %s; ', (column.checkbox || column.radio) && !width ? - '36px' : (width ? width + unitWidth : undefined)); - - if (typeof column.fieldIndex !== 'undefined') { - that.header.fields[column.fieldIndex] = column.field; - that.header.styles[column.fieldIndex] = align + style; - that.header.classes[column.fieldIndex] = class_; - that.header.formatters[column.fieldIndex] = column.formatter; - that.header.events[column.fieldIndex] = column.events; - that.header.sorters[column.fieldIndex] = column.sorter; - that.header.sortNames[column.fieldIndex] = column.sortName; - that.header.cellStyles[column.fieldIndex] = column.cellStyle; - that.header.searchables[column.fieldIndex] = column.searchable; - - if (!column.visible) { - return; - } - - if (that.options.cardView && (!column.cardVisible)) { - return; - } - - visibleColumns[column.field] = column; - } - - html.push(''); - - html.push(sprintf('
', that.options.sortable && column.sortable ? - 'sortable both' : '')); - - text = that.options.escape ? escapeHTML(column.title) : column.title; - - if (column.checkbox) { - if (!that.options.singleSelect && that.options.checkboxHeader) { - text = ''; - } - that.header.stateField = column.field; - } - if (column.radio) { - text = ''; - that.header.stateField = column.field; - that.options.singleSelect = true; - } - - html.push(text); - html.push('
'); - html.push('
'); - html.push('
'); - html.push(''); - }); - html.push(''); - }); - - this.$header.html(html.join('')); - this.$header.find('th[data-field]').each(function (i) { - $(this).data(visibleColumns[$(this).data('field')]); - }); - this.$container.off('click', '.th-inner').on('click', '.th-inner', function (event) { - var target = $(this); - - if (that.options.detailView) { - if (target.closest('.bootstrap-table')[0] !== that.$container[0]) - return false; - } - - if (that.options.sortable && target.parent().data().sortable) { - that.onSort(event); - } - }); - - this.$header.children().children().off('keypress').on('keypress', function (event) { - if (that.options.sortable && $(this).data().sortable) { - var code = event.keyCode || event.which; - if (code == 13) { //Enter keycode - that.onSort(event); - } - } - }); - - $(window).off('resize.bootstrap-table'); - if (!this.options.showHeader || this.options.cardView) { - this.$header.hide(); - this.$tableHeader.hide(); - this.$tableLoading.css('top', 0); - } else { - this.$header.show(); - this.$tableHeader.show(); - this.$tableLoading.css('top', this.$header.outerHeight() + 1); - // Assign the correct sortable arrow - this.getCaret(); - $(window).on('resize.bootstrap-table', $.proxy(this.resetWidth, this)); - } - - this.$selectAll = this.$header.find('[name="btSelectAll"]'); - this.$selectAll.off('click').on('click', function () { - var checked = $(this).prop('checked'); - that[checked ? 'checkAll' : 'uncheckAll'](); - that.updateSelected(); - }); - }; - - BootstrapTable.prototype.initFooter = function () { - if (!this.options.showFooter || this.options.cardView) { - this.$tableFooter.hide(); - } else { - this.$tableFooter.show(); - } - }; - - /** - * @param data - * @param type: append / prepend - */ - BootstrapTable.prototype.initData = function (data, type) { - if (type === 'append') { - this.data = this.data.concat(data); - } else if (type === 'prepend') { - this.data = [].concat(data).concat(this.data); - } else { - this.data = data || this.options.data; - } - - // Fix #839 Records deleted when adding new row on filtered table - if (type === 'append') { - this.options.data = this.options.data.concat(data); - } else if (type === 'prepend') { - this.options.data = [].concat(data).concat(this.options.data); - } else { - this.options.data = this.data; - } - - if (this.options.sidePagination === 'server') { - return; - } - this.initSort(); - }; - - BootstrapTable.prototype.initSort = function () { - var that = this, - name = this.options.sortName, - order = this.options.sortOrder === 'desc' ? -1 : 1, - index = $.inArray(this.options.sortName, this.header.fields), - timeoutId = 0; - - if (this.options.customSort !== $.noop) { - this.options.customSort.apply(this, [this.options.sortName, this.options.sortOrder]); - return; - } - - if (index !== -1) { - if (this.options.sortStable) { - $.each(this.data, function (i, row) { - if (!row.hasOwnProperty('_position')) row._position = i; - }); - } - - this.data.sort(function (a, b) { - if (that.header.sortNames[index]) { - name = that.header.sortNames[index]; - } - var aa = getItemField(a, name, that.options.escape), - bb = getItemField(b, name, that.options.escape), - value = calculateObjectValue(that.header, that.header.sorters[index], [aa, bb]); - - if (value !== undefined) { - return order * value; - } - - // Fix #161: undefined or null string sort bug. - if (aa === undefined || aa === null) { - aa = ''; - } - if (bb === undefined || bb === null) { - bb = ''; - } - - if (that.options.sortStable && aa === bb) { - aa = a._position; - bb = b._position; - } - - // IF both values are numeric, do a numeric comparison - if ($.isNumeric(aa) && $.isNumeric(bb)) { - // Convert numerical values form string to float. - aa = parseFloat(aa); - bb = parseFloat(bb); - if (aa < bb) { - return order * -1; - } - return order; - } - - if (aa === bb) { - return 0; - } - - // If value is not a string, convert to string - if (typeof aa !== 'string') { - aa = aa.toString(); - } - - if (aa.localeCompare(bb) === -1) { - return order * -1; - } - - return order; - }); - - if (this.options.sortClass !== undefined) { - clearTimeout(timeoutId); - timeoutId = setTimeout(function () { - that.$el.removeClass(that.options.sortClass); - var index = that.$header.find(sprintf('[data-field="%s"]', - that.options.sortName).index() + 1); - that.$el.find(sprintf('tr td:nth-child(%s)', index)) - .addClass(that.options.sortClass); - }, 250); - } - } - }; - - BootstrapTable.prototype.onSort = function (event) { - var $this = event.type === "keypress" ? $(event.currentTarget) : $(event.currentTarget).parent(), - $this_ = this.$header.find('th').eq($this.index()); - - this.$header.add(this.$header_).find('span.order').remove(); - - if (this.options.sortName === $this.data('field')) { - this.options.sortOrder = this.options.sortOrder === 'asc' ? 'desc' : 'asc'; - } else { - this.options.sortName = $this.data('field'); - this.options.sortOrder = $this.data('order') === 'asc' ? 'desc' : 'asc'; - } - this.trigger('sort', this.options.sortName, this.options.sortOrder); - - $this.add($this_).data('order', this.options.sortOrder); - - // Assign the correct sortable arrow - this.getCaret(); - - if (this.options.sidePagination === 'server') { - this.initServer(this.options.silentSort); - return; - } - - this.initSort(); - this.initBody(); - }; - - BootstrapTable.prototype.initToolbar = function () { - var that = this, - html = [], - timeoutId = 0, - $keepOpen, - $search, - switchableCount = 0; - - if (this.$toolbar.find('.bs-bars').children().length) { - $('body').append($(this.options.toolbar)); - } - this.$toolbar.html(''); - - if (typeof this.options.toolbar === 'string' || typeof this.options.toolbar === 'object') { - $(sprintf('
', this.options.toolbarAlign)) - .appendTo(this.$toolbar) - .append($(this.options.toolbar)); - } - - // showColumns, showToggle, showRefresh - html = [sprintf('
', - this.options.buttonsAlign, this.options.buttonsAlign)]; - - if (typeof this.options.icons === 'string') { - this.options.icons = calculateObjectValue(null, this.options.icons); - } - - if (this.options.showPaginationSwitch) { - html.push(sprintf(''); - } - - if (this.options.showRefresh) { - html.push(sprintf(''); - } - - if (this.options.showToggle) { - html.push(sprintf(''); - } - - if (this.options.showColumns) { - html.push(sprintf('
', - this.options.formatColumns()), - '', - '', - '
'); - } - - html.push('
'); - - // Fix #188: this.showToolbar is for extensions - if (this.showToolbar || html.length > 2) { - this.$toolbar.append(html.join('')); - } - - if (this.options.showPaginationSwitch) { - this.$toolbar.find('button[name="paginationSwitch"]') - .off('click').on('click', $.proxy(this.togglePagination, this)); - } - - if (this.options.showRefresh) { - this.$toolbar.find('button[name="refresh"]') - .off('click').on('click', $.proxy(this.refresh, this)); - } - - if (this.options.showToggle) { - this.$toolbar.find('button[name="toggle"]') - .off('click').on('click', function () { - that.toggleView(); - }); - } - - if (this.options.showColumns) { - $keepOpen = this.$toolbar.find('.keep-open'); - - if (switchableCount <= this.options.minimumCountColumns) { - $keepOpen.find('input').prop('disabled', true); - } - - $keepOpen.find('li').off('click').on('click', function (event) { - event.stopImmediatePropagation(); - }); - $keepOpen.find('input').off('click').on('click', function () { - var $this = $(this); - - that.toggleColumn($(this).val(), $this.prop('checked'), false); - that.trigger('column-switch', $(this).data('field'), $this.prop('checked')); - }); - } - - if (this.options.search) { - html = []; - html.push( - ''); - - this.$toolbar.append(html.join('')); - $search = this.$toolbar.find('.search input'); - $search.off('keyup drop blur').on('keyup drop blur', function (event) { - if (that.options.searchOnEnterKey && event.keyCode !== 13) { - return; - } - - if ($.inArray(event.keyCode, [37, 38, 39, 40]) > -1) { - return; - } - - clearTimeout(timeoutId); // doesn't matter if it's 0 - timeoutId = setTimeout(function () { - that.onSearch(event); - }, that.options.searchTimeOut); - }); - - if (isIEBrowser()) { - $search.off('mouseup').on('mouseup', function (event) { - clearTimeout(timeoutId); // doesn't matter if it's 0 - timeoutId = setTimeout(function () { - that.onSearch(event); - }, that.options.searchTimeOut); - }); - } - } - }; - - BootstrapTable.prototype.onSearch = function (event) { - var text = $.trim($(event.currentTarget).val()); - - // trim search input - if (this.options.trimOnSearch && $(event.currentTarget).val() !== text) { - $(event.currentTarget).val(text); - } - - if (text === this.searchText) { - return; - } - this.searchText = text; - this.options.searchText = text; - - this.options.pageNumber = 1; - this.initSearch(); - this.updatePagination(); - this.trigger('search', text); - }; - - BootstrapTable.prototype.initSearch = function () { - var that = this; - - if (this.options.sidePagination !== 'server') { - if (this.options.customSearch !== $.noop) { - this.options.customSearch.apply(this, [this.searchText]); - return; - } - - var s = this.searchText && (this.options.escape ? - escapeHTML(this.searchText) : this.searchText).toLowerCase(); - var f = $.isEmptyObject(this.filterColumns) ? null : this.filterColumns; - - // Check filter - this.data = f ? $.grep(this.options.data, function (item, i) { - for (var key in f) { - if ($.isArray(f[key]) && $.inArray(item[key], f[key]) === -1 || - !$.isArray(f[key]) && item[key] !== f[key]) { - return false; - } - } - return true; - }) : this.options.data; - - this.data = s ? $.grep(this.data, function (item, i) { - for (var j = 0; j < that.header.fields.length; j++) { - - if (!that.header.searchables[j]) { - continue; - } - - var key = $.isNumeric(that.header.fields[j]) ? parseInt(that.header.fields[j], 10) : that.header.fields[j]; - var column = that.columns[getFieldIndex(that.columns, key)]; - var value; - - if (typeof key === 'string') { - value = item; - var props = key.split('.'); - for (var prop_index = 0; prop_index < props.length; prop_index++) { - value = value[props[prop_index]]; - } - - // Fix #142: respect searchForamtter boolean - if (column && column.searchFormatter) { - value = calculateObjectValue(column, - that.header.formatters[j], [value, item, i], value); - } - } else { - value = item[key]; - } - - if (typeof value === 'string' || typeof value === 'number') { - if (that.options.strictSearch) { - if ((value + '').toLowerCase() === s) { - return true; - } - } else { - if ((value + '').toLowerCase().indexOf(s) !== -1) { - return true; - } - } - } - } - return false; - }) : this.data; - } - }; - - BootstrapTable.prototype.initPagination = function () { - if (!this.options.pagination) { - this.$pagination.hide(); - return; - } else { - this.$pagination.show(); - } - - var that = this, - html = [], - $allSelected = false, - i, from, to, - $pageList, - $first, $pre, - $next, $last, - $number, - data = this.getData(), - pageList = this.options.pageList; - - if (this.options.sidePagination !== 'server') { - this.options.totalRows = data.length; - } - - this.totalPages = 0; - if (this.options.totalRows) { - if (this.options.pageSize === this.options.formatAllRows()) { - this.options.pageSize = this.options.totalRows; - $allSelected = true; - } else if (this.options.pageSize === this.options.totalRows) { - // Fix #667 Table with pagination, - // multiple pages and a search that matches to one page throws exception - var pageLst = typeof this.options.pageList === 'string' ? - this.options.pageList.replace('[', '').replace(']', '') - .replace(/ /g, '').toLowerCase().split(',') : this.options.pageList; - if ($.inArray(this.options.formatAllRows().toLowerCase(), pageLst) > -1) { - $allSelected = true; - } - } - - this.totalPages = ~~((this.options.totalRows - 1) / this.options.pageSize) + 1; - - this.options.totalPages = this.totalPages; - } - if (this.totalPages > 0 && this.options.pageNumber > this.totalPages) { - this.options.pageNumber = this.totalPages; - } - - this.pageFrom = (this.options.pageNumber - 1) * this.options.pageSize + 1; - this.pageTo = this.options.pageNumber * this.options.pageSize; - if (this.pageTo > this.options.totalRows) { - this.pageTo = this.options.totalRows; - } - - html.push( - '
', - '', - this.options.onlyInfoPagination ? this.options.formatDetailPagination(this.options.totalRows) : - this.options.formatShowingRows(this.pageFrom, this.pageTo, this.options.totalRows), - ''); - - if (!this.options.onlyInfoPagination) { - html.push(''); - - var pageNumber = [ - sprintf('', - this.options.paginationVAlign === 'top' || this.options.paginationVAlign === 'both' ? - 'dropdown' : 'dropup'), - '', - ''); - - html.push(this.options.formatRecordsPerPage(pageNumber.join(''))); - html.push(''); - - html.push('
', - ''); - } - this.$pagination.html(html.join('')); - - if (!this.options.onlyInfoPagination) { - $pageList = this.$pagination.find('.page-list a'); - $first = this.$pagination.find('.page-first'); - $pre = this.$pagination.find('.page-pre'); - $next = this.$pagination.find('.page-next'); - $last = this.$pagination.find('.page-last'); - $number = this.$pagination.find('.page-number'); - - if (this.options.smartDisplay) { - if (this.totalPages <= 1) { - this.$pagination.find('div.pagination').hide(); - } - if (pageList.length < 2 || this.options.totalRows <= pageList[0]) { - this.$pagination.find('span.page-list').hide(); - } - - // when data is empty, hide the pagination - this.$pagination[this.getData().length ? 'show' : 'hide'](); - } - - if (!this.options.paginationLoop) { - if (this.options.pageNumber === 1) { - $pre.addClass('disabled'); - } - if (this.options.pageNumber === this.totalPages) { - $next.addClass('disabled'); - } - } - - if ($allSelected) { - this.options.pageSize = this.options.formatAllRows(); - } - $pageList.off('click').on('click', $.proxy(this.onPageListChange, this)); - $first.off('click').on('click', $.proxy(this.onPageFirst, this)); - $pre.off('click').on('click', $.proxy(this.onPagePre, this)); - $next.off('click').on('click', $.proxy(this.onPageNext, this)); - $last.off('click').on('click', $.proxy(this.onPageLast, this)); - $number.off('click').on('click', $.proxy(this.onPageNumber, this)); - } - }; - - BootstrapTable.prototype.updatePagination = function (event) { - // Fix #171: IE disabled button can be clicked bug. - if (event && $(event.currentTarget).hasClass('disabled')) { - return; - } - - if (!this.options.maintainSelected) { - this.resetRows(); - } - - this.initPagination(); - if (this.options.sidePagination === 'server') { - this.initServer(); - } else { - this.initBody(); - } - - this.trigger('page-change', this.options.pageNumber, this.options.pageSize); - }; - - BootstrapTable.prototype.onPageListChange = function (event) { - var $this = $(event.currentTarget); - - $this.parent().addClass('active').siblings().removeClass('active'); - this.options.pageSize = $this.text().toUpperCase() === this.options.formatAllRows().toUpperCase() ? - this.options.formatAllRows() : +$this.text(); - this.$toolbar.find('.page-size').text(this.options.pageSize); - - this.updatePagination(event); - return false; - }; - - BootstrapTable.prototype.onPageFirst = function (event) { - this.options.pageNumber = 1; - this.updatePagination(event); - return false; - }; - - BootstrapTable.prototype.onPagePre = function (event) { - if ((this.options.pageNumber - 1) === 0) { - this.options.pageNumber = this.options.totalPages; - } else { - this.options.pageNumber--; - } - this.updatePagination(event); - return false; - }; - - BootstrapTable.prototype.onPageNext = function (event) { - if ((this.options.pageNumber + 1) > this.options.totalPages) { - this.options.pageNumber = 1; - } else { - this.options.pageNumber++; - } - this.updatePagination(event); - return false; - }; - - BootstrapTable.prototype.onPageLast = function (event) { - this.options.pageNumber = this.totalPages; - this.updatePagination(event); - return false; - }; - - BootstrapTable.prototype.onPageNumber = function (event) { - if (this.options.pageNumber === +$(event.currentTarget).text()) { - return; - } - this.options.pageNumber = +$(event.currentTarget).text(); - this.updatePagination(event); - return false; - }; - - BootstrapTable.prototype.initRow = function(item, i, data, parentDom) { - var that=this, - key, - html = [], - style = {}, - csses = [], - data_ = '', - attributes = {}, - htmlAttributes = []; - - if ($.inArray(item, this.hiddenRows) > -1) { - return; - } - - style = calculateObjectValue(this.options, this.options.rowStyle, [item, i], style); - - if (style && style.css) { - for (key in style.css) { - csses.push(key + ': ' + style.css[key]); - } - } - - attributes = calculateObjectValue(this.options, - this.options.rowAttributes, [item, i], attributes); - - if (attributes) { - for (key in attributes) { - htmlAttributes.push(sprintf('%s="%s"', key, escapeHTML(attributes[key]))); - } - } - - if (item._data && !$.isEmptyObject(item._data)) { - $.each(item._data, function(k, v) { - // ignore data-index - if (k === 'index') { - return; - } - data_ += sprintf(' data-%s="%s"', k, v); - }); - } - - html.push('' - ); - - if (this.options.cardView) { - html.push(sprintf('
', this.header.fields.length)); - } - - if (!this.options.cardView && this.options.detailView) { - html.push('', - '', - sprintf('', this.options.iconsPrefix, this.options.icons.detailOpen), - '', - ''); - } - - $.each(this.header.fields, function(j, field) { - var text = '', - value_ = getItemField(item, field, that.options.escape), - value = '', - type = '', - cellStyle = {}, - id_ = '', - class_ = that.header.classes[j], - data_ = '', - rowspan_ = '', - colspan_ = '', - title_ = '', - column = that.columns[j]; - - if (that.fromHtml && typeof value_ === 'undefined') { - return; - } - - if (!column.visible) { - return; - } - - if (that.options.cardView && (!column.cardVisible)) { - return; - } - - if (column.escape) { - value_ = escapeHTML(value_); - } - - style = sprintf('style="%s"', csses.concat(that.header.styles[j]).join('; ')); - - // handle td's id and class - if (item['_' + field + '_id']) { - id_ = sprintf(' id="%s"', item['_' + field + '_id']); - } - if (item['_' + field + '_class']) { - class_ = sprintf(' class="%s"', item['_' + field + '_class']); - } - if (item['_' + field + '_rowspan']) { - rowspan_ = sprintf(' rowspan="%s"', item['_' + field + '_rowspan']); - } - if (item['_' + field + '_colspan']) { - colspan_ = sprintf(' colspan="%s"', item['_' + field + '_colspan']); - } - if (item['_' + field + '_title']) { - title_ = sprintf(' title="%s"', item['_' + field + '_title']); - } - cellStyle = calculateObjectValue(that.header, - that.header.cellStyles[j], [value_, item, i, field], cellStyle); - if (cellStyle.classes) { - class_ = sprintf(' class="%s"', cellStyle.classes); - } - if (cellStyle.css) { - var csses_ = []; - for (var key in cellStyle.css) { - csses_.push(key + ': ' + cellStyle.css[key]); - } - style = sprintf('style="%s"', csses_.concat(that.header.styles[j]).join('; ')); - } - - value = calculateObjectValue(column, - that.header.formatters[j], [value_, item, i], value_); - - if (item['_' + field + '_data'] && !$.isEmptyObject(item['_' + field + '_data'])) { - $.each(item['_' + field + '_data'], function(k, v) { - // ignore data-index - if (k === 'index') { - return; - } - data_ += sprintf(' data-%s="%s"', k, v); - }); - } - - if (column.checkbox || column.radio) { - type = column.checkbox ? 'checkbox' : type; - type = column.radio ? 'radio' : type; - - text = [sprintf(that.options.cardView ? - '
' : '', - that.header.formatters[j] && typeof value === 'string' ? value : '', - that.options.cardView ? '
' : '' - ].join(''); - - item[that.header.stateField] = value === true || (value && value.checked); - } else { - value = typeof value === 'undefined' || value === null ? - that.options.undefinedText : value; - - text = that.options.cardView ? ['
', - that.options.showHeader ? sprintf('%s', style, - getPropertyFromOther(that.columns, 'field', 'title', field)) : '', - sprintf('%s', value), - '
' - ].join('') : [sprintf('', - id_, class_, style, data_, rowspan_, colspan_, title_), - value, - '' - ].join(''); - - // Hide empty data on Card view when smartDisplay is set to true. - if (that.options.cardView && that.options.smartDisplay && value === '') { - // Should set a placeholder for event binding correct fieldIndex - text = '
'; - } - } - - html.push(text); - }); - - if (this.options.cardView) { - html.push('
'); - } - html.push(''); - - return html.join(' '); - }; - - BootstrapTable.prototype.initBody = function (fixedScroll) { - var that = this, - html = [], - data = this.getData(); - - this.trigger('pre-body', data); - - this.$body = this.$el.find('>tbody'); - if (!this.$body.length) { - this.$body = $('').appendTo(this.$el); - } - - //Fix #389 Bootstrap-table-flatJSON is not working - - if (!this.options.pagination || this.options.sidePagination === 'server') { - this.pageFrom = 1; - this.pageTo = data.length; - } - - var trFragments = $(document.createDocumentFragment()); - var hasTr; - - for (var i = this.pageFrom - 1; i < this.pageTo; i++) { - var item = data[i]; - var tr = this.initRow(item, i, data, trFragments); - hasTr = hasTr || !!tr; - if (tr&&tr!==true) { - trFragments.append(tr); - } - } - - // show no records - if (!hasTr) { - trFragments.append('' + - sprintf('%s', - this.$header.find('th').length, - this.options.formatNoMatches()) + - ''); - } - - this.$body.html(trFragments); - - if (!fixedScroll) { - this.scrollTo(0); - } - - // click to select by column - this.$body.find('> tr[data-index] > td').off('click dblclick').on('click dblclick', function (e) { - var $td = $(this), - $tr = $td.parent(), - item = that.data[$tr.data('index')], - index = $td[0].cellIndex, - fields = that.getVisibleFields(), - field = fields[that.options.detailView && !that.options.cardView ? index - 1 : index], - column = that.columns[getFieldIndex(that.columns, field)], - value = getItemField(item, field, that.options.escape); - - if ($td.find('.detail-icon').length) { - return; - } - - that.trigger(e.type === 'click' ? 'click-cell' : 'dbl-click-cell', field, value, item, $td); - that.trigger(e.type === 'click' ? 'click-row' : 'dbl-click-row', item, $tr, field); - - // if click to select - then trigger the checkbox/radio click - if (e.type === 'click' && that.options.clickToSelect && column.clickToSelect) { - var $selectItem = $tr.find(sprintf('[name="%s"]', that.options.selectItemName)); - if ($selectItem.length) { - $selectItem[0].click(); // #144: .trigger('click') bug - } - } - }); - - this.$body.find('> tr[data-index] > td > .detail-icon').off('click').on('click', function () { - var $this = $(this), - $tr = $this.parent().parent(), - index = $tr.data('index'), - row = data[index]; // Fix #980 Detail view, when searching, returns wrong row - - // remove and update - if ($tr.next().is('tr.detail-view')) { - $this.find('i').attr('class', sprintf('%s %s', that.options.iconsPrefix, that.options.icons.detailOpen)); - that.trigger('collapse-row', index, row); - $tr.next().remove(); - } else { - $this.find('i').attr('class', sprintf('%s %s', that.options.iconsPrefix, that.options.icons.detailClose)); - $tr.after(sprintf('', $tr.find('td').length)); - var $element = $tr.next().find('td'); - var content = calculateObjectValue(that.options, that.options.detailFormatter, [index, row, $element], ''); - if($element.length === 1) { - $element.append(content); - } - that.trigger('expand-row', index, row, $element); - } - that.resetView(); - return false; - }); - - this.$selectItem = this.$body.find(sprintf('[name="%s"]', this.options.selectItemName)); - this.$selectItem.off('click').on('click', function (event) { - event.stopImmediatePropagation(); - - var $this = $(this), - checked = $this.prop('checked'), - row = that.data[$this.data('index')]; - - if (that.options.maintainSelected && $(this).is(':radio')) { - $.each(that.options.data, function (i, row) { - row[that.header.stateField] = false; - }); - } - - row[that.header.stateField] = checked; - - if (that.options.singleSelect) { - that.$selectItem.not(this).each(function () { - that.data[$(this).data('index')][that.header.stateField] = false; - }); - that.$selectItem.filter(':checked').not(this).prop('checked', false); - } - - that.updateSelected(); - that.trigger(checked ? 'check' : 'uncheck', row, $this); - }); - - $.each(this.header.events, function (i, events) { - if (!events) { - return; - } - // fix bug, if events is defined with namespace - if (typeof events === 'string') { - events = calculateObjectValue(null, events); - } - - var field = that.header.fields[i], - fieldIndex = $.inArray(field, that.getVisibleFields()); - - if (that.options.detailView && !that.options.cardView) { - fieldIndex += 1; - } - - for (var key in events) { - that.$body.find('>tr:not(.no-records-found)').each(function () { - var $tr = $(this), - $td = $tr.find(that.options.cardView ? '.card-view' : 'td').eq(fieldIndex), - index = key.indexOf(' '), - name = key.substring(0, index), - el = key.substring(index + 1), - func = events[key]; - - $td.find(el).off(name).on(name, function (e) { - var index = $tr.data('index'), - row = that.data[index], - value = row[field]; - - func.apply(this, [e, value, row, index]); - }); - }); - } - }); - - this.updateSelected(); - this.resetView(); - - this.trigger('post-body', data); - }; - - BootstrapTable.prototype.initServer = function (silent, query, url) { - var that = this, - data = {}, - params = { - searchText: this.searchText, - sortName: this.options.sortName, - sortOrder: this.options.sortOrder - }, - request; - - if (this.options.pagination) { - params.pageSize = this.options.pageSize === this.options.formatAllRows() ? - this.options.totalRows : this.options.pageSize; - params.pageNumber = this.options.pageNumber; - } - - if (!(url || this.options.url) && !this.options.ajax) { - return; - } - - if (this.options.queryParamsType === 'limit') { - params = { - search: params.searchText, - sort: params.sortName, - order: params.sortOrder - }; - - if (this.options.pagination) { - params.offset = this.options.pageSize === this.options.formatAllRows() ? - 0 : this.options.pageSize * (this.options.pageNumber - 1); - params.limit = this.options.pageSize === this.options.formatAllRows() ? - this.options.totalRows : this.options.pageSize; - } - } - - if (!($.isEmptyObject(this.filterColumnsPartial))) { - params.filter = JSON.stringify(this.filterColumnsPartial, null); - } - - data = calculateObjectValue(this.options, this.options.queryParams, [params], data); - - $.extend(data, query || {}); - - // false to stop request - if (data === false) { - return; - } - - if (!silent) { - this.$tableLoading.show(); - } - request = $.extend({}, calculateObjectValue(null, this.options.ajaxOptions), { - type: this.options.method, - url: url || this.options.url, - data: this.options.contentType === 'application/json' && this.options.method === 'post' ? - JSON.stringify(data) : data, - cache: this.options.cache, - contentType: this.options.contentType, - dataType: this.options.dataType, - success: function (res) { - res = calculateObjectValue(that.options, that.options.responseHandler, [res], res); - - that.load(res); - that.trigger('load-success', res); - if (!silent) that.$tableLoading.hide(); - }, - error: function (res) { - that.trigger('load-error', res.status, res); - if (!silent) that.$tableLoading.hide(); - } - }); - - if (this.options.ajax) { - calculateObjectValue(this, this.options.ajax, [request], null); - } else { - if (this._xhr && this._xhr.readyState !== 4) { - this._xhr.abort(); - } - this._xhr = $.ajax(request); - } - }; - - BootstrapTable.prototype.initSearchText = function () { - if (this.options.search) { - if (this.options.searchText !== '') { - var $search = this.$toolbar.find('.search input'); - $search.val(this.options.searchText); - this.onSearch({currentTarget: $search}); - } - } - }; - - BootstrapTable.prototype.getCaret = function () { - var that = this; - - $.each(this.$header.find('th'), function (i, th) { - $(th).find('.sortable').removeClass('desc asc').addClass($(th).data('field') === that.options.sortName ? that.options.sortOrder : 'both'); - }); - }; - - BootstrapTable.prototype.updateSelected = function () { - var checkAll = this.$selectItem.filter(':enabled').length && - this.$selectItem.filter(':enabled').length === - this.$selectItem.filter(':enabled').filter(':checked').length; - - this.$selectAll.add(this.$selectAll_).prop('checked', checkAll); - - this.$selectItem.each(function () { - $(this).closest('tr')[$(this).prop('checked') ? 'addClass' : 'removeClass']('selected'); - }); - }; - - BootstrapTable.prototype.updateRows = function () { - var that = this; - - this.$selectItem.each(function () { - that.data[$(this).data('index')][that.header.stateField] = $(this).prop('checked'); - }); - }; - - BootstrapTable.prototype.resetRows = function () { - var that = this; - - $.each(this.data, function (i, row) { - that.$selectAll.prop('checked', false); - that.$selectItem.prop('checked', false); - if (that.header.stateField) { - row[that.header.stateField] = false; - } - }); - this.initHiddenRows(); - }; - - BootstrapTable.prototype.trigger = function (name) { - var args = Array.prototype.slice.call(arguments, 1); - - name += '.bs.table'; - this.options[BootstrapTable.EVENTS[name]].apply(this.options, args); - this.$el.trigger($.Event(name), args); - - this.options.onAll(name, args); - this.$el.trigger($.Event('all.bs.table'), [name, args]); - }; - - BootstrapTable.prototype.resetHeader = function () { - // fix #61: the hidden table reset header bug. - // fix bug: get $el.css('width') error sometime (height = 500) - clearTimeout(this.timeoutId_); - this.timeoutId_ = setTimeout($.proxy(this.fitHeader, this), this.$el.is(':hidden') ? 100 : 0); - }; - - BootstrapTable.prototype.fitHeader = function () { - var that = this, - fixedBody, - scrollWidth, - focused, - focusedTemp; - - if (that.$el.is(':hidden')) { - that.timeoutId_ = setTimeout($.proxy(that.fitHeader, that), 100); - return; - } - fixedBody = this.$tableBody.get(0); - - scrollWidth = fixedBody.scrollWidth > fixedBody.clientWidth && - fixedBody.scrollHeight > fixedBody.clientHeight + this.$header.outerHeight() ? - getScrollBarWidth() : 0; - - this.$el.css('margin-top', -this.$header.outerHeight()); - - focused = $(':focus'); - if (focused.length > 0) { - var $th = focused.parents('th'); - if ($th.length > 0) { - var dataField = $th.attr('data-field'); - if (dataField !== undefined) { - var $headerTh = this.$header.find("[data-field='" + dataField + "']"); - if ($headerTh.length > 0) { - $headerTh.find(":input").addClass("focus-temp"); - } - } - } - } - - this.$header_ = this.$header.clone(true, true); - this.$selectAll_ = this.$header_.find('[name="btSelectAll"]'); - this.$tableHeader.css({ - 'margin-right': scrollWidth - }).find('table').css('width', this.$el.outerWidth()) - .html('').attr('class', this.$el.attr('class')) - .append(this.$header_); - - - focusedTemp = $('.focus-temp:visible:eq(0)'); - if (focusedTemp.length > 0) { - focusedTemp.focus(); - this.$header.find('.focus-temp').removeClass('focus-temp'); - } - - // fix bug: $.data() is not working as expected after $.append() - this.$header.find('th[data-field]').each(function (i) { - that.$header_.find(sprintf('th[data-field="%s"]', $(this).data('field'))).data($(this).data()); - }); - - var visibleFields = this.getVisibleFields(), - $ths = this.$header_.find('th'); - - this.$body.find('>tr:first-child:not(.no-records-found) > *').each(function (i) { - var $this = $(this), - index = i; - - if (that.options.detailView && !that.options.cardView) { - if (i === 0) { - that.$header_.find('th.detail').find('.fht-cell').width($this.innerWidth()); - } - index = i - 1; - } - - var $th = that.$header_.find(sprintf('th[data-field="%s"]', visibleFields[index])); - if ($th.length > 1) { - $th = $($ths[$this[0].cellIndex]); - } - - $th.find('.fht-cell').width($this.innerWidth()); - }); - // horizontal scroll event - // TODO: it's probably better improving the layout than binding to scroll event - this.$tableBody.off('scroll').on('scroll', function () { - that.$tableHeader.scrollLeft($(this).scrollLeft()); - - if (that.options.showFooter && !that.options.cardView) { - that.$tableFooter.scrollLeft($(this).scrollLeft()); - } - }); - that.trigger('post-header'); - }; - - BootstrapTable.prototype.resetFooter = function () { - var that = this, - data = that.getData(), - html = []; - - if (!this.options.showFooter || this.options.cardView) { //do nothing - return; - } - - if (!this.options.cardView && this.options.detailView) { - html.push('
 
'); - } - - $.each(this.columns, function (i, column) { - var key, - falign = '', // footer align style - valign = '', - csses = [], - style = {}, - class_ = sprintf(' class="%s"', column['class']); - - if (!column.visible) { - return; - } - - if (that.options.cardView && (!column.cardVisible)) { - return; - } - - falign = sprintf('text-align: %s; ', column.falign ? column.falign : column.align); - valign = sprintf('vertical-align: %s; ', column.valign); - - style = calculateObjectValue(null, that.options.footerStyle); - - if (style && style.css) { - for (key in style.css) { - csses.push(key + ': ' + style.css[key]); - } - } - - html.push(''); - html.push('
'); - - html.push(calculateObjectValue(column, column.footerFormatter, [data], ' ') || ' '); - - html.push('
'); - html.push('
'); - html.push(''); - html.push(''); - }); - - this.$tableFooter.find('tr').html(html.join('')); - this.$tableFooter.show(); - clearTimeout(this.timeoutFooter_); - this.timeoutFooter_ = setTimeout($.proxy(this.fitFooter, this), - this.$el.is(':hidden') ? 100 : 0); - }; - - BootstrapTable.prototype.fitFooter = function () { - var that = this, - $footerTd, - elWidth, - scrollWidth; - - clearTimeout(this.timeoutFooter_); - if (this.$el.is(':hidden')) { - this.timeoutFooter_ = setTimeout($.proxy(this.fitFooter, this), 100); - return; - } - - elWidth = this.$el.css('width'); - scrollWidth = elWidth > this.$tableBody.width() ? getScrollBarWidth() : 0; - - this.$tableFooter.css({ - 'margin-right': scrollWidth - }).find('table').css('width', elWidth) - .attr('class', this.$el.attr('class')); - - $footerTd = this.$tableFooter.find('td'); - - this.$body.find('>tr:first-child:not(.no-records-found) > *').each(function (i) { - var $this = $(this); - - $footerTd.eq(i).find('.fht-cell').width($this.innerWidth()); - }); - }; - - BootstrapTable.prototype.toggleColumn = function (index, checked, needUpdate) { - if (index === -1) { - return; - } - this.columns[index].visible = checked; - this.initHeader(); - this.initSearch(); - this.initPagination(); - this.initBody(); - - if (this.options.showColumns) { - var $items = this.$toolbar.find('.keep-open input').prop('disabled', false); - - if (needUpdate) { - $items.filter(sprintf('[value="%s"]', index)).prop('checked', checked); - } - - if ($items.filter(':checked').length <= this.options.minimumCountColumns) { - $items.filter(':checked').prop('disabled', true); - } - } - }; - - BootstrapTable.prototype.getVisibleFields = function () { - var that = this, - visibleFields = []; - - $.each(this.header.fields, function (j, field) { - var column = that.columns[getFieldIndex(that.columns, field)]; - - if (!column.visible) { - return; - } - visibleFields.push(field); - }); - return visibleFields; - }; - - // PUBLIC FUNCTION DEFINITION - // ======================= - - BootstrapTable.prototype.resetView = function (params) { - var padding = 0; - - if (params && params.height) { - this.options.height = params.height; - } - - this.$selectAll.prop('checked', this.$selectItem.length > 0 && - this.$selectItem.length === this.$selectItem.filter(':checked').length); - - if (this.options.height) { - var toolbarHeight = this.$toolbar.outerHeight(true), - paginationHeight = this.$pagination.outerHeight(true), - height = this.options.height - toolbarHeight - paginationHeight; - - this.$tableContainer.css('height', height + 'px'); - } - - if (this.options.cardView) { - // remove the element css - this.$el.css('margin-top', '0'); - this.$tableContainer.css('padding-bottom', '0'); - this.$tableFooter.hide(); - return; - } - - if (this.options.showHeader && this.options.height) { - this.$tableHeader.show(); - this.resetHeader(); - padding += this.$header.outerHeight(); - } else { - this.$tableHeader.hide(); - this.trigger('post-header'); - } - - if (this.options.showFooter) { - this.resetFooter(); - if (this.options.height) { - padding += this.$tableFooter.outerHeight() + 1; - } - } - - // Assign the correct sortable arrow - this.getCaret(); - this.$tableContainer.css('padding-bottom', padding + 'px'); - this.trigger('reset-view'); - }; - - BootstrapTable.prototype.getData = function (useCurrentPage) { - return (this.searchText || !$.isEmptyObject(this.filterColumns) || !$.isEmptyObject(this.filterColumnsPartial)) ? - (useCurrentPage ? this.data.slice(this.pageFrom - 1, this.pageTo) : this.data) : - (useCurrentPage ? this.options.data.slice(this.pageFrom - 1, this.pageTo) : this.options.data); - }; - - BootstrapTable.prototype.load = function (data) { - var fixedScroll = false; - - // #431: support pagination - if (this.options.sidePagination === 'server') { - this.options.totalRows = data[this.options.totalField]; - fixedScroll = data.fixedScroll; - data = data[this.options.dataField]; - } else if (!$.isArray(data)) { // support fixedScroll - fixedScroll = data.fixedScroll; - data = data.data; - } - - this.initData(data); - this.initSearch(); - this.initPagination(); - this.initBody(fixedScroll); - }; - - BootstrapTable.prototype.append = function (data) { - this.initData(data, 'append'); - this.initSearch(); - this.initPagination(); - this.initSort(); - this.initBody(true); - }; - - BootstrapTable.prototype.prepend = function (data) { - this.initData(data, 'prepend'); - this.initSearch(); - this.initPagination(); - this.initSort(); - this.initBody(true); - }; - - BootstrapTable.prototype.remove = function (params) { - var len = this.options.data.length, - i, row; - - if (!params.hasOwnProperty('field') || !params.hasOwnProperty('values')) { - return; - } - - for (i = len - 1; i >= 0; i--) { - row = this.options.data[i]; - - if (!row.hasOwnProperty(params.field)) { - continue; - } - if ($.inArray(row[params.field], params.values) !== -1) { - this.options.data.splice(i, 1); - if (this.options.sidePagination === 'server') { - this.options.totalRows -= 1; - } - } - } - - if (len === this.options.data.length) { - return; - } - - this.initSearch(); - this.initPagination(); - this.initSort(); - this.initBody(true); - }; - - BootstrapTable.prototype.removeAll = function () { - if (this.options.data.length > 0) { - this.options.data.splice(0, this.options.data.length); - this.initSearch(); - this.initPagination(); - this.initBody(true); - } - }; - - BootstrapTable.prototype.getRowByUniqueId = function (id) { - var uniqueId = this.options.uniqueId, - len = this.options.data.length, - dataRow = null, - i, row, rowUniqueId; - - for (i = len - 1; i >= 0; i--) { - row = this.options.data[i]; - - if (row.hasOwnProperty(uniqueId)) { // uniqueId is a column - rowUniqueId = row[uniqueId]; - } else if(row._data.hasOwnProperty(uniqueId)) { // uniqueId is a row data property - rowUniqueId = row._data[uniqueId]; - } else { - continue; - } - - if (typeof rowUniqueId === 'string') { - id = id.toString(); - } else if (typeof rowUniqueId === 'number') { - if ((Number(rowUniqueId) === rowUniqueId) && (rowUniqueId % 1 === 0)) { - id = parseInt(id); - } else if ((rowUniqueId === Number(rowUniqueId)) && (rowUniqueId !== 0)) { - id = parseFloat(id); - } - } - - if (rowUniqueId === id) { - dataRow = row; - break; - } - } - - return dataRow; - }; - - BootstrapTable.prototype.removeByUniqueId = function (id) { - var len = this.options.data.length, - row = this.getRowByUniqueId(id); - - if (row) { - this.options.data.splice(this.options.data.indexOf(row), 1); - } - - if (len === this.options.data.length) { - return; - } - - this.initSearch(); - this.initPagination(); - this.initBody(true); - }; - - BootstrapTable.prototype.updateByUniqueId = function (params) { - var that = this; - var allParams = $.isArray(params) ? params : [ params ]; - - $.each(allParams, function(i, params) { - var rowId; - - if (!params.hasOwnProperty('id') || !params.hasOwnProperty('row')) { - return; - } - - rowId = $.inArray(that.getRowByUniqueId(params.id), that.options.data); - - if (rowId === -1) { - return; - } - $.extend(that.options.data[rowId], params.row); - }); - - this.initSearch(); - this.initPagination(); - this.initSort(); - this.initBody(true); - }; - - BootstrapTable.prototype.insertRow = function (params) { - if (!params.hasOwnProperty('index') || !params.hasOwnProperty('row')) { - return; - } - this.data.splice(params.index, 0, params.row); - this.initSearch(); - this.initPagination(); - this.initSort(); - this.initBody(true); - }; - - BootstrapTable.prototype.updateRow = function (params) { - var that = this; - var allParams = $.isArray(params) ? params : [ params ]; - - $.each(allParams, function(i, params) { - if (!params.hasOwnProperty('index') || !params.hasOwnProperty('row')) { - return; - } - $.extend(that.options.data[params.index], params.row); - }); - - this.initSearch(); - this.initPagination(); - this.initSort(); - this.initBody(true); - }; - - BootstrapTable.prototype.initHiddenRows = function () { - this.hiddenRows = []; - }; - - BootstrapTable.prototype.showRow = function (params) { - this.toggleRow(params, true); - }; - - BootstrapTable.prototype.hideRow = function (params) { - this.toggleRow(params, false); - }; - - BootstrapTable.prototype.toggleRow = function (params, visible) { - var row, index; - - if (params.hasOwnProperty('index')) { - row = this.getData()[params.index]; - } else if (params.hasOwnProperty('uniqueId')) { - row = this.getRowByUniqueId(params.uniqueId); - } - - if (!row) { - return; - } - - index = $.inArray(row, this.hiddenRows); - - if (!visible && index === -1) { - this.hiddenRows.push(row); - } else if (visible && index > -1) { - this.hiddenRows.splice(index, 1); - } - this.initBody(true); - }; - - BootstrapTable.prototype.getHiddenRows = function (show) { - var that = this, - data = this.getData(), - rows = []; - - $.each(data, function (i, row) { - if ($.inArray(row, that.hiddenRows) > -1) { - rows.push(row); - } - }); - this.hiddenRows = rows; - return rows; - }; - - BootstrapTable.prototype.mergeCells = function (options) { - var row = options.index, - col = $.inArray(options.field, this.getVisibleFields()), - rowspan = options.rowspan || 1, - colspan = options.colspan || 1, - i, j, - $tr = this.$body.find('>tr'), - $td; - - if (this.options.detailView && !this.options.cardView) { - col += 1; - } - - $td = $tr.eq(row).find('>td').eq(col); - - if (row < 0 || col < 0 || row >= this.data.length) { - return; - } - - for (i = row; i < row + rowspan; i++) { - for (j = col; j < col + colspan; j++) { - $tr.eq(i).find('>td').eq(j).hide(); - } - } - - $td.attr('rowspan', rowspan).attr('colspan', colspan).show(); - }; - - BootstrapTable.prototype.updateCell = function (params) { - if (!params.hasOwnProperty('index') || - !params.hasOwnProperty('field') || - !params.hasOwnProperty('value')) { - return; - } - this.data[params.index][params.field] = params.value; - - if (params.reinit === false) { - return; - } - this.initSort(); - this.initBody(true); - }; - - BootstrapTable.prototype.getOptions = function () { - return this.options; - }; - - BootstrapTable.prototype.getSelections = function () { - var that = this; - - return $.grep(this.options.data, function (row) { - // fix #2424: from html with checkbox - return row[that.header.stateField] === true; - }); - }; - - BootstrapTable.prototype.getAllSelections = function () { - var that = this; - - return $.grep(this.options.data, function (row) { - return row[that.header.stateField]; - }); - }; - - BootstrapTable.prototype.checkAll = function () { - this.checkAll_(true); - }; - - BootstrapTable.prototype.uncheckAll = function () { - this.checkAll_(false); - }; - - BootstrapTable.prototype.checkInvert = function () { - var that = this; - var rows = that.$selectItem.filter(':enabled'); - var checked = rows.filter(':checked'); - rows.each(function() { - $(this).prop('checked', !$(this).prop('checked')); - }); - that.updateRows(); - that.updateSelected(); - that.trigger('uncheck-some', checked); - checked = that.getSelections(); - that.trigger('check-some', checked); - }; - - BootstrapTable.prototype.checkAll_ = function (checked) { - var rows; - if (!checked) { - rows = this.getSelections(); - } - this.$selectAll.add(this.$selectAll_).prop('checked', checked); - this.$selectItem.filter(':enabled').prop('checked', checked); - this.updateRows(); - if (checked) { - rows = this.getSelections(); - } - this.trigger(checked ? 'check-all' : 'uncheck-all', rows); - }; - - BootstrapTable.prototype.check = function (index) { - this.check_(true, index); - }; - - BootstrapTable.prototype.uncheck = function (index) { - this.check_(false, index); - }; - - BootstrapTable.prototype.check_ = function (checked, index) { - var $el = this.$selectItem.filter(sprintf('[data-index="%s"]', index)).prop('checked', checked); - this.data[index][this.header.stateField] = checked; - this.updateSelected(); - this.trigger(checked ? 'check' : 'uncheck', this.data[index], $el); - }; - - BootstrapTable.prototype.checkBy = function (obj) { - this.checkBy_(true, obj); - }; - - BootstrapTable.prototype.uncheckBy = function (obj) { - this.checkBy_(false, obj); - }; - - BootstrapTable.prototype.checkBy_ = function (checked, obj) { - if (!obj.hasOwnProperty('field') || !obj.hasOwnProperty('values')) { - return; - } - - var that = this, - rows = []; - $.each(this.options.data, function (index, row) { - if (!row.hasOwnProperty(obj.field)) { - return false; - } - if ($.inArray(row[obj.field], obj.values) !== -1) { - var $el = that.$selectItem.filter(':enabled') - .filter(sprintf('[data-index="%s"]', index)).prop('checked', checked); - row[that.header.stateField] = checked; - rows.push(row); - that.trigger(checked ? 'check' : 'uncheck', row, $el); - } - }); - this.updateSelected(); - this.trigger(checked ? 'check-some' : 'uncheck-some', rows); - }; - - BootstrapTable.prototype.destroy = function () { - this.$el.insertBefore(this.$container); - $(this.options.toolbar).insertBefore(this.$el); - this.$container.next().remove(); - this.$container.remove(); - this.$el.html(this.$el_.html()) - .css('margin-top', '0') - .attr('class', this.$el_.attr('class') || ''); // reset the class - }; - - BootstrapTable.prototype.showLoading = function () { - this.$tableLoading.show(); - }; - - BootstrapTable.prototype.hideLoading = function () { - this.$tableLoading.hide(); - }; - - BootstrapTable.prototype.togglePagination = function () { - this.options.pagination = !this.options.pagination; - var button = this.$toolbar.find('button[name="paginationSwitch"] i'); - if (this.options.pagination) { - button.attr("class", this.options.iconsPrefix + " " + this.options.icons.paginationSwitchDown); - } else { - button.attr("class", this.options.iconsPrefix + " " + this.options.icons.paginationSwitchUp); - } - this.updatePagination(); - }; - - BootstrapTable.prototype.refresh = function (params) { - if (params && params.url) { - this.options.url = params.url; - } - if (params && params.pageNumber) { - this.options.pageNumber = params.pageNumber; - } - if (params && params.pageSize) { - this.options.pageSize = params.pageSize; - } - this.initServer(params && params.silent, - params && params.query, params && params.url); - this.trigger('refresh', params); - }; - - BootstrapTable.prototype.resetWidth = function () { - if (this.options.showHeader && this.options.height) { - this.fitHeader(); - } - if (this.options.showFooter) { - this.fitFooter(); - } - }; - - BootstrapTable.prototype.showColumn = function (field) { - this.toggleColumn(getFieldIndex(this.columns, field), true, true); - }; - - BootstrapTable.prototype.hideColumn = function (field) { - this.toggleColumn(getFieldIndex(this.columns, field), false, true); - }; - - BootstrapTable.prototype.getHiddenColumns = function () { - return $.grep(this.columns, function (column) { - return !column.visible; - }); - }; - - BootstrapTable.prototype.getVisibleColumns = function () { - return $.grep(this.columns, function (column) { - return column.visible; - }); - }; - - BootstrapTable.prototype.toggleAllColumns = function (visible) { - $.each(this.columns, function (i, column) { - this.columns[i].visible = visible; - }); - - this.initHeader(); - this.initSearch(); - this.initPagination(); - this.initBody(); - if (this.options.showColumns) { - var $items = this.$toolbar.find('.keep-open input').prop('disabled', false); - - if ($items.filter(':checked').length <= this.options.minimumCountColumns) { - $items.filter(':checked').prop('disabled', true); - } - } - }; - - BootstrapTable.prototype.showAllColumns = function () { - this.toggleAllColumns(true); - }; - - BootstrapTable.prototype.hideAllColumns = function () { - this.toggleAllColumns(false); - }; - - BootstrapTable.prototype.filterBy = function (columns) { - this.filterColumns = $.isEmptyObject(columns) ? {} : columns; - this.options.pageNumber = 1; - this.initSearch(); - this.updatePagination(); - }; - - BootstrapTable.prototype.scrollTo = function (value) { - if (typeof value === 'string') { - value = value === 'bottom' ? this.$tableBody[0].scrollHeight : 0; - } - if (typeof value === 'number') { - this.$tableBody.scrollTop(value); - } - if (typeof value === 'undefined') { - return this.$tableBody.scrollTop(); - } - }; - - BootstrapTable.prototype.getScrollPosition = function () { - return this.scrollTo(); - }; - - BootstrapTable.prototype.selectPage = function (page) { - if (page > 0 && page <= this.options.totalPages) { - this.options.pageNumber = page; - this.updatePagination(); - } - }; - - BootstrapTable.prototype.prevPage = function () { - if (this.options.pageNumber > 1) { - this.options.pageNumber--; - this.updatePagination(); - } - }; - - BootstrapTable.prototype.nextPage = function () { - if (this.options.pageNumber < this.options.totalPages) { - this.options.pageNumber++; - this.updatePagination(); - } - }; - - BootstrapTable.prototype.toggleView = function () { - this.options.cardView = !this.options.cardView; - this.initHeader(); - // Fixed remove toolbar when click cardView button. - //that.initToolbar(); - this.initBody(); - this.trigger('toggle', this.options.cardView); - }; - - BootstrapTable.prototype.refreshOptions = function (options) { - //If the objects are equivalent then avoid the call of destroy / init methods - if (compareObjects(this.options, options, true)) { - return; - } - this.options = $.extend(this.options, options); - this.trigger('refresh-options', this.options); - this.destroy(); - this.init(); - }; - - BootstrapTable.prototype.resetSearch = function (text) { - var $search = this.$toolbar.find('.search input'); - $search.val(text || ''); - this.onSearch({currentTarget: $search}); - }; - - BootstrapTable.prototype.expandRow_ = function (expand, index) { - var $tr = this.$body.find(sprintf('> tr[data-index="%s"]', index)); - if ($tr.next().is('tr.detail-view') === (expand ? false : true)) { - $tr.find('> td > .detail-icon').click(); - } - }; - - BootstrapTable.prototype.expandRow = function (index) { - this.expandRow_(true, index); - }; - - BootstrapTable.prototype.collapseRow = function (index) { - this.expandRow_(false, index); - }; - - BootstrapTable.prototype.expandAllRows = function (isSubTable) { - if (isSubTable) { - var $tr = this.$body.find(sprintf('> tr[data-index="%s"]', 0)), - that = this, - detailIcon = null, - executeInterval = false, - idInterval = -1; - - if (!$tr.next().is('tr.detail-view')) { - $tr.find('> td > .detail-icon').click(); - executeInterval = true; - } else if (!$tr.next().next().is('tr.detail-view')) { - $tr.next().find(".detail-icon").click(); - executeInterval = true; - } - - if (executeInterval) { - try { - idInterval = setInterval(function () { - detailIcon = that.$body.find("tr.detail-view").last().find(".detail-icon"); - if (detailIcon.length > 0) { - detailIcon.click(); - } else { - clearInterval(idInterval); - } - }, 1); - } catch (ex) { - clearInterval(idInterval); - } - } - } else { - var trs = this.$body.children(); - for (var i = 0; i < trs.length; i++) { - this.expandRow_(true, $(trs[i]).data("index")); - } - } - }; - - BootstrapTable.prototype.collapseAllRows = function (isSubTable) { - if (isSubTable) { - this.expandRow_(false, 0); - } else { - var trs = this.$body.children(); - for (var i = 0; i < trs.length; i++) { - this.expandRow_(false, $(trs[i]).data("index")); - } - } - }; - - BootstrapTable.prototype.updateFormatText = function (name, text) { - if (this.options[sprintf('format%s', name)]) { - if (typeof text === 'string') { - this.options[sprintf('format%s', name)] = function () { - return text; - }; - } else if (typeof text === 'function') { - this.options[sprintf('format%s', name)] = text; - } - } - this.initToolbar(); - this.initPagination(); - this.initBody(); - }; - - // BOOTSTRAP TABLE PLUGIN DEFINITION - // ======================= - - var allowedMethods = [ - 'getOptions', - 'getSelections', 'getAllSelections', 'getData', - 'load', 'append', 'prepend', 'remove', 'removeAll', - 'insertRow', 'updateRow', 'updateCell', 'updateByUniqueId', 'removeByUniqueId', - 'getRowByUniqueId', 'showRow', 'hideRow', 'getHiddenRows', - 'mergeCells', - 'checkAll', 'uncheckAll', 'checkInvert', - 'check', 'uncheck', - 'checkBy', 'uncheckBy', - 'refresh', - 'resetView', - 'resetWidth', - 'destroy', - 'showLoading', 'hideLoading', - 'showColumn', 'hideColumn', 'getHiddenColumns', 'getVisibleColumns', - 'showAllColumns', 'hideAllColumns', - 'filterBy', - 'scrollTo', - 'getScrollPosition', - 'selectPage', 'prevPage', 'nextPage', - 'togglePagination', - 'toggleView', - 'refreshOptions', - 'resetSearch', - 'expandRow', 'collapseRow', 'expandAllRows', 'collapseAllRows', - 'updateFormatText' - ]; - - $.fn.bootstrapTable = function (option) { - var value, - args = Array.prototype.slice.call(arguments, 1); - - this.each(function () { - var $this = $(this), - data = $this.data('bootstrap.table'), - options = $.extend({}, BootstrapTable.DEFAULTS, $this.data(), - typeof option === 'object' && option); - - if (typeof option === 'string') { - if ($.inArray(option, allowedMethods) < 0) { - throw new Error("Unknown method: " + option); - } - - if (!data) { - return; - } - - value = data[option].apply(data, args); - - if (option === 'destroy') { - $this.removeData('bootstrap.table'); - } - } - - if (!data) { - $this.data('bootstrap.table', (data = new BootstrapTable(this, options))); - } - }); - - return typeof value === 'undefined' ? this : value; - }; - - $.fn.bootstrapTable.Constructor = BootstrapTable; - $.fn.bootstrapTable.defaults = BootstrapTable.DEFAULTS; - $.fn.bootstrapTable.columnDefaults = BootstrapTable.COLUMN_DEFAULTS; - $.fn.bootstrapTable.locales = BootstrapTable.LOCALES; - $.fn.bootstrapTable.methods = allowedMethods; - $.fn.bootstrapTable.utils = { - sprintf: sprintf, - getFieldIndex: getFieldIndex, - compareObjects: compareObjects, - calculateObjectValue: calculateObjectValue, - getItemField: getItemField, - objectKeys: objectKeys, - isIEBrowser: isIEBrowser - }; - - // BOOTSTRAP TABLE INIT - // ======================= - - $(function () { - $('[data-toggle="table"]').bootstrapTable(); - }); -})(jQuery); diff --git a/resources/assets/js/bootstrap-table.min.css b/resources/assets/js/bootstrap-table.min.css deleted file mode 100755 index ad36a502bf..0000000000 --- a/resources/assets/js/bootstrap-table.min.css +++ /dev/null @@ -1 +0,0 @@ -.fixed-table-container .bs-checkbox,.fixed-table-container .no-records-found{text-align:center}.fixed-table-body thead th .th-inner,.table td,.table th{box-sizing:border-box}.bootstrap-table .table{margin-bottom:0!important;border-bottom:1px solid #ddd;border-collapse:collapse!important;border-radius:1px}.bootstrap-table .table:not(.table-condensed),.bootstrap-table .table:not(.table-condensed)>tbody>tr>td,.bootstrap-table .table:not(.table-condensed)>tbody>tr>th,.bootstrap-table .table:not(.table-condensed)>tfoot>tr>td,.bootstrap-table .table:not(.table-condensed)>tfoot>tr>th,.bootstrap-table .table:not(.table-condensed)>thead>tr>td{padding:8px}.bootstrap-table .table.table-no-bordered>tbody>tr>td,.bootstrap-table .table.table-no-bordered>thead>tr>th{border-right:2px solid transparent}.fixed-table-container{position:relative;clear:both;border:1px solid #ddd;border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.fixed-table-container.table-no-bordered{border:1px solid transparent}.fixed-table-footer,.fixed-table-header{overflow:hidden}.fixed-table-footer{border-top:1px solid #ddd}.fixed-table-body{overflow-x:auto;overflow-y:auto;height:100%}.fixed-table-container table{width:100%}.fixed-table-container thead th{height:0;padding:0;margin:0;border-left:1px solid #ddd}.fixed-table-container thead th:focus{outline:transparent solid 0}.fixed-table-container thead th:first-child{border-left:none;border-top-left-radius:4px;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px}.fixed-table-container tbody td .th-inner,.fixed-table-container thead th .th-inner{padding:8px;line-height:24px;vertical-align:top;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fixed-table-container thead th .sortable{cursor:pointer;background-position:right;background-repeat:no-repeat;padding-right:30px}.fixed-table-container thead th .both{background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAkElEQVQoz7X QMQ5AQBCF4dWQSJxC5wwax1Cq1e7BAdxD5SL+Tq/QCM1oNiJidwox0355mXnG/DrEtIQ6azioNZQxI0ykPhTQIwhCR+BmBYtlK7kLJYwWCcJA9M4qdrZrd8pPjZWPtOqdRQy320YSV17OatFC4euts6z39GYMKRPCTKY9UnPQ6P+GtMRfGtPnBCiqhAeJPmkqAAAAAElFTkSuQmCC')}.fixed-table-container thead th .asc{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZ0lEQVQ4y2NgGLKgquEuFxBPAGI2ahhWCsS/gDibUoO0gPgxEP8H4ttArEyuQYxAPBdqEAxPBImTY5gjEL9DM+wTENuQahAvEO9DMwiGdwAxOymGJQLxTyD+jgWDxCMZRsEoGAVoAADeemwtPcZI2wAAAABJRU5ErkJggg==)}.fixed-table-container thead th .desc{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZUlEQVQ4y2NgGAWjYBSggaqGu5FA/BOIv2PBIPFEUgxjB+IdQPwfC94HxLykus4GiD+hGfQOiB3J8SojEE9EM2wuSJzcsFMG4ttQgx4DsRalkZENxL+AuJQaMcsGxBOAmGvopk8AVz1sLZgg0bsAAAAASUVORK5CYII=)}.fixed-table-container th.detail{width:30px}.fixed-table-container tbody td{border-left:1px solid #ddd}.fixed-table-container tbody tr:first-child td{border-top:none}.fixed-table-container tbody td:first-child{border-left:none}.fixed-table-container tbody .selected td{background-color:#f5f5f5}.fixed-table-container .bs-checkbox .th-inner{padding:8px 0}.fixed-table-container input[type=radio],.fixed-table-container input[type=checkbox]{margin:0 auto!important}.fixed-table-pagination .pagination-detail,.fixed-table-pagination div.pagination{margin-top:10px;margin-bottom:10px}.fixed-table-pagination div.pagination .pagination{margin:0}.fixed-table-pagination .pagination a{padding:6px 12px;line-height:1.428571429}.fixed-table-pagination .pagination-info{line-height:34px;margin-right:5px}.fixed-table-pagination .btn-group{position:relative;display:inline-block;vertical-align:middle}.fixed-table-pagination .dropup .dropdown-menu{margin-bottom:0}.fixed-table-pagination .page-list{display:inline-block}.fixed-table-toolbar .columns-left{margin-right:5px}.fixed-table-toolbar .columns-right{margin-left:5px}.fixed-table-toolbar .columns label{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.428571429}.fixed-table-toolbar .bars,.fixed-table-toolbar .columns,.fixed-table-toolbar .search{position:relative;margin-top:10px;margin-bottom:10px;line-height:34px}.fixed-table-pagination li.disabled a{pointer-events:none;cursor:default}.fixed-table-loading{display:none;position:absolute;top:42px;right:0;bottom:0;left:0;z-index:99;background-color:#fff;text-align:center}.fixed-table-body .card-view .title{font-weight:700;display:inline-block;min-width:30%;text-align:left!important}.table td,.table th{vertical-align:middle}.fixed-table-toolbar .dropdown-menu{text-align:left;max-height:300px;overflow:auto}.fixed-table-toolbar .btn-group>.btn-group{display:inline-block;margin-left:-1px!important}.fixed-table-toolbar .btn-group>.btn-group>.btn{border-radius:0}.fixed-table-toolbar .btn-group>.btn-group:first-child>.btn{border-top-left-radius:4px;border-bottom-left-radius:4px}.fixed-table-toolbar .btn-group>.btn-group:last-child>.btn{border-top-right-radius:4px;border-bottom-right-radius:4px}.bootstrap-table .table>thead>tr>th{vertical-align:bottom;border-bottom:1px solid #ddd}.bootstrap-table .table thead>tr>th{padding:0;margin:0}.bootstrap-table .fixed-table-footer tbody>tr>td{padding:0!important}.bootstrap-table .fixed-table-footer .table{border-bottom:none;border-radius:0;padding:0!important}.pull-right .dropdown-menu{right:0;left:auto}p.fixed-table-scroll-inner{width:100%;height:200px}div.fixed-table-scroll-outer{top:0;left:0;visibility:hidden;width:200px;height:150px;overflow:hidden} \ No newline at end of file diff --git a/resources/assets/js/bootstrap-table.min.js b/resources/assets/js/bootstrap-table.min.js deleted file mode 100755 index 9723e1a67d..0000000000 --- a/resources/assets/js/bootstrap-table.min.js +++ /dev/null @@ -1,8 +0,0 @@ -/* -* bootstrap-table - v1.11.1 - 2017-02-22 -* https://github.com/wenzhixin/bootstrap-table -* Copyright (c) 2017 zhixin wen -* Licensed MIT License -*/ -!function(a){"use strict";var b=null,c=function(a){var b=arguments,c=!0,d=1;return a=a.replace(/%s/g,function(){var a=b[d++];return"undefined"==typeof a?(c=!1,""):a}),c?a:""},d=function(b,c,d,e){var f="";return a.each(b,function(a,b){return b[c]===e?(f=b[d],!1):!0}),f},e=function(b,c){var d=-1;return a.each(b,function(a,b){return b.field===c?(d=a,!1):!0}),d},f=function(b){var c,d,e,f=0,g=[];for(c=0;cd;d++)g[c][d]=!1;for(c=0;ce;e++)g[c+e][k]=!0;for(e=0;j>e;e++)g[c][k+e]=!0}},g=function(){if(null===b){var c,d,e=a("

").addClass("fixed-table-scroll-inner"),f=a("

").addClass("fixed-table-scroll-outer");f.append(e),a("body").append(f),c=e[0].offsetWidth,f.css("overflow","scroll"),d=e[0].offsetWidth,c===d&&(d=f[0].clientWidth),f.remove(),b=c-d}return b},h=function(b,d,e,f){var g=d;if("string"==typeof d){var h=d.split(".");h.length>1?(g=window,a.each(h,function(a,b){g=g[b]})):g=window[d]}return"object"==typeof g?g:"function"==typeof g?g.apply(b,e||[]):!g&&"string"==typeof d&&c.apply(this,[d].concat(e))?c.apply(this,[d].concat(e)):f},i=function(b,c,d){var e=Object.getOwnPropertyNames(b),f=Object.getOwnPropertyNames(c),g="";if(d&&e.length!==f.length)return!1;for(var h=0;h-1&&b[g]!==c[g])return!1;return!0},j=function(a){return"string"==typeof a?a.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/`/g,"`"):a},k=function(a){for(var b in a){var c=b.split(/(?=[A-Z])/).join("-").toLowerCase();c!==b&&(a[c]=a[b],delete a[b])}return a},l=function(a,b,c){var d=a;if("string"!=typeof b||a.hasOwnProperty(b))return c?j(a[b]):a[b];var e=b.split(".");for(var f in e)e.hasOwnProperty(f)&&(d=d&&d[e[f]]);return c?j(d):d},m=function(){return!!(navigator.userAgent.indexOf("MSIE ")>0||navigator.userAgent.match(/Trident.*rv\:11\./))},n=function(){Object.keys||(Object.keys=function(){var a=Object.prototype.hasOwnProperty,b=!{toString:null}.propertyIsEnumerable("toString"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=c.length;return function(e){if("object"!=typeof e&&("function"!=typeof e||null===e))throw new TypeError("Object.keys called on non-object");var f,g,h=[];for(f in e)a.call(e,f)&&h.push(f);if(b)for(g=0;d>g;g++)a.call(e,c[g])&&h.push(c[g]);return h}}())},o=function(b,c){this.options=c,this.$el=a(b),this.$el_=this.$el.clone(),this.timeoutId_=0,this.timeoutFooter_=0,this.init()};o.DEFAULTS={classes:"table table-hover",sortClass:void 0,locale:void 0,height:void 0,undefinedText:"-",sortName:void 0,sortOrder:"asc",sortStable:!1,striped:!1,columns:[[]],data:[],totalField:"total",dataField:"rows",method:"get",url:void 0,ajax:void 0,cache:!0,contentType:"application/json",dataType:"json",ajaxOptions:{},queryParams:function(a){return a},queryParamsType:"limit",responseHandler:function(a){return a},pagination:!1,onlyInfoPagination:!1,paginationLoop:!0,sidePagination:"client",totalRows:0,pageNumber:1,pageSize:10,pageList:[10,25,50,100],paginationHAlign:"right",paginationVAlign:"bottom",paginationDetailHAlign:"left",paginationPreText:"‹",paginationNextText:"›",search:!1,searchOnEnterKey:!1,strictSearch:!1,searchAlign:"right",selectItemName:"btSelectItem",showHeader:!0,showFooter:!1,showColumns:!1,showPaginationSwitch:!1,showRefresh:!1,showToggle:!1,buttonsAlign:"right",smartDisplay:!0,escape:!1,minimumCountColumns:1,idField:void 0,uniqueId:void 0,cardView:!1,detailView:!1,detailFormatter:function(){return""},trimOnSearch:!0,clickToSelect:!1,singleSelect:!1,toolbar:void 0,toolbarAlign:"left",checkboxHeader:!0,sortable:!0,silentSort:!0,maintainSelected:!1,searchTimeOut:500,searchText:"",iconSize:void 0,buttonsClass:"default",iconsPrefix:"glyphicon",icons:{paginationSwitchDown:"glyphicon-collapse-down icon-chevron-down",paginationSwitchUp:"glyphicon-collapse-up icon-chevron-up",refresh:"glyphicon-refresh icon-refresh",toggle:"glyphicon-list-alt icon-list-alt",columns:"glyphicon-th icon-th",detailOpen:"glyphicon-plus icon-plus",detailClose:"glyphicon-minus icon-minus"},customSearch:a.noop,customSort:a.noop,rowStyle:function(){return{}},rowAttributes:function(){return{}},footerStyle:function(){return{}},onAll:function(){return!1},onClickCell:function(){return!1},onDblClickCell:function(){return!1},onClickRow:function(){return!1},onDblClickRow:function(){return!1},onSort:function(){return!1},onCheck:function(){return!1},onUncheck:function(){return!1},onCheckAll:function(){return!1},onUncheckAll:function(){return!1},onCheckSome:function(){return!1},onUncheckSome:function(){return!1},onLoadSuccess:function(){return!1},onLoadError:function(){return!1},onColumnSwitch:function(){return!1},onPageChange:function(){return!1},onSearch:function(){return!1},onToggle:function(){return!1},onPreBody:function(){return!1},onPostBody:function(){return!1},onPostHeader:function(){return!1},onExpandRow:function(){return!1},onCollapseRow:function(){return!1},onRefreshOptions:function(){return!1},onRefresh:function(){return!1},onResetView:function(){return!1}},o.LOCALES={},o.LOCALES["en-US"]=o.LOCALES.en={formatLoadingMessage:function(){return"Loading, please wait..."},formatRecordsPerPage:function(a){return c("%s rows per page",a)},formatShowingRows:function(a,b,d){return c("Showing %s to %s of %s rows",a,b,d)},formatDetailPagination:function(a){return c("Showing %s rows",a)},formatSearch:function(){return"Search"},formatNoMatches:function(){return"No matching records found"},formatPaginationSwitch:function(){return"Hide/Show pagination"},formatRefresh:function(){return"Refresh"},formatToggle:function(){return"Toggle"},formatColumns:function(){return"Columns"},formatAllRows:function(){return"All"}},a.extend(o.DEFAULTS,o.LOCALES["en-US"]),o.COLUMN_DEFAULTS={radio:!1,checkbox:!1,checkboxEnabled:!0,field:void 0,title:void 0,titleTooltip:void 0,"class":void 0,align:void 0,halign:void 0,falign:void 0,valign:void 0,width:void 0,sortable:!1,order:"asc",visible:!0,switchable:!0,clickToSelect:!0,formatter:void 0,footerFormatter:void 0,events:void 0,sorter:void 0,sortName:void 0,cellStyle:void 0,searchable:!0,searchFormatter:!0,cardVisible:!0,escape:!1},o.EVENTS={"all.bs.table":"onAll","click-cell.bs.table":"onClickCell","dbl-click-cell.bs.table":"onDblClickCell","click-row.bs.table":"onClickRow","dbl-click-row.bs.table":"onDblClickRow","sort.bs.table":"onSort","check.bs.table":"onCheck","uncheck.bs.table":"onUncheck","check-all.bs.table":"onCheckAll","uncheck-all.bs.table":"onUncheckAll","check-some.bs.table":"onCheckSome","uncheck-some.bs.table":"onUncheckSome","load-success.bs.table":"onLoadSuccess","load-error.bs.table":"onLoadError","column-switch.bs.table":"onColumnSwitch","page-change.bs.table":"onPageChange","search.bs.table":"onSearch","toggle.bs.table":"onToggle","pre-body.bs.table":"onPreBody","post-body.bs.table":"onPostBody","post-header.bs.table":"onPostHeader","expand-row.bs.table":"onExpandRow","collapse-row.bs.table":"onCollapseRow","refresh-options.bs.table":"onRefreshOptions","reset-view.bs.table":"onResetView","refresh.bs.table":"onRefresh"},o.prototype.init=function(){this.initLocale(),this.initContainer(),this.initTable(),this.initHeader(),this.initData(),this.initHiddenRows(),this.initFooter(),this.initToolbar(),this.initPagination(),this.initBody(),this.initSearchText(),this.initServer()},o.prototype.initLocale=function(){if(this.options.locale){var b=this.options.locale.split(/-|_/);b[0].toLowerCase(),b[1]&&b[1].toUpperCase(),a.fn.bootstrapTable.locales[this.options.locale]?a.extend(this.options,a.fn.bootstrapTable.locales[this.options.locale]):a.fn.bootstrapTable.locales[b.join("-")]?a.extend(this.options,a.fn.bootstrapTable.locales[b.join("-")]):a.fn.bootstrapTable.locales[b[0]]&&a.extend(this.options,a.fn.bootstrapTable.locales[b[0]])}},o.prototype.initContainer=function(){this.$container=a(['
','
',"top"===this.options.paginationVAlign||"both"===this.options.paginationVAlign?'
':"",'
','
','
','
',this.options.formatLoadingMessage(),"
","
",'',"bottom"===this.options.paginationVAlign||"both"===this.options.paginationVAlign?'
':"","
","
"].join("")),this.$container.insertAfter(this.$el),this.$tableContainer=this.$container.find(".fixed-table-container"),this.$tableHeader=this.$container.find(".fixed-table-header"),this.$tableBody=this.$container.find(".fixed-table-body"),this.$tableLoading=this.$container.find(".fixed-table-loading"),this.$tableFooter=this.$container.find(".fixed-table-footer"),this.$toolbar=this.$container.find(".fixed-table-toolbar"),this.$pagination=this.$container.find(".fixed-table-pagination"),this.$tableBody.append(this.$el),this.$container.after('
'),this.$el.addClass(this.options.classes),this.options.striped&&this.$el.addClass("table-striped"),-1!==a.inArray("table-no-bordered",this.options.classes.split(" "))&&this.$tableContainer.addClass("table-no-bordered")},o.prototype.initTable=function(){var b=this,c=[],d=[];if(this.$header=this.$el.find(">thead"),this.$header.length||(this.$header=a("").appendTo(this.$el)),this.$header.find("tr").each(function(){var b=[];a(this).find("th").each(function(){"undefined"!=typeof a(this).data("field")&&a(this).data("field",a(this).data("field")+""),b.push(a.extend({},{title:a(this).html(),"class":a(this).attr("class"),titleTooltip:a(this).attr("title"),rowspan:a(this).attr("rowspan")?+a(this).attr("rowspan"):void 0,colspan:a(this).attr("colspan")?+a(this).attr("colspan"):void 0},a(this).data()))}),c.push(b)}),a.isArray(this.options.columns[0])||(this.options.columns=[this.options.columns]),this.options.columns=a.extend(!0,[],c,this.options.columns),this.columns=[],f(this.options.columns),a.each(this.options.columns,function(c,d){a.each(d,function(d,e){e=a.extend({},o.COLUMN_DEFAULTS,e),"undefined"!=typeof e.fieldIndex&&(b.columns[e.fieldIndex]=e),b.options.columns[c][d]=e})}),!this.options.data.length){var e=[];this.$el.find(">tbody>tr").each(function(c){var f={};f._id=a(this).attr("id"),f._class=a(this).attr("class"),f._data=k(a(this).data()),a(this).find(">td").each(function(d){for(var g,h,i=a(this),j=+i.attr("colspan")||1,l=+i.attr("rowspan")||1;e[c]&&e[c][d];d++);for(g=d;d+j>g;g++)for(h=c;c+l>h;h++)e[h]||(e[h]=[]),e[h][g]=!0;var m=b.columns[d].field;f[m]=a(this).html(),f["_"+m+"_id"]=a(this).attr("id"),f["_"+m+"_class"]=a(this).attr("class"),f["_"+m+"_rowspan"]=a(this).attr("rowspan"),f["_"+m+"_colspan"]=a(this).attr("colspan"),f["_"+m+"_title"]=a(this).attr("title"),f["_"+m+"_data"]=k(a(this).data())}),d.push(f)}),this.options.data=d,d.length&&(this.fromHtml=!0)}},o.prototype.initHeader=function(){var b=this,d={},e=[];this.header={fields:[],styles:[],classes:[],formatters:[],events:[],sorters:[],sortNames:[],cellStyles:[],searchables:[]},a.each(this.options.columns,function(f,g){e.push(""),0===f&&!b.options.cardView&&b.options.detailView&&e.push(c('
',b.options.columns.length)),a.each(g,function(a,f){var g="",h="",i="",k="",l=c(' class="%s"',f["class"]),m=(b.options.sortOrder||f.order,"px"),n=f.width;if(void 0===f.width||b.options.cardView||"string"==typeof f.width&&-1!==f.width.indexOf("%")&&(m="%"),f.width&&"string"==typeof f.width&&(n=f.width.replace("%","").replace("px","")),h=c("text-align: %s; ",f.halign?f.halign:f.align),i=c("text-align: %s; ",f.align),k=c("vertical-align: %s; ",f.valign),k+=c("width: %s; ",!f.checkbox&&!f.radio||n?n?n+m:void 0:"36px"),"undefined"!=typeof f.fieldIndex){if(b.header.fields[f.fieldIndex]=f.field,b.header.styles[f.fieldIndex]=i+k,b.header.classes[f.fieldIndex]=l,b.header.formatters[f.fieldIndex]=f.formatter,b.header.events[f.fieldIndex]=f.events,b.header.sorters[f.fieldIndex]=f.sorter,b.header.sortNames[f.fieldIndex]=f.sortName,b.header.cellStyles[f.fieldIndex]=f.cellStyle,b.header.searchables[f.fieldIndex]=f.searchable,!f.visible)return;if(b.options.cardView&&!f.cardVisible)return;d[f.field]=f}e.push(""),e.push(c('
',b.options.sortable&&f.sortable?"sortable both":"")),g=b.options.escape?j(f.title):f.title,f.checkbox&&(!b.options.singleSelect&&b.options.checkboxHeader&&(g=''),b.header.stateField=f.field),f.radio&&(g="",b.header.stateField=f.field,b.options.singleSelect=!0),e.push(g),e.push("
"),e.push('
'),e.push("
"),e.push("")}),e.push("")}),this.$header.html(e.join("")),this.$header.find("th[data-field]").each(function(){a(this).data(d[a(this).data("field")])}),this.$container.off("click",".th-inner").on("click",".th-inner",function(c){var d=a(this);return b.options.detailView&&d.closest(".bootstrap-table")[0]!==b.$container[0]?!1:void(b.options.sortable&&d.parent().data().sortable&&b.onSort(c))}),this.$header.children().children().off("keypress").on("keypress",function(c){if(b.options.sortable&&a(this).data().sortable){var d=c.keyCode||c.which;13==d&&b.onSort(c)}}),a(window).off("resize.bootstrap-table"),!this.options.showHeader||this.options.cardView?(this.$header.hide(),this.$tableHeader.hide(),this.$tableLoading.css("top",0)):(this.$header.show(),this.$tableHeader.show(),this.$tableLoading.css("top",this.$header.outerHeight()+1),this.getCaret(),a(window).on("resize.bootstrap-table",a.proxy(this.resetWidth,this))),this.$selectAll=this.$header.find('[name="btSelectAll"]'),this.$selectAll.off("click").on("click",function(){var c=a(this).prop("checked");b[c?"checkAll":"uncheckAll"](),b.updateSelected()})},o.prototype.initFooter=function(){!this.options.showFooter||this.options.cardView?this.$tableFooter.hide():this.$tableFooter.show()},o.prototype.initData=function(a,b){this.data="append"===b?this.data.concat(a):"prepend"===b?[].concat(a).concat(this.data):a||this.options.data,this.options.data="append"===b?this.options.data.concat(a):"prepend"===b?[].concat(a).concat(this.options.data):this.data,"server"!==this.options.sidePagination&&this.initSort()},o.prototype.initSort=function(){var b=this,d=this.options.sortName,e="desc"===this.options.sortOrder?-1:1,f=a.inArray(this.options.sortName,this.header.fields),g=0;return this.options.customSort!==a.noop?void this.options.customSort.apply(this,[this.options.sortName,this.options.sortOrder]):void(-1!==f&&(this.options.sortStable&&a.each(this.data,function(a,b){b.hasOwnProperty("_position")||(b._position=a)}),this.data.sort(function(c,g){b.header.sortNames[f]&&(d=b.header.sortNames[f]);var i=l(c,d,b.options.escape),j=l(g,d,b.options.escape),k=h(b.header,b.header.sorters[f],[i,j]);return void 0!==k?e*k:((void 0===i||null===i)&&(i=""),(void 0===j||null===j)&&(j=""),b.options.sortStable&&i===j&&(i=c._position,j=g._position),a.isNumeric(i)&&a.isNumeric(j)?(i=parseFloat(i),j=parseFloat(j),j>i?-1*e:e):i===j?0:("string"!=typeof i&&(i=i.toString()),-1===i.localeCompare(j)?-1*e:e))}),void 0!==this.options.sortClass&&(clearTimeout(g),g=setTimeout(function(){b.$el.removeClass(b.options.sortClass);var a=b.$header.find(c('[data-field="%s"]',b.options.sortName).index()+1);b.$el.find(c("tr td:nth-child(%s)",a)).addClass(b.options.sortClass)},250))))},o.prototype.onSort=function(b){var c="keypress"===b.type?a(b.currentTarget):a(b.currentTarget).parent(),d=this.$header.find("th").eq(c.index());return this.$header.add(this.$header_).find("span.order").remove(),this.options.sortName===c.data("field")?this.options.sortOrder="asc"===this.options.sortOrder?"desc":"asc":(this.options.sortName=c.data("field"),this.options.sortOrder="asc"===c.data("order")?"desc":"asc"),this.trigger("sort",this.options.sortName,this.options.sortOrder),c.add(d).data("order",this.options.sortOrder),this.getCaret(),"server"===this.options.sidePagination?void this.initServer(this.options.silentSort):(this.initSort(),void this.initBody())},o.prototype.initToolbar=function(){var b,d,e=this,f=[],g=0,i=0;this.$toolbar.find(".bs-bars").children().length&&a("body").append(a(this.options.toolbar)),this.$toolbar.html(""),("string"==typeof this.options.toolbar||"object"==typeof this.options.toolbar)&&a(c('
',this.options.toolbarAlign)).appendTo(this.$toolbar).append(a(this.options.toolbar)),f=[c('
',this.options.buttonsAlign,this.options.buttonsAlign)],"string"==typeof this.options.icons&&(this.options.icons=h(null,this.options.icons)),this.options.showPaginationSwitch&&f.push(c('"),this.options.showRefresh&&f.push(c('"),this.options.showToggle&&f.push(c('"),this.options.showColumns&&(f.push(c('
',this.options.formatColumns()),'",'","
")),f.push("
"),(this.showToolbar||f.length>2)&&this.$toolbar.append(f.join("")),this.options.showPaginationSwitch&&this.$toolbar.find('button[name="paginationSwitch"]').off("click").on("click",a.proxy(this.togglePagination,this)),this.options.showRefresh&&this.$toolbar.find('button[name="refresh"]').off("click").on("click",a.proxy(this.refresh,this)),this.options.showToggle&&this.$toolbar.find('button[name="toggle"]').off("click").on("click",function(){e.toggleView()}),this.options.showColumns&&(b=this.$toolbar.find(".keep-open"),i<=this.options.minimumCountColumns&&b.find("input").prop("disabled",!0),b.find("li").off("click").on("click",function(a){a.stopImmediatePropagation()}),b.find("input").off("click").on("click",function(){var b=a(this);e.toggleColumn(a(this).val(),b.prop("checked"),!1),e.trigger("column-switch",a(this).data("field"),b.prop("checked"))})),this.options.search&&(f=[],f.push('"),this.$toolbar.append(f.join("")),d=this.$toolbar.find(".search input"),d.off("keyup drop blur").on("keyup drop blur",function(b){e.options.searchOnEnterKey&&13!==b.keyCode||a.inArray(b.keyCode,[37,38,39,40])>-1||(clearTimeout(g),g=setTimeout(function(){e.onSearch(b)},e.options.searchTimeOut))}),m()&&d.off("mouseup").on("mouseup",function(a){clearTimeout(g),g=setTimeout(function(){e.onSearch(a)},e.options.searchTimeOut)}))},o.prototype.onSearch=function(b){var c=a.trim(a(b.currentTarget).val());this.options.trimOnSearch&&a(b.currentTarget).val()!==c&&a(b.currentTarget).val(c),c!==this.searchText&&(this.searchText=c,this.options.searchText=c,this.options.pageNumber=1,this.initSearch(),this.updatePagination(),this.trigger("search",c))},o.prototype.initSearch=function(){var b=this;if("server"!==this.options.sidePagination){if(this.options.customSearch!==a.noop)return void this.options.customSearch.apply(this,[this.searchText]);var c=this.searchText&&(this.options.escape?j(this.searchText):this.searchText).toLowerCase(),d=a.isEmptyObject(this.filterColumns)?null:this.filterColumns;this.data=d?a.grep(this.options.data,function(b){for(var c in d)if(a.isArray(d[c])&&-1===a.inArray(b[c],d[c])||!a.isArray(d[c])&&b[c]!==d[c])return!1;return!0}):this.options.data,this.data=c?a.grep(this.data,function(d,f){for(var g=0;g-1&&(n=!0)}this.totalPages=~~((this.options.totalRows-1)/this.options.pageSize)+1,this.options.totalPages=this.totalPages}if(this.totalPages>0&&this.options.pageNumber>this.totalPages&&(this.options.pageNumber=this.totalPages),this.pageFrom=(this.options.pageNumber-1)*this.options.pageSize+1,this.pageTo=this.options.pageNumber*this.options.pageSize,this.pageTo>this.options.totalRows&&(this.pageTo=this.options.totalRows),m.push('
','',this.options.onlyInfoPagination?this.options.formatDetailPagination(this.options.totalRows):this.options.formatShowingRows(this.pageFrom,this.pageTo,this.options.totalRows),""),!this.options.onlyInfoPagination){m.push('');var r=[c('',"top"===this.options.paginationVAlign||"both"===this.options.paginationVAlign?"dropdown":"dropup"),'",'"),m.push(this.options.formatRecordsPerPage(r.join(""))),m.push(""),m.push("
",'")}this.$pagination.html(m.join("")),this.options.onlyInfoPagination||(f=this.$pagination.find(".page-list a"),g=this.$pagination.find(".page-first"),h=this.$pagination.find(".page-pre"),i=this.$pagination.find(".page-next"),j=this.$pagination.find(".page-last"),k=this.$pagination.find(".page-number"),this.options.smartDisplay&&(this.totalPages<=1&&this.$pagination.find("div.pagination").hide(),(p.length<2||this.options.totalRows<=p[0])&&this.$pagination.find("span.page-list").hide(),this.$pagination[this.getData().length?"show":"hide"]()),this.options.paginationLoop||(1===this.options.pageNumber&&h.addClass("disabled"),this.options.pageNumber===this.totalPages&&i.addClass("disabled")),n&&(this.options.pageSize=this.options.formatAllRows()),f.off("click").on("click",a.proxy(this.onPageListChange,this)),g.off("click").on("click",a.proxy(this.onPageFirst,this)),h.off("click").on("click",a.proxy(this.onPagePre,this)),i.off("click").on("click",a.proxy(this.onPageNext,this)),j.off("click").on("click",a.proxy(this.onPageLast,this)),k.off("click").on("click",a.proxy(this.onPageNumber,this)))},o.prototype.updatePagination=function(b){b&&a(b.currentTarget).hasClass("disabled")||(this.options.maintainSelected||this.resetRows(),this.initPagination(),"server"===this.options.sidePagination?this.initServer():this.initBody(),this.trigger("page-change",this.options.pageNumber,this.options.pageSize))},o.prototype.onPageListChange=function(b){var c=a(b.currentTarget);return c.parent().addClass("active").siblings().removeClass("active"),this.options.pageSize=c.text().toUpperCase()===this.options.formatAllRows().toUpperCase()?this.options.formatAllRows():+c.text(),this.$toolbar.find(".page-size").text(this.options.pageSize),this.updatePagination(b),!1},o.prototype.onPageFirst=function(a){return this.options.pageNumber=1,this.updatePagination(a),!1},o.prototype.onPagePre=function(a){return this.options.pageNumber-1===0?this.options.pageNumber=this.options.totalPages:this.options.pageNumber--,this.updatePagination(a),!1},o.prototype.onPageNext=function(a){return this.options.pageNumber+1>this.options.totalPages?this.options.pageNumber=1:this.options.pageNumber++,this.updatePagination(a),!1},o.prototype.onPageLast=function(a){return this.options.pageNumber=this.totalPages,this.updatePagination(a),!1},o.prototype.onPageNumber=function(b){return this.options.pageNumber!==+a(b.currentTarget).text()?(this.options.pageNumber=+a(b.currentTarget).text(),this.updatePagination(b),!1):void 0},o.prototype.initRow=function(b,e){var f,g=this,i=[],k={},m=[],n="",o={},p=[];if(!(a.inArray(b,this.hiddenRows)>-1)){if(k=h(this.options,this.options.rowStyle,[b,e],k),k&&k.css)for(f in k.css)m.push(f+": "+k.css[f]);if(o=h(this.options,this.options.rowAttributes,[b,e],o))for(f in o)p.push(c('%s="%s"',f,j(o[f])));return b._data&&!a.isEmptyObject(b._data)&&a.each(b._data,function(a,b){"index"!==a&&(n+=c(' data-%s="%s"',a,b))}),i.push(""),this.options.cardView&&i.push(c('
',this.header.fields.length)),!this.options.cardView&&this.options.detailView&&i.push("",'',c('',this.options.iconsPrefix,this.options.icons.detailOpen),"",""),a.each(this.header.fields,function(f,n){var o="",p=l(b,n,g.options.escape),q="",r="",s={},t="",u=g.header.classes[f],v="",w="",x="",y="",z=g.columns[f];if(!(g.fromHtml&&"undefined"==typeof p||!z.visible||g.options.cardView&&!z.cardVisible)){if(z.escape&&(p=j(p)),k=c('style="%s"',m.concat(g.header.styles[f]).join("; ")),b["_"+n+"_id"]&&(t=c(' id="%s"',b["_"+n+"_id"])),b["_"+n+"_class"]&&(u=c(' class="%s"',b["_"+n+"_class"])),b["_"+n+"_rowspan"]&&(w=c(' rowspan="%s"',b["_"+n+"_rowspan"])),b["_"+n+"_colspan"]&&(x=c(' colspan="%s"',b["_"+n+"_colspan"])),b["_"+n+"_title"]&&(y=c(' title="%s"',b["_"+n+"_title"])),s=h(g.header,g.header.cellStyles[f],[p,b,e,n],s),s.classes&&(u=c(' class="%s"',s.classes)),s.css){var A=[];for(var B in s.css)A.push(B+": "+s.css[B]);k=c('style="%s"',A.concat(g.header.styles[f]).join("; "))}q=h(z,g.header.formatters[f],[p,b,e],p),b["_"+n+"_data"]&&!a.isEmptyObject(b["_"+n+"_data"])&&a.each(b["_"+n+"_data"],function(a,b){"index"!==a&&(v+=c(' data-%s="%s"',a,b))}),z.checkbox||z.radio?(r=z.checkbox?"checkbox":r,r=z.radio?"radio":r,o=[c(g.options.cardView?'
':'',z["class"]||""),"",g.header.formatters[f]&&"string"==typeof q?q:"",g.options.cardView?"
":""].join(""),b[g.header.stateField]=q===!0||q&&q.checked):(q="undefined"==typeof q||null===q?g.options.undefinedText:q,o=g.options.cardView?['
',g.options.showHeader?c('%s',k,d(g.columns,"field","title",n)):"",c('%s',q),"
"].join(""):[c("",t,u,k,v,w,x,y),q,""].join(""),g.options.cardView&&g.options.smartDisplay&&""===q&&(o='
')),i.push(o)}}),this.options.cardView&&i.push("
"),i.push(""),i.join(" ")}},o.prototype.initBody=function(b){var d=this,f=this.getData();this.trigger("pre-body",f),this.$body=this.$el.find(">tbody"),this.$body.length||(this.$body=a("").appendTo(this.$el)),this.options.pagination&&"server"!==this.options.sidePagination||(this.pageFrom=1,this.pageTo=f.length);for(var g,i=a(document.createDocumentFragment()),j=this.pageFrom-1;j'+c('%s',this.$header.find("th").length,this.options.formatNoMatches())+""),this.$body.html(i),b||this.scrollTo(0),this.$body.find("> tr[data-index] > td").off("click dblclick").on("click dblclick",function(b){var f=a(this),g=f.parent(),h=d.data[g.data("index")],i=f[0].cellIndex,j=d.getVisibleFields(),k=j[d.options.detailView&&!d.options.cardView?i-1:i],m=d.columns[e(d.columns,k)],n=l(h,k,d.options.escape);if(!f.find(".detail-icon").length&&(d.trigger("click"===b.type?"click-cell":"dbl-click-cell",k,n,h,f),d.trigger("click"===b.type?"click-row":"dbl-click-row",h,g,k),"click"===b.type&&d.options.clickToSelect&&m.clickToSelect)){var o=g.find(c('[name="%s"]',d.options.selectItemName));o.length&&o[0].click()}}),this.$body.find("> tr[data-index] > td > .detail-icon").off("click").on("click",function(){var b=a(this),e=b.parent().parent(),g=e.data("index"),i=f[g];if(e.next().is("tr.detail-view"))b.find("i").attr("class",c("%s %s",d.options.iconsPrefix,d.options.icons.detailOpen)),d.trigger("collapse-row",g,i),e.next().remove();else{b.find("i").attr("class",c("%s %s",d.options.iconsPrefix,d.options.icons.detailClose)),e.after(c('',e.find("td").length));var j=e.next().find("td"),k=h(d.options,d.options.detailFormatter,[g,i,j],"");1===j.length&&j.append(k),d.trigger("expand-row",g,i,j)}return d.resetView(),!1}),this.$selectItem=this.$body.find(c('[name="%s"]',this.options.selectItemName)),this.$selectItem.off("click").on("click",function(b){b.stopImmediatePropagation();var c=a(this),e=c.prop("checked"),f=d.data[c.data("index")];d.options.maintainSelected&&a(this).is(":radio")&&a.each(d.options.data,function(a,b){b[d.header.stateField]=!1}),f[d.header.stateField]=e,d.options.singleSelect&&(d.$selectItem.not(this).each(function(){d.data[a(this).data("index")][d.header.stateField]=!1}),d.$selectItem.filter(":checked").not(this).prop("checked",!1)),d.updateSelected(),d.trigger(e?"check":"uncheck",f,c)}),a.each(this.header.events,function(b,c){if(c){"string"==typeof c&&(c=h(null,c));var e=d.header.fields[b],f=a.inArray(e,d.getVisibleFields());d.options.detailView&&!d.options.cardView&&(f+=1);for(var g in c)d.$body.find(">tr:not(.no-records-found)").each(function(){var b=a(this),h=b.find(d.options.cardView?".card-view":"td").eq(f),i=g.indexOf(" "),j=g.substring(0,i),k=g.substring(i+1),l=c[g];h.find(k).off(j).on(j,function(a){var c=b.data("index"),f=d.data[c],g=f[e];l.apply(this,[a,g,f,c])})})}}),this.updateSelected(),this.resetView(),this.trigger("post-body",f)},o.prototype.initServer=function(b,c,d){var e,f=this,g={},i={searchText:this.searchText,sortName:this.options.sortName,sortOrder:this.options.sortOrder};this.options.pagination&&(i.pageSize=this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize,i.pageNumber=this.options.pageNumber),(d||this.options.url||this.options.ajax)&&("limit"===this.options.queryParamsType&&(i={search:i.searchText,sort:i.sortName,order:i.sortOrder},this.options.pagination&&(i.offset=this.options.pageSize===this.options.formatAllRows()?0:this.options.pageSize*(this.options.pageNumber-1),i.limit=this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize)),a.isEmptyObject(this.filterColumnsPartial)||(i.filter=JSON.stringify(this.filterColumnsPartial,null)),g=h(this.options,this.options.queryParams,[i],g),a.extend(g,c||{}),g!==!1&&(b||this.$tableLoading.show(),e=a.extend({},h(null,this.options.ajaxOptions),{type:this.options.method,url:d||this.options.url,data:"application/json"===this.options.contentType&&"post"===this.options.method?JSON.stringify(g):g,cache:this.options.cache,contentType:this.options.contentType,dataType:this.options.dataType,success:function(a){a=h(f.options,f.options.responseHandler,[a],a),f.load(a),f.trigger("load-success",a),b||f.$tableLoading.hide()},error:function(a){f.trigger("load-error",a.status,a),b||f.$tableLoading.hide()}}),this.options.ajax?h(this,this.options.ajax,[e],null):(this._xhr&&4!==this._xhr.readyState&&this._xhr.abort(),this._xhr=a.ajax(e))))},o.prototype.initSearchText=function(){if(this.options.search&&""!==this.options.searchText){var a=this.$toolbar.find(".search input");a.val(this.options.searchText),this.onSearch({currentTarget:a})}},o.prototype.getCaret=function(){var b=this;a.each(this.$header.find("th"),function(c,d){a(d).find(".sortable").removeClass("desc asc").addClass(a(d).data("field")===b.options.sortName?b.options.sortOrder:"both")})},o.prototype.updateSelected=function(){var b=this.$selectItem.filter(":enabled").length&&this.$selectItem.filter(":enabled").length===this.$selectItem.filter(":enabled").filter(":checked").length;this.$selectAll.add(this.$selectAll_).prop("checked",b),this.$selectItem.each(function(){a(this).closest("tr")[a(this).prop("checked")?"addClass":"removeClass"]("selected")})},o.prototype.updateRows=function(){var b=this;this.$selectItem.each(function(){b.data[a(this).data("index")][b.header.stateField]=a(this).prop("checked")})},o.prototype.resetRows=function(){var b=this;a.each(this.data,function(a,c){b.$selectAll.prop("checked",!1),b.$selectItem.prop("checked",!1),b.header.stateField&&(c[b.header.stateField]=!1)}),this.initHiddenRows()},o.prototype.trigger=function(b){var c=Array.prototype.slice.call(arguments,1);b+=".bs.table",this.options[o.EVENTS[b]].apply(this.options,c),this.$el.trigger(a.Event(b),c),this.options.onAll(b,c),this.$el.trigger(a.Event("all.bs.table"),[b,c])},o.prototype.resetHeader=function(){clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(a.proxy(this.fitHeader,this),this.$el.is(":hidden")?100:0)},o.prototype.fitHeader=function(){var b,d,e,f,h=this;if(h.$el.is(":hidden"))return void(h.timeoutId_=setTimeout(a.proxy(h.fitHeader,h),100));if(b=this.$tableBody.get(0),d=b.scrollWidth>b.clientWidth&&b.scrollHeight>b.clientHeight+this.$header.outerHeight()?g():0,this.$el.css("margin-top",-this.$header.outerHeight()),e=a(":focus"),e.length>0){var i=e.parents("th");if(i.length>0){var j=i.attr("data-field");if(void 0!==j){var k=this.$header.find("[data-field='"+j+"']");k.length>0&&k.find(":input").addClass("focus-temp")}}}this.$header_=this.$header.clone(!0,!0),this.$selectAll_=this.$header_.find('[name="btSelectAll"]'),this.$tableHeader.css({"margin-right":d}).find("table").css("width",this.$el.outerWidth()).html("").attr("class",this.$el.attr("class")).append(this.$header_),f=a(".focus-temp:visible:eq(0)"),f.length>0&&(f.focus(),this.$header.find(".focus-temp").removeClass("focus-temp")),this.$header.find("th[data-field]").each(function(){h.$header_.find(c('th[data-field="%s"]',a(this).data("field"))).data(a(this).data())});var l=this.getVisibleFields(),m=this.$header_.find("th");this.$body.find(">tr:first-child:not(.no-records-found) > *").each(function(b){var d=a(this),e=b;h.options.detailView&&!h.options.cardView&&(0===b&&h.$header_.find("th.detail").find(".fht-cell").width(d.innerWidth()),e=b-1);var f=h.$header_.find(c('th[data-field="%s"]',l[e]));f.length>1&&(f=a(m[d[0].cellIndex])),f.find(".fht-cell").width(d.innerWidth())}),this.$tableBody.off("scroll").on("scroll",function(){h.$tableHeader.scrollLeft(a(this).scrollLeft()),h.options.showFooter&&!h.options.cardView&&h.$tableFooter.scrollLeft(a(this).scrollLeft())}),h.trigger("post-header")},o.prototype.resetFooter=function(){var b=this,d=b.getData(),e=[];this.options.showFooter&&!this.options.cardView&&(!this.options.cardView&&this.options.detailView&&e.push('
 
'),a.each(this.columns,function(a,f){var g,i="",j="",k=[],l={},m=c(' class="%s"',f["class"]);if(f.visible&&(!b.options.cardView||f.cardVisible)){if(i=c("text-align: %s; ",f.falign?f.falign:f.align),j=c("vertical-align: %s; ",f.valign),l=h(null,b.options.footerStyle),l&&l.css)for(g in l.css)k.push(g+": "+l.css[g]);e.push(""),e.push('
'),e.push(h(f,f.footerFormatter,[d]," ")||" "),e.push("
"),e.push('
'),e.push(""),e.push("")}}),this.$tableFooter.find("tr").html(e.join("")),this.$tableFooter.show(),clearTimeout(this.timeoutFooter_),this.timeoutFooter_=setTimeout(a.proxy(this.fitFooter,this),this.$el.is(":hidden")?100:0))},o.prototype.fitFooter=function(){var b,c,d;return clearTimeout(this.timeoutFooter_),this.$el.is(":hidden")?void(this.timeoutFooter_=setTimeout(a.proxy(this.fitFooter,this),100)):(c=this.$el.css("width"),d=c>this.$tableBody.width()?g():0,this.$tableFooter.css({"margin-right":d}).find("table").css("width",c).attr("class",this.$el.attr("class")),b=this.$tableFooter.find("td"),void this.$body.find(">tr:first-child:not(.no-records-found) > *").each(function(c){var d=a(this);b.eq(c).find(".fht-cell").width(d.innerWidth())}))},o.prototype.toggleColumn=function(a,b,d){if(-1!==a&&(this.columns[a].visible=b,this.initHeader(),this.initSearch(),this.initPagination(),this.initBody(),this.options.showColumns)){var e=this.$toolbar.find(".keep-open input").prop("disabled",!1);d&&e.filter(c('[value="%s"]',a)).prop("checked",b),e.filter(":checked").length<=this.options.minimumCountColumns&&e.filter(":checked").prop("disabled",!0)}},o.prototype.getVisibleFields=function(){var b=this,c=[];return a.each(this.header.fields,function(a,d){var f=b.columns[e(b.columns,d)];f.visible&&c.push(d)}),c},o.prototype.resetView=function(a){var b=0;if(a&&a.height&&(this.options.height=a.height),this.$selectAll.prop("checked",this.$selectItem.length>0&&this.$selectItem.length===this.$selectItem.filter(":checked").length),this.options.height){var c=this.$toolbar.outerHeight(!0),d=this.$pagination.outerHeight(!0),e=this.options.height-c-d;this.$tableContainer.css("height",e+"px")}return this.options.cardView?(this.$el.css("margin-top","0"),this.$tableContainer.css("padding-bottom","0"),void this.$tableFooter.hide()):(this.options.showHeader&&this.options.height?(this.$tableHeader.show(),this.resetHeader(),b+=this.$header.outerHeight()):(this.$tableHeader.hide(),this.trigger("post-header")),this.options.showFooter&&(this.resetFooter(),this.options.height&&(b+=this.$tableFooter.outerHeight()+1)),this.getCaret(),this.$tableContainer.css("padding-bottom",b+"px"),void this.trigger("reset-view"))},o.prototype.getData=function(b){return!this.searchText&&a.isEmptyObject(this.filterColumns)&&a.isEmptyObject(this.filterColumnsPartial)?b?this.options.data.slice(this.pageFrom-1,this.pageTo):this.options.data:b?this.data.slice(this.pageFrom-1,this.pageTo):this.data},o.prototype.load=function(b){var c=!1;"server"===this.options.sidePagination?(this.options.totalRows=b[this.options.totalField],c=b.fixedScroll,b=b[this.options.dataField]):a.isArray(b)||(c=b.fixedScroll,b=b.data),this.initData(b),this.initSearch(),this.initPagination(),this.initBody(c)},o.prototype.append=function(a){this.initData(a,"append"),this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0)},o.prototype.prepend=function(a){this.initData(a,"prepend"),this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0)},o.prototype.remove=function(b){var c,d,e=this.options.data.length;if(b.hasOwnProperty("field")&&b.hasOwnProperty("values")){for(c=e-1;c>=0;c--)d=this.options.data[c],d.hasOwnProperty(b.field)&&-1!==a.inArray(d[b.field],b.values)&&(this.options.data.splice(c,1),"server"===this.options.sidePagination&&(this.options.totalRows-=1));e!==this.options.data.length&&(this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0))}},o.prototype.removeAll=function(){this.options.data.length>0&&(this.options.data.splice(0,this.options.data.length),this.initSearch(),this.initPagination(),this.initBody(!0))},o.prototype.getRowByUniqueId=function(a){var b,c,d,e=this.options.uniqueId,f=this.options.data.length,g=null;for(b=f-1;b>=0;b--){if(c=this.options.data[b],c.hasOwnProperty(e))d=c[e];else{if(!c._data.hasOwnProperty(e))continue;d=c._data[e]}if("string"==typeof d?a=a.toString():"number"==typeof d&&(Number(d)===d&&d%1===0?a=parseInt(a):d===Number(d)&&0!==d&&(a=parseFloat(a))),d===a){g=c;break}}return g},o.prototype.removeByUniqueId=function(a){var b=this.options.data.length,c=this.getRowByUniqueId(a);c&&this.options.data.splice(this.options.data.indexOf(c),1),b!==this.options.data.length&&(this.initSearch(),this.initPagination(),this.initBody(!0))},o.prototype.updateByUniqueId=function(b){var c=this,d=a.isArray(b)?b:[b];a.each(d,function(b,d){var e;d.hasOwnProperty("id")&&d.hasOwnProperty("row")&&(e=a.inArray(c.getRowByUniqueId(d.id),c.options.data),-1!==e&&a.extend(c.options.data[e],d.row))}),this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0)},o.prototype.insertRow=function(a){a.hasOwnProperty("index")&&a.hasOwnProperty("row")&&(this.data.splice(a.index,0,a.row),this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0))},o.prototype.updateRow=function(b){var c=this,d=a.isArray(b)?b:[b];a.each(d,function(b,d){d.hasOwnProperty("index")&&d.hasOwnProperty("row")&&a.extend(c.options.data[d.index],d.row)}),this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0)},o.prototype.initHiddenRows=function(){this.hiddenRows=[]},o.prototype.showRow=function(a){this.toggleRow(a,!0)},o.prototype.hideRow=function(a){this.toggleRow(a,!1)},o.prototype.toggleRow=function(b,c){var d,e;b.hasOwnProperty("index")?d=this.getData()[b.index]:b.hasOwnProperty("uniqueId")&&(d=this.getRowByUniqueId(b.uniqueId)),d&&(e=a.inArray(d,this.hiddenRows),c||-1!==e?c&&e>-1&&this.hiddenRows.splice(e,1):this.hiddenRows.push(d),this.initBody(!0))},o.prototype.getHiddenRows=function(){var b=this,c=this.getData(),d=[];return a.each(c,function(c,e){a.inArray(e,b.hiddenRows)>-1&&d.push(e)}),this.hiddenRows=d,d},o.prototype.mergeCells=function(b){var c,d,e,f=b.index,g=a.inArray(b.field,this.getVisibleFields()),h=b.rowspan||1,i=b.colspan||1,j=this.$body.find(">tr");if(this.options.detailView&&!this.options.cardView&&(g+=1),e=j.eq(f).find(">td").eq(g),!(0>f||0>g||f>=this.data.length)){for(c=f;f+h>c;c++)for(d=g;g+i>d;d++)j.eq(c).find(">td").eq(d).hide();e.attr("rowspan",h).attr("colspan",i).show()}},o.prototype.updateCell=function(a){a.hasOwnProperty("index")&&a.hasOwnProperty("field")&&a.hasOwnProperty("value")&&(this.data[a.index][a.field]=a.value,a.reinit!==!1&&(this.initSort(),this.initBody(!0)))},o.prototype.getOptions=function(){return this.options},o.prototype.getSelections=function(){var b=this;return a.grep(this.options.data,function(a){return a[b.header.stateField]===!0})},o.prototype.getAllSelections=function(){var b=this;return a.grep(this.options.data,function(a){return a[b.header.stateField]})},o.prototype.checkAll=function(){this.checkAll_(!0)},o.prototype.uncheckAll=function(){this.checkAll_(!1)},o.prototype.checkInvert=function(){var b=this,c=b.$selectItem.filter(":enabled"),d=c.filter(":checked");c.each(function(){a(this).prop("checked",!a(this).prop("checked"))}),b.updateRows(),b.updateSelected(),b.trigger("uncheck-some",d),d=b.getSelections(),b.trigger("check-some",d)},o.prototype.checkAll_=function(a){var b;a||(b=this.getSelections()),this.$selectAll.add(this.$selectAll_).prop("checked",a),this.$selectItem.filter(":enabled").prop("checked",a),this.updateRows(),a&&(b=this.getSelections()),this.trigger(a?"check-all":"uncheck-all",b)},o.prototype.check=function(a){this.check_(!0,a)},o.prototype.uncheck=function(a){this.check_(!1,a)},o.prototype.check_=function(a,b){var d=this.$selectItem.filter(c('[data-index="%s"]',b)).prop("checked",a);this.data[b][this.header.stateField]=a,this.updateSelected(),this.trigger(a?"check":"uncheck",this.data[b],d)},o.prototype.checkBy=function(a){this.checkBy_(!0,a)},o.prototype.uncheckBy=function(a){this.checkBy_(!1,a)},o.prototype.checkBy_=function(b,d){if(d.hasOwnProperty("field")&&d.hasOwnProperty("values")){var e=this,f=[];a.each(this.options.data,function(g,h){if(!h.hasOwnProperty(d.field))return!1;if(-1!==a.inArray(h[d.field],d.values)){var i=e.$selectItem.filter(":enabled").filter(c('[data-index="%s"]',g)).prop("checked",b);h[e.header.stateField]=b,f.push(h),e.trigger(b?"check":"uncheck",h,i)}}),this.updateSelected(),this.trigger(b?"check-some":"uncheck-some",f)}},o.prototype.destroy=function(){this.$el.insertBefore(this.$container),a(this.options.toolbar).insertBefore(this.$el),this.$container.next().remove(),this.$container.remove(),this.$el.html(this.$el_.html()).css("margin-top","0").attr("class",this.$el_.attr("class")||"")},o.prototype.showLoading=function(){this.$tableLoading.show()},o.prototype.hideLoading=function(){this.$tableLoading.hide()},o.prototype.togglePagination=function(){this.options.pagination=!this.options.pagination;var a=this.$toolbar.find('button[name="paginationSwitch"] i');this.options.pagination?a.attr("class",this.options.iconsPrefix+" "+this.options.icons.paginationSwitchDown):a.attr("class",this.options.iconsPrefix+" "+this.options.icons.paginationSwitchUp),this.updatePagination()},o.prototype.refresh=function(a){a&&a.url&&(this.options.url=a.url),a&&a.pageNumber&&(this.options.pageNumber=a.pageNumber),a&&a.pageSize&&(this.options.pageSize=a.pageSize),this.initServer(a&&a.silent,a&&a.query,a&&a.url),this.trigger("refresh",a)},o.prototype.resetWidth=function(){this.options.showHeader&&this.options.height&&this.fitHeader(),this.options.showFooter&&this.fitFooter()},o.prototype.showColumn=function(a){this.toggleColumn(e(this.columns,a),!0,!0)},o.prototype.hideColumn=function(a){this.toggleColumn(e(this.columns,a),!1,!0)},o.prototype.getHiddenColumns=function(){return a.grep(this.columns,function(a){return!a.visible})},o.prototype.getVisibleColumns=function(){return a.grep(this.columns,function(a){return a.visible})},o.prototype.toggleAllColumns=function(b){if(a.each(this.columns,function(a){this.columns[a].visible=b}),this.initHeader(),this.initSearch(),this.initPagination(),this.initBody(),this.options.showColumns){var c=this.$toolbar.find(".keep-open input").prop("disabled",!1);c.filter(":checked").length<=this.options.minimumCountColumns&&c.filter(":checked").prop("disabled",!0)}},o.prototype.showAllColumns=function(){this.toggleAllColumns(!0)},o.prototype.hideAllColumns=function(){this.toggleAllColumns(!1)},o.prototype.filterBy=function(b){this.filterColumns=a.isEmptyObject(b)?{}:b,this.options.pageNumber=1,this.initSearch(),this.updatePagination()},o.prototype.scrollTo=function(a){return"string"==typeof a&&(a="bottom"===a?this.$tableBody[0].scrollHeight:0),"number"==typeof a&&this.$tableBody.scrollTop(a),"undefined"==typeof a?this.$tableBody.scrollTop():void 0},o.prototype.getScrollPosition=function(){return this.scrollTo()},o.prototype.selectPage=function(a){a>0&&a<=this.options.totalPages&&(this.options.pageNumber=a,this.updatePagination())},o.prototype.prevPage=function(){this.options.pageNumber>1&&(this.options.pageNumber--,this.updatePagination())},o.prototype.nextPage=function(){this.options.pageNumber tr[data-index="%s"]',b));d.next().is("tr.detail-view")===(a?!1:!0)&&d.find("> td > .detail-icon").click()},o.prototype.expandRow=function(a){this.expandRow_(!0,a)},o.prototype.collapseRow=function(a){this.expandRow_(!1,a)},o.prototype.expandAllRows=function(b){if(b){var d=this.$body.find(c('> tr[data-index="%s"]',0)),e=this,f=null,g=!1,h=-1;if(d.next().is("tr.detail-view")?d.next().next().is("tr.detail-view")||(d.next().find(".detail-icon").click(),g=!0):(d.find("> td > .detail-icon").click(),g=!0),g)try{h=setInterval(function(){f=e.$body.find("tr.detail-view").last().find(".detail-icon"),f.length>0?f.click():clearInterval(h)},1)}catch(i){clearInterval(h)}}else for(var j=this.$body.children(),k=0;k this.endDate) { - this.viewDate = new Date(this.endDate); - } else { - this.viewDate = new Date(this.date); - } - this.fill(); - }, - - fillDow: function(){ - var dowCnt = this.weekStart, - html = ''; - if(this.calendarWeeks){ - var cell = ' '; - html += cell; - this.picker.find('.datepicker-days thead tr:first-child').prepend(cell); - } - while (dowCnt < this.weekStart + 7) { - html += ''+dates[this.language].daysMin[(dowCnt++)%7]+''; - } - html += ''; - this.picker.find('.datepicker-days thead').append(html); - }, - - fillMonths: function(){ - var html = '', - i = 0; - while (i < 12) { - html += ''+dates[this.language].monthsShort[i++]+''; - } - this.picker.find('.datepicker-months td').html(html); - }, - - fill: function() { - var d = new Date(this.viewDate), - year = d.getUTCFullYear(), - month = d.getUTCMonth(), - startYear = this.startDate !== -Infinity ? this.startDate.getUTCFullYear() : -Infinity, - startMonth = this.startDate !== -Infinity ? this.startDate.getUTCMonth() : -Infinity, - endYear = this.endDate !== Infinity ? this.endDate.getUTCFullYear() : Infinity, - endMonth = this.endDate !== Infinity ? this.endDate.getUTCMonth() : Infinity, - currentDate = this.date && this.date.valueOf(), - today = new Date(); - this.picker.find('.datepicker-days thead th.switch') - .text(dates[this.language].months[month]+' '+year); - this.picker.find('tfoot th.today') - .text(dates[this.language].today) - .toggle(this.todayBtn !== false); - this.updateNavArrows(); - this.fillMonths(); - var prevMonth = UTCDate(year, month-1, 28,0,0,0,0), - day = DPGlobal.getDaysInMonth(prevMonth.getUTCFullYear(), prevMonth.getUTCMonth()); - prevMonth.setUTCDate(day); - prevMonth.setUTCDate(day - (prevMonth.getUTCDay() - this.weekStart + 7)%7); - var nextMonth = new Date(prevMonth); - nextMonth.setUTCDate(nextMonth.getUTCDate() + 42); - nextMonth = nextMonth.valueOf(); - var html = []; - var clsName; - while(prevMonth.valueOf() < nextMonth) { - if (prevMonth.getUTCDay() == this.weekStart) { - html.push(''); - if(this.calendarWeeks){ - // ISO 8601: First week contains first thursday. - // ISO also states week starts on Monday, but we can be more abstract here. - var - // Start of current week: based on weekstart/current date - ws = new Date(+prevMonth + (this.weekStart - prevMonth.getUTCDay() - 7) % 7 * 864e5), - // Thursday of this week - th = new Date(+ws + (7 + 4 - ws.getUTCDay()) % 7 * 864e5), - // First Thursday of year, year from thursday - yth = new Date(+(yth = UTCDate(th.getUTCFullYear(), 0, 1)) + (7 + 4 - yth.getUTCDay())%7*864e5), - // Calendar week: ms between thursdays, div ms per day, div 7 days - calWeek = (th - yth) / 864e5 / 7 + 1; - html.push(''+ calWeek +''); - - } - } - clsName = ''; - if (prevMonth.getUTCFullYear() < year || (prevMonth.getUTCFullYear() == year && prevMonth.getUTCMonth() < month)) { - clsName += ' old'; - } else if (prevMonth.getUTCFullYear() > year || (prevMonth.getUTCFullYear() == year && prevMonth.getUTCMonth() > month)) { - clsName += ' new'; - } - // Compare internal UTC date with local today, not UTC today - if (this.todayHighlight && - prevMonth.getUTCFullYear() == today.getFullYear() && - prevMonth.getUTCMonth() == today.getMonth() && - prevMonth.getUTCDate() == today.getDate()) { - clsName += ' today'; - } - if (currentDate && prevMonth.valueOf() == currentDate) { - clsName += ' active'; - } - if (prevMonth.valueOf() < this.startDate || prevMonth.valueOf() > this.endDate || - $.inArray(prevMonth.getUTCDay(), this.daysOfWeekDisabled) !== -1) { - clsName += ' disabled'; - } - html.push(''+prevMonth.getUTCDate() + ''); - if (prevMonth.getUTCDay() == this.weekEnd) { - html.push(''); - } - prevMonth.setUTCDate(prevMonth.getUTCDate()+1); - } - this.picker.find('.datepicker-days tbody').empty().append(html.join('')); - var currentYear = this.date && this.date.getUTCFullYear(); - - var months = this.picker.find('.datepicker-months') - .find('th:eq(1)') - .text(year) - .end() - .find('span').removeClass('active'); - if (currentYear && currentYear == year) { - months.eq(this.date.getUTCMonth()).addClass('active'); - } - if (year < startYear || year > endYear) { - months.addClass('disabled'); - } - if (year == startYear) { - months.slice(0, startMonth).addClass('disabled'); - } - if (year == endYear) { - months.slice(endMonth+1).addClass('disabled'); - } - - html = ''; - year = parseInt(year/10, 10) * 10; - var yearCont = this.picker.find('.datepicker-years') - .find('th:eq(1)') - .text(year + '-' + (year + 9)) - .end() - .find('td'); - year -= 1; - for (var i = -1; i < 11; i++) { - html += ''+year+''; - year += 1; - } - yearCont.html(html); - }, - - updateNavArrows: function() { - var d = new Date(this.viewDate), - year = d.getUTCFullYear(), - month = d.getUTCMonth(); - switch (this.viewMode) { - case 0: - if (this.startDate !== -Infinity && year <= this.startDate.getUTCFullYear() && month <= this.startDate.getUTCMonth()) { - this.picker.find('.prev').css({visibility: 'hidden'}); - } else { - this.picker.find('.prev').css({visibility: 'visible'}); - } - if (this.endDate !== Infinity && year >= this.endDate.getUTCFullYear() && month >= this.endDate.getUTCMonth()) { - this.picker.find('.next').css({visibility: 'hidden'}); - } else { - this.picker.find('.next').css({visibility: 'visible'}); - } - break; - case 1: - case 2: - if (this.startDate !== -Infinity && year <= this.startDate.getUTCFullYear()) { - this.picker.find('.prev').css({visibility: 'hidden'}); - } else { - this.picker.find('.prev').css({visibility: 'visible'}); - } - if (this.endDate !== Infinity && year >= this.endDate.getUTCFullYear()) { - this.picker.find('.next').css({visibility: 'hidden'}); - } else { - this.picker.find('.next').css({visibility: 'visible'}); - } - break; - } - }, - - click: function(e) { - e.stopPropagation(); - e.preventDefault(); - var target = $(e.target).closest('span, td, th'); - if (target.length == 1) { - switch(target[0].nodeName.toLowerCase()) { - case 'th': - switch(target[0].className) { - case 'switch': - this.showMode(1); - break; - case 'prev': - case 'next': - var dir = DPGlobal.modes[this.viewMode].navStep * (target[0].className == 'prev' ? -1 : 1); - switch(this.viewMode){ - case 0: - this.viewDate = this.moveMonth(this.viewDate, dir); - break; - case 1: - case 2: - this.viewDate = this.moveYear(this.viewDate, dir); - break; - } - this.fill(); - break; - case 'today': - var date = new Date(); - date = UTCDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0); - - this.showMode(-2); - var which = this.todayBtn == 'linked' ? null : 'view'; - this._setDate(date, which); - break; - } - break; - case 'span': - if (!target.is('.disabled')) { - this.viewDate.setUTCDate(1); - if (target.is('.month')) { - var month = target.parent().find('span').index(target); - this.viewDate.setUTCMonth(month); - this.element.trigger({ - type: 'changeMonth', - date: this.viewDate - }); - } else { - var year = parseInt(target.text(), 10)||0; - this.viewDate.setUTCFullYear(year); - this.element.trigger({ - type: 'changeYear', - date: this.viewDate - }); - } - this.showMode(-1); - this.fill(); - } - break; - case 'td': - if (target.is('.day') && !target.is('.disabled')){ - var day = parseInt(target.text(), 10)||1; - var year = this.viewDate.getUTCFullYear(), - month = this.viewDate.getUTCMonth(); - if (target.is('.old')) { - if (month === 0) { - month = 11; - year -= 1; - } else { - month -= 1; - } - } else if (target.is('.new')) { - if (month == 11) { - month = 0; - year += 1; - } else { - month += 1; - } - } - this._setDate(UTCDate(year, month, day,0,0,0,0)); - } - break; - } - } - }, - - _setDate: function(date, which){ - if (!which || which == 'date') - this.date = date; - if (!which || which == 'view') - this.viewDate = date; - this.fill(); - this.setValue(); - this.element.trigger({ - type: 'changeDate', - date: this.date - }); - var element; - if (this.isInput) { - element = this.element; - } else if (this.component){ - element = this.element.find('input'); - } - if (element) { - element.change(); - if (this.autoclose && (!which || which == 'date')) { - this.hide(); - } - } - }, - - moveMonth: function(date, dir){ - if (!dir) return date; - var new_date = new Date(date.valueOf()), - day = new_date.getUTCDate(), - month = new_date.getUTCMonth(), - mag = Math.abs(dir), - new_month, test; - dir = dir > 0 ? 1 : -1; - if (mag == 1){ - test = dir == -1 - // If going back one month, make sure month is not current month - // (eg, Mar 31 -> Feb 31 == Feb 28, not Mar 02) - ? function(){ return new_date.getUTCMonth() == month; } - // If going forward one month, make sure month is as expected - // (eg, Jan 31 -> Feb 31 == Feb 28, not Mar 02) - : function(){ return new_date.getUTCMonth() != new_month; }; - new_month = month + dir; - new_date.setUTCMonth(new_month); - // Dec -> Jan (12) or Jan -> Dec (-1) -- limit expected date to 0-11 - if (new_month < 0 || new_month > 11) - new_month = (new_month + 12) % 12; - } else { - // For magnitudes >1, move one month at a time... - for (var i=0; i= this.startDate && date <= this.endDate; - }, - - keydown: function(e){ - if (this.picker.is(':not(:visible)')){ - if (e.keyCode == 27) // allow escape to hide and re-show picker - this.show(); - return; - } - var dateChanged = false, - dir, day, month, - newDate, newViewDate; - switch(e.keyCode){ - case 27: // escape - this.hide(); - e.preventDefault(); - break; - case 37: // left - case 39: // right - if (!this.keyboardNavigation) break; - dir = e.keyCode == 37 ? -1 : 1; - if (e.ctrlKey){ - newDate = this.moveYear(this.date, dir); - newViewDate = this.moveYear(this.viewDate, dir); - } else if (e.shiftKey){ - newDate = this.moveMonth(this.date, dir); - newViewDate = this.moveMonth(this.viewDate, dir); - } else { - newDate = new Date(this.date); - newDate.setUTCDate(this.date.getUTCDate() + dir); - newViewDate = new Date(this.viewDate); - newViewDate.setUTCDate(this.viewDate.getUTCDate() + dir); - } - if (this.dateWithinRange(newDate)){ - this.date = newDate; - this.viewDate = newViewDate; - this.setValue(); - this.update(); - e.preventDefault(); - dateChanged = true; - } - break; - case 38: // up - case 40: // down - if (!this.keyboardNavigation) break; - dir = e.keyCode == 38 ? -1 : 1; - if (e.ctrlKey){ - newDate = this.moveYear(this.date, dir); - newViewDate = this.moveYear(this.viewDate, dir); - } else if (e.shiftKey){ - newDate = this.moveMonth(this.date, dir); - newViewDate = this.moveMonth(this.viewDate, dir); - } else { - newDate = new Date(this.date); - newDate.setUTCDate(this.date.getUTCDate() + dir * 7); - newViewDate = new Date(this.viewDate); - newViewDate.setUTCDate(this.viewDate.getUTCDate() + dir * 7); - } - if (this.dateWithinRange(newDate)){ - this.date = newDate; - this.viewDate = newViewDate; - this.setValue(); - this.update(); - e.preventDefault(); - dateChanged = true; - } - break; - case 13: // enter - this.hide(); - e.preventDefault(); - break; - case 9: // tab - this.hide(); - break; - } - if (dateChanged){ - this.element.trigger({ - type: 'changeDate', - date: this.date - }); - var element; - if (this.isInput) { - element = this.element; - } else if (this.component){ - element = this.element.find('input'); - } - if (element) { - element.change(); - } - } - }, - - showMode: function(dir) { - if (dir) { - this.viewMode = Math.max(0, Math.min(2, this.viewMode + dir)); - } - /* - vitalets: fixing bug of very special conditions: - jquery 1.7.1 + webkit + show inline datepicker in bootstrap popover. - Method show() does not set display css correctly and datepicker is not shown. - Changed to .css('display', 'block') solve the problem. - See https://github.com/vitalets/x-editable/issues/37 - - In jquery 1.7.2+ everything works fine. - */ - //this.picker.find('>div').hide().filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName).show(); - this.picker.find('>div').hide().filter('.datepicker-'+DPGlobal.modes[this.viewMode].clsName).css('display', 'block'); - this.updateNavArrows(); - } - }; - - $.fn.datepicker = function ( option ) { - var args = Array.apply(null, arguments); - args.shift(); - return this.each(function () { - var $this = $(this), - data = $this.data('datepicker'), - options = typeof option == 'object' && option; - if (!data) { - $this.data('datepicker', (data = new Datepicker(this, $.extend({}, $.fn.datepicker.defaults,options)))); - } - if (typeof option == 'string' && typeof data[option] == 'function') { - data[option].apply(data, args); - } - }); - }; - - $.fn.datepicker.defaults = { - }; - $.fn.datepicker.Constructor = Datepicker; - var dates = $.fn.datepicker.dates = { - en: { - days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"], - daysShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], - daysMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"], - months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], - monthsShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], - today: "Today" - } - }; - - var DPGlobal = { - modes: [ - { - clsName: 'days', - navFnc: 'Month', - navStep: 1 - }, - { - clsName: 'months', - navFnc: 'FullYear', - navStep: 1 - }, - { - clsName: 'years', - navFnc: 'FullYear', - navStep: 10 - }], - isLeapYear: function (year) { - return (((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0)); - }, - getDaysInMonth: function (year, month) { - return [31, (DPGlobal.isLeapYear(year) ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month]; - }, - validParts: /dd?|DD?|mm?|MM?|yy(?:yy)?/g, - nonpunctuation: /[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g, - parseFormat: function(format){ - // IE treats \0 as a string end in inputs (truncating the value), - // so it's a bad format delimiter, anyway - var separators = format.replace(this.validParts, '\0').split('\0'), - parts = format.match(this.validParts); - if (!separators || !separators.length || !parts || parts.length === 0){ - throw new Error("Invalid date format."); - } - return {separators: separators, parts: parts}; - }, - parseDate: function(date, format, language) { - if (date instanceof Date) return date; - if (/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(date)) { - var part_re = /([\-+]\d+)([dmwy])/, - parts = date.match(/([\-+]\d+)([dmwy])/g), - part, dir; - date = new Date(); - for (var i=0; i'+ - ''+ - ''+ - ''+ - ''+ - ''+ - '', - contTemplate: '', - footTemplate: '' - }; - DPGlobal.template = '
'+ - '
'+ - ''+ - DPGlobal.headTemplate+ - ''+ - DPGlobal.footTemplate+ - '
'+ - '
'+ - '
'+ - ''+ - DPGlobal.headTemplate+ - DPGlobal.contTemplate+ - DPGlobal.footTemplate+ - '
'+ - '
'+ - '
'+ - ''+ - DPGlobal.headTemplate+ - DPGlobal.contTemplate+ - DPGlobal.footTemplate+ - '
'+ - '
'+ - '
'; - - $.fn.datepicker.DPGlobal = DPGlobal; - -}( window.jQuery ); diff --git a/resources/assets/js/bootstrap.min.js b/resources/assets/js/bootstrap.min.js deleted file mode 100755 index d854a60cf3..0000000000 --- a/resources/assets/js/bootstrap.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/*! - * Bootstrap v3.3.6 (http://getbootstrap.com) - * Copyright 2011-2015 Twitter, Inc. - * Licensed under the MIT license - */ -if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>2)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.6",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.6",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.6",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.6",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.6",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&jdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-mo.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.6",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.6",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.6",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); \ No newline at end of file diff --git a/resources/assets/js/dashboard.js b/resources/assets/js/dashboard.js deleted file mode 100755 index 9c4ff7b286..0000000000 --- a/resources/assets/js/dashboard.js +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Author: Abdullah A Almsaeed - * Date: 4 Jan 2014 - * Description: - * This is a demo file used only for the main dashboard (index.html) - **/ - -$(function () { - - "use strict"; - - //Make the dashboard widgets sortable Using jquery UI - $(".connectedSortable").sortable({ - placeholder: "sort-highlight", - connectWith: ".connectedSortable", - handle: ".box-header, .nav-tabs", - forcePlaceholderSize: true, - zIndex: 999999 - }); - $(".connectedSortable .box-header, .connectedSortable .nav-tabs-custom").css("cursor", "move"); - - //jQuery UI sortable for the todo list - $(".todo-list").sortable({ - placeholder: "sort-highlight", - handle: ".handle", - forcePlaceholderSize: true, - zIndex: 999999 - }); - - //bootstrap WYSIHTML5 - text editor - $(".textarea").wysihtml5(); - - $('.daterange').daterangepicker({ - ranges: { - 'Today': [moment(), moment()], - 'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')], - 'Last 7 Days': [moment().subtract(6, 'days'), moment()], - 'Last 30 Days': [moment().subtract(29, 'days'), moment()], - 'This Month': [moment().startOf('month'), moment().endOf('month')], - 'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')] - }, - startDate: moment().subtract(29, 'days'), - endDate: moment() - }, function (start, end) { - window.alert("You chose: " + start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY')); - }); - - /* jQueryKnob */ - $(".knob").knob(); - - //jvectormap data - var visitorsData = { - "US": 398, //USA - "SA": 400, //Saudi Arabia - "CA": 1000, //Canada - "DE": 500, //Germany - "FR": 760, //France - "CN": 300, //China - "AU": 700, //Australia - "BR": 600, //Brazil - "IN": 800, //India - "GB": 320, //Great Britain - "RU": 3000 //Russia - }; - //World map by jvectormap - $('#world-map').vectorMap({ - map: 'world_mill_en', - backgroundColor: "transparent", - regionStyle: { - initial: { - fill: '#e4e4e4', - "fill-opacity": 1, - stroke: 'none', - "stroke-width": 0, - "stroke-opacity": 1 - } - }, - series: { - regions: [{ - values: visitorsData, - scale: ["#92c1dc", "#ebf4f9"], - normalizeFunction: 'polynomial' - }] - }, - onRegionLabelShow: function (e, el, code) { - if (typeof visitorsData[code] != "undefined") - el.html(el.html() + ': ' + visitorsData[code] + ' new visitors'); - } - }); - - //Sparkline charts - var myvalues = [1000, 1200, 920, 927, 931, 1027, 819, 930, 1021]; - $('#sparkline-1').sparkline(myvalues, { - type: 'line', - lineColor: '#92c1dc', - fillColor: "#ebf4f9", - height: '50', - width: '80' - }); - myvalues = [515, 519, 520, 522, 652, 810, 370, 627, 319, 630, 921]; - $('#sparkline-2').sparkline(myvalues, { - type: 'line', - lineColor: '#92c1dc', - fillColor: "#ebf4f9", - height: '50', - width: '80' - }); - myvalues = [15, 19, 20, 22, 33, 27, 31, 27, 19, 30, 21]; - $('#sparkline-3').sparkline(myvalues, { - type: 'line', - lineColor: '#92c1dc', - fillColor: "#ebf4f9", - height: '50', - width: '80' - }); - - //The Calender - $("#calendar").datepicker(); - - //SLIMSCROLL FOR CHAT WIDGET - $('#chat-box').slimScroll({ - height: '250px' - }); - - /* Morris.js Charts */ - // Sales chart - var area = new Morris.Area({ - element: 'revenue-chart', - resize: true, - data: [ - {y: '2011 Q1', item1: 2666, item2: 2666}, - {y: '2011 Q2', item1: 2778, item2: 2294}, - {y: '2011 Q3', item1: 4912, item2: 1969}, - {y: '2011 Q4', item1: 3767, item2: 3597}, - {y: '2012 Q1', item1: 6810, item2: 1914}, - {y: '2012 Q2', item1: 5670, item2: 4293}, - {y: '2012 Q3', item1: 4820, item2: 3795}, - {y: '2012 Q4', item1: 15073, item2: 5967}, - {y: '2013 Q1', item1: 10687, item2: 4460}, - {y: '2013 Q2', item1: 8432, item2: 5713} - ], - xkey: 'y', - ykeys: ['item1', 'item2'], - labels: ['Item 1', 'Item 2'], - lineColors: ['#a0d0e0', '#3c8dbc'], - hideHover: 'auto' - }); - var line = new Morris.Line({ - element: 'line-chart', - resize: true, - data: [ - {y: '2011 Q1', item1: 2666}, - {y: '2011 Q2', item1: 2778}, - {y: '2011 Q3', item1: 4912}, - {y: '2011 Q4', item1: 3767}, - {y: '2012 Q1', item1: 6810}, - {y: '2012 Q2', item1: 5670}, - {y: '2012 Q3', item1: 4820}, - {y: '2012 Q4', item1: 15073}, - {y: '2013 Q1', item1: 10687}, - {y: '2013 Q2', item1: 8432} - ], - xkey: 'y', - ykeys: ['item1'], - labels: ['Item 1'], - lineColors: ['#efefef'], - lineWidth: 2, - hideHover: 'auto', - gridTextColor: "#fff", - gridStrokeWidth: 0.4, - pointSize: 4, - pointStrokeColors: ["#efefef"], - gridLineColor: "#efefef", - gridTextFamily: "Open Sans", - gridTextSize: 10 - }); - - //Donut Chart - var donut = new Morris.Donut({ - element: 'sales-chart', - resize: true, - colors: ["#3c8dbc", "#f56954", "#00a65a"], - data: [ - {label: "Download Sales", value: 12}, - {label: "In-Store Sales", value: 30}, - {label: "Mail-Order Sales", value: 20} - ], - hideHover: 'auto' - }); - - //Fix for charts under tabs - $('.box ul.nav a').on('shown.bs.tab', function () { - area.redraw(); - donut.redraw(); - line.redraw(); - }); - - /* The todo list plugin */ - $(".todo-list").todolist({ - onCheck: function (ele) { - window.console.log("The element has been checked"); - return ele; - }, - onUncheck: function (ele) { - window.console.log("The element has been unchecked"); - return ele; - } - }); - -}); diff --git a/resources/assets/js/dashboard2.js b/resources/assets/js/dashboard2.js deleted file mode 100755 index a892b5b439..0000000000 --- a/resources/assets/js/dashboard2.js +++ /dev/null @@ -1,275 +0,0 @@ -$(function () { - - 'use strict'; - - /* ChartJS - * ------- - * Here we will create a few charts using ChartJS - */ - - //----------------------- - //- MONTHLY SALES CHART - - //----------------------- - - // Get context with jQuery - using jQuery's .get() method. - var salesChartCanvas = $("#salesChart").get(0).getContext("2d"); - // This will get the first returned node in the jQuery collection. - var salesChart = new Chart(salesChartCanvas); - - var salesChartData = { - labels: ["January", "February", "March", "April", "May", "June", "July"], - datasets: [ - { - label: "Electronics", - fillColor: "rgb(210, 214, 222)", - strokeColor: "rgb(210, 214, 222)", - pointColor: "rgb(210, 214, 222)", - pointStrokeColor: "#c1c7d1", - pointHighlightFill: "#fff", - pointHighlightStroke: "rgb(220,220,220)", - data: [65, 59, 80, 81, 56, 55, 40] - }, - { - label: "Digital Goods", - fillColor: "rgba(60,141,188,0.9)", - strokeColor: "rgba(60,141,188,0.8)", - pointColor: "#3b8bba", - pointStrokeColor: "rgba(60,141,188,1)", - pointHighlightFill: "#fff", - pointHighlightStroke: "rgba(60,141,188,1)", - data: [28, 48, 40, 19, 86, 27, 90] - } - ] - }; - - var salesChartOptions = { - //Boolean - If we should show the scale at all - showScale: true, - //Boolean - Whether grid lines are shown across the chart - scaleShowGridLines: false, - //String - Colour of the grid lines - scaleGridLineColor: "rgba(0,0,0,.05)", - //Number - Width of the grid lines - scaleGridLineWidth: 1, - //Boolean - Whether to show horizontal lines (except X axis) - scaleShowHorizontalLines: true, - //Boolean - Whether to show vertical lines (except Y axis) - scaleShowVerticalLines: true, - //Boolean - Whether the line is curved between points - bezierCurve: true, - //Number - Tension of the bezier curve between points - bezierCurveTension: 0.3, - //Boolean - Whether to show a dot for each point - pointDot: false, - //Number - Radius of each point dot in pixels - pointDotRadius: 4, - //Number - Pixel width of point dot stroke - pointDotStrokeWidth: 1, - //Number - amount extra to add to the radius to cater for hit detection outside the drawn point - pointHitDetectionRadius: 20, - //Boolean - Whether to show a stroke for datasets - datasetStroke: true, - //Number - Pixel width of dataset stroke - datasetStrokeWidth: 2, - //Boolean - Whether to fill the dataset with a color - datasetFill: true, - //String - A legend template - legendTemplate: "
    -legend\"><% for (var i=0; i
  • \"><%=datasets[i].label%>
  • <%}%>
", - //Boolean - whether to maintain the starting aspect ratio or not when responsive, if set to false, will take up entire container - maintainAspectRatio: true, - //Boolean - whether to make the chart responsive to window resizing - responsive: true - }; - - //Create the line chart - salesChart.Line(salesChartData, salesChartOptions); - - //--------------------------- - //- END MONTHLY SALES CHART - - //--------------------------- - - //------------- - //- PIE CHART - - //------------- - // Get context with jQuery - using jQuery's .get() method. - var pieChartCanvas = $("#pieChart").get(0).getContext("2d"); - var pieChart = new Chart(pieChartCanvas); - var PieData = [ - { - value: 700, - color: "#f56954", - highlight: "#f56954", - label: "Chrome" - }, - { - value: 500, - color: "#00a65a", - highlight: "#00a65a", - label: "IE" - }, - { - value: 400, - color: "#f39c12", - highlight: "#f39c12", - label: "FireFox" - }, - { - value: 600, - color: "#00c0ef", - highlight: "#00c0ef", - label: "Safari" - }, - { - value: 300, - color: "#3c8dbc", - highlight: "#3c8dbc", - label: "Opera" - }, - { - value: 100, - color: "#d2d6de", - highlight: "#d2d6de", - label: "Navigator" - } - ]; - var pieOptions = { - //Boolean - Whether we should show a stroke on each segment - segmentShowStroke: true, - //String - The colour of each segment stroke - segmentStrokeColor: "#fff", - //Number - The width of each segment stroke - segmentStrokeWidth: 1, - //Number - The percentage of the chart that we cut out of the middle - percentageInnerCutout: 50, // This is 0 for Pie charts - //Number - Amount of animation steps - animationSteps: 100, - //String - Animation easing effect - animationEasing: "easeOutBounce", - //Boolean - Whether we animate the rotation of the Doughnut - animateRotate: true, - //Boolean - Whether we animate scaling the Doughnut from the centre - animateScale: false, - //Boolean - whether to make the chart responsive to window resizing - responsive: true, - // Boolean - whether to maintain the starting aspect ratio or not when responsive, if set to false, will take up entire container - maintainAspectRatio: false, - //String - A legend template - legendTemplate: "
    -legend\"><% for (var i=0; i
  • \"><%if(segments[i].label){%><%=segments[i].label%><%}%>
  • <%}%>
", - //String - A tooltip template - tooltipTemplate: "<%=value %> <%=label%> users" - }; - //Create pie or douhnut chart - // You can switch between pie and douhnut using the method below. - pieChart.Doughnut(PieData, pieOptions); - //----------------- - //- END PIE CHART - - //----------------- - - /* jVector Maps - * ------------ - * Create a world map with markers - */ - $('#world-map-markers').vectorMap({ - map: 'world_mill_en', - normalizeFunction: 'polynomial', - hoverOpacity: 0.7, - hoverColor: false, - backgroundColor: 'transparent', - regionStyle: { - initial: { - fill: 'rgba(210, 214, 222, 1)', - "fill-opacity": 1, - stroke: 'none', - "stroke-width": 0, - "stroke-opacity": 1 - }, - hover: { - "fill-opacity": 0.7, - cursor: 'pointer' - }, - selected: { - fill: 'yellow' - }, - selectedHover: { - } - }, - markerStyle: { - initial: { - fill: '#00a65a', - stroke: '#111' - } - }, - markers: [ - {latLng: [41.90, 12.45], name: 'Vatican City'}, - {latLng: [43.73, 7.41], name: 'Monaco'}, - {latLng: [-0.52, 166.93], name: 'Nauru'}, - {latLng: [-8.51, 179.21], name: 'Tuvalu'}, - {latLng: [43.93, 12.46], name: 'San Marino'}, - {latLng: [47.14, 9.52], name: 'Liechtenstein'}, - {latLng: [7.11, 171.06], name: 'Marshall Islands'}, - {latLng: [17.3, -62.73], name: 'Saint Kitts and Nevis'}, - {latLng: [3.2, 73.22], name: 'Maldives'}, - {latLng: [35.88, 14.5], name: 'Malta'}, - {latLng: [12.05, -61.75], name: 'Grenada'}, - {latLng: [13.16, -61.23], name: 'Saint Vincent and the Grenadines'}, - {latLng: [13.16, -59.55], name: 'Barbados'}, - {latLng: [17.11, -61.85], name: 'Antigua and Barbuda'}, - {latLng: [-4.61, 55.45], name: 'Seychelles'}, - {latLng: [7.35, 134.46], name: 'Palau'}, - {latLng: [42.5, 1.51], name: 'Andorra'}, - {latLng: [14.01, -60.98], name: 'Saint Lucia'}, - {latLng: [6.91, 158.18], name: 'Federated States of Micronesia'}, - {latLng: [1.3, 103.8], name: 'Singapore'}, - {latLng: [1.46, 173.03], name: 'Kiribati'}, - {latLng: [-21.13, -175.2], name: 'Tonga'}, - {latLng: [15.3, -61.38], name: 'Dominica'}, - {latLng: [-20.2, 57.5], name: 'Mauritius'}, - {latLng: [26.02, 50.55], name: 'Bahrain'}, - {latLng: [0.33, 6.73], name: 'São Tomé and Príncipe'} - ] - }); - - /* SPARKLINE CHARTS - * ---------------- - * Create a inline charts with spark line - */ - - //----------------- - //- SPARKLINE BAR - - //----------------- - $('.sparkbar').each(function () { - var $this = $(this); - $this.sparkline('html', { - type: 'bar', - height: $this.data('height') ? $this.data('height') : '30', - barColor: $this.data('color') - }); - }); - - //----------------- - //- SPARKLINE PIE - - //----------------- - $('.sparkpie').each(function () { - var $this = $(this); - $this.sparkline('html', { - type: 'pie', - height: $this.data('height') ? $this.data('height') : '90', - sliceColors: $this.data('color') - }); - }); - - //------------------ - //- SPARKLINE LINE - - //------------------ - $('.sparkline').each(function () { - var $this = $(this); - $this.sparkline('html', { - type: 'line', - height: $this.data('height') ? $this.data('height') : '90', - width: '100%', - lineColor: $this.data('linecolor'), - fillColor: $this.data('fillcolor'), - spotColor: $this.data('spotcolor') - }); - }); -}); diff --git a/resources/assets/js/demo.js b/resources/assets/js/demo.js deleted file mode 100755 index 806e1624d2..0000000000 --- a/resources/assets/js/demo.js +++ /dev/null @@ -1,338 +0,0 @@ -/** - * AdminLTE Demo Menu - * ------------------ - * You should not use this file in production. - * This file is for demo purposes only. - */ -(function ($, AdminLTE) { - - "use strict"; - - /** - * List of all the available skins - * - * @type Array - */ - var my_skins = [ - "skin-blue", - "skin-black", - "skin-red", - "skin-yellow", - "skin-purple", - "skin-green", - "skin-blue-light", - "skin-black-light", - "skin-red-light", - "skin-yellow-light", - "skin-purple-light", - "skin-green-light" - ]; - - //Create the new tab - var tab_pane = $("
", { - "id": "control-sidebar-theme-demo-options-tab", - "class": "tab-pane active" - }); - - //Create the tab button - var tab_button = $("
  • ", {"class": "active"}) - .html("" - + "" - + ""); - - //Add the tab button to the right sidebar tabs - $("[href='#control-sidebar-home-tab']") - .parent() - .before(tab_button); - - //Create the menu - var demo_settings = $("
    "); - - //Layout options - demo_settings.append( - "

    " - + "Layout Options" - + "

    " - //Fixed layout - + "
    " - + "" - + "

    Activate the fixed layout. You can't use fixed and boxed layouts together

    " - + "
    " - //Boxed layout - + "
    " - + "" - + "

    Activate the boxed layout

    " - + "
    " - //Sidebar Toggle - + "
    " - + "" - + "

    Toggle the left sidebar's state (open or collapse)

    " - + "
    " - //Sidebar mini expand on hover toggle - + "
    " - + "" - + "

    Let the sidebar mini expand on hover

    " - + "
    " - //Control Sidebar Toggle - + "
    " - + "" - + "

    Toggle between slide over content and push content effects

    " - + "
    " - //Control Sidebar Skin Toggle - + "
    " - + "" - + "

    Toggle between dark and light skins for the right sidebar

    " - + "
    " - ); - var skins_list = $("
      ", {"class": 'list-unstyled clearfix'}); - - //Dark sidebar skins - var skin_blue = - $("
    • ", {style: "float:left; width: 33.33333%; padding: 5px;"}) - .append("" - + "
      " - + "
      " - + "
      " - + "

      Blue

      "); - skins_list.append(skin_blue); - var skin_black = - $("
    • ", {style: "float:left; width: 33.33333%; padding: 5px;"}) - .append("" - + "
      " - + "
      " - + "
      " - + "

      Black

      "); - skins_list.append(skin_black); - var skin_purple = - $("
    • ", {style: "float:left; width: 33.33333%; padding: 5px;"}) - .append("" - + "
      " - + "
      " - + "
      " - + "

      Purple

      "); - skins_list.append(skin_purple); - var skin_green = - $("
    • ", {style: "float:left; width: 33.33333%; padding: 5px;"}) - .append("" - + "
      " - + "
      " - + "
      " - + "

      Green

      "); - skins_list.append(skin_green); - var skin_red = - $("
    • ", {style: "float:left; width: 33.33333%; padding: 5px;"}) - .append("" - + "
      " - + "
      " - + "
      " - + "

      Red

      "); - skins_list.append(skin_red); - var skin_yellow = - $("
    • ", {style: "float:left; width: 33.33333%; padding: 5px;"}) - .append("" - + "
      " - + "
      " - + "
      " - + "

      Yellow

      "); - skins_list.append(skin_yellow); - - //Light sidebar skins - var skin_blue_light = - $("
    • ", {style: "float:left; width: 33.33333%; padding: 5px;"}) - .append("" - + "
      " - + "
      " - + "
      " - + "

      Blue Light

      "); - skins_list.append(skin_blue_light); - var skin_black_light = - $("
    • ", {style: "float:left; width: 33.33333%; padding: 5px;"}) - .append("" - + "
      " - + "
      " - + "
      " - + "

      Black Light

      "); - skins_list.append(skin_black_light); - var skin_purple_light = - $("
    • ", {style: "float:left; width: 33.33333%; padding: 5px;"}) - .append("" - + "
      " - + "
      " - + "
      " - + "

      Purple Light

      "); - skins_list.append(skin_purple_light); - var skin_green_light = - $("
    • ", {style: "float:left; width: 33.33333%; padding: 5px;"}) - .append("" - + "
      " - + "
      " - + "
      " - + "

      Green Light

      "); - skins_list.append(skin_green_light); - var skin_red_light = - $("
    • ", {style: "float:left; width: 33.33333%; padding: 5px;"}) - .append("" - + "
      " - + "
      " - + "
      " - + "

      Red Light

      "); - skins_list.append(skin_red_light); - var skin_yellow_light = - $("
    • ", {style: "float:left; width: 33.33333%; padding: 5px;"}) - .append("" - + "
      " - + "
      " - + "
      " - + "

      Yellow Light

      "); - skins_list.append(skin_yellow_light); - - demo_settings.append("

      Skins

      "); - demo_settings.append(skins_list); - - tab_pane.append(demo_settings); - $("#control-sidebar-home-tab").after(tab_pane); - - setup(); - - /** - * Toggles layout classes - * - * @param String cls the layout class to toggle - * @returns void - */ - function change_layout(cls) { - $("body").toggleClass(cls); - AdminLTE.layout.fixSidebar(); - //Fix the problem with right sidebar and layout boxed - if (cls == "layout-boxed") - AdminLTE.controlSidebar._fix($(".control-sidebar-bg")); - if ($('body').hasClass('fixed') && cls == 'fixed') { - AdminLTE.pushMenu.expandOnHover(); - AdminLTE.layout.activate(); - } - AdminLTE.controlSidebar._fix($(".control-sidebar-bg")); - AdminLTE.controlSidebar._fix($(".control-sidebar")); - } - - /** - * Replaces the old skin with the new skin - * @param String cls the new skin class - * @returns Boolean false to prevent link's default action - */ - function change_skin(cls) { - $.each(my_skins, function (i) { - $("body").removeClass(my_skins[i]); - }); - - $("body").addClass(cls); - store('skin', cls); - return false; - } - - /** - * Store a new settings in the browser - * - * @param String name Name of the setting - * @param String val Value of the setting - * @returns void - */ - function store(name, val) { - if (typeof (Storage) !== "undefined") { - localStorage.setItem(name, val); - } else { - window.alert('Please use a modern browser to properly view this template!'); - } - } - - /** - * Get a prestored setting - * - * @param String name Name of of the setting - * @returns String The value of the setting | null - */ - function get(name) { - if (typeof (Storage) !== "undefined") { - return localStorage.getItem(name); - } else { - window.alert('Please use a modern browser to properly view this template!'); - } - } - - /** - * Retrieve default settings and apply them to the template - * - * @returns void - */ - function setup() { - var tmp = get('skin'); - if (tmp && $.inArray(tmp, my_skins)) - change_skin(tmp); - - //Add the change skin listener - $("[data-skin]").on('click', function (e) { - e.preventDefault(); - change_skin($(this).data('skin')); - }); - - //Add the layout manager - $("[data-layout]").on('click', function () { - change_layout($(this).data('layout')); - }); - - $("[data-controlsidebar]").on('click', function () { - change_layout($(this).data('controlsidebar')); - var slide = !AdminLTE.options.controlSidebarOptions.slide; - AdminLTE.options.controlSidebarOptions.slide = slide; - if (!slide) - $('.control-sidebar').removeClass('control-sidebar-open'); - }); - - $("[data-sidebarskin='toggle']").on('click', function () { - var sidebar = $(".control-sidebar"); - if (sidebar.hasClass("control-sidebar-dark")) { - sidebar.removeClass("control-sidebar-dark") - sidebar.addClass("control-sidebar-light") - } else { - sidebar.removeClass("control-sidebar-light") - sidebar.addClass("control-sidebar-dark") - } - }); - - $("[data-enable='expandOnHover']").on('click', function () { - $(this).attr('disabled', true); - AdminLTE.pushMenu.expandOnHover(); - if (!$('body').hasClass('sidebar-collapse')) - $("[data-layout='sidebar-collapse']").click(); - }); - - // Reset options - if ($('body').hasClass('fixed')) { - $("[data-layout='fixed']").attr('checked', 'checked'); - } - if ($('body').hasClass('layout-boxed')) { - $("[data-layout='layout-boxed']").attr('checked', 'checked'); - } - if ($('body').hasClass('sidebar-collapse')) { - $("[data-layout='sidebar-collapse']").attr('checked', 'checked'); - } - - } -})(jQuery, $.AdminLTE); diff --git a/resources/assets/js/ekko-lightbox.js b/resources/assets/js/ekko-lightbox.js deleted file mode 100755 index a2586430a9..0000000000 --- a/resources/assets/js/ekko-lightbox.js +++ /dev/null @@ -1,440 +0,0 @@ - -/* -Lightbox for Bootstrap 3 by @ashleydw -https://github.com/ashleydw/lightbox - -License: https://github.com/ashleydw/lightbox/blob/master/LICENSE - */ - -(function() { - "use strict"; - var $, EkkoLightbox; - - $ = jQuery; - - EkkoLightbox = function(element, options) { - var content, footer, header; - this.options = $.extend({ - title: null, - footer: null, - remote: null - }, $.fn.ekkoLightbox.defaults, options || {}); - this.$element = $(element); - content = ''; - this.modal_id = this.options.modal_id ? this.options.modal_id : 'ekkoLightbox-' + Math.floor((Math.random() * 1000) + 1); - header = ''; - footer = ''; - $(document.body).append(''); - this.modal = $('#' + this.modal_id); - this.modal_dialog = this.modal.find('.modal-dialog').first(); - this.modal_content = this.modal.find('.modal-content').first(); - this.modal_body = this.modal.find('.modal-body').first(); - this.modal_header = this.modal.find('.modal-header').first(); - this.modal_footer = this.modal.find('.modal-footer').first(); - this.lightbox_container = this.modal_body.find('.ekko-lightbox-container').first(); - this.lightbox_body = this.lightbox_container.find('> div:first-child').first(); - this.showLoading(); - this.modal_arrows = null; - this.border = { - top: parseFloat(this.modal_dialog.css('border-top-width')) + parseFloat(this.modal_content.css('border-top-width')) + parseFloat(this.modal_body.css('border-top-width')), - right: parseFloat(this.modal_dialog.css('border-right-width')) + parseFloat(this.modal_content.css('border-right-width')) + parseFloat(this.modal_body.css('border-right-width')), - bottom: parseFloat(this.modal_dialog.css('border-bottom-width')) + parseFloat(this.modal_content.css('border-bottom-width')) + parseFloat(this.modal_body.css('border-bottom-width')), - left: parseFloat(this.modal_dialog.css('border-left-width')) + parseFloat(this.modal_content.css('border-left-width')) + parseFloat(this.modal_body.css('border-left-width')) - }; - this.padding = { - top: parseFloat(this.modal_dialog.css('padding-top')) + parseFloat(this.modal_content.css('padding-top')) + parseFloat(this.modal_body.css('padding-top')), - right: parseFloat(this.modal_dialog.css('padding-right')) + parseFloat(this.modal_content.css('padding-right')) + parseFloat(this.modal_body.css('padding-right')), - bottom: parseFloat(this.modal_dialog.css('padding-bottom')) + parseFloat(this.modal_content.css('padding-bottom')) + parseFloat(this.modal_body.css('padding-bottom')), - left: parseFloat(this.modal_dialog.css('padding-left')) + parseFloat(this.modal_content.css('padding-left')) + parseFloat(this.modal_body.css('padding-left')) - }; - this.modal.on('show.bs.modal', this.options.onShow.bind(this)).on('shown.bs.modal', (function(_this) { - return function() { - _this.modal_shown(); - return _this.options.onShown.call(_this); - }; - })(this)).on('hide.bs.modal', this.options.onHide.bind(this)).on('hidden.bs.modal', (function(_this) { - return function() { - if (_this.gallery) { - $(document).off('keydown.ekkoLightbox'); - } - _this.modal.remove(); - return _this.options.onHidden.call(_this); - }; - })(this)).modal('show', options); - return this.modal; - }; - - EkkoLightbox.prototype = { - modal_shown: function() { - var video_id; - if (!this.options.remote) { - return this.error('No remote target given'); - } else { - this.gallery = this.$element.data('gallery'); - if (this.gallery) { - if (this.options.gallery_parent_selector === 'document.body' || this.options.gallery_parent_selector === '') { - this.gallery_items = $(document.body).find('*[data-gallery="' + this.gallery + '"]'); - } else { - this.gallery_items = this.$element.parents(this.options.gallery_parent_selector).first().find('*[data-gallery="' + this.gallery + '"]'); - } - this.gallery_index = this.gallery_items.index(this.$element); - $(document).on('keydown.ekkoLightbox', this.navigate.bind(this)); - if (this.options.directional_arrows && this.gallery_items.length > 1) { - this.lightbox_container.append('
      '); - this.modal_arrows = this.lightbox_container.find('div.ekko-lightbox-nav-overlay').first(); - this.lightbox_container.find('a' + this.strip_spaces(this.options.left_arrow_class)).on('click', (function(_this) { - return function(event) { - event.preventDefault(); - return _this.navigate_left(); - }; - })(this)); - this.lightbox_container.find('a' + this.strip_spaces(this.options.right_arrow_class)).on('click', (function(_this) { - return function(event) { - event.preventDefault(); - return _this.navigate_right(); - }; - })(this)); - } - } - if (this.options.type) { - if (this.options.type === 'image') { - return this.preloadImage(this.options.remote, true); - } else if (this.options.type === 'youtube' && (video_id = this.getYoutubeId(this.options.remote))) { - return this.showYoutubeVideo(video_id); - } else if (this.options.type === 'vimeo') { - return this.showVimeoVideo(this.options.remote); - } else if (this.options.type === 'instagram') { - return this.showInstagramVideo(this.options.remote); - } else if (this.options.type === 'url') { - return this.loadRemoteContent(this.options.remote); - } else if (this.options.type === 'video') { - return this.showVideoIframe(this.options.remote); - } else { - return this.error("Could not detect remote target type. Force the type using data-type=\"image|youtube|vimeo|instagram|url|video\""); - } - } else { - return this.detectRemoteType(this.options.remote); - } - } - }, - strip_stops: function(str) { - return str.replace(/\./g, ''); - }, - strip_spaces: function(str) { - return str.replace(/\s/g, ''); - }, - isImage: function(str) { - return str.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i); - }, - isSwf: function(str) { - return str.match(/\.(swf)((\?|#).*)?$/i); - }, - getYoutubeId: function(str) { - var match; - match = str.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/); - if (match && match[2].length === 11) { - return match[2]; - } else { - return false; - } - }, - getVimeoId: function(str) { - if (str.indexOf('vimeo') > 0) { - return str; - } else { - return false; - } - }, - getInstagramId: function(str) { - if (str.indexOf('instagram') > 0) { - return str; - } else { - return false; - } - }, - navigate: function(event) { - event = event || window.event; - if (event.keyCode === 39 || event.keyCode === 37) { - if (event.keyCode === 39) { - return this.navigate_right(); - } else if (event.keyCode === 37) { - return this.navigate_left(); - } - } - }, - navigateTo: function(index) { - var next, src; - if (index < 0 || index > this.gallery_items.length - 1) { - return this; - } - this.showLoading(); - this.gallery_index = index; - this.$element = $(this.gallery_items.get(this.gallery_index)); - this.updateTitleAndFooter(); - src = this.$element.attr('data-remote') || this.$element.attr('href'); - this.detectRemoteType(src, this.$element.attr('data-type') || false); - if (this.gallery_index + 1 < this.gallery_items.length) { - next = $(this.gallery_items.get(this.gallery_index + 1), false); - src = next.attr('data-remote') || next.attr('href'); - if (next.attr('data-type') === 'image' || this.isImage(src)) { - return this.preloadImage(src, false); - } - } - }, - navigate_left: function() { - if (this.gallery_items.length === 1) { - return; - } - if (this.gallery_index === 0) { - this.gallery_index = this.gallery_items.length - 1; - } else { - this.gallery_index--; - } - this.options.onNavigate.call(this, 'left', this.gallery_index); - return this.navigateTo(this.gallery_index); - }, - navigate_right: function() { - if (this.gallery_items.length === 1) { - return; - } - if (this.gallery_index === this.gallery_items.length - 1) { - this.gallery_index = 0; - } else { - this.gallery_index++; - } - this.options.onNavigate.call(this, 'right', this.gallery_index); - return this.navigateTo(this.gallery_index); - }, - detectRemoteType: function(src, type) { - var video_id; - type = type || false; - if (type === 'image' || this.isImage(src)) { - this.options.type = 'image'; - return this.preloadImage(src, true); - } else if (type === 'youtube' || (video_id = this.getYoutubeId(src))) { - this.options.type = 'youtube'; - return this.showYoutubeVideo(video_id); - } else if (type === 'vimeo' || (video_id = this.getVimeoId(src))) { - this.options.type = 'vimeo'; - return this.showVimeoVideo(video_id); - } else if (type === 'instagram' || (video_id = this.getInstagramId(src))) { - this.options.type = 'instagram'; - return this.showInstagramVideo(video_id); - } else if (type === 'video') { - this.options.type = 'video'; - return this.showVideoIframe(video_id); - } else { - this.options.type = 'url'; - return this.loadRemoteContent(src); - } - }, - updateTitleAndFooter: function() { - var caption, footer, header, title; - header = this.modal_content.find('.modal-header'); - footer = this.modal_content.find('.modal-footer'); - title = this.$element.data('title') || ""; - caption = this.$element.data('footer') || ""; - if (title || this.options.always_show_close) { - header.css('display', '').find('.modal-title').html(title || " "); - } else { - header.css('display', 'none'); - } - if (caption) { - footer.css('display', '').html(caption); - } else { - footer.css('display', 'none'); - } - return this; - }, - showLoading: function() { - this.lightbox_body.html(''); - return this; - }, - showYoutubeVideo: function(id) { - var height, rel, width; - if ((this.$element.attr('data-norelated') != null) || this.options.no_related) { - rel = "&rel=0"; - } else { - rel = ""; - } - width = this.checkDimensions(this.$element.data('width') || 560); - height = width / (560 / 315); - return this.showVideoIframe('//www.youtube.com/embed/' + id + '?badge=0&autoplay=1&html5=1' + rel, width, height); - }, - showVimeoVideo: function(id) { - var height, width; - width = this.checkDimensions(this.$element.data('width') || 560); - height = width / (500 / 281); - return this.showVideoIframe(id + '?autoplay=1', width, height); - }, - showInstagramVideo: function(id) { - var height, width; - width = this.checkDimensions(this.$element.data('width') || 612); - this.resize(width); - height = width + 80; - this.lightbox_body.html(''); - this.options.onContentLoaded.call(this); - if (this.modal_arrows) { - return this.modal_arrows.css('display', 'none'); - } - }, - showVideoIframe: function(url, width, height) { - height = height || width; - this.resize(width); - this.lightbox_body.html('
      '); - this.options.onContentLoaded.call(this); - if (this.modal_arrows) { - this.modal_arrows.css('display', 'none'); - } - return this; - }, - loadRemoteContent: function(url) { - var disableExternalCheck, width; - width = this.$element.data('width') || 560; - this.resize(width); - disableExternalCheck = this.$element.data('disableExternalCheck') || false; - if (!disableExternalCheck && !this.isExternal(url)) { - this.lightbox_body.load(url, $.proxy((function(_this) { - return function() { - return _this.$element.trigger('loaded.bs.modal'); - }; - })(this))); - } else { - this.lightbox_body.html(''); - this.options.onContentLoaded.call(this); - } - if (this.modal_arrows) { - this.modal_arrows.css('display', 'none'); - } - return this; - }, - isExternal: function(url) { - var match; - match = url.match(/^([^:\/?#]+:)?(?:\/\/([^\/?#]*))?([^?#]+)?(\?[^#]*)?(#.*)?/); - if (typeof match[1] === "string" && match[1].length > 0 && match[1].toLowerCase() !== location.protocol) { - return true; - } - if (typeof match[2] === "string" && match[2].length > 0 && match[2].replace(new RegExp(":(" + { - "http:": 80, - "https:": 443 - }[location.protocol] + ")?$"), "") !== location.host) { - return true; - } - return false; - }, - error: function(message) { - this.lightbox_body.html(message); - return this; - }, - preloadImage: function(src, onLoadShowImage) { - var img; - img = new Image(); - if ((onLoadShowImage == null) || onLoadShowImage === true) { - img.onload = (function(_this) { - return function() { - var image; - image = $(''); - image.attr('src', img.src); - image.addClass('img-responsive'); - _this.lightbox_body.html(image); - if (_this.modal_arrows) { - _this.modal_arrows.css('display', 'block'); - } - return image.load(function() { - if (_this.options.scale_height) { - _this.scaleHeight(img.height, img.width); - } else { - _this.resize(img.width); - } - return _this.options.onContentLoaded.call(_this); - }); - }; - })(this); - img.onerror = (function(_this) { - return function() { - return _this.error('Failed to load image: ' + src); - }; - })(this); - } - img.src = src; - return img; - }, - scaleHeight: function(height, width) { - var border_padding, factor, footer_height, header_height, margins, max_height; - header_height = this.modal_header.outerHeight(true) || 0; - footer_height = this.modal_footer.outerHeight(true) || 0; - if (!this.modal_footer.is(':visible')) { - footer_height = 0; - } - if (!this.modal_header.is(':visible')) { - header_height = 0; - } - border_padding = this.border.top + this.border.bottom + this.padding.top + this.padding.bottom; - margins = parseFloat(this.modal_dialog.css('margin-top')) + parseFloat(this.modal_dialog.css('margin-bottom')); - max_height = $(window).height() - border_padding - margins - header_height - footer_height; - factor = Math.min(max_height / height, 1); - this.modal_dialog.css('height', 'auto').css('max-height', max_height); - return this.resize(factor * width); - }, - resize: function(width) { - var width_total; - width_total = width + this.border.left + this.padding.left + this.padding.right + this.border.right; - this.modal_dialog.css('width', 'auto').css('max-width', width_total); - this.lightbox_container.find('a').css('line-height', function() { - return $(this).parent().height() + 'px'; - }); - return this; - }, - checkDimensions: function(width) { - var body_width, width_total; - width_total = width + this.border.left + this.padding.left + this.padding.right + this.border.right; - body_width = document.body.clientWidth; - if (width_total > body_width) { - width = this.modal_body.width(); - } - return width; - }, - close: function() { - return this.modal.modal('hide'); - }, - addTrailingSlash: function(url) { - if (url.substr(-1) !== '/') { - url += '/'; - } - return url; - } - }; - - $.fn.ekkoLightbox = function(options) { - return this.each(function() { - var $this; - $this = $(this); - options = $.extend({ - remote: $this.attr('data-remote') || $this.attr('href'), - gallery_parent_selector: $this.attr('data-parent'), - type: $this.attr('data-type') - }, options, $this.data()); - new EkkoLightbox(this, options); - return this; - }); - }; - - $.fn.ekkoLightbox.defaults = { - gallery_parent_selector: 'document.body', - left_arrow_class: '.glyphicon .glyphicon-chevron-left', - right_arrow_class: '.glyphicon .glyphicon-chevron-right', - directional_arrows: true, - type: null, - always_show_close: true, - no_related: false, - scale_height: true, - loadingMessage: 'Loading...', - onShow: function() {}, - onShown: function() {}, - onHide: function() {}, - onHidden: function() {}, - onNavigate: function() {}, - onContentLoaded: function() {} - }; - -}).call(this); diff --git a/resources/assets/js/ekko-lightbox.min.js b/resources/assets/js/ekko-lightbox.min.js deleted file mode 100755 index 8cc8cf2b97..0000000000 --- a/resources/assets/js/ekko-lightbox.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/*! - * Lightbox for Bootstrap 3 by @ashleydw - * https://github.com/ashleydw/lightbox - * - * License: https://github.com/ashleydw/lightbox/blob/master/LICENSE - */ -(function(){"use strict";var a,b;a=jQuery,b=function(b,c){var d,e,f;return this.options=a.extend({title:null,footer:null,remote:null},a.fn.ekkoLightbox.defaults,c||{}),this.$element=a(b),d="",this.modal_id=this.options.modal_id?this.options.modal_id:"ekkoLightbox-"+Math.floor(1e3*Math.random()+1),f='",e='",a(document.body).append('"),this.modal=a("#"+this.modal_id),this.modal_dialog=this.modal.find(".modal-dialog").first(),this.modal_content=this.modal.find(".modal-content").first(),this.modal_body=this.modal.find(".modal-body").first(),this.modal_header=this.modal.find(".modal-header").first(),this.modal_footer=this.modal.find(".modal-footer").first(),this.lightbox_container=this.modal_body.find(".ekko-lightbox-container").first(),this.lightbox_body=this.lightbox_container.find("> div:first-child").first(),this.showLoading(),this.modal_arrows=null,this.border={top:parseFloat(this.modal_dialog.css("border-top-width"))+parseFloat(this.modal_content.css("border-top-width"))+parseFloat(this.modal_body.css("border-top-width")),right:parseFloat(this.modal_dialog.css("border-right-width"))+parseFloat(this.modal_content.css("border-right-width"))+parseFloat(this.modal_body.css("border-right-width")),bottom:parseFloat(this.modal_dialog.css("border-bottom-width"))+parseFloat(this.modal_content.css("border-bottom-width"))+parseFloat(this.modal_body.css("border-bottom-width")),left:parseFloat(this.modal_dialog.css("border-left-width"))+parseFloat(this.modal_content.css("border-left-width"))+parseFloat(this.modal_body.css("border-left-width"))},this.padding={top:parseFloat(this.modal_dialog.css("padding-top"))+parseFloat(this.modal_content.css("padding-top"))+parseFloat(this.modal_body.css("padding-top")),right:parseFloat(this.modal_dialog.css("padding-right"))+parseFloat(this.modal_content.css("padding-right"))+parseFloat(this.modal_body.css("padding-right")),bottom:parseFloat(this.modal_dialog.css("padding-bottom"))+parseFloat(this.modal_content.css("padding-bottom"))+parseFloat(this.modal_body.css("padding-bottom")),left:parseFloat(this.modal_dialog.css("padding-left"))+parseFloat(this.modal_content.css("padding-left"))+parseFloat(this.modal_body.css("padding-left"))},this.modal.on("show.bs.modal",this.options.onShow.bind(this)).on("shown.bs.modal",function(a){return function(){return a.modal_shown(),a.options.onShown.call(a)}}(this)).on("hide.bs.modal",this.options.onHide.bind(this)).on("hidden.bs.modal",function(b){return function(){return b.gallery&&a(document).off("keydown.ekkoLightbox"),b.modal.remove(),b.options.onHidden.call(b)}}(this)).modal("show",c),this.modal},b.prototype={modal_shown:function(){var b;return this.options.remote?(this.gallery=this.$element.data("gallery"),this.gallery&&("document.body"===this.options.gallery_parent_selector||""===this.options.gallery_parent_selector?this.gallery_items=a(document.body).find('*[data-gallery="'+this.gallery+'"]'):this.gallery_items=this.$element.parents(this.options.gallery_parent_selector).first().find('*[data-gallery="'+this.gallery+'"]'),this.gallery_index=this.gallery_items.index(this.$element),a(document).on("keydown.ekkoLightbox",this.navigate.bind(this)),this.options.directional_arrows&&this.gallery_items.length>1&&(this.lightbox_container.append('
      '),this.modal_arrows=this.lightbox_container.find("div.ekko-lightbox-nav-overlay").first(),this.lightbox_container.find("a"+this.strip_spaces(this.options.left_arrow_class)).on("click",function(a){return function(b){return b.preventDefault(),a.navigate_left()}}(this)),this.lightbox_container.find("a"+this.strip_spaces(this.options.right_arrow_class)).on("click",function(a){return function(b){return b.preventDefault(),a.navigate_right()}}(this)))),this.options.type?"image"===this.options.type?this.preloadImage(this.options.remote,!0):"youtube"===this.options.type&&(b=this.getYoutubeId(this.options.remote))?this.showYoutubeVideo(b):"vimeo"===this.options.type?this.showVimeoVideo(this.options.remote):"instagram"===this.options.type?this.showInstagramVideo(this.options.remote):"url"===this.options.type?this.loadRemoteContent(this.options.remote):"video"===this.options.type?this.showVideoIframe(this.options.remote):this.error('Could not detect remote target type. Force the type using data-type="image|youtube|vimeo|instagram|url|video"'):this.detectRemoteType(this.options.remote)):this.error("No remote target given")},strip_stops:function(a){return a.replace(/\./g,"")},strip_spaces:function(a){return a.replace(/\s/g,"")},isImage:function(a){return a.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i)},isSwf:function(a){return a.match(/\.(swf)((\?|#).*)?$/i)},getYoutubeId:function(a){var b;return b=a.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/),b&&11===b[2].length?b[2]:!1},getVimeoId:function(a){return a.indexOf("vimeo")>0?a:!1},getInstagramId:function(a){return a.indexOf("instagram")>0?a:!1},navigate:function(a){if(a=a||window.event,39===a.keyCode||37===a.keyCode){if(39===a.keyCode)return this.navigate_right();if(37===a.keyCode)return this.navigate_left()}},navigateTo:function(b){var c,d;return 0>b||b>this.gallery_items.length-1?this:(this.showLoading(),this.gallery_index=b,this.$element=a(this.gallery_items.get(this.gallery_index)),this.updateTitleAndFooter(),d=this.$element.attr("data-remote")||this.$element.attr("href"),this.detectRemoteType(d,this.$element.attr("data-type")||!1),this.gallery_index+1'+this.options.loadingMessage+"
    "),this},showYoutubeVideo:function(a){var b,c,d;return c=null!=this.$element.attr("data-norelated")||this.options.no_related?"&rel=0":"",d=this.checkDimensions(this.$element.data("width")||560),b=d/(560/315),this.showVideoIframe("//www.youtube.com/embed/"+a+"?badge=0&autoplay=1&html5=1"+c,d,b)},showVimeoVideo:function(a){var b,c;return c=this.checkDimensions(this.$element.data("width")||560),b=c/(500/281),this.showVideoIframe(a+"?autoplay=1",c,b)},showInstagramVideo:function(a){var b,c;return c=this.checkDimensions(this.$element.data("width")||612),this.resize(c),b=c+80,this.lightbox_body.html(''),this.options.onContentLoaded.call(this),this.modal_arrows?this.modal_arrows.css("display","none"):void 0},showVideoIframe:function(a,b,c){return c=c||b,this.resize(b),this.lightbox_body.html('
    '),this.options.onContentLoaded.call(this),this.modal_arrows&&this.modal_arrows.css("display","none"),this},loadRemoteContent:function(b){var c,d;return d=this.$element.data("width")||560,this.resize(d),c=this.$element.data("disableExternalCheck")||!1,c||this.isExternal(b)?(this.lightbox_body.html(''),this.options.onContentLoaded.call(this)):this.lightbox_body.load(b,a.proxy(function(a){return function(){return a.$element.trigger("loaded.bs.modal")}}(this))),this.modal_arrows&&this.modal_arrows.css("display","none"),this},isExternal:function(a){var b;return b=a.match(/^([^:\/?#]+:)?(?:\/\/([^\/?#]*))?([^?#]+)?(\?[^#]*)?(#.*)?/),"string"==typeof b[1]&&b[1].length>0&&b[1].toLowerCase()!==location.protocol?!0:"string"==typeof b[2]&&b[2].length>0&&b[2].replace(new RegExp(":("+{"http:":80,"https:":443}[location.protocol]+")?$"),"")!==location.host?!0:!1},error:function(a){return this.lightbox_body.html(a),this},preloadImage:function(b,c){var d;return d=new Image,(null==c||c===!0)&&(d.onload=function(b){return function(){var c;return c=a(""),c.attr("src",d.src),c.addClass("img-responsive"),b.lightbox_body.html(c),b.modal_arrows&&b.modal_arrows.css("display","block"),c.load(function(){return b.options.scale_height?b.scaleHeight(d.height,d.width):b.resize(d.width),b.options.onContentLoaded.call(b)})}}(this),d.onerror=function(a){return function(){return a.error("Failed to load image: "+b)}}(this)),d.src=b,d},scaleHeight:function(b,c){var d,e,f,g,h,i;return g=this.modal_header.outerHeight(!0)||0,f=this.modal_footer.outerHeight(!0)||0,this.modal_footer.is(":visible")||(f=0),this.modal_header.is(":visible")||(g=0),d=this.border.top+this.border.bottom+this.padding.top+this.padding.bottom,h=parseFloat(this.modal_dialog.css("margin-top"))+parseFloat(this.modal_dialog.css("margin-bottom")),i=a(window).height()-d-h-g-f,e=Math.min(i/b,1),this.modal_dialog.css("height","auto").css("max-height",i),this.resize(e*c)},resize:function(b){var c;return c=b+this.border.left+this.padding.left+this.padding.right+this.border.right,this.modal_dialog.css("width","auto").css("max-width",c),this.lightbox_container.find("a").css("line-height",function(){return a(this).parent().height()+"px"}),this},checkDimensions:function(a){var b,c;return c=a+this.border.left+this.padding.left+this.padding.right+this.border.right,b=document.body.clientWidth,c>b&&(a=this.modal_body.width()),a},close:function(){return this.modal.modal("hide")},addTrailingSlash:function(a){return"/"!==a.substr(-1)&&(a+="/"),a}},a.fn.ekkoLightbox=function(c){return this.each(function(){var d;return d=a(this),c=a.extend({remote:d.attr("data-remote")||d.attr("href"),gallery_parent_selector:d.attr("data-parent"),type:d.attr("data-type")},c,d.data()),new b(this,c),this})},a.fn.ekkoLightbox.defaults={gallery_parent_selector:"document.body",left_arrow_class:".glyphicon .glyphicon-chevron-left",right_arrow_class:".glyphicon .glyphicon-chevron-right",directional_arrows:!0,type:null,always_show_close:!0,no_related:!1,scale_height:!0,loadingMessage:"Loading...",onShow:function(){},onShown:function(){},onHide:function(){},onHidden:function(){},onNavigate:function(){},onContentLoaded:function(){}}}).call(this); \ No newline at end of file diff --git a/resources/assets/js/extensions/accent-neutralise/bootstrap-table-accent-neutralise.js b/resources/assets/js/extensions/accent-neutralise/bootstrap-table-accent-neutralise.js deleted file mode 100755 index dc7b4f08fc..0000000000 --- a/resources/assets/js/extensions/accent-neutralise/bootstrap-table-accent-neutralise.js +++ /dev/null @@ -1,182 +0,0 @@ -/** - * @author: Dennis Hernández - * @webSite: http://djhvscf.github.io/Blog - * @version: v1.0.0 - */ - -!function ($) { - - 'use strict'; - - var diacriticsMap = {}; - var defaultAccentsDiacritics = [ - {'base':'A', 'letters':'\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F'}, - {'base':'AA','letters':'\uA732'}, - {'base':'AE','letters':'\u00C6\u01FC\u01E2'}, - {'base':'AO','letters':'\uA734'}, - {'base':'AU','letters':'\uA736'}, - {'base':'AV','letters':'\uA738\uA73A'}, - {'base':'AY','letters':'\uA73C'}, - {'base':'B', 'letters':'\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181'}, - {'base':'C', 'letters':'\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E'}, - {'base':'D', 'letters':'\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779'}, - {'base':'DZ','letters':'\u01F1\u01C4'}, - {'base':'Dz','letters':'\u01F2\u01C5'}, - {'base':'E', 'letters':'\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E'}, - {'base':'F', 'letters':'\u0046\u24BB\uFF26\u1E1E\u0191\uA77B'}, - {'base':'G', 'letters':'\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E'}, - {'base':'H', 'letters':'\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D'}, - {'base':'I', 'letters':'\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197'}, - {'base':'J', 'letters':'\u004A\u24BF\uFF2A\u0134\u0248'}, - {'base':'K', 'letters':'\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2'}, - {'base':'L', 'letters':'\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780'}, - {'base':'LJ','letters':'\u01C7'}, - {'base':'Lj','letters':'\u01C8'}, - {'base':'M', 'letters':'\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C'}, - {'base':'N', 'letters':'\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4'}, - {'base':'NJ','letters':'\u01CA'}, - {'base':'Nj','letters':'\u01CB'}, - {'base':'O', 'letters':'\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C'}, - {'base':'OI','letters':'\u01A2'}, - {'base':'OO','letters':'\uA74E'}, - {'base':'OU','letters':'\u0222'}, - {'base':'OE','letters':'\u008C\u0152'}, - {'base':'oe','letters':'\u009C\u0153'}, - {'base':'P', 'letters':'\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754'}, - {'base':'Q', 'letters':'\u0051\u24C6\uFF31\uA756\uA758\u024A'}, - {'base':'R', 'letters':'\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782'}, - {'base':'S', 'letters':'\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784'}, - {'base':'T', 'letters':'\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786'}, - {'base':'TZ','letters':'\uA728'}, - {'base':'U', 'letters':'\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244'}, - {'base':'V', 'letters':'\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245'}, - {'base':'VY','letters':'\uA760'}, - {'base':'W', 'letters':'\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72'}, - {'base':'X', 'letters':'\u0058\u24CD\uFF38\u1E8A\u1E8C'}, - {'base':'Y', 'letters':'\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE'}, - {'base':'Z', 'letters':'\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762'}, - {'base':'a', 'letters':'\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250'}, - {'base':'aa','letters':'\uA733'}, - {'base':'ae','letters':'\u00E6\u01FD\u01E3'}, - {'base':'ao','letters':'\uA735'}, - {'base':'au','letters':'\uA737'}, - {'base':'av','letters':'\uA739\uA73B'}, - {'base':'ay','letters':'\uA73D'}, - {'base':'b', 'letters':'\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253'}, - {'base':'c', 'letters':'\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184'}, - {'base':'d', 'letters':'\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A'}, - {'base':'dz','letters':'\u01F3\u01C6'}, - {'base':'e', 'letters':'\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD'}, - {'base':'f', 'letters':'\u0066\u24D5\uFF46\u1E1F\u0192\uA77C'}, - {'base':'g', 'letters':'\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F'}, - {'base':'h', 'letters':'\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265'}, - {'base':'hv','letters':'\u0195'}, - {'base':'i', 'letters':'\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131'}, - {'base':'j', 'letters':'\u006A\u24D9\uFF4A\u0135\u01F0\u0249'}, - {'base':'k', 'letters':'\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3'}, - {'base':'l', 'letters':'\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747'}, - {'base':'lj','letters':'\u01C9'}, - {'base':'m', 'letters':'\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F'}, - {'base':'n', 'letters':'\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5'}, - {'base':'nj','letters':'\u01CC'}, - {'base':'o', 'letters':'\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275'}, - {'base':'oi','letters':'\u01A3'}, - {'base':'ou','letters':'\u0223'}, - {'base':'oo','letters':'\uA74F'}, - {'base':'p','letters':'\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755'}, - {'base':'q','letters':'\u0071\u24E0\uFF51\u024B\uA757\uA759'}, - {'base':'r','letters':'\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783'}, - {'base':'s','letters':'\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B'}, - {'base':'t','letters':'\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787'}, - {'base':'tz','letters':'\uA729'}, - {'base':'u','letters': '\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289'}, - {'base':'v','letters':'\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C'}, - {'base':'vy','letters':'\uA761'}, - {'base':'w','letters':'\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73'}, - {'base':'x','letters':'\u0078\u24E7\uFF58\u1E8B\u1E8D'}, - {'base':'y','letters':'\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF'}, - {'base':'z','letters':'\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763'} - ]; - - var initNeutraliser = function () { - for (var i=0; i < defaultAccentsDiacritics.length; i++){ - var letters = defaultAccentsDiacritics[i].letters; - for (var j=0; j < letters.length ; j++){ - diacriticsMap[letters[j]] = defaultAccentsDiacritics[i].base; - } - } - }; - - var removeDiacritics = function (str) { - return str.replace(/[^\u0000-\u007E]/g, function(a){ - return diacriticsMap[a] || a; - }); - }; - - $.extend($.fn.bootstrapTable.defaults, { - searchAccentNeutralise: false - }); - - var BootstrapTable = $.fn.bootstrapTable.Constructor, - _init = BootstrapTable.prototype.init, - _initSearch = BootstrapTable.prototype.initSearch; - - BootstrapTable.prototype.init = function () { - if (this.options.searchAccentNeutralise) { - initNeutraliser(); - } - _init.apply(this, Array.prototype.slice.apply(arguments)); - }; - - BootstrapTable.prototype.initSearch = function () { - var that = this; - - if (this.options.sidePagination !== 'server') { - var s = this.searchText && this.searchText.toLowerCase(); - var f = $.isEmptyObject(this.filterColumns) ? null : this.filterColumns; - - // Check filter - this.data = f ? $.grep(this.options.data, function (item, i) { - for (var key in f) { - if (item[key] !== f[key]) { - return false; - } - } - return true; - }) : this.options.data; - - this.data = s ? $.grep(this.data, function (item, i) { - for (var key in item) { - key = $.isNumeric(key) ? parseInt(key, 10) : key; - var value = item[key], - column = that.columns[$.fn.bootstrapTable.utils.getFieldIndex(that.columns, key)], - j = $.inArray(key, that.header.fields); - - if (column && column.searchFormatter) { - value = $.fn.bootstrapTable.utils.calculateObjectValue(column, - that.header.formatters[j], [value, item, i], value); - } - - var index = $.inArray(key, that.header.fields); - if (index !== -1 && that.header.searchables[index] && (typeof value === 'string' || typeof value === 'number')) { - if (that.options.searchAccentNeutralise) { - value = removeDiacritics(value); - s = removeDiacritics(s); - } - if (that.options.strictSearch) { - if ((value + '').toLowerCase() === s) { - return true; - } - } else { - if ((value + '').toLowerCase().indexOf(s) !== -1) { - return true; - } - } - } - } - return false; - }) : this.data; - } - }; - -}(jQuery); diff --git a/resources/assets/js/extensions/accent-neutralise/bootstrap-table-accent-neutralise.min.js b/resources/assets/js/extensions/accent-neutralise/bootstrap-table-accent-neutralise.min.js deleted file mode 100755 index d7aa59839f..0000000000 --- a/resources/assets/js/extensions/accent-neutralise/bootstrap-table-accent-neutralise.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/* -* bootstrap-table - v1.9.1 - 2015-10-25 -* https://github.com/wenzhixin/bootstrap-table -* Copyright (c) 2015 zhixin wen -* Licensed MIT License -*/ -!function(a){"use strict";var b={},c=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"OE",letters:"ŒŒ"},{base:"oe",letters:"œœ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],d=function(){for(var a=0;a - */ - -(function ($) { - 'use strict'; - - var cookieIds = { - sortOrder: 'bs.table.sortOrder', - sortName: 'bs.table.sortName', - pageNumber: 'bs.table.pageNumber', - pageList: 'bs.table.pageList', - columns: 'bs.table.columns', - searchText: 'bs.table.searchText', - filterControl: 'bs.table.filterControl' - }; - - var getCurrentHeader = function (that) { - var header = that.$header; - if (that.options.height) { - header = that.$tableHeader; - } - - return header; - }; - - var getCurrentSearchControls = function (that) { - var searchControls = 'select, input'; - if (that.options.height) { - searchControls = 'table select, table input'; - } - - return searchControls; - }; - - var cookieEnabled = function () { - return !!(navigator.cookieEnabled); - }; - - var inArrayCookiesEnabled = function (cookieName, cookiesEnabled) { - var index = -1; - - for (var i = 0; i < cookiesEnabled.length; i++) { - if (cookieName.toLowerCase() === cookiesEnabled[i].toLowerCase()) { - index = i; - break; - } - } - - return index; - }; - - var setCookie = function (that, cookieName, cookieValue) { - if ((!that.options.cookie) || (!cookieEnabled()) || (that.options.cookieIdTable === '')) { - return; - } - - if (inArrayCookiesEnabled(cookieName, that.options.cookiesEnabled) === -1) { - return; - } - - cookieName = that.options.cookieIdTable + '.' + cookieName; - - switch(that.options.cookieStorage) { - case 'cookieStorage': - document.cookie = [ - cookieName, '=', cookieValue, - '; expires=' + calculateExpiration(that.options.cookieExpire), - that.options.cookiePath ? '; path=' + that.options.cookiePath : '', - that.options.cookieDomain ? '; domain=' + that.options.cookieDomain : '', - that.options.cookieSecure ? '; secure' : '' - ].join(''); - case 'localStorage': - localStorage.setItem(cookieName, cookieValue); - break; - case 'sessionStorage': - sessionStorage.setItem(cookieName, cookieValue); - break; - default: - return false; - } - - return true; - }; - - var getCookie = function (that, tableName, cookieName) { - if (!cookieName) { - return null; - } - - if (inArrayCookiesEnabled(cookieName, that.options.cookiesEnabled) === -1) { - return null; - } - - cookieName = tableName + '.' + cookieName; - - switch(that.options.cookieStorage) { - case 'cookieStorage': - var value = '; ' + document.cookie; - var parts = value.split('; ' + cookieName + '='); - return parts.length === 2 ? parts.pop().split(';').shift() : null; - case 'localStorage': - return localStorage.getItem(cookieName); - case 'sessionStorage': - return sessionStorage.getItem(cookieName); - default: - return null; - } - }; - - var deleteCookie = function (that, tableName, cookieName) { - cookieName = tableName + '.' + cookieName; - - switch(that.options.cookieStorage) { - case 'cookieStorage': - document.cookie = [ - encodeURIComponent(cookieName), '=', - '; expires=Thu, 01 Jan 1970 00:00:00 GMT', - that.options.cookiePath ? '; path=' + that.options.cookiePath : '', - that.options.cookieDomain ? '; domain=' + that.options.cookieDomain : '', - ].join(''); - break; - case 'localStorage': - localStorage.removeItem(cookieName); - break; - case 'sessionStorage': - sessionStorage.removeItem(cookieName); - break; - - } - return true; - }; - - var calculateExpiration = function(cookieExpire) { - var time = cookieExpire.replace(/[0-9]*/, ''); //s,mi,h,d,m,y - cookieExpire = cookieExpire.replace(/[A-Za-z]{1,2}/, ''); //number - - switch (time.toLowerCase()) { - case 's': - cookieExpire = +cookieExpire; - break; - case 'mi': - cookieExpire = cookieExpire * 60; - break; - case 'h': - cookieExpire = cookieExpire * 60 * 60; - break; - case 'd': - cookieExpire = cookieExpire * 24 * 60 * 60; - break; - case 'm': - cookieExpire = cookieExpire * 30 * 24 * 60 * 60; - break; - case 'y': - cookieExpire = cookieExpire * 365 * 24 * 60 * 60; - break; - default: - cookieExpire = undefined; - break; - } - if (!cookieExpire) { - return ''; - } - var d = new Date(); - d.setTime(d.getTime() + cookieExpire * 1000); - return d.toGMTString(); - }; - - var initCookieFilters = function (bootstrapTable) { - setTimeout(function () { - var parsedCookieFilters = JSON.parse(getCookie(bootstrapTable, bootstrapTable.options.cookieIdTable, cookieIds.filterControl)); - - if (!bootstrapTable.options.filterControlValuesLoaded && parsedCookieFilters) { - - var cachedFilters = {}, - header = getCurrentHeader(bootstrapTable), - searchControls = getCurrentSearchControls(bootstrapTable), - - applyCookieFilters = function (element, filteredCookies) { - $(filteredCookies).each(function (i, cookie) { - if (cookie.text !== '') { - $(element).val(cookie.text); - cachedFilters[cookie.field] = cookie.text; - } - }); - }; - - header.find(searchControls).each(function () { - var field = $(this).closest('[data-field]').data('field'), - filteredCookies = $.grep(parsedCookieFilters, function (cookie) { - return cookie.field === field; - }); - - applyCookieFilters(this, filteredCookies); - }); - - bootstrapTable.initColumnSearch(cachedFilters); - bootstrapTable.options.filterControlValuesLoaded = true; - bootstrapTable.initServer(); - } - }, 250); - }; - - $.extend($.fn.bootstrapTable.defaults, { - cookie: false, - cookieExpire: '2h', - cookiePath: null, - cookieDomain: null, - cookieSecure: null, - cookieIdTable: '', - cookiesEnabled: [ - 'bs.table.sortOrder', 'bs.table.sortName', - 'bs.table.pageNumber', 'bs.table.pageList', - 'bs.table.columns', 'bs.table.searchText', - 'bs.table.filterControl' - ], - cookieStorage: 'cookieStorage', //localStorage, sessionStorage - //internal variable - filterControls: [], - filterControlValuesLoaded: false - }); - - $.fn.bootstrapTable.methods.push('getCookies'); - $.fn.bootstrapTable.methods.push('deleteCookie'); - - $.extend($.fn.bootstrapTable.utils, { - setCookie: setCookie, - getCookie: getCookie - }); - - var BootstrapTable = $.fn.bootstrapTable.Constructor, - _init = BootstrapTable.prototype.init, - _initTable = BootstrapTable.prototype.initTable, - _initServer = BootstrapTable.prototype.initServer, - _onSort = BootstrapTable.prototype.onSort, - _onPageNumber = BootstrapTable.prototype.onPageNumber, - _onPageListChange = BootstrapTable.prototype.onPageListChange, - _onPagePre = BootstrapTable.prototype.onPagePre, - _onPageNext = BootstrapTable.prototype.onPageNext, - _toggleColumn = BootstrapTable.prototype.toggleColumn, - _selectPage = BootstrapTable.prototype.selectPage, - _onSearch = BootstrapTable.prototype.onSearch; - - BootstrapTable.prototype.init = function () { - this.options.filterControls = []; - this.options.filterControlValuesLoaded = false; - - this.options.cookiesEnabled = typeof this.options.cookiesEnabled === 'string' ? - this.options.cookiesEnabled.replace('[', '').replace(']', '') - .replace(/ /g, '').toLowerCase().split(',') : - this.options.cookiesEnabled; - - if (this.options.filterControl) { - var that = this; - this.$el.on('column-search.bs.table', function (e, field, text) { - var isNewField = true; - - for (var i = 0; i < that.options.filterControls.length; i++) { - if (that.options.filterControls[i].field === field) { - that.options.filterControls[i].text = text; - isNewField = false; - break; - } - } - if (isNewField) { - that.options.filterControls.push({ - field: field, - text: text - }); - } - - setCookie(that, cookieIds.filterControl, JSON.stringify(that.options.filterControls)); - }).on('post-body.bs.table', initCookieFilters(that)); - } - _init.apply(this, Array.prototype.slice.apply(arguments)); - }; - - BootstrapTable.prototype.initServer = function () { - var bootstrapTable = this; - if (bootstrapTable.options.cookie && bootstrapTable.options.filterControl && !bootstrapTable.options.filterControlValuesLoaded) { - var cookie = JSON.parse(getCookie(bootstrapTable, bootstrapTable.options.cookieIdTable, cookieIds.filterControl)); - if (cookie) - return; - } - _initServer.apply(this, Array.prototype.slice.apply(arguments)); - }; - - - BootstrapTable.prototype.initTable = function () { - _initTable.apply(this, Array.prototype.slice.apply(arguments)); - this.initCookie(); - }; - - BootstrapTable.prototype.initCookie = function () { - if (!this.options.cookie) { - return; - } - - if ((this.options.cookieIdTable === '') || (this.options.cookieExpire === '') || (!cookieEnabled())) { - console.error("Configuration error. Please review the cookieIdTable, cookieExpire properties, if those properties are ok, then this browser does not support the cookies"); - this.options.cookie = false; //Make sure that the cookie extension is disabled - return; - } - - var sortOrderCookie = getCookie(this, this.options.cookieIdTable, cookieIds.sortOrder), - sortOrderNameCookie = getCookie(this, this.options.cookieIdTable, cookieIds.sortName), - pageNumberCookie = getCookie(this, this.options.cookieIdTable, cookieIds.pageNumber), - pageListCookie = getCookie(this, this.options.cookieIdTable, cookieIds.pageList), - columnsCookie = JSON.parse(getCookie(this, this.options.cookieIdTable, cookieIds.columns)), - searchTextCookie = getCookie(this, this.options.cookieIdTable, cookieIds.searchText); - - //sortOrder - this.options.sortOrder = sortOrderCookie ? sortOrderCookie : this.options.sortOrder; - //sortName - this.options.sortName = sortOrderNameCookie ? sortOrderNameCookie : this.options.sortName; - //pageNumber - this.options.pageNumber = pageNumberCookie ? +pageNumberCookie : this.options.pageNumber; - //pageSize - this.options.pageSize = pageListCookie ? pageListCookie === this.options.formatAllRows() ? pageListCookie : +pageListCookie : this.options.pageSize; - //searchText - this.options.searchText = searchTextCookie ? searchTextCookie : ''; - - if (columnsCookie) { - $.each(this.columns, function (i, column) { - column.visible = $.inArray(column.field, columnsCookie) !== -1; - }); - } - }; - - BootstrapTable.prototype.onSort = function () { - _onSort.apply(this, Array.prototype.slice.apply(arguments)); - setCookie(this, cookieIds.sortOrder, this.options.sortOrder); - setCookie(this, cookieIds.sortName, this.options.sortName); - }; - - BootstrapTable.prototype.onPageNumber = function () { - _onPageNumber.apply(this, Array.prototype.slice.apply(arguments)); - setCookie(this, cookieIds.pageNumber, this.options.pageNumber); - return false; - }; - - BootstrapTable.prototype.onPageListChange = function () { - _onPageListChange.apply(this, Array.prototype.slice.apply(arguments)); - setCookie(this, cookieIds.pageList, this.options.pageSize); - setCookie(this, cookieIds.pageNumber, this.options.pageNumber); - return false; - }; - - BootstrapTable.prototype.onPagePre = function () { - _onPagePre.apply(this, Array.prototype.slice.apply(arguments)); - setCookie(this, cookieIds.pageNumber, this.options.pageNumber); - return false; - }; - - BootstrapTable.prototype.onPageNext = function () { - _onPageNext.apply(this, Array.prototype.slice.apply(arguments)); - setCookie(this, cookieIds.pageNumber, this.options.pageNumber); - return false; - }; - - BootstrapTable.prototype.toggleColumn = function () { - _toggleColumn.apply(this, Array.prototype.slice.apply(arguments)); - - var visibleColumns = []; - - $.each(this.columns, function (i, column) { - if (column.visible) { - visibleColumns.push(column.field); - } - }); - - setCookie(this, cookieIds.columns, JSON.stringify(visibleColumns)); - }; - - BootstrapTable.prototype.selectPage = function (page) { - _selectPage.apply(this, Array.prototype.slice.apply(arguments)); - setCookie(this, cookieIds.pageNumber, page); - }; - - BootstrapTable.prototype.onSearch = function () { - var target = Array.prototype.slice.apply(arguments); - _onSearch.apply(this, target); - - if ($(target[0].currentTarget).parent().hasClass('search')) { - setCookie(this, cookieIds.searchText, this.searchText); - } - setCookie(this, cookieIds.pageNumber, this.options.pageNumber); - }; - - BootstrapTable.prototype.getCookies = function () { - var bootstrapTable = this; - var cookies = {}; - $.each(cookieIds, function(key, value) { - cookies[key] = getCookie(bootstrapTable, bootstrapTable.options.cookieIdTable, value); - if (key === 'columns') { - cookies[key] = JSON.parse(cookies[key]); - } - }); - return cookies; - }; - - BootstrapTable.prototype.deleteCookie = function (cookieName) { - if ((cookieName === '') || (!cookieEnabled())) { - return; - } - - deleteCookie(this, this.options.cookieIdTable, cookieIds[cookieName]); - }; -})(jQuery); diff --git a/resources/assets/js/extensions/cookie/bootstrap-table-cookie.min.js b/resources/assets/js/extensions/cookie/bootstrap-table-cookie.min.js deleted file mode 100755 index 425ef8b6f6..0000000000 --- a/resources/assets/js/extensions/cookie/bootstrap-table-cookie.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/* -* bootstrap-table - v1.11.1 - 2017-02-22 -* https://github.com/wenzhixin/bootstrap-table -* Copyright (c) 2017 zhixin wen -* Licensed MIT License -*/ -!function(a){"use strict";var b={sortOrder:"bs.table.sortOrder",sortName:"bs.table.sortName",pageNumber:"bs.table.pageNumber",pageList:"bs.table.pageList",columns:"bs.table.columns",searchText:"bs.table.searchText",filterControl:"bs.table.filterControl"},c=function(a){var b=a.$header;return a.options.height&&(b=a.$tableHeader),b},d=function(a){var b="select, input";return a.options.height&&(b="table select, table input"),b},e=function(){return!!navigator.cookieEnabled},f=function(a,b){for(var c=-1,d=0;d - * extensions: https://github.com/vitalets/x-editable - */ - -!function ($) { - - 'use strict'; - - $.extend($.fn.bootstrapTable.defaults, { - editable: true, - onEditableInit: function () { - return false; - }, - onEditableSave: function (field, row, oldValue, $el) { - return false; - }, - onEditableShown: function (field, row, $el, editable) { - return false; - }, - onEditableHidden: function (field, row, $el, reason) { - return false; - } - }); - - $.extend($.fn.bootstrapTable.Constructor.EVENTS, { - 'editable-init.bs.table': 'onEditableInit', - 'editable-save.bs.table': 'onEditableSave', - 'editable-shown.bs.table': 'onEditableShown', - 'editable-hidden.bs.table': 'onEditableHidden' - }); - - var BootstrapTable = $.fn.bootstrapTable.Constructor, - _initTable = BootstrapTable.prototype.initTable, - _initBody = BootstrapTable.prototype.initBody; - - BootstrapTable.prototype.initTable = function () { - var that = this; - _initTable.apply(this, Array.prototype.slice.apply(arguments)); - - if (!this.options.editable) { - return; - } - - $.each(this.columns, function (i, column) { - if (!column.editable) { - return; - } - - var _formatter = column.formatter; - column.formatter = function (value, row, index) { - var result = _formatter ? _formatter(value, row, index) : value; - - return ['' + '' - ].join(''); - }; - }); - }; - - BootstrapTable.prototype.initBody = function () { - var that = this; - _initBody.apply(this, Array.prototype.slice.apply(arguments)); - - if (!this.options.editable) { - return; - } - - $.each(this.columns, function (i, column) { - if (!column.editable) { - return; - } - - that.$body.find('a[data-name="' + column.field + '"]').editable(column.editable) - .off('save').on('save', function (e, params) { - var data = that.getData(), - index = $(this).parents('tr[data-index]').data('index'), - row = data[index], - oldValue = row[column.field]; - - row[column.field] = params.submitValue; - that.trigger('editable-save', column.field, row, oldValue, $(this)); - }); - that.$body.find('a[data-name="' + column.field + '"]').editable(column.editable) - .off('shown').on('shown', function (e, editable) { - var data = that.getData(), - index = $(this).parents('tr[data-index]').data('index'), - row = data[index]; - - that.trigger('editable-shown', column.field, row, $(this), editable); - }); - that.$body.find('a[data-name="' + column.field + '"]').editable(column.editable) - .off('hidden').on('hidden', function (e, reason) { - var data = that.getData(), - index = $(this).parents('tr[data-index]').data('index'), - row = data[index]; - - that.trigger('editable-hidden', column.field, row, $(this), reason); - }); - }); - this.trigger('editable-init'); - }; - -}(jQuery); diff --git a/resources/assets/js/extensions/editable/bootstrap-table-editable.min.js b/resources/assets/js/extensions/editable/bootstrap-table-editable.min.js deleted file mode 100755 index 5c95094998..0000000000 --- a/resources/assets/js/extensions/editable/bootstrap-table-editable.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/* -* bootstrap-table - v1.9.1 - 2015-10-25 -* https://github.com/wenzhixin/bootstrap-table -* Copyright (c) 2015 zhixin wen -* Licensed MIT License -*/ -!function(a){"use strict";a.extend(a.fn.bootstrapTable.defaults,{editable:!0,onEditableInit:function(){return!1},onEditableSave:function(){return!1},onEditableShown:function(){return!1},onEditableHidden:function(){return!1}}),a.extend(a.fn.bootstrapTable.Constructor.EVENTS,{"editable-init.bs.table":"onEditableInit","editable-save.bs.table":"onEditableSave","editable-shown.bs.table":"onEditableShown","editable-hidden.bs.table":"onEditableHidden"});var b=a.fn.bootstrapTable.Constructor,c=b.prototype.initTable,d=b.prototype.initBody;b.prototype.initTable=function(){var b=this;c.apply(this,Array.prototype.slice.apply(arguments)),this.options.editable&&a.each(this.columns,function(a,c){if(c.editable){var d=c.formatter;c.formatter=function(a,e,f){var g=d?d(a,e,f):a;return['"].join("")}}})},b.prototype.initBody=function(){var b=this;d.apply(this,Array.prototype.slice.apply(arguments)),this.options.editable&&(a.each(this.columns,function(c,d){d.editable&&(b.$body.find('a[data-name="'+d.field+'"]').editable(d.editable).off("save").on("save",function(c,e){var f=b.getData(),g=a(this).parents("tr[data-index]").data("index"),h=f[g],i=h[d.field];h[d.field]=e.submitValue,b.trigger("editable-save",d.field,h,i,a(this))}),b.$body.find('a[data-name="'+d.field+'"]').editable(d.editable).off("shown").on("shown",function(c,e){var f=b.getData(),g=a(this).parents("tr[data-index]").data("index"),h=f[g];b.trigger("editable-shown",d.field,h,a(this),e)}),b.$body.find('a[data-name="'+d.field+'"]').editable(d.editable).off("hidden").on("hidden",function(c,e){var f=b.getData(),g=a(this).parents("tr[data-index]").data("index"),h=f[g];b.trigger("editable-hidden",d.field,h,a(this),e)}))}),this.trigger("editable-init"))}}(jQuery); \ No newline at end of file diff --git a/resources/assets/js/extensions/export/bootstrap-table-export.js b/resources/assets/js/extensions/export/bootstrap-table-export.js deleted file mode 100755 index 5e4a7271af..0000000000 --- a/resources/assets/js/extensions/export/bootstrap-table-export.js +++ /dev/null @@ -1,106 +0,0 @@ -/** - * @author zhixin wen - * extensions: https://github.com/kayalshri/tableExport.jquery.plugin - */ - -(function ($) { - 'use strict'; - - var TYPE_NAME = { - json: 'JSON', - xml: 'XML', - png: 'PNG', - csv: 'CSV', - txt: 'TXT', - sql: 'SQL', - doc: 'MS-Word', - excel: 'MS-Excel', - powerpoint: 'MS-Powerpoint', - pdf: 'PDF' - }; - - $.extend($.fn.bootstrapTable.defaults, { - showExport: false, - exportDataType: 'basic', // basic, all, selected - // 'json', 'xml', 'png', 'csv', 'txt', 'sql', 'doc', 'excel', 'powerpoint', 'pdf' - exportTypes: ['json', 'xml', 'csv', 'txt', 'sql', 'excel'], - exportOptions: {} - }); - - var BootstrapTable = $.fn.bootstrapTable.Constructor, - _initToolbar = BootstrapTable.prototype.initToolbar; - - BootstrapTable.prototype.initToolbar = function () { - this.showToolbar = this.options.showExport; - - _initToolbar.apply(this, Array.prototype.slice.apply(arguments)); - - if (this.options.showExport) { - var that = this, - $btnGroup = this.$toolbar.find('>.btn-group'), - $export = $btnGroup.find('div.export'); - - if (!$export.length) { - $export = $([ - '
    ', - '', - '', - '
    '].join('')).appendTo($btnGroup); - - var $menu = $export.find('.dropdown-menu'), - exportTypes = this.options.exportTypes; - - if (typeof this.options.exportTypes === 'string') { - var types = this.options.exportTypes.slice(1, -1).replace(/ /g, '').split(','); - - exportTypes = []; - $.each(types, function (i, value) { - exportTypes.push(value.slice(1, -1)); - }); - } - $.each(exportTypes, function (i, type) { - if (TYPE_NAME.hasOwnProperty(type)) { - $menu.append(['
  • ', - '', - TYPE_NAME[type], - '', - '
  • '].join('')); - } - }); - - $menu.find('li').click(function () { - var type = $(this).data('type'), - doExport = function () { - that.$el.tableExport($.extend({}, that.options.exportOptions, { - type: type, - escape: false - })); - }; - - if (that.options.exportDataType === 'all' && that.options.pagination) { - that.$el.one('load-success.bs.table page-change.bs.table', function () { - doExport(); - that.togglePagination(); - }); - that.togglePagination(); - } else if (that.options.exportDataType === 'selected') { - var data = that.getData(), - selectedData = that.getAllSelections(); - - that.load(selectedData); - doExport(); - that.load(data); - } else { - doExport(); - } - }); - } - } - }; -})(jQuery); diff --git a/resources/assets/js/extensions/export/bootstrap-table-export.min.js b/resources/assets/js/extensions/export/bootstrap-table-export.min.js deleted file mode 100755 index dd2649b6b5..0000000000 --- a/resources/assets/js/extensions/export/bootstrap-table-export.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/* -* bootstrap-table - v1.9.1 - 2015-10-25 -* https://github.com/wenzhixin/bootstrap-table -* Copyright (c) 2015 zhixin wen -* Licensed MIT License -*/ -!function(a){"use strict";var b={json:"JSON",xml:"XML",png:"PNG",csv:"CSV",txt:"TXT",sql:"SQL",doc:"MS-Word",excel:"MS-Excel",powerpoint:"MS-Powerpoint",pdf:"PDF"};a.extend(a.fn.bootstrapTable.defaults,{showExport:!1,exportDataType:"basic",exportTypes:["json","xml","csv","txt","sql","excel"],exportOptions:{}});var c=a.fn.bootstrapTable.Constructor,d=c.prototype.initToolbar;c.prototype.initToolbar=function(){if(this.showToolbar=this.options.showExport,d.apply(this,Array.prototype.slice.apply(arguments)),this.options.showExport){var c=this,e=this.$toolbar.find(">.btn-group"),f=e.find("div.export");if(!f.length){f=a(['
    ','",'","
    "].join("")).appendTo(e);var g=f.find(".dropdown-menu"),h=this.options.exportTypes;if("string"==typeof this.options.exportTypes){var i=this.options.exportTypes.slice(1,-1).replace(/ /g,"").split(",");h=[],a.each(i,function(a,b){h.push(b.slice(1,-1))})}a.each(h,function(a,c){b.hasOwnProperty(c)&&g.append(['
  • ','',b[c],"","
  • "].join(""))}),g.find("li").click(function(){var b=a(this).data("type"),d=function(){c.$el.tableExport(a.extend({},c.options.exportOptions,{type:b,escape:!1}))};if("all"===c.options.exportDataType&&c.options.pagination)c.$el.one("load-success.bs.table page-change.bs.table",function(){d(),c.togglePagination()}),c.togglePagination();else if("selected"===c.options.exportDataType){var e=c.getData(),f=c.getAllSelections();c.load(f),d(),c.load(e)}else d()})}}}}(jQuery); diff --git a/resources/assets/js/extensions/export/jquery.base64.js b/resources/assets/js/extensions/export/jquery.base64.js deleted file mode 100644 index 05684b17b8..0000000000 --- a/resources/assets/js/extensions/export/jquery.base64.js +++ /dev/null @@ -1,59 +0,0 @@ -jQuery.base64 = (function($) { - - // private property - var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; - - // private method for UTF-8 encoding - function utf8Encode(string) { - string = string.replace(/\r\n/g,"\n"); - var utftext = ""; - for (var n = 0; n < string.length; n++) { - var c = string.charCodeAt(n); - if (c < 128) { - utftext += String.fromCharCode(c); - } - else if((c > 127) && (c < 2048)) { - utftext += String.fromCharCode((c >> 6) | 192); - utftext += String.fromCharCode((c & 63) | 128); - } - else { - utftext += String.fromCharCode((c >> 12) | 224); - utftext += String.fromCharCode(((c >> 6) & 63) | 128); - utftext += String.fromCharCode((c & 63) | 128); - } - } - return utftext; - } - - function encode(input) { - var output = ""; - var chr1, chr2, chr3, enc1, enc2, enc3, enc4; - var i = 0; - input = utf8Encode(input); - while (i < input.length) { - chr1 = input.charCodeAt(i++); - chr2 = input.charCodeAt(i++); - chr3 = input.charCodeAt(i++); - enc1 = chr1 >> 2; - enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); - enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); - enc4 = chr3 & 63; - if (isNaN(chr2)) { - enc3 = enc4 = 64; - } else if (isNaN(chr3)) { - enc4 = 64; - } - output = output + - keyStr.charAt(enc1) + keyStr.charAt(enc2) + - keyStr.charAt(enc3) + keyStr.charAt(enc4); - } - return output; - } - - return { - encode: function (str) { - return encode(str); - } - }; - -}(jQuery)); \ No newline at end of file diff --git a/resources/assets/js/extensions/export/tableExport.js b/resources/assets/js/extensions/export/tableExport.js deleted file mode 100644 index 124621767c..0000000000 --- a/resources/assets/js/extensions/export/tableExport.js +++ /dev/null @@ -1,2232 +0,0 @@ -/** - * @preserve tableExport.jquery.plugin - * - * Version 1.9.8 - * - * Copyright (c) 2015-2017 hhurz, https://github.com/hhurz - * - * Original Work Copyright (c) 2014 Giri Raj - * - * Licensed under the MIT License - **/ - -(function ($) { - $.fn.extend({ - tableExport: function (options) { - var defaults = { - consoleLog: false, - csvEnclosure: '"', - csvSeparator: ',', - csvUseBOM: true, - displayTableName: false, - escape: false, - excelFileFormat: 'xlshtml', // xmlss = XML Spreadsheet 2003 file format (XMLSS), xlshtml = Excel 2000 html format - excelRTL: false, // true = Set Excel option 'DisplayRightToLeft' - excelstyles: [], // e.g. ['border-bottom', 'border-top', 'border-left', 'border-right'] - exportHiddenCells: false, // true = speed up export of large tables with hidden cells (hidden cells will be exported !) - fileName: 'tableExport', - htmlContent: false, - ignoreColumn: [], - ignoreRow: [], - jsonScope: 'all', // head, data, all - jspdf: { - orientation: 'p', - unit: 'pt', - format: 'a4', // jspdf page format or 'bestfit' for autmatic paper format selection - margins: {left: 20, right: 10, top: 10, bottom: 10}, - onDocCreated: null, - autotable: { - styles: { - cellPadding: 2, - rowHeight: 12, - fontSize: 8, - fillColor: 255, // color value or 'inherit' to use css background-color from html table - textColor: 50, // color value or 'inherit' to use css color from html table - fontStyle: 'normal', // normal, bold, italic, bolditalic or 'inherit' to use css font-weight and fonst-style from html table - overflow: 'ellipsize', // visible, hidden, ellipsize or linebreak - halign: 'left', // left, center, right - valign: 'middle' // top, middle, bottom - }, - headerStyles: { - fillColor: [52, 73, 94], - textColor: 255, - fontStyle: 'bold', - halign: 'center' - }, - alternateRowStyles: { - fillColor: 245 - }, - tableExport: { - doc: null, // jsPDF doc object. If set, an already created doc will be used to export to - onAfterAutotable: null, - onBeforeAutotable: null, - onAutotableText: null, - onTable: null, - outputImages: true - } - } - }, - numbers: { - html: { - decimalMark: '.', - thousandsSeparator: ',' - }, - output: { // set output: false to keep number format in exported output - decimalMark: '.', - thousandsSeparator: ',' - } - }, - onCellData: null, - onCellHtmlData: null, - onIgnoreRow: null, // onIgnoreRow($tr, rowIndex): function should return true to not export a row - onMsoNumberFormat: null, // Excel 2000 html format only. See readme.md for more information about msonumberformat - outputMode: 'file', // 'file', 'string', 'base64' or 'window' (experimental) - pdfmake: { - enabled: false, // true: use pdfmake instead of jspdf and jspdf-autotable (experimental) - docDefinition: { - pageOrientation: 'portrait', // 'portrait' or 'landscape' - defaultStyle: { - font: 'Roboto' // default is 'Roboto', for arabic font set this option to 'Mirza' and include mirza_fonts.js - } - }, - fonts: {} - }, - tbodySelector: 'tr', - tfootSelector: 'tr', // set empty ('') to prevent export of tfoot rows - theadSelector: 'tr', - tableName: 'Table', - type: 'csv', // 'csv', 'tsv', 'txt', 'sql', 'json', 'xml', 'excel', 'doc', 'png' or 'pdf' - worksheetName: '' - }; - - var FONT_ROW_RATIO = 1.15; - var el = this; - var DownloadEvt = null; - var $hrows = []; - var $rows = []; - var rowIndex = 0; - var trData = ''; - var colNames = []; - var ranges = []; - var blob; - var $hiddenTableElements = []; - var checkCellVisibilty = false; - - $.extend(true, defaults, options); - - colNames = GetColumnNames(el); - - if ( defaults.type == 'csv' || defaults.type == 'tsv' || defaults.type == 'txt' ) { - - var csvData = ""; - var rowlength = 0; - ranges = []; - rowIndex = 0; - - function csvString (cell, rowIndex, colIndex) { - var result = ''; - - if ( cell !== null ) { - var dataString = parseString(cell, rowIndex, colIndex); - - var csvValue = (dataString === null || dataString === '') ? '' : dataString.toString(); - - if ( defaults.type == 'tsv' ) { - if ( dataString instanceof Date ) - dataString.toLocaleString(); - - // According to http://www.iana.org/assignments/media-types/text/tab-separated-values - // are fields that contain tabs not allowable in tsv encoding - result = replaceAll(csvValue, '\t', ' '); - } - else { - // Takes a string and encapsulates it (by default in double-quotes) if it - // contains the csv field separator, spaces, or linebreaks. - if ( dataString instanceof Date ) - result = defaults.csvEnclosure + dataString.toLocaleString() + defaults.csvEnclosure; - else { - result = replaceAll(csvValue, defaults.csvEnclosure, defaults.csvEnclosure + defaults.csvEnclosure); - - if ( result.indexOf(defaults.csvSeparator) >= 0 || /[\r\n ]/g.test(result) ) - result = defaults.csvEnclosure + result + defaults.csvEnclosure; - } - } - } - - return result; - } - - var CollectCsvData = function ($rows, rowselector, length) { - - $rows.each(function () { - trData = ""; - ForEachVisibleCell(this, rowselector, rowIndex, length + $rows.length, - function (cell, row, col) { - trData += csvString(cell, row, col) + (defaults.type == 'tsv' ? '\t' : defaults.csvSeparator); - }); - trData = $.trim(trData).substring(0, trData.length - 1); - if ( trData.length > 0 ) { - - if ( csvData.length > 0 ) - csvData += "\n"; - - csvData += trData; - } - rowIndex++; - }); - - return $rows.length; - }; - - rowlength += CollectCsvData($(el).find('thead').first().find(defaults.theadSelector), 'th,td', rowlength); - findTablePart($(el),'tbody').each(function () { - rowlength += CollectCsvData(findRows($(this), defaults.tbodySelector), 'td,th', rowlength); - }); - if ( defaults.tfootSelector.length ) - CollectCsvData($(el).find('tfoot').first().find(defaults.tfootSelector), 'td,th', rowlength); - - csvData += "\n"; - - //output - if ( defaults.consoleLog === true ) - console.log(csvData); - - if ( defaults.outputMode === 'string' ) - return csvData; - - if ( defaults.outputMode === 'base64' ) - return base64encode(csvData); - - if ( defaults.outputMode === 'window' ) { - downloadFile(false, 'data:text/' + (defaults.type == 'csv' ? 'csv' : 'plain') + ';charset=utf-8,', csvData); - return; - } - - try { - blob = new Blob([csvData], {type: "text/" + (defaults.type == 'csv' ? 'csv' : 'plain') + ";charset=utf-8"}); - saveAs(blob, defaults.fileName + '.' + defaults.type, (defaults.type != 'csv' || defaults.csvUseBOM === false)); - } - catch (e) { - downloadFile(defaults.fileName + '.' + defaults.type, - 'data:text/' + (defaults.type == 'csv' ? 'csv' : 'plain') + ';charset=utf-8,' + ((defaults.type == 'csv' && defaults.csvUseBOM) ? '\ufeff' : ''), - csvData); - } - - } else if ( defaults.type == 'sql' ) { - - // Header - rowIndex = 0; - ranges = []; - var tdData = "INSERT INTO `" + defaults.tableName + "` ("; - $hrows = $(el).find('thead').first().find(defaults.theadSelector); - $hrows.each(function () { - ForEachVisibleCell(this, 'th,td', rowIndex, $hrows.length, - function (cell, row, col) { - tdData += "'" + parseString(cell, row, col) + "',"; - }); - rowIndex++; - tdData = $.trim(tdData); - tdData = $.trim(tdData).substring(0, tdData.length - 1); - }); - tdData += ") VALUES "; - - // Data - $rows = collectRows ($(el)); - $($rows).each(function () { - trData = ""; - ForEachVisibleCell(this, 'td,th', rowIndex, $hrows.length + $rows.length, - function (cell, row, col) { - trData += "'" + parseString(cell, row, col) + "',"; - }); - if ( trData.length > 3 ) { - tdData += "(" + trData; - tdData = $.trim(tdData).substring(0, tdData.length - 1); - tdData += "),"; - } - rowIndex++; - }); - - tdData = $.trim(tdData).substring(0, tdData.length - 1); - tdData += ";"; - - // Output - if ( defaults.consoleLog === true ) - console.log(tdData); - - if ( defaults.outputMode === 'string' ) - return tdData; - - if ( defaults.outputMode === 'base64' ) - return base64encode(tdData); - - try { - blob = new Blob([tdData], {type: "text/plain;charset=utf-8"}); - saveAs(blob, defaults.fileName + '.sql'); - } - catch (e) { - downloadFile(defaults.fileName + '.sql', - 'data:application/sql;charset=utf-8,', - tdData); - } - - } else if ( defaults.type == 'json' ) { - var jsonHeaderArray = []; - ranges = []; - $hrows = $(el).find('thead').first().find(defaults.theadSelector); - $hrows.each(function () { - var jsonArrayTd = []; - - ForEachVisibleCell(this, 'th,td', rowIndex, $hrows.length, - function (cell, row, col) { - jsonArrayTd.push(parseString(cell, row, col)); - }); - jsonHeaderArray.push(jsonArrayTd); - }); - - // Data - var jsonArray = []; - - $rows = collectRows ($(el)); - $($rows).each(function () { - var jsonObjectTd = {}; - var colIndex = 0; - - ForEachVisibleCell(this, 'td,th', rowIndex, $hrows.length + $rows.length, - function (cell, row, col) { - if ( jsonHeaderArray.length ) { - jsonObjectTd[jsonHeaderArray[jsonHeaderArray.length - 1][colIndex]] = parseString(cell, row, col); - } else { - jsonObjectTd[colIndex] = parseString(cell, row, col); - } - colIndex++; - }); - if ( $.isEmptyObject(jsonObjectTd) === false ) - jsonArray.push(jsonObjectTd); - - rowIndex++; - }); - - var sdata = ""; - - if ( defaults.jsonScope == 'head' ) - sdata = JSON.stringify(jsonHeaderArray); - else if ( defaults.jsonScope == 'data' ) - sdata = JSON.stringify(jsonArray); - else // all - sdata = JSON.stringify({header: jsonHeaderArray, data: jsonArray}); - - if ( defaults.consoleLog === true ) - console.log(sdata); - - if ( defaults.outputMode === 'string' ) - return sdata; - - if ( defaults.outputMode === 'base64' ) - return base64encode(sdata); - - try { - blob = new Blob([sdata], {type: "application/json;charset=utf-8"}); - saveAs(blob, defaults.fileName + '.json'); - } - catch (e) { - downloadFile(defaults.fileName + '.json', - 'data:application/json;charset=utf-8;base64,', - sdata); - } - - } else if ( defaults.type === 'xml' ) { - rowIndex = 0; - ranges = []; - var xml = ''; - xml += ''; - - // Header - $hrows = $(el).find('thead').first().find(defaults.theadSelector); - $hrows.each(function () { - - ForEachVisibleCell(this, 'th,td', rowIndex, $hrows.length, - function (cell, row, col) { - xml += "" + parseString(cell, row, col) + ""; - }); - rowIndex++; - }); - xml += ''; - - // Data - var rowCount = 1; - - $rows = collectRows ($(el)); - $($rows).each(function () { - var colCount = 1; - trData = ""; - ForEachVisibleCell(this, 'td,th', rowIndex, $hrows.length + $rows.length, - function (cell, row, col) { - trData += "" + parseString(cell, row, col) + ""; - colCount++; - }); - if ( trData.length > 0 && trData != "" ) { - xml += '' + trData + ''; - rowCount++; - } - - rowIndex++; - }); - xml += ''; - - // Output - if ( defaults.consoleLog === true ) - console.log(xml); - - if ( defaults.outputMode === 'string' ) - return xml; - - if ( defaults.outputMode === 'base64' ) - return base64encode(xml); - - try { - blob = new Blob([xml], {type: "application/xml;charset=utf-8"}); - saveAs(blob, defaults.fileName + '.xml'); - } - catch (e) { - downloadFile(defaults.fileName + '.xml', - 'data:application/xml;charset=utf-8;base64,', - xml); - } - } - else if ( defaults.type === 'excel' && defaults.excelFileFormat === 'xmlss' ) { - var docDatas = []; - var docNames = []; - - $(el).filter(function () { - return isVisible($(this)); - }).each(function () { - var $table = $(this); - - var ssName = ''; - if ( typeof defaults.worksheetName === 'string' && defaults.worksheetName.length ) - ssName = defaults.worksheetName + ' ' + (docNames.length + 1); - else if ( typeof defaults.worksheetName[docNames.length] !== 'undefined' ) - ssName = defaults.worksheetName[docNames.length]; - if ( ! ssName.length ) - ssName = $table.find('caption').text() || ''; - if ( ! ssName.length ) - ssName = 'Table ' + (docNames.length + 1); - ssName = ssName.replace(/[\\\/[\]*:?'"]/g,'').substring(0,31).trim(); - - docNames.push($('
    ').text(ssName).html()); - - if ( defaults.exportHiddenCells === false ) { - $hiddenTableElements = $table.find("tr, th, td").filter(":hidden"); - checkCellVisibilty = $hiddenTableElements.length > 0; - } - - rowIndex = 0; - colNames = GetColumnNames(this); - docData = '\r'; - - function CollectXmlssData ($rows, rowselector, length) { - var spans = []; - - $($rows).each(function () { - var ssIndex = 0; - var nCols = 0; - trData = ""; - - ForEachVisibleCell(this, 'td,th', rowIndex, length + $rows.length, - function (cell, row, col) { - if ( cell !== null ) { - var style = ""; - var data = parseString(cell, row, col); - var type = "String"; - - if ( jQuery.isNumeric(data) !== false ) { - type = "Number"; - } - else { - var number = parsePercent(data); - if ( number !== false ) { - data = number; - type = "Number"; - style += ' ss:StyleID="pct1"'; - } - } - - if ( type !== "Number" ) - data = data.replace(/\n/g, '
    '); - - var colspan = parseInt(cell.getAttribute('colspan')); - var rowspan = parseInt(cell.getAttribute('rowspan')); - - // Skip spans - spans.forEach(function (range) { - if ( rowIndex >= range.s.r && rowIndex <= range.e.r && nCols >= range.s.c && nCols <= range.e.c ) { - for ( var i = 0; i <= range.e.c - range.s.c; ++i ) { - nCols++; - ssIndex++; - } - } - }); - - // Handle Row Span - if ( rowspan || colspan ) { - rowspan = rowspan || 1; - colspan = colspan || 1; - spans.push({ - s: {r: rowIndex, c: nCols}, - e: {r: rowIndex + rowspan - 1, c: nCols + colspan - 1} - }); - } - - // Handle Colspan - if ( colspan > 1 ) { - style += ' ss:MergeAcross="' + (colspan-1) + '"'; - nCols += (colspan - 1); - } - - if ( rowspan > 1 ) { - style += ' ss:MergeDown="' + (rowspan-1) + '" ss:StyleID="rsp1"'; - } - - if ( ssIndex > 0 ) { - style += ' ss:Index="' + (nCols+1) + '"'; - ssIndex = 0; - } - - trData += '' + - $('
    ').text(data).html() + - '\r'; - nCols++; - } - }); - if ( trData.length > 0 ) - docData += '\r' + trData + '\r'; - rowIndex++; - }); - - return $rows.length; - } - - var rowLength = 0; - rowLength += CollectXmlssData ($table.find('thead').first().find(defaults.theadSelector), 'th,td', rowLength); - CollectXmlssData (collectRows ($table), 'td,th', rowLength); - - docData += '
    \r'; - docDatas.push(docData); - - if ( defaults.consoleLog === true ) - console.log(docData); - }); - - var count = {}; - var firstOccurences = {}; - var item, itemCount; - for (var n = 0, c = docNames.length; n < c; n++) - { - item = docNames[n]; - itemCount = count[item]; - itemCount = count[item] = (itemCount == null ? 1 : itemCount + 1); - - if( itemCount == 2 ) - docNames[firstOccurences[item]] = docNames[firstOccurences[item]].substring(0,29) + "-1"; - if( count[ item ] > 1 ) - docNames[n] = docNames[n].substring(0,29) + "-" + count[item]; - else - firstOccurences[item] = n; - } - - var CreationDate = new Date().toISOString(); - var xmlssDocFile = '\r' + - '\r' + - '\r' + - '\r' + - ' ' + CreationDate + '\r' + - '\r' + - '\r' + - ' \r' + - '\r' + - '\r' + - ' 9000\r' + - ' 13860\r' + - ' 0\r' + - ' 0\r' + - ' False\r' + - ' False\r' + - '\r' + - '\r' + - ' \r' + - ' \r' + - ' \r' + - '\r'; - - for ( var j = 0; j < docDatas.length; j++ ) { - xmlssDocFile += '\r' + - docDatas[j]; - if (defaults.excelRTL) { - xmlssDocFile += '\r' + - '\r' + - '\r'; - } - else - xmlssDocFile += '\r'; - xmlssDocFile += '\r'; - } - - xmlssDocFile += '\r'; - - if ( defaults.consoleLog === true ) - console.log(xmlssDocFile); - - if ( defaults.outputMode === 'string' ) - return xmlssDocFile; - - if ( defaults.outputMode === 'base64' ) - return base64encode(xmlssDocFile); - - try { - blob = new Blob([xmlssDocFile], {type: "application/xml;charset=utf-8"}); - saveAs(blob, defaults.fileName + '.xml'); - } - catch (e) { - downloadFile(defaults.fileName + '.xml', - 'data:application/xml;charset=utf-8;base64,', - xmlssDocFile); - } - } - else if ( defaults.type == 'excel' || defaults.type == 'xls' || defaults.type == 'word' || defaults.type == 'doc' ) { - - var MSDocType = (defaults.type == 'excel' || defaults.type == 'xls') ? 'excel' : 'word'; - var MSDocExt = (MSDocType == 'excel') ? 'xls' : 'doc'; - var MSDocSchema = 'xmlns:x="urn:schemas-microsoft-com:office:' + MSDocType + '"'; - var docData = ''; - var docName = ''; - - $(el).filter(function () { - return isVisible($(this)); - }).each(function () { - var $table = $(this); - - if (docName === '') { - docName = defaults.worksheetName || $table.find('caption').text() || 'Table'; - docName = docName.replace(/[\\\/[\]*:?'"]/g, '').substring(0, 31).trim(); - } - - if ( defaults.exportHiddenCells === false ) { - $hiddenTableElements = $table.find("tr, th, td").filter(":hidden"); - checkCellVisibilty = $hiddenTableElements.length > 0; - } - - rowIndex = 0; - ranges = []; - colNames = GetColumnNames(this); - - // Header - docData += ''; - $hrows = $table.find('thead').first().find(defaults.theadSelector); - $hrows.each(function () { - trData = ""; - ForEachVisibleCell(this, 'th,td', rowIndex, $hrows.length, - function (cell, row, col) { - if ( cell !== null ) { - var thstyle = ''; - trData += ''; - } - }); - if ( trData.length > 0 ) - docData += '' + trData + ''; - rowIndex++; - }); - docData += ''; - - // Data - $rows = collectRows ($table); - $($rows).each(function () { - var $row = $(this); - trData = ""; - ForEachVisibleCell(this, 'td,th', rowIndex, $hrows.length + $rows.length, - function (cell, row, col) { - if ( cell !== null ) { - var tdvalue = parseString(cell, row, col); - var tdstyle = ''; - var tdcss = $(cell).data("tableexport-msonumberformat"); - - if ( typeof tdcss == 'undefined' && typeof defaults.onMsoNumberFormat === 'function' ) - tdcss = defaults.onMsoNumberFormat(cell, row, col); - - if ( typeof tdcss != 'undefined' && tdcss !== '' ) - tdstyle = 'style="mso-number-format:\'' + tdcss + '\''; - - for ( var cssStyle in defaults.excelstyles ) { - if ( defaults.excelstyles.hasOwnProperty(cssStyle) ) { - tdcss = $(cell).css(defaults.excelstyles[cssStyle]); - if ( tdcss === '' ) - tdcss = $row.css(defaults.excelstyles[cssStyle]); - - if ( tdcss !== '' && tdcss != '0px none rgb(0, 0, 0)' && tdcss != 'rgba(0, 0, 0, 0)' ) { - tdstyle += (tdstyle === '') ? 'style="' : ';'; - tdstyle += defaults.excelstyles[cssStyle] + ':' + tdcss; - } - } - } - trData += ''); - - trData += '>' + tdvalue + ''; - } - }); - if ( trData.length > 0 ) - docData += '' + trData + ''; - rowIndex++; - }); - - if ( defaults.displayTableName ) - docData += ''; - - docData += '
    ' + parseString($('

    ' + defaults.tableName + '

    ')) + '
    '; - - if ( defaults.consoleLog === true ) - console.log(docData); - }); - - //noinspection XmlUnusedNamespaceDeclaration - var docFile = ''; - docFile += ''; - docFile += ""; - if (MSDocType === 'excel') { - docFile += ""; - } - docFile += ""; - docFile += ""; - docFile += ""; - docFile += docData; - docFile += ""; - docFile += ""; - - if ( defaults.consoleLog === true ) - console.log(docFile); - - if ( defaults.outputMode === 'string' ) - return docFile; - - if ( defaults.outputMode === 'base64' ) - return base64encode(docFile); - - try { - blob = new Blob([docFile], {type: 'application/vnd.ms-' + defaults.type}); - saveAs(blob, defaults.fileName + '.' + MSDocExt); - } - catch (e) { - downloadFile(defaults.fileName + '.' + MSDocExt, - 'data:application/vnd.ms-' + MSDocType + ';base64,', - docFile); - } - - } else if ( defaults.type == 'xlsx' ) { - - var data = []; - var spans = []; - rowIndex = 0; - - $rows = $(el).find('thead').first().find(defaults.theadSelector); - $rows.push.apply($rows, collectRows ($(el))); - - $($rows).each(function () { - var cols = []; - ForEachVisibleCell(this, 'th,td', rowIndex, $rows.length, - function (cell, row, col) { - if ( typeof cell !== 'undefined' && cell !== null ) { - - var cellValue = parseString(cell, row, col); - - var colspan = parseInt(cell.getAttribute('colspan')); - var rowspan = parseInt(cell.getAttribute('rowspan')); - - // Skip span ranges - spans.forEach(function (range) { - if ( rowIndex >= range.s.r && rowIndex <= range.e.r && cols.length >= range.s.c && cols.length <= range.e.c ) { - for ( var i = 0; i <= range.e.c - range.s.c; ++i ) - cols.push(null); - } - }); - - // Handle Row Span - if ( rowspan || colspan ) { - rowspan = rowspan || 1; - colspan = colspan || 1; - spans.push({ - s: {r: rowIndex, c: cols.length}, - e: {r: rowIndex + rowspan - 1, c: cols.length + colspan - 1} - }); - } - - // Handle Value - if ( typeof defaults.onCellData !== 'function' ) { - - // Type conversion - if ( cellValue !== "" && cellValue == +cellValue ) - cellValue = +cellValue; - } - cols.push(cellValue !== "" ? cellValue : null); - - // Handle Colspan - if ( colspan ) - for ( var k = 0; k < colspan - 1; ++k ) - cols.push(null); - } - }); - data.push(cols); - rowIndex++; - }); - - //noinspection JSPotentiallyInvalidConstructorUsage - var wb = new jx_Workbook(), - ws = jx_createSheet(data); - - // add span ranges to worksheet - ws['!merges'] = spans; - - // add worksheet to workbook - wb.SheetNames.push(defaults.worksheetName); - wb.Sheets[defaults.worksheetName] = ws; - - var wbout = XLSX.write(wb, {bookType: defaults.type, bookSST: false, type: 'binary'}); - - try { - blob = new Blob([jx_s2ab(wbout)], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8'}); - saveAs(blob, defaults.fileName + '.' + defaults.type); - } - catch (e) { - downloadFile(defaults.fileName + '.' + defaults.type, - 'data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8,', - jx_s2ab(wbout)); - } - - } else if ( defaults.type == 'png' ) { - //html2canvas($(el)[0], { - // onrendered: function (canvas) { - html2canvas($(el)[0]).then( - function (canvas) { - - var image = canvas.toDataURL(); - var byteString = atob(image.substring(22)); // remove data stuff - var buffer = new ArrayBuffer(byteString.length); - var intArray = new Uint8Array(buffer); - - for ( var i = 0; i < byteString.length; i++ ) - intArray[i] = byteString.charCodeAt(i); - - if ( defaults.consoleLog === true ) - console.log(byteString); - - if ( defaults.outputMode === 'string' ) - return byteString; - - if ( defaults.outputMode === 'base64' ) - return base64encode(image); - - if ( defaults.outputMode === 'window' ) { - window.open(image); - return; - } - - try { - blob = new Blob([buffer], {type: "image/png"}); - saveAs(blob, defaults.fileName + '.png'); - } - catch (e) { - downloadFile(defaults.fileName + '.png', 'data:image/png,', blob); - } - //} - }); - - } else if ( defaults.type == 'pdf' ) { - - if ( defaults.pdfmake.enabled === true ) { - // pdf output using pdfmake - // https://github.com/bpampuch/pdfmake - - var widths = []; - var body = []; - rowIndex = 0; - ranges = []; - - var CollectPdfmakeData = function ($rows, colselector, length) { - var rlength = 0; - - $($rows).each(function () { - var r = []; - - ForEachVisibleCell(this, colselector, rowIndex, length, - function (cell, row, col) { - if ( typeof cell !== 'undefined' && cell !== null ) { - - var colspan = parseInt(cell.getAttribute('colspan')); - var rowspan = parseInt(cell.getAttribute('rowspan')); - - var cellValue = parseString(cell, row, col) || " "; - - if ( colspan > 1 || rowspan > 1 ) { - colspan = colspan || 1; - rowspan = rowspan || 1; - r.push({colSpan: colspan, rowSpan: rowspan, text: cellValue}); - } - else - r.push(cellValue); - } - else - r.push(" "); - }); - - if ( r.length ) - body.push(r); - - if ( rlength < r.length ) - rlength = r.length; - - rowIndex++; - }); - - return rlength; - }; - - $hrows = $(this).find('thead').first().find(defaults.theadSelector); - - var colcount = CollectPdfmakeData($hrows, 'th,td', $hrows.length); - - for ( var i = widths.length; i < colcount; i++ ) - widths.push("*"); - - // Data - $rows = collectRows ($(this)); - - CollectPdfmakeData($rows, 'th,td', $hrows.length + $rows.length); - - var docDefinition = { - content: [{ - table: { - headerRows: $hrows.length, - widths: widths, - body: body - } - }] - }; - - $.extend(true, docDefinition, defaults.pdfmake.docDefinition); - - pdfMake.fonts = { - Roboto: { - normal: 'Roboto-Regular.ttf', - bold: 'Roboto-Medium.ttf', - italics: 'Roboto-Italic.ttf', - bolditalics: 'Roboto-MediumItalic.ttf' - } - }; - - $.extend(true, pdfMake.fonts, defaults.pdfmake.fonts); - - pdfMake.createPdf(docDefinition).getBuffer(function (buffer) { - - try { - var blob = new Blob([buffer], {type: "application/pdf"}); - saveAs(blob, defaults.fileName + '.pdf'); - } - catch (e) { - downloadFile(defaults.fileName + '.pdf', - 'data:application/pdf;base64,', - buffer); - } - }); - - } - else if ( defaults.jspdf.autotable === false ) { - // pdf output using jsPDF's core html support - - var addHtmlOptions = { - dim: { - w: getPropertyUnitValue($(el).first().get(0), 'width', 'mm'), - h: getPropertyUnitValue($(el).first().get(0), 'height', 'mm') - }, - pagesplit: false - }; - - var doc = new jsPDF(defaults.jspdf.orientation, defaults.jspdf.unit, defaults.jspdf.format); - doc.addHTML($(el).first(), - defaults.jspdf.margins.left, - defaults.jspdf.margins.top, - addHtmlOptions, - function () { - jsPdfOutput(doc, false); - }); - //delete doc; - } - else { - // pdf output using jsPDF AutoTable plugin - // https://github.com/simonbengtsson/jsPDF-AutoTable - - var teOptions = defaults.jspdf.autotable.tableExport; - - // When setting jspdf.format to 'bestfit' tableExport tries to choose - // the minimum required paper format and orientation in which the table - // (or tables in multitable mode) completely fits without column adjustment - if ( typeof defaults.jspdf.format === 'string' && defaults.jspdf.format.toLowerCase() === 'bestfit' ) { - var pageFormats = { - 'a0': [2383.94, 3370.39], 'a1': [1683.78, 2383.94], - 'a2': [1190.55, 1683.78], 'a3': [841.89, 1190.55], - 'a4': [595.28, 841.89] - }; - var rk = '', ro = ''; - var mw = 0; - - $(el).each(function () { - if ( isVisible($(this)) ) { - var w = getPropertyUnitValue($(this).get(0), 'width', 'pt'); - - if ( w > mw ) { - if ( w > pageFormats.a0[0] ) { - rk = 'a0'; - ro = 'l'; - } - for ( var key in pageFormats ) { - if ( pageFormats.hasOwnProperty(key) ) { - if ( pageFormats[key][1] > w ) { - rk = key; - ro = 'l'; - if ( pageFormats[key][0] > w ) - ro = 'p'; - } - } - } - mw = w; - } - } - }); - defaults.jspdf.format = (rk === '' ? 'a4' : rk); - defaults.jspdf.orientation = (ro === '' ? 'w' : ro); - } - - // The jsPDF doc object is stored in defaults.jspdf.autotable.tableExport, - // thus it can be accessed from any callback function - if ( teOptions.doc == null ) { - teOptions.doc = new jsPDF(defaults.jspdf.orientation, - defaults.jspdf.unit, - defaults.jspdf.format); - - if ( typeof defaults.jspdf.onDocCreated === 'function' ) - defaults.jspdf.onDocCreated(teOptions.doc); - } - - if ( teOptions.outputImages === true ) - teOptions.images = {}; - - if ( typeof teOptions.images != 'undefined' ) { - $(el).filter(function () { - return isVisible($(this)); - }).each(function () { - var rowCount = 0; - ranges = []; - - if ( defaults.exportHiddenCells === false ) { - $hiddenTableElements = $(this).find("tr, th, td").filter(":hidden"); - checkCellVisibilty = $hiddenTableElements.length > 0; - } - - $hrows = $(this).find('thead').find(defaults.theadSelector); - $rows = collectRows ($(this)); - - $($rows).each(function () { - ForEachVisibleCell(this, 'td,th', $hrows.length + rowCount, $hrows.length + $rows.length, - function (cell) { - if ( typeof cell !== 'undefined' && cell !== null ) { - var kids = $(cell).children(); - if ( typeof kids != 'undefined' && kids.length > 0 ) - collectImages(cell, kids, teOptions); - } - }); - rowCount++; - }); - }); - - $hrows = []; - $rows = []; - } - - loadImages(teOptions, function () { - $(el).filter(function () { - return isVisible($(this)); - }).each(function () { - var colKey; - rowIndex = 0; - ranges = []; - - if ( defaults.exportHiddenCells === false ) { - $hiddenTableElements = $(this).find("tr, th, td").filter(":hidden"); - checkCellVisibilty = $hiddenTableElements.length > 0; - } - - colNames = GetColumnNames(this); - - teOptions.columns = []; - teOptions.rows = []; - teOptions.rowoptions = {}; - - // onTable: optional callback function for every matching table that can be used - // to modify the tableExport options or to skip the output of a particular table - // if the table selector targets multiple tables - if ( typeof teOptions.onTable === 'function' ) - if ( teOptions.onTable($(this), defaults) === false ) - return true; // continue to next iteration step (table) - - // each table works with an own copy of AutoTable options - defaults.jspdf.autotable.tableExport = null; // avoid deep recursion error - var atOptions = $.extend(true, {}, defaults.jspdf.autotable); - defaults.jspdf.autotable.tableExport = teOptions; - - atOptions.margin = {}; - $.extend(true, atOptions.margin, defaults.jspdf.margins); - atOptions.tableExport = teOptions; - - // Fix jsPDF Autotable's row height calculation - if ( typeof atOptions.beforePageContent !== 'function' ) { - atOptions.beforePageContent = function (data) { - if ( data.pageCount == 1 ) { - var all = data.table.rows.concat(data.table.headerRow); - all.forEach(function (row) { - if ( row.height > 0 ) { - row.height += (2 - FONT_ROW_RATIO) / 2 * row.styles.fontSize; - data.table.height += (2 - FONT_ROW_RATIO) / 2 * row.styles.fontSize; - } - }); - } - }; - } - - if ( typeof atOptions.createdHeaderCell !== 'function' ) { - // apply some original css styles to pdf header cells - atOptions.createdHeaderCell = function (cell, data) { - - // jsPDF AutoTable plugin v2.0.14 fix: each cell needs its own styles object - cell.styles = $.extend({}, data.row.styles); - - if ( typeof teOptions.columns [data.column.dataKey] != 'undefined' ) { - var col = teOptions.columns [data.column.dataKey]; - - if ( typeof col.rect != 'undefined' ) { - var rh; - - cell.contentWidth = col.rect.width; - - if ( typeof teOptions.heightRatio == 'undefined' || teOptions.heightRatio === 0 ) { - if ( data.row.raw [data.column.dataKey].rowspan ) - rh = data.row.raw [data.column.dataKey].rect.height / data.row.raw [data.column.dataKey].rowspan; - else - rh = data.row.raw [data.column.dataKey].rect.height; - - teOptions.heightRatio = cell.styles.rowHeight / rh; - } - - rh = data.row.raw [data.column.dataKey].rect.height * teOptions.heightRatio; - if ( rh > cell.styles.rowHeight ) - cell.styles.rowHeight = rh; - } - - if ( typeof col.style != 'undefined' && col.style.hidden !== true ) { - cell.styles.halign = col.style.align; - if ( atOptions.styles.fillColor === 'inherit' ) - cell.styles.fillColor = col.style.bcolor; - if ( atOptions.styles.textColor === 'inherit' ) - cell.styles.textColor = col.style.color; - if ( atOptions.styles.fontStyle === 'inherit' ) - cell.styles.fontStyle = col.style.fstyle; - } - } - }; - } - - if ( typeof atOptions.createdCell !== 'function' ) { - // apply some original css styles to pdf table cells - atOptions.createdCell = function (cell, data) { - var rowopt = teOptions.rowoptions [data.row.index + ":" + data.column.dataKey]; - - if ( typeof rowopt != 'undefined' && - typeof rowopt.style != 'undefined' && - rowopt.style.hidden !== true ) { - cell.styles.halign = rowopt.style.align; - if ( atOptions.styles.fillColor === 'inherit' ) - cell.styles.fillColor = rowopt.style.bcolor; - if ( atOptions.styles.textColor === 'inherit' ) - cell.styles.textColor = rowopt.style.color; - if ( atOptions.styles.fontStyle === 'inherit' ) - cell.styles.fontStyle = rowopt.style.fstyle; - } - }; - } - - if ( typeof atOptions.drawHeaderCell !== 'function' ) { - atOptions.drawHeaderCell = function (cell, data) { - var colopt = teOptions.columns [data.column.dataKey]; - - if ( (colopt.style.hasOwnProperty("hidden") !== true || colopt.style.hidden !== true) && - colopt.rowIndex >= 0 ) - return prepareAutoTableText(cell, data, colopt); - else - return false; // cell is hidden - }; - } - - if ( typeof atOptions.drawCell !== 'function' ) { - atOptions.drawCell = function (cell, data) { - var rowopt = teOptions.rowoptions [data.row.index + ":" + data.column.dataKey]; - if ( prepareAutoTableText(cell, data, rowopt) ) { - - teOptions.doc.rect(cell.x, cell.y, cell.width, cell.height, cell.styles.fillStyle); - - if ( typeof rowopt != 'undefined' && typeof rowopt.kids != 'undefined' && rowopt.kids.length > 0 ) { - - var dh = cell.height / rowopt.rect.height; - if ( dh > teOptions.dh || typeof teOptions.dh == 'undefined' ) - teOptions.dh = dh; - teOptions.dw = cell.width / rowopt.rect.width; - - var y = cell.textPos.y; - drawAutotableElements(cell, rowopt.kids, teOptions); - cell.textPos.y = y; - drawAutotableText(cell, rowopt.kids, teOptions); - } - else - drawAutotableText(cell, {}, teOptions); - } - return false; - }; - } - - // collect header and data rows - teOptions.headerrows = []; - $hrows = $(this).find('thead').find(defaults.theadSelector); - $hrows.each(function () { - colKey = 0; - teOptions.headerrows[rowIndex] = []; - - ForEachVisibleCell(this, 'th,td', rowIndex, $hrows.length, - function (cell, row, col) { - var obj = getCellStyles(cell); - obj.title = parseString(cell, row, col); - obj.key = colKey++; - obj.rowIndex = rowIndex; - teOptions.headerrows[rowIndex].push(obj); - }); - rowIndex++; - }); - - if ( rowIndex > 0 ) { - // iterate through last row - var lastrow = rowIndex - 1; - while ( lastrow >= 0 ) { - $.each(teOptions.headerrows[lastrow], function () { - var obj = this; - - if ( lastrow > 0 && this.rect === null ) - obj = teOptions.headerrows[lastrow - 1][this.key]; - - if ( obj !== null && obj.rowIndex >= 0 && - (obj.style.hasOwnProperty("hidden") !== true || obj.style.hidden !== true) ) - teOptions.columns.push(obj); - }); - - lastrow = (teOptions.columns.length > 0) ? -1 : lastrow - 1; - } - } - - var rowCount = 0; - $rows = []; - $rows = collectRows ($(this)); - $($rows).each(function () { - var rowData = []; - colKey = 0; - - ForEachVisibleCell(this, 'td,th', rowIndex, $hrows.length + $rows.length, - function (cell, row, col) { - var obj; - - if ( typeof teOptions.columns[colKey] === 'undefined' ) { - // jsPDF-Autotable needs columns. Thus define hidden ones for tables without thead - obj = { - title: '', - key: colKey, - style: { - hidden: true - } - }; - teOptions.columns.push(obj); - } - if ( typeof cell !== 'undefined' && cell !== null ) { - obj = getCellStyles(cell); - obj.kids = $(cell).children(); - teOptions.rowoptions [rowCount + ":" + colKey++] = obj; - } - else { - obj = $.extend(true, {}, teOptions.rowoptions [rowCount + ":" + (colKey - 1)]); - obj.colspan = -1; - teOptions.rowoptions [rowCount + ":" + colKey++] = obj; - } - - rowData.push(parseString(cell, row, col)); - }); - if ( rowData.length ) { - teOptions.rows.push(rowData); - rowCount++; - } - rowIndex++; - }); - - // onBeforeAutotable: optional callback function before calling - // jsPDF AutoTable that can be used to modify the AutoTable options - if ( typeof teOptions.onBeforeAutotable === 'function' ) - teOptions.onBeforeAutotable($(this), teOptions.columns, teOptions.rows, atOptions); - - teOptions.doc.autoTable(teOptions.columns, teOptions.rows, atOptions); - - // onAfterAutotable: optional callback function after returning - // from jsPDF AutoTable that can be used to modify the AutoTable options - if ( typeof teOptions.onAfterAutotable === 'function' ) - teOptions.onAfterAutotable($(this), atOptions); - - // set the start position for the next table (in case there is one) - defaults.jspdf.autotable.startY = teOptions.doc.autoTableEndPosY() + atOptions.margin.top; - - }); - - jsPdfOutput(teOptions.doc, (typeof teOptions.images != 'undefined' && jQuery.isEmptyObject(teOptions.images) === false)); - - if ( typeof teOptions.headerrows != 'undefined' ) - teOptions.headerrows.length = 0; - if ( typeof teOptions.columns != 'undefined' ) - teOptions.columns.length = 0; - if ( typeof teOptions.rows != 'undefined' ) - teOptions.rows.length = 0; - delete teOptions.doc; - teOptions.doc = null; - }); - } - } - - /* - function FindColObject (objects, colIndex, rowIndex) { - var result = null; - $.each(objects, function () { - if ( this.rowIndex == rowIndex && this.key == colIndex ) { - result = this; - return false; - } - }); - return result; - } - */ - function collectRows ($table) { - var result = []; - findTablePart($table,'tbody').each(function () { - result.push.apply(result, findRows($(this), defaults.tbodySelector)); - }); - if ( defaults.tfootSelector.length ) { - findTablePart($table,'tfoot').each(function () { - result.push.apply(result, findRows($(this), defaults.tfootSelector)); - }); - } - return result; - } - - function findTablePart ($table, type) { - var tl = $table.parents('table').length; - return $table.find(type).filter (function () { - return $(this).closest('table').parents('table').length === tl; - }); - } - - function findRows ($tpart, rowSelector) { - return $tpart.find(rowSelector).filter (function () { - return $(this).find('table').length === 0 && $(this).parents('table').length === 1; - }); - } - - function GetColumnNames (table) { - var result = []; - $(table).find('thead').first().find('th').each(function (index, el) { - if ( $(el).attr("data-field") !== undefined ) - result[index] = $(el).attr("data-field"); - else - result[index] = index.toString(); - }); - return result; - } - - function isVisible ($element) { - var isCell = typeof $element[0].cellIndex !== 'undefined'; - var isRow = typeof $element[0].rowIndex !== 'undefined'; - var isElementVisible = (isCell || isRow) ? isTableElementVisible($element) : $element.is(':visible'); - var tableexportDisplay = $element.data("tableexport-display"); - - if (isCell && tableexportDisplay != 'none' && tableexportDisplay != 'always') { - $element = $($element[0].parentNode); - isRow = typeof $element[0].rowIndex !== 'undefined'; - tableexportDisplay = $element.data("tableexport-display"); - } - if (isRow && tableexportDisplay != 'none' && tableexportDisplay != 'always') { - tableexportDisplay = $element.closest('table').data("tableexport-display"); - } - - return tableexportDisplay !== 'none' && (isElementVisible == true || tableexportDisplay == 'always'); - } - - function isTableElementVisible ($element) { - var hiddenEls = []; - - if ( checkCellVisibilty ) { - hiddenEls = $hiddenTableElements.filter (function () { - var found = false; - - if (this.nodeType == $element[0].nodeType) { - if (typeof this.rowIndex !== 'undefined' && this.rowIndex == $element[0].rowIndex) - found = true; - else if (typeof this.cellIndex !== 'undefined' && this.cellIndex == $element[0].cellIndex && - typeof this.parentNode.rowIndex !== 'undefined' && - typeof $element[0].parentNode.rowIndex !== 'undefined' && - this.parentNode.rowIndex == $element[0].parentNode.rowIndex) - found = true; - } - return found; - }); - } - return (checkCellVisibilty == false || hiddenEls.length == 0); - } - - function isColumnIgnored ($cell, rowLength, colIndex) { - var result = false; - - if (isVisible($cell)) { - if ( defaults.ignoreColumn.length > 0 ) { - if ( $.inArray(colIndex, defaults.ignoreColumn) != -1 || - $.inArray(colIndex - rowLength, defaults.ignoreColumn) != -1 || - (colNames.length > colIndex && typeof colNames[colIndex] != 'undefined' && - $.inArray(colNames[colIndex], defaults.ignoreColumn) != -1) ) - result = true; - } - } - else - result = true; - - return result; - } - - function ForEachVisibleCell (tableRow, selector, rowIndex, rowCount, cellcallback) { - if ( typeof (cellcallback) === 'function' ) { - var ignoreRow = false; - - if (typeof defaults.onIgnoreRow === 'function') - ignoreRow = defaults.onIgnoreRow($(tableRow), rowIndex); - - if (ignoreRow === false && - $.inArray(rowIndex, defaults.ignoreRow) == -1 && - $.inArray(rowIndex - rowCount, defaults.ignoreRow) == -1 && - isVisible($(tableRow))) { - - var $cells = $(tableRow).find(selector); - var cellCount = 0; - - $cells.each(function (colIndex) { - var $cell = $(this); - var c; - var colspan = parseInt(this.getAttribute('colspan')); - var rowspan = parseInt(this.getAttribute('rowspan')); - - // Skip ranges - ranges.forEach(function (range) { - if ( rowIndex >= range.s.r && rowIndex <= range.e.r && cellCount >= range.s.c && cellCount <= range.e.c ) { - for ( c = 0; c <= range.e.c - range.s.c; ++c ) - cellcallback(null, rowIndex, cellCount++); - } - }); - - if ( isColumnIgnored($cell, $cells.length, colIndex) === false ) { - // Handle Row Span - if ( rowspan || colspan ) { - rowspan = rowspan || 1; - colspan = colspan || 1; - ranges.push({ - s: {r: rowIndex, c: cellCount}, - e: {r: rowIndex + rowspan - 1, c: cellCount + colspan - 1} - }); - } - - // Handle Value - cellcallback(this, rowIndex, cellCount++); - } - - // Handle Colspan - if ( colspan ) - for ( c = 0; c < colspan - 1; ++c ) - cellcallback(null, rowIndex, cellCount++); - }); - - // Skip ranges - ranges.forEach(function (range) { - if ( rowIndex >= range.s.r && rowIndex <= range.e.r && cellCount >= range.s.c && cellCount <= range.e.c ) { - for ( c = 0; c <= range.e.c - range.s.c; ++c ) - cellcallback(null, rowIndex, cellCount++); - } - }); - } - } - } - - function jsPdfOutput (doc, hasimages) { - if ( defaults.consoleLog === true ) - console.log(doc.output()); - - if ( defaults.outputMode === 'string' ) - return doc.output(); - - if ( defaults.outputMode === 'base64' ) - return base64encode(doc.output()); - - if ( defaults.outputMode === 'window' ) { - window.URL = window.URL || window.webkitURL; - window.open(window.URL.createObjectURL(doc.output("blob"))); - return; - } - - try { - var blob = doc.output('blob'); - saveAs(blob, defaults.fileName + '.pdf'); - } - catch (e) { - downloadFile(defaults.fileName + '.pdf', - 'data:application/pdf' + (hasimages ? '' : ';base64') + ',', - hasimages ? doc.output('blob') : doc.output()); - } - } - - function prepareAutoTableText (cell, data, cellopt) { - var cs = 0; - if ( typeof cellopt !== 'undefined' ) - cs = cellopt.colspan; - - if ( cs >= 0 ) { - // colspan handling - var cellWidth = cell.width; - var textPosX = cell.textPos.x; - var i = data.table.columns.indexOf(data.column); - - for ( var c = 1; c < cs; c++ ) { - var column = data.table.columns[i + c]; - cellWidth += column.width; - } - - if ( cs > 1 ) { - if ( cell.styles.halign === 'right' ) - textPosX = cell.textPos.x + cellWidth - cell.width; - else if ( cell.styles.halign === 'center' ) - textPosX = cell.textPos.x + (cellWidth - cell.width) / 2; - } - - cell.width = cellWidth; - cell.textPos.x = textPosX; - - if ( typeof cellopt !== 'undefined' && cellopt.rowspan > 1 ) - cell.height = cell.height * cellopt.rowspan; - - // fix jsPDF's calculation of text position - if ( cell.styles.valign === 'middle' || cell.styles.valign === 'bottom' ) { - var splittedText = typeof cell.text === 'string' ? cell.text.split(/\r\n|\r|\n/g) : cell.text; - var lineCount = splittedText.length || 1; - if ( lineCount > 2 ) - cell.textPos.y -= ((2 - FONT_ROW_RATIO) / 2 * data.row.styles.fontSize) * (lineCount - 2) / 3; - } - return true; - } - else - return false; // cell is hidden (colspan = -1), don't draw it - } - - function collectImages (cell, elements, teOptions) { - if ( typeof teOptions.images != 'undefined' ) { - elements.each(function () { - var kids = $(this).children(); - - if ( $(this).is("img") ) { - var hash = strHashCode(this.src); - - teOptions.images[hash] = { - url: this.src, - src: this.src - }; - } - - if ( typeof kids != 'undefined' && kids.length > 0 ) - collectImages(cell, kids, teOptions); - }); - } - } - - function loadImages (teOptions, callback) { - var i; - var imageCount = 0; - var x = 0; - - function done () { - callback(imageCount); - } - - function loadImage (image) { - if ( !image.url ) - return; - var img = new Image(); - imageCount = ++x; - img.crossOrigin = 'Anonymous'; - img.onerror = img.onload = function () { - if ( img.complete ) { - - if ( img.src.indexOf('data:image/') === 0 ) { - img.width = image.width || img.width || 0; - img.height = image.height || img.height || 0; - } - - if ( img.width + img.height ) { - var canvas = document.createElement("canvas"); - var ctx = canvas.getContext("2d"); - - canvas.width = img.width; - canvas.height = img.height; - ctx.drawImage(img, 0, 0); - - image.src = canvas.toDataURL("image/jpeg"); - } - } - if ( !--x ) - done(); - }; - img.src = image.url; - } - - if ( typeof teOptions.images != 'undefined' ) { - for ( i in teOptions.images ) - if ( teOptions.images.hasOwnProperty(i) ) - loadImage(teOptions.images[i]); - } - - return x || done(); - } - - function drawAutotableElements (cell, elements, teOptions) { - elements.each(function () { - var kids = $(this).children(); - var uy = 0; - - if ( $(this).is("div") ) { - var bcolor = rgb2array(getStyle(this, 'background-color'), [255, 255, 255]); - var lcolor = rgb2array(getStyle(this, 'border-top-color'), [0, 0, 0]); - var lwidth = getPropertyUnitValue(this, 'border-top-width', defaults.jspdf.unit); - - var r = this.getBoundingClientRect(); - var ux = this.offsetLeft * teOptions.dw; - uy = this.offsetTop * teOptions.dh; - var uw = r.width * teOptions.dw; - var uh = r.height * teOptions.dh; - - teOptions.doc.setDrawColor.apply(undefined, lcolor); - teOptions.doc.setFillColor.apply(undefined, bcolor); - teOptions.doc.setLineWidth(lwidth); - teOptions.doc.rect(cell.x + ux, cell.y + uy, uw, uh, lwidth ? "FD" : "F"); - } - else if ( $(this).is("img") ) { - if ( typeof teOptions.images != 'undefined' ) { - var hash = strHashCode(this.src); - var image = teOptions.images[hash]; - - if ( typeof image != 'undefined' ) { - - var arCell = cell.width / cell.height; - var arImg = this.width / this.height; - var imgWidth = cell.width; - var imgHeight = cell.height; - var px2pt = 0.264583 * 72 / 25.4; - - if ( arImg <= arCell ) { - imgHeight = Math.min(cell.height, this.height); - imgWidth = this.width * imgHeight / this.height; - } - else if ( arImg > arCell ) { - imgWidth = Math.min(cell.width, this.width); - imgHeight = this.height * imgWidth / this.width; - } - - imgWidth *= px2pt; - imgHeight *= px2pt; - - if ( imgHeight < cell.height ) - uy = (cell.height - imgHeight) / 2; - - try { - teOptions.doc.addImage(image.src, cell.textPos.x, cell.y + uy, imgWidth, imgHeight); - } - catch (e) { - // TODO: IE -> convert png to jpeg - } - cell.textPos.x += imgWidth; - } - } - } - - if ( typeof kids != 'undefined' && kids.length > 0 ) - drawAutotableElements(cell, kids, teOptions); - }); - } - - function drawAutotableText (cell, texttags, teOptions) { - if ( typeof teOptions.onAutotableText === 'function' ) { - teOptions.onAutotableText(teOptions.doc, cell, texttags); - } - else { - var x = cell.textPos.x; - var y = cell.textPos.y; - var style = {halign: cell.styles.halign, valign: cell.styles.valign}; - - if ( texttags.length ) { - var tag = texttags[0]; - while ( tag.previousSibling ) - tag = tag.previousSibling; - - var b = false, i = false; - - while ( tag ) { - var txt = tag.innerText || tag.textContent || ""; - - txt = ((txt.length && txt[0] == " ") ? " " : "") + - $.trim(txt) + - ((txt.length > 1 && txt[txt.length - 1] == " ") ? " " : ""); - - if ( $(tag).is("br") ) { - x = cell.textPos.x; - y += teOptions.doc.internal.getFontSize(); - } - - if ( $(tag).is("b") ) - b = true; - else if ( $(tag).is("i") ) - i = true; - - if ( b || i ) - teOptions.doc.setFontType((b && i) ? "bolditalic" : b ? "bold" : "italic"); - - var w = teOptions.doc.getStringUnitWidth(txt) * teOptions.doc.internal.getFontSize(); - - if ( w ) { - if ( cell.styles.overflow === 'linebreak' && - x > cell.textPos.x && (x + w) > (cell.textPos.x + cell.width) ) { - var chars = ".,!%*;:=-"; - if ( chars.indexOf(txt.charAt(0)) >= 0 ) { - var s = txt.charAt(0); - w = teOptions.doc.getStringUnitWidth(s) * teOptions.doc.internal.getFontSize(); - if ( (x + w) <= (cell.textPos.x + cell.width) ) { - teOptions.doc.autoTableText(s, x, y, style); - txt = txt.substring(1, txt.length); - } - w = teOptions.doc.getStringUnitWidth(txt) * teOptions.doc.internal.getFontSize(); - } - x = cell.textPos.x; - y += teOptions.doc.internal.getFontSize(); - } - - while ( txt.length && (x + w) > (cell.textPos.x + cell.width) ) { - txt = txt.substring(0, txt.length - 1); - w = teOptions.doc.getStringUnitWidth(txt) * teOptions.doc.internal.getFontSize(); - } - - teOptions.doc.autoTableText(txt, x, y, style); - x += w; - } - - if ( b || i ) { - if ( $(tag).is("b") ) - b = false; - else if ( $(tag).is("i") ) - i = false; - - teOptions.doc.setFontType((!b && !i) ? "normal" : b ? "bold" : "italic"); - } - - tag = tag.nextSibling; - } - cell.textPos.x = x; - cell.textPos.y = y; - } - else { - teOptions.doc.autoTableText(cell.text, cell.textPos.x, cell.textPos.y, style); - } - } - } - - function escapeRegExp (string) { - return string.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1"); - } - - function replaceAll (string, find, replace) { - return string.replace(new RegExp(escapeRegExp(find), 'g'), replace); - } - - function parseNumber (value) { - value = value || "0"; - value = replaceAll(value, defaults.numbers.html.thousandsSeparator, ''); - value = replaceAll(value, defaults.numbers.html.decimalMark, '.'); - - return typeof value === "number" || jQuery.isNumeric(value) !== false ? value : false; - } - - function parsePercent (value) { - if ( value.indexOf("%") > -1 ) { - value = parseNumber(value.replace(/%/g, "")); - if ( value !== false ) - value = value / 100; - } - else - value = false; - return value; - } - - function parseString (cell, rowIndex, colIndex) { - var result = ''; - - if ( cell !== null ) { - var $cell = $(cell); - var htmlData; - - if ( $cell[0].hasAttribute("data-tableexport-value") ) { - htmlData = $cell.data("tableexport-value"); - htmlData = htmlData ? htmlData + '' : '' - } - else { - htmlData = $cell.html(); - - if ( typeof defaults.onCellHtmlData === 'function' ) - htmlData = defaults.onCellHtmlData($cell, rowIndex, colIndex, htmlData); - else if ( htmlData != '' ) { - var html = $.parseHTML(htmlData); - var inputidx = 0; - var selectidx = 0; - - htmlData = ''; - $.each(html, function () { - if ( $(this).is("input") ) - htmlData += $cell.find('input').eq(inputidx++).val(); - else if ( $(this).is("select") ) - htmlData += $cell.find('select option:selected').eq(selectidx++).text(); - else { - if ( typeof $(this).html() === 'undefined' ) - htmlData += $(this).text(); - else if ( jQuery().bootstrapTable === undefined || - ($(this).hasClass('filterControl') !== true && - $(cell).parents('.detail-view').length === 0) ) - htmlData += $(this).html(); - } - }); - } - } - - if ( defaults.htmlContent === true ) { - result = $.trim(htmlData); - } - else if ( htmlData && htmlData != '' ) { - var cellFormat = $(cell).data("tableexport-cellformat"); - - if ( cellFormat != '' ) { - var text = htmlData.replace(/\n/g, '\u2028').replace(//gi, '\u2060'); - var obj = $('
    ').html(text).contents(); - var number = false; - text = ''; - $.each(obj.text().split("\u2028"), function (i, v) { - if ( i > 0 ) - text += " "; - text += $.trim(v); - }); - - $.each(text.split("\u2060"), function (i, v) { - if ( i > 0 ) - result += "\n"; - result += $.trim(v).replace(/\u00AD/g, ""); // remove soft hyphens - }); - - if ( defaults.type == 'json' || - (defaults.type === 'excel' && defaults.excelFileFormat === 'xmlss') || - defaults.numbers.output === false ) { - number = parseNumber(result); - - if ( number !== false ) - result = Number(number); - } - else if ( defaults.numbers.html.decimalMark != defaults.numbers.output.decimalMark || - defaults.numbers.html.thousandsSeparator != defaults.numbers.output.thousandsSeparator ) { - number = parseNumber(result); - - if ( number !== false ) { - var frac = ("" + number.substr(number < 0 ? 1 : 0)).split('.'); - if ( frac.length == 1 ) - frac[1] = ""; - var mod = frac[0].length > 3 ? frac[0].length % 3 : 0; - - result = (number < 0 ? "-" : "") + - (defaults.numbers.output.thousandsSeparator ? ((mod ? frac[0].substr(0, mod) + defaults.numbers.output.thousandsSeparator : "") + frac[0].substr(mod).replace(/(\d{3})(?=\d)/g, "$1" + defaults.numbers.output.thousandsSeparator)) : frac[0]) + - (frac[1].length ? defaults.numbers.output.decimalMark + frac[1] : ""); - } - } - } - else - result = htmlData; - } - - if ( defaults.escape === true ) { - //noinspection JSDeprecatedSymbols - result = escape(result); - } - - if ( typeof defaults.onCellData === 'function' ) { - result = defaults.onCellData($cell, rowIndex, colIndex, result); - } - } - - return result; - } - - //noinspection JSUnusedLocalSymbols - function hyphenate (a, b, c) { - return b + "-" + c.toLowerCase(); - } - - function rgb2array (rgb_string, default_result) { - var re = /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/; - var bits = re.exec(rgb_string); - var result = default_result; - if ( bits ) - result = [parseInt(bits[1]), parseInt(bits[2]), parseInt(bits[3])]; - return result; - } - - function getCellStyles (cell) { - var a = getStyle(cell, 'text-align'); - var fw = getStyle(cell, 'font-weight'); - var fs = getStyle(cell, 'font-style'); - var f = ''; - if ( a == 'start' ) - a = getStyle(cell, 'direction') == 'rtl' ? 'right' : 'left'; - if ( fw >= 700 ) - f = 'bold'; - if ( fs == 'italic' ) - f += fs; - if ( f === '' ) - f = 'normal'; - - var result = { - style: { - align: a, - bcolor: rgb2array(getStyle(cell, 'background-color'), [255, 255, 255]), - color: rgb2array(getStyle(cell, 'color'), [0, 0, 0]), - fstyle: f - }, - colspan: (parseInt($(cell).attr('colspan')) || 0), - rowspan: (parseInt($(cell).attr('rowspan')) || 0) - }; - - if ( cell !== null ) { - var r = cell.getBoundingClientRect(); - result.rect = { - width: r.width, - height: r.height - }; - } - - return result; - } - - // get computed style property - function getStyle (target, prop) { - try { - if ( window.getComputedStyle ) { // gecko and webkit - prop = prop.replace(/([a-z])([A-Z])/, hyphenate); // requires hyphenated, not camel - return window.getComputedStyle(target, null).getPropertyValue(prop); - } - if ( target.currentStyle ) { // ie - return target.currentStyle[prop]; - } - return target.style[prop]; - } - catch (e) { - } - return ""; - } - - function getUnitValue (parent, value, unit) { - var baseline = 100; // any number serves - - var temp = document.createElement("div"); // create temporary element - temp.style.overflow = "hidden"; // in case baseline is set too low - temp.style.visibility = "hidden"; // no need to show it - - parent.appendChild(temp); // insert it into the parent for em, ex and % - - temp.style.width = baseline + unit; - var factor = baseline / temp.offsetWidth; - - parent.removeChild(temp); // clean up - - return (value * factor); - } - - function getPropertyUnitValue (target, prop, unit) { - var value = getStyle(target, prop); // get the computed style value - - var numeric = value.match(/\d+/); // get the numeric component - if ( numeric !== null ) { - numeric = numeric[0]; // get the string - - return getUnitValue(target.parentElement, numeric, unit); - } - return 0; - } - - function jx_Workbook () { - if ( !(this instanceof jx_Workbook) ) { - //noinspection JSPotentiallyInvalidConstructorUsage - return new jx_Workbook(); - } - this.SheetNames = []; - this.Sheets = {}; - } - - function jx_s2ab (s) { - var buf = new ArrayBuffer(s.length); - var view = new Uint8Array(buf); - for ( var i = 0; i != s.length; ++i ) view[i] = s.charCodeAt(i) & 0xFF; - return buf; - } - - function jx_datenum (v, date1904) { - if ( date1904 ) v += 1462; - var epoch = Date.parse(v); - return (epoch - new Date(Date.UTC(1899, 11, 30))) / (24 * 60 * 60 * 1000); - } - - function jx_createSheet (data) { - var ws = {}; - var range = {s: {c: 10000000, r: 10000000}, e: {c: 0, r: 0}}; - for ( var R = 0; R != data.length; ++R ) { - for ( var C = 0; C != data[R].length; ++C ) { - if ( range.s.r > R ) range.s.r = R; - if ( range.s.c > C ) range.s.c = C; - if ( range.e.r < R ) range.e.r = R; - if ( range.e.c < C ) range.e.c = C; - var cell = {v: data[R][C]}; - if ( cell.v === null ) continue; - var cell_ref = XLSX.utils.encode_cell({c: C, r: R}); - - if ( typeof cell.v === 'number' ) cell.t = 'n'; - else if ( typeof cell.v === 'boolean' ) cell.t = 'b'; - else if ( cell.v instanceof Date ) { - cell.t = 'n'; - cell.z = XLSX.SSF._table[14]; - cell.v = jx_datenum(cell.v); - } - else cell.t = 's'; - ws[cell_ref] = cell; - } - } - - if ( range.s.c < 10000000 ) ws['!ref'] = XLSX.utils.encode_range(range); - return ws; - } - - function strHashCode (str) { - var hash = 0, i, chr, len; - if ( str.length === 0 ) return hash; - for ( i = 0, len = str.length; i < len; i++ ) { - chr = str.charCodeAt(i); - hash = ((hash << 5) - hash) + chr; - hash |= 0; // Convert to 32bit integer - } - return hash; - } - - function downloadFile (filename, header, data) { - var ua = window.navigator.userAgent; - if ( filename !== false && window.navigator.msSaveOrOpenBlob ) { - //noinspection JSUnresolvedFunction - window.navigator.msSaveOrOpenBlob(new Blob([data]), filename); - } - else if ( filename !== false && (ua.indexOf("MSIE ") > 0 || !!ua.match(/Trident.*rv\:11\./)) ) { - // Internet Explorer (<= 9) workaround by Darryl (https://github.com/dawiong/tableExport.jquery.plugin) - // based on sampopes answer on http://stackoverflow.com/questions/22317951 - // ! Not working for json and pdf format ! - var frame = document.createElement("iframe"); - - if ( frame ) { - document.body.appendChild(frame); - frame.setAttribute("style", "display:none"); - frame.contentDocument.open("txt/html", "replace"); - frame.contentDocument.write(data); - frame.contentDocument.close(); - frame.focus(); - - frame.contentDocument.execCommand("SaveAs", true, filename); - document.body.removeChild(frame); - } - } - else { - var DownloadLink = document.createElement('a'); - - if ( DownloadLink ) { - var blobUrl = null; - - DownloadLink.style.display = 'none'; - if ( filename !== false ) - DownloadLink.download = filename; - else - DownloadLink.target = '_blank'; - - if ( typeof data == 'object' ) { - window.URL = window.URL || window.webkitURL; - blobUrl = window.URL.createObjectURL(data); - DownloadLink.href = blobUrl; - } - else if ( header.toLowerCase().indexOf("base64,") >= 0 ) - DownloadLink.href = header + base64encode(data); - else - DownloadLink.href = header + encodeURIComponent(data); - - document.body.appendChild(DownloadLink); - - if ( document.createEvent ) { - if ( DownloadEvt === null ) - DownloadEvt = document.createEvent('MouseEvents'); - - DownloadEvt.initEvent('click', true, false); - DownloadLink.dispatchEvent(DownloadEvt); - } - else if ( document.createEventObject ) - DownloadLink.fireEvent('onclick'); - else if ( typeof DownloadLink.onclick == 'function' ) - DownloadLink.onclick(); - - setTimeout(function(){ - if ( blobUrl ) - window.URL.revokeObjectURL(blobUrl); - document.body.removeChild(DownloadLink); - }, 100); - } - } - } - - function utf8Encode (text) { - if (typeof text === 'string') { - text = text.replace(/\x0d\x0a/g, "\x0a"); - var utftext = ""; - for ( var n = 0; n < text.length; n++ ) { - var c = text.charCodeAt(n); - if ( c < 128 ) { - utftext += String.fromCharCode(c); - } - else if ( (c > 127) && (c < 2048) ) { - utftext += String.fromCharCode((c >> 6) | 192); - utftext += String.fromCharCode((c & 63) | 128); - } - else { - utftext += String.fromCharCode((c >> 12) | 224); - utftext += String.fromCharCode(((c >> 6) & 63) | 128); - utftext += String.fromCharCode((c & 63) | 128); - } - } - return utftext; - } - return text; - } - - function base64encode (input) { - var chr1, chr2, chr3, enc1, enc2, enc3, enc4; - var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; - var output = ""; - var i = 0; - input = utf8Encode(input); - while ( i < input.length ) { - chr1 = input.charCodeAt(i++); - chr2 = input.charCodeAt(i++); - chr3 = input.charCodeAt(i++); - enc1 = chr1 >> 2; - enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); - enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); - enc4 = chr3 & 63; - if ( isNaN(chr2) ) { - enc3 = enc4 = 64; - } else if ( isNaN(chr3) ) { - enc4 = 64; - } - output = output + - keyStr.charAt(enc1) + keyStr.charAt(enc2) + - keyStr.charAt(enc3) + keyStr.charAt(enc4); - } - return output; - } - - return this; - } - }); -})(jQuery); diff --git a/resources/assets/js/extensions/export/tableExport.min.js b/resources/assets/js/extensions/export/tableExport.min.js deleted file mode 100644 index 7844ddfac0..0000000000 --- a/resources/assets/js/extensions/export/tableExport.min.js +++ /dev/null @@ -1,77 +0,0 @@ -/* - tableExport.jquery.plugin - - Version 1.9.8 - - Copyright (c) 2015-2017 hhurz, https://github.com/hhurz - - Original Work Copyright (c) 2014 Giri Raj - - Licensed under the MIT License -*/ -var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(c,f,u){c instanceof String&&(c=String(c));for(var C=c.length,D=0;Dk&&"undefined"!=typeof Q[k]&&-1!=c.inArray(Q[k],a.ignoreColumn))&&(r=!0):r=!0;return r}function B(b,e,k,r,g){if("function"===typeof g){var h=!1;"function"===typeof a.onIgnoreRow&&(h=a.onIgnoreRow(c(b),k));if(!1===h&&-1==c.inArray(k,a.ignoreRow)&&-1==c.inArray(k-r,a.ignoreRow)&&P(c(b))){var x=c(b).find(e),q=0;x.each(function(b){var e=c(this),a,h=parseInt(this.getAttribute("colspan")),r=parseInt(this.getAttribute("rowspan")); - G.forEach(function(b){if(k>=b.s.r&&k<=b.e.r&&q>=b.s.c&&q<=b.e.c)for(a=0;a<=b.e.c-b.s.c;++a)g(null,k,q++)});if(!1===za(e,x.length,b)){if(r||h)h=h||1,G.push({s:{r:k,c:q},e:{r:k+(r||1)-1,c:q+h-1}});g(this,k,q++)}if(h)for(a=0;a=b.s.r&&k<=b.e.r&&q>=b.s.c&&q<=b.e.c)for(Y=0;Y<=b.e.c-b.s.c;++Y)g(null,k,q++)})}}}function la(b,e){!0===a.consoleLog&&console.log(b.output());if("string"===a.outputMode)return b.output();if("base64"===a.outputMode)return L(b.output()); - if("window"===a.outputMode)window.URL=window.URL||window.webkitURL,window.open(window.URL.createObjectURL(b.output("blob")));else try{var k=b.output("blob");saveAs(k,a.fileName+".pdf")}catch(r){H(a.fileName+".pdf","data:application/pdf"+(e?"":";base64")+",",e?b.output("blob"):b.output())}}function ma(b,e,a){var k=0;"undefined"!==typeof a&&(k=a.colspan);if(0<=k){for(var g=b.width,c=b.textPos.x,x=e.table.columns.indexOf(e.column),q=1;qx&&(f=Math.min(b.width,this.width),l=this.height*f/this.width);f*=d;l*=d;lb.textPos.x&&k+f>b.textPos.x+b.width){if(0<=".,!%*;:=-".indexOf(d.charAt(0))){var l=d.charAt(0);f=a.doc.getStringUnitWidth(l)*a.doc.internal.getFontSize();k+f<=b.textPos.x+b.width&&(a.doc.autoTableText(l,k,g,h),d=d.substring(1,d.length));f=a.doc.getStringUnitWidth(d)*a.doc.internal.getFontSize()}k= - b.textPos.x;g+=a.doc.internal.getFontSize()}for(;d.length&&k+f>b.textPos.x+b.width;)d=d.substring(0,d.length-1),f=a.doc.getStringUnitWidth(d)*a.doc.internal.getFontSize();a.doc.autoTableText(d,k,g,h);k+=f}if(x||q)c(e).is("b")?x=!1:c(e).is("i")&&(q=!1),a.doc.setFontType(x||q?x?"bold":"italic":"normal");e=e.nextSibling}b.textPos.x=k;b.textPos.y=g}else a.doc.autoTableText(b.text,b.textPos.x,b.textPos.y,h)}}function ba(b,a,c){return b.replace(new RegExp(a.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1"), - "g"),c)}function ea(b){b=ba(b||"0",a.numbers.html.thousandsSeparator,"");b=ba(b,a.numbers.html.decimalMark,".");return"number"===typeof b||!1!==jQuery.isNumeric(b)?b:!1}function Ba(b){-1/gi,"\u2060"),m=c("
    ").html(n).contents();d=!1;n="";c.each(m.text().split("\u2028"),function(b,a){0d?1:0)).split(".");1==m.length&&(m[1]="");var p=3d?"-":"")+(a.numbers.output.thousandsSeparator?(p?m[0].substr(0,p)+a.numbers.output.thousandsSeparator:"")+m[0].substr(p).replace(/(\d{3})(?=\d)/g,"$1"+a.numbers.output.thousandsSeparator):m[0])+(m[1].length?a.numbers.output.decimalMark+m[1]:"")}}else r=h;!0===a.escape&&(r=escape(r));"function"===typeof a.onCellData&&(r=a.onCellData(g,e,k,r))}return r}function Ca(b,a,c){return a+"-"+c.toLowerCase()} - function Z(b,a){(b=/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/.exec(b))&&(a=[parseInt(b[1]),parseInt(b[2]),parseInt(b[3])]);return a}function ra(b){var a=M(b,"text-align"),k=M(b,"font-weight"),r=M(b,"font-style"),g="";"start"==a&&(a="rtl"==M(b,"direction")?"right":"left");700<=k&&(g="bold");"italic"==r&&(g+=r);""===g&&(g="normal");a={style:{align:a,bcolor:Z(M(b,"background-color"),[255,255,255]),color:Z(M(b,"color"),[0,0,0]),fstyle:g},colspan:parseInt(c(b).attr("colspan"))||0,rowspan:parseInt(c(b).attr("rowspan"))|| - 0};null!==b&&(b=b.getBoundingClientRect(),a.rect={width:b.width,height:b.height});return a}function M(b,a){try{return window.getComputedStyle?(a=a.replace(/([a-z])([A-Z])/,Ca),window.getComputedStyle(b,null).getPropertyValue(a)):b.currentStyle?b.currentStyle[a]:b.style[a]}catch(k){}return""}function aa(b,a,c){a=M(b,a).match(/\d+/);if(null!==a){a=a[0];b=b.parentElement;var e=document.createElement("div");e.style.overflow="hidden";e.style.visibility="hidden";b.appendChild(e);e.style.width=100+c;c=100/ - e.offsetWidth;b.removeChild(e);return a*c}return 0}function fa(){if(!(this instanceof fa))return new fa;this.SheetNames=[];this.Sheets={}}function sa(b){for(var a=new ArrayBuffer(b.length),c=new Uint8Array(a),d=0;d!=b.length;++d)c[d]=b.charCodeAt(d)&255;return a}function Da(b){for(var a={},c={s:{c:1E7,r:1E7},e:{c:0,r:0}},d=0;d!=b.length;++d)for(var g=0;g!=b[d].length;++g){c.s.r>d&&(c.s.r=d);c.s.c>g&&(c.s.c=g);c.e.rc.s.c&&(a["!ref"]=XLSX.utils.encode_range(c));return a}function oa(b){var a=0,c;if(0===b.length)return a;var d=0;for(c=b.length;dh?g+=String.fromCharCode(h):(127h?g+=String.fromCharCode(h>>6|192):(g+=String.fromCharCode(h>>12|224),g+=String.fromCharCode(h>>6&63|128)),g+=String.fromCharCode(h&63|128))}a=g}for(;d>2;f=(f&3)<<4|g>>4;var q=(g&15)<<2|b>>6;var l=b&63;isNaN(g)?q=l=64:isNaN(b)&&(l=64);c=c+ - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(f)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(q)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(l)}return c}var a={consoleLog:!1,csvEnclosure:'"',csvSeparator:",",csvUseBOM:!0,displayTableName:!1,escape:!1,excelFileFormat:"xlshtml",excelRTL:!1,excelstyles:[],exportHiddenCells:!1,fileName:"tableExport", - htmlContent:!1,ignoreColumn:[],ignoreRow:[],jsonScope:"all",jspdf:{orientation:"p",unit:"pt",format:"a4",margins:{left:20,right:10,top:10,bottom:10},onDocCreated:null,autotable:{styles:{cellPadding:2,rowHeight:12,fontSize:8,fillColor:255,textColor:50,fontStyle:"normal",overflow:"ellipsize",halign:"left",valign:"middle"},headerStyles:{fillColor:[52,73,94],textColor:255,fontStyle:"bold",halign:"center"},alternateRowStyles:{fillColor:245},tableExport:{doc:null,onAfterAutotable:null,onBeforeAutotable:null, - onAutotableText:null,onTable:null,outputImages:!0}}},numbers:{html:{decimalMark:".",thousandsSeparator:","},output:{decimalMark:".",thousandsSeparator:","}},onCellData:null,onCellHtmlData:null,onIgnoreRow:null,onMsoNumberFormat:null,outputMode:"file",pdfmake:{enabled:!1,docDefinition:{pageOrientation:"portrait",defaultStyle:{font:"Roboto"}},fonts:{}},tbodySelector:"tr",tfootSelector:"tr",theadSelector:"tr",tableName:"Table",type:"csv",worksheetName:""},v=this,ca=null,p=[],t=[],l=0,m="",Q=[],G=[], - K=[],R=!1;c.extend(!0,a,f);Q=O(v);if("csv"==a.type||"tsv"==a.type||"txt"==a.type){var I="",U=0;G=[];l=0;var ha=function(b,e,k){b.each(function(){m="";B(this,e,l,k+b.length,function(b,c,e){var g=m,h="";if(null!==b)if(b=z(b,c,e),c=null===b||""===b?"":b.toString(),"tsv"==a.type)b instanceof Date&&b.toLocaleString(),h=ba(c,"\t"," ");else if(b instanceof Date)h=a.csvEnclosure+b.toLocaleString()+a.csvEnclosure;else if(h=ba(c,a.csvEnclosure,a.csvEnclosure+a.csvEnclosure),0<=h.indexOf(a.csvSeparator)||/[\r\n ]/g.test(h))h= - a.csvEnclosure+h+a.csvEnclosure;m=g+(h+("tsv"==a.type?"\t":a.csvSeparator))});m=c.trim(m).substring(0,m.length-1);0"+z(a,c,d)+""});l++});J+="";var ta=1;t=u(c(v));c(t).each(function(){var a=1;m="";B(this,"td,th",l,p.length+t.length,function(b,c,d){m+=""+z(b,c,d)+"";a++});0"!=m&&(J+=''+m+"",ta++);l++});J+="";!0===a.consoleLog&&console.log(J);if("string"===a.outputMode)return J; - if("base64"===a.outputMode)return L(J);try{A=new Blob([J],{type:"application/xml;charset=utf-8"}),saveAs(A,a.fileName+".xml")}catch(b){H(a.fileName+".xml","data:application/xml;charset=utf-8;base64,",J)}}else if("excel"===a.type&&"xmlss"===a.excelFileFormat){var ja=[],F=[];c(v).filter(function(){return P(c(this))}).each(function(){function b(a,b,e){var g=[];c(a).each(function(){var b=0,h=0;m="";B(this,"td,th",l,e+a.length,function(a,e,d){if(null!==a){var k="";e=z(a,e,d);d="String";if(!1!==jQuery.isNumeric(e))d= - "Number";else{var f=Ba(e);!1!==f&&(e=f,d="Number",k+=' ss:StyleID="pct1"')}"Number"!==d&&(e=e.replace(/\n/g,"
    "));f=parseInt(a.getAttribute("colspan"));a=parseInt(a.getAttribute("rowspan"));g.forEach(function(a){if(l>=a.s.r&&l<=a.e.r&&h>=a.s.c&&h<=a.e.c)for(var c=0;c<=a.e.c-a.s.c;++c)h++,b++});if(a||f)a=a||1,f=f||1,g.push({s:{r:l,c:h},e:{r:l+a-1,c:h+f-1}});1'+c("
    ").text(e).html()+"\r";h++}});0\r'+m+"\r");l++});return a.length}var e=c(this),d="";"string"===typeof a.worksheetName&&a.worksheetName.length?d=a.worksheetName+" "+(F.length+1):"undefined"!==typeof a.worksheetName[F.length]&&(d=a.worksheetName[F.length]);d.length||(d=e.find("caption").text()||"");d.length||(d="Table "+(F.length+1));d=d.replace(/[\\\/[\]*:?'"]/g,"").substring(0,31).trim(); - F.push(c("
    ").text(d).html());!1===a.exportHiddenCells&&(K=e.find("tr, th, td").filter(":hidden"),R=0\r";d=0;d+=b(e.find("thead").first().find(a.theadSelector),"th,td",d);b(u(e),"td,th",d);E+="\r";ja.push(E);!0===a.consoleLog&&console.log(E)});f={};for(var y={},n,N,T=0,Y=F.length;T\r\r\r\r '+ - (new Date).toISOString()+'\r\r\r \r\r\r 9000\r 13860\r 0\r 0\r False\r False\r\r\r \r \r \r\r'; - for(y=0;y\r'+ja[y],f=a.excelRTL?f+'\r\r\r':f+'\r',f+="\r";f+="\r";!0===a.consoleLog&&console.log(f);if("string"===a.outputMode)return f;if("base64"===a.outputMode)return L(f);try{A=new Blob([f],{type:"application/xml;charset=utf-8"}), - saveAs(A,a.fileName+".xml")}catch(b){H(a.fileName+".xml","data:application/xml;charset=utf-8;base64,",f)}}else if("excel"==a.type||"xls"==a.type||"word"==a.type||"doc"==a.type){f="excel"==a.type||"xls"==a.type?"excel":"word";y="excel"==f?"xls":"doc";n='xmlns:x="urn:schemas-microsoft-com:office:'+f+'"';var E="",V="";c(v).filter(function(){return P(c(this))}).each(function(){var b=c(this);""===V&&(V=a.worksheetName||b.find("caption").text()||"Table",V=V.replace(/[\\\/[\]*:?'"]/g,"").substring(0,31).trim()); - !1===a.exportHiddenCells&&(K=b.find("tr, th, td").filter(":hidden"),R=0";p=b.find("thead").first().find(a.theadSelector);p.each(function(){m="";B(this,"th,td",l,p.length,function(b,d,f){if(null!==b){var e="";m+=""}});0"+m+"");l++});E+="";t=u(b);c(t).each(function(){var b=c(this);m="";B(this,"td,th",l,p.length+t.length,function(e,d,g){if(null!==e){var h=z(e,d,g),k="",f=c(e).data("tableexport-msonumberformat");"undefined"==typeof f&&"function"===typeof a.onMsoNumberFormat&&(f=a.onMsoNumberFormat(e,d,g));"undefined"!=typeof f&&""!==f&&(k="style=\"mso-number-format:'"+ - f+"'");for(var l in a.excelstyles)a.excelstyles.hasOwnProperty(l)&&(f=c(e).css(a.excelstyles[l]),""===f&&(f=b.css(a.excelstyles[l])),""!==f&&"0px none rgb(0, 0, 0)"!=f&&"rgba(0, 0, 0, 0)"!=f&&(k+=""===k?'style="':";",k+=a.excelstyles[l]+":"+f));m+=""));m+=">"+h+""}});0"+ - m+"");l++});a.displayTableName&&(E+=""+z(c("

    "+a.tableName+"

    "))+"");E+="";!0===a.consoleLog&&console.log(E)});n=''+('')+"";"excel"===f&&(n+="\x3c!--[if gte mso 9]>",n+="",n+="",n+="",n+="", - n+="",n+=V,n+="",n+="",n+="",a.excelRTL&&(n+=""),n+="",n+="",n+="",n+="",n+="",n+="br {mso-data-placement:same-cell;}";n+="";n+="";n+=E;n+="";n+="";!0===a.consoleLog&&console.log(n);if("string"===a.outputMode)return n;if("base64"===a.outputMode)return L(n);try{A=new Blob([n], - {type:"application/vnd.ms-"+a.type}),saveAs(A,a.fileName+"."+y)}catch(b){H(a.fileName+"."+y,"data:application/vnd.ms-"+f+";base64,",n)}}else if("xlsx"==a.type){var ua=[],ka=[];l=0;t=c(v).find("thead").first().find(a.theadSelector);t.push.apply(t,u(c(v)));c(t).each(function(){var b=[];B(this,"th,td",l,t.length,function(c,d,f){if("undefined"!==typeof c&&null!==c){f=z(c,d,f);d=parseInt(c.getAttribute("colspan"));c=parseInt(c.getAttribute("rowspan"));ka.forEach(function(a){if(l>=a.s.r&&l<=a.e.r&&b.length>= - a.s.c&&b.length<=a.e.c)for(var c=0;c<=a.e.c-a.s.c;++c)b.push(null)});if(c||d)d=d||1,ka.push({s:{r:l,c:b.length},e:{r:l+(c||1)-1,c:b.length+d-1}});"function"!==typeof a.onCellData&&""!==f&&f==+f&&(f=+f);b.push(""!==f?f:null);if(d)for(c=0;cxa){a>W.a0[0]&&(da="a0",X="l");for(var d in W)W.hasOwnProperty(d)&&W[d][1]>a&&(da=d,X="l",W[d][0]>a&&(X="p"));xa=a}}});a.jspdf.format=""===da?"a4":da;a.jspdf.orientation=""===X?"w":X}if(null==d.doc&&(d.doc=new jsPDF(a.jspdf.orientation,a.jspdf.unit,a.jspdf.format), - "function"===typeof a.jspdf.onDocCreated))a.jspdf.onDocCreated(d.doc);!0===d.outputImages&&(d.images={});"undefined"!=typeof d.images&&(c(v).filter(function(){return P(c(this))}).each(function(){var b=0;G=[];!1===a.exportHiddenCells&&(K=c(this).find("tr, th, td").filter(":hidden"),R=0a.styles.rowHeight&&(a.styles.rowHeight=f)}"undefined"!=typeof g.style&&!0!==g.style.hidden&&(a.styles.halign=g.style.align,"inherit"===e.styles.fillColor&&(a.styles.fillColor=g.style.bcolor), - "inherit"===e.styles.textColor&&(a.styles.textColor=g.style.color),"inherit"===e.styles.fontStyle&&(a.styles.fontStyle=g.style.fstyle))}});"function"!==typeof e.createdCell&&(e.createdCell=function(a,b){b=d.rowoptions[b.row.index+":"+b.column.dataKey];"undefined"!=typeof b&&"undefined"!=typeof b.style&&!0!==b.style.hidden&&(a.styles.halign=b.style.align,"inherit"===e.styles.fillColor&&(a.styles.fillColor=b.style.bcolor),"inherit"===e.styles.textColor&&(a.styles.textColor=b.style.color),"inherit"=== - e.styles.fontStyle&&(a.styles.fontStyle=b.style.fstyle))});"function"!==typeof e.drawHeaderCell&&(e.drawHeaderCell=function(a,b){var c=d.columns[b.column.dataKey];return(!0!==c.style.hasOwnProperty("hidden")||!0!==c.style.hidden)&&0<=c.rowIndex?ma(a,b,c):!1});"function"!==typeof e.drawCell&&(e.drawCell=function(a,b){var c=d.rowoptions[b.row.index+":"+b.column.dataKey];if(ma(a,b,c))if(d.doc.rect(a.x,a.y,a.width,a.height,a.styles.fillStyle),"undefined"!=typeof c&&"undefined"!=typeof c.kids&&0d.dh||"undefined"==typeof d.dh)d.dh=b;d.dw=a.width/c.rect.width;b=a.textPos.y;pa(a,c.kids,d);a.textPos.y=b;qa(a,c.kids,d)}else qa(a,{},d);return!1});d.headerrows=[];p=c(this).find("thead").find(a.theadSelector);p.each(function(){b=0;d.headerrows[l]=[];B(this,"th,td",l,p.length,function(a,c,e){var f=ra(a);f.title=z(a,c,e);f.key=b++;f.rowIndex=l;d.headerrows[l].push(f)});l++});if(0") - .attr("value", value) - .text($('
    ').html(text).text())); - - // Sort it. Not overly efficient to do this here - var $opts = selectControl.find('option:gt(0)'); - $opts.sort(function (a, b) { - a = $(a).text().toLowerCase(); - b = $(b).text().toLowerCase(); - if ($.isNumeric(a) && $.isNumeric(b)) { - // Convert numerical values from string to float. - a = parseFloat(a); - b = parseFloat(b); - } - return a > b ? 1 : a < b ? -1 : 0; - }); - - selectControl.find('option:gt(0)').remove(); - selectControl.append($opts); - } - }; - - var existsOptionInSelectControl = function (selectControl, value) { - var options = selectControl.get(selectControl.length - 1).options; - for (var i = 0; i < options.length; i++) { - if (options[i].value === value.toString()) { - //The value is nor valid to add - return false; - } - } - - //If we get here, the value is valid to add - return true; - }; - - var fixHeaderCSS = function (that) { - that.$tableHeader.css('height', '77px'); - }; - - var getCurrentHeader = function (that) { - var header = that.$header; - if (that.options.height) { - header = that.$tableHeader; - } - - return header; - }; - - var getCurrentSearchControls = function (that) { - var searchControls = 'select, input'; - if (that.options.height) { - searchControls = 'table select, table input'; - } - - return searchControls; - }; - - var copyValues = function (that) { - var header = getCurrentHeader(that), - searchControls = getCurrentSearchControls(that); - - that.options.values = []; - - header.find(searchControls).each(function () { - that.options.values.push( - { - field: $(this).parent().parent().parent().data('field'), - value: $(this).val() - }); - }); - }; - - var setValues = function(that) { - var field = null, - result = [], - header = getCurrentHeader(that), - searchControls = getCurrentSearchControls(that); - - if (that.options.values.length > 0) { - header.find(searchControls).each(function (index, ele) { - field = $(this).parent().parent().parent().data('field'); - result = $.grep(that.options.values, function (valueObj) { - return valueObj.field === field; - }); - - if (result.length > 0) { - $(this).val(result[0].value); - } - }); - } - }; - - var createControls = function (that, header) { - var addedFilterControl = false, - isVisible, - html, - timeoutId = 0; - - $.each(that.columns, function (i, column) { - isVisible = 'hidden'; - html = []; - - if (!column.visible) { - return; - } - - if (!column.filterControl) { - html.push('
    '); - } else { - html.push('
    '); - - if (column.filterControl && column.searchable) { - addedFilterControl = true; - isVisible = 'visible' - } - switch (column.filterControl.toLowerCase()) { - case 'input' : - html.push(sprintf('', isVisible)); - break; - case 'select': - html.push(sprintf('', - column.field, isVisible)) - break; - case 'datepicker': - html.push(sprintf('', - column.field, isVisible)); - break; - } - } - - $.each(header.children().children(), function (i, tr) { - tr = $(tr); - if (tr.data('field') === column.field) { - tr.find('.fht-cell').append(html.join('')); - return false; - } - }); - if (column.filterData !== undefined && column.filterData.toLowerCase() !== 'column') { - var filterDataType = column.filterData.substring(0, 3); - var filterDataSource = column.filterData.substring(4, column.filterData.length); - var selectControl = $('.' + column.field); - addOptionToSelectControl(selectControl, '', ''); - - switch (filterDataType) { - case 'url': - $.ajax({ - url: filterDataSource, - dataType: 'json', - success: function (data) { - $.each(data, function (key, value) { - addOptionToSelectControl(selectControl, key, value); - }); - } - }); - break; - case 'var': - var variableValues = window[filterDataSource]; - for (var key in variableValues) { - addOptionToSelectControl(selectControl, key, variableValues[key]); - } - break; - } - } - }); - - if (addedFilterControl) { - header.off('keyup', 'input').on('keyup', 'input', function (event) { - clearTimeout(timeoutId); - timeoutId = setTimeout(function () { - that.onColumnSearch(event); - }, that.options.searchTimeOut); - }); - - header.off('change', 'select').on('change', 'select', function (event) { - clearTimeout(timeoutId); - timeoutId = setTimeout(function () { - that.onColumnSearch(event); - }, that.options.searchTimeOut); - }); - - header.off('mouseup', 'input').on('mouseup', 'input', function (event) { - var $input = $(this), - oldValue = $input.val(); - - if (oldValue === "") { - return; - } - - setTimeout(function(){ - var newValue = $input.val(); - - if (newValue === "") { - clearTimeout(timeoutId); - timeoutId = setTimeout(function () { - that.onColumnSearch(event); - }, that.options.searchTimeOut); - } - }, 1); - }); - - if (header.find('.date-filter-control').length > 0) { - $.each(that.columns, function (i, column) { - if (column.filterControl !== undefined && column.filterControl.toLowerCase() === 'datepicker') { - header.find('.date-filter-control.' + column.field).datepicker(column.filterDatepickerOptions) - .on('changeDate', function (e) { - //Fired the keyup event - $(e.currentTarget).keyup(); - }); - } - }); - } - } else { - header.find('.filterControl').hide(); - } - }; - - $.extend($.fn.bootstrapTable.defaults, { - filterControl: false, - onColumnSearch: function (field, text) { - return false; - }, - filterShowClear: false, - //internal variables - values: [] - }); - - $.extend($.fn.bootstrapTable.COLUMN_DEFAULTS, { - filterControl: undefined, - filterData: undefined, - filterDatepickerOptions: undefined, - filterStrictSearch: false - }); - - $.extend($.fn.bootstrapTable.Constructor.EVENTS, { - 'column-search.bs.table': 'onColumnSearch' - }); - - var BootstrapTable = $.fn.bootstrapTable.Constructor, - _init = BootstrapTable.prototype.init, - _initToolbar = BootstrapTable.prototype.initToolbar, - _initHeader = BootstrapTable.prototype.initHeader, - _initBody = BootstrapTable.prototype.initBody, - _initSearch = BootstrapTable.prototype.initSearch; - - BootstrapTable.prototype.init = function () { - //Make sure that the filtercontrol option is set - if (this.options.filterControl) { - var that = this; - //Make sure that the internal variables are set correctly - this.options.values = []; - - this.$el.on('reset-view.bs.table', function () { - //Create controls on $tableHeader if the height is set - if (!that.options.height) { - return; - } - - //Avoid recreate the controls - if (that.$tableHeader.find('select').length > 0 || that.$tableHeader.find('input').length > 0) { - return; - } - - createControls(that, that.$tableHeader); - }).on('post-header.bs.table', function () { - setValues(that); - }).on('post-body.bs.table', function () { - if (that.options.height) { - fixHeaderCSS(that); - } - }).on('column-switch.bs.table', function(field, checked) { - setValues(that); - }); - } - _init.apply(this, Array.prototype.slice.apply(arguments)); - }; - - BootstrapTable.prototype.initToolbar = function () { - if ((!this.showToolbar) && (this.options.filterControl)) { - this.showToolbar = this.options.filterControl; - } - - _initToolbar.apply(this, Array.prototype.slice.apply(arguments)); - - if (this.options.filterControl && this.options.filterShowClear) { - var $btnGroup = this.$toolbar.find('>.btn-group'), - $btnClear = $btnGroup.find('div.export'); - - if (!$btnClear.length) { - $btnClear = $([ - '', - ''].join('')).appendTo($btnGroup); - - $btnClear.off('click').on('click', $.proxy(this.clearFilterControl, this)); - } - } - }; - - BootstrapTable.prototype.initHeader = function () { - _initHeader.apply(this, Array.prototype.slice.apply(arguments)); - - if (!this.options.filterControl) { - return; - } - createControls(this, this.$header); - }; - - BootstrapTable.prototype.initBody = function () { - _initBody.apply(this, Array.prototype.slice.apply(arguments)); - - var that = this, - data = this.options.data, - pageTo = this.pageTo < this.options.data.length ? this.options.data.length : this.pageTo; - - for (var i = this.pageFrom - 1; i < pageTo; i++) { - var item = data[i]; - - $.each(this.header.fields, function (j, field) { - var value = item[field], - column = that.columns[$.fn.bootstrapTable.utils.getFieldIndex(that.columns, field)]; - - value = $.fn.bootstrapTable.utils.calculateObjectValue(that.header, that.header.formatters[j], [value, item, i], value); - - if ((!column.checkbox) || (!column.radio)) { - if (column.filterControl !== undefined && column.filterControl.toLowerCase() === 'select' && column.searchable) { - if (column.filterData === undefined || column.filterData.toLowerCase() === 'column') { - var selectControl = $('.' + column.field); - if (selectControl !== undefined && selectControl.length > 0) { - if (selectControl.get(selectControl.length - 1).options.length === 0) { - //Added the default option - addOptionToSelectControl(selectControl, '', ''); - } - - //Added a new value - addOptionToSelectControl(selectControl, value, value); - } - } - } - } - }); - } - }; - - BootstrapTable.prototype.initSearch = function () { - _initSearch.apply(this, Array.prototype.slice.apply(arguments)); - - var that = this; - var fp = $.isEmptyObject(this.filterColumnsPartial) ? null : this.filterColumnsPartial; - - //Check partial column filter - this.data = fp ? $.grep(this.data, function (item, i) { - for (var key in fp) { - var thisColumn = that.columns[$.fn.bootstrapTable.utils.getFieldIndex(that.columns, key)]; - var fval = fp[key].toLowerCase(); - var value = item[key]; - value = $.fn.bootstrapTable.utils.calculateObjectValue(that.header, - that.header.formatters[$.inArray(key, that.header.fields)], - [value, item, i], value); - - if(thisColumn.filterStrictSearch){ - if (!($.inArray(key, that.header.fields) !== -1 && - (typeof value === 'string' || typeof value === 'number') && - value.toString().toLowerCase() === fval.toString().toLowerCase())) { - return false; - } - } - else{ - if (!($.inArray(key, that.header.fields) !== -1 && - (typeof value === 'string' || typeof value === 'number') && - (value + '').toLowerCase().indexOf(fval) !== -1)) { - return false; - } - }; - } - return true; - }) : this.data; - }; - - BootstrapTable.prototype.onColumnSearch = function (event) { - copyValues(this); - var text = $.trim($(event.currentTarget).val()); - var $field = $(event.currentTarget).parent().parent().parent().data('field') - - if ($.isEmptyObject(this.filterColumnsPartial)) { - this.filterColumnsPartial = {}; - } - if (text) { - this.filterColumnsPartial[$field] = text; - } else { - delete this.filterColumnsPartial[$field]; - } - - this.options.pageNumber = 1; - this.onSearch(event); - this.updatePagination(); - this.trigger('column-search', $field, text); - }; - - BootstrapTable.prototype.clearFilterControl = function () { - if (this.options.filterControl && this.options.filterShowClear) { - $.each(this.options.values, function (i, item) { - item.value = ''; - }); - - setValues(this); - - var controls = getCurrentHeader(this).find(getCurrentSearchControls(this)), - timeoutId = 0; - - if (controls.length > 0) { - this.filterColumnsPartial = {}; - clearTimeout(timeoutId); - timeoutId = setTimeout(function () { - $(controls[0]).trigger(controls[0].tagName === 'INPUT' ? 'keyup' : 'change'); - }, this.options.searchTimeOut); - } - } - }; -}(jQuery); diff --git a/resources/assets/js/extensions/filter-control/bootstrap-table-filter-control.min.js b/resources/assets/js/extensions/filter-control/bootstrap-table-filter-control.min.js deleted file mode 100755 index 1de25e7d54..0000000000 --- a/resources/assets/js/extensions/filter-control/bootstrap-table-filter-control.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/* -* bootstrap-table - v1.9.1 - 2015-10-25 -* https://github.com/wenzhixin/bootstrap-table -* Copyright (c) 2015 zhixin wen -* Licensed MIT License -*/ -!function(a){"use strict";var b=a.fn.bootstrapTable.utils.sprintf,c=function(b,c,e){if(b=a(b.get(b.length-1)),d(b,c)){b.append(a("").attr("value",c).text(a("
    ").html(e).text()));var f=b.find("option:gt(0)");f.sort(function(b,c){return b=a(b).text().toLowerCase(),c=a(c).text().toLowerCase(),a.isNumeric(b)&&a.isNumeric(c)&&(b=parseFloat(b),c=parseFloat(c)),b>c?1:c>b?-1:0}),b.find("option:gt(0)").remove(),b.append(f)}},d=function(a,b){for(var c=a.get(a.length-1).options,d=0;d0&&e.find(h).each(function(){c=a(this).parent().parent().parent().data("field"),d=a.grep(b.options.values,function(a){return a.field===c}),d.length>0&&a(this).val(d[0].value)})},j=function(d,e){var f,g,h=!1,i=0;a.each(d.columns,function(d,i){if(f="hidden",g=[],i.visible){if(i.filterControl)switch(g.push('
    '),i.filterControl&&i.searchable&&(h=!0,f="visible"),i.filterControl.toLowerCase()){case"input":g.push(b('',f));break;case"select":g.push(b('',i.field,f));break;case"datepicker":g.push(b('',i.field,f))}else g.push('
    ');if(a.each(e.children().children(),function(b,c){return c=a(c),c.data("field")===i.field?(c.find(".fht-cell").append(g.join("")),!1):void 0}),void 0!==i.filterData&&"column"!==i.filterData.toLowerCase()){var j=i.filterData.substring(0,3),k=i.filterData.substring(4,i.filterData.length),l=a("."+i.field);switch(c(l,"",""),j){case"url":a.ajax({url:k,dataType:"json",success:function(b){a.each(b,function(a,b){c(l,a,b)})}});break;case"var":var m=window[k];for(var n in m)c(l,n,m[n])}}}}),h?(e.off("keyup","input").on("keyup","input",function(a){clearTimeout(i),i=setTimeout(function(){d.onColumnSearch(a)},d.options.searchTimeOut)}),e.off("change","select").on("change","select",function(a){clearTimeout(i),i=setTimeout(function(){d.onColumnSearch(a)},d.options.searchTimeOut)}),e.off("mouseup","input").on("mouseup","input",function(b){var c=a(this),e=c.val();""!==e&&setTimeout(function(){var a=c.val();""===a&&(clearTimeout(i),i=setTimeout(function(){d.onColumnSearch(b)},d.options.searchTimeOut))},1)}),e.find(".date-filter-control").length>0&&a.each(d.columns,function(b,c){void 0!==c.filterControl&&"datepicker"===c.filterControl.toLowerCase()&&e.find(".date-filter-control."+c.field).datepicker(c.filterDatepickerOptions).on("changeDate",function(b){a(b.currentTarget).keyup()})})):e.find(".filterControl").hide()};a.extend(a.fn.bootstrapTable.defaults,{filterControl:!1,onColumnSearch:function(){return!1},filterShowClear:!1,values:[]}),a.extend(a.fn.bootstrapTable.COLUMN_DEFAULTS,{filterControl:void 0,filterData:void 0,filterDatepickerOptions:void 0,filterStrictSearch:!1}),a.extend(a.fn.bootstrapTable.Constructor.EVENTS,{"column-search.bs.table":"onColumnSearch"});var k=a.fn.bootstrapTable.Constructor,l=k.prototype.init,m=k.prototype.initToolbar,n=k.prototype.initHeader,o=k.prototype.initBody,p=k.prototype.initSearch;k.prototype.init=function(){if(this.options.filterControl){var a=this;this.options.values=[],this.$el.on("reset-view.bs.table",function(){a.options.height&&(a.$tableHeader.find("select").length>0||a.$tableHeader.find("input").length>0||j(a,a.$tableHeader))}).on("post-header.bs.table",function(){i(a)}).on("post-body.bs.table",function(){a.options.height&&e(a)}).on("column-switch.bs.table",function(){i(a)})}l.apply(this,Array.prototype.slice.apply(arguments))},k.prototype.initToolbar=function(){if(!this.showToolbar&&this.options.filterControl&&(this.showToolbar=this.options.filterControl),m.apply(this,Array.prototype.slice.apply(arguments)),this.options.filterControl&&this.options.filterShowClear){var b=this.$toolbar.find(">.btn-group"),c=b.find("div.export");c.length||(c=a(['",""].join("")).appendTo(b),c.off("click").on("click",a.proxy(this.clearFilterControl,this)))}},k.prototype.initHeader=function(){n.apply(this,Array.prototype.slice.apply(arguments)),this.options.filterControl&&j(this,this.$header)},k.prototype.initBody=function(){o.apply(this,Array.prototype.slice.apply(arguments));for(var b=this,d=this.options.data,e=this.pageTof;f++){var g=d[f];a.each(this.header.fields,function(d,e){var h=g[e],i=b.columns[a.fn.bootstrapTable.utils.getFieldIndex(b.columns,e)];if(h=a.fn.bootstrapTable.utils.calculateObjectValue(b.header,b.header.formatters[d],[h,g,f],h),!(i.checkbox&&i.radio||void 0===i.filterControl||"select"!==i.filterControl.toLowerCase()||!i.searchable||void 0!==i.filterData&&"column"!==i.filterData.toLowerCase())){var j=a("."+i.field);void 0!==j&&j.length>0&&(0===j.get(j.length-1).options.length&&c(j,"",""),c(j,h,h))}})}},k.prototype.initSearch=function(){p.apply(this,Array.prototype.slice.apply(arguments));var b=this,c=a.isEmptyObject(this.filterColumnsPartial)?null:this.filterColumnsPartial;this.data=c?a.grep(this.data,function(d,e){for(var f in c){var g=b.columns[a.fn.bootstrapTable.utils.getFieldIndex(b.columns,f)],h=c[f].toLowerCase(),i=d[f];if(i=a.fn.bootstrapTable.utils.calculateObjectValue(b.header,b.header.formatters[a.inArray(f,b.header.fields)],[i,d,e],i),g.filterStrictSearch){if(-1===a.inArray(f,b.header.fields)||"string"!=typeof i&&"number"!=typeof i||i.toString().toLowerCase()!==h.toString().toLowerCase())return!1}else if(-1===a.inArray(f,b.header.fields)||"string"!=typeof i&&"number"!=typeof i||-1===(i+"").toLowerCase().indexOf(h))return!1}return!0}):this.data},k.prototype.onColumnSearch=function(b){h(this);var c=a.trim(a(b.currentTarget).val()),d=a(b.currentTarget).parent().parent().parent().data("field");a.isEmptyObject(this.filterColumnsPartial)&&(this.filterColumnsPartial={}),c?this.filterColumnsPartial[d]=c:delete this.filterColumnsPartial[d],this.options.pageNumber=1,this.onSearch(b),this.updatePagination(),this.trigger("column-search",d,c)},k.prototype.clearFilterControl=function(){if(this.options.filterControl&&this.options.filterShowClear){a.each(this.options.values,function(a,b){b.value=""}),i(this);var b=f(this).find(g(this)),c=0;b.length>0&&(this.filterColumnsPartial={},clearTimeout(c),c=setTimeout(function(){a(b[0]).trigger("INPUT"===b[0].tagName?"keyup":"change")},this.options.searchTimeOut))}}}(jQuery); \ No newline at end of file diff --git a/resources/assets/js/extensions/filter/bootstrap-table-filter.js b/resources/assets/js/extensions/filter/bootstrap-table-filter.js deleted file mode 100755 index 14af13da06..0000000000 --- a/resources/assets/js/extensions/filter/bootstrap-table-filter.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * @author zhixin wen - * extensions: https://github.com/lukaskral/bootstrap-table-filter - */ - -!function($) { - - 'use strict'; - - $.extend($.fn.bootstrapTable.defaults, { - showFilter: false - }); - - var BootstrapTable = $.fn.bootstrapTable.Constructor, - _init = BootstrapTable.prototype.init, - _initSearch = BootstrapTable.prototype.initSearch; - - BootstrapTable.prototype.init = function () { - _init.apply(this, Array.prototype.slice.apply(arguments)); - - var that = this; - this.$el.on('load-success.bs.table', function () { - if (that.options.showFilter) { - $(that.options.toolbar).bootstrapTableFilter({ - connectTo: that.$el - }); - } - }); - }; - - BootstrapTable.prototype.initSearch = function () { - _initSearch.apply(this, Array.prototype.slice.apply(arguments)); - - if (this.options.sidePagination !== 'server') { - if (typeof this.searchCallback === 'function') { - this.data = $.grep(this.options.data, this.searchCallback); - } - } - }; - - BootstrapTable.prototype.getData = function () { - return (this.searchText || this.searchCallback) ? this.data : this.options.data; - }; - - BootstrapTable.prototype.getColumns = function () { - return this.columns; - }; - - BootstrapTable.prototype.registerSearchCallback = function (callback) { - this.searchCallback = callback; - }; - - BootstrapTable.prototype.updateSearch = function () { - this.options.pageNumber = 1; - this.initSearch(); - this.updatePagination(); - }; - - BootstrapTable.prototype.getServerUrl = function () { - return (this.options.sidePagination === 'server') ? this.options.url : false; - }; - - $.fn.bootstrapTable.methods.push('getColumns', - 'registerSearchCallback', 'updateSearch', - 'getServerUrl'); - -}(jQuery); \ No newline at end of file diff --git a/resources/assets/js/extensions/filter/bootstrap-table-filter.min.js b/resources/assets/js/extensions/filter/bootstrap-table-filter.min.js deleted file mode 100755 index 9d0e05704d..0000000000 --- a/resources/assets/js/extensions/filter/bootstrap-table-filter.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/* -* bootstrap-table - v1.9.1 - 2015-10-25 -* https://github.com/wenzhixin/bootstrap-table -* Copyright (c) 2015 zhixin wen -* Licensed MIT License -*/ -!function(a){"use strict";a.extend(a.fn.bootstrapTable.defaults,{showFilter:!1});var b=a.fn.bootstrapTable.Constructor,c=b.prototype.init,d=b.prototype.initSearch;b.prototype.init=function(){c.apply(this,Array.prototype.slice.apply(arguments));var b=this;this.$el.on("load-success.bs.table",function(){b.options.showFilter&&a(b.options.toolbar).bootstrapTableFilter({connectTo:b.$el})})},b.prototype.initSearch=function(){d.apply(this,Array.prototype.slice.apply(arguments)),"server"!==this.options.sidePagination&&"function"==typeof this.searchCallback&&(this.data=a.grep(this.options.data,this.searchCallback))},b.prototype.getData=function(){return this.searchText||this.searchCallback?this.data:this.options.data},b.prototype.getColumns=function(){return this.columns},b.prototype.registerSearchCallback=function(a){this.searchCallback=a},b.prototype.updateSearch=function(){this.options.pageNumber=1,this.initSearch(),this.updatePagination()},b.prototype.getServerUrl=function(){return"server"===this.options.sidePagination?this.options.url:!1},a.fn.bootstrapTable.methods.push("getColumns","registerSearchCallback","updateSearch","getServerUrl")}(jQuery); \ No newline at end of file diff --git a/resources/assets/js/extensions/flat-json/bootstrap-table-flat-json.js b/resources/assets/js/extensions/flat-json/bootstrap-table-flat-json.js deleted file mode 100755 index 4bbf3a2a9e..0000000000 --- a/resources/assets/js/extensions/flat-json/bootstrap-table-flat-json.js +++ /dev/null @@ -1,62 +0,0 @@ -/** - * @author: Dennis Hernández - * @webSite: http://djhvscf.github.io/Blog - * @version: v1.3.0 - */ - -(function ($) { - 'use strict'; - - var flat = function (element, that) { - var result = {}; - - function recurse(cur, prop) { - if (Object(cur) !== cur) { - result[prop] = cur; - } else if ($.isArray(cur)) { - for (var i = 0, l = cur.length; i < l; i++) { - recurse(cur[i], prop ? prop + that.options.flatSeparator + i : "" + i); - if (l == 0) { - result[prop] = []; - } - } - } else { - var isEmpty = true; - for (var p in cur) { - isEmpty = false; - recurse(cur[p], prop ? prop + that.options.flatSeparator + p : p); - } - if (isEmpty) { - result[prop] = {}; - } - } - } - - recurse(element, ""); - return result; - }; - - var flatHelper = function (data, that) { - var flatArray = []; - - $.each(!$.isArray(data) ? [data] : data, function (i, element) { - flatArray.push(flat(element, that)); - }); - return flatArray; - }; - - $.extend($.fn.bootstrapTable.defaults, { - flat: false, - flatSeparator: '.' - }); - - var BootstrapTable = $.fn.bootstrapTable.Constructor, - _initData = BootstrapTable.prototype.initData; - - BootstrapTable.prototype.initData = function (data, type) { - if (this.options.flat) { - data = flatHelper(data ? data : this.options.data, this); - } - _initData.apply(this, [data, type]); - }; -})(jQuery); diff --git a/resources/assets/js/extensions/flat-json/bootstrap-table-flat-json.min.js b/resources/assets/js/extensions/flat-json/bootstrap-table-flat-json.min.js deleted file mode 100755 index 844f5428dd..0000000000 --- a/resources/assets/js/extensions/flat-json/bootstrap-table-flat-json.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/* -* bootstrap-table - v1.9.1 - 2015-10-25 -* https://github.com/wenzhixin/bootstrap-table -* Copyright (c) 2015 zhixin wen -* Licensed MIT License -*/ -!function(a){"use strict";var b=function(b,c){function d(b,f){if(Object(b)!==b)e[f]=b;else if(a.isArray(b))for(var g=0,h=b.length;h>g;g++)d(b[g],f?f+c.options.flatSeparator+g:""+g),0==h&&(e[f]=[]);else{var i=!0;for(var j in b)i=!1,d(b[j],f?f+c.options.flatSeparator+j:j);i&&(e[f]={})}}var e={};return d(b,""),e},c=function(c,d){var e=[];return a.each(a.isArray(c)?c:[c],function(a,c){e.push(b(c,d))}),e};a.extend(a.fn.bootstrapTable.defaults,{flat:!1,flatSeparator:"."});var d=a.fn.bootstrapTable.Constructor,e=d.prototype.initData;d.prototype.initData=function(a,b){this.options.flat&&(a=c(a?a:this.options.data,this)),e.apply(this,[a,b])}}(jQuery); \ No newline at end of file diff --git a/resources/assets/js/extensions/group-by-v2/bootstrap-table-group-by.css b/resources/assets/js/extensions/group-by-v2/bootstrap-table-group-by.css deleted file mode 100755 index 80b1161b76..0000000000 --- a/resources/assets/js/extensions/group-by-v2/bootstrap-table-group-by.css +++ /dev/null @@ -1,7 +0,0 @@ -.bootstrap-table .table > tbody > tr.groupBy { - cursor: pointer; -} - -.bootstrap-table .table > tbody > tr.groupBy.expanded { - -} \ No newline at end of file diff --git a/resources/assets/js/extensions/group-by-v2/bootstrap-table-group-by.js b/resources/assets/js/extensions/group-by-v2/bootstrap-table-group-by.js deleted file mode 100755 index f9a1092d48..0000000000 --- a/resources/assets/js/extensions/group-by-v2/bootstrap-table-group-by.js +++ /dev/null @@ -1,226 +0,0 @@ -/** - * @author: Yura Knoxville - * @version: v1.0.0 - */ - -!function ($) { - - 'use strict'; - - var initBodyCaller, - tableGroups; - - // it only does '%s', and return '' when arguments are undefined - var sprintf = function (str) { - var args = arguments, - flag = true, - i = 1; - - str = str.replace(/%s/g, function () { - var arg = args[i++]; - - if (typeof arg === 'undefined') { - flag = false; - return ''; - } - return arg; - }); - return flag ? str : ''; - }; - - var groupBy = function (array , f) { - var groups = {}; - array.forEach(function(o) { - var group = f(o); - groups[group] = groups[group] || []; - groups[group].push(o); - }); - - return groups; - }; - - $.extend($.fn.bootstrapTable.defaults, { - groupBy: false, - groupByField: '' - }); - - var BootstrapTable = $.fn.bootstrapTable.Constructor, - _initSort = BootstrapTable.prototype.initSort, - _initBody = BootstrapTable.prototype.initBody, - _updateSelected = BootstrapTable.prototype.updateSelected; - - BootstrapTable.prototype.initSort = function () { - _initSort.apply(this, Array.prototype.slice.apply(arguments)); - - var that = this; - tableGroups = []; - - if ((this.options.groupBy) && (this.options.groupByField !== '')) { - - if ((this.options.sortName != this.options.groupByField)) { - this.data.sort(function(a, b) { - return a[that.options.groupByField].localeCompare(b[that.options.groupByField]); - }); - } - - var that = this; - var groups = groupBy(that.data, function (item) { - return [item[that.options.groupByField]]; - }); - - var index = 0; - $.each(groups, function(key, value) { - tableGroups.push({ - id: index, - name: key - }); - - value.forEach(function(item) { - if (!item._data) { - item._data = {}; - } - - item._data['parent-index'] = index; - }); - - index++; - }); - } - } - - BootstrapTable.prototype.initBody = function () { - initBodyCaller = true; - - _initBody.apply(this, Array.prototype.slice.apply(arguments)); - - if ((this.options.groupBy) && (this.options.groupByField !== '')) { - var that = this, - checkBox = false, - visibleColumns = 0; - - this.columns.forEach(function(column) { - if (column.checkbox) { - checkBox = true; - } else { - if (column.visible) { - visibleColumns += 1; - } - } - }); - - if (this.options.detailView && !this.options.cardView) { - visibleColumns += 1; - } - - tableGroups.forEach(function(item){ - var html = []; - - html.push(sprintf('', item.id)); - - if (that.options.detailView && !that.options.cardView) { - html.push(''); - } - - if (checkBox) { - html.push('', - '', - '' - ); - } - - html.push('', item.name, '' - ); - - html.push(''); - - that.$body.find('tr[data-parent-index='+item.id+']:first').before($(html.join(''))); - }); - - this.$selectGroup = []; - this.$body.find('[name="btSelectGroup"]').each(function() { - var self = $(this); - - that.$selectGroup.push({ - group: self, - item: that.$selectItem.filter(function () { - return ($(this).closest('tr').data('parent-index') === - self.closest('tr').data('group-index')); - }) - }); - }); - - this.$container.off('click', '.groupBy') - .on('click', '.groupBy', function() { - $(this).toggleClass('expanded'); - that.$body.find('tr[data-parent-index='+$(this).closest('tr').data('group-index')+']').toggleClass('hidden'); - }); - - this.$container.off('click', '[name="btSelectGroup"]') - .on('click', '[name="btSelectGroup"]', function (event) { - event.stopImmediatePropagation(); - - var self = $(this); - var checked = self.prop('checked'); - that[checked ? 'checkGroup' : 'uncheckGroup']($(this).closest('tr').data('group-index')); - }); - } - - initBodyCaller = false; - this.updateSelected(); - }; - - BootstrapTable.prototype.updateSelected = function () { - if (!initBodyCaller) { - _updateSelected.apply(this, Array.prototype.slice.apply(arguments)); - - if ((this.options.groupBy) && (this.options.groupByField !== '')) { - this.$selectGroup.forEach(function (item) { - var checkGroup = item.item.filter(':enabled').length === - item.item.filter(':enabled').filter(':checked').length; - - item.group.prop('checked', checkGroup); - }); - } - } - }; - - BootstrapTable.prototype.getGroupSelections = function (index) { - var that = this; - - return $.grep(this.data, function (row) { - return (row[that.header.stateField] && (row._data['parent-index'] === index)); - }); - }; - - BootstrapTable.prototype.checkGroup = function (index) { - this.checkGroup_(index, true); - }; - - BootstrapTable.prototype.uncheckGroup = function (index) { - this.checkGroup_(index, false); - }; - - BootstrapTable.prototype.checkGroup_ = function (index, checked) { - var rows; - var filter = function() { - return ($(this).closest('tr').data('parent-index') === index); - }; - - if (!checked) { - rows = this.getGroupSelections(index); - } - - this.$selectItem.filter(filter).prop('checked', checked); - - - this.updateRows(); - this.updateSelected(); - if (checked) { - rows = this.getGroupSelections(index); - } - this.trigger(checked ? 'check-all' : 'uncheck-all', rows); - }; - -}(jQuery); \ No newline at end of file diff --git a/resources/assets/js/extensions/group-by-v2/bootstrap-table-group-by.min.js b/resources/assets/js/extensions/group-by-v2/bootstrap-table-group-by.min.js deleted file mode 100755 index 51532f2dc3..0000000000 --- a/resources/assets/js/extensions/group-by-v2/bootstrap-table-group-by.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/* -* bootstrap-table - v1.10.1 - 2016-02-17 -* https://github.com/wenzhixin/bootstrap-table -* Copyright (c) 2016 zhixin wen -* Licensed MIT License -*/ -!function(a){"use strict";var b,c,d=function(a){var b=arguments,c=!0,d=1;return a=a.replace(/%s/g,function(){var a=b[d++];return"undefined"==typeof a?(c=!1,""):a}),c?a:""},e=function(a,b){var c={};return a.forEach(function(a){var d=b(a);c[d]=c[d]||[],c[d].push(a)}),c};a.extend(a.fn.bootstrapTable.defaults,{groupBy:!1,groupByField:""});var f=a.fn.bootstrapTable.Constructor,g=f.prototype.initSort,h=f.prototype.initBody,i=f.prototype.updateSelected;f.prototype.initSort=function(){g.apply(this,Array.prototype.slice.apply(arguments));var b=this;if(c=[],this.options.groupBy&&""!==this.options.groupByField){this.options.sortName!=this.options.groupByField&&this.data.sort(function(a,c){return a[b.options.groupByField].localeCompare(c[b.options.groupByField])});var b=this,d=e(b.data,function(a){return[a[b.options.groupByField]]}),f=0;a.each(d,function(a,b){c.push({id:f,name:a}),b.forEach(function(a){a._data||(a._data={}),a._data["parent-index"]=f}),f++})}},f.prototype.initBody=function(){if(b=!0,h.apply(this,Array.prototype.slice.apply(arguments)),this.options.groupBy&&""!==this.options.groupByField){var e=this,f=!1,g=0;this.columns.forEach(function(a){a.checkbox?f=!0:a.visible&&(g+=1)}),this.options.detailView&&!this.options.cardView&&(g+=1),c.forEach(function(b){var c=[];c.push(d('',b.id)),e.options.detailView&&!e.options.cardView&&c.push(''),f&&c.push('','',""),c.push("",b.name,""),c.push(""),e.$body.find("tr[data-parent-index="+b.id+"]:first").before(a(c.join("")))}),this.$selectGroup=[],this.$body.find('[name="btSelectGroup"]').each(function(){var b=a(this);e.$selectGroup.push({group:b,item:e.$selectItem.filter(function(){return a(this).closest("tr").data("parent-index")===b.closest("tr").data("group-index")})})}),this.$container.off("click",".groupBy").on("click",".groupBy",function(){a(this).toggleClass("expanded"),e.$body.find("tr[data-parent-index="+a(this).closest("tr").data("group-index")+"]").toggleClass("hidden")}),this.$container.off("click",'[name="btSelectGroup"]').on("click",'[name="btSelectGroup"]',function(b){b.stopImmediatePropagation();var c=a(this),d=c.prop("checked");e[d?"checkGroup":"uncheckGroup"](a(this).closest("tr").data("group-index"))})}b=!1,this.updateSelected()},f.prototype.updateSelected=function(){b||(i.apply(this,Array.prototype.slice.apply(arguments)),this.options.groupBy&&""!==this.options.groupByField&&this.$selectGroup.forEach(function(a){var b=a.item.filter(":enabled").length===a.item.filter(":enabled").filter(":checked").length;a.group.prop("checked",b)}))},f.prototype.getGroupSelections=function(b){var c=this;return a.grep(this.data,function(a){return a[c.header.stateField]&&a._data["parent-index"]===b})},f.prototype.checkGroup=function(a){this.checkGroup_(a,!0)},f.prototype.uncheckGroup=function(a){this.checkGroup_(a,!1)},f.prototype.checkGroup_=function(b,c){var d,e=function(){return a(this).closest("tr").data("parent-index")===b};c||(d=this.getGroupSelections(b)),this.$selectItem.filter(e).prop("checked",c),this.updateRows(),this.updateSelected(),c&&(d=this.getGroupSelections(b)),this.trigger(c?"check-all":"uncheck-all",d)}}(jQuery); \ No newline at end of file diff --git a/resources/assets/js/extensions/group-by/bootstrap-table-group-by.css b/resources/assets/js/extensions/group-by/bootstrap-table-group-by.css deleted file mode 100755 index fce5a9a7b1..0000000000 --- a/resources/assets/js/extensions/group-by/bootstrap-table-group-by.css +++ /dev/null @@ -1,53 +0,0 @@ -table.treetable tbody tr td { - cursor: default; -} - -table.treetable span { - background-position: center left; - background-repeat: no-repeat; - padding: .2em 0 .2em 1.5em; -} - -table.treetable tr.collapsed span.indenter a { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAHlJREFUeNrcU1sNgDAQ6wgmcAM2MICGGlg1gJnNzWQcvwQGy1j4oUl/7tH0mpwzM7SgQyO+EZAUWh2MkkzSWhJwuRAlHYsJwEwyvs1gABDuzqoJcTw5qxaIJN0bgQRgIjnlmn1heSO5PE6Y2YXe+5Cr5+h++gs12AcAS6FS+7YOsj4AAAAASUVORK5CYII=); - padding-right: 12px; -} - -table.treetable tr.expanded span.indenter a { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAHFJREFUeNpi/P//PwMlgImBQsA44C6gvhfa29v3MzAwOODRc6CystIRbxi0t7fjDJjKykpGYrwwi1hxnLHQ3t7+jIGBQRJJ6HllZaUUKYEYRYBPOB0gBShKwKGA////48VtbW3/8clTnBIH3gCKkzJgAGvBX0dDm0sCAAAAAElFTkSuQmCC); - padding-right: 12px; -} - -table.treetable tr.branch { - background-color: #f9f9f9; -} - -table.treetable tr.selected { - background-color: #3875d7; - color: #fff; -} - -table.treetable tr span.indenter a { - outline: none; /* Expander shows outline after upgrading to 3.0 (#141) */ -} - -table.treetable tr.collapsed.selected span.indenter a { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAFpJREFUeNpi/P//PwMlgHHADWD4//8/NtyAQxwD45KAAQdKDfj//////fgMIsYAZIMw1DKREFwODAwM/4kNRKq64AADA4MjFDOQ6gKyY4HodMA49PMCxQYABgAVYHsjyZ1x7QAAAABJRU5ErkJggg==); -} - -table.treetable tr.expanded.selected span.indenter a { - background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAFtJREFUeNpi/P//PwMlgImBQsA44C6giQENDAwM//HgBmLCAF/AMBLjBUeixf///48L7/+PCvZjU4fPAAc0AxywqcMXCwegGJ1NckL6jx5wpKYDxqGXEkkCgAEAmrqBIejdgngAAAAASUVORK5CYII=); -} - -table.treetable tr.accept { - background-color: #a3bce4; - color: #fff -} - -table.treetable tr.collapsed.accept td span.indenter a { - background-image: url(data:image/x-png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAFpJREFUeNpi/P//PwMlgHHADWD4//8/NtyAQxwD45KAAQdKDfj//////fgMIsYAZIMw1DKREFwODAwM/4kNRKq64AADA4MjFDOQ6gKyY4HodMA49PMCxQYABgAVYHsjyZ1x7QAAAABJRU5ErkJggg==); -} - -table.treetable tr.expanded.accept td span.indenter a { - background-image: url(data:image/x-png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAFtJREFUeNpi/P//PwMlgImBQsA44C6giQENDAwM//HgBmLCAF/AMBLjBUeixf///48L7/+PCvZjU4fPAAc0AxywqcMXCwegGJ1NckL6jx5wpKYDxqGXEkkCgAEAmrqBIejdgngAAAAASUVORK5CYII=); -} \ No newline at end of file diff --git a/resources/assets/js/extensions/group-by/bootstrap-table-group-by.js b/resources/assets/js/extensions/group-by/bootstrap-table-group-by.js deleted file mode 100755 index 6f95e61bdd..0000000000 --- a/resources/assets/js/extensions/group-by/bootstrap-table-group-by.js +++ /dev/null @@ -1,243 +0,0 @@ -/** - * @author: Dennis Hernández - * @webSite: http://djhvscf.github.io/Blog - * @version: v1.1.0 - */ - -!function ($) { - - 'use strict'; - - var originalRowAttr, - dataTTId = 'data-tt-id', - dataTTParentId = 'data-tt-parent-id', - obj = {}, - parentId = undefined; - - var getParentRowId = function (that, id) { - var parentRows = that.$body.find('tr').not('[' + 'data-tt-parent-id]'); - - for (var i = 0; i < parentRows.length; i++) { - if (i === id) { - return $(parentRows[i]).attr('data-tt-id'); - } - } - - return undefined; - }; - - var sumData = function (that, data) { - var sumRow = {}; - $.each(data, function (i, row) { - if (!row.IsParent) { - for (var prop in row) { - if (!isNaN(parseFloat(row[prop]))) { - if (that.columns[$.fn.bootstrapTable.utils.getFieldIndex(that.columns, prop)].groupBySumGroup) { - if (sumRow[prop] === undefined) { - sumRow[prop] = 0; - } - sumRow[prop] += +row[prop]; - } - } - } - } - }); - return sumRow; - }; - - var rowAttr = function (row, index) { - //Call the User Defined Function - originalRowAttr.apply([row, index]); - - obj[dataTTId.toString()] = index; - - if (!row.IsParent) { - obj[dataTTParentId.toString()] = parentId === undefined ? index : parentId; - } else { - parentId = index; - delete obj[dataTTParentId.toString()]; - } - - return obj; - }; - - var setObjectKeys = function () { - // From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys - Object.keys = function (o) { - if (o !== Object(o)) { - throw new TypeError('Object.keys called on a non-object'); - } - var k = [], - p; - for (p in o) { - if (Object.prototype.hasOwnProperty.call(o, p)) { - k.push(p); - } - } - return k; - } - }; - - var getDataArrayFromItem = function (that, item) { - var itemDataArray = []; - for (var i = 0; i < that.options.groupByField.length; i++) { - itemDataArray.push(item[that.options.groupByField[i]]); - } - - return itemDataArray; - }; - - var getNewRow = function (that, result, index) { - var newRow = {}; - for (var i = 0; i < that.options.groupByField.length; i++) { - newRow[that.options.groupByField[i].toString()] = result[index][0][that.options.groupByField[i]]; - } - - newRow.IsParent = true; - - return newRow; - }; - - var groupBy = function (array, f) { - var groups = {}; - $.each(array, function (i, o) { - var group = JSON.stringify(f(o)); - groups[group] = groups[group] || []; - groups[group].push(o); - }); - return Object.keys(groups).map(function (group) { - return groups[group]; - }); - }; - - var makeGrouped = function (that, data) { - var newData = [], - sumRow = {}; - - var result = groupBy(data, function (item) { - return getDataArrayFromItem(that, item); - }); - - for (var i = 0; i < result.length; i++) { - result[i].unshift(getNewRow(that, result, i)); - if (that.options.groupBySumGroup) { - sumRow = sumData(that, result[i]); - if (!$.isEmptyObject(sumRow)) { - result[i].push(sumRow); - } - } - } - - newData = newData.concat.apply(newData, result); - - if (!that.options.loaded && newData.length > 0) { - that.options.loaded = true; - that.options.originalData = that.options.data; - that.options.data = newData; - } - - return newData; - }; - - $.extend($.fn.bootstrapTable.defaults, { - groupBy: false, - groupByField: [], - groupBySumGroup: false, - groupByInitExpanded: undefined, //node, 'all' - //internal variables - loaded: false, - originalData: undefined - }); - - $.fn.bootstrapTable.methods.push('collapseAll', 'expandAll', 'refreshGroupByField'); - - $.extend($.fn.bootstrapTable.COLUMN_DEFAULTS, { - groupBySumGroup: false - }); - - var BootstrapTable = $.fn.bootstrapTable.Constructor, - _init = BootstrapTable.prototype.init, - _initData = BootstrapTable.prototype.initData; - - BootstrapTable.prototype.init = function () { - //Temporal validation - if (!this.options.sortName) { - if ((this.options.groupBy) && (this.options.groupByField.length > 0)) { - var that = this; - - // Compatibility: IE < 9 and old browsers - if (!Object.keys) { - setObjectKeys(); - } - - //Make sure that the internal variables are set correctly - this.options.loaded = false; - this.options.originalData = undefined; - - originalRowAttr = this.options.rowAttributes; - this.options.rowAttributes = rowAttr; - this.$el.on('post-body.bs.table', function () { - that.$el.treetable({ - expandable: true, - onNodeExpand: function () { - if (that.options.height) { - that.resetHeader(); - } - }, - onNodeCollapse: function () { - if (that.options.height) { - that.resetHeader(); - } - } - }, true); - - if (that.options.groupByInitExpanded !== undefined) { - if (typeof that.options.groupByInitExpanded === 'number') { - that.expandNode(that.options.groupByInitExpanded); - } else if (that.options.groupByInitExpanded.toLowerCase() === 'all') { - that.expandAll(); - } - } - }); - } - } - _init.apply(this, Array.prototype.slice.apply(arguments)); - }; - - BootstrapTable.prototype.initData = function (data, type) { - //Temporal validation - if (!this.options.sortName) { - if ((this.options.groupBy) && (this.options.groupByField.length > 0)) { - - this.options.groupByField = typeof this.options.groupByField === 'string' ? - this.options.groupByField.replace('[', '').replace(']', '') - .replace(/ /g, '').toLowerCase().split(',') : this.options.groupByField; - - data = makeGrouped(this, data ? data : this.options.data); - } - } - _initData.apply(this, [data, type]); - }; - - BootstrapTable.prototype.expandAll = function () { - this.$el.treetable('expandAll'); - }; - - BootstrapTable.prototype.collapseAll = function () { - this.$el.treetable('collapseAll'); - }; - - BootstrapTable.prototype.expandNode = function (id) { - id = getParentRowId(this, id); - if (id !== undefined) { - this.$el.treetable('expandNode', id); - } - }; - - BootstrapTable.prototype.refreshGroupByField = function (groupByFields) { - if (!$.fn.bootstrapTable.utils.compareObjects(this.options.groupByField, groupByFields)) { - this.options.groupByField = groupByFields; - this.load(this.options.originalData); - } - }; -}(jQuery); diff --git a/resources/assets/js/extensions/group-by/bootstrap-table-group-by.min.js b/resources/assets/js/extensions/group-by/bootstrap-table-group-by.min.js deleted file mode 100755 index 9d55090040..0000000000 --- a/resources/assets/js/extensions/group-by/bootstrap-table-group-by.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/* -* bootstrap-table - v1.9.1 - 2015-10-25 -* https://github.com/wenzhixin/bootstrap-table -* Copyright (c) 2015 zhixin wen -* Licensed MIT License -*/ -!function(a){"use strict";var b,c="data-tt-id",d="data-tt-parent-id",e={},f=void 0,g=function(b,c){for(var d=b.$body.find("tr").not("[data-tt-parent-id]"),e=0;e0&&(b.options.loaded=!0,b.options.originalData=b.options.data,b.options.data=d),d};a.extend(a.fn.bootstrapTable.defaults,{groupBy:!1,groupByField:[],groupBySumGroup:!1,groupByInitExpanded:void 0,loaded:!1,originalData:void 0}),a.fn.bootstrapTable.methods.push("collapseAll","expandAll","refreshGroupByField"),a.extend(a.fn.bootstrapTable.COLUMN_DEFAULTS,{groupBySumGroup:!1});var o=a.fn.bootstrapTable.Constructor,p=o.prototype.init,q=o.prototype.initData;o.prototype.init=function(){if(!this.options.sortName&&this.options.groupBy&&this.options.groupByField.length>0){var a=this;Object.keys||j(),this.options.loaded=!1,this.options.originalData=void 0,b=this.options.rowAttributes,this.options.rowAttributes=i,this.$el.on("post-body.bs.table",function(){a.$el.treetable({expandable:!0,onNodeExpand:function(){a.options.height&&a.resetHeader()},onNodeCollapse:function(){a.options.height&&a.resetHeader()}},!0),void 0!==a.options.groupByInitExpanded&&("number"==typeof a.options.groupByInitExpanded?a.expandNode(a.options.groupByInitExpanded):"all"===a.options.groupByInitExpanded.toLowerCase()&&a.expandAll())})}p.apply(this,Array.prototype.slice.apply(arguments))},o.prototype.initData=function(a,b){this.options.sortName||this.options.groupBy&&this.options.groupByField.length>0&&(this.options.groupByField="string"==typeof this.options.groupByField?this.options.groupByField.replace("[","").replace("]","").replace(/ /g,"").toLowerCase().split(","):this.options.groupByField,a=n(this,a?a:this.options.data)),q.apply(this,[a,b])},o.prototype.expandAll=function(){this.$el.treetable("expandAll")},o.prototype.collapseAll=function(){this.$el.treetable("collapseAll")},o.prototype.expandNode=function(a){a=g(this,a),void 0!==a&&this.$el.treetable("expandNode",a)},o.prototype.refreshGroupByField=function(b){a.fn.bootstrapTable.utils.compareObjects(this.options.groupByField,b)||(this.options.groupByField=b,this.load(this.options.originalData))}}(jQuery); \ No newline at end of file diff --git a/resources/assets/js/extensions/key-events/bootstrap-table-key-events.js b/resources/assets/js/extensions/key-events/bootstrap-table-key-events.js deleted file mode 100755 index 887f803562..0000000000 --- a/resources/assets/js/extensions/key-events/bootstrap-table-key-events.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * @author: Dennis Hernández - * @webSite: http://djhvscf.github.io/Blog - * @version: v1.0.0 - * - * @update zhixin wen - */ - -!function ($) { - - 'use strict'; - - $.extend($.fn.bootstrapTable.defaults, { - keyEvents: false - }); - - var BootstrapTable = $.fn.bootstrapTable.Constructor, - _init = BootstrapTable.prototype.init; - - BootstrapTable.prototype.init = function () { - _init.apply(this, Array.prototype.slice.apply(arguments)); - this.initKeyEvents(); - }; - - BootstrapTable.prototype.initKeyEvents = function () { - if (this.options.keyEvents) { - var that = this; - - $(document).off('keydown').on('keydown', function (e) { - var $search = that.$toolbar.find('.search input'), - $refresh = that.$toolbar.find('button[name="refresh"]'), - $toggle = that.$toolbar.find('button[name="toggle"]'), - $paginationSwitch = that.$toolbar.find('button[name="paginationSwitch"]'); - - if (document.activeElement === $search.get(0)) { - return true; - } - - switch (e.keyCode) { - case 83: //s - if (!that.options.search) { - return; - } - $search.focus(); - return false; - case 82: //r - if (!that.options.showRefresh) { - return; - } - $refresh.click(); - return false; - case 84: //t - if (!that.options.showToggle) { - return; - } - $toggle.click(); - return false; - case 80: //p - if (!that.options.showPaginationSwitch) { - return; - } - $paginationSwitch.click(); - return false; - case 37: // left - if (!that.options.pagination) { - return; - } - that.prevPage(); - return false; - case 39: // right - if (!that.options.pagination) { - return; - } - that.nextPage(); - return; - } - }); - } - }; -}(jQuery); diff --git a/resources/assets/js/extensions/key-events/bootstrap-table-key-events.min.js b/resources/assets/js/extensions/key-events/bootstrap-table-key-events.min.js deleted file mode 100755 index db1561aa48..0000000000 --- a/resources/assets/js/extensions/key-events/bootstrap-table-key-events.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/* -* bootstrap-table - v1.9.1 - 2015-10-25 -* https://github.com/wenzhixin/bootstrap-table -* Copyright (c) 2015 zhixin wen -* Licensed MIT License -*/ -!function(a){"use strict";a.extend(a.fn.bootstrapTable.defaults,{keyEvents:!1});var b=a.fn.bootstrapTable.Constructor,c=b.prototype.init;b.prototype.init=function(){c.apply(this,Array.prototype.slice.apply(arguments)),this.initKeyEvents()},b.prototype.initKeyEvents=function(){if(this.options.keyEvents){var b=this;a(document).off("keydown").on("keydown",function(a){var c=b.$toolbar.find(".search input"),d=b.$toolbar.find('button[name="refresh"]'),e=b.$toolbar.find('button[name="toggle"]'),f=b.$toolbar.find('button[name="paginationSwitch"]');if(document.activeElement===c.get(0))return!0;switch(a.keyCode){case 83:if(!b.options.search)return;return c.focus(),!1;case 82:if(!b.options.showRefresh)return;return d.click(),!1;case 84:if(!b.options.showToggle)return;return e.click(),!1;case 80:if(!b.options.showPaginationSwitch)return;return f.click(),!1;case 37:if(!b.options.pagination)return;return b.prevPage(),!1;case 39:if(!b.options.pagination)return;return void b.nextPage()}})}}}(jQuery); \ No newline at end of file diff --git a/resources/assets/js/extensions/mobile/bootstrap-table-mobile.js b/resources/assets/js/extensions/mobile/bootstrap-table-mobile.js deleted file mode 100755 index 5fb6704338..0000000000 --- a/resources/assets/js/extensions/mobile/bootstrap-table-mobile.js +++ /dev/null @@ -1,131 +0,0 @@ -/** - * @author: Dennis Hernández - * @webSite: http://djhvscf.github.io/Blog - * @version: v1.1.0 - */ - -!function ($) { - - 'use strict'; - - var showHideColumns = function (that, checked) { - if (that.options.columnsHidden.length > 0 ) { - $.each(that.columns, function (i, column) { - if (that.options.columnsHidden.indexOf(column.field) !== -1) { - if (column.visible !== checked) { - that.toggleColumn($.fn.bootstrapTable.utils.getFieldIndex(that.columns, column.field), checked, true); - } - } - }); - } - }; - - var resetView = function (that) { - if (that.options.height || that.options.showFooter) { - setTimeout(function(){ - that.resetView.call(that); - }, 1); - } - }; - - var changeView = function (that, width, height) { - if (that.options.minHeight) { - if ((width <= that.options.minWidth) && (height <= that.options.minHeight)) { - conditionCardView(that); - } else if ((width > that.options.minWidth) && (height > that.options.minHeight)) { - conditionFullView(that); - } - } else { - if (width <= that.options.minWidth) { - conditionCardView(that); - } else if (width > that.options.minWidth) { - conditionFullView(that); - } - } - - resetView(that); - }; - - var conditionCardView = function (that) { - changeTableView(that, false); - showHideColumns(that, false); - }; - - var conditionFullView = function (that) { - changeTableView(that, true); - showHideColumns(that, true); - }; - - var changeTableView = function (that, cardViewState) { - that.options.cardView = cardViewState; - that.toggleView(); - }; - - var debounce = function(func,wait) { - var timeout; - return function() { - var context = this, - args = arguments; - var later = function() { - timeout = null; - func.apply(context,args); - }; - clearTimeout(timeout); - timeout = setTimeout(later, wait); - }; - }; - - $.extend($.fn.bootstrapTable.defaults, { - mobileResponsive: false, - minWidth: 562, - minHeight: undefined, - heightThreshold: 100, // just slightly larger than mobile chrome's auto-hiding toolbar - checkOnInit: true, - columnsHidden: [] - }); - - var BootstrapTable = $.fn.bootstrapTable.Constructor, - _init = BootstrapTable.prototype.init; - - BootstrapTable.prototype.init = function () { - _init.apply(this, Array.prototype.slice.apply(arguments)); - - if (!this.options.mobileResponsive) { - return; - } - - if (!this.options.minWidth) { - return; - } - - var that = this, - old = { - width: $(window).width(), - height: $(window).height() - }; - - $(window).on('resize orientationchange',debounce(function (evt) { - // reset view if height has only changed by at least the threshold. - var height = $(this).height(), - width = $(this).width(); - - if (Math.abs(old.height - height) > that.options.heightThreshold || old.width != width) { - changeView(that, width, height); - old = { - width: width, - height: height - }; - } - },200)); - - if (this.options.checkOnInit) { - var height = $(window).height(), - width = $(window).width(); - changeView(this, width, height); - old = { - width: width, - height: height - }; - } - }; -}(jQuery); diff --git a/resources/assets/js/extensions/mobile/bootstrap-table-mobile.min.js b/resources/assets/js/extensions/mobile/bootstrap-table-mobile.min.js deleted file mode 100755 index c693a824c3..0000000000 --- a/resources/assets/js/extensions/mobile/bootstrap-table-mobile.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/* -* bootstrap-table - v1.9.1 - 2015-10-25 -* https://github.com/wenzhixin/bootstrap-table -* Copyright (c) 2015 zhixin wen -* Licensed MIT License -*/ -!function(a){"use strict";var b=function(b,c){b.options.columnsHidden.length>0&&a.each(b.columns,function(d,e){-1!==b.options.columnsHidden.indexOf(e.field)&&e.visible!==c&&b.toggleColumn(a.fn.bootstrapTable.utils.getFieldIndex(b.columns,e.field),c,!0)})},c=function(a){(a.options.height||a.options.showFooter)&&setTimeout(function(){a.resetView.call(a)},1)},d=function(a,b,d){a.options.minHeight?b<=a.options.minWidth&&d<=a.options.minHeight?e(a):b>a.options.minWidth&&d>a.options.minHeight&&f(a):b<=a.options.minWidth?e(a):b>a.options.minWidth&&f(a),c(a)},e=function(a){g(a,!1),b(a,!1)},f=function(a){g(a,!0),b(a,!0)},g=function(a,b){a.options.cardView=b,a.toggleView()},h=function(a,b){var c;return function(){var d=this,e=arguments,f=function(){c=null,a.apply(d,e)};clearTimeout(c),c=setTimeout(f,b)}};a.extend(a.fn.bootstrapTable.defaults,{mobileResponsive:!1,minWidth:562,minHeight:void 0,heightThreshold:100,checkOnInit:!0,columnsHidden:[]});var i=a.fn.bootstrapTable.Constructor,j=i.prototype.init;i.prototype.init=function(){if(j.apply(this,Array.prototype.slice.apply(arguments)),this.options.mobileResponsive&&this.options.minWidth){var b=this,c={width:a(window).width(),height:a(window).height()};if(a(window).on("resize orientationchange",h(function(){var e=a(this).height(),f=a(this).width();(Math.abs(c.height-e)>b.options.heightThreshold||c.width!=f)&&(d(b,f,e),c={width:f,height:e})},200)),this.options.checkOnInit){var e=a(window).height(),f=a(window).width();d(this,f,e),c={width:f,height:e}}}}}(jQuery); \ No newline at end of file diff --git a/resources/assets/js/extensions/multiple-search/bootstrap-table-multiple-search.js b/resources/assets/js/extensions/multiple-search/bootstrap-table-multiple-search.js deleted file mode 100755 index 22df2ae933..0000000000 --- a/resources/assets/js/extensions/multiple-search/bootstrap-table-multiple-search.js +++ /dev/null @@ -1,67 +0,0 @@ -/** - * @author: Dennis Hernández - * @webSite: http://djhvscf.github.io/Blog - * @version: v1.0.0 - */ - -!function ($) { - - 'use strict'; - - $.extend($.fn.bootstrapTable.defaults, { - multipleSearch: false - }); - - var BootstrapTable = $.fn.bootstrapTable.Constructor, - _initSearch = BootstrapTable.prototype.initSearch; - - BootstrapTable.prototype.initSearch = function () { - if (this.options.multipleSearch) { - var strArray = this.searchText.split(" "), - that = this, - f = $.isEmptyObject(this.filterColumns) ? null : this.filterColumns, - dataFiltered = []; - - if (strArray.length === 1) { - _initSearch.apply(this, Array.prototype.slice.apply(arguments)); - } else { - for (var i = 0; i < strArray.length; i++) { - var str = strArray[i].trim(); - dataFiltered = str ? $.grep(dataFiltered.length === 0 ? this.options.data : dataFiltered, function (item, i) { - for (var key in item) { - key = $.isNumeric(key) ? parseInt(key, 10) : key; - var value = item[key], - column = that.columns[$.fn.bootstrapTable.utils.getFieldIndex(that.columns, key)], - j = $.inArray(key, that.header.fields); - - // Fix #142: search use formated data - if (column && column.searchFormatter) { - value = $.fn.bootstrapTable.utils.calculateObjectValue(column, - that.header.formatters[j], [value, item, i], value); - } - - var index = $.inArray(key, that.header.fields); - if (index !== -1 && that.header.searchables[index] && (typeof value === 'string' || typeof value === 'number')) { - if (that.options.strictSearch) { - if ((value + '').toLowerCase() === str) { - return true; - } - } else { - if ((value + '').toLowerCase().indexOf(str) !== -1) { - return true; - } - } - } - } - return false; - }) : this.data; - } - - this.data = dataFiltered; - } - } else { - _initSearch.apply(this, Array.prototype.slice.apply(arguments)); - } - }; - -}(jQuery); diff --git a/resources/assets/js/extensions/multiple-search/bootstrap-table-multiple-search.min.js b/resources/assets/js/extensions/multiple-search/bootstrap-table-multiple-search.min.js deleted file mode 100755 index 49cbf7c9d6..0000000000 --- a/resources/assets/js/extensions/multiple-search/bootstrap-table-multiple-search.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/* -* bootstrap-table - v1.9.1 - 2015-10-25 -* https://github.com/wenzhixin/bootstrap-table -* Copyright (c) 2015 zhixin wen -* Licensed MIT License -*/ -!function(a){"use strict";a.extend(a.fn.bootstrapTable.defaults,{multipleSearch:!1});var b=a.fn.bootstrapTable.Constructor,c=b.prototype.initSearch;b.prototype.initSearch=function(){if(this.options.multipleSearch){var b=this.searchText.split(" "),d=this,e=(a.isEmptyObject(this.filterColumns)?null:this.filterColumns,[]);if(1===b.length)c.apply(this,Array.prototype.slice.apply(arguments));else{for(var f=0;f - * @version: v1.0.0 - * https://github.com/dimbslmh/bootstrap-table/tree/master/src/extensions/multiple-sort/bootstrap-table-multiple-sort.js - */ - -(function($) { - 'use strict'; - - var isSingleSort = false; - - var sort_order = { - asc: 'Ascending', - desc: 'Descending' - }; - - var showSortModal = function(that) { - var _selector = that.$sortModal.selector, - _id = _selector.substr(1); - - if (!$(_id).hasClass("modal")) { - var sModal = ' '; - - $("body").append($(sModal)); - - that.$sortModal = $(_selector); - var $rows = that.$sortModal.find("tbody > tr"); - - that.$sortModal.off('click', '#add').on('click', '#add', function() { - var total = that.$sortModal.find('.multi-sort-name:first option').length, - current = that.$sortModal.find('tbody tr').length; - - if (current < total) { - current++; - that.addLevel(); - that.setButtonStates(); - } - }); - - that.$sortModal.off('click', '#delete').on('click', '#delete', function() { - var total = that.$sortModal.find('.multi-sort-name:first option').length, - current = that.$sortModal.find('tbody tr').length; - - if (current > 1 && current <= total) { - current--; - that.$sortModal.find('tbody tr:last').remove(); - that.setButtonStates(); - } - }); - - that.$sortModal.off('click', '.btn-primary').on('click', '.btn-primary', function() { - var $rows = that.$sortModal.find("tbody > tr"), - $alert = that.$sortModal.find('div.alert'), - fields = [], - results = []; - - - that.options.sortPriority = $.map($rows, function(row) { - var $row = $(row), - name = $row.find('.multi-sort-name').val(), - order = $row.find('.multi-sort-order').val(); - - fields.push(name); - - return { - sortName: name, - sortOrder: order - }; - }); - - var sorted_fields = fields.sort(); - - for (var i = 0; i < fields.length - 1; i++) { - if (sorted_fields[i + 1] == sorted_fields[i]) { - results.push(sorted_fields[i]); - } - } - - if (results.length > 0) { - if ($alert.length === 0) { - $alert = ''; - $($alert).insertBefore(that.$sortModal.find('.bars')); - } - } else { - if ($alert.length === 1) { - $($alert).remove(); - } - - that.options.sortName = ""; - that.onMultipleSort(); - that.$sortModal.modal('hide'); - } - }); - - if (that.options.sortPriority === null || that.options.sortPriority.length === 0) { - if (that.options.sortName) { - that.options.sortPriority = [{ - sortName: that.options.sortName, - sortOrder: that.options.sortOrder - }]; - } - } - - if (that.options.sortPriority !== null && that.options.sortPriority.length > 0) { - if ($rows.length < that.options.sortPriority.length && typeof that.options.sortPriority === 'object') { - for (var i = 0; i < that.options.sortPriority.length; i++) { - that.addLevel(i, that.options.sortPriority[i]); - } - } - } else { - that.addLevel(0); - } - - that.setButtonStates(); - } - }; - - $.extend($.fn.bootstrapTable.defaults, { - showMultiSort: false, - sortPriority: null, - onMultipleSort: function() { - return false; - } - }); - - $.extend($.fn.bootstrapTable.defaults.icons, { - sort: 'glyphicon-sort', - plus: 'glyphicon-plus', - minus: 'glyphicon-minus' - }); - - $.extend($.fn.bootstrapTable.Constructor.EVENTS, { - 'multiple-sort.bs.table': 'onMultipleSort' - }); - - $.extend($.fn.bootstrapTable.locales, { - formatMultipleSort: function() { - return 'Multiple Sort'; - }, - formatAddLevel: function() { - return "Add Level"; - }, - formatDeleteLevel: function() { - return "Delete Level"; - }, - formatColumn: function() { - return "Column"; - }, - formatOrder: function() { - return "Order"; - }, - formatSortBy: function() { - return "Sort by"; - }, - formatThenBy: function() { - return "Then by"; - }, - formatSort: function() { - return "Sort"; - }, - formatCancel: function() { - return "Cancel"; - }, - formatDuplicateAlertTitle: function() { - return "Duplicate(s) detected!"; - }, - formatDuplicateAlertDescription: function() { - return "Please remove or change any duplicate column."; - } - }); - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales); - - var BootstrapTable = $.fn.bootstrapTable.Constructor, - _initToolbar = BootstrapTable.prototype.initToolbar; - - BootstrapTable.prototype.initToolbar = function() { - this.showToolbar = true; - var that = this, - sortModalId = '#sortModal_' + this.$el.attr('id'); - this.$sortModal = $(sortModalId); - - _initToolbar.apply(this, Array.prototype.slice.apply(arguments)); - - if (this.options.showMultiSort) { - var $btnGroup = this.$toolbar.find('>.btn-group').first(), - $multiSortBtn = this.$toolbar.find('div.multi-sort'); - - if (!$multiSortBtn.length) { - $multiSortBtn = ' '; - - $btnGroup.append($multiSortBtn); - - showSortModal(that); - } - - this.$el.on('sort.bs.table', function() { - isSingleSort = true; - }); - - this.$el.on('multiple-sort.bs.table', function() { - isSingleSort = false; - }); - - this.$el.on('load-success.bs.table', function() { - if (!isSingleSort && that.options.sortPriority !== null && typeof that.options.sortPriority === 'object') { - that.onMultipleSort(); - } - }); - - this.$el.on('column-switch.bs.table', function(field, checked) { - for (var i = 0; i < that.options.sortPriority.length; i++) { - if (that.options.sortPriority[i].sortName === checked) { - that.options.sortPriority.splice(i, 1); - } - } - - that.assignSortableArrows(); - that.$sortModal.remove(); - showSortModal(that); - }); - - this.$el.on('reset-view.bs.table', function() { - if (!isSingleSort && that.options.sortPriority !== null && typeof that.options.sortPriority === 'object') { - that.assignSortableArrows(); - } - }); - } - }; - - BootstrapTable.prototype.onMultipleSort = function() { - var that = this; - - var cmp = function(x, y) { - return x > y ? 1 : x < y ? -1 : 0; - }; - - var arrayCmp = function(a, b) { - var arr1 = [], - arr2 = []; - - for (var i = 0; i < that.options.sortPriority.length; i++) { - var order = that.options.sortPriority[i].sortOrder === 'desc' ? -1 : 1, - aa = a[that.options.sortPriority[i].sortName], - bb = b[that.options.sortPriority[i].sortName]; - - if (aa === undefined || aa === null) { - aa = ''; - } - if (bb === undefined || bb === null) { - bb = ''; - } - if ($.isNumeric(aa) && $.isNumeric(bb)) { - aa = parseFloat(aa); - bb = parseFloat(bb); - } - if (typeof aa !== 'string') { - aa = aa.toString(); - } - - arr1.push( - order * cmp(aa, bb)); - arr2.push( - order * cmp(bb, aa)); - } - - return cmp(arr1, arr2); - }; - - this.data.sort(function(a, b) { - return arrayCmp(a, b); - }); - - this.initBody(); - this.assignSortableArrows(); - this.trigger('multiple-sort'); - }; - - BootstrapTable.prototype.addLevel = function(index, sortPriority) { - var text = index === 0 ? this.options.formatSortBy() : this.options.formatThenBy(); - - this.$sortModal.find('tbody') - .append($('') - .append($('').text(text)) - .append($('').append($(''))) - ); - - var $multiSortName = this.$sortModal.find('.multi-sort-name').last(), - $multiSortOrder = this.$sortModal.find('.multi-sort-order').last(); - - $.each(this.columns, function (i, column) { - if (column.sortable === false || column.visible === false) { - return true; - } - $multiSortName.append(''); - }); - - $.each(sort_order, function(value, order) { - $multiSortOrder.append(''); - }); - - if (sortPriority !== undefined) { - $multiSortName.find('option[value="' + sortPriority.sortName + '"]').attr("selected", true); - $multiSortOrder.find('option[value="' + sortPriority.sortOrder + '"]').attr("selected", true); - } - }; - - BootstrapTable.prototype.assignSortableArrows = function() { - var that = this, - headers = that.$header.find('th'); - - for (var i = 0; i < headers.length; i++) { - for (var c = 0; c < that.options.sortPriority.length; c++) { - if ($(headers[i]).data('field') === that.options.sortPriority[c].sortName) { - $(headers[i]).find('.sortable').removeClass('desc asc').addClass(that.options.sortPriority[c].sortOrder); - } - } - } - }; - - BootstrapTable.prototype.setButtonStates = function() { - var total = this.$sortModal.find('.multi-sort-name:first option').length, - current = this.$sortModal.find('tbody tr').length; - - if (current == total) { - this.$sortModal.find('#add').attr('disabled', 'disabled'); - } - if (current > 1) { - this.$sortModal.find('#delete').removeAttr('disabled'); - } - if (current < total) { - this.$sortModal.find('#add').removeAttr('disabled'); - } - if (current == 1) { - this.$sortModal.find('#delete').attr('disabled', 'disabled'); - } - }; -})(jQuery); diff --git a/resources/assets/js/extensions/multiple-sort/bootstrap-table-multiple-sort.min.js b/resources/assets/js/extensions/multiple-sort/bootstrap-table-multiple-sort.min.js deleted file mode 100755 index f957c52b88..0000000000 --- a/resources/assets/js/extensions/multiple-sort/bootstrap-table-multiple-sort.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/* -* bootstrap-table - v1.9.1 - 2015-10-25 -* https://github.com/wenzhixin/bootstrap-table -* Copyright (c) 2015 zhixin wen -* Licensed MIT License -*/ -!function(a){"use strict";var b=!1,c={asc:"Ascending",desc:"Descending"},d=function(b){var c=b.$sortModal.selector,d=c.substr(1);if(!a(d).hasClass("modal")){var e=' ",a("body").append(a(e)),b.$sortModal=a(c);var f=b.$sortModal.find("tbody > tr");if(b.$sortModal.off("click","#add").on("click","#add",function(){var a=b.$sortModal.find(".multi-sort-name:first option").length,c=b.$sortModal.find("tbody tr").length;a>c&&(c++,b.addLevel(),b.setButtonStates())}),b.$sortModal.off("click","#delete").on("click","#delete",function(){var a=b.$sortModal.find(".multi-sort-name:first option").length,c=b.$sortModal.find("tbody tr").length;c>1&&a>=c&&(c--,b.$sortModal.find("tbody tr:last").remove(),b.setButtonStates())}),b.$sortModal.off("click",".btn-primary").on("click",".btn-primary",function(){var c=b.$sortModal.find("tbody > tr"),d=b.$sortModal.find("div.alert"),e=[],f=[];b.options.sortPriority=a.map(c,function(b){var c=a(b),d=c.find(".multi-sort-name").val(),f=c.find(".multi-sort-order").val();return e.push(d),{sortName:d,sortOrder:f}});for(var g=e.sort(),h=0;h0?0===d.length&&(d='",a(d).insertBefore(b.$sortModal.find(".bars"))):(1===d.length&&a(d).remove(),b.options.sortName="",b.onMultipleSort(),b.$sortModal.modal("hide"))}),(null===b.options.sortPriority||0===b.options.sortPriority.length)&&b.options.sortName&&(b.options.sortPriority=[{sortName:b.options.sortName,sortOrder:b.options.sortOrder}]),null!==b.options.sortPriority&&b.options.sortPriority.length>0){if(f.length.btn-group").first(),h=this.$toolbar.find("div.multi-sort");h.length||(h=' ",g.append(h),d(c)),this.$el.on("sort.bs.table",function(){b=!0}),this.$el.on("multiple-sort.bs.table",function(){b=!1}),this.$el.on("load-success.bs.table",function(){b||null===c.options.sortPriority||"object"!=typeof c.options.sortPriority||c.onMultipleSort()}),this.$el.on("column-switch.bs.table",function(a,b){for(var e=0;eb?1:b>a?-1:0},d=function(d,e){for(var f=[],g=[],h=0;h").append(a("").text(e)).append(a("").append(a(''))));var f=this.$sortModal.find(".multi-sort-name").last(),g=this.$sortModal.find(".multi-sort-order").last();a.each(this.columns,function(a,b){return b.sortable===!1||b.visible===!1?!0:void f.append('")}),a.each(c,function(a,b){g.append('")}),void 0!==d&&(f.find('option[value="'+d.sortName+'"]').attr("selected",!0),g.find('option[value="'+d.sortOrder+'"]').attr("selected",!0))},e.prototype.assignSortableArrows=function(){for(var b=this,c=b.$header.find("th"),d=0;d1&&this.$sortModal.find("#delete").removeAttr("disabled"),a>b&&this.$sortModal.find("#add").removeAttr("disabled"),1==b&&this.$sortModal.find("#delete").attr("disabled","disabled")}}(jQuery); \ No newline at end of file diff --git a/resources/assets/js/extensions/natural-sorting/bootstrap-table-natural-sorting.js b/resources/assets/js/extensions/natural-sorting/bootstrap-table-natural-sorting.js deleted file mode 100755 index 8e84eb659b..0000000000 --- a/resources/assets/js/extensions/natural-sorting/bootstrap-table-natural-sorting.js +++ /dev/null @@ -1,47 +0,0 @@ -/** - * @author: Brian Huisman - * @webSite: http://www.greywyvern.com - * @version: v1.0.0 - * JS function to allow natural sorting on bootstrap-table columns - * just add data-sorter="alphanum" to any th - * - * @update Dennis Hernández - */ - -function alphanum(a, b) { - function chunkify(t) { - var tz = [], - x = 0, - y = -1, - n = 0, - i, - j; - - while (i = (j = t.charAt(x++)).charCodeAt(0)) { - var m = (i === 46 || (i >= 48 && i <= 57)); - if (m !== n) { - tz[++y] = ""; - n = m; - } - tz[y] += j; - } - return tz; - } - - var aa = chunkify(a); - var bb = chunkify(b); - - for (x = 0; aa[x] && bb[x]; x++) { - if (aa[x] !== bb[x]) { - var c = Number(aa[x]), - d = Number(bb[x]); - - if (c == aa[x] && d == bb[x]) { - return c - d; - } else { - return (aa[x] > bb[x]) ? 1 : -1; - } - } - } - return aa.length - bb.length; -} \ No newline at end of file diff --git a/resources/assets/js/extensions/natural-sorting/bootstrap-table-natural-sorting.min.js b/resources/assets/js/extensions/natural-sorting/bootstrap-table-natural-sorting.min.js deleted file mode 100755 index 2ccb66b63d..0000000000 --- a/resources/assets/js/extensions/natural-sorting/bootstrap-table-natural-sorting.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/* -* bootstrap-table - v1.9.1 - 2015-10-25 -* https://github.com/wenzhixin/bootstrap-table -* Copyright (c) 2015 zhixin wen -* Licensed MIT License -*/ -function alphanum(a,b){function c(a){for(var b,c,d=[],e=0,f=-1,g=0;b=(c=a.charAt(e++)).charCodeAt(0);){var h=46===b||b>=48&&57>=b;h!==g&&(d[++f]="",g=h),d[f]+=c}return d}var d=c(a),e=c(b);for(x=0;d[x]&&e[x];x++)if(d[x]!==e[x]){var f=Number(d[x]),g=Number(e[x]);return f==d[x]&&g==e[x]?f-g:d[x]>e[x]?1:-1}return d.length-e.length} \ No newline at end of file diff --git a/resources/assets/js/extensions/reorder-columns/bootstrap-table-reorder-columns.js b/resources/assets/js/extensions/reorder-columns/bootstrap-table-reorder-columns.js deleted file mode 100755 index 0c8b8b3f7e..0000000000 --- a/resources/assets/js/extensions/reorder-columns/bootstrap-table-reorder-columns.js +++ /dev/null @@ -1,121 +0,0 @@ -/** - * @author: Dennis Hernández - * @webSite: http://djhvscf.github.io/Blog - * @version: v1.1.0 - */ - -!function ($) { - - 'use strict'; - - $.extend($.fn.bootstrapTable.defaults, { - reorderableColumns: false, - maxMovingRows: 10, - onReorderColumn: function (headerFields) { - return false; - }, - dragaccept: null - }); - - $.extend($.fn.bootstrapTable.Constructor.EVENTS, { - 'reorder-column.bs.table': 'onReorderColumn' - }); - - var BootstrapTable = $.fn.bootstrapTable.Constructor, - _initHeader = BootstrapTable.prototype.initHeader, - _toggleColumn = BootstrapTable.prototype.toggleColumn, - _toggleView = BootstrapTable.prototype.toggleView, - _resetView = BootstrapTable.prototype.resetView; - - BootstrapTable.prototype.initHeader = function () { - _initHeader.apply(this, Array.prototype.slice.apply(arguments)); - - if (!this.options.reorderableColumns) { - return; - } - - this.makeRowsReorderable(); - }; - - BootstrapTable.prototype.toggleColumn = function () { - _toggleColumn.apply(this, Array.prototype.slice.apply(arguments)); - - if (!this.options.reorderableColumns) { - return; - } - - this.makeRowsReorderable(); - }; - - BootstrapTable.prototype.toggleView = function () { - _toggleView.apply(this, Array.prototype.slice.apply(arguments)); - - if (!this.options.reorderableColumns) { - return; - } - - if (this.options.cardView) { - return; - } - - this.makeRowsReorderable(); - }; - - BootstrapTable.prototype.resetView = function () { - _resetView.apply(this, Array.prototype.slice.apply(arguments)); - - if (!this.options.reorderableColumns) { - return; - } - - this.makeRowsReorderable(); - }; - - BootstrapTable.prototype.makeRowsReorderable = function () { - var that = this; - try { - $(this.$el).dragtable('destroy'); - } catch (e) {} - $(this.$el).dragtable({ - maxMovingRows: that.options.maxMovingRows, - dragaccept: that.options.dragaccept, - clickDelay:200, - beforeStop: function() { - var ths = [], - formatters = [], - columns = [], - columnsHidden = [], - columnIndex = -1; - that.$header.find('th').each(function (i) { - ths.push($(this).data('field')); - formatters.push($(this).data('formatter')); - }); - - //Exist columns not shown - if (ths.length < that.columns.length) { - columnsHidden = $.grep(that.columns, function (column) { - return !column.visible; - }); - for (var i = 0; i < columnsHidden.length; i++) { - ths.push(columnsHidden[i].field); - formatters.push(columnsHidden[i].formatter); - } - } - - for (var i = 0; i < ths.length; i++ ) { - columnIndex = $.fn.bootstrapTable.utils.getFieldIndex(that.columns, ths[i]); - if (columnIndex !== -1) { - columns.push(that.columns[columnIndex]); - that.columns.splice(columnIndex, 1); - } - } - - that.columns = that.columns.concat(columns); - that.header.fields = ths; - that.header.formatters = formatters; - that.resetView(); - that.trigger('reorder-column', ths); - } - }); - }; -}(jQuery); diff --git a/resources/assets/js/extensions/reorder-columns/bootstrap-table-reorder-columns.min.js b/resources/assets/js/extensions/reorder-columns/bootstrap-table-reorder-columns.min.js deleted file mode 100755 index 50cad77bed..0000000000 --- a/resources/assets/js/extensions/reorder-columns/bootstrap-table-reorder-columns.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/* -* bootstrap-table - v1.9.1 - 2015-10-25 -* https://github.com/wenzhixin/bootstrap-table -* Copyright (c) 2015 zhixin wen -* Licensed MIT License -*/ -!function(a){"use strict";a.extend(a.fn.bootstrapTable.defaults,{reorderableColumns:!1,maxMovingRows:10,onReorderColumn:function(){return!1},dragaccept:null}),a.extend(a.fn.bootstrapTable.Constructor.EVENTS,{"reorder-column.bs.table":"onReorderColumn"});var b=a.fn.bootstrapTable.Constructor,c=b.prototype.initHeader,d=b.prototype.toggleColumn,e=b.prototype.toggleView,f=b.prototype.resetView;b.prototype.initHeader=function(){c.apply(this,Array.prototype.slice.apply(arguments)),this.options.reorderableColumns&&this.makeRowsReorderable()},b.prototype.toggleColumn=function(){d.apply(this,Array.prototype.slice.apply(arguments)),this.options.reorderableColumns&&this.makeRowsReorderable()},b.prototype.toggleView=function(){e.apply(this,Array.prototype.slice.apply(arguments)),this.options.reorderableColumns&&(this.options.cardView||this.makeRowsReorderable())},b.prototype.resetView=function(){f.apply(this,Array.prototype.slice.apply(arguments)),this.options.reorderableColumns&&this.makeRowsReorderable()},b.prototype.makeRowsReorderable=function(){var b=this;try{a(this.$el).dragtable("destroy")}catch(c){}a(this.$el).dragtable({maxMovingRows:b.options.maxMovingRows,dragaccept:b.options.dragaccept,clickDelay:200,beforeStop:function(){var c=[],d=[],e=[],f=[],g=-1;if(b.$header.find("th").each(function(){c.push(a(this).data("field")),d.push(a(this).data("formatter"))}),c.length - * @version: v1.0.0 - * https://github.com/vinzloh/bootstrap-table/ - * Sticky header for bootstrap-table - */ - -.fix-sticky { - position: fixed; - z-index: 100; -} -.fix-sticky thead { - background: #fff; -} - -.fix-sticky thead th, -.fix-sticky thead th:first-child { - border-left: 0; - border-right: 0; - border-bottom: 1px solid #eee; - border-radius: 0; -} diff --git a/resources/assets/js/extensions/sticky-header/bootstrap-table-sticky-header.js b/resources/assets/js/extensions/sticky-header/bootstrap-table-sticky-header.js deleted file mode 100755 index d9fc6c5bd4..0000000000 --- a/resources/assets/js/extensions/sticky-header/bootstrap-table-sticky-header.js +++ /dev/null @@ -1,118 +0,0 @@ -/** - * @author vincent loh - * @version: v1.1.0 - * https://github.com/vinzloh/bootstrap-table/ - * Sticky header for bootstrap-table - * @update J Manuel Corona - */ - -(function ($) { - 'use strict'; - - var sprintf = $.fn.bootstrapTable.utils.sprintf; - $.extend($.fn.bootstrapTable.defaults, { - stickyHeader: false - }); - - var bootstrapVersion = 3; - try { - bootstrapVersion = parseInt($.fn.dropdown.Constructor.VERSION, 10); - } catch (e) { } - var hidden_class = bootstrapVersion > 3 ? 'd-none' : 'hidden'; - - var BootstrapTable = $.fn.bootstrapTable.Constructor, - _initHeader = BootstrapTable.prototype.initHeader; - - BootstrapTable.prototype.initHeader = function () { - var that = this; - _initHeader.apply(this, Array.prototype.slice.apply(arguments)); - - if (!this.options.stickyHeader) { - return; - } - - var table = this.$tableBody.find('table'), - table_id = table.attr('id'), - header_id = table.attr('id') + '-sticky-header', - sticky_header_container_id = header_id +'-sticky-header-container', - anchor_begin_id = header_id +'_sticky_anchor_begin', - anchor_end_id = header_id +'_sticky_anchor_end'; - // add begin and end anchors to track table position - - table.before(sprintf('
    ', sticky_header_container_id, hidden_class)); - table.before(sprintf('
    ', anchor_begin_id)); - table.after(sprintf('
    ', anchor_end_id)); - - table.find('thead').attr('id', header_id); - - // clone header just once, to be used as sticky header - // deep clone header. using source header affects tbody>td width - this.$stickyHeader = $($('#'+header_id).clone(true, true)); - // avoid id conflict - this.$stickyHeader.removeAttr('id'); - - // render sticky on window scroll or resize - $(window).on('resize.'+table_id, table, render_sticky_header); - $(window).on('scroll.'+table_id, table, render_sticky_header); - // render sticky when table scroll left-right - table.closest('.fixed-table-container').find('.fixed-table-body').on('scroll.'+table_id, table, match_position_x); - - this.$el.on('all.bs.table', function (e) { - that.$stickyHeader = $($('#'+header_id).clone(true, true)); - that.$stickyHeader.removeAttr('id'); - }); - - function render_sticky_header(event) { - var table = event.data; - var table_header_id = table.find('thead').attr('id'); - // console.log('render_sticky_header for > '+table_header_id); - if (table.length < 1 || $('#'+table_id).length < 1){ - // turn off window listeners - $(window).off('resize.'+table_id); - $(window).off('scroll.'+table_id); - table.closest('.fixed-table-container').find('.fixed-table-body').off('scroll.'+table_id); - return; - } - // get header height - var header_height = '0'; - if (that.options.stickyHeaderOffsetY) header_height = that.options.stickyHeaderOffsetY.replace('px',''); - // window scroll top - var t = $(window).scrollTop(); - // top anchor scroll position, minus header height - var e = $("#"+anchor_begin_id).offset().top - header_height; - // bottom anchor scroll position, minus header height, minus sticky height - var e_end = $("#"+anchor_end_id).offset().top - header_height - $('#'+table_header_id).css('height').replace('px',''); - // show sticky when top anchor touches header, and when bottom anchor not exceeded - if (t > e && t <= e_end) { - // ensure clone and source column widths are the same - $.each( that.$stickyHeader.find('tr').eq(0).find('th'), function (index, item) { - $(item).css('min-width', $('#'+table_header_id+' tr').eq(0).find('th').eq(index).css('width')); - }); - // match bootstrap table style - $("#"+sticky_header_container_id).removeClass(hidden_class).addClass("fix-sticky fixed-table-container") ; - // stick it in position - $("#"+sticky_header_container_id).css('top', header_height + 'px'); - // create scrollable container for header - var scrollable_div = $('
    '); - // append cloned header to dom - $("#"+sticky_header_container_id).html(scrollable_div.append(that.$stickyHeader)); - // match clone and source header positions when left-right scroll - match_position_x(event); - } else { - // hide sticky - $("#"+sticky_header_container_id).removeClass("fix-sticky").addClass(hidden_class); - } - - } - function match_position_x(event){ - var table = event.data; - var table_header_id = table.find('thead').attr('id'); - // match clone and source header positions when left-right scroll - $("#"+sticky_header_container_id).css( - 'width', +table.closest('.fixed-table-body').css('width').replace('px', '') + 1 - ); - $("#"+sticky_header_container_id+" thead").parent().scrollLeft(Math.abs($('#'+table_header_id).position().left)); - } - }; - -})(jQuery); diff --git a/resources/assets/js/extensions/sticky-header/bootstrap-table-sticky-header.min.js b/resources/assets/js/extensions/sticky-header/bootstrap-table-sticky-header.min.js deleted file mode 100755 index 527f4d1d30..0000000000 --- a/resources/assets/js/extensions/sticky-header/bootstrap-table-sticky-header.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/* -* bootstrap-table - v1.10.1 - 2016-02-17 -* https://github.com/wenzhixin/bootstrap-table -* Copyright (c) 2016 zhixin wen -* Licensed MIT License -*/ -!function(a){"use strict";var b=a.fn.bootstrapTable.utils.sprintf;a.extend(a.fn.bootstrapTable.defaults,{stickyHeader:!1});var c=a.fn.bootstrapTable.Constructor,d=c.prototype.initHeader;c.prototype.initHeader=function(){function c(b){var c=b.data,d=c.find("thead").attr("id");if(c.length<1||a("#"+h).length<1)return a(window).off("resize."+h),a(window).off("scroll."+h),void c.closest(".fixed-table-container").find(".fixed-table-body").off("scroll."+h);var g="0";f.options.stickyHeaderOffsetY&&(g=f.options.stickyHeaderOffsetY.replace("px",""));var i=a(window).scrollTop(),m=a("#"+k).offset().top-g,n=a("#"+l).offset().top-g-a("#"+d).css("height").replace("px","");if(i>m&&n>=i){a.each(f.$stickyHeader.find("tr").eq(0).find("th"),function(b,c){a(c).css("min-width",a("#"+d+" tr").eq(0).find("th").eq(b).css("width"))}),a("#"+j).removeClass("hidden").addClass("fix-sticky fixed-table-container"),a("#"+j).css("top",g+"px");var o=a('
    ');a("#"+j).html(o.append(f.$stickyHeader)),e(b)}else a("#"+j).removeClass("fix-sticky").addClass("hidden")}function e(b){var c=b.data,d=c.find("thead").attr("id");a("#"+j).css("width",+c.closest(".fixed-table-body").css("width").replace("px","")+1),a("#"+j+" thead").parent().scrollLeft(Math.abs(a("#"+d).position().left))}var f=this;if(d.apply(this,Array.prototype.slice.apply(arguments)),this.options.stickyHeader){var g=this.$tableBody.find("table"),h=g.attr("id"),i=g.attr("id")+"-sticky-header",j=i+"-sticky-header-container",k=i+"_sticky_anchor_begin",l=i+"_sticky_anchor_end";g.before(b('',j)),g.before(b('
    ',k)),g.after(b('
    ',l)),g.find("thead").attr("id",i),this.$stickyHeader=a(a("#"+i).clone()),this.$stickyHeader.removeAttr("id"),a(window).on("resize."+h,g,c),a(window).on("scroll."+h,g,c),g.closest(".fixed-table-container").find(".fixed-table-body").on("scroll."+h,g,e)}}}(jQuery); \ No newline at end of file diff --git a/resources/assets/js/extensions/toolbar/bootstrap-table-toolbar.js b/resources/assets/js/extensions/toolbar/bootstrap-table-toolbar.js deleted file mode 100755 index da6b05689a..0000000000 --- a/resources/assets/js/extensions/toolbar/bootstrap-table-toolbar.js +++ /dev/null @@ -1,211 +0,0 @@ -/** - * @author: aperez - * @version: v2.0.0 - * - * @update Dennis Hernández - */ - -!function($) { - 'use strict'; - - var firstLoad = false; - - var sprintf = $.fn.bootstrapTable.utils.sprintf; - - var showAvdSearch = function(pColumns, searchTitle, searchText, that) { - if (!$("#avdSearchModal" + "_" + that.options.idTable).hasClass("modal")) { - var vModal = sprintf("
    ", "_" + that.options.idTable); - vModal += "
    "; - vModal += "
    "; - vModal += "
    "; - vModal += " "; - vModal += sprintf("

    %s

    ", searchTitle); - vModal += "
    "; - vModal += "
    "; - vModal += sprintf("
    ", "_" + that.options.idTable); - vModal += "
    "; - vModal += "
    "; - vModal += "
    "; - vModal += "
    "; - vModal += "
    "; - - $("body").append($(vModal)); - - var vFormAvd = createFormAvd(pColumns, searchText, that), - timeoutId = 0;; - - $('#avdSearchModalContent' + "_" + that.options.idTable).append(vFormAvd.join('')); - - $('#' + that.options.idForm).off('keyup blur', 'input').on('keyup blur', 'input', function (event) { - clearTimeout(timeoutId); - timeoutId = setTimeout(function () { - that.onColumnAdvancedSearch(event); - }, that.options.searchTimeOut); - }); - - $("#btnCloseAvd" + "_" + that.options.idTable).click(function() { - $("#avdSearchModal" + "_" + that.options.idTable).modal('hide'); - }); - - $("#avdSearchModal" + "_" + that.options.idTable).modal(); - } else { - $("#avdSearchModal" + "_" + that.options.idTable).modal(); - } - }; - - var createFormAvd = function(pColumns, searchText, that) { - var htmlForm = []; - htmlForm.push(sprintf('
    ', that.options.idForm, that.options.actionForm)); - for (var i in pColumns) { - var vObjCol = pColumns[i]; - if (!vObjCol.checkbox && vObjCol.visible && vObjCol.searchable) { - htmlForm.push('
    '); - htmlForm.push(sprintf('', vObjCol.title)); - htmlForm.push('
    '); - htmlForm.push(sprintf('', vObjCol.field, vObjCol.title, vObjCol.field)); - htmlForm.push('
    '); - htmlForm.push('
    '); - } - } - - htmlForm.push('
    '); - htmlForm.push('
    '); - htmlForm.push(sprintf('', "_" + that.options.idTable, searchText)); - htmlForm.push('
    '); - htmlForm.push('
    '); - htmlForm.push('
    '); - - return htmlForm; - }; - - $.extend($.fn.bootstrapTable.defaults, { - advancedSearch: false, - idForm: 'advancedSearch', - actionForm: '', - idTable: undefined, - onColumnAdvancedSearch: function (field, text) { - return false; - } - }); - - $.extend($.fn.bootstrapTable.defaults.icons, { - advancedSearchIcon: 'glyphicon-chevron-down' - }); - - $.extend($.fn.bootstrapTable.Constructor.EVENTS, { - 'column-advanced-search.bs.table': 'onColumnAdvancedSearch' - }); - - $.extend($.fn.bootstrapTable.locales, { - formatAdvancedSearch: function() { - return 'Advanced search'; - }, - formatAdvancedCloseButton: function() { - return "Close"; - } - }); - - $.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales); - - var BootstrapTable = $.fn.bootstrapTable.Constructor, - _initToolbar = BootstrapTable.prototype.initToolbar, - _load = BootstrapTable.prototype.load, - _initSearch = BootstrapTable.prototype.initSearch; - - BootstrapTable.prototype.initToolbar = function() { - _initToolbar.apply(this, Array.prototype.slice.apply(arguments)); - - if (!this.options.search) { - return; - } - - if (!this.options.advancedSearch) { - return; - } - - if (!this.options.idTable) { - return; - } - - var that = this, - html = []; - - html.push(sprintf('
    ', this.options.buttonsAlign, this.options.buttonsAlign)); - html.push(sprintf('
    '); - - that.$toolbar.prepend(html.join('')); - - that.$toolbar.find('button[name="advancedSearch"]') - .off('click').on('click', function() { - showAvdSearch(that.columns, that.options.formatAdvancedSearch(), that.options.formatAdvancedCloseButton(), that); - }); - }; - - BootstrapTable.prototype.load = function(data) { - _load.apply(this, Array.prototype.slice.apply(arguments)); - - if (!this.options.advancedSearch) { - return; - } - - if (typeof this.options.idTable === 'undefined') { - return; - } else { - if (!firstLoad) { - var height = parseInt($(".bootstrap-table").height()); - height += 10; - $("#" + this.options.idTable).bootstrapTable("resetView", {height: height}); - firstLoad = true; - } - } - }; - - BootstrapTable.prototype.initSearch = function () { - _initSearch.apply(this, Array.prototype.slice.apply(arguments)); - - if (!this.options.advancedSearch) { - return; - } - - var that = this; - var fp = $.isEmptyObject(this.filterColumnsPartial) ? null : this.filterColumnsPartial; - - this.data = fp ? $.grep(this.data, function (item, i) { - for (var key in fp) { - var fval = fp[key].toLowerCase(); - var value = item[key]; - value = $.fn.bootstrapTable.utils.calculateObjectValue(that.header, - that.header.formatters[$.inArray(key, that.header.fields)], - [value, item, i], value); - - if (!($.inArray(key, that.header.fields) !== -1 && - (typeof value === 'string' || typeof value === 'number') && - (value + '').toLowerCase().indexOf(fval) !== -1)) { - return false; - } - } - return true; - }) : this.data; - }; - - BootstrapTable.prototype.onColumnAdvancedSearch = function (event) { - var text = $.trim($(event.currentTarget).val()); - var $field = $(event.currentTarget)[0].id; - - if ($.isEmptyObject(this.filterColumnsPartial)) { - this.filterColumnsPartial = {}; - } - if (text) { - this.filterColumnsPartial[$field] = text; - } else { - delete this.filterColumnsPartial[$field]; - } - - this.options.pageNumber = 1; - this.onSearch(event); - this.updatePagination(); - this.trigger('column-advanced-search', $field, text); - }; -}(jQuery); diff --git a/resources/assets/js/extensions/toolbar/bootstrap-table-toolbar.min.js b/resources/assets/js/extensions/toolbar/bootstrap-table-toolbar.min.js deleted file mode 100755 index 468da02652..0000000000 --- a/resources/assets/js/extensions/toolbar/bootstrap-table-toolbar.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/* -* bootstrap-table - v1.11.1 - 2017-02-22 -* https://github.com/wenzhixin/bootstrap-table -* Copyright (c) 2017 zhixin wen -* Licensed MIT License -*/ -!function(a){"use strict";var b=!1,c=a.fn.bootstrapTable.utils.sprintf,d=function(b,d,f,g){if(a("#avdSearchModal_"+g.options.idTable).hasClass("modal"))a("#avdSearchModal_"+g.options.idTable).modal();else{var h=c('",a("body").append(a(h));var i=e(b,f,g),j=0;a("#avdSearchModalContent_"+g.options.idTable).append(i.join("")),a("#"+g.options.idForm).off("keyup blur","input").on("keyup blur","input",function(a){clearTimeout(j),j=setTimeout(function(){g.onColumnAdvancedSearch(a)},g.options.searchTimeOut)}),a("#btnCloseAvd_"+g.options.idTable).click(function(){a("#avdSearchModal_"+g.options.idTable).modal("hide")}),a("#avdSearchModal_"+g.options.idTable).modal()}},e=function(a,b,d){var e=[];e.push(c('
    ',d.options.idForm,d.options.actionForm));for(var f in a){var g=a[f];!g.checkbox&&g.visible&&g.searchable&&(e.push('
    '),e.push(c('',g.title)),e.push('
    '),e.push(c('',g.field,g.title,g.field)),e.push("
    "),e.push("
    "))}return e.push('
    '),e.push('
    '),e.push(c('',"_"+d.options.idTable,b)),e.push("
    "),e.push("
    "),e.push("
    "),e};a.extend(a.fn.bootstrapTable.defaults,{advancedSearch:!1,idForm:"advancedSearch",actionForm:"",idTable:void 0,onColumnAdvancedSearch:function(){return!1}}),a.extend(a.fn.bootstrapTable.defaults.icons,{advancedSearchIcon:"glyphicon-chevron-down"}),a.extend(a.fn.bootstrapTable.Constructor.EVENTS,{"column-advanced-search.bs.table":"onColumnAdvancedSearch"}),a.extend(a.fn.bootstrapTable.locales,{formatAdvancedSearch:function(){return"Advanced search"},formatAdvancedCloseButton:function(){return"Close"}}),a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales);var f=a.fn.bootstrapTable.Constructor,g=f.prototype.initToolbar,h=f.prototype.load,i=f.prototype.initSearch;f.prototype.initToolbar=function(){if(g.apply(this,Array.prototype.slice.apply(arguments)),this.options.search&&this.options.advancedSearch&&this.options.idTable){var a=this,b=[];b.push(c('
    ',this.options.buttonsAlign,this.options.buttonsAlign)),b.push(c('
    "),a.$toolbar.prepend(b.join("")),a.$toolbar.find('button[name="advancedSearch"]').off("click").on("click",function(){d(a.columns,a.options.formatAdvancedSearch(),a.options.formatAdvancedCloseButton(),a)})}},f.prototype.load=function(){if(h.apply(this,Array.prototype.slice.apply(arguments)),this.options.advancedSearch&&"undefined"!=typeof this.options.idTable&&!b){var c=parseInt(a(".bootstrap-table").height());c+=10,a("#"+this.options.idTable).bootstrapTable("resetView",{height:c}),b=!0}},f.prototype.initSearch=function(){if(i.apply(this,Array.prototype.slice.apply(arguments)),this.options.advancedSearch){var b=this,c=a.isEmptyObject(this.filterColumnsPartial)?null:this.filterColumnsPartial;this.data=c?a.grep(this.data,function(d,e){for(var f in c){var g=c[f].toLowerCase(),h=d[f];if(h=a.fn.bootstrapTable.utils.calculateObjectValue(b.header,b.header.formatters[a.inArray(f,b.header.fields)],[h,d,e],h),-1===a.inArray(f,b.header.fields)||"string"!=typeof h&&"number"!=typeof h||-1===(h+"").toLowerCase().indexOf(g))return!1}return!0}):this.data}},f.prototype.onColumnAdvancedSearch=function(b){var c=a.trim(a(b.currentTarget).val()),d=a(b.currentTarget)[0].id;a.isEmptyObject(this.filterColumnsPartial)&&(this.filterColumnsPartial={}),c?this.filterColumnsPartial[d]=c:delete this.filterColumnsPartial[d],this.options.pageNumber=1,this.onSearch(b),this.updatePagination(),this.trigger("column-advanced-search",d,c)}}(jQuery); diff --git a/resources/assets/js/html5.js b/resources/assets/js/html5.js deleted file mode 100644 index 6168aacd5e..0000000000 --- a/resources/assets/js/html5.js +++ /dev/null @@ -1,8 +0,0 @@ -/* - HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed -*/ -(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag(); -a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x"; -c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode|| -"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f); -if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.3",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b),"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:this,document); diff --git a/resources/assets/js/jquery.dragtable.js b/resources/assets/js/jquery.dragtable.js deleted file mode 100644 index f42265dfda..0000000000 --- a/resources/assets/js/jquery.dragtable.js +++ /dev/null @@ -1,403 +0,0 @@ -/*! - * dragtable - * - * @Version 2.0.15 - * - * Copyright (c) 2010-2013, Andres akottr@gmail.com - * Dual licensed under the MIT (MIT-LICENSE.txt) - * and GPL (GPL-LICENSE.txt) licenses. - * - * Inspired by the the dragtable from Dan Vanderkam (danvk.org/dragtable/) - * Thanks to the jquery and jqueryui comitters - * - * Any comment, bug report, feature-request is welcome - * Feel free to contact me. - */ - -/* TOKNOW: - * For IE7 you need this css rule: - * table { - * border-collapse: collapse; - * } - * Or take a clean reset.css (see http://meyerweb.com/eric/tools/css/reset/) - */ - -/* TODO: investigate - * Does not work properly with css rule: - * html { - * overflow: -moz-scrollbars-vertical; - * } - * Workaround: - * Fixing Firefox issues by scrolling down the page - * http://stackoverflow.com/questions/2451528/jquery-ui-sortable-scroll-helper-element-offset-firefox-issue - * - * var start = $.noop; - * var beforeStop = $.noop; - * if($.browser.mozilla) { - * var start = function (event, ui) { - * if( ui.helper !== undefined ) - * ui.helper.css('position','absolute').css('margin-top', $(window).scrollTop() ); - * } - * var beforeStop = function (event, ui) { - * if( ui.offset !== undefined ) - * ui.helper.css('margin-top', 0); - * } - * } - * - * and pass this as start and stop function to the sortable initialisation - * start: start, - * beforeStop: beforeStop - */ -/* - * Special thx to all pull requests comitters - */ - -(function($) { - $.widget("akottr.dragtable", { - options: { - revert: false, // smooth revert - dragHandle: '.table-handle', // handle for moving cols, if not exists the whole 'th' is the handle - maxMovingRows: 40, // 1 -> only header. 40 row should be enough, the rest is usually not in the viewport - excludeFooter: false, // excludes the footer row(s) while moving other columns. Make sense if there is a footer with a colspan. */ - onlyHeaderThreshold: 100, // TODO: not implemented yet, switch automatically between entire col moving / only header moving - dragaccept: null, // draggable cols -> default all - persistState: null, // url or function -> plug in your custom persistState function right here. function call is persistState(originalTable) - restoreState: null, // JSON-Object or function: some kind of experimental aka Quick-Hack TODO: do it better - exact: true, // removes pixels, so that the overlay table width fits exactly the original table width - clickDelay: 10, // ms to wait before rendering sortable list and delegating click event - containment: null, // @see http://api.jqueryui.com/sortable/#option-containment, use it if you want to move in 2 dimesnions (together with axis: null) - cursor: 'move', // @see http://api.jqueryui.com/sortable/#option-cursor - cursorAt: false, // @see http://api.jqueryui.com/sortable/#option-cursorAt - distance: 0, // @see http://api.jqueryui.com/sortable/#option-distance, for immediate feedback use "0" - tolerance: 'pointer', // @see http://api.jqueryui.com/sortable/#option-tolerance - axis: 'x', // @see http://api.jqueryui.com/sortable/#option-axis, Only vertical moving is allowed. Use 'x' or null. Use this in conjunction with the 'containment' setting - beforeStart: $.noop, // returning FALSE will stop the execution chain. - beforeMoving: $.noop, - beforeReorganize: $.noop, - beforeStop: $.noop - }, - originalTable: { - el: null, - selectedHandle: null, - sortOrder: null, - startIndex: 0, - endIndex: 0 - }, - sortableTable: { - el: $(), - selectedHandle: $(), - movingRow: $() - }, - persistState: function() { - var _this = this; - this.originalTable.el.find('th').each(function(i) { - if (this.id !== '') { - _this.originalTable.sortOrder[this.id] = i; - } - }); - $.ajax({ - url: this.options.persistState, - data: this.originalTable.sortOrder - }); - }, - /* - * persistObj looks like - * {'id1':'2','id3':'3','id2':'1'} - * table looks like - * | id2 | id1 | id3 | - */ - _restoreState: function(persistObj) { - for (var n in persistObj) { - this.originalTable.startIndex = $('#' + n).closest('th').prevAll().length + 1; - this.originalTable.endIndex = parseInt(persistObj[n], 10) + 1; - this._bubbleCols(); - } - }, - // bubble the moved col left or right - _bubbleCols: function() { - var i, j, col1, col2; - var from = this.originalTable.startIndex; - var to = this.originalTable.endIndex; - /* Find children thead and tbody. - * Only to process the immediate tr-children. Bugfix for inner tables - */ - var thtb = this.originalTable.el.children(); - if (this.options.excludeFooter) { - thtb = thtb.not('tfoot'); - } - if (from < to) { - for (i = from; i < to; i++) { - col1 = thtb.find('> tr > td:nth-child(' + i + ')') - .add(thtb.find('> tr > th:nth-child(' + i + ')')); - col2 = thtb.find('> tr > td:nth-child(' + (i + 1) + ')') - .add(thtb.find('> tr > th:nth-child(' + (i + 1) + ')')); - for (j = 0; j < col1.length; j++) { - swapNodes(col1[j], col2[j]); - } - } - } else { - for (i = from; i > to; i--) { - col1 = thtb.find('> tr > td:nth-child(' + i + ')') - .add(thtb.find('> tr > th:nth-child(' + i + ')')); - col2 = thtb.find('> tr > td:nth-child(' + (i - 1) + ')') - .add(thtb.find('> tr > th:nth-child(' + (i - 1) + ')')); - for (j = 0; j < col1.length; j++) { - swapNodes(col1[j], col2[j]); - } - } - } - }, - _rearrangeTableBackroundProcessing: function() { - var _this = this; - return function() { - _this._bubbleCols(); - _this.options.beforeStop(_this.originalTable); - _this.sortableTable.el.remove(); - restoreTextSelection(); - // persist state if necessary - if (_this.options.persistState !== null) { - $.isFunction(_this.options.persistState) ? _this.options.persistState(_this.originalTable) : _this.persistState(); - } - }; - }, - _rearrangeTable: function() { - var _this = this; - return function() { - // remove handler-class -> handler is now finished - _this.originalTable.selectedHandle.removeClass('dragtable-handle-selected'); - // add disabled class -> reorgorganisation starts soon - _this.sortableTable.el.sortable("disable"); - _this.sortableTable.el.addClass('dragtable-disabled'); - _this.options.beforeReorganize(_this.originalTable, _this.sortableTable); - // do reorganisation asynchronous - // for chrome a little bit more than 1 ms because we want to force a rerender - _this.originalTable.endIndex = _this.sortableTable.movingRow.prevAll().length + 1; - setTimeout(_this._rearrangeTableBackroundProcessing(), 50); - }; - }, - /* - * Disrupts the table. The original table stays the same. - * But on a layer above the original table we are constructing a list (ul > li) - * each li with a separate table representig a single col of the original table. - */ - _generateSortable: function(e) { - !e.cancelBubble && (e.cancelBubble = true); - var _this = this; - // table attributes - var attrs = this.originalTable.el[0].attributes; - var attrsString = ''; - for (var i = 0; i < attrs.length; i++) { - if (attrs[i].nodeValue && attrs[i].nodeName != 'id' && attrs[i].nodeName != 'width') { - attrsString += attrs[i].nodeName + '="' + attrs[i].nodeValue + '" '; - } - } - - // row attributes - var rowAttrsArr = []; - //compute height, special handling for ie needed :-( - var heightArr = []; - this.originalTable.el.find('tr').slice(0, this.options.maxMovingRows).each(function(i, v) { - // row attributes - var attrs = this.attributes; - var attrsString = ""; - for (var j = 0; j < attrs.length; j++) { - if (attrs[j].nodeValue && attrs[j].nodeName != 'id') { - attrsString += " " + attrs[j].nodeName + '="' + attrs[j].nodeValue + '"'; - } - } - rowAttrsArr.push(attrsString); - heightArr.push($(this).height()); - }); - - // compute width, no special handling for ie needed :-) - var widthArr = []; - // compute total width, needed for not wrapping around after the screen ends (floating) - var totalWidth = 0; - /* Find children thead and tbody. - * Only to process the immediate tr-children. Bugfix for inner tables - */ - var thtb = _this.originalTable.el.children(); - if (this.options.excludeFooter) { - thtb = thtb.not('tfoot'); - } - thtb.find('> tr > th').each(function(i, v) { - var w = $(this).is(':visible') ? $(this).outerWidth() : 0; - widthArr.push(w); - totalWidth += w; - }); - if(_this.options.exact) { - var difference = totalWidth - _this.originalTable.el.outerWidth(); - widthArr[0] -= difference; - } - // one extra px on right and left side - totalWidth += 2 - - var sortableHtml = '
      '; - // assemble the needed html - thtb.find('> tr > th').each(function(i, v) { - var width_li = $(this).is(':visible') ? $(this).outerWidth() : 0; - sortableHtml += '
    • '; - sortableHtml += ''; - var row = thtb.find('> tr > th:nth-child(' + (i + 1) + ')'); - if (_this.options.maxMovingRows > 1) { - row = row.add(thtb.find('> tr > td:nth-child(' + (i + 1) + ')').slice(0, _this.options.maxMovingRows - 1)); - } - row.each(function(j) { - // TODO: May cause duplicate style-Attribute - var row_content = $(this).clone().wrap('
      ').parent().html(); - if (row_content.toLowerCase().indexOf(''; - sortableHtml += row_content; - if (row_content.toLowerCase().indexOf(' li > table').each(function(i, v) { - $(this).css('width', widthArr[i] + 'px'); - }); - - // assign this.sortableTable.selectedHandle - this.sortableTable.selectedHandle = this.sortableTable.el.find('th .dragtable-handle-selected'); - - var items = !this.options.dragaccept ? 'li' : 'li:has(' + this.options.dragaccept + ')'; - this.sortableTable.el.sortable({ - items: items, - stop: this._rearrangeTable(), - // pass thru options for sortable widget - revert: this.options.revert, - tolerance: this.options.tolerance, - containment: this.options.containment, - cursor: this.options.cursor, - cursorAt: this.options.cursorAt, - distance: this.options.distance, - axis: this.options.axis - }); - - // assign start index - this.originalTable.startIndex = $(e.target).closest('th').prevAll().length + 1; - - this.options.beforeMoving(this.originalTable, this.sortableTable); - // Start moving by delegating the original event to the new sortable table - this.sortableTable.movingRow = this.sortableTable.el.find('> li:nth-child(' + this.originalTable.startIndex + ')'); - - // prevent the user from drag selecting "highlighting" surrounding page elements - disableTextSelection(); - // clone the initial event and trigger the sort with it - this.sortableTable.movingRow.trigger($.extend($.Event(e.type), { - which: 1, - clientX: e.clientX, - clientY: e.clientY, - pageX: e.pageX, - pageY: e.pageY, - screenX: e.screenX, - screenY: e.screenY - })); - - // Some inner divs to deliver the posibillity to style the placeholder more sophisticated - var placeholder = this.sortableTable.el.find('.ui-sortable-placeholder'); - if(!placeholder.height() <= 0) { - placeholder.css('height', this.sortableTable.el.find('.ui-sortable-helper').height()); - } - - placeholder.html('
      '); - }, - bindTo: {}, - _create: function() { - this.originalTable = { - el: this.element, - selectedHandle: $(), - sortOrder: {}, - startIndex: 0, - endIndex: 0 - }; - // bind draggable to 'th' by default - this.bindTo = this.originalTable.el.find('th'); - // filter only the cols that are accepted - if (this.options.dragaccept) { - this.bindTo = this.bindTo.filter(this.options.dragaccept); - } - // bind draggable to handle if exists - if (this.bindTo.find(this.options.dragHandle).length > 0) { - this.bindTo = this.bindTo.find(this.options.dragHandle); - } - // restore state if necessary - if (this.options.restoreState !== null) { - $.isFunction(this.options.restoreState) ? this.options.restoreState(this.originalTable) : this._restoreState(this.options.restoreState); - } - var _this = this; - this.bindTo.mousedown(function(evt) { - // listen only to left mouse click - if(evt.which!==1) return; - if (_this.options.beforeStart(_this.originalTable) === false) { - return; - } - clearTimeout(this.downTimer); - this.downTimer = setTimeout(function() { - _this.originalTable.selectedHandle = $(this); - _this.originalTable.selectedHandle.addClass('dragtable-handle-selected'); - _this._generateSortable(evt); - }, _this.options.clickDelay); - }).mouseup(function(evt) { - clearTimeout(this.downTimer); - }); - }, - redraw: function(){ - this.destroy(); - this._create(); - }, - destroy: function() { - this.bindTo.unbind('mousedown'); - $.Widget.prototype.destroy.apply(this, arguments); // default destroy - // now do other stuff particular to this widget - } - }); - - /** closure-scoped "private" functions **/ - - var body_onselectstart_save = $(document.body).attr('onselectstart'), - body_unselectable_save = $(document.body).attr('unselectable'); - - // css properties to disable user-select on the body tag by appending a '); - $(document.head).append($style); - $(document.body).attr('onselectstart', 'return false;').attr('unselectable', 'on'); - if (window.getSelection) { - window.getSelection().removeAllRanges(); - } else { - document.selection.empty(); // MSIE http://msdn.microsoft.com/en-us/library/ms535869%28v=VS.85%29.aspx - } - } - - // remove the