Skip to content

Commit 872087d

Browse files
Rainer FurtmeierRainer Furtmeier
Rainer Furtmeier
authored and
Rainer Furtmeier
committed
improved loader
1 parent 1c9e5b5 commit 872087d

36 files changed

+796
-592
lines changed

classes/backend/Collection.class.php

+12
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ abstract class Collection {
3838
protected $loadedPage;
3939
protected $loadedPerPage;
4040
protected $isFiltered = false;
41+
protected $isFilteredLabel = null;
4142

4243
function __clone() {
4344
$this->Adapter = clone $this->Adapter;
@@ -69,6 +70,10 @@ public function isFiltered(){
6970
return $this->isFiltered;
7071
}
7172

73+
public function isFilteredLabel(){
74+
return $this->isFilteredLabel;
75+
}
76+
7277
/**
7378
* Returns BPS Data of this object.
7479
*
@@ -645,6 +650,7 @@ protected function getAffectedRows($id = -1){
645650
protected function filterCategories(){
646651

647652
$fC = false;
653+
$Ks = array();
648654
if(PMReflector::implementsInterface(get_class($this),"iCategoryFilter")){
649655
$mU = new mUserdata();
650656
$K = $mU->getUDValue("filteredCategoriesInHTMLGUI".$this->getClearClass());
@@ -656,6 +662,8 @@ protected function filterCategories(){
656662

657663
$fC = true;
658664
}
665+
666+
$this->isFilteredLabel = $this->getCategoryFieldLabel($Ks);
659667
}
660668
$this->isFiltered = $fC;
661669

@@ -744,5 +752,9 @@ public function asJSON(){
744752
#$array[] = array("label" => "Test2", "value" => "2");
745753
return json_encode($array);
746754
}
755+
756+
public function getCategoryFieldLabel(array $KIDs){
757+
return null;
758+
}
747759
}
748760
?>

classes/backend/anyC.class.php

+4
Original file line numberDiff line numberDiff line change
@@ -96,5 +96,9 @@ public function toArray($valueFieldName){
9696

9797
return $r;
9898
}
99+
100+
function n(){
101+
return $this->getNextEntry();
102+
}
99103
}
100104
?>

classes/frontend/AppPlugins.class.php

+10-7
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public static function resetBlacklist(){
6363
}
6464

6565
public function blockNonAdmin($pluginName){
66-
print_r($this->blockNonAdmin);
66+
#print_r($this->blockNonAdmin);
6767

6868
$pluginName = str_replace("GUI", "", $pluginName);
6969

@@ -100,9 +100,12 @@ public function scanPlugins($appFolder = null){
100100

101101
$allowedPlugins = Environment::getS("allowedPlugins", array());
102102
$extraPlugins = Environment::getS("pluginsExtra", array());
103+
if(Applications::activeApplication() == "Zeus" OR Applications::activeApplication() == "nil")
104+
$extraPlugins = array();
105+
103106
$allowedPlugins = array_merge($allowedPlugins, $extraPlugins);
104-
105-
107+
108+
106109
#$p = ".".(is_dir("./$folder/") ? "" : ".");
107110
$p = Util::getRootPath();
108111

@@ -132,13 +135,13 @@ public function scanPlugins($appFolder = null){
132135
$plugins[] = $file;
133136
}
134137

135-
138+
136139
sort($plugins);
137140

138141
foreach($plugins as $key => $file){
139142
$f = explode(".",$file);
140143
if($f[0]{0} == "-") continue;
141-
144+
142145
if($f[1] == "xml") {
143146
$c = new XMLPlugin("$p/$folder/$file", $allowedPlugins);
144147
} else {
@@ -148,12 +151,12 @@ public function scanPlugins($appFolder = null){
148151
}
149152

150153
$_SESSION["messages"]->startMessage("trying to register ".$c->registerName().": ");
151-
154+
152155
if(count($allowedPlugins) > 0 AND !in_array($c->registerClassName(), $allowedPlugins)){
153156
$_SESSION["messages"]->endMessage(" not allowed");
154157
continue;
155158
}
156-
159+
157160
$pFolder = $c->registerFolder();
158161
if(!is_array($pFolder))
159162
$this->folders[] = $pFolder;

classes/frontend/ExtConn.class.php

+4
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,10 @@ public function useUser($username = null){
254254

255255
return $this->login($u->A("username"), $u->A("SHApassword"), true);
256256
}
257+
258+
public function setUser(User $User){
259+
$this->currentUser = $User;
260+
}
257261

258262
function setMySQLData($host, $username, $password, $database){
259263

classes/frontend/GUIFactory.class.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ public function buildQuickSearchLine(){
661661
// </editor-fold>
662662

663663
// <editor-fold defaultstate="collapsed" desc="buildFilteredWarningLine">
664-
public function buildFilteredWarningLine(){
664+
public function buildFilteredWarningLine($label = null){
665665
$dB = new Button("Filter löschen", "./images/i2/delete.gif", "icon");
666666
$dB->style("float:right;");
667667
$dB->rmePCR("HTML","","saveContextMenu", array("'deleteFilters'","'$this->collectionName'"), "if(checkResponse(transport)) contentManager.reloadFrame('contentRight');");
@@ -674,7 +674,7 @@ public function buildFilteredWarningLine(){
674674

675675
$BW->style("margin-right:5px;float:left;");
676676

677-
$wholeLine2 = array("$BW<span style=\"color:grey;\">Die Anzeige wurde gefiltert</span>");
677+
$wholeLine2 = array("$BW<span style=\"color:grey;\">Die Anzeige wurde gefiltert ".($label != null ? "nach $label" : "")."</span>");
678678
for($i = 1; $i < count($this->referenceLine) - 1; $i++)
679679
$wholeLine2[] = "";
680680

@@ -684,7 +684,7 @@ public function buildFilteredWarningLine(){
684684
$this->table->addRowColspan(1, count($this->referenceLine) - 1);
685685
$this->table->addRowClass("backgroundColor0");
686686
} else {
687-
$wholeLine2 = array($BW, $dB."<span style=\"color:grey;\">Die Anzeige wurde gefiltert</span>");
687+
$wholeLine2 = array($BW, $dB."<span style=\"color:grey;\">Die Anzeige wurde gefiltert ".($label != null ? "nach $label" : "")."</span>");
688688

689689
$this->table->addRow($wholeLine2);
690690
$this->table->addRowColspan(2, count($this->referenceLine) - 1);

classes/frontend/HTMLColGUI.class.php

+11-19
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,9 @@ function __toString() {
6464

6565
if($this->cols == 2){
6666
$html = "
67-
<div style=\"float:left;vertical-align:top;margin:0px;padding:0px;width:400px;\" id=\"contentScreenLeft\">
67+
<div style=\"display:inline-block;vertical-align:top;margin:0px;padding:0px;width:50%;\" id=\"contentScreenLeft\">
6868
".$this->content["left"]."
69-
</div>
70-
71-
72-
<div style=\"overflow:auto;margin-left:400px;vertical-align:top;border-left-style:solid;border-left-width:1px;margin:0px;min-height:400px;\" id=\"contentScreenRight\" class=\"borderColor1\">
69+
</div><div style=\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;overflow:auto;display:inline-block;width:50%;vertical-align:top;border-left-style:solid;border-left-width:1px;margin:0px;min-height:400px;\" id=\"contentScreenRight\" class=\"borderColor1\">
7370
".$this->content["right"]."
7471
</div>";
7572

@@ -86,35 +83,30 @@ function __toString() {
8683

8784
if($this->cols == 3){
8885
$html = "
89-
<div style=\"float:left;vertical-align:top;margin:0px;padding:0px;min-height:500px;\" id=\"contentScreenLeft\">
90-
<div style=\"overflow:auto;max-width:400px;margin-left:auto;border-left-style:solid;border-left-width:1px;vertical-align:top;\" class=\"borderColor1\">
86+
<div style=\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;display:inline-block;vertical-align:top;width:33%;margin:0px;padding:0px;min-height:500px;\" id=\"contentScreenLeft\">
87+
9188
".$this->content["left"]."
92-
</div>
93-
</div>
94-
95-
<div style=\"overflow:auto;float:left;width:33%;max-width:400px;vertical-align:top;border-left-style:solid;border-left-width:1px;margin:0px;padding:0px;min-height:500px;\" id=\"contentScreenCenter\" class=\"borderColor1\">
89+
90+
</div><div style=\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;overflow:auto;display:inline-block;width:33%;vertical-align:top;border-left-style:solid;border-left-width:1px;margin:0px;padding:0px;min-height:400px;\" id=\"contentScreenCenter\" class=\"borderColor1\">
9691
".$this->content["center"]."
97-
</div>
98-
99-
<div style=\"overflow:auto;float:left;width:33%;min-width:350px;max-width:400px;vertical-align:top;border-left-style:solid;border-left-width:1px;margin:0px;min-height:400px;\" id=\"contentScreenRight\" class=\"borderColor1\">
92+
</div><div style=\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;overflow:auto;display:inline-block;width:33%;vertical-align:top;border-left-style:solid;border-left-width:1px;margin:0px;min-height:400px;\" id=\"contentScreenRight\" class=\"borderColor1\">
10093
".$this->content["right"]."
10194
</div>";
10295

10396
$js = "function fitFrames(){
10497
if(!\$j('#contentScreenLeft').length)
10598
return;
10699
107-
var widthSL = (contentManager.maxWidth() - \$j('#contentScreenRight').outerWidth() - \$j('#contentScreenCenter').outerWidth() - 1)+'px';
100+
//var widthSL = (contentManager.maxWidth() - \$j('#contentScreenRight').outerWidth() - \$j('#contentScreenCenter').outerWidth() - 1)+'px';
108101
109102
110-
\$j('#contentScreenLeft').css('width', widthSL);
103+
//\$j('#contentScreenLeft').css('width', widthSL);
111104
112-
var height = contentManager.maxHeight() + 20;
105+
var height = contentManager.maxHeight();// + 20;
113106
114-
\$j('#contentScreenLeft div').first().css('height', height+'px');
107+
\$j('#contentScreenLeft').css('height', height+'px');
115108
\$j('#contentScreenRight').css('height', height+'px');
116109
\$j('#contentScreenCenter').css('height', height+'px');
117-
//\$j('#kontoTable').parent().css('height', (height - \$j('#headerFrame').outerHeight() - \$j('#headerFrame').next().outerHeight() - \$j('#uploadFrame').outerHeight() - 30)+'px');
118110
}";
119111
}
120112

classes/frontend/HTMLForm.class.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ public function setSaveRMEPCR($saveButtonLabel, $saveButtonBGIcon, $targetClass,
327327
}
328328

329329
if($onSuccessFunction != "" AND stripos($onSuccessFunction, "function(") === false)
330-
$onSuccessFunction = "function(){ $onSuccessFunction }";
330+
$onSuccessFunction = "function(transport){ $onSuccessFunction }";
331331

332332
$values = "";
333333
foreach($this->fields AS $f){

classes/frontend/HTMLGUIX.class.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ function getBrowserHTML($lineWithId = -1, $useBPS = true){
688688
if($this->showPageFlip)
689689
$GUIF->buildFlipPageLine("top");
690690

691-
if($this->object->isFiltered()) $GUIF->buildFilteredWarningLine();
691+
if($this->object->isFiltered()) $GUIF->buildFilteredWarningLine($this->object->isFilteredLabel());
692692

693693
$GUIF->buildNewEntryLine(($this->name == null ? $this->className : $this->name)." neu anlegen");
694694
}
@@ -731,7 +731,7 @@ function getBrowserHTML($lineWithId = -1, $useBPS = true){
731731
}
732732

733733
if($lineWithId == -1) {
734-
if($this->object->isFiltered()) $GUIF->buildFilteredWarningLine();
734+
if($this->object->isFiltered()) $GUIF->buildFilteredWarningLine($this->object->isFilteredLabel());
735735

736736
if($this->multiPageDetails["total"] > $this->multiPageDetails["perPage"] AND $this->showPageFlip)
737737
$GUIF->buildFlipPageLine("bottom");

classes/frontend/HTMLInput.class.php

+12
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ class HTMLInput {
4747
private $callback;
4848
private $maxlength;
4949
private $size;
50+
private $autocorrect = true;
51+
private $spellcheck = true;
5052

5153
public function __construct($name, $type = "text", $value = null, $options = null){
5254
$this->name = $name;
@@ -71,6 +73,14 @@ public function autocomplete($targetClass, $onSelectionFunction = null, $hideOnS
7173
return $cal;
7274
}
7375

76+
public function autocorrect($bool){
77+
$this->autocorrect = $bool;
78+
}
79+
80+
public function spellcheck($bool){
81+
$this->spellcheck = $bool;
82+
}
83+
7484
public function setType($type){
7585
$this->type = $type;
7686
}
@@ -320,6 +330,8 @@ class=\"multiEditInput2\"
320330
".($this->placeholder != null ? " placeholder=\"$this->placeholder\"" : "")."
321331
".($this->style != null ? " style=\"$this->style\"" : "")."
322332
name=\"$this->name\"
333+
".(!$this->autocorrect ? "autocorrect=\"off\"" : "")."
334+
".(!$this->spellcheck ? "spellcheck=\"false\"" : "")."
323335
".($this->className != null ? "class=\"$this->className\"" : "")."
324336
".($this->onkeyup != null ? "onkeyup=\"$this->onkeyup\"" : "")."
325337
".($this->onblur != null ? "onblur=\"$this->onblur\"" : "")."

classes/frontend/HTMLTable.class.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ function getHTML(){
327327
if(count($this->header) > 0){
328328
$rows .= "
329329
<thead>
330-
<tr>";
330+
<tr ".(isset($this->rowClasses[-1]) ? "class=\"".$this->rowClasses[-1]."\"" : "").">";
331331

332332
foreach($this->header as $K => $V){
333333
if($this->colOrder != null AND isset($this->colOrder[$K]))

classes/frontend/MenuGUI.class.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function getHTML($id){
3030
$es = $_SESSION["CurrentAppPlugins"]->getMenuEntries();
3131
$ts = $_SESSION["CurrentAppPlugins"]->getMenuTargets();
3232
$icons = $_SESSION["CurrentAppPlugins"]->getIcons();
33-
33+
3434
$appIco = $_SESSION["applications"]->getApplicationIcon($_SESSION["applications"]->getActiveApplication());
3535
if(isset($_COOKIE["phynx_color"]) AND $_COOKIE["phynx_color"] != "standard"){
3636
$suffix = strrchr($appIco,".");
@@ -46,7 +46,7 @@ public function getHTML($id){
4646

4747
$appMenuHidden = "";
4848
$appMenuDisplayed = "";
49-
$appMenuActive = (!$_SESSION["S"]->isUserAdmin() AND (!isset($_COOKIE["phynx_layout"]) OR $_COOKIE["phynx_layout"] == "fixed" OR $_COOKIE["phynx_layout"] == "horizontal" OR $_COOKIE["phynx_layout"] == "desktop"));
49+
$appMenuActive = (!$_SESSION["S"]->isUserAdmin() AND (!isset($_COOKIE["phynx_layout"]) OR $_COOKIE["phynx_layout"] == "fixed" OR $_COOKIE["phynx_layout"] == "horizontal" OR $_COOKIE["phynx_layout"] == "desktop" OR $_COOKIE["phynx_layout"] == "vertical"));
5050

5151
// <editor-fold defaultstate="collapsed" desc="Aspect:jP">
5252
$aspectAppMenuActive = Aspect::joinPoint("appMenuActive", $this, __METHOD__);
@@ -64,7 +64,7 @@ public function getHTML($id){
6464

6565

6666
$bigWorld = false;
67-
if(isset($_COOKIE["phynx_layout"]) AND $_COOKIE["phynx_layout"] == "desktop")
67+
if(isset($_COOKIE["phynx_layout"]) AND ($_COOKIE["phynx_layout"] == "desktop" OR $_COOKIE["phynx_layout"] == "vertical"))
6868
$bigWorld = true;
6969

7070
if(!$_SESSION["S"]->isUserAdmin()) {

classes/frontend/nicEditGUI.class.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function editInPopup($formID, $fieldName, $variablesCallback = null){
3636
setTimeout(function(){
3737
new nicEditor({
3838
iconsPath : './libraries/nicEdit/nicEditorIconsTiny.gif',
39-
buttonList : ['save','bold','italic','underline'],
39+
buttonList : ['save','bold','italic','underline','hr'],
4040
maxHeight : 400,
4141
4242
onSave : function(content, id, instance) {
@@ -64,7 +64,7 @@ public function openInPopup($className, $classID, $fieldName){
6464
setTimeout(function(){
6565
new nicEditor({
6666
iconsPath : './libraries/nicEdit/nicEditorIconsTiny.gif',
67-
buttonList : ['save','bold','italic','underline'],
67+
buttonList : ['save','bold','italic','underline','hr'],
6868
maxHeight : 400,
6969
7070
onSave : function(content, id, instance) {

classes/interfaces/iCategoryFilter.class.php

+1
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@
2020
interface iCategoryFilter {
2121
public function getAvailableCategories();
2222
public function getCategoryFieldName();
23+
public function getCategoryFieldLabel(array $KIDs);
2324
}
2425
?>

classes/toolbox/Factory.class.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ public function getUsedClassName(){
3434
return $this->className;
3535
}
3636

37-
public function __construct($className, $newParameter = -1){
37+
public function __construct($className, $newParameter = -1, $useParsers = true){
3838
$this->className = $className;
39-
$this->object = new $className($newParameter);
39+
$this->object = new $className($newParameter, $useParsers);
4040
$this->newParameter = $newParameter;
4141

4242
if(!$this->object instanceof PersistentObject)

classes/toolbox/TempFile.class.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ public function makeUpload($A, $quiet = false){
178178
$newFilename = Util::getTempFilename($_GET['qqfile'],"tmp");
179179
$output = fopen($newFilename, "w");
180180

181-
$realSize = stream_copy_to_stream($input, $output);
181+
stream_copy_to_stream($input, $output);
182182

183183
fclose($input);
184184
fclose($output);

classes/toolbox/Util.class.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -1215,14 +1215,16 @@ public static function PDFViewer($filename, $delete = true){
12151215
$_SESSION["BPS"]->setACProperty("filename","$filename");
12161216
$_SESSION["BPS"]->setACProperty("delete", $delete ? "1" : "0");
12171217
echo "<!DOCTYPE html><html><script type=\"text/javascript\">document.location='./showPDF.php';</script></html>";
1218-
} else echo "<!DOCTYPE html><html><script type=\"text/javascript\">document.location='../system/IECache/".$_SESSION["S"]->getCurrentUser()->getID()."/".basename($filename)."?rand=".rand(100, 1000000)."';</script></html>";
1218+
} else
1219+
echo "<!DOCTYPE html><html><script type=\"text/javascript\">document.location='../system/IECache/".$_SESSION["S"]->getCurrentUser()->getID()."/".basename($filename)."?rand=".rand(100, 1000000)."';</script></html>";
12191220
}
12201221

12211222
public static function showPDF($object, $callbackFunction = "getPDF"){
12221223
if(Util::usePDFViewer()){
12231224
$filename = $object->$callbackFunction(true);
12241225
Util::PDFViewer($filename);
1225-
} else $object->$callbackFunction(false);
1226+
} else
1227+
$object->$callbackFunction(false);
12261228
}
12271229

12281230
public static function genPassword($length=8) {

classes/toolbox/UtilGUI.class.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public static function EMailPopup($dataClass, $dataClassID, $callbackParameter =
6161
foreach($data["recipients"] AS $ID => $Rec)
6262
$recipients[$ID] = new HTMLInput ($Rec[0]." &lt;".$Rec[1]."&gt;", "option", $ID);;
6363

64-
$IS = new HTMLInput("EMailRecipient$dataClassID", "select", "0", $recipients);
64+
$IS = new HTMLInput("EMailRecipient$dataClassID", "select", isset($data["default"]) ? $data["default"] : "0", $recipients);
6565
$IS->id("EMailRecipient$dataClassID");
6666

6767
$tab->addLV("Empfänger:", $IS);

fheME/UPnP/UPnP.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ var UPnP = {
4747
overlay: '<div class="darkOverlay" id="UPnPOverlay" style="display:none;">\n\
4848
\n\
4949
<div id=\"UPnPLoading\" style=\"font-family:Roboto;font-size:30px;padding:10px;height:128px;width:500px;\">\n\
50-
<img src=\"./images/loading128.png\" style=\"float:left;margin-right:20px;margin-top:-25px;\" />Die verfügbaren Geräte<br />werden abgefragt...\n\
50+
<img src=\"./images/loading.svg\" style=\"float:left;margin-right:20px;margin-top:-25px;height:128px;width:128px;\" />Die verfügbaren Geräte<br />werden abgefragt...\n\
5151
</div>\n\
5252
\n\
5353
</div>',

fheME/trinityDB/trinityDB.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ var trinityDB = {
2323
overlay: '<div class="lightOverlay" id="trinityDBOverlay" style="display:none;">\n\
2424
\n\
2525
<div id=\"trinityDBLoading\" style=\"font-family:Roboto;font-size:30px;padding:10px;height:128px;width:500px;\">\n\
26-
<img src=\"./images/loading128.png\" style=\"float:left;margin-right:20px;margin-top:-25px;\" />Die Verbindung<br />wird aufgebaut...\n\
26+
<img src=\"./images/loading.svg\" style=\"float:left;margin-right:20px;margin-top:-25px;height:128px;width:128px;\" />Die Verbindung<br />wird aufgebaut...\n\
2727
</div>\n\
2828
\n\
2929
</div>',

0 commit comments

Comments
 (0)