Anonymous avatar Anonymous committed f353fb4

添加收藏图片到sa3album for IE

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
+<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>
+
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.