<element value="File"/>
<element value="Huge Plinn Folder"/>
<element value="News Item"/>
- <element value="Order Folder"/>
<element value="Plinn Document"/>
- <element value="Huge Plinn Folder"/>
<element value="Portfolio"/>
<element value="Topic"/>
</property>
<element value="Calendar"/>
<element value="Document"/>
<element value="File"/>
- <element value="Link"/>
- <element value="Mosaic Document"/>
+ <element value="Huge Plinn Folder"/>
<element value="News Item"/>
<element value="Plinn Document"/>
- <element value="Huge Plinn Folder"/>
- <element value="Huge Plinn Folder"/>
<element value="Portfolio"/>
<element value="Topic"/>
</property>
<property name="allow_discussion">False</property>
<alias from="(Default)" to="folder_contents"/>
+ <alias from="jsupload_snippet" to="folder_jsupload_snippet"/>
<alias from="mkdir" to="createHugePlinnFolder"/>
<alias from="view" to="folder_contents"/>
<action title="View" action_id="view" category="object" condition_expr=""
<property name="allow_discussion">False</property>
<alias from="(Default)" to="photo_view"/>
<alias from="info" to="photo_info"/>
+ <alias from="jsupload_snippet" to="photo_gridthumbnail"/>
<alias from="view" to="photo_view"/>
<action title="View" action_id="view" category="object" condition_expr=""
icon_expr="" link_target="" url_expr="string:${object_url}/photo_view"
</property>
<property name="allow_discussion">False</property>
<alias from="(Default)" to="folder_contents"/>
+ <alias from="jsupload_snippet" to="folder_jsupload_snippet"/>
<alias from="mkdir" to="createHugePlinnFolder"/>
<alias from="view" to="folder_contents"/>
<action title="View" action_id="view" category="object" condition_expr=""
<property name="allow_discussion">False</property>
<alias from="(Default)" to="photo_view"/>
<alias from="info" to="photo_info"/>
+ <alias from="jsupload_snippet" to="photo_gridthumbnail"/>
<alias from="view" to="photo_view"/>
<action title="View" action_id="view" category="object" condition_expr=""
icon_expr="" link_target="" url_expr="string:${object_url}/photo_view"
};
DDFolderUploader.prototype.beforeUpload = function(item) {
+ this.uploadedItem = item;
// To be implemented by decendant.
};
DDFolderUploader.prototype.uploadCompleteHandlerCB = function(req) {
- // To be implemented by descendant.
+ var item = this.uploadedItem;
+ var row = getCopyOfNode(req.responseXML.documentElement.firstChild);
+ row.className = item.className;
+
+ if (req.status === 200) {
+ // update
+ console.log('todo');
+ }
+ else if(req.status === 201) {
+ // creation
+ this.listing.replaceChild(row, item);
+ }
};
DDFolderUploader.prototype.progressHandlerCB = function(progress) {
</tr>
</thead>
<tbody id="FolderListingBody">
-<tbody tal:repeat="item_info listItemInfos" tal:omit-tag="">
+<tbody tal:repeat="item_info listItemInfos" tal:omit-tag="" metal:define-macro="itemListing">
<tr class="" tal:attributes="class python: (even and 'even') or 'odd'" tal:define="even repeat/item_info/even">
<td><img src="." alt="lock" height="16" width="16" border="0"
tal:condition="python:not isAnon and item_info['lock']"
}
var uploadUrl = absolute_url() + '/put_upload';
- // new DDFolderUploader(document.getElementById('ForematterCell'), uploadUrl, listing);
+ new DDFolderUploader(document.getElementById('ForematterCell'), uploadUrl, listing);
}());
</script>
--- /dev/null
+##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
--- /dev/null
+<metal:block metal:use-macro="here/main_template_macros/macros/global_defines"/>
+<tal:block tal:define="listItemInfos options/listItemInfos">
+ <div metal:use-macro="here/folder_contents_macros/macros/itemListing"/>
+</tal:block>
+<tal:block tal:define="global dummy python:request.RESPONSE.setHeader('Content-Type', 'text/xml;;charset=utf-8')" />
\ No newline at end of file