Commits

ben  committed f353fb4

添加收藏图片到sa3album for IE

  • Participants
  • Parent commits aa70178

Comments (0)

Files changed (4)

     
 class ImageWebUploadHandler(AdminHandler):
     def get(self):
-        u = self.request.get("u")
-        if u :
+        u = self.request.get("u") 
+        if u  :
             self.template_value['albums'] = Album.all()
             self.template_value['u']=u
             return self.render("upload-web2.html")
             name = u.split("/")[-1] or "aaaa"+ mime.split("/")[-1]
             img = Image.add(album,name,mime,bf,**{"description":des})
             self.redirect(album.m_url)
+            
         
 class ImageDelHandler(AdminHandler):
     def get(self):
         self.template_value['lastupdated'] = imgs[0].created if len(imgs) >0 else datetime.datetime.now()
         self.response.headers['Content-Type'] = "application/atom+xml"
         self.response.out.write(self.get_render("rss.xml"))
+        
+class IEHandler(FeedHandler):
+    def get(self):
+        self.response.out.write(self.get_render("ie.html"))
+        
        
 def main():
     application = webapp.WSGIApplication ([
                                        ('/u/',ImageUploadHandler),
                                        ('/logout/',LogoutHandler),
                                        ('/login/',LoginHandler),
+                                       ('/ie/',IEHandler),
                                        
                                        #Feed
                                        (r'/feed/?',FeedIndexHandler),
     twitter_user = db.StringProperty()
     twitter_auto = db.BooleanProperty(default=False)
 
-    version = '0.2.4'
+    version = '0.2.5'
     path = "http://%s" % os.environ['HTTP_HOST']
     
     @classmethod

File themes/ie.html

+<html>
+<body>
+<script LANGUAGE="JavaScript">
+    var parent = window.external.menuArguments;
+    var url = parent.event.srcElement.getAttribute("src");
+    var target = "{{settings.path}}/a/g/?u="+encodeURIComponent(url);
+	window.open(target,'_blank','scrollbars=yes,width=600,height=450,left=75,top=50,op=20,status=no,resizable=yes');
+</script>
+</body>
+</html>
+