diff options
author | Pavel Zuna <pzuna@redhat.com> | 2010-08-17 14:26:36 -0400 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2010-08-17 14:26:36 -0400 |
commit | 6b63ab1c3240e41dd77ef2df312618f3e9cf0097 (patch) | |
tree | eefe5dddf301c3996a30d38cb8cd108cd96bca7d /install/static/index.xhtml | |
parent | 2f4f9054aac8bef83272d690a4868653a3a5bd0d (diff) | |
download | freeipa.git-6b63ab1c3240e41dd77ef2df312618f3e9cf0097.tar.gz freeipa.git-6b63ab1c3240e41dd77ef2df312618f3e9cf0097.tar.xz freeipa.git-6b63ab1c3240e41dd77ef2df312618f3e9cf0097.zip |
Clean ipa.js and make it load plugin meta-data over JSON-RPC.
What it means?
Well, first I removed some development control variables from ipa.js.
Namely useSampleData and sizelimit. I moved useSampleData to the top
of index.xhtml. This way we won't forget about it when we don't need
it anymore. sizelimit has nothing to do in ipa.js and be hardcoded
for ALL commands! Some don't have this parameter and could fail.
Since ipa_init now loads meta-data over JSON-RPC, we need to wait for
it to finish its job. That's why I put a second parameter to ipa_init:
on_win. ipa_init will call on_win when all data is loaded properly and
we can start building the page.
Diffstat (limited to 'install/static/index.xhtml')
-rw-r--r-- | install/static/index.xhtml | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/install/static/index.xhtml b/install/static/index.xhtml index b22a5bac..e94e6d18 100644 --- a/install/static/index.xhtml +++ b/install/static/index.xhtml @@ -7,6 +7,14 @@ <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery.cookie.js"></script> + + <script type="text/javascript"> + /* the develop.js file that follows will set this to true. + that file should only exist in the source file system + and should not get deployed to the web server */ + var useSampleData = false; + </script> + <script type="text/javascript" src="ipa.js" /> <script type="text/javascript" src="pageparams.js" /> @@ -25,7 +33,10 @@ <script type="text/javascript"> $(document).ready(function(){ - buildNavigation(); + if (useSampleData) + ipa_init(sampleData, buildNavigation); + else + ipa_init(null, buildNavigation); }); </script> @@ -49,8 +60,8 @@ </div> <div id="search" style="visibility:hidden"> - <div id="searchControls" class="searchControls" > - <span id="filter" class="filter" > + <div class="searchControls" > + <span class="filter" > <input id="queryFilter" type="text"/> <input id="query" type="submit" value="find" /> <input id="new" type="submit" value="new" /> |