Skip to content

Commit

Permalink
added trinityDB plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Rainer Furtmeier authored and Rainer Furtmeier committed Nov 17, 2013
1 parent d674be1 commit 97aecaa
Show file tree
Hide file tree
Showing 7 changed files with 237 additions and 1 deletion.
85 changes: 85 additions & 0 deletions fheME/trinityDB/mtrinityDBGUI.class.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?php
/**
* This file is part of fheME.
* fheME is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
* fheME is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses></http:>.
*
* 2007 - 2013, Rainer Furtmeier - [email protected]
*/

class mtrinityDBGUI extends anyC implements iGUIHTMLMP2 {

public function getHTML($id, $page){
$this->loadMultiPageMode($id, $page, 0);

$gui = new HTMLGUIX($this);
$gui->version("mtrinityDB");

$gui->name("trinityDB");

$gui->attributes(array());

return $gui->getBrowserHTML($id);
}

public static function getOverviewPlugin(){
$P = new overviewPlugin("mtrinityDBGUI", "trinityDB", 100);
$P->updateInterval(30 * 60);

return $P;
}


public function getOverviewContent(){
$html = "<div class=\"touchHeader\"><span class=\"lastUpdate\" id=\"lastUpdatemtrinityDBGUI\"></span><p>trinityDB</p></div>
<div style=\"padding:10px;\">";

$AC = anyC::get("trinityDB");
while($T = $AC->getNextEntry()){
$B = new Button("Neue Folgen", "star", "touch");
$B->onclick("trinityDB.show(".$T->getID().", 'newEpisodes');");
$html .= "$B";

$B = new Button("Serienbrowser", "aperture", "touch");
$B->onclick("trinityDB.show(".$T->getID().", 'browser');");
$html .= "$B";
}
$html .= "</div>";
echo $html;
}

public function load($trinityDBID, $mode){
$T = new trinityDB($trinityDBID);

echo "
<div style=\"width:100%;margin-bottom:20px;position:fixed;top:0;left:0;\" id=\"trinityDBSelection\">
<div style=\"float:right;margin-right:20px;\">
<div onclick=\"trinityDB.hide();\" style=\"cursor:pointer;float:left;font-family:Roboto;font-size:30px;padding:10px;\">
<span style=\"margin-left:10px;float:right;margin-top:5px;color:#bbb;\" class=\"iconic iconicL x\"></span> <span>Schließen</span>
</div>
</div>
<div style=\"clear:both;\">
</div>
</div>
<iframe id=\"trinityDBBrowser\" style=\"width:100%;border:0px;margin:0px;\" src=\"".$T->A("trinityDBURL")."/ubiquitous/CustomerPage/?D=trinityDB/Serien&mode=$mode\"></iframe>
".OnEvent::script("\$j('#trinityDBBrowser').css('height', \$j(window).height() - 5)");
}

}
?>
39 changes: 39 additions & 0 deletions fheME/trinityDB/plugin.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
* This file is part of phynx.
* phynx is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
* phynx is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses></http:>.
*
* 2007 - 2013, Rainer Furtmeier - [email protected]
-->
<phynx>
<plugin>
<name>trinityDB</name>
<menuName>trinityDB</menuName>
<collection>mtrinityDB</collection>

<icon>./fheME/trinityDB/trinityDB.png</icon>
<folder>trinityDB</folder>
<javascript>trinityDB.js</javascript>

<adminOnly>false</adminOnly>

<version>0.6</version>
<registry>Overview;mtrinityDBGUI::getOverviewPlugin</registry>

<deploy>
<table name="trinityDB" />
</deploy>
</plugin>
</phynx>
22 changes: 22 additions & 0 deletions fheME/trinityDB/trinityDB.class.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php
/**
* This file is part of fheME.
* fheME is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
* fheME is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses></http:>.
*
* 2007 - 2013, Rainer Furtmeier - [email protected]
*/
class trinityDB extends PersistentObject {
}
?>
58 changes: 58 additions & 0 deletions fheME/trinityDB/trinityDB.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/**
*
* This file is part of fheME.
* fheME is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
* fheME is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* 2007 - 2013, Rainer Furtmeier - [email protected]
*/

var trinityDB = {

overlay: '<div class="lightOverlay" id="trinityDBOverlay" style="display:none;">\n\
\n\
<div id=\"trinityDBLoading\" style=\"font-family:Roboto;font-size:30px;padding:10px;height:128px;width:500px;\">\n\
<img src=\"./images/loading128.png\" style=\"float:left;margin-right:20px;margin-top:-25px;\" />Die Verbindung<br />wird aufgebaut...\n\
</div>\n\
\n\
</div>',

show: function(id, mode){
$j('#trinityDBOverlay').remove();//Clean up the hard way!

$j('body').append(trinityDB.overlay);


$j('#trinityDBLoading').css('margin-top', ($j(window).height() / 2) - ($j('#trinityDBLoading').outerHeight() / 2));
$j('#trinityDBLoading').css('margin-left', ($j(window).width() / 2) - ($j('#trinityDBLoading').outerWidth() / 2));

$j('#trinityDBOverlay').css("position", "absolute");
/*$j('#UPnPOverlay').on("click", function(){
$j('#UPnPOverlay').remove();
});*/

$j('#trinityDBOverlay').fadeIn();
contentManager.rmePCR("mtrinityDB", "-1", "load", [id, mode], function(transport){
$j('#trinityDBOverlay').html(transport.responseText);

});

},

hide: function(){
$j('#trinityDBOverlay').fadeOut("fast", function(){
$j('#trinityDBOverlay').remove();
});
},
};
Binary file added fheME/trinityDB/trinityDB.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions fheME/trinityDB/trinityDBGUI.class.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php
/**
* This file is part of fheME.
* fheME is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
* fheME is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses></http:>.
*
* 2007 - 2013, Rainer Furtmeier - [email protected]
*/
class trinityDBGUI extends trinityDB implements iGUIHTML2 {
function getHTML($id){
$gui = new HTMLGUIX($this);
$gui->name("trinityDB");

return $gui->getEditHTML();
}
}
?>
6 changes: 5 additions & 1 deletion styles/standard/overlayBox.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#lightOverlay {
#lightOverlay, .lightOverlay {
position:fixed;
top:0px;
left:0px;
z-index:98;
width: 100%;
height: 100%;
background-color:white;
color:#888;
}

#darkOverlay, .darkOverlay {
Expand Down

0 comments on commit 97aecaa

Please sign in to comment.