bohr 2477
Fix insert map feature
U branches/1.0beta2update4.1/serverbuild/bohr.n
U branches/1.0beta2update4.1/serverbuild/bohr.swf
U branches/1.0beta2update4.1/source/client/IoHelper.hx
U branches/1.0beta2update4.1/source/client/Main.hx
U branches/1.0beta2update4.1/source/client/ServiceClient.hx
U branches/1.0beta2update4.1/source/client/io/IoManager.hx
U branches/1.0beta2update4.1/source/server/Service.hx
U branches/1.0beta2update4.1/source/server/db/MapManager.hx
U branches/1.0beta2update4.1/source/shared/ServiceFacade.hx
-- Provided by, CVSDude, http://cvsdude.com. Professional CVS and SVN outsourcing --
Modified: branches/1.0beta2update4.1/serverbuild/bohr.n
===================================================================
(Binary files differ)
Modified: branches/1.0beta2update4.1/serverbuild/bohr.swf
===================================================================
(Binary files differ)
Modified: branches/1.0beta2update4.1/source/client/IoHelper.hx
===================================================================
--- branches/1.0beta2update4.1/source/client/IoHelper.hx 2006-12-26 17:51:16 UTC (rev 2476)
+++ branches/1.0beta2update4.1/source/client/IoHelper.hx 2007-01-01 19:27:53 UTC (rev 2477)
@@ -423,12 +423,12 @@
} else after();
}
- public static function loadRemote(description: MapDescription, process: Map -> Void, error: Void -> Void): Void {
- autoLogin(function () { doLoadRemote(description, process, error); }, error);
+ public static function loadRemote(description: MapDescription, justReturnData:Bool, process: Map -> Void, error: Void -> Void): Void {
+ autoLogin(function () { doLoadRemote(description, justReturnData, process, error); }, error);
}
- static function doLoadRemote(description: MapDescription, process: Map -> Void, error: Void -> Void): Void {
- ServiceClient.Instance.loadMap(description, function (xml) {
+ static function doLoadRemote(description: MapDescription, justReturnData:Bool, process: Map -> Void, error: Void -> Void): Void {
+ ServiceClient.Instance.loadMap(description, justReturnData, function (xml) {
if (null != xml && "" != xml) {
var data = TopicDataSerializer.fromRach(xml);
process(ConvertHelper.parseMapData(data));
Modified: branches/1.0beta2update4.1/source/client/Main.hx
===================================================================
--- branches/1.0beta2update4.1/source/client/Main.hx 2006-12-26 17:51:16 UTC (rev 2476)
+++ branches/1.0beta2update4.1/source/client/Main.hx 2007-01-01 19:27:53 UTC (rev 2477)
@@ -133,7 +133,7 @@
#if desktop
var loadfunction = Controller.get().ioManager.loadDesktop;
#else standalone
- var loadfunction = IoHelper.loadRemote;
+ var loadfunction = function (desc, onresult, onerror) { IoHelper.loadRemote(desc, false, onresult, onerror);};
#end
loadfunction({id: null, name: mmap, owner: owner, access: null, source: source},
function (map) { if (map != null) initMap(loadMap(map), ok, true); else showStartupDialog(true, true); },
Modified: branches/1.0beta2update4.1/source/client/ServiceClient.hx
===================================================================
--- branches/1.0beta2update4.1/source/client/ServiceClient.hx 2006-12-26 17:51:16 UTC (rev 2476)
+++ branches/1.0beta2update4.1/source/client/ServiceClient.hx 2007-01-01 19:27:53 UTC (rev 2477)
@@ -253,8 +253,8 @@
invoke([map], onResult, onError, false);
}
- public function loadMap(description: MapDescription, onResult: String -> Void, onError: Void -> Void) {
- invoke([description], onResult, onError, false);
+ public function loadMap(description: MapDescription, justReturnData:Bool, onResult: String -> Void, onError: Void -> Void) {
+ invoke([description, justReturnData], onResult, onError, false);
}
public function listMaps(onResult: Array<MapDescription> -> Void, onError: Void -> Void) {
Modified: branches/1.0beta2update4.1/source/client/io/IoManager.hx
===================================================================
--- branches/1.0beta2update4.1/source/client/io/IoManager.hx 2006-12-26 17:51:16 UTC (rev 2476)
+++ branches/1.0beta2update4.1/source/client/io/IoManager.hx 2007-01-01 19:27:53 UTC (rev 2477)
@@ -73,10 +73,10 @@
}
}
- public function loadServer(desc: MapDescription, loadFunction: Map -> Void, onError: Void -> Void) {
+ public function loadServer(desc: MapDescription, justReturnData:Bool, loadFunction: Map -> Void, onError: Void -> Void) {
var me = this;
loadFunction = if (null == loadFunction) controller.load else loadFunction;
- loadMap(desc, function () { IoHelper.loadRemote(desc, loadFunction, onError); }, onError);
+ loadMap(desc, function () { IoHelper.loadRemote(desc, justReturnData, loadFunction, onError); }, onError);
}
public function loadDesktop(desc: MapDescription, loadFunction: Map -> Void, onError: Void -> Void) {
@@ -264,7 +264,7 @@
public function showOpenServerDialog(onOk: Void -> Void, onCancel: Void -> Void) {
var me = this;
- showOpenDialog(function (md) { me.loadServer(md, null, onCancel); }, function (process) { IoHelper.listRemoteMaps(process, if (null == onCancel) me.showOpenFailedDialog else onCancel); },
+ showOpenDialog(function (md) { me.loadServer(md, false, null, onCancel); }, function (process) { IoHelper.listRemoteMaps(process, if (null == onCancel) me.showOpenFailedDialog else onCancel); },
onOk, onCancel, IoHelper.deleteRemoteMap);
}
@@ -278,7 +278,7 @@
public function showInsertServerMapDialog() {
var me = this;
- showOpenDialog(function (md) { me.loadServer(md, me.pasteMap, null); }, function (process) { IoHelper.listRemoteMaps(process, null); },
+ showOpenDialog(function (md) { me.loadServer(md, true, me.pasteMap, null); }, function (process) { IoHelper.listRemoteMaps(process, null); },
null, null, IoHelper.deleteRemoteMap);
}
Modified: branches/1.0beta2update4.1/source/server/Service.hx
===================================================================
--- branches/1.0beta2update4.1/source/server/Service.hx 2006-12-26 17:51:16 UTC (rev 2476)
+++ branches/1.0beta2update4.1/source/server/Service.hx 2007-01-01 19:27:53 UTC (rev 2477)
@@ -114,9 +114,9 @@
}
}
- public function loadMap(clientID: String, description: MapDescription): String {
+ public function loadMap(clientID: String, description: MapDescription, justReturnData:Bool): String {
try {
- var md = if (db.Session.manager.validate(clientID)) db.Map.manager.loadMap(clientID, description) else null;
+ var md = if (db.Session.manager.validate(clientID)) db.Map.manager.loadMap(clientID, description, justReturnData) else null;
return TopicDataSerializer.exportRach(md);
} catch (s: Dynamic) {
// returning an empty mapdata
Modified: branches/1.0beta2update4.1/source/server/db/MapManager.hx
===================================================================
--- branches/1.0beta2update4.1/source/server/db/MapManager.hx 2006-12-26 17:51:16 UTC (rev 2476)
+++ branches/1.0beta2update4.1/source/server/db/MapManager.hx 2007-01-01 19:27:53 UTC (rev 2477)
@@ -33,7 +33,7 @@
return search({name: name, ownerName: owner}, lock).first();
}
- public function loadMap(clientID: String, description: MapDescription): MapData {
+ public function loadMap(clientID: String, description: MapDescription, justReturnData:Bool): MapData {
// defaulting owner to current user
var owner = if (null == description.owner) Session.manager.getSession(clientID, true).user.name
else description.owner;
@@ -44,7 +44,7 @@
} else {
description.access = map.userAccess(Session.manager.getSession(clientID, true).user);
var data = Topic.manager.loadMap(map);
- if (null != data) {
+ if (null != data && !justReturnData) {
Command.manager.broadcastEditors(map, Session.manager.getSession(clientID, true));
Session.manager.setMap(clientID, map);
}
Modified: branches/1.0beta2update4.1/source/shared/ServiceFacade.hx
===================================================================
--- branches/1.0beta2update4.1/source/shared/ServiceFacade.hx 2006-12-26 17:51:16 UTC (rev 2476)
+++ branches/1.0beta2update4.1/source/shared/ServiceFacade.hx 2007-01-01 19:27:53 UTC (rev 2477)
@@ -22,7 +22,7 @@
public function saveMap(clientID: String, map: MapData): SaveMapResult;
- public function loadMap(clientID: String, description: MapDescription): String;
+ public function loadMap(clientID: String, description: MapDescription, justReturnData:Bool): String;
public function listMaps(clientID: String): Array<MapDescription>;