Permalink
Browse files

Merge branch 'master' of https://github.com/plumi/plumi.content

  • Loading branch information...
2 parents 4a914fa + c435fb4 commit 94dffe4363d16457bb8f4fb01785a9e7056bd475 @mgogoulos mgogoulos committed Feb 21, 2012
@@ -266,10 +266,14 @@ def autoPublishOrHide(self):
try:
workflow = getToolByName(self.context, 'portal_workflow')
state = workflow.getInfoFor(self.context,'review_state')
+ if state == 'private':
+ workflow.doActionFor(self.context, 'show')
+ state = workflow.getInfoFor(self.context,'review_state')
#dont try to resubmit if already published.
if not state == 'published':
workflow.doActionFor(self.context, 'submit')
- worked = True
+ import transaction; transaction.commit()
+ worked = True
except WorkflowException:
worked = False
pass
@@ -16,7 +16,7 @@
tal:define="mp4 video/isTranscodedPlumiVideoObj/mp4-low|nothing;
webm video/isTranscodedPlumiVideoObj/webm-low|nothing;">
- <video id="main-video" class="featured-video" controls width="320" height="183" tal:attributes="poster fullThumb" controls="controls" preload="none">
+ <video id="main-video" class="featured-video" controls width="320" height="183" tal:attributes="poster fullThumb" controls="controls" preload="metadata">
<source tal:condition="python:webm and webm['status']=='ok'" tal:attributes="src string:${webm/address}/${webm/path}" type="video/webm" />
<source tal:condition="python:mp4 and mp4['status']=='ok'" tal:attributes="src string:${mp4/address}/${mp4/path}" type="video/mp4" />
<object width="320" height="183" type="application/x-shockwave-flash" data="++resource++collective.mediaelementjs/flashmediaelement.swf">
@@ -130,3 +130,4 @@
</dl>
</tal:video>
+<script type="text/javascript" src="http://s3.www.universalsubtitles.org/js/unisubs-widgetizer.js"></script>
@@ -5,7 +5,6 @@
<permission name="plumi.content: Add PlumiCallOut" acquire="False">
<role name="Manager" />
<role name="Contributor" />
- <role name="Member"/>
<role name="Owner"/>
</permission>
<permission name="plumi.content: Add Plumi Callout Folder" acquire="False">
@@ -21,7 +20,6 @@
<permission name="plumi.content: Add PlumiVideo" acquire="False">
<role name="Manager" />
<role name="Contributor" />
- <role name="Member"/>
<role name="Owner"/>
</permission>
<permission name="plumi.content: ReTranscode Video" acquire="False">
@@ -120,7 +120,7 @@ def notifyModifiedPlumiVideo(obj ,event):
log.info("notifyModifiedPlumiVideo... %s in state (%s) with event %s " % (obj.Title(), state, event))
request = getSite().REQUEST
#VISIBLE
- if state == 'visible' and request.has_key('form.button.save'):
+ if state in ['private','visible'] and request.has_key('form.button.save'):
#call IPlumiWorkflow API to decide if its ready to publish or needs hiding.
# The adapter object will implement the logic for various content types
if IPlumiWorkflow(obj).autoPublishOrHide():
@@ -146,17 +146,15 @@ def notifyInitPlumiVideo(obj ,event):
state = None
request = getSite().REQUEST
#VISIBLE
- if state == 'visible' and request.has_key('form.button.save'):
+ #if state in ['private','visible'] and request.has_key('form.button.save'):
#call IPlumiWorkflow API to decide if its ready to publish or needs hiding.
# The adapter object will implement the logic for various content types
- if IPlumiWorkflow(obj).autoPublishOrHide():
- IPlumiWorkflow(obj).notifyOwnerVideoSubmitted()
- IPlumiWorkflow(obj).notifyReviewersVideoSubmitted()
+ # if IPlumiWorkflow(obj).autoPublishOrHide():
+ # IPlumiWorkflow(obj).notifyOwnerVideoSubmitted()
+ # IPlumiWorkflow(obj).notifyReviewersVideoSubmitted()
- setup_metadata(obj)
+ #setup_metadata(obj)
-
-@adapter(IPlumiVideo, IObjectInitializedEvent)
def autoSubmit(obj, event):
""" Automatically submit news items, events & callouts """
log = logging.getLogger('plumi.content.subscribers')

0 comments on commit 94dffe4

Please sign in to comment.