From 12ee9365a7a08c7a45887b98f17a44c64d7eb5f0 Mon Sep 17 00:00:00 2001 From: Adam Young Date: Thu, 19 Aug 2010 20:48:21 -0400 Subject: 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 --- install/static/ipa.js | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'install/static/ipa.js') 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('&'); -- cgit