Author: lgiessmann Date: Fri Nov 26 06:02:28 2010 New Revision: 352
Log: Isidorus-UI: fixed ticket #95 => deleted objects are not only deleted in the backend, but also in the frontend, so a recommit of the data contains in the UI does not recreate the removed object
Modified: trunk/src/ajax/javascripts/datamodel.js trunk/src/rest_interface/set-up-json-interface.lisp
Modified: trunk/src/ajax/javascripts/datamodel.js ============================================================================== --- trunk/src/ajax/javascripts/datamodel.js (original) +++ trunk/src/ajax/javascripts/datamodel.js Fri Nov 26 06:02:28 2010 @@ -4421,18 +4421,22 @@ makePage(PAGES.home, ""); } else if (type === "Occurrence" || type === "Name"){ - if(objectToDelete.__owner__.__frames__.length > objectToDelete.__max__ - && objectToDelete.__owner__.__frames__.length > 1){ + if(objectToDelete.__owner__.__frames__.length >= 1 && + objectToDelete.__owner__.__frames__.length > objectToDelete.__min__){ objectToDelete.remove(); } else { - if(type === "Occurrence"){ objectToDelete.__value__.setValue(""); } + if(type === "Occurrence"){ + objectToDelete.__value__.setValue(""); + objectToDelete.disable(); + } else { objectToDelete.__value__.__frames__[0].__content__.setValue(""); var vars = objectToDelete.__variants__; objectToDelete.__variants__ = new VariantContainerC(null, objectToDelete); vars.append(objectToDelete.__variants__.getFrame()); vars.remove(); + objectToDelete.disable(); } var ii = objectToDelete.__itemIdentity__; objectToDelete.__itemIdentity__ = new ItemIdentityC(null, objectToDelete);
Modified: trunk/src/rest_interface/set-up-json-interface.lisp ============================================================================== --- trunk/src/rest_interface/set-up-json-interface.lisp (original) +++ trunk/src/rest_interface/set-up-json-interface.lisp Fri Nov 26 06:02:28 2010 @@ -10,9 +10,10 @@ (in-package :rest-interface)
;caching tables -(defparameter *type-table* nil) -(defparameter *instance-table* nil) - +(defparameter *type-table* nil "Cointains integer==OIDs that represent a topic + instance of a vylid type-topic") +(defparameter *instance-table* nil "Cointains integer==OIDs that represent a topic + instance of a valid instance-topic")
;the prefix to get a fragment by the psi -> localhost:8000/json/get/<fragment-psi> (defparameter *json-get-prefix* "/json/get/(.+)$")