From 2c94c7ff9a8efbdcb18c1157e2bbfe9cae14b9a2 Mon Sep 17 00:00:00 2001 From: paul gendreau Date: Sun, 4 Dec 2011 12:48:15 -0500 Subject: [PATCH 1/2] made some changes for deleted apps --- .../aiagallery/source/class/aiagallery/dbif/Constants.js | 4 +++- .../aiagallery/source/class/aiagallery/dbif/MApps.js | 8 ++++---- .../aiagallery/source/class/aiagallery/dbif/ObjAppData.js | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/frontendfsm/aiagallery/source/class/aiagallery/dbif/Constants.js b/frontendfsm/aiagallery/source/class/aiagallery/dbif/Constants.js index 0be3abe..6dee6a2 100644 --- a/frontendfsm/aiagallery/source/class/aiagallery/dbif/Constants.js +++ b/frontendfsm/aiagallery/source/class/aiagallery/dbif/Constants.js @@ -31,6 +31,7 @@ qx.Class.define("aiagallery.dbif.Constants", Banned : 0, Pending : 1, Active : 2 + Deleted : 3 }, /** Reverse mapping of status: values to names */ @@ -38,7 +39,8 @@ qx.Class.define("aiagallery.dbif.Constants", [ "Banned", "Pending", - "Active" + "Active", + "Deleted" ], /** Mapping of FlagType names to values */ diff --git a/frontendfsm/aiagallery/source/class/aiagallery/dbif/MApps.js b/frontendfsm/aiagallery/source/class/aiagallery/dbif/MApps.js index c41211c..589bd5c 100644 --- a/frontendfsm/aiagallery/source/class/aiagallery/dbif/MApps.js +++ b/frontendfsm/aiagallery/source/class/aiagallery/dbif/MApps.js @@ -74,9 +74,9 @@ qx.Mixin.define("aiagallery.dbif.MApps", }); // Convert from numeric to string status - app.status = [ "Banned", "Pending", "Active" ][app.status]; - - + app.status = [ "Banned", "Pending", "Active","Deleted" ] + [app.status]; + }, /** @@ -221,7 +221,7 @@ qx.Mixin.define("aiagallery.dbif.MApps", searchObj = new aiagallery.dbif.ObjSearch([obj["word"], obj["appId"], obj["appField"]]); - searchObj.removeSelf(); + searchObj.deleteApp(); }); } }, diff --git a/frontendfsm/aiagallery/source/class/aiagallery/dbif/ObjAppData.js b/frontendfsm/aiagallery/source/class/aiagallery/dbif/ObjAppData.js index 4f98880..1ae3af2 100644 --- a/frontendfsm/aiagallery/source/class/aiagallery/dbif/ObjAppData.js +++ b/frontendfsm/aiagallery/source/class/aiagallery/dbif/ObjAppData.js @@ -100,7 +100,7 @@ qx.Class.define("aiagallery.dbif.ObjAppData", /** Total number of comments on this application */ "numComments" : "Integer", - /** Status of this application (active, pending, banned) */ + /** Status of this application (active, pending, banned, deleted) */ "status" : "Integer", /** Total number of flags on this application */ From ed9c3d202fd8ccb0854e168a083ae25cdf98d612 Mon Sep 17 00:00:00 2001 From: paul gendreau Date: Sun, 4 Dec 2011 13:11:01 -0500 Subject: [PATCH 2/2] fixed a grammer error --- .../aiagallery/source/class/aiagallery/dbif/Constants.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontendfsm/aiagallery/source/class/aiagallery/dbif/Constants.js b/frontendfsm/aiagallery/source/class/aiagallery/dbif/Constants.js index 6dee6a2..281347a 100644 --- a/frontendfsm/aiagallery/source/class/aiagallery/dbif/Constants.js +++ b/frontendfsm/aiagallery/source/class/aiagallery/dbif/Constants.js @@ -30,7 +30,7 @@ qx.Class.define("aiagallery.dbif.Constants", { Banned : 0, Pending : 1, - Active : 2 + Active : 2, Deleted : 3 },