Changeset 2297086
- Timestamp:
- 05/03/2020 02:18:11 PM (6 years ago)
- Location:
- mediamatic/trunk
- Files:
-
- 4 edited
-
assets/js/folder-in-content.js (modified) (1 diff)
-
assets/js/trigger-folder.js (modified) (1 diff)
-
mediamatic.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
mediamatic/trunk/assets/js/folder-in-content.js
r2161922 r2297086 1 var themedo_folder_in_content = {};2 1 (function($){ 3 2 "use strict"; 4 3 5 themedo_folder_in_content.render = function(data){ 4 var folderInContent = { 5 6 render: function(data){ 7 8 var self = this; 9 var html = ''; 6 10 7 var html = '';11 if(data.length && html !== ''){ 8 12 9 if(data.length && html !== ''){ 13 var folder_container = '<div class="themedo-mediamatic-container"><ul></ul></div>'; 14 $('.attachments').before(folder_container); 15 data.forEach(function(item){ 10 16 11 var folder_container = '<div class="themedo-mediamatic-container"><ul></ul></div>'; 17 html += '<li data-id="'+item.term_id+'"><div class="item jstree-anchor"><span class="icon"></span><span class="item-containt">'+ 18 '<span class="folder-name">' + item.name + '</span></span></div></li>'; 12 19 13 $('.attachments').before(folder_container); 14 15 data.forEach(function(item){ 16 17 html += '<li data-id="'+item.term_id+'"><div class="item jstree-anchor"><span class="icon"></span><span class="item-containt">'+ 18 '<span class="folder-name">' + item.name + '</span></span></div></li>'; 19 20 }); 21 $('.themedo-mediamatic-container ul').html(html); 22 self.action(); 23 } 24 }, 25 26 27 action: function(){ 28 $('.themedo-mediamatic-container .item').on('click', function(){ 29 $('.themedo-mediamatic-container .item').removeClass('active'); 30 $(this).addClass('active'); 31 }); 32 $('.themedo-mediamatic-container .item').on('dblclick', function(){ 33 var folder_id = $(this).parent().data('id'); 34 $('#menu-item-' + folder_id + ' .jstree-anchor').trigger('click'); 20 35 }); 21 36 22 $('.themedo-mediamatic-container ul').html(html); 37 $('.themedo-mediamatic-container .item').on({ 38 mouseenter: function() { 39 var $this = $(this); 40 var parentWidth = $this.find('.item-containt').innerWidth(); 41 var childWidth = $this.find('.folder-name').innerWidth(); 42 var title = $this.find('.folder-name').text(); 43 if (parentWidth < (childWidth + 16) ) { 44 $this.tooltip({ 45 title: title, 46 placement: "bottom", 47 }); 23 48 24 themedo_folder_in_content.action(); 49 $this.tooltip('show'); 50 } 51 }, 25 52 53 mouseleave: function() { 54 var $this = $(this); 55 $this.tooltip('hide'); 56 } 57 }); 26 58 } 27 59 28 60 }; 29 61 30 themedo_folder_in_content.action = function(){31 $('.themedo-mediamatic-container .item').on('click', function(){32 $('.themedo-mediamatic-container .item').removeClass('active');33 34 $(this).addClass('active');35 });36 $('.themedo-mediamatic-container .item').on('dblclick', function(){37 var folder_id = $(this).parent().data('id');38 $('#menu-item-' + folder_id + ' .jstree-anchor').trigger('click');39 });40 41 $('.themedo-mediamatic-container .item').on({42 43 mouseenter: function() {44 45 var $this = $(this);46 var parentWidth = $this.find('.item-containt').innerWidth();47 var childWidth = $this.find('.folder-name').innerWidth();48 var title = $this.find('.folder-name').text();49 if (parentWidth < (childWidth + 16) ) {50 51 $this.tooltip({52 title: title,53 placement: "bottom",54 });55 56 $this.tooltip('show');57 58 }59 60 },61 62 mouseleave: function() {63 64 var $this = $(this);65 $this.tooltip('hide');66 67 }68 69 });70 };71 72 73 62 })(jQuery); -
mediamatic/trunk/assets/js/trigger-folder.js
r2288307 r2297086 411 411 }).success(function (response) { 412 412 413 themedo_folder_in_content.render(response.data);413 folderInContent.render(response.data); 414 414 }); 415 415 -
mediamatic/trunk/mediamatic.php
r2288307 r2297086 4 4 * Plugin URI: http://mediamatic.frenify.com/1/ 5 5 * Description: Get organized with thousands of images. Organize media into folders. 6 * Version: 1. 86 * Version: 1.9 7 7 * Author: plugincraft 8 8 * Author URI: http://mediamatic.frenify.com/1/ -
mediamatic/trunk/readme.txt
r2288315 r2297086 95 95 == Changelog == 96 96 97 = 1.9 - May 03, 2020 = 98 - Improved: Some javascript files 99 97 100 = 1.8 - April 21, 2020 = 98 101 - Fixed: Uncategorize count issue is fixed
Note: See TracChangeset
for help on using the changeset viewer.