| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- $(document).ready(function () {
- if ($('#totalPage').val() > 0) {
- $('.nullData').hide();
- $('.pestBtn').show();
- $('.delbox .batchesBtn').show();
- } else {
- $('.nullData').show();
- $('.pestBtn').hide();
- $('.delbox .batchesBtn').hide();
- $('#page').parent().hide();
- }
- $('.popup-gallery').magnificPopup({
- delegate: '.popupA',
- type: 'image',
- tLoading: 'Loading image ......',
- mainClass: 'mfp-img-mobile',
- gallery: {
- enabled: true,
- navigateByImgClick: true,
- preload: [0, 1], // Will preload 0 - before current, and 1 after the current image
- arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>', // markup of an arrow button
- tPrev: 'Previous (Left arrow key)', // title for left button
- tNext: 'Next (Right arrow key)', // title for right button
- tCounter: '<span class="mfp-counter">%curr% of %total%</span>' // 标记的计数器
- },
- image: {
- tError: '<a href="%url%">The image #%curr%</a> could not be loaded.',
- titleSrc: function (item) {
- return item.el.attr('title') + '<small></small>';
- }
- }
- });
- // 添加描述
- $('.addDetial').magnificPopup({
- type: 'inline',
- closeOnBgClick:false,
- midClick: true,
- callbacks: {
- open: function () {
- // 当前选中项
- var item = this.currItem.el[0];
- var addr = $(item).parent().find('img').attr('src');
- $('#imgPath').val(addr);
- $.ajax({
- url: 'bzy_describe_img',
- type: 'get',
- data: {addr: addr },
- dataType:'json',
- success: function (data) {
- if(data){
- $('.pupopBody textarea[name="describe"]').val(data);
- }
- }
- })
- }
- }
- });
-
- })
- // 自动识别
- // function autoSeeWormType(obj){
- // var addr = $(obj).parent().find('img').attr('src');
- // }
|