Skip to content
Snippets Groups Projects
Commit c18ce672 authored by Nikolaos Beer's avatar Nikolaos Beer Committed by GitHub
Browse files

Merge pull request #96 from Edirom/feature-edition-url-param

Edition param for activeEdition
parents b36811d1 cd8eda54
No related branches found
No related tags found
1 merge request!126Merge for version 0.10.0
...@@ -66,6 +66,10 @@ Ext.define('EdiromOnline.Application', { ...@@ -66,6 +66,10 @@ Ext.define('EdiromOnline.Application', {
me.addEvents('workSelected'); me.addEvents('workSelected');
var editionParam = me.getURLParameter('edition');
if(editionParam !== null)
me.activeEdition = editionParam;
Ext.Ajax.request({ Ext.Ajax.request({
url: 'data/xql/getEditionURI.xql', url: 'data/xql/getEditionURI.xql',
async: false, async: false,
...@@ -78,6 +82,10 @@ Ext.define('EdiromOnline.Application', { ...@@ -78,6 +82,10 @@ Ext.define('EdiromOnline.Application', {
scope: this scope: this
}); });
var workParam = me.getURLParameter('work');
if(workParam !== null)
me.activeWork = workParam;
Ext.Ajax.request({ Ext.Ajax.request({
url: 'data/xql/getWorkID.xql', url: 'data/xql/getWorkID.xql',
async: false, async: false,
...@@ -131,5 +139,9 @@ Ext.define('EdiromOnline.Application', { ...@@ -131,5 +139,9 @@ Ext.define('EdiromOnline.Application', {
var edition = editions.getAt(editionIndex); var edition = editions.getAt(editionIndex);
edition[fnName](callback, arguments); edition[fnName](callback, arguments);
} },
getURLParameter: function(parameter) {
return decodeURIComponent((new RegExp('[?|&]' + parameter + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search) || [null, ''])[1].replace(/\+/g, '%20')) || null;
}
}); });
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment