Discard outdated autosave data
authorAlexander Ebert <ebert@woltlab.com>
Fri, 19 May 2017 18:40:45 +0000 (20:40 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 19 May 2017 18:40:45 +0000 (20:40 +0200)
See #2270

wcfsetup/install/files/acp/templates/__boxAddContent.tpl
wcfsetup/install/files/acp/templates/__pageAddContent.tpl

index c6a273dafcebeb2f07a00a52acf5d282fa700529..6b5fa1e600b53bb78da6ec4c97123cd0f28d9484 100644 (file)
@@ -27,6 +27,7 @@
        <textarea name="content[{@$languageID}]" id="content{@$languageID}"
                {if $boxType == 'text'}
                        class="wysiwygTextarea" data-disable-attachments="true" data-autosave="com.woltlab.wcf.box{$action|ucfirst}-{if $action == 'edit'}{@$boxID}{else}0{/if}-{@$languageID}"
+                       {if $action === 'edit'}data-autosave-last-edit-time="{@$box->lastUpdateTime}"{/if}
                {/if}
        >{if !$content[$languageID]|empty}{$content[$languageID]}{/if}</textarea>
        
@@ -45,6 +46,7 @@
                <textarea name="content[{@$languageID}]" id="content{@$languageID}"
                        {if $boxType == 'text'}
                                class="wysiwygTextarea" data-disable-attachments="true" data-autosave="com.woltlab.wcf.box{$action|ucfirst}-{if $action == 'edit'}{@$boxID}{else}0{/if}-{@$languageID}"
+                               {if $action === 'edit'}data-autosave-last-edit-time="{@$box->lastUpdateTime}"{/if}
                        {/if}
                >{if !$content[$languageID]|empty}{$content[$languageID]}{/if}</textarea>
        </div>
index ec596752f1a7f7114c8201157d37003983ccdfcc..ca369e8a7ddefbc781ee624abf7537b78162038a 100644 (file)
@@ -31,6 +31,7 @@
        <textarea name="content[{@$languageID}]" id="{@$__pageContentID}"
                {if $pageType == 'text'}
                        class="wysiwygTextarea" data-disable-attachments="true" data-autosave="com.woltlab.wcf.page{$action|ucfirst}-{if $action == 'edit'}{@$pageID}{else}0{/if}-{@$languageID}"
+                       {if $action === 'edit'}data-autosave-last-edit-time="{@$page->lastUpdateTime}"{/if}
                {/if}
        >{if !$content[$languageID]|empty}{$content[$languageID]}{/if}</textarea>
        
@@ -49,6 +50,7 @@
                <textarea name="content[{@$languageID}]" id="{@$__pageContentID}"
                        {if $pageType == 'text'}
                                class="wysiwygTextarea" data-disable-attachments="true" data-autosave="com.woltlab.wcf.page{$action|ucfirst}-{if $action == 'edit'}{@$pageID}{else}0{/if}-{@$languageID}"
+                               {if $action === 'edit'}data-autosave-last-edit-time="{@$page->lastUpdateTime}"{/if}
                        {/if}
                >{if !$content[$languageID]|empty}{$content[$languageID]}{/if}</textarea>
        </div>