| 12345678910 |
- /**
- * bootstrap-table - An extended Bootstrap table with radio, checkbox, sort, pagination, and other added features. (supports twitter bootstrap v2 and v3).
- *
- * @version v1.13.1
- * @homepage http://bootstrap-table.wenzhixin.net.cn
- * @author wenzhixin <wenzhixin2010@gmail.com> (http://wenzhixin.net.cn/)
- * @license MIT
- */
- (function(a,b){if('function'==typeof define&&define.amd)define([],b);else if('undefined'!=typeof exports)b();else{b(),a.bootstrapTableAngular={exports:{}}.exports}})(this,function(){'use strict';(function(){'undefined'==typeof angular||angular.module('bsTable',[]).constant('uiBsTables',{bsTables:{}}).directive('bsTableControl',['uiBsTables',function(a){function b(a){var b;return $.each(f,function(c,e){if(e.$el.closest(d).has(a).length)return b=e,!0}),b}function c(){var a=this,b=a.$s.bsTableControl.state;a.$s.$applyAsync(function(){b.scroll=a.$el.bootstrapTable('getScrollPosition')})}var d='.bootstrap-table',e='.search input',f=a.bsTables;return $(window).resize(function(){$.each(f,function(a,b){b.$el.bootstrapTable('resetView')})}),$(document).on('post-header.bs.table',d+' table',function(a){var e=b(a.target);e&&e.$el.closest(d).find('.fixed-table-body').on('scroll',c.bind(e))}).on('sort.bs.table',d+' table',function(a,c,d){var e=b(a.target);if(e){var f=e.$s.bsTableControl.state;e.$s.$applyAsync(function(){f.sortName=c,f.sortOrder=d})}}).on('page-change.bs.table',d+' table',function(a,c,d){var e=b(a.target);if(e){var f=e.$s.bsTableControl.state;e.$s.$applyAsync(function(){f.pageNumber=c,f.pageSize=d})}}).on('search.bs.table',d+' table',function(a,c){var d=b(a.target);if(d){var e=d.$s.bsTableControl.state;d.$s.$applyAsync(function(){e.searchText=c})}}).on('focus blur',d+' '+e,function(a){var c=b(a.target);if(c){var d=c.$s.bsTableControl.state;c.$s.$applyAsync(function(){d.searchHasFocus=$(a.target).is(':focus')})}}),{restrict:'EA',scope:{bsTableControl:'='},link:function(a,b){f[a.$id]={$s:a,$el:b};a.instantiated=!1,a.$watch('bsTableControl.options',function(c){c||(c=a.bsTableControl.options={});var f=a.bsTableControl.state||{};a.instantiated&&b.bootstrapTable('destroy'),b.bootstrapTable(angular.extend(angular.copy(c),f)),a.instantiated=!0,'scroll'in f&&b.bootstrapTable('scrollTo',f.scroll),'searchHasFocus'in f&&b.closest(d).find(e).focus()},!0),a.$watch('bsTableControl.state',function(c){c||(c=a.bsTableControl.state={}),b.trigger('directive-updated.bs.table',[c])},!0),a.$on('$destroy',function(){delete f[a.$id]})}}}])})()});
|