{#include main} {#style} .clearCacheIcon:hover { color: #3366ac !important; cursor: pointer; } .refreshCacheIcon:hover { color: #3366ac !important; cursor: pointer; } {/style} {#script} function refreshCache(cacheName){ $.post("", { name: cacheName, action: "refresh" }, function(data, status){ if(status === "success"){ updateSize(data,cacheName); } }); } function clearCache(cacheName){ $.post("", { name: cacheName, action: "clearCache" }, function(data, status){ if(status === "success"){ updateSize(data,cacheName); changeBackgroundColor("#76be6b", cacheName); }else{ changeBackgroundColor("#ff6366", cacheName); } }); } function updateSize(data, cacheName){ var r = JSON.parse(data); var spanId = 'size-' + cacheName; $('#' + spanId).html(r.size); } function changeBackgroundColor(color, cacheName){ var className = 'tr-' + cacheName; var element = $('#' + className); var x = 3000; var originalColor = element.css("background-color"); element.css("background", color); setTimeout(function(){ element.css("background", originalColor); }, x); } {/script} {#title}Caches{/title} {#body}

Name | Size
--- | ---
{#for cacheInfo in info:cacheInfos}
{cacheInfo.name} | {cacheInfo.size} {/for}

{/body} {/include}