removed the Undo in ajax fkey
[clinton/lisp-on-lines.git] / src / components / ajax.lisp
index 7552c41..9092f24 100644 (file)
@@ -165,8 +165,6 @@ but here's what i use."
        :class "auto-complete-list-item"
        (funcall (render auto-complete) value))))))
 
-
-
 (defcomponent fkey-auto-complete (auto-complete)
   ())
 
@@ -206,9 +204,11 @@ but here's what i use."
          
 (defaction revert-foreign-slot ((slot ajax-foreign-key-slot-presentation))
   (setf (lol::value (live-search slot)) nil)
-  (mewa::sync-foreign-instance slot (original-value slot)))
+  (when (original-value slot)
+  (mewa::sync-foreign-instance slot (original-value slot))))
 
 (defmethod present-slot :around ((slot ajax-foreign-key-slot-presentation) instance)
+
   (let ((foreign-instance 
         (if (lol::value (live-search slot))
             (lol::value (live-search slot))
@@ -228,7 +228,7 @@ but here's what i use."
                                                     :type :one-line))))))
            
             (<ucw:render-component :component (live-search slot))
-            (<ucw:submit :action (revert-foreign-slot slot)
+            #+ (or) (<ucw:submit :action (revert-foreign-slot slot)
                          :value "Undo")
                              (<ucw:submit :action  (mewa::search-records slot instance) :value "find" :style "display:inline"))
            ((mewa::linkedp slot)