From abd6cc197a77759a9f3bdd4a58cd9a88e676efd5 Mon Sep 17 00:00:00 2001 From: dustin-H Date: Mon, 20 Jan 2014 14:52:57 +0100 Subject: [PATCH] some bugs should be fixed issue #5 --- bin/client/config.json | 7 ++++++- bin/client/index.php | 11 +++++++++-- bin/client/script.js | 18 +++++++++++------- bin/server/data/38f7mn71rp.json | 2 +- bin/server/data/3aqcmdb59o.json | 2 +- bin/server/data/3wr7bw9diw.json | 2 +- bin/server/data/3z203p3kmo.json | 2 +- bin/server/serverBuild.js | 4 ++-- source/client-side/data.js | 9 +++++---- source/client-side/static_items.js | 4 +++- source/client-side/sync_L3.js | 3 ++- source/client-style/index.php | 11 +++++++++-- 12 files changed, 51 insertions(+), 24 deletions(-) diff --git a/bin/client/config.json b/bin/client/config.json index 4108969..e5aba17 100644 --- a/bin/client/config.json +++ b/bin/client/config.json @@ -1 +1,6 @@ -{"serveraddress": "ws://localhost:9343","addressalert": false} \ No newline at end of file + +{ + "serveraddress": "ws://localhost:9343", + "addressalert": false +} + diff --git a/bin/client/index.php b/bin/client/index.php index 6314899..483ca1a 100644 --- a/bin/client/index.php +++ b/bin/client/index.php @@ -21,7 +21,14 @@ # Version/Release...............: 0.5xx # ******************************************************************************************/--> - + @@ -30,7 +37,7 @@ pragm - + diff --git a/bin/client/script.js b/bin/client/script.js index 6aeb5e8..456f376 100644 --- a/bin/client/script.js +++ b/bin/client/script.js @@ -1,4 +1,4 @@ -var clientversion = "0.609"/****************************************************************************************** +var clientversion = "0.625"/****************************************************************************************** # # Copyright 2014 Dustin Robert Hoffner # @@ -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){ @@ -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; } @@ -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); } @@ -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){ @@ -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(); diff --git a/bin/server/data/38f7mn71rp.json b/bin/server/data/38f7mn71rp.json index 1bf6f24..e97d3f1 100644 --- a/bin/server/data/38f7mn71rp.json +++ b/bin/server/data/38f7mn71rp.json @@ -1 +1 @@ -{"1007246082":"0240200400jkjk","1009058502":"0146152400nmbnm","1031111111":"LALkkk,mA","1031111112":"Sunday 1.December 2013
22:42"} \ No newline at end of file +{"1008444473":"0063365400ngmfnmgnfmg","1009058502":"0016103818
  1. Welche finanziellen Mittel sind in der Mittelfristplanung für das Projekt eingestellt?
  2. Welche Anforderungen an das Projektresultat bestehen?
  3. Welche Ziele sind mit dem Projekt zu erreichen?
  4. Welcher Nutzen (technisch und wirtschaftlich) kann durch das Projekt erzielt werden?
  5. Welcher zeitliche Horizont ist für das Projekt notwendig, um die Projektziele zu erreichen?
  6. Welche Aufgaben werden im Projekt benötigt?
  7. Welche Rollen und Stakeholder braucht es im Projekt?
  8. Welche Risiken sind bereits im Vorfeld des Projektes bekannt?

","1031111111":"Fragen die vor der eigentlichen Projektarbeit geklärt werden müssen:","1031111112":"Monday 20.Januar 2014
13:33"} \ No newline at end of file diff --git a/bin/server/data/3aqcmdb59o.json b/bin/server/data/3aqcmdb59o.json index 0c6e07f..9b0d001 100644 --- a/bin/server/data/3aqcmdb59o.json +++ b/bin/server/data/3aqcmdb59o.json @@ -1 +1 @@ -{"1003884698":"4137-471400XXX","1007727039":"0084115400This is an Test","1031111111":"debug","1031111112":"Sunday 1.December 2013
22:42"} \ No newline at end of file +{"1003383164":"0259081400dfdfdfdf","1003884698":"4137-471400XXX","1007727039":"0084115400This is an Test","1031111111":"debug","1031111112":"Sunday 1.December 2013
22:42"} \ No newline at end of file diff --git a/bin/server/data/3wr7bw9diw.json b/bin/server/data/3wr7bw9diw.json index a8a4b69..a3493c9 100644 --- a/bin/server/data/3wr7bw9diw.json +++ b/bin/server/data/3wr7bw9diw.json @@ -1 +1 @@ -{"1004259852":"0159279400nmn,nb,","1031111111":"NewTestm,mn","1031111112":"Sunday 1.December 2013
22:42"} \ No newline at end of file +{"1001458662":"0080144400jhgkhkhjgkhjfg fdh fgh fhd fg","1003097433":"0212076400BLAd fsdg ","1003765865":"0149106400vbxcvbxc","1005470747":"0308132400fgdfgsdfg","1007263323":"0107091400klbhbkbhbjbkhjbkbj","1031111111":"NewTestm,mn gh fgh fgh gh fghfjg","1031111112":"Sundagy 1.December 2013
22:42"} \ No newline at end of file diff --git a/bin/server/data/3z203p3kmo.json b/bin/server/data/3z203p3kmo.json index 8ae0c18..2c15a52 100644 --- a/bin/server/data/3z203p3kmo.json +++ b/bin/server/data/3z203p3kmo.json @@ -1 +1 @@ -{"1008797109":"0020114323Hi Google!","1031111111":"Hello World","1031111112":"Saturday 7. November 2042
12:42"} \ No newline at end of file +{"1006291506":"0420073400,nm,nmn,n,nmnnmnmnm","1006305716":"0452155400,.m.vm.xcmvy.,xcmv.","1006404261":"0133357400.smfd,sdd,smgsc,rji","1008797109":"0020114323Hi Google! kddln n ll,m m,m","1009719105":"0380216400.,.,.,..,.g ,fdg.sd f,g.","1031111111":"Saturday 7. Novemer","1031111112":"Saturday 7. November 2042
12:42"} \ No newline at end of file diff --git a/bin/server/serverBuild.js b/bin/server/serverBuild.js index 40ca08d..9d57a16 100644 --- a/bin/server/serverBuild.js +++ b/bin/server/serverBuild.js @@ -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 diff --git a/source/client-side/data.js b/source/client-side/data.js index 7556b7e..d63fb2f 100644 --- a/source/client-side/data.js +++ b/source/client-side/data.js @@ -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){ @@ -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; } @@ -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); } diff --git a/source/client-side/static_items.js b/source/client-side/static_items.js index f66cd4b..be8adaa 100644 --- a/source/client-side/static_items.js +++ b/source/client-side/static_items.js @@ -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){ diff --git a/source/client-side/sync_L3.js b/source/client-side/sync_L3.js index fd5e532..6520056 100644 --- a/source/client-side/sync_L3.js +++ b/source/client-side/sync_L3.js @@ -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(); diff --git a/source/client-style/index.php b/source/client-style/index.php index 1bc6cde..397a73c 100644 --- a/source/client-style/index.php +++ b/source/client-style/index.php @@ -21,7 +21,14 @@ # Version/Release...............: 0.5xx # ******************************************************************************************/--> - + @@ -30,7 +37,7 @@ pragm - +