Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted (edited)

Hey all, trying to get the new version of HAP+ to work through UAG.

 

First of all, we had refreshing problems when directed to the logon page. Thanks to brad10 pointing in the direction I managed to botch the jquery.min.js to:

jQuery.parseJSON = function( data ) {
   str = data.substr(1,5).trim();
   if(str != "        return JSON.parse( String(data) );
   }
};

For some reason UAG seems to be doing some HTML json parsing.

 

 

Now, when I used the myfiles section. The page seems to be appearing wrong. After commenting out the below (default.aspx (myfiles), around line 735+), it rendered fine and seems to be working. But doesn't allow me to upload files. If i uncomment it out it then renders the page wrong.

 

I'm thinking the URL might be causing problems (https://mydomain/uniquesig63ade3b5266a5d01f50ddba7bb52f9056cb536096e80ebce6fdfa13e7789f379/uniquesig1/hap/myfiles/#H\)

 

Any help would be most appreciated :)

/*type: 'GET',
							url: hap.common.formatJSONUrl('~/api/MyFiles/Properties/' + SelectedItems()[0].Data.Path.replace(/\\/gi, "/").replace(/\.\.\/Download\//gi, "")),
							dataType: 'json',
							contentType: 'application/json',
							success: function (data) {
								var s = '' + data.Icon + '' + ((data.Type == "File Folder") ? '' + data.Name + '' : data.Name) + '';
								s += '';
								if (data.Type == "File Folder") {
									s += '' + hap.common.getLocal("myfiles/type") + ': ' + data.Type + '';
									s += '' + hap.common.getLocal("myfiles/location") + ': ' + data.Location + '';
									s += '' + hap.common.getLocal("myfiles/size") + ': ' + data.Size + '';
									s += '' + hap.common.getLocal("myfiles/contains") + ': ' + data.Contents + '';
									s += '';
									s += '' + hap.common.getLocal("myfiles/created") + ': ' + data.DateCreated + '';
								} else {
									s += '' + hap.common.getLocal("myfiles/typeoffile") + ': ' + data.Type + ' (' + data.Extension + ')';
									s += '';
									s += '' + hap.common.getLocal("myfiles/location") + ': ' + data.Location + '';
									s += '' + hap.common.getLocal("myfiles/size") + ': ' + data.Size + '';
									s += '';
									s += '' + hap.common.getLocal("myfiles/created") + ': ' + data.DateCreated + '';
									s += '' + hap.common.getLocal("myfiles/modified") + ': ' + data.DateModified + '';
									s += '' + hap.common.getLocal("myfiles/accessed") + ': ' + data.DateAccessed + '';
								}
								$("#propcont").html(s);
							}, error: hap.common.jsonError*/

Edited by ReadTheNetwork

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...