From 21b47541a9762301e6199d1ff2bb95c44ee45d13 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Fri, 9 Dec 2011 11:40:13 -0800 Subject: [PATCH] cloudstack 3.0 new UI - template page, ISO page - filter in listView - move featured option to be on top. --- ui/scripts/templates.js | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/ui/scripts/templates.js b/ui/scripts/templates.js index af7ce0e71dc..e698f862f7c 100644 --- a/ui/scripts/templates.js +++ b/ui/scripts/templates.js @@ -13,10 +13,10 @@ listView: { id: 'templates', label: 'Templates', - filters: { - mine: { label: 'Mine' }, + filters: { featured: { label: 'Featured' }, - community: { label: 'Community' } + community: { label: 'Community' }, + mine: { label: 'Mine' } }, fields: { name: { label: 'Name' }, @@ -455,16 +455,16 @@ var array1 = []; if(args.filterBy != null) { if(args.filterBy.kind != null) { - switch(args.filterBy.kind) { - case "mine": - array1.push("&templatefilter=self"); - break; + switch(args.filterBy.kind) { case "featured": array1.push("&templatefilter=featured"); break; case "community": array1.push("&templatefilter=community"); - break; + break; + case "mine": + array1.push("&templatefilter=self"); + break; } } if(args.filterBy.search != null && args.filterBy.search.by != null && args.filterBy.search.value != null) { @@ -788,10 +788,10 @@ title: 'ISOs', listView: { label: 'ISOs', - filters: { - mine: { label: 'Mine' }, + filters: { featured: { label: 'Featured' }, - community: { label: 'Community' } + community: { label: 'Community' }, + mine: { label: 'Mine' } }, fields: { displaytext: { label: 'Name' }, @@ -1119,16 +1119,16 @@ var array1 = []; if(args.filterBy != null) { if(args.filterBy.kind != null) { - switch(args.filterBy.kind) { - case "mine": - array1.push("&isofilter=self"); - break; + switch(args.filterBy.kind) { case "featured": array1.push("&isofilter=featured"); break; case "community": array1.push("&isofilter=community"); - break; + break; + case "mine": + array1.push("&isofilter=self"); + break; } } if(args.filterBy.search != null && args.filterBy.search.by != null && args.filterBy.search.value != null) {