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
27
static/html/app.html
Normal file
27
static/html/app.html
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
<div id="about">
|
||||||
|
<p>
|
||||||
|
Open Media Library is a local web application to manage and sync your digital media collections.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div id="faq">
|
||||||
|
<p>
|
||||||
|
not yet
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div id="terms">
|
||||||
|
<p>
|
||||||
|
The lazy brown fox jumped over the lazy black fox, but other than that not really much happened here since you last checked.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div id="development">
|
||||||
|
<p>
|
||||||
|
The latest code is in our
|
||||||
|
<a href="https://git.0x2620.org/openmedialibrary.git">git repository</a>.
|
||||||
|
<br/>
|
||||||
|
<p>
|
||||||
|
For everything else, there's IRC, and our development mailing list. Your feedback is welcome.
|
||||||
|
</p>
|
||||||
|
<a href="irc://irc.freenode.net#openmedialibrary">IRC</a>: #openmedialibrary on freenode<br/>
|
||||||
|
<a href="https://mailb.org/mailman/listinfo/openmedialibrary-dev">Mailing List</a>: openmedialibrary-dev@openmedialibrary.com<br/>
|
||||||
|
</p>
|
||||||
|
</div>
|
|
@ -38,12 +38,6 @@ oml.ui.appDialog = function() {
|
||||||
$logo = Ox.Element(),
|
$logo = Ox.Element(),
|
||||||
$text = Ox.Element()
|
$text = Ox.Element()
|
||||||
.addClass('OxTextPage OxSelectable'),
|
.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;
|
title = Ox.getObjectById(tabs, id).title;
|
||||||
|
|
||||||
$('<img>')
|
$('<img>')
|
||||||
|
@ -61,7 +55,13 @@ oml.ui.appDialog = function() {
|
||||||
if (id == 'contact') {
|
if (id == 'contact') {
|
||||||
$content.append(oml.ui.contactForm());
|
$content.append(oml.ui.contactForm());
|
||||||
} else {
|
} 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>')
|
$('<div>')
|
||||||
.css({
|
.css({
|
||||||
|
|
Loading…
Reference in a new issue