Skip to content

Commit

Permalink
some bugs should be fixed
Browse files Browse the repository at this point in the history
issue #5
  • Loading branch information
dustin-H committed Jan 20, 2014
1 parent 5450867 commit abd6cc1
Show file tree
Hide file tree
Showing 12 changed files with 51 additions and 24 deletions.
7 changes: 6 additions & 1 deletion bin/client/config.json
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
{"serveraddress": "ws://localhost:9343","addressalert": false}

{
"serveraddress": "ws://localhost:9343",
"addressalert": false
}

11 changes: 9 additions & 2 deletions bin/client/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@
# Version/Release...............: 0.5xx
#
******************************************************************************************/-->

<?php
$temp = trim(file_get_contents('config.json'));
$temp = str_replace ("\t","",$temp);
$temp = str_replace ("\n","",$temp);
$temp = str_replace ("\r","",$temp);
$temp = str_replace ("\0","",$temp);
$temp = str_replace ("\x0B","",$temp);
?>
<!DOCTYPE HTML>
<html>
<head>
Expand All @@ -30,7 +37,7 @@
<title id="title">pragm</title>
<link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300,600' rel='stylesheet' type='text/css'>
<script type="text/javascript">var globalconfig = '<?php echo file_get_contents('config.json'); ?>';</script>
<script type="text/javascript">var globalconfig = '<?php echo $temp; ?>';</script>


<script type="text/javascript" src="script.js"></script>
Expand Down
18 changes: 11 additions & 7 deletions bin/client/script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var clientversion = "0.609"/******************************************************************************************
var clientversion = "0.625"/******************************************************************************************
#
# Copyright 2014 Dustin Robert Hoffner
#
Expand Down Expand Up @@ -1034,7 +1034,7 @@ var color = new color_typ();
var data_typ = function data_typ(){

this.fileList;
this.files = new Array(); //Struktur: files[fileID][contentID] = content;
this.files = { }; //Struktur: files[fileID][contentID] = content;
this.users;

this.edited_sync = function(fileID, contentID){
Expand All @@ -1044,6 +1044,7 @@ var data_typ = function data_typ(){
textbox.setid(contentID, data.files[fileID][contentID]);
break;
case '103':
console.log(contentID);
staticItems.setid(contentID, data.files[fileID][contentID]);
break;
}
Expand All @@ -1055,17 +1056,17 @@ var data_typ = function data_typ(){

this.reset = function(){
this.fileList = "";
this.files = new Array();
this.files = { };
this.users = "";
}

this.delete_UI = function(id){
data.files[L3.file].splice(id, 1);
delete data.files[L3.file][id];
L3.delete(id);
}

this.delete_sync = function(id){
data.files[L3.file].splice(id, 1);
delete data.files[L3.file][id];
textbox.removeElement("editarea"+id);
}

Expand Down Expand Up @@ -2350,7 +2351,9 @@ var SimplebSocket = function(url)
var staticItems_typ = function staticItems_typ(){

this.setid = function(id, content){
document.getElementById(id).innerHTML = content;
if(document.getElementById(id)){
document.getElementById(id).innerHTML = content; //TODO: Tryes to call ID 1031111110
}
};

this.saveid = function(id){
Expand Down Expand Up @@ -2586,10 +2589,11 @@ var L3_typ = function L3_typ(){
this.loadFile = function(id){
L3.file = id;
if(!data.files[id]) {
data.files[id] = new Array();
data.files[id] = { };
} else {
for(key in data.files[id]){
data.edited_sync(id, key);
console.log("load: "+id);
}
}
uiControl.loadHandler();
Expand Down
2 changes: 1 addition & 1 deletion bin/server/data/38f7mn71rp.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"1007246082":"0240200400jkjk","1009058502":"0146152400nmbnm","1031111111":"LALkkk,mA","1031111112":"Sunday 1.December 2013<br>22:42"}
{"1008444473":"0063365400ngmfnmgnfmg","1009058502":"0016103818<div><ol><li><font face=\"Tahoma\" size=\"4\"><span style=\"background-color: transparent;\">Welche finanziellen Mittel sind in der Mittelfristplanung für das Projekt eingestellt?</span><br></font></li><li><font face=\"Tahoma\" size=\"4\"><span style=\"background-color: transparent;\">Welche Anforderungen an das Projektresultat bestehen?</span><br></font></li><li><font face=\"Tahoma\" size=\"4\"><span style=\"background-color: transparent;\">Welche Ziele sind mit dem Projekt zu erreichen?</span><br></font></li><li><font face=\"Tahoma\" size=\"4\"><span style=\"background-color: transparent;\">Welcher Nutzen (technisch und wirtschaftlich) kann durch das Projekt erzielt werden?</span><br></font></li><li><font face=\"Tahoma\" size=\"4\"><span style=\"background-color: transparent;\">Welcher zeitliche Horizont ist für das Projekt notwendig, um die Projektziele zu erreichen?</span><br></font></li><li><font face=\"Tahoma\" size=\"4\"><span style=\"background-color: transparent;\">Welche Aufgaben werden im Projekt benötigt?</span><br></font></li><li><font face=\"Tahoma\" size=\"4\"><span style=\"background-color: transparent;\">Welche Rollen und Stakeholder braucht es im Projekt?</span><br></font></li><li><span style=\"background-color: transparent;\"><font face=\"Tahoma\" size=\"4\">Welche Risiken sind bereits im Vorfeld des Projektes bekannt?</font></span></li></ol></div><div><br></div>","1031111111":"Fragen die vor der eigentlichen Projektarbeit geklärt werden müssen:","1031111112":"Monday 20.Januar 2014<br>13:33"}
2 changes: 1 addition & 1 deletion bin/server/data/3aqcmdb59o.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"1003884698":"4137-471400XXX","1007727039":"0084115400This is an Test","1031111111":"debug","1031111112":"Sunday 1.December 2013<br>22:42"}
{"1003383164":"0259081400dfdfdfdf","1003884698":"4137-471400XXX","1007727039":"0084115400This is an Test","1031111111":"debug","1031111112":"Sunday 1.December 2013<br>22:42"}
2 changes: 1 addition & 1 deletion bin/server/data/3wr7bw9diw.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"1004259852":"0159279400nmn,nb,","1031111111":"NewTestm,mn","1031111112":"Sunday 1.December 2013<br>22:42"}
{"1001458662":"0080144400jhgkhkhjgkhjfg fdh fgh fhd fg","1003097433":"0212076400BLAd fsdg&nbsp;","1003765865":"0149106400vbxcvbxc","1005470747":"0308132400fgdfgsdfg","1007263323":"0107091400klbhbkbhbjbkhjbkbj","1031111111":"NewTestm,mn gh fgh fgh gh fghfjg","1031111112":"Sundagy 1.December 2013<br>22:42"}
2 changes: 1 addition & 1 deletion bin/server/data/3z203p3kmo.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"1008797109":"0020114323<font size=\"7\">Hi</font><font size=\"7\" color=\"rgba(0, 0, 0, 0)\"> </font><font size=\"7\" color=\"#0090ff\">G</font><font size=\"7\" color=\"#ff0000\">o</font><font size=\"7\" color=\"#ffca00\">o</font><font size=\"7\" color=\"#0090ff\">g</font><font size=\"7\" color=\"#00ca01\">l</font><font size=\"7\" color=\"#ff0000\">e</font><font size=\"7\">!</font>","1031111111":"Hello World","1031111112":"Saturday 7. November 2042<br>12:42"}
{"1006291506":"0420073400,nm,nmn,n,nmnnmnmnm","1006305716":"0452155400,.m.vm.xcmvy.,xcmv.","1006404261":"0133357400.smfd,sdd,smgsc,rji","1008797109":"0020114323<font size=\"7\">Hi</font><font size=\"7\" color=\"rgba(0, 0, 0, 0)\"> </font><font size=\"7\" color=\"#0090ff\">G</font><font size=\"7\" color=\"#ff0000\">o</font><font size=\"7\" color=\"#ffca00\">o</font><font size=\"7\" color=\"#0090ff\">g</font><font size=\"7\" color=\"#00ca01\">l</font><font size=\"7\" color=\"#ff0000\">e</font><font size=\"7\">! kddln n ll,m m,m</font>","1009719105":"0380216400.,.,.,..,.g ,fdg.sd f,g.","1031111111":"Saturday 7. Novemer","1031111112":"Saturday 7. November 2042<br>12:42"}
4 changes: 2 additions & 2 deletions bin/server/serverBuild.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//Server-Build Version: BETA => 0.609
console.log(""); console.log("pragm-Websocket-Server => BUILD 0.609 BETA"); console.log("");
//Server-Build Version: BETA => 0.625
console.log(""); console.log("pragm-Websocket-Server => BUILD 0.625 BETA"); console.log("");
/******************************************************************************************
#
# Copyright 2014 Dustin Robert Hoffner
Expand Down
9 changes: 5 additions & 4 deletions source/client-side/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
var data_typ = function data_typ(){

this.fileList;
this.files = new Array(); //Struktur: files[fileID][contentID] = content;
this.files = { }; //Struktur: files[fileID][contentID] = content;
this.users;

this.edited_sync = function(fileID, contentID){
Expand All @@ -36,6 +36,7 @@ var data_typ = function data_typ(){
textbox.setid(contentID, data.files[fileID][contentID]);
break;
case '103':
console.log(contentID);
staticItems.setid(contentID, data.files[fileID][contentID]);
break;
}
Expand All @@ -47,17 +48,17 @@ var data_typ = function data_typ(){

this.reset = function(){
this.fileList = "";
this.files = new Array();
this.files = { };
this.users = "";
}

this.delete_UI = function(id){
data.files[L3.file].splice(id, 1);
delete data.files[L3.file][id];
L3.delete(id);
}

this.delete_sync = function(id){
data.files[L3.file].splice(id, 1);
delete data.files[L3.file][id];
textbox.removeElement("editarea"+id);
}

Expand Down
4 changes: 3 additions & 1 deletion source/client-side/static_items.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
var staticItems_typ = function staticItems_typ(){

this.setid = function(id, content){
document.getElementById(id).innerHTML = content;
if(document.getElementById(id)){
document.getElementById(id).innerHTML = content; //TODO: Tryes to call ID 1031111110
}
};

this.saveid = function(id){
Expand Down
3 changes: 2 additions & 1 deletion source/client-side/sync_L3.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,11 @@ var L3_typ = function L3_typ(){
this.loadFile = function(id){
L3.file = id;
if(!data.files[id]) {
data.files[id] = new Array();
data.files[id] = { };
} else {
for(key in data.files[id]){
data.edited_sync(id, key);
console.log("load: "+id);
}
}
uiControl.loadHandler();
Expand Down
11 changes: 9 additions & 2 deletions source/client-style/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@
# Version/Release...............: 0.5xx
#
******************************************************************************************/-->

<?php
$temp = trim(file_get_contents('config.json'));
$temp = str_replace ("\t","",$temp);
$temp = str_replace ("\n","",$temp);
$temp = str_replace ("\r","",$temp);
$temp = str_replace ("\0","",$temp);
$temp = str_replace ("\x0B","",$temp);
?>
<!DOCTYPE HTML>
<html>
<head>
Expand All @@ -30,7 +37,7 @@
<title id="title">pragm</title>
<link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300,600' rel='stylesheet' type='text/css'>
<script type="text/javascript">var globalconfig = '<?php echo file_get_contents('config.json'); ?>';</script>
<script type="text/javascript">var globalconfig = '<?php echo $temp; ?>';</script>

<!-- #buildSoftwareCut# -->

Expand Down

0 comments on commit abd6cc1

Please sign in to comment.