| | |
| | | /* ----------- ui interaction ------------ */ |
| | | |
| | | function um_user_list_click() { |
| | | var user_name = 'noch aus liste ermitteln..'; |
| | | alert('user list click, user: ' + user_name); |
| | | //var user_name = 'noch aus liste ermitteln..'; |
| | | //alert('user list click, user: ' + user_name); |
| | | um_get_user_list(); |
| | | } |
| | | |
| | | |
| | |
| | | return user; |
| | | } |
| | | |
| | | |
| | | function um_show_user_list(resp) { |
| | | var users = resp.List[0]; |
| | | for(var i = 0; i < users.List.length; i++) { |
| | | var user = users.List[i]; |
| | | $("#nutzerliste").append('<option value=' + user.String + '>' + user.String + '</option>'); |
| | | } |
| | | //var user1 = users.List[1]; |
| | | //var username = user1.String; |
| | | //alert(username); |
| | | //$("#nutzerliste").append('<option value=' + UpdateItem + '>' + UpdateItem + '</option>'); |
| | | } |
| | | |
| | | /* ---- api calls ----- */ |
| | | |
| | |
| | | }); |
| | | } |
| | | |
| | | function um_get_user_list() { |
| | | var c = 'de.uhilger.um.api.UserMgr'; |
| | | var m = 'getUserNameList'; |
| | | var u = '../svc/' + m; |
| | | $.ajax({ |
| | | url: u, |
| | | type: "GET", |
| | | dataType : "json", |
| | | success: function( resp ) { |
| | | //$('#fehler').html('Antwort: ' + resp); |
| | | um_show_user_list(resp); |
| | | }, |
| | | error: function( xhr, status, errorThrown ) { |
| | | $('#fehler').html("Error: " + errorThrown + " Status: " + status); |
| | | }, |
| | | complete: function( xhr, status ) { |
| | | //alert( "The request is complete!" ); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /* ----- Hilfsfunktionen ----- */ |
| | | |
| | | function serialisieren(obj) { |