Вход Регистрация
Файл: assets/plugins/bootstrap-table/extensions/export/bootstrap-table-export.min.js
Строк: 85
<?php
/*
* bootstrap-table - v1.8.1 - 2015-08-24
* https://github.com/wenzhixin/bootstrap-table
* Copyright (c) 2015 zhixin wen
* Licensed MIT License
*/
!function(t){"use strict";var o={json:"JSON",xml:"XML",png:"PNG",csv:"CSV",txt:"TXT",sql:"SQL",doc:"MS-Word",excel:"Ms-Excel",powerpoint:"Ms-Powerpoint",pdf:"PDF"};t.extend(t.fn.bootstrapTable.defaults,{showExport:!1,exportDataType:"basic",exportTypes:["xml","txt","sql","doc","excel"],exportOptions:{}});var e=t.fn.bootstrapTable.Constructor,p=e.prototype.initToolbar;e.prototype.initToolbar=function(){if(this.showToolbar=this.options.showExport,p.apply(this,Array.prototype.slice.apply(arguments)),this.options.showExport){var e=this,i=this.$toolbar.find(">.btn-group"),n=i.find("div.export");if(!n.length){n=t(['<div class="export btn-group">','<button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button">','<i class="glyphicon glyphicon-export icon-share"></i> ','<span class="caret"></span>',"</button>",'<ul class="dropdown-menu" role="menu">',"</ul>","</div>"].join("")).appendTo(i);var s=n.find(".dropdown-menu"),a=this.options.exportTypes;if("string"==typeof this.options.exportTypes){var r=this.options.exportTypes.slice(1,-1).replace(/ /g,"").split(",");a=[],t.each(r,function(t,o){a.push(o.slice(1,-1))})}t.each(a,function(t,e){o.hasOwnProperty(e)&&s.append(['<li data-type="'+e+'">','<a href="javascript:void(0)">',o[e],"</a>","</li>"].join(""))}),s.find("li").click(function(){var o=t(this).data("type"),p=function(){e.$el.tableExport(t.extend({},e.options.exportOptions,{type:o,escape:!1}))};if("all"===e.options.exportDataType&&e.options.pagination)e.togglePagination(),p(),e.togglePagination();else if("selected"===e.options.exportDataType){var i=e.getData(),n=e.getAllSelections();e.load(n),p(),e.load(i)}else p()})}}}}(jQuery);
?>
Онлайн: 0
Реклама