summaryrefslogtreecommitdiffstats
path: root/install/static/navigation.js
diff options
context:
space:
mode:
authorAdam Young <ayoung@redhat.com>2010-08-19 20:48:21 -0400
committerAdam Young <ayoung@redhat.com>2010-08-19 20:49:14 -0400
commit12ee9365a7a08c7a45887b98f17a44c64d7eb5f0 (patch)
tree838143295e68b8c8e334272a12e682708b427032 /install/static/navigation.js
parent9a160275351c5763209346466a331b06546ac0e0 (diff)
downloadfreeipa-12ee9365a7a08c7a45887b98f17a44c64d7eb5f0.tar.gz
freeipa-12ee9365a7a08c7a45887b98f17a44c64d7eb5f0.tar.xz
freeipa-12ee9365a7a08c7a45887b98f17a44c64d7eb5f0.zip
Changes the URL parsing from standard HTML params ( starting with ?)
to hash params ( starting with # ). User Details are now part of index.xhtml, ao one more .inc file has been removed. Updated commit to catch a few things that had been left out, including sampledata handling and updateing Makefile.am
Diffstat (limited to 'install/static/navigation.js')
-rw-r--r--install/static/navigation.js46
1 files changed, 40 insertions, 6 deletions
diff --git a/install/static/navigation.js b/install/static/navigation.js
index 10c168149..93ee4215d 100644
--- a/install/static/navigation.js
+++ b/install/static/navigation.js
@@ -16,7 +16,7 @@ function unimplemented(facet){
}
function buildNavigation(){
- params= getPageParams();
+ params= ipa_parse_qs();
var tab = params["tab"];
if (!tab){
@@ -107,10 +107,9 @@ function buildNavigation(){
currentMain.setup(facet);
}
- sampleData = "sampledata/whoami.json";
var whoami = $.cookie("whoami");
if (whoami == null){
- ipa_cmd( 'whoami', [], {}, whoamiSuccess);
+ ipa_cmd( 'whoami', [], {}, whoamiSuccess, null,null, "sampledata/whoami.json");
}else{
setLoggedInText(whoami);
}
@@ -145,14 +144,49 @@ function setActiveSubtab(){
netgroup:setupNetgroup,
};
-
-
-
var subtabName = this.id.substring("subtab-".length);
$(".sub-nav-on").removeClass('sub-nav-on').addClass("sub-nav-off")
var active = "#span-subtab-"+subtabName;
$(active).removeClass('sub-nav-off').addClass("sub-nav-on")
setupFunctions[subtabName]();
+}
+
+function clearOld(){
+ $('#searchResultsTable thead').html("");
+ $('#searchResultsTable tfoot').html("");
+ $('#searchResultsTable tbody').find("tr").remove();
+ $("#searchButtons").html("");
+
+ $('#content').html("");
+
+ //remove old details
+ $('.entryattrs dd').remove();
+ $('#detail-lists').html("<hr/>");
+
+}
+
+
+
+function showSearch(){
+ $('#content').css("display","none");
+ $('#details').css("display","none");
+ clearOld();
+ $('#search').css("display","block");
+ $("#filter").css("display","block");
+}
+
+function showContent(){
+ $('#search').css("display","none");
+ $('#details').css("display","none");
+ clearOld();
+ $('#content').css("display","block");
+}
+
+function showDetails(){
+ $('#search').css("display","none");
+ $('#content').css("display","none");
+ clearOld();
+ $('#details').css("display","block");
}