states for about and impressum, cleanup

This commit is contained in:
Naeltard 2015-04-01 23:47:34 +02:00
parent 62b1b93fda
commit ab6dd4574b
10 changed files with 26 additions and 1765 deletions

View File

@ -4,4 +4,7 @@ class default_about extends \SYSTEM\PAGE\Page {
$vars = \SYSTEM\locale::getStrings(110);
return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_about/tpl/about.tpl'), $vars);
}
public static function js(){
return array( \SYSTEM\WEBPATH(new PPAGE(),'default_about/js/default_about.js'));
}
}

View File

@ -0,0 +1,3 @@
function init_about(){
$('#modal_text').modal('show');
}

View File

@ -4,4 +4,7 @@ class default_impressum extends \SYSTEM\PAGE\Page {
$vars = \SYSTEM\locale::getStrings(10);
return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_impressum/tpl/impressum.tpl'), $vars);
}
public static function js(){
return array( \SYSTEM\WEBPATH(new PPAGE(),'default_impressum/js/default_impressum.js'));
}
}

View File

@ -0,0 +1,3 @@
function init_impressum(){
$('#modal_text').modal('show');
}

View File

@ -19,16 +19,6 @@ class default_page extends \SYSTEM\PAGE\Page {
'<link href="'.SYSTEM\WEBPATH(new PLIB(),'bootstrap/css/bootstrap-responsive.min.css').'" rel="stylesheet">';
}
/*public function generate_elementlist(){
$result = '';
$elements = elements::getAllElementsOfTag('%');
foreach($elements as $element){
$element['title'] = $element['id'];
$result .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_page/tpl/element.tpl'), $element);
}
return $result;
}*/
public function html(){
$vars = array();
$vars['js'] = $this->js();

View File

@ -1,14 +1,4 @@
$(document).ready(function() {
new SYSTEM('./api.php',1,'start');
$('#impressum').click(function(){
$('#modaltext').load('./?page=impressum',function(){
$('#modal_text').modal('show');})
})
$('#about').click(function(){
$('#modaltext').load('./?page=about',function(){
$('#modal_text').modal('show');})
})
});
init_start();
});

View File

@ -26,9 +26,9 @@
</div>
<div id="content"></div>
<div id="footer">
<a href="#!start" id="impressum">Impressum</a>
<a href="#!impressum" id="impressum">Impressum</a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="#!start" id="about">About</a>
<a href="#!about" id="about">About</a>
</div>
</body>
</html>

View File

@ -5,9 +5,8 @@ class default_start extends SYSTEM\PAGE\Page {
$this->hash = $hash;
}
public static function js(){
return array( \SYSTEM\WEBPATH(new PPAGE(),'default_start/js/default_start.js')
);}
return array( \SYSTEM\WEBPATH(new PPAGE(),'default_start/js/default_start.js'));
}
public static function css(){
return array( \SYSTEM\WEBPATH(new PPAGE(),'default_start/css/default_start.css'));}
public function html(){

View File

@ -55,11 +55,11 @@ function log_file_start(torrent){
'downloading from: ' + torrent.swarm.wires.length + ' peers' +
'</td>' +
'<td>' +
'<a href="http://mojotrollz.eu/web/flingit/#!start;hash.' + torrent.infoHash + '"' +
'<a href="http://www.slingit.org/#!start;hash.' + torrent.infoHash + '"' +
' target="_blank">' +
'direct link: ' +
'</a>' +
'<input type="text" value="http://mojotrollz.eu/web/flingit/#!start;hash.' + torrent.infoHash + '" onClick="this.setSelectionRange(0, this.value.length)"/>' +
'<input type="text" value="http://www.slingit.org/#!start;hash.' + torrent.infoHash + '" onClick="this.setSelectionRange(0, this.value.length)"/>' +
'</td>' +
'</tr>');
}
@ -75,11 +75,11 @@ function log_file_add(torrent){
'speed: ' + torrent.swarm.downloadSpeed() + '/s' +
'</td>' +
'<td>' +
'<a href="http://mojotrollz.eu/web/flingit/#!start;hash.' + torrent.infoHash + '"' +
'<a href="http://www.slingit.org/#!start;hash.' + torrent.infoHash + '"' +
' target="_blank">' +
'direct link: ' +
'</a>' +
'<input type="text" value="http://mojotrollz.eu/web/flingit/#!start;hash.' + torrent.infoHash + '" onClick="this.setSelectionRange(0, this.value.length)"/>' +
'<input type="text" value="http://www.slingit.org/#!start;hash.' + torrent.infoHash + '" onClick="this.setSelectionRange(0, this.value.length)"/>' +
'</td>' +
'</tr>');
}
@ -95,11 +95,11 @@ function log_file_upd(torrent){
'speed: ' + torrent.swarm.downloadSpeed() + '/s / ' + torrent.swarm.uploadSpeed() + '/s' +
'</td>' +
'<td>' +
'<a href="http://mojotrollz.eu/web/flingit/#!start;hash.' + torrent.infoHash + '"' +
'<a href="http://www.slingit.org/#!start;hash.' + torrent.infoHash + '"' +
' target="_blank">' +
'direct link: ' +
'</a>' +
'<input type="text" value="http://mojotrollz.eu/web/flingit/#!start;hash.' + torrent.infoHash + '" onClick="this.setSelectionRange(0, this.value.length)"/>' +
'<input type="text" value="http://www.slingit.org/#!start;hash.' + torrent.infoHash + '" onClick="this.setSelectionRange(0, this.value.length)"/>' +
'</td>')
} else {
log_file_add(torrent);
@ -131,11 +131,11 @@ function log_file_done(torrent,url,file){
'</a>' +
'</td>' +
'<td>' +
'<a href="http://mojotrollz.eu/web/flingit/#!start;hash.' + torrent.infoHash + '"' +
'<a href="http://www.slingit.org/#!start;hash.' + torrent.infoHash + '"' +
' target="_blank">' +
'direct link: ' +
'</a>' +
'<input type="text" value="http://mojotrollz.eu/web/flingit/#!start;hash.' + torrent.infoHash + '" onClick="this.setSelectionRange(0, this.value.length)"/>' +
'<input type="text" value="http://www.slingit.org/#!start;hash.' + torrent.infoHash + '" onClick="this.setSelectionRange(0, this.value.length)"/>' +
'</td>' +
'</tr>');
}

File diff suppressed because it is too large Load Diff