store app dialog texts in html file
This commit is contained in:
parent
4cf2c13e7e
commit
2fd3e105d2
2 changed files with 34 additions and 7 deletions
|
|
@ -38,12 +38,6 @@ oml.ui.appDialog = function() {
|
|||
$logo = Ox.Element(),
|
||||
$text = Ox.Element()
|
||||
.addClass('OxTextPage OxSelectable'),
|
||||
text = {
|
||||
'about': 'Open Media Library is a local web application to manage and sync your digital media collections.',
|
||||
'faq': 'not yet',
|
||||
'terms': 'The lazy brown fox jumped over the lazy black fox, but other than that not really much happened here since you last checked.',
|
||||
'development': 'The latest code is in our <a href="https://git.0x2620.org/openmedialibrary.git">git repository</a>.<br><br>For everything else, there\'s IRC, and our development mailing list. Your feedback is welcome.<br><br>IRC: #openmedialibrary on freenode<br>Mailing List: <a href=mailto:openmedialibrary-dev@openmedialibrary.com">openmedialibrary-dev@openmedialibrary.com</a>',
|
||||
}[id],
|
||||
title = Ox.getObjectById(tabs, id).title;
|
||||
|
||||
$('<img>')
|
||||
|
|
@ -61,7 +55,13 @@ oml.ui.appDialog = function() {
|
|||
if (id == 'contact') {
|
||||
$content.append(oml.ui.contactForm());
|
||||
} else {
|
||||
$content.html('<h1><b>' + title + '</b></h1><p>' + text + '</p>');
|
||||
Ox.get('/static/html/app.html', function(html) {
|
||||
var $html = $('<div>'),
|
||||
strings = {};
|
||||
$html.html(Ox.formatString(html, strings));
|
||||
var section = $html.find('#' + id).html();
|
||||
$content.html('<h1><b>' + title + '</b></h1><p>' + section + '</p>');
|
||||
});
|
||||
}
|
||||
$('<div>')
|
||||
.css({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue