diff options
| author | Max Kremmel <xing@synapse.plus.com> | 2007-10-31 15:47:58 +0000 |
|---|---|---|
| committer | Max Kremmel <xing@synapse.plus.com> | 2007-10-31 15:47:58 +0000 |
| commit | 9199bdc7cb6de6734acce36aa54c77463f45b8a0 (patch) | |
| tree | ea8aeff9de8f7428ea173b53b281d375261569bc /templates/edit_storage_list.tpl | |
| parent | a54ac270bc7d578605e0f59926e11541dabda17d (diff) | |
| download | liberty-9199bdc7cb6de6734acce36aa54c77463f45b8a0.tar.gz liberty-9199bdc7cb6de6734acce36aa54c77463f45b8a0.tar.bz2 liberty-9199bdc7cb6de6734acce36aa54c77463f45b8a0.zip | |
fix attachments ajax conflict by using a simple file to wrap request and handle liberty related ajax calls and generally try to simplify insanity of code
Diffstat (limited to 'templates/edit_storage_list.tpl')
| -rw-r--r-- | templates/edit_storage_list.tpl | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/templates/edit_storage_list.tpl b/templates/edit_storage_list.tpl index bf50b61..279cf38 100644 --- a/templates/edit_storage_list.tpl +++ b/templates/edit_storage_list.tpl @@ -1,16 +1,12 @@ {strip} {* don't replicate the surrounding div when inserting ajax content *} -{if !$libertyUploader && !$attachmentBrowser} +{if !$libertyUploader} <div id="edit_storage_list{if !$uploadTab}_tab{/if}"> {/if} {if $gContent->mStorage} <div class="row"> <table class="data" summary="List of attached files"> - {if $attachmentBrowser} - <caption>{tr}Your Attachments{/tr}</caption> - {else} - <caption>{tr}Items {if $libertyUploader && empty($gContent->mContentId)}That Will Be{/if} Attached Directly to this Content{/tr}</caption> - {/if} + <caption>{tr}Items {if $libertyUploader && empty($gContent->mContentId)}That Will Be{/if} Attached Directly to this Content{/tr}</caption> <tr> <th scope="col" style="width:30%;" title="{tr}Thumbnail{/tr}">{tr}Thumbnail{/tr}</th> <th scope="col" style="width:40%;" title="{tr}Inclusion Code{/tr}">{tr}Inclusion Code{/tr}</th> @@ -39,20 +35,15 @@ <br /> {/if} {if $gBitUser->isAdmin() || ($storage.user_id == $gBitUser->mUserId && $gBitUser->hasPermission('p_liberty_delete_attachments') ) } - {if $attachmentBrowser} + {if $libertyUploader || $gBitSystem->getConfig('liberty_attachment_style') == 'ajax'} + {capture name=urlArgs}{$attachmentBaseArgs}content_id={$gContent->mContentId}{if empty($gContent->mContentId)}{foreach from=$gContent->mStorage key=key item=val}&STORAGE[existing][{$val.attachment_id}]={$val.attachment_id}{/foreach}{/if}{/capture} <a href="javascript: - BitAjax.updater('edit_storage_list', '{$attachmentBaseUrl}', 'deleteAttachment={$attachmentId}'); - BitAjax.updater('edit_storage_list_tab', '{$attachmentBaseUrl}', 'content_id={$gContent->mContentId}');"> - {biticon ipackage="icons" iname="edit-delete" iexplain="delete"} - </a> - {elseif $libertyUploader || $gBitSystem->getConfig('liberty_attachment_style') == 'ajax'} - <a href="javascript: - BitAjax.updater('edit_storage_list', '{$attachmentBaseUrl}', '{$attachmentBaseArgs}content_id={$gContent->mContentId}&deleteAttachment={$attachmentId}{if empty($gContent->mContentId)}{foreach from=$gContent->mStorage key=key item=val}&STORAGE[existing][{$val.attachment_id}]={$val.attachment_id}{/foreach}{/if}'); - BitAjax.updater('edit_storage_list_tab', '{$attachmentBaseUrl}', '{$attachmentBaseArgs}content_id={$gContent->mContentId}{if empty($gContent->mContentId)}{foreach from=$gContent->mStorage key=key item=val}&STORAGE[existing][{$val.attachment_id}]={$val.attachment_id}{/foreach}{/if}');"> - {biticon ipackage="icons" iname="edit-delete" iexplain="delete"} + BitAjax.updater('edit_storage_list', '{$smarty.const.LIBERTY_PKG_URL}ajax_edit_storage.php', '{$smarty.capture.urlArgs}&deleteAttachment={$attachmentId}'); + BitAjax.updater('edit_storage_list_tab', '{$smarty.const.LIBERTY_PKG_URL}ajax_edit_storage.php', '{$smarty.capture.urlArgs}');"> + {biticon ipackage="icons" iname="edit-delete" iexplain="delete"} </a> {else} - <a href="{$attachmentBaseUrl}&deleteAttachment={$attachmentId}">{biticon ipackage="icons" iname="edit-delete" iexplain="delete"}</a> + <a href="{$smarty.server.PHP_SELF}?{$smarty.const.urlArgs}&deleteAttachment={$attachmentId}">{biticon ipackage="icons" iname="edit-delete" iexplain="delete"}</a> {/if} {/if} </td> @@ -61,7 +52,7 @@ </table> </div> {/if} -{if !$libertyUploader && !$attachmentBrowser} +{if !$libertyUploader} </div> {/if} {/strip} |
