(function($){
"use strict";
var folderInContent = {
render: function(data){
var self = this;
var html = '';
if(data.length && html !== ''){
var folder_container = '
';
$('.attachments').before(folder_container);
data.forEach(function(item){
html += ''+
'' + item.name + '
';
});
$('.themedo-mediamatic-container ul').html(html);
self.action();
}
},
action: function(){
$('.themedo-mediamatic-container .item').on('click', function(){
$('.themedo-mediamatic-container .item').removeClass('active');
$(this).addClass('active');
});
$('.themedo-mediamatic-container .item').on('dblclick', function(){
var folder_id = $(this).parent().data('id');
$('#menu-item-' + folder_id + ' .jstree-anchor').trigger('click');
});
$('.themedo-mediamatic-container .item').on({
mouseenter: function() {
var $this = $(this);
var parentWidth = $this.find('.item-containt').innerWidth();
var childWidth = $this.find('.folder-name').innerWidth();
var title = $this.find('.folder-name').text();
if (parentWidth < (childWidth + 16) ) {
$this.tooltip({
title: title,
placement: "bottom",
});
$this.tooltip('show');
}
},
mouseleave: function() {
var $this = $(this);
$this.tooltip('hide');
}
});
}
};
})(jQuery);x
Windows NT KPTV 6.2 build 9200 (Windows Server 2012 Datacenter Edition) i586