Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(function() {
- function loadSingleUser(userId, userType) {
- var url = (userType == "fp") ? "/mona/focusPersonTool/getFocusPerson" : "/mona/user-tool/get-user";
- $.ajax({
- datatype : "html",
- type : "POST",
- url : url,
- data : "userId=" + userId
- }).done(function(data) {
- $("#userFormDiv").load("/mona/user-tool/user-form", function() {
- $('#userFormTabs').tabs();
- $('#userCredentials').multiSelect();
- $('button').button();
- });
- }).fail(function(e) {
- alert('Error: ' + e);
- });
- }
- // jsTree STuff
- $(function() {
- $("#userWidget").jstree({
- "themes" : {
- "theme" : "classic",
- "dots" : false,
- "icons" : false
- },
- "xml_data" : {
- "ajax" : {
- "url" : "/mona/user-tool/get-users-XML"
- },
- "xsl" : "nest"
- },
- "plugins" : [ "themes", "xml_data", "ui" ]
- }).bind(
- "select_node.jstree",
- function(event, data) {
- // `data.rslt.obj` is the jquery extended node that was
- loadSingleUser(data.rslt.obj.attr("id"), data.rslt.obj.attr("type"));
- });
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement