Remise en fonction du presse papier.
authorBenoît Pin <pin@cri.ensmp.fr>
Tue, 4 Mar 2014 16:56:00 +0000 (17:56 +0100)
committerBenoît Pin <pin@cri.ensmp.fr>
Tue, 4 Mar 2014 16:56:00 +0000 (17:56 +0100)
skins/control/emptyClipboard.py
skins/generic/folder_contents_macros.pt
skins/generic/widgets.pt
utils.py

index 0d306d8..efa7cc9 100644 (file)
@@ -21,4 +21,8 @@ if not ajax:
                   '?' + make_query(portal_status_message=message)
        response.redirect(redirUrl)
 else :
                   '?' + make_query(portal_status_message=message)
        response.redirect(redirUrl)
 else :
-       return "..."
\ No newline at end of file
+    options={}
+    options['template'] = 'widgets'
+    options['macro'] = 'clipboard'
+    options['fragmentId'] = 'clipboard'
+    return context.use_macro(**options)
\ No newline at end of file
index 19be9c1..4a6bc04 100644 (file)
@@ -70,6 +70,7 @@
       <span metal:use-macro="here/batch_macros/macros/navigation">batch navigation</span>
     </div>
     <script type="text/javascript">
       <span metal:use-macro="here/batch_macros/macros/navigation">batch navigation</span>
     </div>
     <script type="text/javascript">
+    <!--
                (function(){
                        // ordering / selecting
                        var firsItemPosElement = document.getElementById('FirstItemPos');
                (function(){
                        // ordering / selecting
                        var firsItemPosElement = document.getElementById('FirstItemPos');
@@ -93,6 +94,7 @@
                        }
 
                }());
                        }
 
                }());
+    // -->
     </script>
     <script type="text/javascript" tal:condition="options/form/items_add_allowed">
                (function(){
     </script>
     <script type="text/javascript" tal:condition="options/form/items_add_allowed">
                (function(){
index 83eb628..be44d58 100644 (file)
@@ -50,9 +50,9 @@
     
     <div metal:define-macro="clipboard"
          tal:condition="python:not request.SESSION.get('editBoxes')"
     
     <div metal:define-macro="clipboard"
          tal:condition="python:not request.SESSION.get('editBoxes')"
-         tal:omit-tag=""
          i18n:domain="plinn"
          i18n:domain="plinn"
-         tal:on-error="python:here.emptyClipboard(empty=True,ajax=True) and None">
+         tal:on-error="python:here.emptyClipboard(empty=True,ajax=True) and None"
+         id="clipboard">
        <table tal:condition="clip" class="clipboard" cellspacing="0" tal:define="clip here/getCPInfoList">
                <tr><th i18n:translate="">Clipboard</th></tr>
                <tr><td>
        <table tal:condition="clip" class="clipboard" cellspacing="0" tal:define="clip here/getCPInfoList">
                <tr><th i18n:translate="">Clipboard</th></tr>
                <tr><td>
index aa91c8d..6261982 100755 (executable)
--- a/utils.py
+++ b/utils.py
@@ -165,7 +165,11 @@ def _checkMemberPermission(userid, permission, obj, StringType = type('')):
     return 0
     
 def getCPInfo(self) :
     return 0
     
 def getCPInfo(self) :
-    try: cp = _cb_decode(self.REQUEST['__cp'])
+    if self.REQUEST.RESPONSE.cookies.has_key('__cp') :
+        cp = self.REQUEST.RESPONSE.cookies['__cp']['value']
+    else :
+        cp = self.REQUEST.get('__cp')
+    try: cp = _cb_decode(cp)
     except: return None
     return cp
 
     except: return None
     return cp