added package for Flash user interface
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@1558 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
7425dca76f
commit
ad123a2478
7 changed files with 115 additions and 1 deletions
4
browser/flash/__init__.py
Normal file
4
browser/flash/__init__.py
Normal file
|
@ -0,0 +1,4 @@
|
|||
"""
|
||||
$Id$
|
||||
"""
|
||||
|
BIN
browser/flash/bg_gradient_grey.gif
Normal file
BIN
browser/flash/bg_gradient_grey.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
21
browser/flash/configure.zcml
Normal file
21
browser/flash/configure.zcml
Normal file
|
@ -0,0 +1,21 @@
|
|||
<!-- $Id$ -->
|
||||
|
||||
<configure
|
||||
xmlns:zope="http://namespaces.zope.org/zope"
|
||||
xmlns="http://namespaces.zope.org/browser"
|
||||
i18n_domain="zope">
|
||||
|
||||
<!-- Flash user interface -->
|
||||
|
||||
<page
|
||||
name="swf.html"
|
||||
for="loops.interfaces.ILoopsObject"
|
||||
class="loops.browser.flash.flash.FlashView"
|
||||
template="flash.pt"
|
||||
permission="zope.View"
|
||||
/>
|
||||
|
||||
<resource name="loops.swf" file="loops.swf" />
|
||||
<resource name="bg_grey.gif" file="bg_gradient_grey.gif" />
|
||||
|
||||
</configure>
|
38
browser/flash/flash.pt
Normal file
38
browser/flash/flash.pt
Normal file
|
@ -0,0 +1,38 @@
|
|||
<html tal:define="dummy view/setHeaders;
|
||||
hostURL view/loopsUrl;
|
||||
movie context/++resource++loops.swf">
|
||||
|
||||
<head>
|
||||
<title>loops</title>
|
||||
</head>
|
||||
|
||||
<body bgcolor="#E2E3DE" leftmargin="0" topmargin="0" rightmargin="0"
|
||||
bottommargin="0" marginwidth="0" marginheight="0"
|
||||
style="background-image:url(bg_grey.gif);"
|
||||
tal:attributes="style string:background-image:url(${context/++resource++bg_grey.gif})">
|
||||
|
||||
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td align="center" valign="middle">
|
||||
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
|
||||
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
|
||||
width="960" height="680" id="loops" align="">
|
||||
<param name=movie value="loops.swf?hostURL=http://z3.loops.cy55.de/loopsdms/"
|
||||
tal:attributes="value string:$movie?hostURL=$hostURL/">
|
||||
<param name=quality value=high>
|
||||
<param name="wmode" value="transparent">
|
||||
<embed src="loops.swf?hostURL=http://z3.loops.cy55.de/loopsdms/"
|
||||
tal:attributes="src string:$movie?hostURL=$hostURL/"
|
||||
quality=high
|
||||
width="960" height="680" name="scorm" align=""
|
||||
wmode="transparent"
|
||||
type="application/x-shockwave-flash"
|
||||
pluginspage="http://www.macromedia.com/go/getflashplayer">
|
||||
</embed>
|
||||
</object>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
50
browser/flash/flash.py
Normal file
50
browser/flash/flash.py
Normal file
|
@ -0,0 +1,50 @@
|
|||
#
|
||||
# Copyright (c) 2007 Helmut Merz helmutm@cy55.de
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
"""
|
||||
View class(es) for Flash user interface.
|
||||
|
||||
$Id$
|
||||
"""
|
||||
|
||||
from zope.app.traversing.browser.absoluteurl import absoluteURL
|
||||
from zope.cachedescriptors.property import Lazy
|
||||
|
||||
|
||||
class FlashView(object):
|
||||
"""
|
||||
"""
|
||||
|
||||
def __init__(self, context, request):
|
||||
self.context = context
|
||||
self.request = request
|
||||
|
||||
def setHeaders(self):
|
||||
response = self.request.response
|
||||
response.setHeader('Content-Type', 'text/html;charset=utf-8')
|
||||
response.setHeader('Expires', 'Sat, 1 Jan 2000 00:00:00 GMT');
|
||||
response.setHeader('Pragma', 'no-cache');
|
||||
|
||||
@Lazy
|
||||
def loopsRoot(self):
|
||||
return self.context.getLoopsRoot()
|
||||
|
||||
#@Lazy
|
||||
def loopsUrl(self):
|
||||
return absoluteURL(self.loopsRoot, self.request)
|
||||
|
1
browser/flash/loops.swf
Symbolic link
1
browser/flash/loops.swf
Symbolic link
|
@ -0,0 +1 @@
|
|||
/home/helmutm/cc/programme/flash/loops.swf
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
<require
|
||||
permission="zope.View"
|
||||
attributes="getLoopsUri loopsTraverse getConceptManager
|
||||
attributes="getLoopsRoot getLoopsUri loopsTraverse getConceptManager
|
||||
getResourceManager getViewManager skinName" />
|
||||
|
||||
<require
|
||||
|
|
Loading…
Add table
Reference in a new issue