mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-01-11 17:58:41 +00:00
adjust frontend selector/fragment loading
This commit is contained in:
parent
27470758e7
commit
6498a82a1e
|
|
@ -197,8 +197,8 @@ export class UriFactory
|
|||
return toMatch[match];
|
||||
} else if (typeof UriFactory.uri[match] !== 'undefined') {
|
||||
return UriFactory.uri[match];
|
||||
} else if (match.indexOf('#') === 0) {
|
||||
const e = document.getElementById(match.substr(1));
|
||||
} else if (match.indexOf('!') === 0) {
|
||||
const e = document.querySelector(match.substr(1));
|
||||
|
||||
if (!e) {
|
||||
return '';
|
||||
|
|
@ -218,6 +218,8 @@ export class UriFactory
|
|||
return value;
|
||||
} else if (match.indexOf('?') === 0) {
|
||||
return HttpUri.getUriQueryParameter(current.query, match.substr(1));
|
||||
} else if (match.indexOf('#') === 0) {
|
||||
return HttpUri.getFragment();
|
||||
} else if (match.indexOf('/') === 0) {
|
||||
return 'ERROR PATH';
|
||||
} else if (match === '%') {
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ describe('UriFactoryTest', function ()
|
|||
{
|
||||
it('Testing global queries', function ()
|
||||
{
|
||||
let uri = 'www.test-uri.com?id={@ID}&test={.mTest}&two={/path}&hash={#hash}&none=#none&found={/not}?v={/valid2}',
|
||||
let uri = 'www.test-uri.com?id={@ID}&test={.mTest}&two={/path}&hash={!#hash}&none=#none&found={/not}?v={/valid2}',
|
||||
vars = {
|
||||
'@ID' : 1,
|
||||
'.mTest': 'someString',
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user