Reflect possibility to have arbitrary properties in Portal
This commit is contained in:
parent
0dd2c10b87
commit
6321ca9191
@ -2,15 +2,11 @@ $(function() {
|
|||||||
$.getJSON('js/apps.json', function(data) {
|
$.getJSON('js/apps.json', function(data) {
|
||||||
$.each(data, function(id, props) {
|
$.each(data, function(id, props) {
|
||||||
var div = $('#'+id).show();
|
var div = $('#'+id).show();
|
||||||
if (props.hasOwnProperty('url')) {
|
if (props.hasOwnProperty('url'))
|
||||||
var url = props.url.replace('{host}', window.location.hostname);
|
div.find('h2 a').attr('href', props.url.replace('{host}', window.location.hostname));
|
||||||
div.find('h2 a').attr('href', url);
|
$.each(props, function(key, value) {
|
||||||
div.find('.url').text(url);
|
div.find('.'+key).text(value.replace('{host}', window.location.hostname));
|
||||||
}
|
});
|
||||||
if (props.hasOwnProperty('login'))
|
|
||||||
div.find('.login').text(props.login);
|
|
||||||
if (props.hasOwnProperty('password'))
|
|
||||||
div.find('.password').text(props.password);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user