diff options
author | Golnaz Nilieh <g382nilieh@gmail.com> | 2011-09-06 17:13:03 +0430 |
---|---|---|
committer | Golnaz Nilieh <g382nilieh@gmail.com> | 2011-09-06 17:13:03 +0430 |
commit | c5aa139296e57211687e09d841ebd2d5ab8131c9 (patch) | |
tree | 0403ac8684b78e33ff09f8aa8495d9394f21cb6c | |
parent | 0b5f0ac24934d5aa54de8dfab6c1de81971ccdb2 (diff) | |
download | nextcloud-server-c5aa139296e57211687e09d841ebd2d5ab8131c9.tar.gz nextcloud-server-c5aa139296e57211687e09d841ebd2d5ab8131c9.zip |
Use an animated gif in add-bookmark form, while fetching metadata.
-rw-r--r-- | apps/bookmarks/css/bookmarks.css | 5 | ||||
-rw-r--r-- | apps/bookmarks/js/bookmarks.js | 5 | ||||
-rw-r--r-- | apps/bookmarks/templates/list.php | 6 |
3 files changed, 13 insertions, 3 deletions
diff --git a/apps/bookmarks/css/bookmarks.css b/apps/bookmarks/css/bookmarks.css index 96559172448..0fc6a2ad608 100644 --- a/apps/bookmarks/css/bookmarks.css +++ b/apps/bookmarks/css/bookmarks.css @@ -84,3 +84,8 @@ .clear { clear:both; } + +.loading_meta { + display: none; + margin-left: 5px; +}
\ No newline at end of file diff --git a/apps/bookmarks/js/bookmarks.js b/apps/bookmarks/js/bookmarks.js index 7a5865370d0..fe8a266686f 100644 --- a/apps/bookmarks/js/bookmarks.js +++ b/apps/bookmarks/js/bookmarks.js @@ -18,6 +18,7 @@ $(document).ready(function() { $('.bookmarks_list').empty(); getBookmarks(); + }); function getBookmarks() { @@ -45,7 +46,8 @@ function getBookmarks() { } function getMetadata() { - var url = encodeEntities($('#bookmark_add_url').val()) + var url = encodeEntities($('#bookmark_add_url').val()); + $('.loading_meta').css('display','inline'); $.ajax({ url: 'ajax/getMeta.php', data: 'url=' + encodeURIComponent(url), @@ -55,6 +57,7 @@ function getMetadata() { if (pageinfo.data.description !== undefined){ $('#bookmark_add_description').val(pageinfo.data.description); } + $('.loading_meta').css('display','none'); } }); } diff --git a/apps/bookmarks/templates/list.php b/apps/bookmarks/templates/list.php index 4f101d44f90..a6053184aa2 100644 --- a/apps/bookmarks/templates/list.php +++ b/apps/bookmarks/templates/list.php @@ -6,8 +6,10 @@ </div> <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">Title</label><input type="text" id="bookmark_add_title" class="bookmarks_input" /></p> - <p><label class="bookmarks_label">Description</label><input type="text" id="bookmark_add_description" class="bookmarks_input" /></p> + <p><label class="bookmarks_label">Title</label><input type="text" id="bookmark_add_title" class="bookmarks_input" /> + <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"> </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> |