Skip to content
Snippets Groups Projects
Commit c5aa1392 authored by Golnaz Nilieh's avatar Golnaz Nilieh
Browse files

Use an animated gif in add-bookmark form, while fetching metadata.

parent 0b5f0ac2
No related branches found
No related tags found
No related merge requests found
...@@ -84,3 +84,8 @@ ...@@ -84,3 +84,8 @@
.clear { .clear {
clear:both; clear:both;
} }
.loading_meta {
display: none;
margin-left: 5px;
}
\ No newline at end of file
...@@ -18,6 +18,7 @@ $(document).ready(function() { ...@@ -18,6 +18,7 @@ $(document).ready(function() {
$('.bookmarks_list').empty(); $('.bookmarks_list').empty();
getBookmarks(); getBookmarks();
}); });
function getBookmarks() { function getBookmarks() {
...@@ -45,7 +46,8 @@ function getBookmarks() { ...@@ -45,7 +46,8 @@ function getBookmarks() {
} }
function getMetadata() { function getMetadata() {
var url = encodeEntities($('#bookmark_add_url').val()) var url = encodeEntities($('#bookmark_add_url').val());
$('.loading_meta').css('display','inline');
$.ajax({ $.ajax({
url: 'ajax/getMeta.php', url: 'ajax/getMeta.php',
data: 'url=' + encodeURIComponent(url), data: 'url=' + encodeURIComponent(url),
...@@ -55,6 +57,7 @@ function getMetadata() { ...@@ -55,6 +57,7 @@ function getMetadata() {
if (pageinfo.data.description !== undefined){ if (pageinfo.data.description !== undefined){
$('#bookmark_add_description').val(pageinfo.data.description); $('#bookmark_add_description').val(pageinfo.data.description);
} }
$('.loading_meta').css('display','none');
} }
}); });
} }
......
...@@ -6,8 +6,10 @@ ...@@ -6,8 +6,10 @@
</div> </div>
<div class="bookmarks_add"> <div class="bookmarks_add">
<p><label class="bookmarks_label">Address</label><input type="text" id="bookmark_add_url" class="bookmarks_input" /></p> <p><label class="bookmarks_label">Address</label><input type="text" id="bookmark_add_url" class="bookmarks_input" /></p>
<p><label class="bookmarks_label">Title</label><input type="text" id="bookmark_add_title" class="bookmarks_input" /></p> <p><label class="bookmarks_label">Title</label><input type="text" id="bookmark_add_title" class="bookmarks_input" />
<p><label class="bookmarks_label">Description</label><input type="text" id="bookmark_add_description" class="bookmarks_input" /></p> <img class="loading_meta" src="<?php echo OC_Helper::imagePath('core', 'loading.gif'); ?>" /></p>
<p><label class="bookmarks_label">Description</label><input type="text" id="bookmark_add_description" class="bookmarks_input" />
<img class="loading_meta" src="<?php echo OC_Helper::imagePath('core', 'loading.gif'); ?>" /></p>
<p><label class="bookmarks_label">Tags</label><input type="text" id="bookmark_add_tags" class="bookmarks_input" /></p> <p><label class="bookmarks_label">Tags</label><input type="text" id="bookmark_add_tags" class="bookmarks_input" /></p>
<p><label class="bookmarks_label"> </label><label class="bookmarks_hint">Hint: Use space to separate tags.</label></p> <p><label class="bookmarks_label"> </label><label class="bookmarks_hint">Hint: Use space to separate tags.</label></p>
<p><label class="bookmarks_label"></label><input type="submit" id="bookmark_add_submit" /></p> <p><label class="bookmarks_label"></label><input type="submit" id="bookmark_add_submit" /></p>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment