User Tools

Site Tools


devel:hacking

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
devel:hacking [2012/11/14 13:22]
norangshol [Javascript] Updated info about require_config.dev.js.
devel:hacking [2013/06/19 07:45]
morten fix jenkins url
Line 134: Line 134:
  
 Pro tip is to create ''​require_config.dev.js''​ in ''​media/​js/''​ and add the following configuration to requirejs: ​ Pro tip is to create ''​require_config.dev.js''​ in ''​media/​js/''​ and add the following configuration to requirejs: ​
-<​code>​require.urlArgs = "​bust="​ +  (new Date()).getTime();</​code>​ This makes sure your not using cached resources in your browser when developing, which browser ​loves to do! See [[http://​requirejs.org/​docs/​api.html#​config-urlArgs|config-urlArgs]] in requirejs documentation for «details»+<​code>​require.urlArgs = "​bust="​ +  (new Date()).getTime();</​code>​ This makes sure your not using cached resources in your browser when developing, which browsers ​loves to do! See [[http://​requirejs.org/​docs/​api.html#​config-urlArgs|config-urlArgs]] in requirejs documentation for «details». The ''​require_config.dev.js''​ is added in global HG ignore. 
 + 
 +==== Accessing resources with ajax requiring authentication ==== 
 + 
 +As your authenticated session might have timed out due to idle (no activity), resources will return 500 Internal Error if you do not supply the important ''//​X-NAV-AJAX//''​ header on your ajax requests. 
 + 
 +So make sure to include the ''​**X-NAV-AJAX**''​ header so you will get proper HTTP response code in the reponse from your request.  
 + 
 +NAV has a shortcut for fixing this in ''​default.js''​ (adds a function in the public namespace NAV) which attaches the required handlers for jQuery by doing: 
 +<​code>​NAV.addGlobalAjaxHandlers()</​code>​ 
 ====== Database ====== ====== Database ======
 NAV uses PostgreSQL as its database backend. ​ Namespaces (schemas) are NAV uses PostgreSQL as its database backend. ​ Namespaces (schemas) are
Line 390: Line 400:
 quality. quality.
  
-Our Jenkins installation is available on http://​nav.uninett.no/​jenkins ​.+Our Jenkins installation is available on https://ci.nav.uninett.no/​ .
  
 ===== Tips and tricks ===== ===== Tips and tricks =====
devel/hacking.txt · Last modified: 2014/11/05 10:57 by morten