Advertisement
jamboljack

Inbox.js

Nov 2nd, 2016
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var loadInbox = function (el, name) {
  2.         var url = '<?php echo base_url(); ?>member/ticket_view.php';
  3.         var title = $('.inbox-nav > li.' + name + ' a').attr('data-title');
  4.         listListing = name;
  5.  
  6.         loading.show();
  7.         content.html('');
  8.         toggleButton(el);
  9.  
  10.         $.ajax({
  11.             type: "GET",
  12.             cache: false,
  13.             url: url,
  14.             dataType: "html",
  15.             success: function(res)
  16.             {
  17.                 toggleButton(el);
  18.  
  19.                 $('.inbox-nav > li.active').removeClass('active');
  20.                 $('.inbox-nav > li.' + name).addClass('active');
  21.                 $('.inbox-header > h1').text(title);
  22.  
  23.                 loading.hide();
  24.                 content.html(res);
  25.                 if (Layout.fixContentHeight) {
  26.                     Layout.fixContentHeight();
  27.                 }
  28.                 Metronic.initUniform();
  29.             },
  30.             error: function(xhr, ajaxOptions, thrownError)
  31.             {
  32.                 toggleButton(el);
  33.             },
  34.             async: false
  35.         });
  36.  
  37.         // handle group checkbox:
  38.         jQuery('body').on('change', '.mail-group-checkbox', function () {
  39.             var set = jQuery('.mail-checkbox');
  40.             var checked = jQuery(this).is(":checked");
  41.             jQuery(set).each(function () {
  42.                 $(this).attr("checked", checked);
  43.             });
  44.             jQuery.uniform.update(set);
  45.         });
  46.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement