aboutsummaryrefslogtreecommitdiffhomepage
path: root/tpl/default
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-09-25 13:29:36 +0200
committerArthurHoaro <arthur@hoa.ro>2020-10-15 09:08:46 +0200
commit4cf3564d28dc8e4d08a3e64f09ad045ffbde97ae (patch)
tree8f8ef095cdfea3b35953417fd3d8bb6cdbc7cb46 /tpl/default
parentf34554c6c2cd8fe99fe2e8907bfc196a4884416a (diff)
downloadShaarli-4cf3564d28dc8e4d08a3e64f09ad045ffbde97ae.tar.gz
Shaarli-4cf3564d28dc8e4d08a3e64f09ad045ffbde97ae.tar.zst
Shaarli-4cf3564d28dc8e4d08a3e64f09ad045ffbde97ae.zip
Add a setting to retrieve bookmark metadata asynchrounously
- There is a new standalone script (metadata.js) which requests a new controller to get bookmark metadata and fill the form async - This feature is enabled with the new setting: general.enable_async_metadata (enabled by default) - general.retrieve_description is now enabled by default - A small rotating loader animation has a been added to bookmark inputs when metadata is being retrieved (default template) - Custom JS htmlentities has been removed and mathiasbynens/he library is used instead Fixes #1563
Diffstat (limited to 'tpl/default')
-rw-r--r--tpl/default/editlink.html22
1 files changed, 18 insertions, 4 deletions
diff --git a/tpl/default/editlink.html b/tpl/default/editlink.html
index 568545bd..7ab7e1fe 100644
--- a/tpl/default/editlink.html
+++ b/tpl/default/editlink.html
@@ -12,6 +12,8 @@
12 action="{$base_path}/admin/shaare" 12 action="{$base_path}/admin/shaare"
13 class="page-form pure-u-lg-3-5 pure-u-22-24 page-form page-form-light" 13 class="page-form pure-u-lg-3-5 pure-u-22-24 page-form page-form-light"
14 > 14 >
15 {$asyncLoadClass=$link_is_new && $async_metadata && empty($link.title) ? 'loading-input' : ''}
16
15 <h2 class="window-title"> 17 <h2 class="window-title">
16 {if="!$link_is_new"}{'Edit Shaare'|t}{else}{'New Shaare'|t}{/if} 18 {if="!$link_is_new"}{'Edit Shaare'|t}{else}{'New Shaare'|t}{/if}
17 </h2> 19 </h2>
@@ -28,21 +30,32 @@
28 <div> 30 <div>
29 <label for="lf_title">{'Title'|t}</label> 31 <label for="lf_title">{'Title'|t}</label>
30 </div> 32 </div>
31 <div> 33 <div class="{$asyncLoadClass}">
32 <input type="text" name="lf_title" id="lf_title" value="{$link.title}" class="lf_input autofocus"> 34 <input type="text" name="lf_title" id="lf_title" value="{$link.title}"
35 class="lf_input {if="!$async_metadata"}autofocus{/if}"
36 >
37 <div class="icon-container">
38 <i class="loader"></i>
39 </div>
33 </div> 40 </div>
34 <div> 41 <div>
35 <label for="lf_description">{'Description'|t}</label> 42 <label for="lf_description">{'Description'|t}</label>
36 </div> 43 </div>
37 <div> 44 <div class="{if="$retrieve_description"}{$asyncLoadClass}{/if}">
38 <textarea name="lf_description" id="lf_description" class="autofocus">{$link.description}</textarea> 45 <textarea name="lf_description" id="lf_description" class="autofocus">{$link.description}</textarea>
46 <div class="icon-container">
47 <i class="loader"></i>
48 </div>
39 </div> 49 </div>
40 <div> 50 <div>
41 <label for="lf_tags">{'Tags'|t}</label> 51 <label for="lf_tags">{'Tags'|t}</label>
42 </div> 52 </div>
43 <div> 53 <div class="{if="$retrieve_description"}{$asyncLoadClass}{/if}">
44 <input type="text" name="lf_tags" id="lf_tags" value="{$link.tags}" class="lf_input autofocus" 54 <input type="text" name="lf_tags" id="lf_tags" value="{$link.tags}" class="lf_input autofocus"
45 data-list="{loop="$tags"}{$key}, {/loop}" data-multiple data-autofirst autocomplete="off" > 55 data-list="{loop="$tags"}{$key}, {/loop}" data-multiple data-autofirst autocomplete="off" >
56 <div class="icon-container">
57 <i class="loader"></i>
58 </div>
46 </div> 59 </div>
47 60
48 <div> 61 <div>
@@ -88,5 +101,6 @@
88 </form> 101 </form>
89 </div> 102 </div>
90 {include="page.footer"} 103 {include="page.footer"}
104 {if="$link_is_new && $async_metadata"}<script src="{$asset_path}/js/metadata.min.js?v={$version_hash}#"></script>{/if}
91</body> 105</body>
92</html> 106</html>