From decd413cb0fb290e9ddb185252dee51dc8b6b9ec Mon Sep 17 00:00:00 2001 From: =?utf8?q?Benoi=CC=82t=20Pin?= Date: Wed, 4 Dec 2013 14:32:48 +0100 Subject: [PATCH] =?utf8?q?Avancement=20sur=20l=E2=80=99upload=20par=20glis?= =?utf8?q?ser=20/=20d=C3=A9poser=20dans=20les=20dossiers.=20On=20affiche?= =?utf8?q?=20le=20fragment=20html=20apr=C3=A8s=20upload.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- profiles/default/types.xml | 0 profiles/default/types/CMF_Site.xml | 2 -- profiles/default/types/Huge_Plinn_Folder.xml | 6 ++---- profiles/default/types/Photo.xml | 1 + profiles/photo/types/Huge_Plinn_Folder.xml | 1 + profiles/photo/types/Photo.xml | 1 + skins/ajax_scripts/folder_contents_script.js | 14 +++++++++++++- skins/photo_theme/folder_contents_macros.pt | 4 ++-- skins/photo_theme/folder_jsupload_snippet.py | 15 +++++++++++++++ .../folder_jsupload_snippet_template.pt | 5 +++++ 10 files changed, 40 insertions(+), 9 deletions(-) mode change 100755 => 100644 profiles/default/types.xml create mode 100644 skins/photo_theme/folder_jsupload_snippet.py create mode 100644 skins/photo_theme/folder_jsupload_snippet_template.pt diff --git a/profiles/default/types.xml b/profiles/default/types.xml old mode 100755 new mode 100644 diff --git a/profiles/default/types/CMF_Site.xml b/profiles/default/types/CMF_Site.xml index d36c06c..b530b34 100644 --- a/profiles/default/types/CMF_Site.xml +++ b/profiles/default/types/CMF_Site.xml @@ -18,9 +18,7 @@ - - diff --git a/profiles/default/types/Huge_Plinn_Folder.xml b/profiles/default/types/Huge_Plinn_Folder.xml index 38799ea..b589b21 100644 --- a/profiles/default/types/Huge_Plinn_Folder.xml +++ b/profiles/default/types/Huge_Plinn_Folder.xml @@ -17,17 +17,15 @@ - - + - - False + False + False + False + - + lock diff --git a/skins/photo_theme/folder_jsupload_snippet.py b/skins/photo_theme/folder_jsupload_snippet.py new file mode 100644 index 0000000..f932675 --- /dev/null +++ b/skins/photo_theme/folder_jsupload_snippet.py @@ -0,0 +1,15 @@ +##parameters=ob +from Products.CMFCore.utils import getUtilityByInterfaceName +utool = getUtilityByInterfaceName('Products.CMFCore.interfaces.IURLTool') +locale_date_fmt = context.locale_date_fmt() +infos = {'checkbox' : True, + 'url' : ob.absolute_url(), + 'lock' : False, + 'modified' : ob.modified().strftime(locale_date_fmt), + 'title_or_id' : ob.title_or_id(), + 'position' : context.getObjectPosition(ob.getId()), + 'type' : ob.Type() or None, + 'id' : ob.getId(), + 'icon': '%s/%s' % (utool(), ob.getIcon())} + +return context.folder_jsupload_snippet_template(listItemInfos=[infos]) \ No newline at end of file diff --git a/skins/photo_theme/folder_jsupload_snippet_template.pt b/skins/photo_theme/folder_jsupload_snippet_template.pt new file mode 100644 index 0000000..8b1e813 --- /dev/null +++ b/skins/photo_theme/folder_jsupload_snippet_template.pt @@ -0,0 +1,5 @@ + + +
+ + \ No newline at end of file -- 2.20.1