[bknr-cvs] r1965 - in branches/xml-class-rework/projects/quickhoney: src website/static

bknr at bknr.net bknr at bknr.net
Sun Jul 16 11:49:48 UTC 2006


Author: hhubner
Date: 2006-07-16 07:49:47 -0400 (Sun, 16 Jul 2006)
New Revision: 1965

Modified:
   branches/xml-class-rework/projects/quickhoney/src/handlers.lisp
   branches/xml-class-rework/projects/quickhoney/website/static/javascript.js
Log:
Accept more animation types.
Clear detail display so that running movies are stopped, this in particular
stops any sound playing when navigating back to the menu.


Modified: branches/xml-class-rework/projects/quickhoney/src/handlers.lisp
===================================================================
--- branches/xml-class-rework/projects/quickhoney/src/handlers.lisp	2006-07-16 08:55:39 UTC (rev 1964)
+++ branches/xml-class-rework/projects/quickhoney/src/handlers.lisp	2006-07-16 11:49:47 UTC (rev 1965)
@@ -28,9 +28,10 @@
   ())
 
 (defmethod handle-object ((handler animation-handler) animation req)
-  (with-bknr-http-response (req :content-type "application/x-shockwave-flash")
-    (with-http-body (req *ent*)
-      (blob-to-stream (quickhoney-animation-image-animation animation) *html-stream*))))
+  (let ((content-type (blob-type (quickhoney-animation-image-animation animation))))
+    (with-bknr-http-response (req :content-type content-type)
+      (with-http-body (req *ent*)
+	(blob-to-stream (quickhoney-animation-image-animation animation) *html-stream*)))))
 
 (defclass image-query-js-handler (javascript-handler object-handler)
   ())
@@ -201,8 +202,8 @@
 	  (progn
 	    (unless (and uploaded-image uploaded-animation)
 	      (error "files not uploaded"))
-	    (unless (find (upload-content-type uploaded-animation) '("application/x-shockwave-flash") :test #'equal)
-	      (error "Invalid content type, only Flash animations are accepted"))
+	    (unless (find (upload-content-type uploaded-animation) '("application/x-shockwave-flash" "video/quicktime" "application/x-director") :test #'equal)
+	      (error "Invalid content type ~A - Please upload a Flash, Shockwave or Quicktime file" (upload-content-type uploaded-animation)))
 	    (cl-gd:with-image-from-file* ((upload-pathname uploaded-image))
 	      (let* ((animation-blob (make-blob-from-file (upload-pathname uploaded-animation) 'blob
 							  :type (upload-content-type uploaded-animation)))

Modified: branches/xml-class-rework/projects/quickhoney/website/static/javascript.js
===================================================================
--- branches/xml-class-rework/projects/quickhoney/website/static/javascript.js	2006-07-16 08:55:39 UTC (rev 1964)
+++ branches/xml-class-rework/projects/quickhoney/website/static/javascript.js	2006-07-16 11:49:47 UTC (rev 1965)
@@ -152,6 +152,7 @@
 
     show_cms_window("image_deleted_form");
     current_image = null;
+    document.getElementById("image_detail").innerHTML = '';
     if (current_directory == 'quickhoney') {
 	load_button_images();
 	setTimeout("if (current_directory == 'quickhoney') { show_cms_window('edit_quickhoney_form'); }", 2000);
@@ -456,6 +457,7 @@
     current_directory = pagename;
     current_subdirectory = null;
     current_image = null;
+    document.getElementById("image_detail").innerHTML = '';
 
     // Update path display
     display_path();
@@ -580,6 +582,7 @@
     current_directory = directory_name;
     current_subdirectory = false;
     current_image = false;
+    document.getElementById("image_detail").innerHTML = '';
     
     footer_up();
 
@@ -621,6 +624,7 @@
     footer_down();
 
     current_image = false;
+    document.getElementById("image_detail").innerHTML = '';
 
     query_imagedb(current_directory, subdirectory);
 
@@ -884,6 +888,7 @@
 
     current_directory = 'clients';
     current_image = null;
+    document.getElementById("image_detail").innerHTML = '';
     subdirectory('nicejobs');
 }
 




More information about the Bknr-cvs mailing list