You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

6 lines
1.6 KiB

/*!
* remark (http://getbootstrapadmin.com/remark)
* Copyright 2016 amazingsurge
* Licensed under the Themeforest Standard Licenses
*/
!function(window,document,$){"use strict";$.site.sidebar={init:function(){"undefined"!=typeof $.slidePanel&&($(document).on("click",'[data-toggle="site-sidebar"]',function(){var $this=$(this),direction="right";$("body").hasClass("site-menubar-flipped")&&(direction="left");var defaults=$.components.getDefaults("slidePanel"),options=$.extend({},defaults,{direction:direction,skin:"site-sidebar",dragTolerance:80,template:function(options){return'<div class="'+options.classes.base+" "+options.classes.base+"-"+options.direction+'"><div class="'+options.classes.content+' site-sidebar-content"></div><div class="slidePanel-handler"></div></div>'},afterLoad:function(){var self=this;this.$panel.find(".tab-pane").asScrollable({namespace:"scrollable",contentSelector:"> div",containerSelector:"> div"}),$.components.init("switchery",self.$panel),this.$panel.on("shown.bs.tab",function(){self.$panel.find(".tab-pane.active").asScrollable("update")})},beforeShow:function(){$this.hasClass("active")||$this.addClass("active")},afterHide:function(){$this.hasClass("active")&&$this.removeClass("active")}});if($this.hasClass("active"))$.slidePanel.hide();else{var url=$this.data("url");url||(url=$this.attr("href"),url=url&&url.replace(/.*(?=#[^\s]*$)/,"")),$.slidePanel.show({url:url},options)}}),$(document).on("click",'[data-toggle="show-chat"]',function(){$("#conversation").addClass("active")}),$(document).on("click",'[data-toggle="close-chat"]',function(){$("#conversation").removeClass("active")}))}}}(window,document,jQuery);