Вход Регистрация
Файл: assets/plugins/bootstrap-table/bootstrap-table-custom.sessions.min.js
Строк: 96
<?php
/*!
 * CIFullcalendar bootstrap-table plugin 
 * @author: Sir.Dre
 * Docs & License: http://www.cifullcalendar.com
 * (c) 2016 CIFullcalendar 
 */
function getIdSelections(){return $.map($table.bootstrapTable("getSelections"),function(e){return $params={id:e.id,hash:e.token?e.token:""},$.ajax({url:"./sessionlist/del_selected/",type:"POST",data:$params,complete:function(t){console.log(e.id)}}),e.id})}function responseHandler(e){return $.each(e.rows,function(e,t){t.state=-1!==$.inArray(t.id,selections)}),e}function detailFormatter(e,t){var o=[];return $.each(t,function(e,t){o.push("<p><b>"+e+":</b> "+t+"</p>")}),o.join("")}function totalNameFormatter(e){return e.length}function totalFormatter(e){var t=0;return $.each(e,function(e,o){t+=+o.id}),t}function timestampFormatter(e,t){var o=moment.unix(t.timestamp),a=o.format("MMM-DD-YYYY h:mm:ss a");return'<i class="fa fa-clock-o hidden-xs hidden-md"></i>&nbsp;'+a}var allsessions_url=window.location.protocol+"//"+window.location.host+window.location.pathname.replace("/index.php","")+"/get_allsessions",$table=$("#allsessions_dataTable"),$remove=$("#remove-data"),selections=[];!function(e){"use strict";if("function"==typeof define&&define.amd)define(["jquery"],e);else if("object"==typeof exports)e(require("jquery"));else{if("undefined"==typeof jQuery)throw"bootstrap-table requires jQuery to be loaded first";e(jQuery)}}(function(e){$table.bootstrapTable({method:"get",url:allsessions_url,sidepagination:"server",pagination:!0,handler:"responseHandler",search:!0,showRefresh:!0,showColumns:!0,pageSize:5,pageList:[5,10,25,50,100,200,300,500,800,900,1e3,1500,3e3,5e3,7e3,9e3,12e3,15e3,2e4,"ALL"]}),setTimeout(function(){$table.bootstrapTable("resetView")},200),$table.on("check.bs.table uncheck.bs.table check-all.bs.table uncheck-all.bs.table",function(){$remove.prop("disabled",!$table.bootstrapTable("getSelections").length)}),$remove.click(function(){var e=getIdSelections();$table.bootstrapTable("remove",{field:"id",values:e}),$remove.prop("disabled",!0)})});
?>
Онлайн: 0
Реклама