summaryrefslogtreecommitdiffstats
path: root/install/static/ipa.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/ipa.js
parent9a160275351c5763209346466a331b06546ac0e0 (diff)
downloadfreeipa.git-12ee9365a7a08c7a45887b98f17a44c64d7eb5f0.tar.gz
freeipa.git-12ee9365a7a08c7a45887b98f17a44c64d7eb5f0.tar.xz
freeipa.git-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/ipa.js')
-rw-r--r--install/static/ipa.js21
1 files changed, 19 insertions, 2 deletions
diff --git a/install/static/ipa.js b/install/static/ipa.js
index d1f9fe59..1e323836 100644
--- a/install/static/ipa.js
+++ b/install/static/ipa.js
@@ -30,6 +30,12 @@ var _ipa_init_on_win_callback = null;
/* initialize the IPA JSON-RPC helper
* arguments:
* url - JSON-RPC URL to use (optional) */
+
+/*Query String*/
+var qs;
+
+
+
function ipa_init(url, on_win)
{
if (!url)
@@ -65,12 +71,23 @@ function _ipa_load_objs(data, textStatus, xhr)
* win_callback - function to call if the JSON request succeeds
* fail_callback - function to call if the JSON request fails
* objname - name of an IPA object (optional) */
-function ipa_cmd(name, args, options, win_callback, fail_callback, objname)
+function ipa_cmd(name, args, options, win_callback, fail_callback, objname,sampleData)
{
id = ipa_jsonrpc_id++;
if (objname)
name = objname + '_' + name;
+ if (useSampleData && sampleData){
+ var ajax_options = {
+ url: sampleData,
+ type: 'POST',
+ contentType: 'application/json',
+ dataType: 'json',
+ processData: false,
+ };
+ $.ajaxSetup(ajax_options);
+ }
+
var data = {
method: name,
params: [args, options],
@@ -96,7 +113,7 @@ function ipa_parse_qs(qs)
var dict = {};
if (!qs)
- qs = location.search.substring(1, location.search.length);
+ qs = location.hash.substring(1);
qs = qs.replace(/\+/g, ' ');
var args = qs.split('&');