~sahana-eden-jp/sahana-eden/japan

« back to all changes in this revision

Viewing changes to modules/s3/s3gis.py

  • Committer: fuga
  • Date: 2011-06-07 09:41:29 UTC
  • Revision ID: fuga35@gmail.com-20110607094129-5l8enq2lq3itwyk9
Fix JP#668: show message when feature popup fails

Show diffs side-by-side

added added

removed removed

Lines of Context:
4062
4062
        }
4063
4063
 
4064
4064
        function loadDetails(url, id, popup) {
4065
 
            $.get(
4066
 
                    url,
4067
 
                    function(data) {
 
4065
            $.ajax({
 
4066
                    'url': url,
 
4067
                    'success': function(data) {
4068
4068
                        $('#' + id + '_contentDiv').html(data);
4069
4069
                        popup.updateSize();
4070
4070
                    },
4071
 
                    'html'
4072
 
                );
 
4071
                    'error': function(request, status, error) {
 
4072
                        if (error=='UNAUTHORIZED') {
 
4073
                            msg = '%s';
 
4074
                        } else {
 
4075
                            msg = request.responseText;
 
4076
                        }
 
4077
                        $('#' + id + '_contentDiv').html(msg);
 
4078
                        popup.updateSize();
 
4079
                    },
 
4080
                    'dataType':'html'
 
4081
                });
4073
4082
        }
4074
4083
 
4075
4084
        """ % (T("There are multiple records at this location"), uuid_from_fid,
4076
4085
               T("Loading"),
4077
4086
               URL(r=request, c="static", f="img", args="ajax-loader.gif"),
4078
 
               uuid_from_fid)
 
4087
               uuid_from_fid,
 
4088
               T('Requires login'))
4079
4089
            # Draft Features
4080
4090
            # This is currently used just to select the Lat/Lon for a Location, so no Features pre-loaded
4081
4091
            if add_feature: