summaryrefslogtreecommitdiffstats
path: root/install/static/details.js
diff options
context:
space:
mode:
authorAdam Young <ayoung@redhat.com>2010-08-23 22:32:23 -0400
committerAdam Young <ayoung@redhat.com>2010-08-26 13:15:00 -0400
commit49584d6efc6a10fa0b76ce81b2638d424f2208a8 (patch)
tree08c87c7d7bd2ee0fef6e5045948a977a5c61cdc9 /install/static/details.js
parent02479babb9cd5fdd0673175fde22e40f3a1b10b4 (diff)
downloadfreeipa.git-49584d6efc6a10fa0b76ce81b2638d424f2208a8.tar.gz
freeipa.git-49584d6efc6a10fa0b76ce81b2638d424f2208a8.tar.xz
freeipa.git-49584d6efc6a10fa0b76ce81b2638d424f2208a8.zip
hashchange
We now catch the hashchange event and use that to drive most of the site. To trigger page transitions, modify location.hash. Params start with # not ?. Removed user-group.inc. converted tabs to spaces trivial imlementation of add and details for netgroup and hostgroup lots of bug fixes based on routing problems and the refactorings.
Diffstat (limited to 'install/static/details.js')
-rw-r--r--install/static/details.js29
1 files changed, 26 insertions, 3 deletions
diff --git a/install/static/details.js b/install/static/details.js
index 03362d83..40d36b6b 100644
--- a/install/static/details.js
+++ b/install/static/details.js
@@ -1,5 +1,6 @@
/* Authors:
* Pavel Zuna <pzuna@redhat.com>
+ * Adam Young <ayoung@redhat.com>
*
* Copyright (C) 2010 Red Hat
* see file 'COPYING' for use and warranty information
@@ -16,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
+ */
/* IPA Object Details - populating definiton lists from entry data */
@@ -134,6 +135,7 @@ function ipa_details_update(pkey, on_win, on_fail)
modlist['setattr'].push(attr + '=' + values[0]);
for (var i = 1; i < values.length; ++i)
modlist['addattr'].push(attr + '=' + values[i]);
+
}
_ipa_update_on_win_callback = on_win;
@@ -162,6 +164,7 @@ function _ipa_update_on_fail(xhr, text_status, error_thrown)
{
if (_ipa_update_on_fail_callback)
_ipa_update_on_fail_callback(xhr, text_status, error_thrown);
+
}
function ipa_details_create(dls, container)
@@ -173,7 +176,7 @@ function ipa_details_create(dls, container)
var d = dls[i];
ipa_generate_dl($('#detail-lists hr').last(), d[0], d[1], d[2]);
-// ipa_generate_dl($("#detail-lists"), d[0], d[1], d[2]);
+ // ipa_generate_dl($("#detail-lists"), d[0], d[1], d[2]);
}
}
@@ -332,7 +335,7 @@ function ipa_create_input(attr, value)
if (param_info['multivalue'] || param_info['class'] == 'List') {
return (
handler(attr, value, param_info) +
- _ipa_create_remove_link(attr, param_info)
+ _ipa_create_remove_link(attr, param_info)
);
}
return (handler(attr, value, param_info));
@@ -378,6 +381,7 @@ function ipa_details_reset()
{
if (ipa_details_cache)
ipa_details_display(ipa_details_cache);
+
}
/* Event handlers */
@@ -435,3 +439,22 @@ function _h2_on_click(obj)
}
}
+function DetailsForm(obj, details_list, pkeyCol, sampleData ){
+
+ this.obj = obj;
+ this.details_list = details_list;
+ this.sampleData = sampleData;
+ this.pkeyCol = pkeyCol;
+
+ this.setup= function(key){
+ //re initialize global parse of parameters
+ qs = ipa_parse_qs();
+
+ showDetails();
+ $('h1').text("Managing " + this.obj +": " +qs['pkey'] );
+
+ ipa_details_init(this.obj);
+ ipa_details_create(this.details_list, $('#details'));
+ ipa_details_load(qs.pkey, on_win, null, this.sampleData);
+ }
+}