[xiph-commits] r3908 - in arkaiv/trunk: arkaiv arkaiv/config arkaiv/controllers arkaiv/lib arkaiv/model arkaiv/templates data/templates

dcrowdy at svn.annodex.net dcrowdy at svn.annodex.net
Sun Apr 19 19:52:58 PDT 2009


Author: dcrowdy
Date: 2009-04-19 19:52:58 -0700 (Sun, 19 Apr 2009)
New Revision: 3908

Modified:
   arkaiv/trunk/arkaiv/__init__.pyc
   arkaiv/trunk/arkaiv/config/__init__.pyc
   arkaiv/trunk/arkaiv/config/environment.pyc
   arkaiv/trunk/arkaiv/config/middleware.pyc
   arkaiv/trunk/arkaiv/config/routing.pyc
   arkaiv/trunk/arkaiv/controllers/__init__.pyc
   arkaiv/trunk/arkaiv/controllers/error.pyc
   arkaiv/trunk/arkaiv/controllers/page.pyc
   arkaiv/trunk/arkaiv/lib/__init__.pyc
   arkaiv/trunk/arkaiv/lib/app_globals.pyc
   arkaiv/trunk/arkaiv/lib/base.pyc
   arkaiv/trunk/arkaiv/lib/helpers.pyc
   arkaiv/trunk/arkaiv/model/__init__.pyc
   arkaiv/trunk/arkaiv/model/cmmlparser.pyc
   arkaiv/trunk/arkaiv/model/oggzinfo.py
   arkaiv/trunk/arkaiv/model/oggzinfo.pyc
   arkaiv/trunk/arkaiv/templates/displayitem.mak
   arkaiv/trunk/arkaiv/websetup.pyc
   arkaiv/trunk/data/templates/addannodexform.mak.py
   arkaiv/trunk/data/templates/addannodexform.mak.pyc
   arkaiv/trunk/data/templates/autohandler.py
   arkaiv/trunk/data/templates/autohandler.pyc
   arkaiv/trunk/data/templates/collectionexpanded.mak.py
   arkaiv/trunk/data/templates/collectionexpanded.mak.pyc
   arkaiv/trunk/data/templates/collections.mak.py
   arkaiv/trunk/data/templates/collections.mak.pyc
   arkaiv/trunk/data/templates/displayitem.mak.py
   arkaiv/trunk/data/templates/displayitem.mak.pyc
   arkaiv/trunk/data/templates/mainpage.mak.py
   arkaiv/trunk/data/templates/mainpage.mak.pyc
Log:
Updated to use the html5 audio and video tags for playback.


Modified: arkaiv/trunk/arkaiv/__init__.pyc
===================================================================
(Binary files differ)

Modified: arkaiv/trunk/arkaiv/config/__init__.pyc
===================================================================
(Binary files differ)

Modified: arkaiv/trunk/arkaiv/config/environment.pyc
===================================================================
(Binary files differ)

Modified: arkaiv/trunk/arkaiv/config/middleware.pyc
===================================================================
(Binary files differ)

Modified: arkaiv/trunk/arkaiv/config/routing.pyc
===================================================================
(Binary files differ)

Modified: arkaiv/trunk/arkaiv/controllers/__init__.pyc
===================================================================
(Binary files differ)

Modified: arkaiv/trunk/arkaiv/controllers/error.pyc
===================================================================
(Binary files differ)

Modified: arkaiv/trunk/arkaiv/controllers/page.pyc
===================================================================
(Binary files differ)

Modified: arkaiv/trunk/arkaiv/lib/__init__.pyc
===================================================================
(Binary files differ)

Modified: arkaiv/trunk/arkaiv/lib/app_globals.pyc
===================================================================
(Binary files differ)

Modified: arkaiv/trunk/arkaiv/lib/base.pyc
===================================================================
(Binary files differ)

Modified: arkaiv/trunk/arkaiv/lib/helpers.pyc
===================================================================
(Binary files differ)

Modified: arkaiv/trunk/arkaiv/model/__init__.pyc
===================================================================
(Binary files differ)

Modified: arkaiv/trunk/arkaiv/model/cmmlparser.pyc
===================================================================
(Binary files differ)

Modified: arkaiv/trunk/arkaiv/model/oggzinfo.py
===================================================================
--- arkaiv/trunk/arkaiv/model/oggzinfo.py	2009-03-31 23:56:25 UTC (rev 3907)
+++ arkaiv/trunk/arkaiv/model/oggzinfo.py	2009-04-20 02:52:58 UTC (rev 3908)
@@ -18,7 +18,7 @@
 class OggzInfo (object):
 
   def __init__(self, filename):
-    self.output = commands.getoutput ("oggzinfo -b \"%s\"" % (filename))
+    self.output = commands.getoutput ("oggz-info -b \"%s\"" % (filename))
 
   def headerval (self, field):
       pattern = '%s: (.*)' % (field)

Modified: arkaiv/trunk/arkaiv/model/oggzinfo.pyc
===================================================================
(Binary files differ)

Modified: arkaiv/trunk/arkaiv/templates/displayitem.mak
===================================================================
--- arkaiv/trunk/arkaiv/templates/displayitem.mak	2009-03-31 23:56:25 UTC (rev 3907)
+++ arkaiv/trunk/arkaiv/templates/displayitem.mak	2009-04-20 02:52:58 UTC (rev 3908)
@@ -1,50 +1,42 @@
 <%inherit file="/autohandler"/> 
+
 <div id="video">
 
+## Title of item and script to change name
 <p id="edititemname">${c.itemname}</p>
 <script type="text/javascript">
  new Ajax.InPlaceEditor('edititemname', '/page/edititemname', { callback: function(form, value) { return 'itemid=${c.itemid}&myparam=' + escape(value) }});
 </script>
 
-
+## Or delete it...
 ${ h.form(h.url_for(action='deleteitem'), multipart=True) }
 ${ h.submit('Delete') } 
 ${ h.hidden_field('itemid', value=c.itemid) }
 ${ h.end_form() } 
-       
-#      <embed type="application/ogg"
-      <embed type="application/x-vlc-plugin"
-        src="${c.sourcedict['urlpath']}${c.sourcedict['clipdetail']}"
-        width="320" height="240"/>
+ 
+
+%     if c.sourcedict['has_video'] == "Yes":
+<video src='${c.sourcedict['urlpath']}${c.sourcedict['clipdetail']}' controls='controls'></video>
+%     endif
+
+%     if c.sourcedict['has_video'] == "No":
+<audio src='${c.sourcedict['urlpath']}${c.sourcedict['clipdetail']}' controls='controls'></audio>
+%     endif
+
+##<input type=button onclick='AudioClipPlay()' value='Change source'>
+
+
+##Output area useful for debugging:
 <form name="api">
 <table style="font-size:small">
 <tr>
-<td><input type="button" value="<<" onclick='skip(-1)'/></td>
-<td><input type="button" value="Play" onclick='Play()'/></td>
-<td><input type="button" value="Pause" onclick='Pause()'/></td>
-<td><input type="button" value=">>" onclick='skip(1)'/></td>
-</tr>
-<tr>
-<td><input type="button" value="Get position" onclick='GetPlayPosition()'/></td>
-<td><input type="button" value="Go to pos" onclick='GotoPosition()'/></td>
-<td><input type="text" name="gotofield" size="5"/></td>
-<td>(secs)</td>
-<td>Disable key shortcuts:</td>
-<td><input type="checkbox" name="shortcuts" value="toggle" onchange="toggleShortcuts()"></td>
-</tr>
-</table>
-<table style="font-size:small">
-<tr>
 <td>Output:</td>
 <td><textarea name="ofield" cols="40" rows="2"></textarea></td>
 </tr>
-<tr>
-<td>Amount to move << and >> (msecs):</td>
-<td><input type="text" name="ifield" size="20"/></td>
-</tr>
 </table>
 </form>
 
+##Header info - should really only be editable by priveleged users
 <hr>
 Head:
 ${ h.form(h.url_for(action='editheadinfo'), multipart=True) }
@@ -58,6 +50,7 @@
 ${ h.end_form() } 
 <br />
 <hr>
+
 Meta information:<br />
 <table style="font-size:small">
 <tr>
@@ -141,12 +134,10 @@
 </tr>
 </table>
 
-<!--/div!-->
+
+
 </div>
 
-<div id="clips">
-Clips:
-<br />
 <table style="font-size:small">
 <tr>
   <td></td>
@@ -154,26 +145,26 @@
   <td></td>
   <td></td> 
 </tr>
+
 % for clipinfo in c.cliplist:
 <tr>
-%     if c.sourcedict['has_video'] == "Yes":
-   <td><a onclick="javascript:SetLocation('${c.sourcedict['urlpath']}?id=${clipinfo['id']}')"><img src="${c.sourcedict['clipimageurl']}${clipinfo['img_src']}"></a></td>
-% endif
-%     if c.sourcedict['has_video'] == "No":
-   <td><a onclick="javascript:SetLocation('${c.sourcedict['urlpath']}?id=${clipinfo['id']}')"><img src="/images/blank.png"></a></td>
-% endif
+%  if c.sourcedict['has_video'] == "Yes":
+   <td><a onclick='VideoClipPlay("${c.sourcedict['urlpath']}?t=${clipinfo['id']}")'><img src="${c.sourcedict['clipimageurl']}${clipinfo['img_src']}"></a></td>
+%  endif
+
+ %  if c.sourcedict['has_video'] == "No":
+   <td><a onclick='AudioClipPlay("${c.sourcedict['urlpath']}?t=${clipinfo['id']}")'><img src="/images/blank.png"></a></td>
+%  endif
     <td>${clipinfo['start_time']}</td>
     <td>${clipinfo['desc']}</td>
     <td>${clipinfo['a_href']}</td>
 
-
 ${ h.form(h.url_for(action='deleteclip'), multipart=True) }
 <td>${ h.submit('Delete') } </td>
 ${ h.hidden_field('clipid', value=clipinfo['ixc']) }
 ${ h.hidden_field('itemid', value=c.itemid) }
 ${ h.end_form() } 
 
-
 </tr> 
 % endfor
 </table>
@@ -211,72 +202,30 @@
 ${ h.submit('Add') } 
 ${ h.end_form() } 
 
+
 <script>
-var plugin = document.embeds[0];
-var input  = document.api.ifield;
-var clipstart = document.addaclip.starttime;
-var goto  = document.api.gotofield;
+
 var output = document.api.ofield;
-var focusid = "enable";
-var shortcuts = document.api.shortcuts;
 
-function Play() {
-  plugin.play();
-  addOutput("Play");
+function VideoClipPlay(location) {
+  var myVideo = document.getElementsByTagName('video')[0];
+  myVideo.src = location
+  myVideo.load();
+  myVideo.play();
+  addOutput("Video clip");
+ 
 }
 
-function Pause() {
-  plugin.pause();
-  addOutput("Pause");
-}
 
-function SetLocation(location) {
-//  plugin.setPlayPosition(location);
-  plugin.setCurrentMovie(location);
-  addOutput("Current movie: " + plugin.getCurrentMovie());
-  addOutput("setting a location: " + location + " ms");
+function AudioClipPlay(location) {
+  var myAudio = document.getElementsByTagName('audio')[0];
+  myAudio.src = location
+  myAudio.load();
+  myAudio.play();
+  addOutput("Audio clip");
+ 
 }
 
-function GetPlayPosition() {
-  addOutput("Play position: " + plugin.getPlayPosition() + " ms");
-}
-
-function PauseOrPlay(){
-	addOutput("current state: " + plugin.getCurrentState());
-	if (plugin.getCurrentState()==0) {Play();}
-	else {
-	if (plugin.getCurrentState()==1) Pause();}
-}
-
-function skip(dir) {
-//    addOutput("we get here")
-    i = getInput();
-    addOutput("i is " + i);
-    if (i <= 0) i = 1000;
-    addOutput("dir is " + dir);
-    t = plugin.getPlayPosition() + (i * dir);
-    addOutput("t is " + t);
-    addOutput("Skipping by " + i + " to " + t + " ms - " +
-            (plugin.setPlayPosition(t) ? "succeeded" : "failed"));
-}
-
-function getInput() {
-  i = parseInt(input.value);
-  return isNaN(i) ? 0 : i;
-}
-
-function getGoto() {
-  i = parseInt(goto.value);
-  return isNaN(i) ? 0 : i;
-}
-
-
-function GotoPosition() {
-  i = getGoto();
-  i = i * 1000;
-  plugin.setPlayPosition(i);
-}
-
 var outLines = 0;
 
 function addOutput(str) {
@@ -293,40 +242,6 @@
   }
 
 }
-
-function addClipStarttime() {
-  clipstart.value = plugin.getPlayPosition()/1000;
-}
-
-function keyPressed(e) {
-  if (focusid=="disable") {return;}
-  else {
-  switch (String.fromCharCode(e.which)) {
-  	case "t": GetPlayPosition(); break;
-  	case "s": addClipStarttime(); break;
-  	case "p": PauseOrPlay(); break;
-  }
-  focusid="enable";
-  }
-}
-function disableShortcuts() {
-  focusid="disable";
-  addOutput("Shortcuts: " + focusid);
-  }
-
-function enableShortcuts() {
-  focusid="enable";
-  addOutput("Shortcuts: " + focusid);
-  }
-
-function toggleShortcuts() {
-  if (focusid=="enable") {focusid="disable";}
-  else {
-  if (focusid=="disable") {focusid="enable";}
-  }
-
-}
-
 </script>
 
 

Modified: arkaiv/trunk/arkaiv/websetup.pyc
===================================================================
(Binary files differ)

Modified: arkaiv/trunk/data/templates/addannodexform.mak.py
===================================================================
--- arkaiv/trunk/data/templates/addannodexform.mak.py	2009-03-31 23:56:25 UTC (rev 3907)
+++ arkaiv/trunk/data/templates/addannodexform.mak.py	2009-04-20 02:52:58 UTC (rev 3908)
@@ -1,8 +1,10 @@
 from mako import runtime, filters, cache
 UNDEFINED = runtime.UNDEFINED
-_magic_number = 2
-_modified_time = 1193643813.2921801
-_template_filename='/home/dcrowdy/src/arkaiv/arkaiv/trunk/arkaiv/templates/addannodexform.mak'
+__M_dict_builtin = dict
+__M_locals_builtin = locals
+_magic_number = 5
+_modified_time = 1239258394.896641
+_template_filename='/home/dcrowdy/src/arkaiv/trunk/arkaiv/templates/addannodexform.mak'
 _template_uri='/addannodexform.mak'
 _template_cache=cache.Cache(__name__, _modified_time)
 _source_encoding=None
@@ -21,33 +23,34 @@
     _mako_generate_namespaces(context)
     return runtime._inherit_from(context, u'/autohandler', _template_uri)
 def render_body(context,**pageargs):
-    context.caller_stack.push_frame()
+    context.caller_stack._push_frame()
     try:
-        __M_locals = dict(pageargs=pageargs)
+        __M_locals = __M_dict_builtin(pageargs=pageargs)
         h = context.get('h', UNDEFINED)
         c = context.get('c', UNDEFINED)
+        __M_writer = context.writer()
         # SOURCE LINE 1
-        context.write(u' \n<h1 class="main">Add annodex media</h1>\n\nThe page where data gets added.\n\n')
+        __M_writer(u' \n<h1 class="main">Add annodex media</h1>\n\nThe page where data gets added.\n\n')
         # SOURCE LINE 6
-        context.write(unicode( h.form(h.url(action='addannodexmedia'), multipart=True) ))
-        context.write(u' \n<table>\n<tr>\n<td>Upload OGG file:</td>\n<td>')
+        __M_writer(unicode( h.form(h.url_for(action='addannodexmedia'), multipart=True) ))
+        __M_writer(u' \n<table>\n<tr>\n<td>Upload OGG file:</td>\n<td>')
         # SOURCE LINE 10
-        context.write(unicode( h.file_field('oggfile') ))
-        context.write(u' </td>\n</tr>\n<tr>\n<td>Upload CMML file:</td>\n<td>')
+        __M_writer(unicode( h.file_field('oggfile') ))
+        __M_writer(u' </td>\n</tr>\n<tr>\n<td>Upload CMML file:</td>\n<td>')
         # SOURCE LINE 14
-        context.write(unicode( h.file_field('cmmlfile') ))
-        context.write(u' (if left blank, will be created) </td>\n</tr>\n<tr>\n<td>Collection:</td>\n<td>')
+        __M_writer(unicode( h.file_field('cmmlfile') ))
+        __M_writer(u' (if left blank, will be created) </td>\n</tr>\n<tr>\n<td>Collection:</td>\n<td>')
         # SOURCE LINE 18
-        context.write(unicode( h.select("collection", c.collectioninfo)))
-        context.write(u'</td>\n</tr>\n</table>\n')
+        __M_writer(unicode( h.select("collection", c.collectioninfo)))
+        __M_writer(u'</td>\n</tr>\n</table>\n')
         # SOURCE LINE 21
-        context.write(unicode( h.submit('Submit') ))
-        context.write(u' \n')
+        __M_writer(unicode( h.submit('Submit') ))
+        __M_writer(u' \n')
         # SOURCE LINE 22
-        context.write(unicode( h.end_form() ))
-        context.write(u' \n\n')
+        __M_writer(unicode( h.end_form() ))
+        __M_writer(u' \n\n')
         return ''
     finally:
-        context.caller_stack.pop_frame()
+        context.caller_stack._pop_frame()
 
 

Modified: arkaiv/trunk/data/templates/addannodexform.mak.pyc
===================================================================
(Binary files differ)

Modified: arkaiv/trunk/data/templates/autohandler.py
===================================================================
--- arkaiv/trunk/data/templates/autohandler.py	2009-03-31 23:56:25 UTC (rev 3907)
+++ arkaiv/trunk/data/templates/autohandler.py	2009-04-20 02:52:58 UTC (rev 3908)
@@ -3,7 +3,7 @@
 __M_dict_builtin = dict
 __M_locals_builtin = locals
 _magic_number = 5
-_modified_time = 1232592201.692858
+_modified_time = 1239258391.0692451
 _template_filename=u'/home/dcrowdy/src/arkaiv/trunk/arkaiv/templates/autohandler'
 _template_uri=u'/autohandler'
 _template_cache=cache.Cache(__name__, _modified_time)
@@ -24,22 +24,22 @@
         __M_writer(unicode( h.javascript_include_tag('/javascripts/effects.js', builtins=True) ))
         __M_writer(u' \n\n    </head>\n    <body onkeypress=\'keyPressed(event)\'>\n<p class="header">\n<h1>Arkaiv</h1>\n<div id="navcontainer">\n<ul id="navlist">\n  <li>')
         # SOURCE LINE 13
-        __M_writer(unicode( h.link_to("All Items", h.url(action="mainpage")) ))
+        __M_writer(unicode( h.link_to("All Items", h.url_for(action="mainpage")) ))
         __M_writer(u'</li>\n  <li>')
         # SOURCE LINE 14
-        __M_writer(unicode( h.link_to("Collections", h.url(action="collections")) ))
+        __M_writer(unicode( h.link_to("Collections", h.url_for(action="collections")) ))
         __M_writer(u'</li>\n  <li>')
         # SOURCE LINE 15
-        __M_writer(unicode( h.link_to("Add media", h.url(action="addannodexform")) ))
+        __M_writer(unicode( h.link_to("Add media", h.url_for(action="addannodexform")) ))
         __M_writer(u'</li>\n  <li>')
         # SOURCE LINE 16
-        __M_writer(unicode( h.link_to("Playlists", h.url(action="playlistpage")) ))
+        __M_writer(unicode( h.link_to("Playlists", h.url_for(action="playlistpage")) ))
         __M_writer(u'</li>\n  <li>')
         # SOURCE LINE 17
-        __M_writer(unicode( h.link_to("Help", h.url(action="displayhelp")) ))
+        __M_writer(unicode( h.link_to("Help", h.url_for(action="displayhelp")) ))
         __M_writer(u'</li>\n  <li><span class="searchpadding">\n')
         # SOURCE LINE 19
-        __M_writer(unicode( h.form(h.url(action='search'), multipart=True) ))
+        __M_writer(unicode( h.form(h.url_for(action='search'), multipart=True) ))
         __M_writer(u'\n')
         # SOURCE LINE 20
         __M_writer(unicode( h.text_field('searchterms', value="Search") ))

Modified: arkaiv/trunk/data/templates/autohandler.pyc
===================================================================
(Binary files differ)

Modified: arkaiv/trunk/data/templates/collectionexpanded.mak.py
===================================================================
--- arkaiv/trunk/data/templates/collectionexpanded.mak.py	2009-03-31 23:56:25 UTC (rev 3907)
+++ arkaiv/trunk/data/templates/collectionexpanded.mak.py	2009-04-20 02:52:58 UTC (rev 3908)
@@ -1,8 +1,10 @@
 from mako import runtime, filters, cache
 UNDEFINED = runtime.UNDEFINED
-_magic_number = 2
-_modified_time = 1197110906.3107829
-_template_filename='/home/dcrowdy/src/arkaiv/arkaiv/trunk/arkaiv/templates/collectionexpanded.mak'
+__M_dict_builtin = dict
+__M_locals_builtin = locals
+_magic_number = 5
+_modified_time = 1240194978.3412549
+_template_filename='/home/dcrowdy/src/arkaiv/working/trunk/arkaiv/templates/collectionexpanded.mak'
 _template_uri='/collectionexpanded.mak'
 _template_cache=cache.Cache(__name__, _modified_time)
 _source_encoding=None
@@ -21,27 +23,28 @@
     _mako_generate_namespaces(context)
     return runtime._inherit_from(context, u'/autohandler', _template_uri)
 def render_body(context,**pageargs):
-    context.caller_stack.push_frame()
+    context.caller_stack._push_frame()
     try:
-        __M_locals = dict(pageargs=pageargs)
+        __M_locals = __M_dict_builtin(pageargs=pageargs)
         h = context.get('h', UNDEFINED)
         c = context.get('c', UNDEFINED)
+        __M_writer = context.writer()
         # SOURCE LINE 1
-        context.write(u' \n<h2>\nCollection: ')
+        __M_writer(u' \n<h2>\nCollection: ')
         # SOURCE LINE 3
-        context.write(unicode( c.collname))
-        context.write(u'\n</h2>\n\n')
+        __M_writer(unicode( c.collname))
+        __M_writer(u'\n</h2>\n\n')
         # SOURCE LINE 6
         for item in c.items:
             # SOURCE LINE 7
-            context.write(u'<li>\n    ')
+            __M_writer(u'<li>\n    ')
             # SOURCE LINE 8
-            context.write(unicode( h.link_to(item['name'], h.url(action="displayitem", edit="no", id=item['index'])) ))
-            context.write(u'\n</li>\n')
+            __M_writer(unicode( h.link_to(item['name'], h.url_for(action="displayitem", edit="no", id=item['index'])) ))
+            __M_writer(u'\n</li>\n')
         # SOURCE LINE 11
-        context.write(u'\n\n')
+        __M_writer(u'\n\n')
         return ''
     finally:
-        context.caller_stack.pop_frame()
+        context.caller_stack._pop_frame()
 
 

Modified: arkaiv/trunk/data/templates/collectionexpanded.mak.pyc
===================================================================
(Binary files differ)

Modified: arkaiv/trunk/data/templates/collections.mak.py
===================================================================
--- arkaiv/trunk/data/templates/collections.mak.py	2009-03-31 23:56:25 UTC (rev 3907)
+++ arkaiv/trunk/data/templates/collections.mak.py	2009-04-20 02:52:58 UTC (rev 3908)
@@ -1,8 +1,10 @@
 from mako import runtime, filters, cache
 UNDEFINED = runtime.UNDEFINED
-_magic_number = 2
-_modified_time = 1193643831.5929699
-_template_filename='/home/dcrowdy/src/arkaiv/arkaiv/trunk/arkaiv/templates/collections.mak'
+__M_dict_builtin = dict
+__M_locals_builtin = locals
+_magic_number = 5
+_modified_time = 1239258393.6922669
+_template_filename='/home/dcrowdy/src/arkaiv/trunk/arkaiv/templates/collections.mak'
 _template_uri='/collections.mak'
 _template_cache=cache.Cache(__name__, _modified_time)
 _source_encoding=None
@@ -21,36 +23,37 @@
     _mako_generate_namespaces(context)
     return runtime._inherit_from(context, u'/autohandler', _template_uri)
 def render_body(context,**pageargs):
-    context.caller_stack.push_frame()
+    context.caller_stack._push_frame()
     try:
-        __M_locals = dict(pageargs=pageargs)
+        __M_locals = __M_dict_builtin(pageargs=pageargs)
         h = context.get('h', UNDEFINED)
         c = context.get('c', UNDEFINED)
+        __M_writer = context.writer()
         # SOURCE LINE 1
-        context.write(u' \n<h2>\nCollections\n</h2>\n\n')
+        __M_writer(u' \n<h2>\nCollections\n</h2>\n\n')
         # SOURCE LINE 6
         for coll in c.collections:
             # SOURCE LINE 7
-            context.write(u'<li>\n    ')
+            __M_writer(u'<li>\n    ')
             # SOURCE LINE 8
-            context.write(unicode( h.link_to(coll['name'], h.url(action="displaycollection", edit="no", id=coll['index'], name=coll['name'])) ))
-            context.write(u'\n</li>\n')
+            __M_writer(unicode( h.link_to(coll['name'], h.url_for(action="displaycollection", edit="no", id=coll['index'], name=coll['name'])) ))
+            __M_writer(u'\n</li>\n')
         # SOURCE LINE 11
-        context.write(u'\n<hr>\nAdd new collection:\n')
+        __M_writer(u'\n<hr>\nAdd new collection:\n')
         # SOURCE LINE 14
-        context.write(unicode( h.form(h.url(action='addcollection'), multipart=True) ))
-        context.write(u' \n')
+        __M_writer(unicode( h.form(h.url_for(action='addcollection'), multipart=True) ))
+        __M_writer(u' \n')
         # SOURCE LINE 15
-        context.write(unicode( h.text_field('newcollection') ))
-        context.write(u'\n')
+        __M_writer(unicode( h.text_field('newcollection') ))
+        __M_writer(u'\n')
         # SOURCE LINE 16
-        context.write(unicode( h.submit('Add') ))
-        context.write(u' \n')
+        __M_writer(unicode( h.submit('Add') ))
+        __M_writer(u' \n')
         # SOURCE LINE 17
-        context.write(unicode( h.end_form() ))
-        context.write(u' \n\n')
+        __M_writer(unicode( h.end_form() ))
+        __M_writer(u' \n\n')
         return ''
     finally:
-        context.caller_stack.pop_frame()
+        context.caller_stack._pop_frame()
 
 

Modified: arkaiv/trunk/data/templates/collections.mak.pyc
===================================================================
(Binary files differ)

Modified: arkaiv/trunk/data/templates/displayitem.mak.py
===================================================================
--- arkaiv/trunk/data/templates/displayitem.mak.py	2009-03-31 23:56:25 UTC (rev 3907)
+++ arkaiv/trunk/data/templates/displayitem.mak.py	2009-04-20 02:52:58 UTC (rev 3908)
@@ -1,8 +1,10 @@
 from mako import runtime, filters, cache
 UNDEFINED = runtime.UNDEFINED
-_magic_number = 2
-_modified_time = 1193643913.4088931
-_template_filename='/home/dcrowdy/src/arkaiv/arkaiv/trunk/arkaiv/templates/displayitem.mak'
+__M_dict_builtin = dict
+__M_locals_builtin = locals
+_magic_number = 5
+_modified_time = 1240195564.2088721
+_template_filename='/home/dcrowdy/src/arkaiv/working/trunk/arkaiv/templates/displayitem.mak'
 _template_uri='/displayitem.mak'
 _template_cache=cache.Cache(__name__, _modified_time)
 _source_encoding=None
@@ -21,226 +23,250 @@
     _mako_generate_namespaces(context)
     return runtime._inherit_from(context, u'/autohandler', _template_uri)
 def render_body(context,**pageargs):
-    context.caller_stack.push_frame()
+    context.caller_stack._push_frame()
     try:
-        __M_locals = dict(pageargs=pageargs)
+        __M_locals = __M_dict_builtin(pageargs=pageargs)
         h = context.get('h', UNDEFINED)
         c = context.get('c', UNDEFINED)
+        __M_writer = context.writer()
         # SOURCE LINE 1
-        context.write(u' \n<div id="video">\n\n<p id="edititemname">')
-        # SOURCE LINE 4
-        context.write(unicode(c.itemname))
-        context.write(u'</p>\n<script type="text/javascript">\n new Ajax.InPlaceEditor(\'edititemname\', \'/page/edititemname\', { callback: function(form, value) { return \'itemid=')
+        __M_writer(u' \n\n<div id="video">\n\n')
         # SOURCE LINE 6
-        context.write(unicode(c.itemid))
-        context.write(u"&myparam=' + escape(value) }});\n</script>\n\n\n")
-        # SOURCE LINE 10
-        context.write(unicode( h.form(h.url(action='deleteitem'), multipart=True) ))
-        context.write(u'\n')
-        # SOURCE LINE 11
-        context.write(unicode( h.submit('Delete') ))
-        context.write(u' \n')
+        __M_writer(u'<p id="edititemname">')
+        __M_writer(unicode(c.itemname))
+        __M_writer(u'</p>\n<script type="text/javascript">\n new Ajax.InPlaceEditor(\'edititemname\', \'/page/edititemname\', { callback: function(form, value) { return \'itemid=')
+        # SOURCE LINE 8
+        __M_writer(unicode(c.itemid))
+        __M_writer(u"&myparam=' + escape(value) }});\n</script>\n\n")
         # SOURCE LINE 12
-        context.write(unicode( h.hidden_field('itemid', value=c.itemid) ))
-        context.write(u'\n')
+        __M_writer(unicode( h.form(h.url_for(action='deleteitem'), multipart=True) ))
+        __M_writer(u'\n')
         # SOURCE LINE 13
-        context.write(unicode( h.end_form() ))
-        context.write(u' \n       \n      <embed type="application/liboggplay"\n        src="')
-        # SOURCE LINE 16
-        context.write(unicode(c.sourcedict['urlpath']))
-        context.write(unicode(c.sourcedict['clipdetail']))
-        context.write(u'"\n        width="320" height="240"/>\n<form name="api">\n<table style="font-size:small">\n<tr>\n<td><input type="button" value="<<" onclick=\'skip(-1)\'/></td>\n<td><input type="button" value="Play" onclick=\'Play()\'/></td>\n<td><input type="button" value="Pause" onclick=\'Pause()\'/></td>\n<td><input type="button" value=">>" onclick=\'skip(1)\'/></td>\n</tr>\n<tr>\n<td><input type="button" value="Get position" onclick=\'GetPlayPosition()\'/></td>\n<td><input type="button" value="Go to pos" onclick=\'GotoPosition()\'/></td>\n<td><input type="text" name="gotofield" size="5"/></td>\n<td>(secs)</td>\n<td>Disable key shortcuts:</td>\n<td><input type="checkbox" name="shortcuts" value="toggle" onchange="toggleShortcuts()"></td>\n</tr>\n</table>\n<table style="font-size:small">\n<tr>\n<td>Output:</td>\n<td><textarea name="ofield" cols="40" rows="2"></textarea></td>\n</tr>\n<tr>\n<td>Amount to move << and >> (msecs):</td>\n<td><input type="text" name="ifiel
 d" size="20"/></td>\n</tr>\n</table>\n</form>\n\n<hr>\nHead:\n')
+        __M_writer(unicode( h.submit('Delete') ))
+        __M_writer(u' \n')
+        # SOURCE LINE 14
+        __M_writer(unicode( h.hidden_field('itemid', value=c.itemid) ))
+        __M_writer(u'\n')
+        # SOURCE LINE 15
+        __M_writer(unicode( h.end_form() ))
+        __M_writer(u' \n \n\n')
+        # SOURCE LINE 18
+        if c.sourcedict['has_video'] == "Yes":
+            # SOURCE LINE 19
+            __M_writer(u"<video src='")
+            __M_writer(unicode(c.sourcedict['urlpath']))
+            __M_writer(unicode(c.sourcedict['clipdetail']))
+            __M_writer(u"' controls='controls'></video>\n")
+        # SOURCE LINE 21
+        __M_writer(u'\n')
+        # SOURCE LINE 22
+        if c.sourcedict['has_video'] == "No":
+            # SOURCE LINE 23
+            __M_writer(u"<audio src='")
+            __M_writer(unicode(c.sourcedict['urlpath']))
+            __M_writer(unicode(c.sourcedict['clipdetail']))
+            __M_writer(u"' controls='controls'></audio>\n")
+        # SOURCE LINE 25
+        __M_writer(u'\n')
+        # SOURCE LINE 27
+        __M_writer(u'\n\n')
+        # SOURCE LINE 30
+        __M_writer(u'<form name="api">\n<table style="font-size:small">\n<tr>\n<td>Output:</td>\n<td><textarea name="ofield" cols="40" rows="2"></textarea></td>\n</tr>\n</table>\n</form>\n\n')
+        # SOURCE LINE 40
+        __M_writer(u'<hr>\nHead:\n')
+        # SOURCE LINE 42
+        __M_writer(unicode( h.form(h.url_for(action='editheadinfo'), multipart=True) ))
+        __M_writer(u'\nid:\n')
+        # SOURCE LINE 44
+        __M_writer(unicode( h.text_field('headid', value=c.headdict['id']) ))
+        __M_writer(u'\nTitle:\n')
+        # SOURCE LINE 46
+        __M_writer(unicode( h.text_field('headtitle', value=c.headdict['title']) ))
+        __M_writer(u'\n')
+        # SOURCE LINE 47
+        __M_writer(unicode( h.hidden_field('itemid', value=c.itemid) ))
+        __M_writer(u'\n\n')
         # SOURCE LINE 49
-        context.write(unicode( h.form(h.url(action='editheadinfo'), multipart=True) ))
-        context.write(u'\nid:\n')
-        # SOURCE LINE 51
-        context.write(unicode( h.text_field('headid', value=c.headdict['id']) ))
-        context.write(u'\nTitle:\n')
-        # SOURCE LINE 53
-        context.write(unicode( h.text_field('headtitle', value=c.headdict['title']) ))
-        context.write(u'\n')
-        # SOURCE LINE 54
-        context.write(unicode( h.hidden_field('itemid', value=c.itemid) ))
-        context.write(u'\n\n')
-        # SOURCE LINE 56
-        context.write(unicode( h.submit('Edit') ))
-        context.write(u' \n')
-        # SOURCE LINE 57
-        context.write(unicode( h.end_form() ))
-        context.write(u' \n<br />\n<hr>\nMeta information:<br />\n<table style="font-size:small">\n<tr>\n  <td>Name</td>\n  <td>Content</td>\n</tr>\n')
-        # SOURCE LINE 66
+        __M_writer(unicode( h.submit('Edit') ))
+        __M_writer(u' \n')
+        # SOURCE LINE 50
+        __M_writer(unicode( h.end_form() ))
+        __M_writer(u' \n<br />\n<hr>\n\nMeta information:<br />\n<table style="font-size:small">\n<tr>\n  <td>Name</td>\n  <td>Content</td>\n</tr>\n')
+        # SOURCE LINE 60
         for metainfo in c.metalist:
-            # SOURCE LINE 67
-            context.write(u'<tr>\n<td>\n<p id="editmetaname">')
+            # SOURCE LINE 61
+            __M_writer(u'<tr>\n<td>\n<p id="editmetaname">')
+            # SOURCE LINE 63
+            __M_writer(unicode(metainfo['name']))
+            __M_writer(u'</p>\n<script type="text/javascript">\n new Ajax.InPlaceEditor(\'editmetaname\', \'/page/editheadmetaname\', { callback: function(form, value) { return \'id=')
+            # SOURCE LINE 65
+            __M_writer(unicode(metainfo['id']))
+            __M_writer(u'&field=name&itemid=')
+            __M_writer(unicode(c.itemid))
+            __M_writer(u'&myparam=\' + escape(value) }});\n</script>\n</td>\n<td>\n<p id="editmetacontent">')
             # SOURCE LINE 69
-            context.write(unicode(metainfo['name']))
-            context.write(u'</p>\n<script type="text/javascript">\n new Ajax.InPlaceEditor(\'editmetaname\', \'/page/editheadmetaname\', { callback: function(form, value) { return \'id=')
+            __M_writer(unicode(metainfo['content']))
+            __M_writer(u'</p>\n<script type="text/javascript">\n new Ajax.InPlaceEditor(\'editmetacontent\', \'/page/editheadmetaname\', { callback: function(form, value) { return \'id=')
             # SOURCE LINE 71
-            context.write(unicode(metainfo['id']))
-            context.write(u'&field=name&itemid=')
-            context.write(unicode(c.itemid))
-            context.write(u'&myparam=\' + escape(value) }});\n</script>\n</td>\n<td>\n<p id="editmetacontent">')
+            __M_writer(unicode(metainfo['id']))
+            __M_writer(u'&field=content&itemid=')
+            __M_writer(unicode(c.itemid))
+            __M_writer(u"&myparam=' + escape(value) }});\n</script>\n</td>\n<td>\n")
             # SOURCE LINE 75
-            context.write(unicode(metainfo['content']))
-            context.write(u'</p>\n<script type="text/javascript">\n new Ajax.InPlaceEditor(\'editmetacontent\', \'/page/editheadmetaname\', { callback: function(form, value) { return \'id=')
+            __M_writer(unicode( h.form(h.url_for(action='deletemeta'), multipart=True) ))
+            __M_writer(u'\n')
+            # SOURCE LINE 76
+            __M_writer(unicode( h.submit('Delete') ))
+            __M_writer(u'\n')
             # SOURCE LINE 77
-            context.write(unicode(metainfo['id']))
-            context.write(u'&field=content&itemid=')
-            context.write(unicode(c.itemid))
-            context.write(u"&myparam=' + escape(value) }});\n</script>\n</td>\n<td>\n")
-            # SOURCE LINE 81
-            context.write(unicode( h.form(h.url(action='deletemeta'), multipart=True) ))
-            context.write(u'\n')
-            # SOURCE LINE 82
-            context.write(unicode( h.submit('Delete') ))
-            context.write(u'\n')
-            # SOURCE LINE 83
-            context.write(unicode( h.hidden_field('metaid', value=metainfo['index']) ))
-            context.write(u'\n')
-            # SOURCE LINE 84
-            context.write(unicode( h.hidden_field('itemid', value=c.itemid) ))
-            context.write(u'\n')
-            # SOURCE LINE 85
-            context.write(unicode( h.hidden_field('headid', value=c.headdict['index']) ))
-            context.write(u'\n')
-            # SOURCE LINE 86
-            context.write(unicode( h.end_form() ))
-            context.write(u' \n\n</td>\n</tr> \n')
-        # SOURCE LINE 91
-        context.write(u'</table>\n<hr>\nAdd new meta tag:\n')
-        # SOURCE LINE 94
-        context.write(unicode( h.form(h.url(action='addmetainfo'), multipart=True) ))
-        context.write(u'\n<table style="font-size:small">\n<tr>\n    <td>Id</td>\n    <td>Name</td>\n    <td>Content</td>\n</tr>\n\n<tr>\n  <td>')
+            __M_writer(unicode( h.hidden_field('metaid', value=metainfo['index']) ))
+            __M_writer(u'\n')
+            # SOURCE LINE 78
+            __M_writer(unicode( h.hidden_field('itemid', value=c.itemid) ))
+            __M_writer(u'\n')
+            # SOURCE LINE 79
+            __M_writer(unicode( h.hidden_field('headid', value=c.headdict['index']) ))
+            __M_writer(u'\n')
+            # SOURCE LINE 80
+            __M_writer(unicode( h.end_form() ))
+            __M_writer(u' \n\n</td>\n</tr> \n')
+        # SOURCE LINE 85
+        __M_writer(u'</table>\n<hr>\nAdd new meta tag:\n')
+        # SOURCE LINE 88
+        __M_writer(unicode( h.form(h.url_for(action='addmetainfo'), multipart=True) ))
+        __M_writer(u'\n<table style="font-size:small">\n<tr>\n    <td>Id</td>\n    <td>Name</td>\n    <td>Content</td>\n</tr>\n\n<tr>\n  <td>')
+        # SOURCE LINE 97
+        __M_writer(unicode( h.text_field('metaid', size=5) ))
+        __M_writer(u'</td>\n  <td>')
+        # SOURCE LINE 98
+        __M_writer(unicode( h.text_field('metaname') ))
+        __M_writer(u'</td>\n  <td>')
+        # SOURCE LINE 99
+        __M_writer(unicode( h.text_field('metacontent') ))
+        __M_writer(u'</td>\n</tr>\n</table>\n')
+        # SOURCE LINE 102
+        __M_writer(unicode( h.hidden_field('metascheme') ))
+        __M_writer(u'\n')
         # SOURCE LINE 103
-        context.write(unicode( h.text_field('metaid', size=5) ))
-        context.write(u'</td>\n  <td>')
+        __M_writer(unicode( h.hidden_field('headindex', value = c.headdict['index']) ))
+        __M_writer(u'\n')
         # SOURCE LINE 104
-        context.write(unicode( h.text_field('metaname') ))
-        context.write(u'</td>\n  <td>')
-        # SOURCE LINE 105
-        context.write(unicode( h.text_field('metacontent') ))
-        context.write(u'</td>\n</tr>\n</table>\n')
-        # SOURCE LINE 108
-        context.write(unicode( h.hidden_field('metascheme') ))
-        context.write(u'\n')
-        # SOURCE LINE 109
-        context.write(unicode( h.hidden_field('headindex', value = c.headdict['index']) ))
-        context.write(u'\n')
-        # SOURCE LINE 110
-        context.write(unicode( h.hidden_field('itemid', value=c.itemid) ))
-        context.write(u'\n\n')
-        # SOURCE LINE 112
-        context.write(unicode( h.submit('Add') ))
-        context.write(u' \n')
-        # SOURCE LINE 113
-        context.write(unicode( h.end_form() ))
-        context.write(u' \n\n<hr>\n\n\n<!--div class="sourceinfo"-->\n<table style="font-size:small">\n<tr>\n<td>Duration:</td><td> ')
+        __M_writer(unicode( h.hidden_field('itemid', value=c.itemid) ))
+        __M_writer(u'\n\n')
+        # SOURCE LINE 106
+        __M_writer(unicode( h.submit('Add') ))
+        __M_writer(u' \n')
+        # SOURCE LINE 107
+        __M_writer(unicode( h.end_form() ))
+        __M_writer(u' \n\n<hr>\n\n\n<!--div class="sourceinfo"-->\n<table style="font-size:small">\n<tr>\n<td>Duration:</td><td> ')
+        # SOURCE LINE 115
+        __M_writer(unicode(c.sourcedict['duration']))
+        __M_writer(u'</td>\n</tr>\n<tr>\n<td>Bitrate: </td><td>')
+        # SOURCE LINE 118
+        __M_writer(unicode(c.sourcedict['bitrate']))
+        __M_writer(u'</td>\n</tr>\n<tr>\n<td>Resolution: </td><td>')
         # SOURCE LINE 121
-        context.write(unicode(c.sourcedict['duration']))
-        context.write(u'</td>\n</tr>\n<tr>\n<td>Bitrate: </td><td>')
+        __M_writer(unicode(c.sourcedict['resolution']))
+        __M_writer(u'</td>\n</tr>\n<tr>\n<td>Framerate: </td><td>')
         # SOURCE LINE 124
-        context.write(unicode(c.sourcedict['bitrate']))
-        context.write(u'</td>\n</tr>\n<tr>\n<td>Resolution: </td><td>')
+        __M_writer(unicode(c.sourcedict['framerate']))
+        __M_writer(u'</td>\n</tr>\n<tr>\n<td>Audio: </td><td>')
         # SOURCE LINE 127
-        context.write(unicode(c.sourcedict['resolution']))
-        context.write(u'</td>\n</tr>\n<tr>\n<td>Framerate: </td><td>')
+        __M_writer(unicode(c.sourcedict['audio']))
+        __M_writer(u'</td>\n</tr>\n<tr>\n<td>Has video: </td><td>')
         # SOURCE LINE 130
-        context.write(unicode(c.sourcedict['framerate']))
-        context.write(u'</td>\n</tr>\n<tr>\n<td>Audio: </td><td>')
+        __M_writer(unicode(c.sourcedict['has_video']))
+        __M_writer(u'</td>\n</tr>\n<tr>\n<td>Has audio: </td><td>')
         # SOURCE LINE 133
-        context.write(unicode(c.sourcedict['audio']))
-        context.write(u'</td>\n</tr>\n<tr>\n<td>Has video: </td><td>')
-        # SOURCE LINE 136
-        context.write(unicode(c.sourcedict['has_video']))
-        context.write(u'</td>\n</tr>\n<tr>\n<td>Has audio: </td><td>')
-        # SOURCE LINE 139
-        context.write(unicode(c.sourcedict['has_audio']))
-        context.write(u'</td>\n</tr>\n</table>\n\n<!--/div!-->\n</div>\n\n<div id="clips">\nClips:\n<br />\n<table style="font-size:small">\n<tr>\n  <td></td>\n  <td>Time</td>\n  <td></td>\n  <td></td> \n</tr>\n')
-        # SOURCE LINE 156
+        __M_writer(unicode(c.sourcedict['has_audio']))
+        __M_writer(u'</td>\n</tr>\n</table>\n\n\n\n</div>\n\n<table style="font-size:small">\n<tr>\n  <td></td>\n  <td>Time</td>\n  <td></td>\n  <td></td> \n</tr>\n\n')
+        # SOURCE LINE 149
         for clipinfo in c.cliplist:
-            # SOURCE LINE 157
-            context.write(u'<tr>\n')
-            # SOURCE LINE 158
+            # SOURCE LINE 150
+            __M_writer(u'<tr>\n')
+            # SOURCE LINE 151
             if c.sourcedict['has_video'] == "Yes":
-                # SOURCE LINE 159
-                context.write(u'   <td><a onclick="javascript:SetLocation(\'')
-                context.write(unicode(c.sourcedict['urlpath']))
-                context.write(u'?id=')
-                context.write(unicode(clipinfo['id']))
-                context.write(u'\')"><img src="')
-                context.write(unicode(c.sourcedict['clipimageurl']))
-                context.write(unicode(clipinfo['img_src']))
-                context.write(u'"></a></td>\n')
-            # SOURCE LINE 161
+                # SOURCE LINE 152
+                __M_writer(u'   <td><a onclick=\'VideoClipPlay("')
+                __M_writer(unicode(c.sourcedict['urlpath']))
+                __M_writer(u'?t=')
+                __M_writer(unicode(clipinfo['id']))
+                __M_writer(u'")\'><img src="')
+                __M_writer(unicode(c.sourcedict['clipimageurl']))
+                __M_writer(unicode(clipinfo['img_src']))
+                __M_writer(u'"></a></td>\n')
+            # SOURCE LINE 154
+            __M_writer(u'\n')
+            # SOURCE LINE 155
             if c.sourcedict['has_video'] == "No":
-                # SOURCE LINE 162
-                context.write(u'   <td><a onclick="javascript:SetLocation(\'')
-                context.write(unicode(c.sourcedict['urlpath']))
-                context.write(u'?id=')
-                context.write(unicode(clipinfo['id']))
-                context.write(u'\')"><img src="/images/blank.png"></a></td>\n')
+                # SOURCE LINE 156
+                __M_writer(u'   <td><a onclick=\'AudioClipPlay("')
+                __M_writer(unicode(c.sourcedict['urlpath']))
+                __M_writer(u'?t=')
+                __M_writer(unicode(clipinfo['id']))
+                __M_writer(u'")\'><img src="/images/blank.png"></a></td>\n')
+            # SOURCE LINE 158
+            __M_writer(u'    <td>')
+            __M_writer(unicode(clipinfo['start_time']))
+            __M_writer(u'</td>\n    <td>')
+            # SOURCE LINE 159
+            __M_writer(unicode(clipinfo['desc']))
+            __M_writer(u'</td>\n    <td>')
+            # SOURCE LINE 160
+            __M_writer(unicode(clipinfo['a_href']))
+            __M_writer(u'</td>\n\n')
+            # SOURCE LINE 162
+            __M_writer(unicode( h.form(h.url_for(action='deleteclip'), multipart=True) ))
+            __M_writer(u'\n<td>')
+            # SOURCE LINE 163
+            __M_writer(unicode( h.submit('Delete') ))
+            __M_writer(u' </td>\n')
             # SOURCE LINE 164
-            context.write(u'    <td>')
-            context.write(unicode(clipinfo['start_time']))
-            context.write(u'</td>\n    <td>')
+            __M_writer(unicode( h.hidden_field('clipid', value=clipinfo['ixc']) ))
+            __M_writer(u'\n')
             # SOURCE LINE 165
-            context.write(unicode(clipinfo['desc']))
-            context.write(u'</td>\n    <td>')
+            __M_writer(unicode( h.hidden_field('itemid', value=c.itemid) ))
+            __M_writer(u'\n')
             # SOURCE LINE 166
-            context.write(unicode(clipinfo['a_href']))
-            context.write(u'</td>\n\n\n')
-            # SOURCE LINE 169
-            context.write(unicode( h.form(h.url(action='deleteclip'), multipart=True) ))
-            context.write(u'\n<td>')
-            # SOURCE LINE 170
-            context.write(unicode( h.submit('Delete') ))
-            context.write(u' </td>\n')
-            # SOURCE LINE 171
-            context.write(unicode( h.hidden_field('clipid', value=clipinfo['ixc']) ))
-            context.write(u'\n')
-            # SOURCE LINE 172
-            context.write(unicode( h.hidden_field('itemid', value=c.itemid) ))
-            context.write(u'\n')
-            # SOURCE LINE 173
-            context.write(unicode( h.end_form() ))
-            context.write(u' \n\n\n</tr> \n')
+            __M_writer(unicode( h.end_form() ))
+            __M_writer(u' \n\n</tr> \n')
+        # SOURCE LINE 170
+        __M_writer(u'</table>\n\nAdd new clip:\n<!--')
+        # SOURCE LINE 173
+        __M_writer(unicode( h.form(h.url_for(action='addclip'), multipart=True) ))
+        __M_writer(u'-->\n<form name="addaclip" action="addclip" >\n<table style="font-size:small">\n<tr>\n    <td>Start</td>\n  <td>')
         # SOURCE LINE 178
-        context.write(u'</table>\n\nAdd new clip:\n<!--')
-        # SOURCE LINE 181
-        context.write(unicode( h.form(h.url(action='addclip'), multipart=True) ))
-        context.write(u'-->\n<form name="addaclip" action="addclip" >\n<table style="font-size:small">\n<tr>\n    <td>Start</td>\n  <td>')
-        # SOURCE LINE 186
-        context.write(unicode( h.text_field('starttime', size=5) ))
-        context.write(u'</td>\n</tr>\n<tr>\n<tr>\n    <td>End</td>\n  <td>')
-        # SOURCE LINE 191
-        context.write(unicode( h.text_field('endtime', size=5) ))
-        context.write(u'</td>\n</tr>\n<td>Desc</td>\n  <td>\n  <input type="text" name="desc" size="20" onfocus="disableShortcuts()" onblur="enableShortcuts()" id="desc" />\n  <!--')
+        __M_writer(unicode( h.text_field('starttime', size=5) ))
+        __M_writer(u'</td>\n</tr>\n<tr>\n<tr>\n    <td>End</td>\n  <td>')
+        # SOURCE LINE 183
+        __M_writer(unicode( h.text_field('endtime', size=5) ))
+        __M_writer(u'</td>\n</tr>\n<td>Desc</td>\n  <td>\n  <input type="text" name="desc" size="20" onfocus="disableShortcuts()" onblur="enableShortcuts()" id="desc" />\n  <!--')
+        # SOURCE LINE 188
+        __M_writer(unicode( h.text_field('desc') ))
+        __M_writer(u'--></td>\n</tr>\n<tr>\n    <td>a_text</td>\n  <td>')
+        # SOURCE LINE 192
+        __M_writer(unicode( h.text_field('a_text') ))
+        __M_writer(u'</td>\n</tr>\n<tr>\n    <td>a_href</td>\n  <td>')
         # SOURCE LINE 196
-        context.write(unicode( h.text_field('desc') ))
-        context.write(u'--></td>\n</tr>\n<tr>\n    <td>a_text</td>\n  <td>')
+        __M_writer(unicode( h.text_field('a_href') ))
+        __M_writer(u'</td>\n</tr>\n</table>\n')
+        # SOURCE LINE 199
+        __M_writer(unicode( h.hidden_field('headindex', value = c.headdict['index']) ))
+        __M_writer(u'\n')
         # SOURCE LINE 200
-        context.write(unicode( h.text_field('a_text') ))
-        context.write(u'</td>\n</tr>\n<tr>\n    <td>a_href</td>\n  <td>')
-        # SOURCE LINE 204
-        context.write(unicode( h.text_field('a_href') ))
-        context.write(u'</td>\n</tr>\n</table>\n')
-        # SOURCE LINE 207
-        context.write(unicode( h.hidden_field('headindex', value = c.headdict['index']) ))
-        context.write(u'\n')
-        # SOURCE LINE 208
-        context.write(unicode( h.hidden_field('itemid', value=c.itemid) ))
-        context.write(u'\n')
-        # SOURCE LINE 209
-        context.write(unicode( h.hidden_field('hasvideo', value=c.sourcedict['has_video']) ))
-        context.write(u'\n')
-        # SOURCE LINE 210
-        context.write(unicode( h.submit('Add') ))
-        context.write(u' \n')
-        # SOURCE LINE 211
-        context.write(unicode( h.end_form() ))
-        context.write(u' \n\n<script>\nvar plugin = document.embeds[0];\nvar input  = document.api.ifield;\nvar clipstart = document.addaclip.starttime;\nvar goto  = document.api.gotofield;\nvar output = document.api.ofield;\nvar focusid = "enable";\nvar shortcuts = document.api.shortcuts;\n\nfunction Play() {\n  plugin.play();\n  addOutput("Play");\n}\n\nfunction Pause() {\n  plugin.pause();\n  addOutput("Pause");\n}\n\nfunction SetLocation(location) {\n//  plugin.setPlayPosition(location);\n  plugin.setCurrentMovie(location);\n  addOutput("Current movie: " + plugin.getCurrentMovie());\n  addOutput("setting a location: " + location + " ms");\n}\n\nfunction GetPlayPosition() {\n  addOutput("Play position: " + plugin.getPlayPosition() + " ms");\n}\n\nfunction PauseOrPlay(){\n\taddOutput("current state: " + plugin.getCurrentState());\n\tif (plugin.getCurrentState()==0) {Play();}\n\telse {\n\tif (plugin.getCurrentState()==1) Pause();}\n}\n\nfunction skip(dir) {\n//    addOutput
 ("we get here")\n    i = getInput();\n    addOutput("i is " + i);\n    if (i <= 0) i = 1000;\n    addOutput("dir is " + dir);\n    t = plugin.getPlayPosition() + (i * dir);\n    addOutput("t is " + t);\n    addOutput("Skipping by " + i + " to " + t + " ms - " +\n            (plugin.setPlayPosition(t) ? "succeeded" : "failed"));\n}\n\nfunction getInput() {\n  i = parseInt(input.value);\n  return isNaN(i) ? 0 : i;\n}\n\nfunction getGoto() {\n  i = parseInt(goto.value);\n  return isNaN(i) ? 0 : i;\n}\n\n\nfunction GotoPosition() {\n  i = getGoto();\n  i = i * 1000;\n  plugin.setPlayPosition(i);\n}\n\nvar outLines = 0;\n\nfunction addOutput(str) {\n  if (outLines == 0) {\n    output.value = str;\n  } else {\n    output.value = str + "\\n" + output.value;\n  }\n  outLines++;\n  if (outLines == 11) {\n    i = output.value.lastIndexOf("\\n");\n    output.value = output.value.substr(0, i);\n    outLines--;\n  }\n\n}\n\nfunction addClipStarttime() {\n  clipstart.value = plugin.getPla
 yPosition()/1000;\n}\n\nfunction keyPressed(e) {\n  if (focusid=="disable") {return;}\n  else {\n  switch (String.fromCharCode(e.which)) {\n  \tcase "t": GetPlayPosition(); break;\n  \tcase "s": addClipStarttime(); break;\n  \tcase "p": PauseOrPlay(); break;\n  }\n  focusid="enable";\n  }\n}\nfunction disableShortcuts() {\n  focusid="disable";\n  addOutput("Shortcuts: " + focusid);\n  }\n\nfunction enableShortcuts() {\n  focusid="enable";\n  addOutput("Shortcuts: " + focusid);\n  }\n\nfunction toggleShortcuts() {\n  if (focusid=="enable") {focusid="disable";}\n  else {\n  if (focusid=="disable") {focusid="enable";}\n  }\n\n}\n\n</script>\n\n\n')
+        __M_writer(unicode( h.hidden_field('itemid', value=c.itemid) ))
+        __M_writer(u'\n')
+        # SOURCE LINE 201
+        __M_writer(unicode( h.hidden_field('hasvideo', value=c.sourcedict['has_video']) ))
+        __M_writer(u'\n')
+        # SOURCE LINE 202
+        __M_writer(unicode( h.submit('Add') ))
+        __M_writer(u' \n')
+        # SOURCE LINE 203
+        __M_writer(unicode( h.end_form() ))
+        __M_writer(u' \n\n\n<script>\n\nvar output = document.api.ofield;\n\nfunction VideoClipPlay(location) {\n  var myVideo = document.getElementsByTagName(\'video\')[0];\n  myVideo.src = location\n  myVideo.load();\n  myVideo.play();\n  addOutput("Video clip");\n \n}\n\n\nfunction AudioClipPlay(location) {\n  var myAudio = document.getElementsByTagName(\'audio\')[0];\n  myAudio.src = location\n  myAudio.load();\n  myAudio.play();\n  addOutput("Audio clip");\n \n}\n\nvar outLines = 0;\n\nfunction addOutput(str) {\n  if (outLines == 0) {\n    output.value = str;\n  } else {\n    output.value = str + "\\n" + output.value;\n  }\n  outLines++;\n  if (outLines == 11) {\n    i = output.value.lastIndexOf("\\n");\n    output.value = output.value.substr(0, i);\n    outLines--;\n  }\n\n}\n</script>\n\n\n')
         return ''
     finally:
-        context.caller_stack.pop_frame()
+        context.caller_stack._pop_frame()
 
 

Modified: arkaiv/trunk/data/templates/displayitem.mak.pyc
===================================================================
(Binary files differ)

Modified: arkaiv/trunk/data/templates/mainpage.mak.py
===================================================================
--- arkaiv/trunk/data/templates/mainpage.mak.py	2009-03-31 23:56:25 UTC (rev 3907)
+++ arkaiv/trunk/data/templates/mainpage.mak.py	2009-04-20 02:52:58 UTC (rev 3908)
@@ -3,7 +3,7 @@
 __M_dict_builtin = dict
 __M_locals_builtin = locals
 _magic_number = 5
-_modified_time = 1232592201.65452
+_modified_time = 1239258391.0307009
 _template_filename='/home/dcrowdy/src/arkaiv/trunk/arkaiv/templates/mainpage.mak'
 _template_uri='/mainpage.mak'
 _template_cache=cache.Cache(__name__, _modified_time)
@@ -36,7 +36,7 @@
             # SOURCE LINE 7
             __M_writer(u'<li>\n    ')
             # SOURCE LINE 8
-            __M_writer(unicode( h.link_to(item['name'], h.url(action="displayitem", edit="no", id=item['index'])) ))
+            __M_writer(unicode( h.link_to(item['name'], h.url_for(action="displayitem", edit="no", id=item['index'])) ))
             __M_writer(u'\n</li>\n')
         # SOURCE LINE 11
         __M_writer(u'\n\n')

Modified: arkaiv/trunk/data/templates/mainpage.mak.pyc
===================================================================
(Binary files differ)



More information about the commits mailing list