code_manager.js
2 years ago
code_manager_dashboard.js
2 years ago
code_manager_listmode.js
2 years ago
code_manager_message.js
2 years ago
code_manager_tabmode.js
2 years ago
notify.min.js
2 years ago
code_manager_dashboard.js
67 lines
| 1 | function showMenu() { |
| 2 | if (jQuery("#wpcontent").width()<690) { |
| 3 | jQuery("#cm-dashboard").hide(); |
| 4 | jQuery("#cm-dashboard-mobile").fadeIn(400); |
| 5 | } else { |
| 6 | if (jQuery("#wpcontent").width()<800) { |
| 7 | wd = 46; |
| 8 | fs = 24; |
| 9 | tx = 7; |
| 10 | } else if (jQuery("#wpcontent").width()<860) { |
| 11 | wd = 54; |
| 12 | fs = 30; |
| 13 | tx = 8; |
| 14 | } else { |
| 15 | wd = 62; |
| 16 | fs = 32; |
| 17 | tx = 9; |
| 18 | } |
| 19 | |
| 20 | jQuery("#cm-dashboard .cm-dashboard .cm-dashboard-group .cm-dashboard-item").css("width", wd + "px"); |
| 21 | jQuery("#cm-dashboard .cm-dashboard .cm-dashboard-group .cm-dashboard-item .label").css("font-size", tx + "px"); |
| 22 | |
| 23 | jQuery("#cm-dashboard-mobile").hide(); |
| 24 | jQuery("#cm-dashboard").fadeIn(400); |
| 25 | |
| 26 | jQuery(".cm_tooltip").tooltip({ |
| 27 | tooltipClass: "cm_tooltip_css", |
| 28 | }); |
| 29 | jQuery(".cm_tooltip_icons").tooltip({ |
| 30 | tooltipClass: "cm_tooltip_icons_css", |
| 31 | position: { |
| 32 | my: "center bottom-18", |
| 33 | at: "center top", |
| 34 | using: function (position, feedback) { |
| 35 | jQuery(this).css(position); |
| 36 | jQuery("<div>") |
| 37 | .addClass("arrow") |
| 38 | .addClass(feedback.vertical) |
| 39 | .addClass(feedback.horizontal) |
| 40 | .appendTo(this); |
| 41 | } |
| 42 | } |
| 43 | }); |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | function toggleMenu() { |
| 48 | if (jQuery("#cm-dashboard-mobile ul").is(":visible")) { |
| 49 | jQuery("#cm-dashboard-mobile ul").hide(); |
| 50 | } else { |
| 51 | jQuery("#cm-dashboard-mobile ul").show(); |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | function toggleDashboard() { |
| 56 | if (jQuery("#screen-meta").css("display")==="block") { |
| 57 | jQuery("#cm-dashboard").hide(); |
| 58 | jQuery("#cm-dashboard-mobile").hide(); |
| 59 | } else { |
| 60 | showMenu(); |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | jQuery(function() { |
| 65 | jQuery(window).on("resize", function() { showMenu() }); |
| 66 | showMenu(); |
| 67 | }); |