1
0
mirror of https://github.com/owncloud/bookmarks.git synced 2025-01-31 01:52:11 +01:00

Merge branch 'master' into migration

This commit is contained in:
Tom Needham 2012-03-27 20:19:38 +00:00
commit 7610ba3a52
2 changed files with 8 additions and 5 deletions

View File

@ -71,7 +71,7 @@ function getURLMetadata($url) {
return $metadata;
}
function addBookmark($url, $title='', $tags='') {
function addBookmark($url, $title, $tags='') {
$CONFIG_DBTYPE = OC_Config::getValue( "dbtype", "sqlite" );
if( $CONFIG_DBTYPE == 'sqlite' or $CONFIG_DBTYPE == 'sqlite3' ){
$_ut = "strftime('%s','now')";
@ -93,6 +93,11 @@ function addBookmark($url, $title='', $tags='') {
$title = $metadata['title'];
}
if(empty($title)) {
$l = new OC_L10N('bookmarks');
$title = $l->t('unnamed');
}
$params=array(
htmlspecialchars_decode($url),
htmlspecialchars_decode($title),

View File

@ -9,9 +9,7 @@ $(document).ready(function() {
fillWindow($('.bookmarks_list'));
});
$(window).resize();
$($('.bookmarks_list')).scroll(updateOnBottom);
$('.bookmarks_list').empty();
$('.bookmarks_list').scroll(updateOnBottom).empty().width($('#content').width());
getBookmarks();
});
@ -145,7 +143,7 @@ function updateBookmarksList(bookmark) {
'<p class="bookmark_title">'+
'<a href="' + encodeEntities(bookmark.url) + '" target="_blank" class="bookmark_link">' + encodeEntities(bookmark.title) + '</a>' +
'</p>' +
'<p class="bookmark_url">' + encodeEntities(bookmark.url) + '</p>' +
'<p class="bookmark_url"><a href="' + encodeEntities(bookmark.url) + '" target="_blank" class="bookmark_link">' + encodeEntities(bookmark.url) + '</a></p>' +
'</div>'
);
if(taglist != '') {