+
+ {% if theme == "fed4fire" %}
+ function drawProjects(projects){
+ var items = [];
+
+ $.each( projects, function(i, val) {
+ items.push( "<li><a href=\"/portal/project/"+val+"\">" + val + "</a></li>" );
+ });
+ $("div#home-project-list").html($( "<ul/>", { html: items.join( "" ) }));
+ $("ul#dropdown-project-list").append(items.join( "" ));
+ }
+ function drawProjectsTree(projects,slices) {
+ var items = [];
+ var items_sl = [];
+ $.each( projects, function(i, p) {
+ $.each( slices, function(y, s) {
+ console.log(escapeRegExp(p));
+ if (s.match('^' + escapeRegExp(p))) {
+ items_sl.push( "<li><a href=\"/resources/" + s + "\">" + s.replace(p + '.','') + "</a></li>" );
+ }
+ });
+ el = "<li><a href=\"/portal/project/" + p + "\">" + p + "</a>";
+ if (items_sl.length > 0) {
+ el += "<ul>" + items_sl.join( "" ) + "</ul>";
+ }
+ el += "</li>";
+ items.push(el);
+ items_sl = [];
+ });
+ $("div#home-project-tree").html($( "<ul/>", { html: items.join( "" ) }));
+ if (projects.length > 0) {
+ $('.dashboard-create-slice').show();
+ }
+ }
+
+ window.setTimeout(function() {
+ $('.projects-loading').hide();
+ },10000);