mirror of
https://github.com/owncloud/bookmarks.git
synced 2025-01-31 01:52:11 +01:00
merge master into gallery
This commit is contained in:
commit
1e24d07149
110
3rdparty/css/jquery.tagit.css
vendored
Normal file
110
3rdparty/css/jquery.tagit.css
vendored
Normal file
@ -0,0 +1,110 @@
|
||||
ul.tagit {
|
||||
padding: 1px 5px;
|
||||
overflow: auto;
|
||||
margin-left: inherit; /* usually we don't want the regular ul margins. */
|
||||
margin-right: inherit;
|
||||
}
|
||||
ul.tagit li {
|
||||
display: block;
|
||||
float: left;
|
||||
margin: 2px 5px 2px 0;
|
||||
}
|
||||
ul.tagit li.tagit-choice {
|
||||
padding: .2em 18px .2em .5em;
|
||||
position: relative;
|
||||
line-height: inherit;
|
||||
}
|
||||
ul.tagit li.tagit-new {
|
||||
padding: .25em 4px .25em 0;
|
||||
}
|
||||
|
||||
ul.tagit li.tagit-choice a.tagit-label {
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
}
|
||||
ul.tagit li.tagit-choice .close {
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
right: .1em;
|
||||
top: 50%;
|
||||
margin-top: -8px;
|
||||
}
|
||||
|
||||
/* used for some custom themes that don't need image icons */
|
||||
ul.tagit li.tagit-choice .close .text-icon {
|
||||
display: none;
|
||||
}
|
||||
|
||||
ul.tagit li.tagit-choice input {
|
||||
display: block;
|
||||
float: left;
|
||||
margin: 2px 5px 2px 0;
|
||||
}
|
||||
ul.tagit input[type="text"] {
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
|
||||
border: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: inherit;
|
||||
background-color: inherit;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
|
||||
/***** ZENDESK ***/
|
||||
|
||||
/* Optional scoped theme for tag-it which mimics the zendesk widget. */
|
||||
|
||||
|
||||
ul.tagit {
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
border-color: #C6C6C6;
|
||||
background: inherit;
|
||||
}
|
||||
ul.tagit li.tagit-choice {
|
||||
-moz-border-radius: 6px;
|
||||
border-radius: 6px;
|
||||
-webkit-border-radius: 6px;
|
||||
border: 1px solid #CAD8F3;
|
||||
|
||||
background: none;
|
||||
background-color: #DEE7F8;
|
||||
|
||||
color: #555;
|
||||
font-weight: normal;
|
||||
}
|
||||
ul.tagit li.tagit-choice a.close {
|
||||
text-decoration: none;
|
||||
}
|
||||
ul.tagit li.tagit-choice .close {
|
||||
right: .4em;
|
||||
}
|
||||
ul.tagit li.tagit-choice .ui-icon {
|
||||
display: none;
|
||||
}
|
||||
ul.tagit li.tagit-choice .close .text-icon {
|
||||
display: inline;
|
||||
font-family: arial, sans-serif;
|
||||
font-size: 16px;
|
||||
line-height: 16px;
|
||||
color: #777;
|
||||
}
|
||||
ul.tagit li.tagit-choice:hover, ul.tagit li.tagit-choice.remove {
|
||||
background-color: #bbcef1;
|
||||
border-color: #6d95e0;
|
||||
}
|
||||
ul.tagit li.tagit-choice a.tagLabel:hover,
|
||||
ul.tagit li.tagit-choice a.close .text-icon:hover {
|
||||
color: #222;
|
||||
}
|
||||
ul.tagit input[type="text"] {
|
||||
color: #333333;
|
||||
background: none;
|
||||
}
|
||||
|
||||
|
||||
|
36
3rdparty/js/js_tpl.js
vendored
Normal file
36
3rdparty/js/js_tpl.js
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
|
||||
// Simple JavaScript Templating
|
||||
// John Resig - http://ejohn.org/ - MIT Licensed
|
||||
(function(){
|
||||
var cache = {};
|
||||
|
||||
this.tmpl = function tmpl(str, data){
|
||||
// Figure out if we're getting a template, or if we need to
|
||||
// load the template - and be sure to cache the result.
|
||||
var fn = !/\W/.test(str) ?
|
||||
cache[str] = cache[str] ||
|
||||
tmpl(document.getElementById(str).innerHTML) :
|
||||
|
||||
// Generate a reusable function that will serve as a template
|
||||
// generator (and which will be cached).
|
||||
new Function("obj",
|
||||
"var p=[],print=function(){p.push.apply(p,arguments);};" +
|
||||
|
||||
// Introduce the data as local variables using with(){}
|
||||
"with(obj){p.push('" +
|
||||
|
||||
// Convert the template into pure JavaScript
|
||||
str
|
||||
.replace(/[\r\t\n]/g, " ")
|
||||
.split("<%").join("\t")
|
||||
.replace(/((^|%>)[^\t]*)'/g, "$1\r")
|
||||
.replace(/\t=(.*?)%>/g, "',$1,'")
|
||||
.split("\t").join("');")
|
||||
.split("%>").join("p.push('")
|
||||
.split("\r").join("\\'")
|
||||
+ "');}return p.join('');");
|
||||
|
||||
// Provide some basic currying to the user
|
||||
return data ? fn( data ) : fn;
|
||||
};
|
||||
})();
|
376
3rdparty/js/tag-it.js
vendored
Normal file
376
3rdparty/js/tag-it.js
vendored
Normal file
@ -0,0 +1,376 @@
|
||||
/*
|
||||
* jQuery UI Tag-it!
|
||||
*
|
||||
* @version v2.0 (06/2011)
|
||||
*
|
||||
* Copyright 2011, Levy Carneiro Jr.
|
||||
* Released under the MIT license.
|
||||
* http://aehlke.github.com/tag-it/LICENSE
|
||||
*
|
||||
* Homepage:
|
||||
* http://aehlke.github.com/tag-it/
|
||||
*
|
||||
* Authors:
|
||||
* Levy Carneiro Jr.
|
||||
* Martin Rehfeld
|
||||
* Tobias Schmidt
|
||||
* Skylar Challand
|
||||
* Alex Ehlke
|
||||
*
|
||||
* Maintainer:
|
||||
* Alex Ehlke - Twitter: @aehlke
|
||||
*
|
||||
* Dependencies:
|
||||
* jQuery v1.4+
|
||||
* jQuery UI v1.8+
|
||||
*/
|
||||
(function($) {
|
||||
|
||||
$.widget('ui.tagit', {
|
||||
options: {
|
||||
itemName : 'item',
|
||||
fieldName : 'tags',
|
||||
availableTags : [],
|
||||
tagSource : null,
|
||||
removeConfirmation: false,
|
||||
caseSensitive : true,
|
||||
|
||||
// When enabled, quotes are not neccesary
|
||||
// for inputting multi-word tags.
|
||||
allowSpaces: false,
|
||||
|
||||
// The below options are for using a single field instead of several
|
||||
// for our form values.
|
||||
//
|
||||
// When enabled, will use a single hidden field for the form,
|
||||
// rather than one per tag. It will delimit tags in the field
|
||||
// with singleFieldDelimiter.
|
||||
//
|
||||
// The easiest way to use singleField is to just instantiate tag-it
|
||||
// on an INPUT element, in which case singleField is automatically
|
||||
// set to true, and singleFieldNode is set to that element. This
|
||||
// way, you don't need to fiddle with these options.
|
||||
singleField: false,
|
||||
|
||||
singleFieldDelimiter: ',',
|
||||
|
||||
// Set this to an input DOM node to use an existing form field.
|
||||
// Any text in it will be erased on init. But it will be
|
||||
// populated with the text of tags as they are created,
|
||||
// delimited by singleFieldDelimiter.
|
||||
//
|
||||
// If this is not set, we create an input node for it,
|
||||
// with the name given in settings.fieldName,
|
||||
// ignoring settings.itemName.
|
||||
singleFieldNode: null,
|
||||
|
||||
// Optionally set a tabindex attribute on the input that gets
|
||||
// created for tag-it.
|
||||
tabIndex: null,
|
||||
|
||||
|
||||
// Event callbacks.
|
||||
onTagAdded : null,
|
||||
onTagRemoved: null,
|
||||
onTagClicked: null
|
||||
},
|
||||
|
||||
|
||||
_create: function() {
|
||||
// for handling static scoping inside callbacks
|
||||
var that = this;
|
||||
|
||||
// There are 2 kinds of DOM nodes this widget can be instantiated on:
|
||||
// 1. UL, OL, or some element containing either of these.
|
||||
// 2. INPUT, in which case 'singleField' is overridden to true,
|
||||
// a UL is created and the INPUT is hidden.
|
||||
if (this.element.is('input')) {
|
||||
this.tagList = $('<ul></ul>').insertAfter(this.element);
|
||||
this.options.singleField = true;
|
||||
this.options.singleFieldNode = this.element;
|
||||
this.element.css('display', 'none');
|
||||
} else {
|
||||
this.tagList = this.element.find('ul, ol').andSelf().last();
|
||||
}
|
||||
|
||||
this._tagInput = $('<input type="text">').addClass('ui-widget-content');
|
||||
if (this.options.tabIndex) {
|
||||
this._tagInput.attr('tabindex', this.options.tabIndex);
|
||||
}
|
||||
|
||||
this.options.tagSource = this.options.tagSource || function(search, showChoices) {
|
||||
var filter = search.term.toLowerCase();
|
||||
var choices = $.grep(that.options.availableTags, function(element) {
|
||||
// Only match autocomplete options that begin with the search term.
|
||||
// (Case insensitive.)
|
||||
return (element.toLowerCase().indexOf(filter) === 0);
|
||||
});
|
||||
showChoices(that._subtractArray(choices, that.assignedTags()));
|
||||
};
|
||||
|
||||
this.tagList
|
||||
.addClass('tagit')
|
||||
.addClass('ui-widget ui-widget-content ui-corner-all')
|
||||
// Create the input field.
|
||||
.append($('<li class="tagit-new"></li>').append(this._tagInput))
|
||||
.click(function(e) {
|
||||
var target = $(e.target);
|
||||
if (target.hasClass('tagit-label')) {
|
||||
that._trigger('onTagClicked', e, target.closest('.tagit-choice'));
|
||||
} else {
|
||||
// Sets the focus() to the input field, if the user
|
||||
// clicks anywhere inside the UL. This is needed
|
||||
// because the input field needs to be of a small size.
|
||||
that._tagInput.focus();
|
||||
}
|
||||
});
|
||||
|
||||
// Add existing tags from the list, if any.
|
||||
this.tagList.children('li').each(function() {
|
||||
if (!$(this).hasClass('tagit-new')) {
|
||||
that.createTag($(this).html(), $(this).attr('class'));
|
||||
$(this).remove();
|
||||
}
|
||||
});
|
||||
|
||||
// Single field support.
|
||||
if (this.options.singleField) {
|
||||
if (this.options.singleFieldNode) {
|
||||
// Add existing tags from the input field.
|
||||
var node = $(this.options.singleFieldNode);
|
||||
var tags = node.val().split(this.options.singleFieldDelimiter);
|
||||
node.val('');
|
||||
$.each(tags, function(index, tag) {
|
||||
that.createTag(tag);
|
||||
});
|
||||
} else {
|
||||
// Create our single field input after our list.
|
||||
this.options.singleFieldNode = this.tagList.after('<input type="hidden" style="display:none;" value="" name="' + this.options.fieldName + '">');
|
||||
}
|
||||
}
|
||||
|
||||
// Events.
|
||||
this._tagInput
|
||||
.keydown(function(event) {
|
||||
// Backspace is not detected within a keypress, so it must use keydown.
|
||||
if (event.which == $.ui.keyCode.BACKSPACE && that._tagInput.val() === '') {
|
||||
var tag = that._lastTag();
|
||||
if (!that.options.removeConfirmation || tag.hasClass('remove')) {
|
||||
// When backspace is pressed, the last tag is deleted.
|
||||
that.removeTag(tag);
|
||||
} else if (that.options.removeConfirmation) {
|
||||
tag.addClass('remove ui-state-highlight');
|
||||
}
|
||||
} else if (that.options.removeConfirmation) {
|
||||
that._lastTag().removeClass('remove ui-state-highlight');
|
||||
}
|
||||
|
||||
// Comma/Space/Enter are all valid delimiters for new tags,
|
||||
// except when there is an open quote or if setting allowSpaces = true.
|
||||
// Tab will also create a tag, unless the tag input is empty, in which case it isn't caught.
|
||||
if (
|
||||
event.which == $.ui.keyCode.COMMA ||
|
||||
event.which == $.ui.keyCode.ENTER ||
|
||||
(
|
||||
event.which == $.ui.keyCode.TAB &&
|
||||
that._tagInput.val() !== ''
|
||||
) ||
|
||||
(
|
||||
event.which == $.ui.keyCode.SPACE &&
|
||||
that.options.allowSpaces !== true &&
|
||||
(
|
||||
$.trim(that._tagInput.val()).replace( /^s*/, '' ).charAt(0) != '"' ||
|
||||
(
|
||||
$.trim(that._tagInput.val()).charAt(0) == '"' &&
|
||||
$.trim(that._tagInput.val()).charAt($.trim(that._tagInput.val()).length - 1) == '"' &&
|
||||
$.trim(that._tagInput.val()).length - 1 !== 0
|
||||
)
|
||||
)
|
||||
)
|
||||
) {
|
||||
event.preventDefault();
|
||||
that.createTag(that._cleanedInput());
|
||||
|
||||
// The autocomplete doesn't close automatically when TAB is pressed.
|
||||
// So let's ensure that it closes.
|
||||
that._tagInput.autocomplete('close');
|
||||
}
|
||||
}).blur(function(e){
|
||||
//If autocomplete is enabled and suggestion was clicked, don't add it
|
||||
if (that.options.tagSource && that._tagInput.data('autocomplete-open')) {
|
||||
that._cleanedInput();
|
||||
} else {
|
||||
that.createTag(that._cleanedInput());
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// Autocomplete.
|
||||
if (this.options.availableTags || this.options.tagSource) {
|
||||
this._tagInput.autocomplete({
|
||||
source: this.options.tagSource,
|
||||
open: function(){that._tagInput.data('autocomplete-open', true)},
|
||||
close: function(){that._tagInput.data('autocomplete-open', false)},
|
||||
select: function(event, ui) {
|
||||
that.createTag(ui.item.value);
|
||||
// Preventing the tag input to be updated with the chosen value.
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
_cleanedInput: function() {
|
||||
// Returns the contents of the tag input, cleaned and ready to be passed to createTag
|
||||
return $.trim(this._tagInput.val().replace(/^"(.*)"$/, '$1'));
|
||||
},
|
||||
|
||||
_lastTag: function() {
|
||||
return this.tagList.children('.tagit-choice:last');
|
||||
},
|
||||
|
||||
assignedTags: function() {
|
||||
// Returns an array of tag string values
|
||||
var that = this;
|
||||
var tags = [];
|
||||
if (this.options.singleField) {
|
||||
tags = $(this.options.singleFieldNode).val().split(this.options.singleFieldDelimiter);
|
||||
if (tags[0] === '') {
|
||||
tags = [];
|
||||
}
|
||||
} else {
|
||||
this.tagList.children('.tagit-choice').each(function() {
|
||||
tags.push(that.tagLabel(this));
|
||||
});
|
||||
}
|
||||
return tags;
|
||||
},
|
||||
|
||||
_updateSingleTagsField: function(tags) {
|
||||
// Takes a list of tag string values, updates this.options.singleFieldNode.val to the tags delimited by this.options.singleFieldDelimiter
|
||||
$(this.options.singleFieldNode).val(tags.join(this.options.singleFieldDelimiter));
|
||||
},
|
||||
|
||||
_subtractArray: function(a1, a2) {
|
||||
var result = [];
|
||||
for (var i = 0; i < a1.length; i++) {
|
||||
if ($.inArray(a1[i], a2) == -1) {
|
||||
result.push(a1[i]);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
},
|
||||
|
||||
tagLabel: function(tag) {
|
||||
// Returns the tag's string label.
|
||||
if (this.options.singleField) {
|
||||
return $(tag).children('.tagit-label').text();
|
||||
} else {
|
||||
return $(tag).children('input').val();
|
||||
}
|
||||
},
|
||||
|
||||
_isNew: function(value) {
|
||||
var that = this;
|
||||
var isNew = true;
|
||||
this.tagList.children('.tagit-choice').each(function(i) {
|
||||
if (that._formatStr(value) == that._formatStr(that.tagLabel(this))) {
|
||||
isNew = false;
|
||||
return;
|
||||
}
|
||||
});
|
||||
return isNew;
|
||||
},
|
||||
|
||||
_formatStr: function(str) {
|
||||
if (this.options.caseSensitive) {
|
||||
return str;
|
||||
}
|
||||
return $.trim(str.toLowerCase());
|
||||
},
|
||||
|
||||
createTag: function(value, additionalClass) {
|
||||
that = this;
|
||||
// Automatically trims the value of leading and trailing whitespace.
|
||||
value = $.trim(value);
|
||||
|
||||
if (!this._isNew(value) || value === '') {
|
||||
return false;
|
||||
}
|
||||
|
||||
var label = $(this.options.onTagClicked ? '<a class="tagit-label"></a>' : '<span class="tagit-label"></span>').text(value);
|
||||
|
||||
// Create tag.
|
||||
var tag = $('<li></li>')
|
||||
.addClass('tagit-choice ui-widget-content ui-state-default ui-corner-all')
|
||||
.addClass(additionalClass)
|
||||
.append(label);
|
||||
|
||||
// Button for removing the tag.
|
||||
var removeTagIcon = $('<span></span>')
|
||||
.addClass('ui-icon ui-icon-close');
|
||||
var removeTag = $('<a><span class="text-icon">\xd7</span></a>') // \xd7 is an X
|
||||
.addClass('close')
|
||||
.append(removeTagIcon)
|
||||
.click(function(e) {
|
||||
// Removes a tag when the little 'x' is clicked.
|
||||
that.removeTag(tag);
|
||||
});
|
||||
tag.append(removeTag);
|
||||
|
||||
// Unless options.singleField is set, each tag has a hidden input field inline.
|
||||
if (this.options.singleField) {
|
||||
var tags = this.assignedTags();
|
||||
tags.push(value);
|
||||
this._updateSingleTagsField(tags);
|
||||
} else {
|
||||
var escapedValue = label.html();
|
||||
tag.append('<input type="hidden" style="display:none;" value="' + escapedValue + '" name="' + this.options.itemName + '[' + this.options.fieldName + '][]">');
|
||||
}
|
||||
|
||||
this._trigger('onTagAdded', null, tag);
|
||||
|
||||
// Cleaning the input.
|
||||
this._tagInput.val('');
|
||||
|
||||
// insert tag
|
||||
this._tagInput.parent().before(tag);
|
||||
},
|
||||
|
||||
removeTag: function(tag, animate) {
|
||||
if (typeof animate === 'undefined') { animate = true; }
|
||||
|
||||
tag = $(tag);
|
||||
|
||||
this._trigger('onTagRemoved', null, tag);
|
||||
|
||||
if (this.options.singleField) {
|
||||
var tags = this.assignedTags();
|
||||
var removedTagLabel = this.tagLabel(tag);
|
||||
tags = $.grep(tags, function(el){
|
||||
return el != removedTagLabel;
|
||||
});
|
||||
this._updateSingleTagsField(tags);
|
||||
}
|
||||
// Animate the removal.
|
||||
if (animate) {
|
||||
tag.fadeOut('fast').hide('blind', {direction: 'horizontal'}, 'fast', function(){
|
||||
tag.remove();
|
||||
}).dequeue();
|
||||
} else {
|
||||
tag.remove();
|
||||
}
|
||||
this._trigger('onTagFinishRemoved', null, tag);
|
||||
},
|
||||
|
||||
removeAll: function() {
|
||||
// Removes all tags. Takes an optional `animate` argument.
|
||||
var that = this;
|
||||
this.tagList.children('.tagit-choice').each(function(index, tag) {
|
||||
that.removeTag(tag, false);
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
})(jQuery);
|
42
addBm.php
42
addBm.php
@ -28,6 +28,44 @@ OCP\User::checkLoggedIn();
|
||||
OCP\App::checkAppEnabled('bookmarks');
|
||||
|
||||
require_once 'bookmarksHelper.php';
|
||||
addBookmark($_GET['url'], '', 'Read-Later');
|
||||
|
||||
include 'templates/addBm.php';
|
||||
// Prep screen if we come from the bookmarklet
|
||||
$url ='';
|
||||
if(isset($_GET['url'])) {
|
||||
$url = $_GET['url'];
|
||||
}
|
||||
if(!isset($_GET['title']) || trim($_GET['title']) == '') {
|
||||
$datas = getURLMetadata($url);
|
||||
$title = isset($datas['title']) ? $datas['title'] : '';
|
||||
}
|
||||
else{
|
||||
$title = $_GET['title'];
|
||||
}
|
||||
|
||||
|
||||
OCP\Util::addscript('bookmarks/3rdparty', 'tag-it');
|
||||
OCP\Util::addscript('bookmarks', 'addBm');
|
||||
OCP\Util::addStyle('bookmarks', 'bookmarks');
|
||||
OCP\Util::addStyle('bookmarks/3rdparty', 'jquery.tagit');
|
||||
|
||||
|
||||
|
||||
$bm = array('title'=> $title,
|
||||
'url'=> $url,
|
||||
'tags'=> array(),
|
||||
'desc'=>'',
|
||||
'is_public'=>0,
|
||||
);
|
||||
|
||||
//Find All Tags
|
||||
$qtags = OC_Bookmarks_Bookmarks::findTags();
|
||||
$tags = array();
|
||||
foreach($qtags as $tag) {
|
||||
$tags[] = $tag['tag'];
|
||||
}
|
||||
|
||||
$tmpl = new OCP\Template( 'bookmarks', 'addBm', 'base' );
|
||||
$tmpl->assign('requesttoken', OC_Util::callRegister());
|
||||
$tmpl->assign('bookmark', $bm);
|
||||
$tmpl->assign('tags', json_encode($tags), false);
|
||||
$tmpl->printPage();
|
||||
|
29
ajax/changescreen.php
Normal file
29
ajax/changescreen.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
OCP\JSON::checkLoggedIn();
|
||||
OCP\JSON::checkAppEnabled('bookmarks');
|
||||
if(isset($_POST['view'])) {
|
||||
$view = $_POST['view'];
|
||||
switch($view){
|
||||
case 'list':
|
||||
case 'image';
|
||||
break;
|
||||
default:
|
||||
OCP\JSON::error(array('message'=>'unexspected parameter: ' . $view));
|
||||
exit;
|
||||
}
|
||||
OCP\Config::setUserValue(OCP\USER::getUser(), 'bookmarks', 'currentview', $view);
|
||||
OCP\JSON::success();
|
||||
}elseif(isset($_POST['sidebar'])) {
|
||||
$view = $_POST['sidebar'];
|
||||
switch($view){
|
||||
case 'true':
|
||||
case 'false';
|
||||
break;
|
||||
default:
|
||||
OCP\JSON::error(array('message'=>'unexspected parameter: ' . $view));
|
||||
exit;
|
||||
}
|
||||
OCP\Config::setUserValue(OCP\USER::getUser(), 'bookmarks', 'sidebar', $view);
|
||||
OCP\JSON::success();
|
||||
}
|
36
ajax/delTag.php
Normal file
36
ajax/delTag.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* ownCloud - bookmarks plugin
|
||||
*
|
||||
* @author Arthur Schiwon
|
||||
* @copyright 2011 Arthur Schiwon blizzz@arthur-schiwon.de
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 3 of the License, or any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
// Check if we are a user
|
||||
OCP\JSON::checkLoggedIn();
|
||||
OCP\JSON::callCheck();
|
||||
OCP\JSON::checkAppEnabled('bookmarks');
|
||||
|
||||
if(isset($_POST['old_name'])) {
|
||||
OC_Bookmarks_Bookmarks::deleteTag($_POST['old_name']);
|
||||
OCP\JSON::success();
|
||||
exit();
|
||||
}
|
||||
|
||||
OC_JSON::error();
|
||||
exit();
|
@ -27,64 +27,20 @@ OCP\JSON::callCheck();
|
||||
|
||||
OCP\JSON::checkAppEnabled('bookmarks');
|
||||
|
||||
$CONFIG_DBTYPE = OCP\Config::getSystemValue( "dbtype", "sqlite" );
|
||||
if( $CONFIG_DBTYPE == 'sqlite' or $CONFIG_DBTYPE == 'sqlite3' ) {
|
||||
$_ut = "strftime('%s','now')";
|
||||
} elseif($CONFIG_DBTYPE == 'pgsql') {
|
||||
$_ut = 'date_part(\'epoch\',now())::integer';
|
||||
} elseif($CONFIG_DBTYPE == 'oci') {
|
||||
$_ut = '(oracletime - to_date(\'19700101\',\'YYYYMMDD\')) * 86400';
|
||||
} else {
|
||||
$_ut = "UNIX_TIMESTAMP()";
|
||||
}
|
||||
// If we go the dialog form submit
|
||||
if(isset($_POST['url'])) {
|
||||
$tags = isset($_POST['item']['tags']) ? $_POST['item']['tags'] : array();
|
||||
$pub = isset($_POST['is_public']) ? true : false;
|
||||
|
||||
$bookmark_id = (int)$_POST["id"];
|
||||
$user_id = OCP\USER::getUser();
|
||||
|
||||
//TODO check using CURRENT_TIMESTAMP? prepare already does magic when using now()
|
||||
$query = OCP\DB::prepare('
|
||||
UPDATE `*PREFIX*bookmarks`
|
||||
SET `url` = ?, `title` = ?, `lastmodified` = '.$_ut.'
|
||||
WHERE `id` = ?
|
||||
AND `user_id` = ?
|
||||
');
|
||||
|
||||
$params=array(
|
||||
htmlspecialchars_decode($_POST["url"]),
|
||||
htmlspecialchars_decode($_POST["title"]),
|
||||
$bookmark_id,
|
||||
$user_id,
|
||||
);
|
||||
|
||||
$result = $query->execute($params);
|
||||
|
||||
# Abort the operation if bookmark couldn't be set (probably because the user is not allowed to edit this bookmark)
|
||||
if ($result->numRows() == 0) exit();
|
||||
|
||||
# Remove old tags and insert new ones.
|
||||
$query = OCP\DB::prepare('
|
||||
DELETE FROM `*PREFIX*bookmarks_tags`
|
||||
WHERE `bookmark_id` = ?
|
||||
');
|
||||
|
||||
$params=array(
|
||||
$bookmark_id
|
||||
);
|
||||
|
||||
$query->execute($params);
|
||||
|
||||
$query = OCP\DB::prepare('
|
||||
INSERT INTO `*PREFIX*bookmarks_tags`
|
||||
(`bookmark_id`, `tag`)
|
||||
VALUES (?, ?)
|
||||
');
|
||||
|
||||
$tags = explode(' ', urldecode($_POST["tags"]));
|
||||
foreach ($tags as $tag) {
|
||||
if(empty($tag)) {
|
||||
//avoid saving blankspaces
|
||||
continue;
|
||||
if(isset($_POST['record_id']) && is_numeric($_POST['record_id']) ) { //EDIT
|
||||
$bm = $_POST['record_id'];
|
||||
OC_Bookmarks_Bookmarks::editBookmark($bm, $_POST['url'], $_POST['title'], $tags, $_POST['description'], $pub);
|
||||
}
|
||||
$params = array($bookmark_id, trim($tag));
|
||||
$query->execute($params);
|
||||
else {
|
||||
$bm = OC_Bookmarks_Bookmarks::addBookmark($_POST['url'], $_POST['title'], $tags, $_POST['description'], $pub);
|
||||
}
|
||||
OCP\JSON::success(array('id'=>$bm));
|
||||
exit();
|
||||
}
|
||||
OC_JSON::error();
|
||||
exit();
|
||||
|
39
ajax/getInfos.php
Normal file
39
ajax/getInfos.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* ownCloud - bookmarks plugin
|
||||
*
|
||||
* @author Brice Maron
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 3 of the License, or any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
// Check if we are a user
|
||||
OCP\JSON::checkLoggedIn();
|
||||
OCP\JSON::checkAppEnabled('bookmarks');
|
||||
|
||||
require_once OC_App::getAppPath('bookmarks').'/bookmarksHelper.php';
|
||||
|
||||
$req_type=isset($_GET['type']) ? $_GET['type'] : '';
|
||||
|
||||
if($req_type == 'url_info' && $_GET['url']) {
|
||||
$datas = getURLMetadata($_GET['url']);
|
||||
$title = isset($datas['title']) ? $datas['title'] : '';
|
||||
OCP\JSON::success(array('title' => $title));
|
||||
exit();
|
||||
}
|
||||
|
||||
OC_JSON::error();
|
||||
exit();
|
40
ajax/renameTag.php
Normal file
40
ajax/renameTag.php
Normal file
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* ownCloud - bookmarks plugin
|
||||
*
|
||||
* @author Arthur Schiwon
|
||||
* @copyright 2011 Arthur Schiwon blizzz@arthur-schiwon.de
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 3 of the License, or any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
//no apps or filesystem
|
||||
$RUNTIME_NOSETUPFS=true;
|
||||
|
||||
|
||||
|
||||
// Check if we are a user
|
||||
OCP\JSON::checkLoggedIn();
|
||||
OCP\JSON::checkAppEnabled('bookmarks');
|
||||
|
||||
if(isset($_POST['old_name']) && isset($_POST['new_name']) && $_POST['new_name'] != '') {
|
||||
OC_Bookmarks_Bookmarks::renameTag($_POST['old_name'], $_POST['new_name']);
|
||||
OCP\JSON::success();
|
||||
exit();
|
||||
}
|
||||
|
||||
OC_JSON::error();
|
||||
exit();
|
@ -25,21 +25,28 @@
|
||||
// Check if we are a user
|
||||
OCP\JSON::checkLoggedIn();
|
||||
OCP\JSON::checkAppEnabled('bookmarks');
|
||||
require_once OC_App::getAppPath('bookmarks').'/bookmarksHelper.php';
|
||||
|
||||
$req_type= isset($_GET['type']) ? $_GET['type'] : 'bookmark';
|
||||
|
||||
//Filter for tag?
|
||||
$filterTag = isset($_POST['tag']) ? htmlspecialchars_decode($_POST['tag']) : false;
|
||||
if($req_type == 'rel_tags') {
|
||||
$tags = analyzeTagRequest(isset($_GET['tag']) ? $_GET['tag'] : '');
|
||||
$qtags = OC_Bookmarks_Bookmarks::findTags($tags);
|
||||
OCP\JSON::success(array('data' => $qtags));
|
||||
|
||||
$offset = isset($_POST['page']) ? intval($_POST['page']) * 10 : 0;
|
||||
|
||||
$sort = isset($_POST['sort']) ? ($_POST['sort']) : 'bookmarks_sorting_recent';
|
||||
if($sort == 'bookmarks_sorting_clicks') {
|
||||
$sqlSortColumn = 'clickcount';
|
||||
} else {
|
||||
$sqlSortColumn = 'id';
|
||||
}
|
||||
else { // type == bookmark
|
||||
$filterTag = analyzeTagRequest(isset($_GET['tag']) ? $_GET['tag'] : '');
|
||||
|
||||
$offset = isset($_GET['page']) ? intval($_GET['page']) * 10 : 0;
|
||||
|
||||
$bookmarks = OC_Bookmarks_Bookmarks::findBookmarks($offset, $sqlSortColumn, $filterTag, true);
|
||||
$sort = isset($_GET['sort']) ? ($_GET['sort']) : 'bookmarks_sorting_recent';
|
||||
if($sort == 'bookmarks_sorting_clicks') {
|
||||
$sqlSortColumn = 'clickcount';
|
||||
} else {
|
||||
$sqlSortColumn = 'id';
|
||||
}
|
||||
$bookmarks = OC_Bookmarks_Bookmarks::findBookmarks($offset, $sqlSortColumn, $filterTag, true);
|
||||
OCP\JSON::success(array('data' => $bookmarks));
|
||||
|
||||
OCP\JSON::success(array('data' => $bookmarks));
|
||||
}
|
||||
|
@ -11,9 +11,13 @@ OC::$CLASSPATH['OC_Bookmarks_Bookmarks'] = 'apps/bookmarks/lib/bookmarks.php';
|
||||
OC::$CLASSPATH['OC_Search_Provider_Bookmarks'] = 'apps/bookmarks/lib/search.php';
|
||||
|
||||
$l = new OC_l10n('bookmarks');
|
||||
OCP\App::addNavigationEntry( array( 'id' => 'bookmarks_index', 'order' => 70, 'href' => OCP\Util::linkTo( 'bookmarks', 'index.php' ), 'icon' => OCP\Util::imagePath( 'bookmarks', 'bookmarks.png' ), 'name' => $l->t('Bookmarks')));
|
||||
OCP\App::addNavigationEntry( array( 'id' => 'bookmarks_index',
|
||||
'order' => 70, 'href' => OCP\Util::linkTo( 'bookmarks', 'index.php' ),
|
||||
'icon' => OCP\Util::imagePath( 'bookmarks', 'bookmarks.png' ),
|
||||
'name' => $l->t('Bookmarks')
|
||||
));
|
||||
|
||||
OCP\App::registerPersonal('bookmarks', 'settings');
|
||||
OCP\Util::addscript('bookmarks','bookmarksearch');
|
||||
OCP\Util::addscript('bookmarks', 'bookmarksearch');
|
||||
|
||||
OC_Search::registerProvider('OC_Search_Provider_Bookmarks');
|
||||
|
@ -36,6 +36,13 @@
|
||||
<notnull>true</notnull>
|
||||
<length>64</length>
|
||||
</field>
|
||||
<field>
|
||||
<name>description</name>
|
||||
<type>text</type>
|
||||
<default></default>
|
||||
<notnull>true</notnull>
|
||||
<length>4096</length>
|
||||
</field>
|
||||
<field>
|
||||
<name>public</name>
|
||||
<type>integer</type>
|
||||
|
@ -6,6 +6,6 @@
|
||||
<licence>AGPL</licence>
|
||||
<author>Arthur Schiwon, Marvin Thomas Rabe</author>
|
||||
<standalone/>
|
||||
<require>4</require>
|
||||
<require>4.9</require>
|
||||
<shipped>true</shipped>
|
||||
</info>
|
||||
|
@ -21,8 +21,7 @@ class OC_Migration_Provider_Bookmarks extends OC_Migration_Provider{
|
||||
$ids2 = $this->content->copyRows( $options );
|
||||
|
||||
// If both returned some ids then they worked
|
||||
if( is_array( $ids ) && is_array( $ids2 ) )
|
||||
{
|
||||
if( is_array( $ids ) && is_array( $ids2 ) ) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@ -39,9 +38,14 @@ class OC_Migration_Provider_Bookmarks extends OC_Migration_Provider{
|
||||
$results = $query->execute( array( $this->olduid ) );
|
||||
$idmap = array();
|
||||
while( $row = $results->fetchRow() ) {
|
||||
// Import each bookmark, saving its id into the map
|
||||
$query = OCP\DB::prepare( "INSERT INTO `*PREFIX*bookmarks`(`url`, `title`, `user_id`, `public`, `added`, `lastmodified`) VALUES (?, ?, ?, ?, ?, ?)" );
|
||||
$query->execute( array( $row['url'], $row['title'], $this->uid, $row['public'], $row['added'], $row['lastmodified'] ) );
|
||||
// Import each bookmark, saving its id into the map
|
||||
$sql = "INSERT INTO `*PREFIX*bookmarks`
|
||||
(`url`, `title`, `user_id`, `public`, `added`, `lastmodified`) VALUES (?, ?, ?, ?, ?, ?)" ;
|
||||
$query = OCP\DB::prepare($sql);
|
||||
$query->execute(array(
|
||||
$row['url'], $row['title'], $this->uid, $row['public'],
|
||||
$row['added'], $row['lastmodified']
|
||||
) );
|
||||
// Map the id
|
||||
$idmap[$row['id']] = OCP\DB::insertid();
|
||||
}
|
||||
@ -51,12 +55,13 @@ class OC_Migration_Provider_Bookmarks extends OC_Migration_Provider{
|
||||
$results = $query->execute( array( $oldid ) );
|
||||
while( $row = $results->fetchRow() ) {
|
||||
// Import the tags for this bookmark, using the new bookmark id
|
||||
$query = OCP\DB::prepare( "INSERT INTO `*PREFIX*bookmarks_tags`(`bookmark_id`, `tag`) VALUES (?, ?)" );
|
||||
$sql = "INSERT INTO `*PREFIX*bookmarks_tags`(`bookmark_id`, `tag`) VALUES (?, ?)";
|
||||
$query = OCP\DB::prepare($sql);
|
||||
$query->execute( array( $newid, $row['tag'] ) );
|
||||
}
|
||||
}
|
||||
// All done!
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -1 +1 @@
|
||||
0.2
|
||||
0.3
|
@ -13,6 +13,7 @@ function curl_exec_follow(/*resource*/ $ch, /*int*/ &$maxredirect = null) {
|
||||
$newurl = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL);
|
||||
|
||||
$rch = curl_copy_handle($ch);
|
||||
curl_setopt($ch, CURLOPT_USERAGENT, "Owncloud Bookmark Crawl");
|
||||
curl_setopt($rch, CURLOPT_HEADER, true);
|
||||
curl_setopt($rch, CURLOPT_NOBODY, true);
|
||||
curl_setopt($rch, CURLOPT_FORBID_REUSE, false);
|
||||
@ -35,7 +36,10 @@ function curl_exec_follow(/*resource*/ $ch, /*int*/ &$maxredirect = null) {
|
||||
curl_close($rch);
|
||||
if (!$mr) {
|
||||
if ($maxredirect === null) {
|
||||
trigger_error('Too many redirects. When following redirects, libcurl hit the maximum amount.', E_USER_WARNING);
|
||||
OCP\Util::writeLog(
|
||||
'bookmark',
|
||||
'Too many redirects. When following redirects, libcurl hit the maximum amount on bookmark',
|
||||
OCP\Util::ERROR);
|
||||
} else {
|
||||
$maxredirect = 0;
|
||||
}
|
||||
@ -53,7 +57,7 @@ function getURLMetadata($url) {
|
||||
//if not (allowed) protocol is given, assume http
|
||||
if(preg_match($protocols, $url) == 0) {
|
||||
$url = 'http://' . $url;
|
||||
}
|
||||
}
|
||||
$metadata['url'] = $url;
|
||||
|
||||
if (!function_exists('curl_init')) {
|
||||
@ -65,66 +69,17 @@ function getURLMetadata($url) {
|
||||
$page = curl_exec_follow($ch);
|
||||
curl_close($ch);
|
||||
|
||||
@preg_match( "/<title>(.*)<\/title>/si", $page, $match );
|
||||
$metadata['title'] = htmlspecialchars_decode(@$match[1]);
|
||||
|
||||
@preg_match( "/<title>(.*)<\/title>/sUi", $page, $match );
|
||||
$metadata['title'] = htmlspecialchars_decode(@$match[1]);
|
||||
return $metadata;
|
||||
}
|
||||
|
||||
function addBookmark($url, $title, $tags='') {
|
||||
$CONFIG_DBTYPE = OCP\Config::getSystemValue( "dbtype", "sqlite" );
|
||||
if( $CONFIG_DBTYPE == 'sqlite' or $CONFIG_DBTYPE == 'sqlite3' ) {
|
||||
$_ut = "strftime('%s','now')";
|
||||
} elseif($CONFIG_DBTYPE == 'pgsql') {
|
||||
$_ut = 'date_part(\'epoch\',now())::integer';
|
||||
} else {
|
||||
$_ut = "UNIX_TIMESTAMP()";
|
||||
}
|
||||
|
||||
//FIXME: Detect when user adds a known URL
|
||||
$query = OCP\DB::prepare("
|
||||
INSERT INTO `*PREFIX*bookmarks`
|
||||
(`url`, `title`, `user_id`, `public`, `added`, `lastmodified`)
|
||||
VALUES (?, ?, ?, 0, $_ut, $_ut)
|
||||
");
|
||||
|
||||
if(empty($title)) {
|
||||
$metadata = getURLMetadata($url);
|
||||
if(isset($metadata['title'])) // Check for problems fetching the title
|
||||
$title = $metadata['title'];
|
||||
}
|
||||
|
||||
if(empty($title)) {
|
||||
$l = OC_L10N::get('bookmarks');
|
||||
$title = $l->t('unnamed');
|
||||
}
|
||||
|
||||
$params=array(
|
||||
htmlspecialchars_decode($url),
|
||||
htmlspecialchars_decode($title),
|
||||
OCP\USER::getUser()
|
||||
);
|
||||
$query->execute($params);
|
||||
|
||||
$b_id = OCP\DB::insertid('*PREFIX*bookmarks');
|
||||
|
||||
if($b_id !== false) {
|
||||
$query = OCP\DB::prepare("
|
||||
INSERT INTO `*PREFIX*bookmarks_tags`
|
||||
(`bookmark_id`, `tag`)
|
||||
VALUES (?, ?)
|
||||
");
|
||||
|
||||
$tags = explode(' ', urldecode($tags));
|
||||
foreach ($tags as $tag) {
|
||||
if(empty($tag)) {
|
||||
//avoid saving blankspaces
|
||||
continue;
|
||||
}
|
||||
$params = array($b_id, trim($tag));
|
||||
$query->execute($params);
|
||||
}
|
||||
|
||||
return $b_id;
|
||||
function analyzeTagRequest($line) {
|
||||
$tags = explode(',', $line);
|
||||
$filterTag = array();
|
||||
foreach($tags as $tag){
|
||||
if(trim($tag) != '')
|
||||
$filterTag[] = trim($tag);
|
||||
}
|
||||
return $filterTag;
|
||||
}
|
||||
|
@ -4,6 +4,32 @@
|
||||
#firstrun .button { font-size: 0.7em; }
|
||||
#firstrun #selections { font-size:0.8em; font-weight: normal; width: 100%; margin: 2em auto auto auto; clear: both; }
|
||||
|
||||
#leftcontent {
|
||||
/* margin: 0; */
|
||||
padding-top: 1em;
|
||||
/* top: 3.5em !important; */
|
||||
}
|
||||
|
||||
#rightcontent {
|
||||
padding-top: 5px;
|
||||
top: 3.5em !important;
|
||||
}
|
||||
.centercontent {
|
||||
margin-bottom: 1em;
|
||||
text-align: right;
|
||||
}
|
||||
.centercontent span {
|
||||
border: 1px solid lightgray;
|
||||
border-right:0;
|
||||
border-radius: 0.5em 0em 0em 0.5em;
|
||||
/* margin-right: 10px; */
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.centercontent .right_img {
|
||||
display:none;
|
||||
}
|
||||
|
||||
.bookmarks_headline {
|
||||
font-size: large;
|
||||
font-weight: bold;
|
||||
@ -20,8 +46,13 @@
|
||||
overflow: auto;
|
||||
position: fixed;
|
||||
top: 6.5em;
|
||||
/* margin-left: 15px; */
|
||||
|
||||
}
|
||||
|
||||
#add_url {
|
||||
width: 25em;
|
||||
}
|
||||
.bookmarks_addBml {
|
||||
text-decoration: underline;
|
||||
}
|
||||
@ -61,10 +92,13 @@
|
||||
display: block;
|
||||
}
|
||||
|
||||
.bookmark_title { font-weight: bold; display: inline-block; margin-right: 0.8em; }
|
||||
.bookmark_url { display: none; color: #999; }
|
||||
.bookmark_single:hover .bookmark_url { display: inline; }
|
||||
.bookmark_tags {
|
||||
.bookmark_title {
|
||||
font-weight: bold;
|
||||
display: inline-block;
|
||||
margin-right: 0.8em;
|
||||
}
|
||||
|
||||
.bm_view_list .bookmark_tags {
|
||||
position: absolute;
|
||||
top: 0.5em;
|
||||
right: 6em;
|
||||
@ -85,3 +119,218 @@
|
||||
display: none;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.addBm {
|
||||
background: none repeat scroll 0 0 #F8F8F8;
|
||||
border-radius: 0.5em 0.5em 0.5em 0.5em;
|
||||
color: #555555;
|
||||
margin: 1em;
|
||||
padding: 0.5em 1em;
|
||||
text-shadow: 0 1px 0 #FFFFFF;
|
||||
width: 500px;
|
||||
|
||||
}
|
||||
.bm_desc {
|
||||
width:90%;
|
||||
}
|
||||
.addBm h1 {
|
||||
font-weight: bold;
|
||||
border-bottom: 1px solid #BABABA;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.addBm fieldset > ul > li {
|
||||
margin-top: 1em;
|
||||
}
|
||||
.addBm label {
|
||||
display:block;
|
||||
width:100%;
|
||||
}
|
||||
.addBm .is_public_label {
|
||||
display: inline;
|
||||
|
||||
}
|
||||
.addBm fieldset input[type="text"], .addBm textarea {
|
||||
width:100%;
|
||||
}
|
||||
.addBm textarea{
|
||||
min-width:250px;
|
||||
/* min-height: 70px; */
|
||||
}
|
||||
.addBm .close_btn
|
||||
{
|
||||
/* background-color: #EEEEEE; */
|
||||
height: 18px;
|
||||
margin: -20px 0 0;
|
||||
padding: 1px;
|
||||
float:right;
|
||||
width: 19px;
|
||||
}
|
||||
.addBm .submit {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.addBm ul.tagit { background:white; }
|
||||
|
||||
.addBm input.ui-autocomplete-input, #tag_filter input.ui-autocomplete-input, .bookmark_form_tags input.ui-autocomplete-input{
|
||||
box-shadow:none;
|
||||
|
||||
}
|
||||
|
||||
.ui-autocomplete {
|
||||
/* background: none repeat scroll 0 0 #DEE7F8; */
|
||||
}
|
||||
|
||||
#leftcontent > ul > li, .leftcontent li {
|
||||
padding: 0.2em;
|
||||
padding-left:1em;
|
||||
}
|
||||
#leftcontent > label {
|
||||
margin-top: 1em;
|
||||
margin-bottom: 0.7em;
|
||||
display: block;
|
||||
padding-left: 1em;
|
||||
}
|
||||
|
||||
#leftcontent .tag_list > li .tag , #leftcontent .share_list > li .tag{
|
||||
background: none repeat scroll 0 0 #DEE7F8;
|
||||
border: 1px solid #CAD8F3;
|
||||
border-radius: 6px 6px 6px 6px;
|
||||
color: #555555;
|
||||
font-weight: normal;
|
||||
|
||||
/* padding: 0.2em 18px 0.2em 0.5em; */
|
||||
float:left;
|
||||
padding: 0.3em;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
ul.tagit li.tagit-new {
|
||||
padding-left: 0em;
|
||||
}
|
||||
|
||||
.tag_list em , .share_list em{
|
||||
float:right;
|
||||
display:block;
|
||||
}
|
||||
.tags_actions {
|
||||
display:none;
|
||||
margin-left: 0.5em;
|
||||
float:right;
|
||||
}
|
||||
li:hover .tags_actions {
|
||||
display:block;
|
||||
}
|
||||
li:hover em { display : none; }
|
||||
#tag_filter li, #tag_filter li:hover{
|
||||
background: none repeat scroll 0 0 #F8F8F8;
|
||||
|
||||
}
|
||||
#tag_filter .tagit {
|
||||
margin: 0.3em;
|
||||
}
|
||||
#tag_filter ul.tagit > li.tagit-new {
|
||||
padding:0;
|
||||
}
|
||||
#tag_filter ul.tagit li.tagit-choice {
|
||||
background: none repeat scroll 0 0 #DEE7F8;
|
||||
padding: 0.2em 18px 0.2em 0.5em;
|
||||
/* padding:0; */
|
||||
}
|
||||
|
||||
#tag_filter a {
|
||||
display: inline;
|
||||
float: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
#tag_filter ul.tagit li.tagit-choice .close{
|
||||
margin-top: -8px;
|
||||
cursor: pointer;
|
||||
margin-top: -8px;
|
||||
position: absolute;
|
||||
right: 0.1em;
|
||||
top: 50%;
|
||||
}
|
||||
|
||||
#view_type {
|
||||
display:none; /* @TODO: Remove when image view is ready*/
|
||||
position: absolute;
|
||||
right: 33.5em;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
/***** Lis View *****/
|
||||
|
||||
.bm_view_img .bookmark_single{
|
||||
width: 240px;
|
||||
float: left;
|
||||
height: 240px;
|
||||
margin: 1em;
|
||||
|
||||
/* background: none repeat scroll 0 0 #EEEEEE; */
|
||||
border-radius: 8px 8px 8px 8px;
|
||||
box-shadow: 0 0 5px rgba(34, 25, 25, 0.5);
|
||||
}
|
||||
|
||||
.bm_view_img .bookmark_single .shot{
|
||||
text-align:center;
|
||||
}
|
||||
.bm_view_img .bookmark_single .shot img{
|
||||
border: 1px solid black;
|
||||
width: 228px;
|
||||
height: 160px
|
||||
}
|
||||
|
||||
.bookmark_desc{
|
||||
height: 1.5em;
|
||||
padding-left:1em;
|
||||
white-space:nowrap;
|
||||
text-overflow:ellipsis;
|
||||
overflow:hidden;
|
||||
display:block;
|
||||
}
|
||||
.bookmark_date, .bookmark_submit {
|
||||
font-size:small;
|
||||
position: absolute;
|
||||
right: 6em;
|
||||
color:gray;
|
||||
/* margin-top:2.5em; */
|
||||
margin-right: 0.2em;
|
||||
}
|
||||
|
||||
/*
|
||||
.bm_view_img .bookmark_single:hover .bookmark_url{
|
||||
display:block;
|
||||
}
|
||||
.bm_view_img .bookmark_single .bookmark_url{
|
||||
display:block;
|
||||
}
|
||||
*/
|
||||
.bookmark_single:hover .bookmark_url { display: inline; }
|
||||
.bookmark_single:hover .bookmark_url a[href]{ color:gray; }
|
||||
|
||||
.bookmark_url { display: none; }
|
||||
.bookmark_form_title input, .bookmark_form_url input, .bookmark_form_desc textarea {
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.bookmark_single_form {
|
||||
padding-top: 1em;
|
||||
border-bottom: 1px solid #DDD;
|
||||
padding-left: 2em;
|
||||
}
|
||||
|
||||
.bookmark_single_form .tagit{
|
||||
width: 80%;
|
||||
box-shadow: 0 1px 1px #FFFFFF, 0 1px 0 #BBBBBB inset;
|
||||
margin: 3px;
|
||||
}
|
||||
.bm_view_img .bookmark_actions {
|
||||
bottom: 0.7em;
|
||||
display: block;
|
||||
position: absolute;
|
||||
right: 1em;
|
||||
top: auto;
|
||||
}
|
39
export.php
Normal file
39
export.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (c) 2012 Brice Maron < brice __At__ bmaron dot net >
|
||||
* This file is licensed under the Affero General Public License version 3 or
|
||||
* later.
|
||||
* See the COPYING-README file.
|
||||
*/
|
||||
|
||||
// Check if we are a user
|
||||
OCP\User::checkLoggedIn();
|
||||
OCP\App::checkAppEnabled('bookmarks');
|
||||
|
||||
|
||||
$file = <<<EOT
|
||||
<!DOCTYPE NETSCAPE-Bookmark-file-1>
|
||||
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
|
||||
<!-- This is an automatically generated file.
|
||||
It will be read and overwritten.
|
||||
Do Not Edit! -->
|
||||
<TITLE>Bookmarks</TITLE>
|
||||
<H1>Bookmarks</H1>
|
||||
<DL><p>
|
||||
EOT;
|
||||
|
||||
$bookmarks = OC_Bookmarks_Bookmarks::findBookmarks(0, 'id', array(), true, -1);
|
||||
foreach($bookmarks as $bm) {
|
||||
$file .= '<DT><A HREF="'.$bm['url'].'" TAGS="'.implode(',', $bm['tags']).'">';
|
||||
$file .= htmlspecialchars($bm['title'], ENT_QUOTES, 'UTF-8').'</A>';
|
||||
if($bm['description'])
|
||||
$file .= '<DD>'.htmlspecialchars($bm['description'], ENT_QUOTES, 'UTF-8');
|
||||
}
|
||||
|
||||
header("Cache-Control: private");
|
||||
header("Content-Type: application/stream");
|
||||
header("Content-Length: ".$fileSize);
|
||||
header("Content-Disposition: attachment; filename=oc-bookmarks.html");
|
||||
|
||||
echo $file;
|
||||
exit;
|
BIN
img/triangle-e.png
Normal file
BIN
img/triangle-e.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 556 B |
92
img/triangle-e.svg
Normal file
92
img/triangle-e.svg
Normal file
@ -0,0 +1,92 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="16px"
|
||||
height="16px"
|
||||
id="svg6077"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.3.1 r9886"
|
||||
sodipodi:docname="triangle-e.svg"
|
||||
inkscape:export-filename="triangle-e.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90">
|
||||
<defs
|
||||
id="defs6079">
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3587-6-5-3-4-5-4-0-1"
|
||||
id="linearGradient7308"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.54681372,0,0,-0.39376081,-9.13456,14.37044)"
|
||||
x1="34.992828"
|
||||
y1="0.94087797"
|
||||
x2="34.992828"
|
||||
y2="33.955856" />
|
||||
<linearGradient
|
||||
id="linearGradient3587-6-5-3-4-5-4-0-1">
|
||||
<stop
|
||||
offset="0"
|
||||
style="stop-color:#000000;stop-opacity:1"
|
||||
id="stop3589-9-2-2-3-2-53-4-3" />
|
||||
<stop
|
||||
offset="1"
|
||||
style="stop-color:#363636;stop-opacity:1"
|
||||
id="stop3591-7-4-73-7-9-86-9-3" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="22.197802"
|
||||
inkscape:cx="-6.9113863"
|
||||
inkscape:cy="8"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="1002"
|
||||
inkscape:window-x="-4"
|
||||
inkscape:window-y="-3"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata6082">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
d="M 2,15.5 2,2.5 14,9 2,15.5 z"
|
||||
id="path2843-0-1-6-6"
|
||||
style="opacity:0.6;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
d="m 2,13.99996 0,-13 12,6.49999 -12,6.50001 z"
|
||||
id="path2843-39-5-5"
|
||||
style="opacity:0.7;color:#000000;fill:url(#linearGradient7308);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.0 KiB |
BIN
img/triangle-w.png
Normal file
BIN
img/triangle-w.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 520 B |
92
img/triangle-w.svg
Normal file
92
img/triangle-w.svg
Normal file
@ -0,0 +1,92 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="16px"
|
||||
height="16px"
|
||||
id="svg6077"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.3.1 r9886"
|
||||
sodipodi:docname="triangle-w.svg"
|
||||
inkscape:export-filename="triangle-w.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90">
|
||||
<defs
|
||||
id="defs6079">
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3587-6-5-3-4-5-4-0-1"
|
||||
id="linearGradient7308"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(-0.54681372,0,0,-0.39376081,25.13456,14.37044)"
|
||||
x1="34.992828"
|
||||
y1="0.94087797"
|
||||
x2="34.992828"
|
||||
y2="33.955856" />
|
||||
<linearGradient
|
||||
id="linearGradient3587-6-5-3-4-5-4-0-1">
|
||||
<stop
|
||||
offset="0"
|
||||
style="stop-color:#000000;stop-opacity:1"
|
||||
id="stop3589-9-2-2-3-2-53-4-3" />
|
||||
<stop
|
||||
offset="1"
|
||||
style="stop-color:#363636;stop-opacity:1"
|
||||
id="stop3591-7-4-73-7-9-86-9-3" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="22.197802"
|
||||
inkscape:cx="1.0398514"
|
||||
inkscape:cy="8"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="1002"
|
||||
inkscape:window-x="-4"
|
||||
inkscape:window-y="-3"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata6082">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer">
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
d="M 14,15.5 14,2.5 2,9 14,15.5 z"
|
||||
id="path2843-0-1-6-6"
|
||||
style="opacity:0.6;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
d="m 14,13.99996 0,-13 -12,6.49999 12,6.50001 z"
|
||||
id="path2843-39-5-5"
|
||||
style="opacity:0.7;color:#000000;fill:url(#linearGradient7308);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.0 KiB |
25
index.php
25
index.php
@ -29,9 +29,32 @@ OCP\App::checkAppEnabled('bookmarks');
|
||||
|
||||
OCP\App::setActiveNavigationEntry( 'bookmarks_index' );
|
||||
|
||||
OCP\Util::addscript('bookmarks','bookmarks');
|
||||
OCP\Util::addscript('bookmarks', 'bookmarks');
|
||||
OCP\Util::addStyle('bookmarks', 'bookmarks');
|
||||
OCP\Util::addscript('bookmarks', 'addBm');
|
||||
|
||||
|
||||
OCP\Util::addscript('bookmarks/3rdparty', 'tag-it');
|
||||
OCP\Util::addscript('bookmarks/3rdparty', 'js_tpl');
|
||||
OCP\Util::addStyle('bookmarks/3rdparty', 'jquery.tagit');
|
||||
$qtags = OC_Bookmarks_Bookmarks::findTags();
|
||||
|
||||
$tags = array();
|
||||
foreach($qtags as $tag) {
|
||||
$tags[] = $tag['tag'];
|
||||
}
|
||||
|
||||
$bm = array('title'=> '',
|
||||
'url'=> '',
|
||||
'tags'=> array(),
|
||||
'desc'=>'',
|
||||
'is_public'=>0,
|
||||
);
|
||||
|
||||
$tmpl = new OCP\Template( 'bookmarks', 'list', 'user' );
|
||||
|
||||
$tmpl->assign('bookmark', $bm);
|
||||
|
||||
$tmpl->assign('req_tag', isset($_GET['tag']) ? $_GET['tag'] : '');
|
||||
$tmpl->assign('tags', json_encode($tags), false);
|
||||
$tmpl->printPage();
|
||||
|
91
js/addBm.js
91
js/addBm.js
@ -1,16 +1,77 @@
|
||||
$(document).ready(function() {
|
||||
$('#bookmark_add_submit').click(addBookmark);
|
||||
});
|
||||
|
||||
function addBookmark(event) {
|
||||
var url = $('#bookmark_add_url').val();
|
||||
var tags = $('#bookmark_add_tags').val();
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: 'ajax/addBookmark.php',
|
||||
data: 'url=' + encodeURI(url) + '&tags=' + encodeURI(tags),
|
||||
success: function(data){
|
||||
window.close();
|
||||
(function($){
|
||||
$.bookmark_dialog = function(el, options){
|
||||
// To avoid scope issues, use 'base' instead of 'this'
|
||||
// to reference this class from internal events and functions.
|
||||
var base = this;
|
||||
|
||||
// Access to jQuery and DOM versions of element
|
||||
base.$el = $(el);
|
||||
base.el = el;
|
||||
|
||||
// Add a reverse reference to the DOM object
|
||||
base.$el.data('bookmark_dialog', base);
|
||||
|
||||
base.form_submit = function search_form_submit(event)
|
||||
{
|
||||
event.preventDefault();
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: $(this).attr('action'),
|
||||
data: $(this).serialize(),
|
||||
success: function(data){
|
||||
if(data.status == 'success'){
|
||||
base.options['on_success'](data);
|
||||
} else { // On failure
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
base.setTitle = function (str) {
|
||||
base.$el.find('.title').val(str);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
base.init = function(){
|
||||
base.options = $.extend({},$.bookmark_dialog.defaultOptions, options);
|
||||
base.$el.find('form').bind('submit.addBmform',base.form_submit);
|
||||
// Init Tagging thing
|
||||
base.$el.find('.tags').tagit({
|
||||
allowSpaces: true,
|
||||
availableTags: fullTags,
|
||||
placeholderText: t('bookmark', 'Tags')
|
||||
});
|
||||
|
||||
if(base.options['record']) { //Fill the form if it's an edit
|
||||
record = base.options['record'];
|
||||
base.$el.find('.record_id').val(record.id);
|
||||
base.$el.find('.title').val(record.title);
|
||||
base.$el.find('.url_input').val(record.url);
|
||||
base.$el.find('.desc').val(record.description);
|
||||
tagit_elem = base.$el.find('.tags');
|
||||
if(record.tags) {
|
||||
for(var i=0;i<record.tags.length;i++) {
|
||||
tagit_elem.tagit('createTag', record.tags[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
base.init();
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
$.bookmark_dialog.defaultOptions = {
|
||||
on_success: function(){},
|
||||
bookmark_record: undefined
|
||||
};
|
||||
|
||||
$.fn.bookmark_dialog = function(options){
|
||||
return this.each(function(){
|
||||
(new $.bookmark_dialog(this, options));
|
||||
});
|
||||
};
|
||||
|
||||
})(jQuery);
|
380
js/bookmarks.js
380
js/bookmarks.js
@ -1,35 +1,144 @@
|
||||
var bookmarks_page = 0;
|
||||
var bookmarks_loading = false;
|
||||
|
||||
var dialog;
|
||||
var bookmarks_sorting = 'bookmarks_sorting_recent';
|
||||
|
||||
var bookmark_view = 'image';
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#bookmark_add_submit').click(addOrEditBookmark);
|
||||
$('.centercontent').click(clickSideBar);
|
||||
$('#view_type input').click(clickSwitchView);
|
||||
$('#bookmark_add_submit').click(addBookmark);
|
||||
$(window).resize(function () {
|
||||
fillWindow($('.bookmarks_list'));
|
||||
});
|
||||
$(window).resize();
|
||||
$('.bookmarks_list').scroll(updateOnBottom).empty().width($('#content').width());
|
||||
$('.bookmarks_list').scroll(updateOnBottom).empty().width($('#rightcontent').width());
|
||||
$('#tag_filter input').tagit({
|
||||
allowSpaces: true,
|
||||
availableTags: fullTags,
|
||||
onTagFinishRemoved: filterTagsChanged
|
||||
}).tagit('option', 'onTagAdded', filterTagsChanged);
|
||||
getBookmarks();
|
||||
|
||||
if(init_sidebar != 'true')
|
||||
toggleSideBar();
|
||||
bookmark_view = init_view;
|
||||
switchView();
|
||||
});
|
||||
|
||||
|
||||
var formatString = (function() {
|
||||
var replacer = function(context) {
|
||||
return function(s, name) {
|
||||
return context[name];
|
||||
};
|
||||
};
|
||||
|
||||
return function(input, context) {
|
||||
return input.replace(/\{(\w+)\}/g, replacer(context));
|
||||
};
|
||||
})();
|
||||
|
||||
function clickSideBar() {
|
||||
$.post(OC.filePath('bookmarks', 'ajax', 'changescreen.php'), {sidebar: $('.right_img').is(':visible')});
|
||||
toggleSideBar();
|
||||
}
|
||||
|
||||
function toggleSideBar(){
|
||||
var left_pan_visible = $('.right_img').is(':visible');
|
||||
anim_duration = 1000;
|
||||
if( left_pan_visible) { // then show the left panel
|
||||
$('#rightcontent').animate({'left':'32.5em'},{duration: anim_duration, queue: false });
|
||||
$('.bookmarks_list').animate({'width': '-=15em'},{duration: anim_duration, queue: false });
|
||||
$('#leftcontent').animate({'margin-left':'0', 'opacity': 1},{duration: anim_duration, queue: false, complete: function() { $(window).trigger('resize'); }});
|
||||
$('.right_img').hide();
|
||||
$('.left_img').show();
|
||||
|
||||
} else { // hide the left panel
|
||||
$('#rightcontent').animate({'left':'15.5em'},{duration: anim_duration, queue: false });
|
||||
$('.bookmarks_list').animate({'width': '+=15em'},{duration: anim_duration, queue: false });
|
||||
$('#leftcontent').animate({'margin-left':'-17em', 'opacity': 0.5 },{duration: anim_duration, queue: false, complete: function() { $(window).trigger('resize'); } });
|
||||
$('.left_img').hide();
|
||||
$('.right_img').show();
|
||||
}
|
||||
}
|
||||
|
||||
function clickSwitchView(){
|
||||
$.post(OC.filePath('bookmarks', 'ajax', 'changescreen.php'), {view:bookmark_view});
|
||||
switchView();
|
||||
}
|
||||
|
||||
function switchView(){
|
||||
if(bookmark_view == 'list') { //Then switch to img
|
||||
$('.bookmarks_list').addClass('bm_view_img');
|
||||
$('.bookmarks_list').removeClass('bm_view_list');
|
||||
$('#view_type input.image').hide();
|
||||
$('#view_type input.list').show();
|
||||
bookmark_view = 'image';
|
||||
} else { // Then Image
|
||||
$('.bookmarks_list').addClass('bm_view_list');
|
||||
$('.bookmarks_list').removeClass('bm_view_img');
|
||||
$('#view_type input.list').hide();
|
||||
$('#view_type input.image').show();
|
||||
bookmark_view = 'list';
|
||||
}
|
||||
filterTagsChanged(); //Refresh the view
|
||||
}
|
||||
function addFilterTag(event) {
|
||||
event.preventDefault();
|
||||
$('#tag_filter input').tagit('createTag', $(this).text());
|
||||
}
|
||||
|
||||
function updateTagsList(tag) {
|
||||
html = tmpl("tag_tmpl", tag);
|
||||
$('.tag_list').append(html);
|
||||
}
|
||||
|
||||
function filterTagsChanged()
|
||||
{
|
||||
$('#bookmarkFilterTag').val($('#tag_filter input:hidden').val());
|
||||
$('.bookmarks_list').empty();
|
||||
bookmarks_page = 0;
|
||||
getBookmarks();
|
||||
}
|
||||
function getBookmarks() {
|
||||
if(bookmarks_loading) {
|
||||
//have patience :)
|
||||
return;
|
||||
}
|
||||
bookmarks_loading = true;
|
||||
//Update Rel Tags if first page
|
||||
if(bookmarks_page == 0) {
|
||||
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: OC.filePath('bookmarks', 'ajax', 'updateList.php') + '&type=rel_tags',
|
||||
data: {tag: $('#bookmarkFilterTag').val(), page:bookmarks_page, sort:bookmarks_sorting },
|
||||
success: function(tags){
|
||||
$('.tag_list').empty();
|
||||
for(var i in tags.data) {
|
||||
updateTagsList(tags.data[i]);
|
||||
}
|
||||
$('.tag_list .tag_edit').click(renameTag);
|
||||
$('.tag_list .tag_delete').click(deleteTag);
|
||||
$('.tag_list a.tag').click(addFilterTag);
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: OC.filePath('bookmarks', 'ajax', 'updateList.php'),
|
||||
data: 'tag=' + encodeURIComponent($('#bookmarkFilterTag').val()) + '&page=' + bookmarks_page + '&sort=' + bookmarks_sorting,
|
||||
type: 'GET',
|
||||
url: OC.filePath('bookmarks', 'ajax', 'updateList.php') + '&type=bookmark',
|
||||
data: {tag: $('#bookmarkFilterTag').val(), page:bookmarks_page, sort:bookmarks_sorting },
|
||||
success: function(bookmarks){
|
||||
if (bookmarks.data.length) {
|
||||
bookmarks_page += 1;
|
||||
}
|
||||
$('.bookmark_link').unbind('click', recordClick);
|
||||
$('.bookmark_delete').unbind('click', delBookmark);
|
||||
$('.bookmark_edit').unbind('click', showBookmark);
|
||||
$('.bookmark_edit').unbind('click', editBookmark);
|
||||
|
||||
for(var i in bookmarks.data) {
|
||||
updateBookmarksList(bookmarks.data[i]);
|
||||
@ -41,7 +150,7 @@ function getBookmarks() {
|
||||
|
||||
$('.bookmark_link').click(recordClick);
|
||||
$('.bookmark_delete').click(delBookmark);
|
||||
$('.bookmark_edit').click(showBookmark);
|
||||
$('.bookmark_edit').click(editBookmark);
|
||||
|
||||
bookmarks_loading = false;
|
||||
if (bookmarks.data.length) {
|
||||
@ -51,52 +160,43 @@ function getBookmarks() {
|
||||
});
|
||||
}
|
||||
|
||||
// function addBookmark() {
|
||||
// Instead of creating editBookmark() function, Converted the one above to
|
||||
// addOrEditBookmark() to make .js file more compact.
|
||||
|
||||
function addOrEditBookmark(event) {
|
||||
var id = $('#bookmark_add_id').val();
|
||||
var url = encodeEntities($('#bookmark_add_url').val());
|
||||
var title = encodeEntities($('#bookmark_add_title').val());
|
||||
var tags = encodeEntities($('#bookmark_add_tags').val());
|
||||
$("#firstrun").hide();
|
||||
if($.trim(url) == '') {
|
||||
OC.dialogs.alert('A valid bookmark url must be provided', 'Error creating bookmark');
|
||||
return false;
|
||||
}
|
||||
if($.trim(title) == '') {
|
||||
OC.dialogs.alert('A valid bookmark title must be provided', 'Error creating bookmark');
|
||||
return false;
|
||||
}
|
||||
if (id == 0) {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: OC.filePath('bookmarks', 'ajax', 'addBookmark.php'),
|
||||
data: 'url=' + encodeURIComponent(url) + '&title=' + encodeURIComponent(title) + '&tags=' + encodeURIComponent(tags),
|
||||
success: function(response){
|
||||
$('.bookmarks_input').val('');
|
||||
$('.bookmarks_list').empty();
|
||||
bookmarks_page = 0;
|
||||
getBookmarks();
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: OC.filePath('bookmarks', 'ajax', 'editBookmark.php'),
|
||||
data: 'id=' + id + '&url=' + encodeURIComponent(url) + '&title=' + encodeURIComponent(title) + '&tags=' + encodeURIComponent(tags),
|
||||
success: function(){
|
||||
$('.bookmarks_input').val('');
|
||||
$('#bookmark_add_id').val('0');
|
||||
$('.bookmarks_list').empty();
|
||||
bookmarks_page = 0;
|
||||
getBookmarks();
|
||||
}
|
||||
});
|
||||
}
|
||||
function createEditDialog(record){
|
||||
var oc_dialog= $('#edit_dialog form').clone().dialog({
|
||||
width : 620,
|
||||
height: 350,
|
||||
title: t('bookmark', 'Edit bookmark'),
|
||||
modal: true,
|
||||
close : function(event, ui) {
|
||||
$(this).dialog('destroy').remove();
|
||||
}
|
||||
});
|
||||
|
||||
$('.ui-dialog').bookmark_dialog({
|
||||
on_success: function(){
|
||||
oc_dialog.dialog('destroy').remove();
|
||||
filterTagsChanged();
|
||||
},
|
||||
record: record
|
||||
});
|
||||
}
|
||||
|
||||
function addBookmark(event) {
|
||||
url = $('#add_url').val();
|
||||
$('#add_url').val('');
|
||||
bookmark = { url: url, description:'', title:''};
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: OC.filePath('bookmarks', 'ajax', 'editBookmark.php'),
|
||||
data: bookmark,
|
||||
success: function(data){
|
||||
if (data.status == 'success') {
|
||||
bookmark.id = data.id;
|
||||
bookmark.added_date = new Date();
|
||||
updateBookmarksList(bookmark, 'prepend');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function delBookmark(event) {
|
||||
@ -104,7 +204,7 @@ function delBookmark(event) {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: OC.filePath('bookmarks', 'ajax', 'delBookmark.php'),
|
||||
data: 'id=' + record.data('id'),
|
||||
data: { id: record.data('id') },
|
||||
success: function(data){
|
||||
if (data.status == 'success') {
|
||||
record.remove();
|
||||
@ -116,56 +216,97 @@ function delBookmark(event) {
|
||||
});
|
||||
}
|
||||
|
||||
function showBookmark(event) {
|
||||
var record = $(this).parent().parent();
|
||||
$('#bookmark_add_id').val(record.attr('data-id'));
|
||||
$('#bookmark_add_url').val(record.children('.bookmark_url:first').text());
|
||||
$('#bookmark_add_title').val(record.children('.bookmark_title:first').text());
|
||||
$('#bookmark_add_tags').val(record.children('.bookmark_tags:first').text());
|
||||
|
||||
if ($('.bookmarks_add').css('display') == 'none') {
|
||||
$('.bookmarks_add').slideToggle();
|
||||
function editBookmark(event) {
|
||||
if($('.bookmark_single_form').length){
|
||||
$('.bookmark_single_form .reset').click();
|
||||
}
|
||||
var record = $(this).parent().parent();
|
||||
bookmark = record.data('record');
|
||||
html = tmpl("item_form_tmpl", bookmark);
|
||||
|
||||
record.after(html);
|
||||
record.hide();
|
||||
rec_form = record.next().find('form');
|
||||
rec_form.find('.bookmark_form_tags ul').tagit({
|
||||
allowSpaces: true,
|
||||
availableTags: fullTags,
|
||||
placeholderText: t('bookmark', 'Tags')
|
||||
});
|
||||
rec_form.bind('submit',submitBookmark);
|
||||
rec_form.find('.reset').bind('click',cancelBookmark);
|
||||
}
|
||||
|
||||
function replaceQueryString(url,param,value) {
|
||||
var re = new RegExp("([?|&])" + param + "=.*?(&|$)","i");
|
||||
if (url.match(re))
|
||||
return url.replace(re,'$1' + param + "=" + value + '$2');
|
||||
else
|
||||
return url + '&' + param + "=" + value;
|
||||
function cancelBookmark(event) {
|
||||
event.preventDefault();
|
||||
rec_form = $(this).closest('form').parent();
|
||||
rec_form.prev().show();
|
||||
rec_form.remove();
|
||||
}
|
||||
|
||||
function updateBookmarksList(bookmark) {
|
||||
var tags = encodeEntities(bookmark.tags).split(' ');
|
||||
function submitBookmark(event) {
|
||||
event.preventDefault();
|
||||
form_values = $(this).serialize();
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: $(this).attr('action'),
|
||||
data: form_values,
|
||||
success: function(data){
|
||||
if(data.status == 'success'){
|
||||
//@TODO : do better reaction than reloading the page
|
||||
filterTagsChanged();
|
||||
} else { // On failure
|
||||
//@TODO : show error message?
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function updateBookmarksList(bookmark, position) {
|
||||
position = typeof position !== 'undefined' ? position : 'append';
|
||||
bookmark = $.extend({title:'', description:'', added_date: new Date('now'), tags:[] }, bookmark);
|
||||
tags = bookmark.tags;
|
||||
var taglist = '';
|
||||
for ( var i=0, len=tags.length; i<len; ++i ){
|
||||
if(tags[i] != '')
|
||||
taglist = taglist + '<a class="bookmark_tag" href="'+replaceQueryString( String(window.location), 'tag', encodeURIComponent(tags[i])) + '">' + tags[i] + '</a> ';
|
||||
taglist = taglist + '<a class="bookmark_tag" href="#">' + encodeEntities(tags[i]) + '</a> ';
|
||||
}
|
||||
if(!hasProtocol(bookmark.url)) {
|
||||
bookmark.url = 'http://' + bookmark.url;
|
||||
}
|
||||
if(bookmark.title == '') bookmark.title = bookmark.url;
|
||||
$('.bookmarks_list').append(
|
||||
'<div class="bookmark_single" data-id="' + bookmark.id +'" >' +
|
||||
'<p class="bookmark_actions">' +
|
||||
'<span class="bookmark_edit">' +
|
||||
'<img class="svg" src="'+OC.imagePath('core', 'actions/rename')+'" title="Edit">' +
|
||||
'</span>' +
|
||||
'<span class="bookmark_delete">' +
|
||||
'<img class="svg" src="'+OC.imagePath('core', 'actions/delete')+'" title="Delete">' +
|
||||
'</span> ' +
|
||||
'</p>' +
|
||||
'<p class="bookmark_title">'+
|
||||
'<a href="' + encodeEntities(bookmark.url) + '" target="_blank" class="bookmark_link">' + encodeEntities(bookmark.title) + '</a>' +
|
||||
'</p>' +
|
||||
'<p class="bookmark_url"><a href="' + encodeEntities(bookmark.url) + '" target="_blank" class="bookmark_link">' + encodeEntities(bookmark.url) + '</a></p>' +
|
||||
'</div>'
|
||||
);
|
||||
if(taglist != '') {
|
||||
$('div[data-id="'+ bookmark.id +'"]').append('<p class="bookmark_tags">' + taglist + '</p>');
|
||||
|
||||
if(bookmark.added) {
|
||||
bookmark.added_date.setTime(parseInt(bookmark.added)*1000);
|
||||
}
|
||||
|
||||
if(bookmark_view == 'image') { //View in images
|
||||
service_url = formatString(shot_provider, {url: encodeEntities(bookmark.url), title: bookmark.title, width: 200});
|
||||
bookmark['service_url'] = service_url;
|
||||
html = tmpl("img_item_tmpl", bookmark);
|
||||
$('.bookmarks_list').append(html);
|
||||
$('div[data-id="'+ bookmark.id +'"]').data('record', bookmark);
|
||||
if(taglist != '') {
|
||||
$('div[data-id="'+ bookmark.id +'"]').append('<p class="bookmark_tags">' + taglist + '</p>');
|
||||
}
|
||||
$('div[data-id="'+ bookmark.id +'"] a.bookmark_tag').bind('click', addFilterTag);
|
||||
}
|
||||
else {
|
||||
html = tmpl("item_tmpl", bookmark);
|
||||
if(position == "prepend") {
|
||||
$('.bookmarks_list').prepend(html);
|
||||
} else {
|
||||
$('.bookmarks_list').append(html);
|
||||
}
|
||||
line = $('div[data-id="'+ bookmark.id +'"]');
|
||||
line.data('record', bookmark);
|
||||
if(taglist != '') {
|
||||
line.append('<p class="bookmark_tags">' + taglist + '</p>');
|
||||
}
|
||||
line.find('a.bookmark_tag').bind('click', addFilterTag);
|
||||
line.find('.bookmark_link').click(recordClick);
|
||||
line.find('.bookmark_delete').click(delBookmark);
|
||||
line.find('.bookmark_edit').click(editBookmark);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function updateOnBottom() {
|
||||
@ -199,3 +340,62 @@ function hasProtocol(url) {
|
||||
var regexp = /(ftp|http|https|sftp)/;
|
||||
return regexp.test(url);
|
||||
}
|
||||
|
||||
function renameTag(event) {
|
||||
if($('input[name="tag_new_name"]').length) return; // Do nothing if a tag is currenlty edited
|
||||
tag_el = $(this).closest('li');
|
||||
tag_el.append('<form><input name="tag_new_name" type="text"></form>');
|
||||
var form = tag_el.find('form');
|
||||
tag_el.find('.tags_actions').hide();
|
||||
tag_name = tag_el.find('.tag').hide().text();
|
||||
tag_el.find('input').val(tag_name).focus().bind('blur',function() {
|
||||
form.trigger('submit');
|
||||
});
|
||||
form.bind('submit',submitTagName);
|
||||
}
|
||||
|
||||
function submitTagName(event) {
|
||||
event.preventDefault();
|
||||
tag_el = $(this).closest('li')
|
||||
new_tag_name = tag_el.find('input').val();
|
||||
old_tag_name = tag_el.find('.tag').show().text();
|
||||
tag_el.find('.tag_edit').show();
|
||||
tag_el.find('.tags_actions').show();
|
||||
tag_el.find('input').unbind('blur');
|
||||
tag_el.find('form').unbind('submit').remove();
|
||||
|
||||
if(new_tag_name != old_tag_name && new_tag_name != '') {
|
||||
//submit
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: OC.filePath('bookmarks', 'ajax', 'renameTag.php'),
|
||||
data: { old_name: old_tag_name, new_name: new_tag_name},
|
||||
success: function(bookmarks){
|
||||
if (bookmarks.status =='success') {
|
||||
filterTagsChanged();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function deleteTag(event){
|
||||
tag_el = $(this).closest('li');
|
||||
var old_tag_name = tag_el.find('.tag').show().text();
|
||||
OC.dialogs.confirm(t('bookmarks', 'Are you sure you want to remove this tag from every entry?'),
|
||||
t('bookmarks', 'Warning'), function(answer) {
|
||||
if(answer) {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: OC.filePath('bookmarks', 'ajax', 'delTag.php'),
|
||||
data: { old_name: old_tag_name},
|
||||
success: function(bookmarks){
|
||||
if (bookmarks.status =='success') {
|
||||
filterTagsChanged();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1,12 +1,9 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "Отметки",
|
||||
"unnamed" => "неозаглавено",
|
||||
"Tags" => "Етикети",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Завлачете това в лентата с отметки на браузъра си и го натискайте, когато искате да отметнете бързо някоя страница:",
|
||||
"Read later" => "Отмятане",
|
||||
"Address" => "Адрес",
|
||||
"Title" => "Заглавие",
|
||||
"Tags" => "Етикети",
|
||||
"Save bookmark" => "Запис на отметката",
|
||||
"You have no bookmarks" => "Нямате отметки",
|
||||
"Bookmarklet <br />" => "Бутон за отметки <br />"
|
||||
);
|
||||
|
30
l10n/ca.php
30
l10n/ca.php
@ -1,13 +1,33 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "Adreces d'interès",
|
||||
"unnamed" => "sense nom",
|
||||
"Tags" => "Etiquetes",
|
||||
"Edit bookmark" => "Edita l'adreça d'interès",
|
||||
"Are you sure you want to remove this tag from every entry?" => "Segur que voleu eliminar aquesta etiqueta de cada entrada?",
|
||||
"Warning" => "Avís",
|
||||
"Bookm." => "Marcador",
|
||||
"Add a bookmark" => "Afegeix una adreça d'interès",
|
||||
"Close" => "Tanca",
|
||||
"The title of the page" => "El títol de la pàgina",
|
||||
"The address of the page" => "L'adreça de la pàgina",
|
||||
"Description of the page" => "Descripció de la pàgina",
|
||||
"Save" => "Desa",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Arrossegueu-ho al navegador i feu-hi un clic quan volgueu marcar ràpidament una adreça d'interès:",
|
||||
"Read later" => "Llegeix més tard",
|
||||
"Address" => "Adreça",
|
||||
"Title" => "Títol",
|
||||
"Tags" => "Etiquetes",
|
||||
"Save bookmark" => "Desa l'adreça d'interès",
|
||||
"Add bookmark" => "Afegeix una adreça d'interès",
|
||||
"List" => "Llista",
|
||||
"Image" => "Imatge",
|
||||
"Hide" => "Amaga",
|
||||
"Show" => "Mostra",
|
||||
"Related Tags" => "Etiquetes relacionades",
|
||||
"You have no bookmarks" => "No teniu adreces d'interès",
|
||||
"Bookmarklet <br />" => "Bookmarklet <br />"
|
||||
"Edit" => "Edita",
|
||||
"Delete" => "Esborra",
|
||||
"Cancel" => "Cancel·la",
|
||||
"Bookmarklet <br />" => "Bookmarklet <br />",
|
||||
"Import bookmarks" => "Importa les adreces d'interès",
|
||||
"Bookmark html file" => "Adreça d'interès en fitxer html",
|
||||
"Import" => "Importa",
|
||||
"Export bookmarks" => "Exporta adreces d'interès",
|
||||
"Export" => "Exporta"
|
||||
);
|
||||
|
@ -1,13 +1,33 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "Záložky",
|
||||
"unnamed" => "nepojmenováno",
|
||||
"Tags" => "Značky",
|
||||
"Edit bookmark" => "Upravit záložku",
|
||||
"Are you sure you want to remove this tag from every entry?" => "Opravdu jste si jisti, že si přejete odstranit tuto značku z každého záznamu?",
|
||||
"Warning" => "Varování",
|
||||
"Bookm." => "Zál.",
|
||||
"Add a bookmark" => "Přidat záložku",
|
||||
"Close" => "Zavřít",
|
||||
"The title of the page" => "Název stránky",
|
||||
"The address of the page" => "Adresa stránky",
|
||||
"Description of the page" => "Popis stránky",
|
||||
"Save" => "Uložit",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Přetáhněte do Vašeho prohlížeče a klikněte, pokud si přejete rychle uložit stránku do záložek:",
|
||||
"Read later" => "Přečíst později",
|
||||
"Address" => "Adresa",
|
||||
"Title" => "Název",
|
||||
"Tags" => "Značky",
|
||||
"Save bookmark" => "Uložit záložku",
|
||||
"Add bookmark" => "Přidat záložku",
|
||||
"List" => "Seznam",
|
||||
"Image" => "Obrázek",
|
||||
"Hide" => "Skrýt",
|
||||
"Show" => "Zobrazit",
|
||||
"Related Tags" => "Podobné značky",
|
||||
"You have no bookmarks" => "Nemáte žádné záložky",
|
||||
"Bookmarklet <br />" => "Záložky <br />"
|
||||
"Edit" => "Upravit",
|
||||
"Delete" => "Smazat",
|
||||
"Cancel" => "Zrušit",
|
||||
"Bookmarklet <br />" => "Záložky <br />",
|
||||
"Import bookmarks" => "Importovat záložky",
|
||||
"Bookmark html file" => "Html soubor záložek",
|
||||
"Import" => "Importovat",
|
||||
"Export bookmarks" => "Exportovat záložky",
|
||||
"Export" => "Exportovat"
|
||||
);
|
||||
|
30
l10n/da.php
30
l10n/da.php
@ -1,13 +1,33 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "Bogmærker",
|
||||
"unnamed" => "uden navn",
|
||||
"Tags" => "Mærker",
|
||||
"Edit bookmark" => "Rediger bogmærker",
|
||||
"Are you sure you want to remove this tag from every entry?" => "Er du sikker på at du vil fjerne dette flag fra alle poster?",
|
||||
"Warning" => "Advarsel",
|
||||
"Bookm." => "Bogm.",
|
||||
"Add a bookmark" => "Tilføj bogmærke",
|
||||
"Close" => "Luk",
|
||||
"The title of the page" => "Sidens titel",
|
||||
"The address of the page" => "Sidens adresse",
|
||||
"Description of the page" => "Sidens beskrivelse",
|
||||
"Save" => "Gem",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Træk denne til dine browserbogmærker pg klik på den, når du ønsker at lynoprette et bogmærke til hjemmesiden:",
|
||||
"Read later" => "Læs senere",
|
||||
"Address" => "Adresser",
|
||||
"Title" => "Titel",
|
||||
"Tags" => "Mærker",
|
||||
"Save bookmark" => "Gem bogmærke",
|
||||
"Add bookmark" => "Tilføj bogmærke",
|
||||
"List" => "Liste",
|
||||
"Image" => "Billede",
|
||||
"Hide" => "Gem",
|
||||
"Show" => "Vis",
|
||||
"Related Tags" => "Relaterede Tags",
|
||||
"You have no bookmarks" => "Du har ingen bogmærker",
|
||||
"Bookmarklet <br />" => "Bookmarklet <br />"
|
||||
"Edit" => "Rediger",
|
||||
"Delete" => "Slet",
|
||||
"Cancel" => "Annuller",
|
||||
"Bookmarklet <br />" => "Bookmarklet <br />",
|
||||
"Import bookmarks" => "Importer bogmærker",
|
||||
"Bookmark html file" => "Bogmærke html fil",
|
||||
"Import" => "Importer",
|
||||
"Export bookmarks" => "Exporter bogmærker",
|
||||
"Export" => "Exporter"
|
||||
);
|
||||
|
34
l10n/de.php
34
l10n/de.php
@ -1,13 +1,33 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "Lesezeichen",
|
||||
"unnamed" => "unbenannt",
|
||||
"Tags" => "Tags",
|
||||
"Edit bookmark" => "Lesezeichen bearbeiten",
|
||||
"Are you sure you want to remove this tag from every entry?" => "Soll dieses Schlagwort wirklich von allen Einträgen entfernt werden?",
|
||||
"Warning" => "Warnung",
|
||||
"Bookm." => "Lesez.",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Ziehen Sie dies zu Ihren Browser-Lesezeichen und klicken Sie darauf, wenn Sie eine Website schnell den Lesezeichen hinzufügen wollen.",
|
||||
"Add a bookmark" => "Ein Lesezeichen hinzufügen",
|
||||
"Close" => "Schließen",
|
||||
"The title of the page" => "Der Titel der Seite",
|
||||
"The address of the page" => "Die Adresse der Seite",
|
||||
"Description of the page" => "Die Beschreibung der Seite",
|
||||
"Save" => "Speichern",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Ziehe dies zu Deinen Browser-Lesezeichen und klicke darauf, wenn Du eine Website schnell den Lesezeichen hinzufügen willst.",
|
||||
"Read later" => "Später lesen",
|
||||
"Address" => "Adresse",
|
||||
"Title" => "Titel",
|
||||
"Tags" => "Tags",
|
||||
"Save bookmark" => "Lesezeichen speichern",
|
||||
"You have no bookmarks" => "Sie haben keine Lesezeichen",
|
||||
"Bookmarklet <br />" => "Bookmarklet <br />"
|
||||
"Add bookmark" => "Lesezeichen hinzufügen",
|
||||
"List" => "Liste",
|
||||
"Image" => "Bild",
|
||||
"Hide" => "Ausblenden",
|
||||
"Show" => "Anzeigen",
|
||||
"Related Tags" => "Verwandte Schlagworte",
|
||||
"You have no bookmarks" => "Du hast keine Lesezeichen",
|
||||
"Edit" => "Bearbeiten",
|
||||
"Delete" => "Löschen",
|
||||
"Cancel" => "Abbrechen",
|
||||
"Bookmarklet <br />" => "Bookmarklet <br />",
|
||||
"Import bookmarks" => "Lesezeichen importieren",
|
||||
"Bookmark html file" => "HTML-Lesezeichen-Datei",
|
||||
"Import" => "Importieren",
|
||||
"Export bookmarks" => "Lesezeichen exportieren",
|
||||
"Export" => "Exportieren"
|
||||
);
|
||||
|
33
l10n/de_DE.php
Normal file
33
l10n/de_DE.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "Lesezeichen",
|
||||
"Tags" => "Tags",
|
||||
"Edit bookmark" => "Lesezeichen bearbeiten",
|
||||
"Are you sure you want to remove this tag from every entry?" => "Soll dieses Schlagwort wirklich von allen Einträgen entfernt werden?",
|
||||
"Warning" => "Warnung",
|
||||
"Bookm." => "Lesez.",
|
||||
"Add a bookmark" => "Ein Lesezeichen hinzufügen",
|
||||
"Close" => "Schließen",
|
||||
"The title of the page" => "Der Titel der Seite",
|
||||
"The address of the page" => "Die Adresse der Seite",
|
||||
"Description of the page" => "Die Beschreibung der Seite",
|
||||
"Save" => "Speichern",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Ziehen Sie dies zu Ihren Browser-Lesezeichen und klicken Sie darauf, wenn Sie eine Website schnell den Lesezeichen hinzufügen wollen.",
|
||||
"Read later" => "Später lesen",
|
||||
"Address" => "Adresse",
|
||||
"Add bookmark" => "Lesezeichen hinzufügen",
|
||||
"List" => "Liste",
|
||||
"Image" => "Bild",
|
||||
"Hide" => "Ausblenden",
|
||||
"Show" => "Anzeigen",
|
||||
"Related Tags" => "Verwandte Schlagworte",
|
||||
"You have no bookmarks" => "Sie haben keine Lesezeichen",
|
||||
"Edit" => "Bearbeiten",
|
||||
"Delete" => "Löschen",
|
||||
"Cancel" => "Abbrechen",
|
||||
"Bookmarklet <br />" => "Bookmarklet <br />",
|
||||
"Import bookmarks" => "Lesezeichen importieren",
|
||||
"Bookmark html file" => "HTML-Lesezeichen-Datei",
|
||||
"Import" => "Importieren",
|
||||
"Export bookmarks" => "Lesezeichen exportieren",
|
||||
"Export" => "Exportieren"
|
||||
);
|
31
l10n/el.php
31
l10n/el.php
@ -1,12 +1,33 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "Σελιδοδείκτες",
|
||||
"unnamed" => "ανώνυμο",
|
||||
"Tags" => "Ετικέτες",
|
||||
"Edit bookmark" => "Επεξεργασία σελιδοδείκτη",
|
||||
"Are you sure you want to remove this tag from every entry?" => "Είστε σίγουρος για την αφαίρεση αυτής της ετικέτας από κάθε καταχώρηση;",
|
||||
"Warning" => "Προειδοποίηση",
|
||||
"Bookm." => "Σελιδοδεικτ.",
|
||||
"Add a bookmark" => "Προσθήκη σελιδοδείκτη",
|
||||
"Close" => "Κλείσιμο",
|
||||
"The title of the page" => "Τίτλος της σελίδας",
|
||||
"The address of the page" => "Διεύθυνση της σελίδας",
|
||||
"Description of the page" => "Περιγραφή της σελίδας",
|
||||
"Save" => "Αποθήκευση",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Σύρετε αυτό στους σελιδοδείκτες του περιηγητή σας και κάντε κλικ επάνω του, όταν θέλετε να προσθέσετε σύντομα μια ιστοσελίδα ως σελιδοδείκτη:",
|
||||
"Read later" => "Ανάγνωση αργότερα",
|
||||
"Address" => "Διεύθυνση",
|
||||
"Title" => "Τίτλος",
|
||||
"Tags" => "Ετικέτες",
|
||||
"Save bookmark" => "Αποθήκευση σελιδοδείκτη",
|
||||
"Add bookmark" => "Προσθήκη σελιδοδείκτη",
|
||||
"List" => "Λίστα",
|
||||
"Image" => "Εικόνα",
|
||||
"Hide" => "Απόκρυψη",
|
||||
"Show" => "Εμφάνιση",
|
||||
"Related Tags" => "Σχετικές ετικέτες",
|
||||
"You have no bookmarks" => "Δεν έχετε σελιδοδείκτες",
|
||||
"Bookmarklet <br />" => "Εφαρμογίδιο Σελιδοδεικτών <br />"
|
||||
"Edit" => "Επεξεργασία",
|
||||
"Delete" => "Διαγραφή",
|
||||
"Cancel" => "Ακύρωση",
|
||||
"Bookmarklet <br />" => "Εφαρμογίδιο Σελιδοδεικτών <br />",
|
||||
"Import bookmarks" => "Εισαγωγή σελιδοδεικτών",
|
||||
"Bookmark html file" => "HTML αρχείο σελιδοδείκτη",
|
||||
"Import" => "Εισαγωγή",
|
||||
"Export bookmarks" => "Εξαγωγή σελιδοδεικτών",
|
||||
"Export" => "Εξαγωγή"
|
||||
);
|
||||
|
31
l10n/eo.php
31
l10n/eo.php
@ -1,12 +1,33 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "Legosignoj",
|
||||
"unnamed" => "nenomita",
|
||||
"Tags" => "Etikedoj",
|
||||
"Edit bookmark" => "Redakti legosignon",
|
||||
"Are you sure you want to remove this tag from every entry?" => "Ĉu vi vere volas forigi ĉi tiun etikedon el ĉiu ero?",
|
||||
"Warning" => "Averto",
|
||||
"Bookm." => "Legos.",
|
||||
"Add a bookmark" => "Aldoni legosignon",
|
||||
"Close" => "Fermi",
|
||||
"The title of the page" => "Titolo de la paĝo",
|
||||
"The address of the page" => "Adreso de la paĝo",
|
||||
"Description of the page" => "Priskribo de la paĝo",
|
||||
"Save" => "Konservi",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Ŝovu tion ĉi al la legosignoj de via TTT-legilo kaj klaku ĝin, se vi volas rapide legosignigi TTT-paĝon:",
|
||||
"Read later" => "Legi poste",
|
||||
"Address" => "Adreso",
|
||||
"Title" => "Titolo",
|
||||
"Tags" => "Etikedoj",
|
||||
"Save bookmark" => "Konservi legosignon",
|
||||
"Add bookmark" => "Aldoni legosignon",
|
||||
"List" => "Listo",
|
||||
"Image" => "Bildo",
|
||||
"Hide" => "Malmontri",
|
||||
"Show" => "Montri",
|
||||
"Related Tags" => "Rilataj etikedoj",
|
||||
"You have no bookmarks" => "Vi havas neniun legosignon",
|
||||
"Bookmarklet <br />" => "Kodosigno <br />"
|
||||
"Edit" => "Redakti",
|
||||
"Delete" => "Forigi",
|
||||
"Cancel" => "Nuligi",
|
||||
"Bookmarklet <br />" => "Kodosigno <br />",
|
||||
"Import bookmarks" => "Enporti legosignojn",
|
||||
"Bookmark html file" => "Legosignigi HTML-dosieron",
|
||||
"Import" => "Enporti",
|
||||
"Export bookmarks" => "Elporti legosignojn",
|
||||
"Export" => "Elporti"
|
||||
);
|
||||
|
31
l10n/es.php
31
l10n/es.php
@ -1,12 +1,33 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "Marcadores",
|
||||
"unnamed" => "sin nombre",
|
||||
"Tags" => "Etiquetas",
|
||||
"Edit bookmark" => "Editar marcador",
|
||||
"Are you sure you want to remove this tag from every entry?" => "Esta seguro que desea remover este tag de todas las entradas?",
|
||||
"Warning" => "Preacucion",
|
||||
"Bookm." => "Marc.",
|
||||
"Add a bookmark" => "Agregar a marcadores",
|
||||
"Close" => "cerrrar",
|
||||
"The title of the page" => "Titulo de la pagina",
|
||||
"The address of the page" => "Direccion de la pagina",
|
||||
"Description of the page" => "Descripcion de la pagina",
|
||||
"Save" => "Guardar",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Arrastra desde aquí a los marcadores de tu navegador, y haz clic cuando quieras marcar una página web rápidamente:",
|
||||
"Read later" => "Leer después",
|
||||
"Address" => "Dirección",
|
||||
"Title" => "Título",
|
||||
"Tags" => "Etiquetas",
|
||||
"Save bookmark" => "Guardar marcador",
|
||||
"Add bookmark" => "Agregar Marcador",
|
||||
"List" => "Lista",
|
||||
"Image" => "Imagen",
|
||||
"Hide" => "Ocultar",
|
||||
"Show" => "Mostrar",
|
||||
"Related Tags" => "Tags relacionados",
|
||||
"You have no bookmarks" => "No tienes marcadores",
|
||||
"Bookmarklet <br />" => "Bookmarklet <br />"
|
||||
"Edit" => "Editar",
|
||||
"Delete" => "Eliminar",
|
||||
"Cancel" => "Cancelar",
|
||||
"Bookmarklet <br />" => "Bookmarklet <br />",
|
||||
"Import bookmarks" => "Importar marcadores",
|
||||
"Bookmark html file" => "Marcadores en archivo HTML",
|
||||
"Import" => "Importart",
|
||||
"Export bookmarks" => "Exportar marcadores",
|
||||
"Export" => "Exportar"
|
||||
);
|
||||
|
33
l10n/es_AR.php
Normal file
33
l10n/es_AR.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "Marcadores",
|
||||
"Tags" => "Etiquetas",
|
||||
"Edit bookmark" => "Editar marcadores",
|
||||
"Are you sure you want to remove this tag from every entry?" => "¿Estás seguro de que querés borrar esta etiqueta de todos los elementos?",
|
||||
"Warning" => "Atención",
|
||||
"Bookm." => "Marc.",
|
||||
"Add a bookmark" => "Agregar un marcador",
|
||||
"Close" => "Cerrar",
|
||||
"The title of the page" => "El título de la página",
|
||||
"The address of the page" => "La dirección de la página",
|
||||
"Description of the page" => "Descripción de la página",
|
||||
"Save" => "Guardar",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Arrastrá desde aquí a los marcadores de tu navegador, y hacé click cuando quieras marcar una página web:",
|
||||
"Read later" => "Leer después",
|
||||
"Edit" => "Editar",
|
||||
"Delete" => "Borrar",
|
||||
"Cancel" => "Cancelar",
|
||||
"Address" => "Dirección",
|
||||
"Add bookmark" => "Agregar marcador",
|
||||
"List" => "Lista",
|
||||
"Image" => "Imagen",
|
||||
"Hide" => "Ocultar",
|
||||
"Show" => "Mostrar",
|
||||
"Related Tags" => "Etiquetas relacionadas",
|
||||
"You have no bookmarks" => "No tenés marcadores",
|
||||
"Bookmarklet <br />" => "Bookmarklet <br />",
|
||||
"Import bookmarks" => "Importar marcadores",
|
||||
"Bookmark html file" => "Agregar a marcadores archivo html",
|
||||
"Import" => "Importar",
|
||||
"Export bookmarks" => "Exportar marcadores",
|
||||
"Export" => "Exportar"
|
||||
);
|
@ -1,13 +1,33 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "Järjehoidjad",
|
||||
"unnamed" => "nimetu",
|
||||
"Tags" => "Sildid",
|
||||
"Edit bookmark" => "Muuda järjehoidjat",
|
||||
"Are you sure you want to remove this tag from every entry?" => "Oled sa kindel, et sa soovid kõigilt sissekannetelt seda silti eemaldada?",
|
||||
"Warning" => "Hoiatus",
|
||||
"Bookm." => "Järjeh.",
|
||||
"Add a bookmark" => "Lisa järjehoidja",
|
||||
"Close" => "Sulge",
|
||||
"The title of the page" => "Lehe pealkiri",
|
||||
"The address of the page" => "Lehe aadress",
|
||||
"Description of the page" => "Lehe kirjeldus",
|
||||
"Save" => "Salvesta",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Lohista see oma veebilehitseja järjehoidjatesse ja kliki sellele, kui sa soovid veebilehte kiirelt lisada:",
|
||||
"Read later" => "Loe hiljem",
|
||||
"Address" => "Aadress",
|
||||
"Title" => "Pealkiri",
|
||||
"Tags" => "Sildid",
|
||||
"Save bookmark" => "Salvesta järjehoidja",
|
||||
"Add bookmark" => "Lisa järjehoidja",
|
||||
"List" => "Nimekiri",
|
||||
"Image" => "Pilt",
|
||||
"Hide" => "Peida",
|
||||
"Show" => "Näita",
|
||||
"Related Tags" => "Seotud sildid",
|
||||
"You have no bookmarks" => "Sul pole järjehoidjaid",
|
||||
"Bookmarklet <br />" => "Järjehoidja vidin <br />"
|
||||
"Edit" => "Muuda",
|
||||
"Delete" => "Kustuta",
|
||||
"Cancel" => "Loobu",
|
||||
"Bookmarklet <br />" => "Järjehoidja vidin <br />",
|
||||
"Import bookmarks" => "Impordi järjehoidjaid",
|
||||
"Bookmark html file" => "Järjehoidjate HTML-fail",
|
||||
"Import" => "Impordi",
|
||||
"Export bookmarks" => "Ekspordi järjehoidjaid",
|
||||
"Export" => "Ekspordi"
|
||||
);
|
||||
|
31
l10n/eu.php
31
l10n/eu.php
@ -1,12 +1,33 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "Laster-markak",
|
||||
"unnamed" => "izengabekoa",
|
||||
"Tags" => "Etiketak",
|
||||
"Edit bookmark" => "Editatu laster-marka",
|
||||
"Are you sure you want to remove this tag from every entry?" => "Ziur zaude etiketa hau sarrera guztietatik ezabatu nahi duzula?",
|
||||
"Warning" => "Abisua",
|
||||
"Bookm." => "Lasterm.",
|
||||
"Add a bookmark" => "Gehitu laster-marka",
|
||||
"Close" => "Itxi",
|
||||
"The title of the page" => "Orriaren izenburua",
|
||||
"The address of the page" => "Orriaren helbidea",
|
||||
"Description of the page" => "Orriaren deskribapena",
|
||||
"Save" => "Gorde",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Web orri bat laster-marketara azkar gehitzeko, arrastratu hau zure arakatzailearen laster-marketara eta klikatu bertan:",
|
||||
"Read later" => "Irakurri geroago",
|
||||
"Address" => "Helbidea",
|
||||
"Title" => "Izenburua",
|
||||
"Tags" => "Etiketak",
|
||||
"Save bookmark" => "Gorde laster-marka",
|
||||
"Add bookmark" => "Gehitu laster-marka",
|
||||
"List" => "Zerrenda",
|
||||
"Image" => "Irudia",
|
||||
"Hide" => "Ezkutatu",
|
||||
"Show" => "Bistaratu",
|
||||
"Related Tags" => "Erlazionatutako etiketak",
|
||||
"You have no bookmarks" => "Ez duzu laster-markarik",
|
||||
"Bookmarklet <br />" => "Bookmarklet <br />"
|
||||
"Edit" => "Editatu",
|
||||
"Delete" => "Ezabatu",
|
||||
"Cancel" => "Ezeztatu",
|
||||
"Bookmarklet <br />" => "Bookmarklet <br />",
|
||||
"Import bookmarks" => "Inportatu laster-markak",
|
||||
"Bookmark html file" => "Egin html fitxategi baten laster marka",
|
||||
"Import" => "Inportatu",
|
||||
"Export bookmarks" => "Exportatu laster-markak",
|
||||
"Export" => "Exportatu"
|
||||
);
|
||||
|
@ -1,11 +1,8 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "نشانکها",
|
||||
"unnamed" => "بدوننام",
|
||||
"Tags" => "برچسبها",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "هنگامی که میخواهید کی صفحهی اینترنتی را بسرعت نشان کنید، این را به نشانههای مرورگر خود بکشید و روی آن کلیک کنید.",
|
||||
"Read later" => "بعد خواندهشود",
|
||||
"Address" => "آدرس",
|
||||
"Title" => "عنوان",
|
||||
"Tags" => "برچسبها",
|
||||
"Save bookmark" => "ذخیره نشانک",
|
||||
"You have no bookmarks" => "شما هیچ نشانکی ندارید"
|
||||
);
|
||||
|
@ -1,13 +1,32 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "Kirjanmerkit",
|
||||
"unnamed" => "nimetön",
|
||||
"Tags" => "Tunnisteet",
|
||||
"Edit bookmark" => "Muokkaa kirjanmerkkejä",
|
||||
"Are you sure you want to remove this tag from every entry?" => "Haluatko varmasti poistaa tämän tunnisteen jokaiselta kohteelta?",
|
||||
"Warning" => "Varoitus",
|
||||
"Bookm." => "Kirjanm.",
|
||||
"Add a bookmark" => "Lisää kirjanmerkki",
|
||||
"Close" => "Sulje",
|
||||
"The title of the page" => "Sivun otsikko",
|
||||
"The address of the page" => "Sivun osoite",
|
||||
"Description of the page" => "Sivun kuvaus",
|
||||
"Save" => "Tallenna",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Vedä tämä selaimesi kirjanmerkkipalkkiin ja napsauta sitä, kun haluat lisätä kirjanmerkin nopeasti:",
|
||||
"Read later" => "Lue myöhemmin",
|
||||
"Address" => "Osoite",
|
||||
"Title" => "Otsikko",
|
||||
"Tags" => "Tunnisteet",
|
||||
"Save bookmark" => "Tallenna kirjanmerkki",
|
||||
"Add bookmark" => "Lisää kirjanmerkki",
|
||||
"List" => "Lista",
|
||||
"Image" => "Kuva",
|
||||
"Hide" => "Piilota",
|
||||
"Show" => "Näytä",
|
||||
"Related Tags" => "Vastaavanlaiset tunnisteet",
|
||||
"You have no bookmarks" => "Sinulla ei ole kirjanmerkkejä",
|
||||
"Bookmarklet <br />" => "Kirjanmerkitsin <br />"
|
||||
"Edit" => "Muokkaa",
|
||||
"Delete" => "Poista",
|
||||
"Cancel" => "Peru",
|
||||
"Bookmarklet <br />" => "Kirjanmerkitsin <br />",
|
||||
"Import bookmarks" => "Tuo kirjanmerkkejä",
|
||||
"Import" => "Tuo",
|
||||
"Export bookmarks" => "Vie kirjanmerkkejä",
|
||||
"Export" => "Vie"
|
||||
);
|
||||
|
30
l10n/fr.php
30
l10n/fr.php
@ -1,13 +1,33 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "Favoris",
|
||||
"unnamed" => "sans titre",
|
||||
"Tags" => "Étiquettes",
|
||||
"Edit bookmark" => "Modifier le favori",
|
||||
"Are you sure you want to remove this tag from every entry?" => "Êtes-vous certain de vouloir retirer cette étiquette de chaque entrée ?",
|
||||
"Warning" => "Attention",
|
||||
"Bookm." => "Fav.",
|
||||
"Add a bookmark" => "Ajouter un favori",
|
||||
"Close" => "Fermer",
|
||||
"The title of the page" => "Le titre de la page",
|
||||
"The address of the page" => "L'adresse de la page",
|
||||
"Description of the page" => "Description de la page",
|
||||
"Save" => "Sauvegarder",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Glissez ceci dans les favoris de votre navigateur, et cliquer dessus lorsque vous souhaitez ajouter la page en cours à vos marques-pages :",
|
||||
"Read later" => "Lire plus tard",
|
||||
"Address" => "Adresse",
|
||||
"Title" => "Titre",
|
||||
"Tags" => "Étiquettes",
|
||||
"Save bookmark" => "Sauvegarder le favori",
|
||||
"Add bookmark" => "Ajouter le favori",
|
||||
"List" => "Lister",
|
||||
"Image" => "Image",
|
||||
"Hide" => "Masquer",
|
||||
"Show" => "Afficher",
|
||||
"Related Tags" => "Étiquettes similaires",
|
||||
"You have no bookmarks" => "Vous n'avez aucun favori",
|
||||
"Bookmarklet <br />" => "Gestionnaire de favoris <br />"
|
||||
"Edit" => "Modifier",
|
||||
"Delete" => "Supprimer",
|
||||
"Cancel" => "Annuler",
|
||||
"Bookmarklet <br />" => "Gestionnaire de favoris <br />",
|
||||
"Import bookmarks" => "Importer des favoris",
|
||||
"Bookmark html file" => "Mettre en favoris un fichier HTML",
|
||||
"Import" => "Importer",
|
||||
"Export bookmarks" => "Exporter les favoris",
|
||||
"Export" => "Exporter"
|
||||
);
|
||||
|
10
l10n/gl.php
Normal file
10
l10n/gl.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "Marcadores",
|
||||
"Tags" => "Etiquetas",
|
||||
"Bookm." => "Marcad.",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Arrastre esto aos marcadores do seu navegador e pulse nel cando queira marcar unha páxina con rapidez:",
|
||||
"Read later" => "Ler máis tarde",
|
||||
"Address" => "Enderezo",
|
||||
"You have no bookmarks" => "Non ten marcadores",
|
||||
"Bookmarklet <br />" => "Bookmarklet <br />"
|
||||
);
|
@ -1,11 +1,8 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "סימניות",
|
||||
"unnamed" => "ללא שם",
|
||||
"Tags" => "תגיות",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "ניתן לגרור את הקישור הזה אל סרגל הסימניות בדפדפן שלך וללחוץ עליו כאשר מעוניינים ליצור סימניה לאתר במהירות.",
|
||||
"Read later" => "קריאה מאוחרת",
|
||||
"Address" => "כתובת",
|
||||
"Title" => "כותרת",
|
||||
"Tags" => "תגיות",
|
||||
"Save bookmark" => "שמירת סימניה",
|
||||
"You have no bookmarks" => "אין ברשותך סימניות"
|
||||
);
|
||||
|
@ -1,12 +1,9 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "Könyvjelzők",
|
||||
"unnamed" => "névtelen",
|
||||
"Tags" => "Címkék",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Húzd át ezt a böngésződben a Könyvjelzők sávba! Klikkelj rá bármikor, amikor szeretnéd az aktuális weboldal címét ide elmenteni!",
|
||||
"Read later" => "Később olvasom",
|
||||
"Address" => "Cím",
|
||||
"Title" => "Felirat",
|
||||
"Tags" => "Címkék",
|
||||
"Save bookmark" => "Könyvjelző mentése",
|
||||
"You have no bookmarks" => "Nincsenek könyvjelzőid",
|
||||
"Bookmarklet <br />" => "Könyvjelzőalkalmazás <br />"
|
||||
);
|
||||
|
19
l10n/id.php
Normal file
19
l10n/id.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Tags" => "label",
|
||||
"Warning" => "peringatan",
|
||||
"Close" => "tutup",
|
||||
"The title of the page" => "judul laman",
|
||||
"Save" => "simpan",
|
||||
"Read later" => "baca nanti",
|
||||
"Address" => "alamat",
|
||||
"List" => "daftar",
|
||||
"Image" => "gambar",
|
||||
"Hide" => "sembunyikan",
|
||||
"Show" => "tampilkan",
|
||||
"Related Tags" => "label terkait",
|
||||
"Edit" => "ubah",
|
||||
"Delete" => "hapus",
|
||||
"Cancel" => "batal",
|
||||
"Import" => "mengimpor",
|
||||
"Export" => "mengekspor"
|
||||
);
|
30
l10n/it.php
30
l10n/it.php
@ -1,13 +1,33 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "Segnalibri",
|
||||
"unnamed" => "senza nome",
|
||||
"Tags" => "Tag",
|
||||
"Edit bookmark" => "Modifica segnalibro",
|
||||
"Are you sure you want to remove this tag from every entry?" => "Sei sicuro di voler rimuovere questo tag da ogni voce?",
|
||||
"Warning" => "Avviso",
|
||||
"Bookm." => "Segnal.",
|
||||
"Add a bookmark" => "Aggiungi un segnalibro",
|
||||
"Close" => "Chiudi",
|
||||
"The title of the page" => "Il titolo della pagina",
|
||||
"The address of the page" => "L'indirizzo della pagina",
|
||||
"Description of the page" => "Descrizione della pagina",
|
||||
"Save" => "Salva",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Quando vuoi creare rapidamente un segnalibro, trascinalo sui segnalibri del browser e fai clic su di esso:",
|
||||
"Read later" => "Leggi dopo",
|
||||
"Address" => "Indirizzo",
|
||||
"Title" => "Titolo",
|
||||
"Tags" => "Tag",
|
||||
"Save bookmark" => "Salva segnalibro",
|
||||
"Add bookmark" => "Aggiungi segnalibro",
|
||||
"List" => "Elenco",
|
||||
"Image" => "Immagine",
|
||||
"Hide" => "Nascondi",
|
||||
"Show" => "Mostra",
|
||||
"Related Tags" => "Tag correlati",
|
||||
"You have no bookmarks" => "Non hai segnalibri",
|
||||
"Bookmarklet <br />" => "Bookmarklet <br />"
|
||||
"Edit" => "Modifica",
|
||||
"Delete" => "Elimina",
|
||||
"Cancel" => "Annulla",
|
||||
"Bookmarklet <br />" => "Bookmarklet <br />",
|
||||
"Import bookmarks" => "Importa segnalibri",
|
||||
"Bookmark html file" => "File html di segnalibri",
|
||||
"Import" => "Importa",
|
||||
"Export bookmarks" => "Esporta segnalibri",
|
||||
"Export" => "Esporta"
|
||||
);
|
||||
|
@ -1,13 +1,33 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "ブックマーク",
|
||||
"unnamed" => "無名タイトル",
|
||||
"Tags" => "タグ",
|
||||
"Edit bookmark" => "ブックマークを編集",
|
||||
"Are you sure you want to remove this tag from every entry?" => "すべてのエントリからこのタグを削除してもよろしいですか?",
|
||||
"Warning" => "警告",
|
||||
"Bookm." => "ブックマーク",
|
||||
"Add a bookmark" => "ブックマークを追加",
|
||||
"Close" => "閉じる",
|
||||
"The title of the page" => "ページのタイトル",
|
||||
"The address of the page" => "ページのアドレス",
|
||||
"Description of the page" => "ページの説明",
|
||||
"Save" => "保存",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Webページをすぐにブックマークしたい場合は、これをブラウザのブックマークにドラッグし、クリックしてください:",
|
||||
"Read later" => "後で確認",
|
||||
"Address" => "アドレス",
|
||||
"Title" => "タイトル",
|
||||
"Tags" => "タグ",
|
||||
"Save bookmark" => "ブックマークを保存",
|
||||
"Add bookmark" => "ブックマークを追加",
|
||||
"List" => "一覧",
|
||||
"Image" => "画像",
|
||||
"Hide" => "非表示",
|
||||
"Show" => "表示",
|
||||
"Related Tags" => "関連タグ",
|
||||
"You have no bookmarks" => "ブックマークがありません",
|
||||
"Bookmarklet <br />" => "ブックマークレット <br />"
|
||||
"Edit" => "編集",
|
||||
"Delete" => "削除",
|
||||
"Cancel" => "キャンセル",
|
||||
"Bookmarklet <br />" => "ブックマークレット <br />",
|
||||
"Import bookmarks" => "ブックマークをインポート",
|
||||
"Bookmark html file" => "ブックマークのHTMLファイル",
|
||||
"Import" => "インポート",
|
||||
"Export bookmarks" => "ブックマークをエクスポート",
|
||||
"Export" => "エクスポート"
|
||||
);
|
||||
|
33
l10n/ka_GE.php
Normal file
33
l10n/ka_GE.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "ბუქმარკები",
|
||||
"Tags" => "ტაგები",
|
||||
"Edit bookmark" => "ბუქმარკების რედაქტირება",
|
||||
"Are you sure you want to remove this tag from every entry?" => "დარწმუნებული ხართ რომ აღნიშნული ტაგის წაშლა გინდათ ყველა ჩანაწერიდა?",
|
||||
"Warning" => "გაფრთხილება",
|
||||
"Bookm." => "Bookm.",
|
||||
"Add a bookmark" => "ბუქმარქში დამატება",
|
||||
"Close" => "დახურვა",
|
||||
"The title of the page" => "გვერდის სათაური",
|
||||
"The address of the page" => "გვერდის მისამართი",
|
||||
"Description of the page" => "გვერდის დახასიათება",
|
||||
"Save" => "შენახვა",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "გადაათრიეთ ეს თქვენს ბუქმარკებში თუ გინდათ რომ საითი სწრაფად დაბუქმარკდეს",
|
||||
"Read later" => "წაიკითხე მოგვიანებით",
|
||||
"Edit" => "რედაქტირება",
|
||||
"Delete" => "წაშლა",
|
||||
"Cancel" => "უარყოფა",
|
||||
"Address" => "მისამართი",
|
||||
"Add bookmark" => "ბუქმარქის დამატება",
|
||||
"List" => "სია",
|
||||
"Image" => "სურათი",
|
||||
"Hide" => "დამალვა",
|
||||
"Show" => "გამოჩენა",
|
||||
"Related Tags" => "Related Tags",
|
||||
"You have no bookmarks" => "თქვენ არ გაქვთ ბუქმარკები",
|
||||
"Bookmarklet <br />" => "Bookmarklet <br />",
|
||||
"Import bookmarks" => "ბუქმარქების იმპორტი",
|
||||
"Bookmark html file" => "ბუქმარქ html ფაილი",
|
||||
"Import" => "იმპორტი",
|
||||
"Export bookmarks" => "ბუქმარქების ექსპორტი",
|
||||
"Export" => "ექსპორტი"
|
||||
);
|
10
l10n/ku_IQ.php
Normal file
10
l10n/ku_IQ.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "دڵخوازهکان",
|
||||
"Tags" => "تاگهکان",
|
||||
"Bookm." => "نیشانکردن",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "رابکێشه ئهمه بۆ دڵخوازهکان له وێبگهڕهکهت وه کرته بکه لێی، کاتێك دهتهوێت ماڵپهڕێك دڵخواز بکهی بهخێرای:",
|
||||
"Read later" => "دووای بیخوێنهوه",
|
||||
"Address" => "ناونیشان",
|
||||
"You have no bookmarks" => "تۆ دڵخوازت نیه",
|
||||
"Bookmarklet <br />" => "دڵخوازکرا <br />"
|
||||
);
|
@ -1,12 +1,9 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "Bokmerker",
|
||||
"unnamed" => "uten navn",
|
||||
"Tags" => "Etikett",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Dra denne over din nettlesers bokmerker og klikk den, hvis du ønsker å hurtig legge til bokmerke for en nettside",
|
||||
"Read later" => "Les senere",
|
||||
"Address" => "Adresse",
|
||||
"Title" => "Tittel",
|
||||
"Tags" => "Etikett",
|
||||
"Save bookmark" => "Lagre bokmerke",
|
||||
"You have no bookmarks" => "Du har ingen bokmerker",
|
||||
"Bookmarklet <br />" => "Bokmerke <br />"
|
||||
);
|
||||
|
36
l10n/nl.php
36
l10n/nl.php
@ -1,13 +1,33 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "Bladwijzers",
|
||||
"unnamed" => "geen naam",
|
||||
"Bookm." => "Bladw.",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Sleep dit naar uw browser bladwijzers en klik erop, wanneer u een webpagina snel wilt voorzien van een bladwijzer:",
|
||||
"Read later" => "Lees later",
|
||||
"Address" => "Adres",
|
||||
"Title" => "Titel",
|
||||
"Tags" => "Tags",
|
||||
"Save bookmark" => "Bewaar bladwijzer",
|
||||
"Edit bookmark" => "Bewerk bladwijzer",
|
||||
"Are you sure you want to remove this tag from every entry?" => "Bent u zeker dat u deze tag van elk item wilt verwijderen.",
|
||||
"Warning" => "Waarschuwing",
|
||||
"Bookm." => "Bladw.",
|
||||
"Add a bookmark" => "Voeg een bladwijzer toe",
|
||||
"Close" => "Sluit",
|
||||
"The title of the page" => "De pagina titel",
|
||||
"The address of the page" => "Het pagina adres",
|
||||
"Description of the page" => "Pagina beschrijving",
|
||||
"Save" => "Bewaar",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Sleep dit naar uw browser bladwijzer menu en klik erop, wanneer u een webpagina snel wilt voorzien van een bladwijzer:",
|
||||
"Read later" => "Lees later",
|
||||
"Edit" => "Bewerk",
|
||||
"Delete" => "Verwijder",
|
||||
"Cancel" => "Annuleer",
|
||||
"Address" => "Adres",
|
||||
"Add bookmark" => "Bladwijzer toevoegen",
|
||||
"List" => "Lijst",
|
||||
"Image" => "Afbeelding",
|
||||
"Hide" => "Verbergen",
|
||||
"Show" => "Tonen",
|
||||
"Related Tags" => "Aanverwante tags",
|
||||
"You have no bookmarks" => "U heeft geen bladwijzers",
|
||||
"Bookmarklet <br />" => "Bookmarklet <br />"
|
||||
"Bookmarklet <br />" => "Bookmarklet <br />",
|
||||
"Import bookmarks" => "Importeer bladwijzers",
|
||||
"Bookmark html file" => "Bladwijzer html bestand",
|
||||
"Import" => "Importeer",
|
||||
"Export bookmarks" => "Exporteer bladwijzers",
|
||||
"Export" => "Exporteer"
|
||||
);
|
||||
|
30
l10n/pl.php
30
l10n/pl.php
@ -1,13 +1,33 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "Zakładki",
|
||||
"unnamed" => "bez nazwy",
|
||||
"Tags" => "Tagi",
|
||||
"Edit bookmark" => "Edytuj zakładkę",
|
||||
"Are you sure you want to remove this tag from every entry?" => "Czy na pewno chcesz usunąć ten tag na każdym wejściu?",
|
||||
"Warning" => "Ostrzeżenie",
|
||||
"Bookm." => "Zakładka",
|
||||
"Add a bookmark" => "Dodaj zakładkę",
|
||||
"Close" => "Zamknij",
|
||||
"The title of the page" => "Tytuł strony",
|
||||
"The address of the page" => "Adres strony",
|
||||
"Description of the page" => "Opis strony",
|
||||
"Save" => "Zapisz",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Przeciągnij to do ulubionych przeglądarki i kliknij go, gdy użytkownik chce szybko dodać zakładkę strony sieci Web:",
|
||||
"Read later" => "Czytaj później",
|
||||
"Address" => "Adres",
|
||||
"Title" => "Tytuł",
|
||||
"Tags" => "Tagi",
|
||||
"Save bookmark" => "Zapisz zakładkę",
|
||||
"Add bookmark" => "Dodaj zakładkę",
|
||||
"List" => "Lista",
|
||||
"Image" => "Obraz",
|
||||
"Hide" => "Schowaj",
|
||||
"Show" => "Pokaż",
|
||||
"Related Tags" => "Powiązane Tagi",
|
||||
"You have no bookmarks" => "Nie masz żadnych zakładek",
|
||||
"Bookmarklet <br />" => "Skryptozakładka <br />"
|
||||
"Edit" => "Edytuj",
|
||||
"Delete" => "Usuń",
|
||||
"Cancel" => "Anuluj",
|
||||
"Bookmarklet <br />" => "Skryptozakładka <br />",
|
||||
"Import bookmarks" => "Importuj zakładki",
|
||||
"Bookmark html file" => "Plik HTML zakładek",
|
||||
"Import" => "Import",
|
||||
"Export bookmarks" => "Eksportuj zakładki",
|
||||
"Export" => "Export"
|
||||
);
|
||||
|
33
l10n/pt_BR.php
Normal file
33
l10n/pt_BR.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "Marcadores",
|
||||
"Tags" => "Tags",
|
||||
"Edit bookmark" => "Editar bookmark",
|
||||
"Are you sure you want to remove this tag from every entry?" => "Tem certeza que deseja remover esta tag de todas as entradas?",
|
||||
"Warning" => "Aviso",
|
||||
"Bookm." => "Marc.",
|
||||
"Add a bookmark" => "Adicionar um bookmark",
|
||||
"Close" => "Fechar",
|
||||
"The title of the page" => "O título da página",
|
||||
"The address of the page" => "O endereço da página",
|
||||
"Description of the page" => "Descrição da página",
|
||||
"Save" => "Salvar",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Arraste isso para os favoritos do seu navegador web e clique nele quando você quiser marcar/favoritar uma página rapidamente:",
|
||||
"Read later" => "Ler depois",
|
||||
"Address" => "Endereço",
|
||||
"Add bookmark" => "Adicionar bookmark",
|
||||
"List" => "Listar",
|
||||
"Image" => "Imagem",
|
||||
"Hide" => "Ocultar",
|
||||
"Show" => "Exibir",
|
||||
"Related Tags" => "Tags relacionadas",
|
||||
"You have no bookmarks" => "Você não tem marcadores",
|
||||
"Edit" => "Editar",
|
||||
"Delete" => "Excluir",
|
||||
"Cancel" => "Cancelar",
|
||||
"Bookmarklet <br />" => "Bookmarklet <br />",
|
||||
"Import bookmarks" => "Importar bookmarks",
|
||||
"Bookmark html file" => "Arquivo HTML de bookmark",
|
||||
"Import" => "Importar",
|
||||
"Export bookmarks" => "Exportar bookmarks",
|
||||
"Export" => "Exportar"
|
||||
);
|
33
l10n/pt_PT.php
Normal file
33
l10n/pt_PT.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "Marcadores",
|
||||
"Tags" => "Etiquetas",
|
||||
"Edit bookmark" => "Editar marcador",
|
||||
"Are you sure you want to remove this tag from every entry?" => "Tem a certeza de que quer remover esta etiqueta de cada registo?",
|
||||
"Warning" => "Aviso",
|
||||
"Bookm." => "Marc.",
|
||||
"Add a bookmark" => "Acrescentar um marcador",
|
||||
"Close" => "Fechar",
|
||||
"The title of the page" => "O titulo da página",
|
||||
"The address of the page" => "O endereço da página",
|
||||
"Description of the page" => "Descrição da página",
|
||||
"Save" => "Guardar",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Arraste isto para o seu navegador, e click nele quando quiser guardar a página rapidamente com um marcador.",
|
||||
"Read later" => "Ler mais tarde",
|
||||
"Address" => "Endereço",
|
||||
"Add bookmark" => "Acrescentar marcador",
|
||||
"List" => "Lista",
|
||||
"Image" => "Imagem",
|
||||
"Hide" => "Esconder",
|
||||
"Show" => "Mostrar",
|
||||
"Related Tags" => "Etiquetas relacionadas",
|
||||
"You have no bookmarks" => "Não tem marcadores",
|
||||
"Edit" => "Editar",
|
||||
"Delete" => "Apagar",
|
||||
"Cancel" => "Cancelar",
|
||||
"Bookmarklet <br />" => "Marcador",
|
||||
"Import bookmarks" => "Importar marcadores",
|
||||
"Bookmark html file" => "Ficheiro html de marcadores",
|
||||
"Import" => "Importar",
|
||||
"Export bookmarks" => "Exportar marcadores",
|
||||
"Export" => "Exportar"
|
||||
);
|
10
l10n/ro.php
Normal file
10
l10n/ro.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "Semne de carte",
|
||||
"Tags" => "Cuvinte cheie",
|
||||
"Bookm." => "Bookm.",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Trage acest semn în semnele de carte din navigatorul tău web când dorești să salvezi rapid un semn către o pagină web:",
|
||||
"Read later" => "Citește mai târziu",
|
||||
"Address" => "Adresă",
|
||||
"You have no bookmarks" => "Nu ai nici un semn de carte",
|
||||
"Bookmarklet <br />" => "Bookmarklet <br />"
|
||||
);
|
30
l10n/ru.php
30
l10n/ru.php
@ -1,13 +1,33 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "Закладки",
|
||||
"unnamed" => "без имени",
|
||||
"Tags" => "Метки",
|
||||
"Edit bookmark" => "Редактировать закладку",
|
||||
"Are you sure you want to remove this tag from every entry?" => "Вы уверены, что хотите удалить этот тег из каждой записи?",
|
||||
"Warning" => "Предупреждение",
|
||||
"Bookm." => "Закл.",
|
||||
"Add a bookmark" => "Добавить закладку",
|
||||
"Close" => "Закрыть",
|
||||
"The title of the page" => "Заголовок страницы",
|
||||
"The address of the page" => "Адрес страницы",
|
||||
"Description of the page" => "Описание страницы",
|
||||
"Save" => "Сохранить",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Перетащите эту кнопку в закладки вашего браузера и нажимайте на неё для быстрого добавления страницы в закладки:",
|
||||
"Read later" => "Прочитать позже",
|
||||
"Edit" => "Редактировать",
|
||||
"Delete" => "Удалить",
|
||||
"Cancel" => "Отменить",
|
||||
"Address" => "Адрес",
|
||||
"Title" => "Заголовок",
|
||||
"Tags" => "Метки",
|
||||
"Save bookmark" => "Сохранить закладки",
|
||||
"Add bookmark" => "Добавить закладку",
|
||||
"List" => "Список",
|
||||
"Image" => "Изображение",
|
||||
"Hide" => "Спрятать",
|
||||
"Show" => "Показать",
|
||||
"Related Tags" => "Связанные теги",
|
||||
"You have no bookmarks" => "У вас нет закладок",
|
||||
"Bookmarklet <br />" => "Быстрые закладки<br />"
|
||||
"Bookmarklet <br />" => "Быстрые закладки<br />",
|
||||
"Import bookmarks" => "Импортировать закладки",
|
||||
"Bookmark html file" => "Добавить html-файл в закладки",
|
||||
"Import" => "Импорт",
|
||||
"Export bookmarks" => "Экспортировать закладки",
|
||||
"Export" => "Экспорт"
|
||||
);
|
||||
|
33
l10n/ru_RU.php
Normal file
33
l10n/ru_RU.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "Закладки",
|
||||
"Tags" => "Теги",
|
||||
"Edit bookmark" => "Редактировать закладку",
|
||||
"Are you sure you want to remove this tag from every entry?" => "Вы уверены, что хотите удалить этот тег из каждой записи?",
|
||||
"Warning" => "Предупреждение",
|
||||
"Bookm." => "Bookm.",
|
||||
"Add a bookmark" => "Добавить закладку",
|
||||
"Close" => "Закрыть",
|
||||
"The title of the page" => "Заголовок страницы",
|
||||
"The address of the page" => "Адрес страницы",
|
||||
"Description of the page" => "Описание страницы",
|
||||
"Save" => "Сохранить",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Перетащите это в закладки Вашего браузера и кликните на него, когда захотите быстро добавить страницу в закладки:",
|
||||
"Read later" => "Прочитать позже",
|
||||
"Address" => "Адрес",
|
||||
"Add bookmark" => "Добавить закладку",
|
||||
"List" => "Список",
|
||||
"Image" => "Изображение",
|
||||
"Hide" => "Скрыть",
|
||||
"Show" => "Показать",
|
||||
"Related Tags" => "Связанные теги",
|
||||
"You have no bookmarks" => "У Вас нет закладок",
|
||||
"Edit" => "Редактировать",
|
||||
"Delete" => "Удалить",
|
||||
"Cancel" => "Отмена",
|
||||
"Bookmarklet <br />" => "Bookmarklet <br />",
|
||||
"Import bookmarks" => "Импорт закладок",
|
||||
"Bookmark html file" => "Добавить html-файл в закладки ",
|
||||
"Import" => "Импортировать",
|
||||
"Export bookmarks" => "Экспорт закладок",
|
||||
"Export" => "Экспортировать"
|
||||
);
|
33
l10n/si_LK.php
Normal file
33
l10n/si_LK.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "පිටු සළකුනු",
|
||||
"Tags" => "ටැග",
|
||||
"Edit bookmark" => "පිටු සළකුනු සකසන්න",
|
||||
"Are you sure you want to remove this tag from every entry?" => "මෙම ටැගය සියළු ඇතුලත් කිරීමකින් ඉවත් කරන බව ඔබට සහතිකද",
|
||||
"Warning" => "අනතුරු ඇඟවිම",
|
||||
"Bookm." => "පිටුසන",
|
||||
"Add a bookmark" => "පිටු සළකුනක් එක් කරන්න",
|
||||
"Close" => "වසන්න",
|
||||
"The title of the page" => "පිටුවේ මාතෘකාව",
|
||||
"The address of the page" => "පිටුවේ ලිපිනය",
|
||||
"Description of the page" => "පිටුවේ විස්තර",
|
||||
"Save" => "සුරකින්න",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "මෙම වෙබ් පිටුව ඉක්මනින් පිටු සළකුනක් ලෙස සටහන් කිරීමට, එය බ්රවුසරයේ පිටු සළකුනු මතට ඇද ක්ලික් කරන්න:",
|
||||
"Read later" => "පසුව කියවීමට",
|
||||
"Edit" => "සකසන්න",
|
||||
"Delete" => "මකන්න",
|
||||
"Cancel" => "එපා",
|
||||
"Address" => "ලිපිනය",
|
||||
"Add bookmark" => "පිටුසන එකතුකරන්න",
|
||||
"List" => "ලයිස්තුව",
|
||||
"Image" => "පින්තූරය",
|
||||
"Hide" => "සඟවන්න",
|
||||
"Show" => "පෙන්වන්න",
|
||||
"Related Tags" => "අදාළ ටැගයන්",
|
||||
"You have no bookmarks" => "පිටු සළකුනු නොමැත",
|
||||
"Bookmarklet <br />" => "පිටුසන<br />",
|
||||
"Import bookmarks" => "පිටුසනයන් ආයාත කරන්න",
|
||||
"Bookmark html file" => "html ගොනුව පිටුසන් කරන්න",
|
||||
"Import" => "ආයාත කරන්න",
|
||||
"Export bookmarks" => "පිටුසනයන් නිර්යාත කරන්න",
|
||||
"Export" => "නිර්යාත කරන්න"
|
||||
);
|
33
l10n/sk_SK.php
Normal file
33
l10n/sk_SK.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "Záložky",
|
||||
"Tags" => "Značky",
|
||||
"Edit bookmark" => "Upraviť záložku",
|
||||
"Are you sure you want to remove this tag from every entry?" => "Naozaj ste si istý, že chcete odstrániť túto značku z každého záznamu?",
|
||||
"Warning" => "Varovanie",
|
||||
"Bookm." => "Zál.",
|
||||
"Add a bookmark" => "Pridať záložku",
|
||||
"Close" => "Zavrieť",
|
||||
"The title of the page" => "Názov stránky",
|
||||
"The address of the page" => "Adresa stránky",
|
||||
"Description of the page" => "Popis stránky",
|
||||
"Save" => "Uložiť",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Presuňte toto do vášho prehliadača a kliknite ak chcete aktuálnu stránku uložiť do záložiek.",
|
||||
"Read later" => "Prečítať neskôr",
|
||||
"Edit" => "Upraviť",
|
||||
"Delete" => "Zmazať",
|
||||
"Cancel" => "Zrušiť",
|
||||
"Address" => "Adresa",
|
||||
"Add bookmark" => "Pridať záložku",
|
||||
"List" => "Zoznam",
|
||||
"Image" => "Obrázok",
|
||||
"Hide" => "Skyť",
|
||||
"Show" => "Zobraziť",
|
||||
"Related Tags" => "Podobné značky",
|
||||
"You have no bookmarks" => "Nemáte záložky",
|
||||
"Bookmarklet <br />" => "Záložky <br />",
|
||||
"Import bookmarks" => "Importovať záložky",
|
||||
"Bookmark html file" => "Html súbor záložiek",
|
||||
"Import" => "Import",
|
||||
"Export bookmarks" => "Export záložiek",
|
||||
"Export" => "Export"
|
||||
);
|
30
l10n/sl.php
30
l10n/sl.php
@ -1,13 +1,33 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "Zaznamki",
|
||||
"unnamed" => "neimenovano",
|
||||
"Tags" => "Oznake",
|
||||
"Edit bookmark" => "Uredi zaznamke",
|
||||
"Are you sure you want to remove this tag from every entry?" => "Ali res želite odstraniti te oznake iz vsakega vnosa?",
|
||||
"Warning" => "Opozorilo",
|
||||
"Bookm." => "Zaznam.",
|
||||
"Add a bookmark" => "Dodaj zaznamek",
|
||||
"Close" => "Zapri",
|
||||
"The title of the page" => "Naziv strani",
|
||||
"The address of the page" => "Naslov strani",
|
||||
"Description of the page" => "Opis strani",
|
||||
"Save" => "Shrani",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Povlecite gumb med svoje zaznamke in kliknite nanj, ko želite obiskano spletno stran hitro dodati med svoje zaznamke:",
|
||||
"Read later" => "Preberi kasneje",
|
||||
"Edit" => "Uredi",
|
||||
"Delete" => "Izbriši",
|
||||
"Cancel" => "Prekliči",
|
||||
"Address" => "Naslov",
|
||||
"Title" => "Ime",
|
||||
"Tags" => "Oznake",
|
||||
"Save bookmark" => "Shrani zaznamek",
|
||||
"Add bookmark" => "Dodaj zaznamek",
|
||||
"List" => "znam",
|
||||
"Image" => "Slika",
|
||||
"Hide" => "Skrij",
|
||||
"Show" => "Pokaži",
|
||||
"Related Tags" => "Sorodne oznake",
|
||||
"You have no bookmarks" => "Nimate zaznamkov",
|
||||
"Bookmarklet <br />" => "Vstavek za zaznamke <br />"
|
||||
"Bookmarklet <br />" => "Vstavek za zaznamke <br />",
|
||||
"Import bookmarks" => "Uvozi zaznamke",
|
||||
"Bookmark html file" => "Datoteka zaznamkov HTML",
|
||||
"Import" => "Uvozi",
|
||||
"Export bookmarks" => "Izvozi zaznamke",
|
||||
"Export" => "Izvozi"
|
||||
);
|
||||
|
30
l10n/sv.php
30
l10n/sv.php
@ -1,13 +1,33 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "Bokmärken",
|
||||
"unnamed" => "namnlös",
|
||||
"Tags" => "Taggar",
|
||||
"Edit bookmark" => "Redigera bokmärke",
|
||||
"Are you sure you want to remove this tag from every entry?" => "Är du säker på att du vill ta bort denna tagg från varje post?",
|
||||
"Warning" => "Varning",
|
||||
"Bookm." => "Bokm.",
|
||||
"Add a bookmark" => "Lägg till ett bokmärke",
|
||||
"Close" => "Stäng",
|
||||
"The title of the page" => "Titel på sidan",
|
||||
"The address of the page" => "Adress till sidan",
|
||||
"Description of the page" => "Beskrivning av sidan",
|
||||
"Save" => "Spara",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Dra till din webbläsares bokmärken och klicka på det när du vill bokmärka en webbsida snabbt:",
|
||||
"Read later" => "Läs senare",
|
||||
"Address" => "Adress",
|
||||
"Title" => "Titel",
|
||||
"Tags" => "Taggar",
|
||||
"Save bookmark" => "Spara bokmärke",
|
||||
"Add bookmark" => "Lägg till bokmärke",
|
||||
"List" => "Lista",
|
||||
"Image" => "Bild",
|
||||
"Hide" => "Göm",
|
||||
"Show" => "Visa",
|
||||
"Related Tags" => "Relaterade taggar",
|
||||
"You have no bookmarks" => "Du har inga bokmärken",
|
||||
"Bookmarklet <br />" => "Skriptbokmärke <br />"
|
||||
"Edit" => "Redigera",
|
||||
"Delete" => "Radera",
|
||||
"Cancel" => "Avbryt",
|
||||
"Bookmarklet <br />" => "Skriptbokmärke <br />",
|
||||
"Import bookmarks" => "Importera bokmärken",
|
||||
"Bookmark html file" => "Bokmärkets html-fil",
|
||||
"Import" => "Importera",
|
||||
"Export bookmarks" => "Exportera bokmärken",
|
||||
"Export" => "Exportera"
|
||||
);
|
||||
|
@ -1,13 +1,33 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "รายการโปรด",
|
||||
"unnamed" => "ยังไม่มีชื่อ",
|
||||
"Tags" => "ป้ายกำกับ",
|
||||
"Edit bookmark" => "แก้ไขรายการโปรด",
|
||||
"Are you sure you want to remove this tag from every entry?" => "คุณแน่ใจแล้วหรือว่าต้องการลบป้ายกำกับนี้ออกจากทุกๆรายการ",
|
||||
"Warning" => "คำเตือน",
|
||||
"Bookm." => "รายการโปรด",
|
||||
"Add a bookmark" => "เพิ่มรายการโปรด",
|
||||
"Close" => "ปิด",
|
||||
"The title of the page" => "ชื่อของหน้า",
|
||||
"The address of the page" => "ที่อยู่ของหน้า",
|
||||
"Description of the page" => "คำอธิบายเกี่ยวกับหน้า",
|
||||
"Save" => "บันทึก",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "ลากสิ่งนี้ไปไว้ที่รายการโปรดในโปรแกรมบราวเซอร์ของคุณ แล้วคลิกที่นั่น, เมื่อคุณต้องการเก็บหน้าเว็บเพจเข้าไปไว้ในรายการโปรดอย่างรวดเร็ว",
|
||||
"Read later" => "อ่านภายหลัง",
|
||||
"Address" => "ที่อยู่",
|
||||
"Title" => "ชื่อ",
|
||||
"Tags" => "ป้ายกำกับ",
|
||||
"Save bookmark" => "บันทึกรายการโปรด",
|
||||
"Add bookmark" => "เพิ่มรายการโปรด",
|
||||
"List" => "รายการ",
|
||||
"Image" => "รูปภาพ",
|
||||
"Hide" => "ซ๋อน",
|
||||
"Show" => "แสดง",
|
||||
"Related Tags" => "ป้ายกำกับอื่นๆที่เกี่ยวข้อง",
|
||||
"You have no bookmarks" => "คุณยังไม่มีรายการโปรด",
|
||||
"Bookmarklet <br />" => "Bookmarklet <br />"
|
||||
"Edit" => "แก้ไข",
|
||||
"Delete" => "ลบ",
|
||||
"Cancel" => "ยกเลิก",
|
||||
"Bookmarklet <br />" => "Bookmarklet <br />",
|
||||
"Import bookmarks" => "นำเข้ารายการโปรด",
|
||||
"Bookmark html file" => "ไฟล์รายการโปรดในรูปแบบ html",
|
||||
"Import" => "นำเข้า",
|
||||
"Export bookmarks" => "ส่งออกรายการโปรด",
|
||||
"Export" => "ส่งออก"
|
||||
);
|
||||
|
13
l10n/tr.php
Normal file
13
l10n/tr.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Tags" => "Etiketler",
|
||||
"Close" => "Kapat",
|
||||
"Save" => "Kaydet",
|
||||
"Read later" => "Sonra oku",
|
||||
"Edit" => "Düzenle",
|
||||
"Delete" => "Sil",
|
||||
"Cancel" => "İptal",
|
||||
"Address" => "Adres",
|
||||
"List" => "Liste",
|
||||
"Hide" => "Gizle",
|
||||
"Show" => "Göster"
|
||||
);
|
@ -1,9 +1,7 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "Закладки",
|
||||
"Tags" => "Теги",
|
||||
"Read later" => "Прочитати пізніше",
|
||||
"Address" => "Адреса",
|
||||
"Title" => "Назва",
|
||||
"Tags" => "Теги",
|
||||
"Save bookmark" => "Зберегти закладку",
|
||||
"You have no bookmarks" => "У вас нема закладок"
|
||||
);
|
||||
|
@ -1,12 +1,9 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "Đánh dấu",
|
||||
"unnamed" => "Không tên",
|
||||
"Tags" => "Tags",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "Kéo vào bookmark trình duyệt của bạn và nhấp vào nó, khi bạn muốn đánh dấu một trang web một cách nhanh chóng:",
|
||||
"Read later" => "Đọc sau",
|
||||
"Address" => "Địa chỉ",
|
||||
"Title" => "Tiêu đề",
|
||||
"Tags" => "Tags",
|
||||
"Save bookmark" => "Lưu đánh dấu",
|
||||
"You have no bookmarks" => "Bạn chưa có đánh dấu nào",
|
||||
"Bookmarklet <br />" => "Bookmarklet <br />"
|
||||
);
|
||||
|
33
l10n/zh_CN.GB2312.php
Normal file
33
l10n/zh_CN.GB2312.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "书签",
|
||||
"Tags" => "标签",
|
||||
"Edit bookmark" => "编辑书签",
|
||||
"Are you sure you want to remove this tag from every entry?" => "您确定要从所有条目中移除此标签吗?",
|
||||
"Warning" => "警告",
|
||||
"Bookm." => "订阅它们。",
|
||||
"Add a bookmark" => "添加书签",
|
||||
"Close" => "关闭",
|
||||
"The title of the page" => "页面标题",
|
||||
"The address of the page" => "页面地址",
|
||||
"Description of the page" => "页面描述",
|
||||
"Save" => "保存",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "拖动此物到您的浏览器书签栏,在您想要快速订阅某网页时点击:",
|
||||
"Read later" => "稍后阅读",
|
||||
"Address" => "网址",
|
||||
"Add bookmark" => "添加书签",
|
||||
"List" => "列表",
|
||||
"Image" => "图片",
|
||||
"Hide" => "隐藏",
|
||||
"Show" => "显示",
|
||||
"Related Tags" => "相关标签",
|
||||
"You have no bookmarks" => "您没有书签",
|
||||
"Edit" => "编辑",
|
||||
"Delete" => "删除",
|
||||
"Cancel" => "取消",
|
||||
"Bookmarklet <br />" => "小书签 <br />",
|
||||
"Import bookmarks" => "导入书签",
|
||||
"Bookmark html file" => "书签 html 文件",
|
||||
"Import" => "导入",
|
||||
"Export bookmarks" => "导出书签",
|
||||
"Export" => "导出"
|
||||
);
|
@ -1,12 +1,33 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "书签",
|
||||
"unnamed" => "未命名",
|
||||
"Tags" => "标签",
|
||||
"Edit bookmark" => "编辑书签",
|
||||
"Are you sure you want to remove this tag from every entry?" => "确定要从所有条目中移除此标签?",
|
||||
"Warning" => "警告",
|
||||
"Bookm." => "书签",
|
||||
"Add a bookmark" => "新增一个书签",
|
||||
"Close" => "关闭",
|
||||
"The title of the page" => "页面名称",
|
||||
"The address of the page" => "页面地址",
|
||||
"Description of the page" => "页面描述",
|
||||
"Save" => "保存",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "拖曳此处到您的浏览器书签处,点击可以将网页快速添加到书签中。",
|
||||
"Read later" => "稍后阅读",
|
||||
"Edit" => "编辑",
|
||||
"Delete" => "删除",
|
||||
"Cancel" => "取消",
|
||||
"Address" => "地址",
|
||||
"Title" => "标题",
|
||||
"Tags" => "标签",
|
||||
"Save bookmark" => "保存书签",
|
||||
"Add bookmark" => "新增书签",
|
||||
"List" => "列表",
|
||||
"Image" => "图像",
|
||||
"Hide" => "隐藏",
|
||||
"Show" => "显示",
|
||||
"Related Tags" => "相关标签",
|
||||
"You have no bookmarks" => "您暂无书签",
|
||||
"Bookmarklet <br />" => "书签应用"
|
||||
"Bookmarklet <br />" => "书签应用",
|
||||
"Import bookmarks" => "导入书签",
|
||||
"Bookmark html file" => "书签HTML文件",
|
||||
"Import" => "导入",
|
||||
"Export bookmarks" => "导出书签",
|
||||
"Export" => "导出"
|
||||
);
|
||||
|
@ -1,12 +1,9 @@
|
||||
<?php $TRANSLATIONS = array(
|
||||
"Bookmarks" => "書籤",
|
||||
"unnamed" => "未命名",
|
||||
"Tags" => "標籤",
|
||||
"Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:" => "將此拖曳至您的瀏覽器書籤並點擊, 當你想要將網頁快速地加入書籤:",
|
||||
"Read later" => "稍後閱讀",
|
||||
"Address" => "網址",
|
||||
"Title" => "標題",
|
||||
"Tags" => "標籤",
|
||||
"Save bookmark" => "儲存書籤",
|
||||
"You have no bookmarks" => "你沒有書籤",
|
||||
"Bookmarklet <br />" => "書籤小工具"
|
||||
);
|
||||
|
@ -25,91 +25,85 @@
|
||||
*/
|
||||
class OC_Bookmarks_Bookmarks{
|
||||
|
||||
/**
|
||||
* @brief Finds all tags for bookmarks
|
||||
* @param filterTags array of tag to look for if empty then every tag
|
||||
* @param offset result offset
|
||||
* @param limit number of item to return
|
||||
*/
|
||||
public static function findTags($filterTags = array(), $offset = 0, $limit = 10){
|
||||
$params = array_merge($filterTags, $filterTags);
|
||||
array_unshift($params, OCP\USER::getUser());
|
||||
$not_in = '';
|
||||
if(!empty($filterTags) ) {
|
||||
$exist_clause = " AND exists (select 1 from *PREFIX*bookmarks_tags
|
||||
t2 where t2.bookmark_id = t.bookmark_id and tag = ?) ";
|
||||
|
||||
$not_in = ' AND tag not in ('. implode(',', array_fill(0, count($filterTags), '?') ) .')'.
|
||||
str_repeat($exist_clause, count($filterTags));
|
||||
}
|
||||
$sql = 'SELECT tag, count(*) as nbr from *PREFIX*bookmarks_tags t '.
|
||||
' WHERE EXISTS( SELECT 1 from *PREFIX*bookmarks bm where t.bookmark_id = bm.id and user_id = ?) '.
|
||||
$not_in.
|
||||
' group by tag Order by nbr DESC ';
|
||||
|
||||
$query = OCP\DB::prepare($sql, $limit, $offset);
|
||||
$tags = $query->execute($params)->fetchAll();
|
||||
return $tags;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Finds all bookmarks, matching the filter
|
||||
* @param offset result offset
|
||||
* @param sqlSortColumn sort result with this column
|
||||
* @param filter can be: empty -> no filter, a string -> filter this, a string array -> filter for all strings
|
||||
* @param filterTagOnly if true, filter affacts only tags, else filter affects url, title and tags
|
||||
* @param filters can be: empty -> no filter, a string -> filter this, a string array -> filter for all strings
|
||||
* @param filterTagOnly if true, filter affects only tags, else filter affects url, title and tags
|
||||
* @param limit number of item to return (default 10) if -1 or false then all item are returned
|
||||
* @return void
|
||||
*/
|
||||
public static function findBookmarks($offset, $sqlSortColumn, $filter, $filterTagOnly) {
|
||||
//OCP\Util::writeLog('bookmarks', 'findBookmarks ' .$offset. ' '.$sqlSortColumn.' '. $filter.' '. $filterTagOnly ,OCP\Util::DEBUG);
|
||||
public static function findBookmarks($offset, $sqlSortColumn, $filters, $filterTagOnly, $limit = 10) {
|
||||
$CONFIG_DBTYPE = OCP\Config::getSystemValue( 'dbtype', 'sqlite' );
|
||||
|
||||
if(is_string($filters)) $filters = array($filters);
|
||||
|
||||
$params=array(OCP\USER::getUser());
|
||||
|
||||
if( $CONFIG_DBTYPE == 'sqlite' or $CONFIG_DBTYPE == 'sqlite3' ) {
|
||||
$_gc_separator = ', \' \'';
|
||||
} else {
|
||||
$_gc_separator = 'SEPARATOR \' \'';
|
||||
|
||||
if($CONFIG_DBTYPE == 'pgsql') {
|
||||
$group_fct = 'array_agg(tag)';
|
||||
}
|
||||
else {
|
||||
$group_fct = 'GROUP_CONCAT(tag)';
|
||||
}
|
||||
$sql = "SELECT *, (select $group_fct from *PREFIX*bookmarks_tags where bookmark_id = b.id) as tags
|
||||
FROM *PREFIX*bookmarks b
|
||||
WHERE user_id = ? ";
|
||||
|
||||
if($filter) {
|
||||
if($CONFIG_DBTYPE == 'pgsql' )
|
||||
$tagString = 'array_to_string(array_agg(tag), \' \')';
|
||||
else
|
||||
$tagString = 'tags';
|
||||
|
||||
$sqlFilterTag = 'HAVING ';
|
||||
if(is_array($filter)) {
|
||||
$first = true;
|
||||
$filterstring = '';
|
||||
foreach ($filter as $singleFilter) {
|
||||
$filterstring = $filterstring . ($first?'':' AND ') . $tagString.' LIKE ? ';
|
||||
$params[] = '%'.$singleFilter.'%';
|
||||
$first=false;
|
||||
}
|
||||
$sqlFilterTag = $sqlFilterTag . $filterstring;
|
||||
} else{
|
||||
$sqlFilterTag = $sqlFilterTag .$tagString.' LIKE ? ';
|
||||
$params[] = '%'.$filter.'%';
|
||||
if($filterTagOnly) {
|
||||
$exist_clause = " AND exists (select id from *PREFIX*bookmarks_tags
|
||||
t2 where t2.bookmark_id = b.id and tag = ?) ";
|
||||
$sql .= str_repeat($exist_clause, count($filters));
|
||||
$params = array_merge($params, $filters);
|
||||
} else {
|
||||
if($CONFIG_DBTYPE == 'mysql') { //Dirty hack to allow usage of alias in where
|
||||
$sql .= ' having true ';
|
||||
}
|
||||
} else {
|
||||
$sqlFilterTag = '';
|
||||
foreach($filters as $filter) {
|
||||
$sql .= ' AND lower(url || title || description || tags ) like ? ';
|
||||
$params[] = '%' . strtolower($filter) . '%';
|
||||
}
|
||||
}
|
||||
$sql .= " ORDER BY ".$sqlSortColumn." DESC ";
|
||||
if($limit == -1 || $limit === false) {
|
||||
$limit = null;
|
||||
$offset = null;
|
||||
}
|
||||
|
||||
if($CONFIG_DBTYPE == 'pgsql' ) {
|
||||
$query = OCP\DB::prepare('
|
||||
SELECT `id`, `url`, `title`, '.($filterTagOnly?'':'`url` || `title` ||').' array_to_string(array_agg(`tag`), \' \') as `tags`
|
||||
FROM `*PREFIX*bookmarks`
|
||||
LEFT JOIN `*PREFIX*bookmarks_tags` ON `*PREFIX*bookmarks`.`id` = `*PREFIX*bookmarks_tags`.`bookmark_id`
|
||||
WHERE
|
||||
`*PREFIX*bookmarks`.`user_id` = ?
|
||||
GROUP BY `id`, `url`, `title`
|
||||
'.$sqlFilterTag.'
|
||||
ORDER BY `*PREFIX*bookmarks`.`'.$sqlSortColumn.'` DESC',
|
||||
10,$offset);
|
||||
} else {
|
||||
if( $CONFIG_DBTYPE == 'sqlite' or $CONFIG_DBTYPE == 'sqlite3' )
|
||||
$concatFunction = '(url || title || ';
|
||||
else
|
||||
$concatFunction = 'Concat(Concat( url, title), ';
|
||||
|
||||
$query = OCP\DB::prepare('
|
||||
SELECT `id`, `url`, `title`, '
|
||||
.($filterTagOnly?'':$concatFunction).
|
||||
'CASE WHEN `*PREFIX*bookmarks`.`id` = `*PREFIX*bookmarks_tags`.`bookmark_id`
|
||||
THEN GROUP_CONCAT( `tag` ' .$_gc_separator. ' )
|
||||
ELSE \' \'
|
||||
END '
|
||||
.($filterTagOnly?'':')').'
|
||||
AS `tags`
|
||||
FROM `*PREFIX*bookmarks`
|
||||
LEFT JOIN `*PREFIX*bookmarks_tags` ON 1=1
|
||||
WHERE (`*PREFIX*bookmarks`.`id` = `*PREFIX*bookmarks_tags`.`bookmark_id`
|
||||
OR `*PREFIX*bookmarks`.`id` NOT IN (
|
||||
SELECT `*PREFIX*bookmarks_tags`.`bookmark_id` FROM `*PREFIX*bookmarks_tags`
|
||||
)
|
||||
)
|
||||
AND `*PREFIX*bookmarks`.`user_id` = ?
|
||||
GROUP BY `url`
|
||||
'.$sqlFilterTag.'
|
||||
ORDER BY `*PREFIX*bookmarks`.`'.$sqlSortColumn.'` DESC',
|
||||
10, $offset);
|
||||
$query = OCP\DB::prepare($sql, $limit, $offset);
|
||||
$results = $query->execute($params)->fetchAll();
|
||||
$bookmarks = array();
|
||||
foreach($results as $result){
|
||||
$result['tags'] = explode(',', $result['tags']);
|
||||
$bookmarks[] = $result;
|
||||
}
|
||||
|
||||
$bookmarks = $query->execute($params)->fetchAll();
|
||||
return $bookmarks;
|
||||
}
|
||||
|
||||
@ -144,4 +138,241 @@ class OC_Bookmarks_Bookmarks{
|
||||
$result = $query->execute();
|
||||
return true;
|
||||
}
|
||||
|
||||
public static function renameTag($old, $new)
|
||||
{
|
||||
$user_id = OCP\USER::getUser();
|
||||
$CONFIG_DBTYPE = OCP\Config::getSystemValue( 'dbtype', 'sqlite' );
|
||||
|
||||
|
||||
if( $CONFIG_DBTYPE == 'sqlite' or $CONFIG_DBTYPE == 'sqlite3' ) {
|
||||
// Update tags to the new label unless it already exists a tag like this
|
||||
$query = OCP\DB::prepare("
|
||||
UPDATE OR REPLACE *PREFIX*bookmarks_tags
|
||||
SET tag = ?
|
||||
WHERE tag = ?
|
||||
AND exists( select b.id from *PREFIX*bookmarks b where b.user_id = ? and bookmark_id = b.id)
|
||||
");
|
||||
|
||||
$params=array(
|
||||
$new,
|
||||
$old,
|
||||
$user_id,
|
||||
);
|
||||
|
||||
$result = $query->execute($params);
|
||||
} else {
|
||||
|
||||
// Remove potentialy duplicated tags
|
||||
$query = OCP\DB::prepare("
|
||||
DELETE FROM *PREFIX*bookmarks_tags as tgs where tgs.tag = ?
|
||||
AND exists( select id from *PREFIX*bookmarks where user_id = ? and tgs.bookmark_id = id)
|
||||
AND exists( select t.tag from *PREFIX*bookmarks_tags t where t.tag=? and tgs.bookmark_id = tbookmark_id");
|
||||
|
||||
$params=array(
|
||||
$new,
|
||||
$user_id,
|
||||
);
|
||||
|
||||
$result = $query->execute($params);
|
||||
|
||||
|
||||
// Update tags to the new label unless it already exists a tag like this
|
||||
$query = OCP\DB::prepare("
|
||||
UPDATE *PREFIX*bookmarks_tags
|
||||
SET tag = ?
|
||||
WHERE tag = ?
|
||||
AND exists( select b.id from *PREFIX*bookmarks b where b.user_id = ? and bookmark_id = b.id)
|
||||
");
|
||||
|
||||
$params=array(
|
||||
$new,
|
||||
$old,
|
||||
$user_id,
|
||||
$old,
|
||||
);
|
||||
|
||||
$result = $query->execute($params);
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static function deleteTag($old)
|
||||
{
|
||||
$user_id = OCP\USER::getUser();
|
||||
|
||||
// Update the record
|
||||
$query = OCP\DB::prepare("
|
||||
DELETE FROM *PREFIX*bookmarks_tags
|
||||
WHERE tag = ?
|
||||
AND exists( select id from *PREFIX*bookmarks where user_id = ? and bookmark_id = id)
|
||||
");
|
||||
|
||||
$params=array(
|
||||
$old,
|
||||
$user_id,
|
||||
);
|
||||
|
||||
$result = $query->execute($params);
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* get a string corresponding to the current time depending
|
||||
* of the OC database system
|
||||
* @return string
|
||||
*/
|
||||
protected static function getNowValue() {
|
||||
$CONFIG_DBTYPE = OCP\Config::getSystemValue( "dbtype", "sqlite" );
|
||||
if( $CONFIG_DBTYPE == 'sqlite' or $CONFIG_DBTYPE == 'sqlite3' ) {
|
||||
$_ut = "strftime('%s','now')";
|
||||
} elseif($CONFIG_DBTYPE == 'pgsql') {
|
||||
$_ut = 'date_part(\'epoch\',now())::integer';
|
||||
} else {
|
||||
$_ut = "UNIX_TIMESTAMP()";
|
||||
}
|
||||
return $_ut;
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit a bookmark
|
||||
* @param int $id The id of the bookmark to edit
|
||||
* @param string $url
|
||||
* @param string $title Name of the bookmark
|
||||
* @param array $tags Simple array of tags to qualify the bookmark (different tags are taken from values)
|
||||
* @param string $description A longer description about the bookmark
|
||||
* @param boolean $is_public True if the bookmark is publishable to not registered users
|
||||
* @return null
|
||||
*/
|
||||
public static function editBookmark($id, $url, $title, $tags = array(), $description='', $is_public=false) {
|
||||
|
||||
$is_public = $is_public ? 1 : 0;
|
||||
$user_id = OCP\USER::getUser();
|
||||
|
||||
// Update the record
|
||||
$query = OCP\DB::prepare("
|
||||
UPDATE *PREFIX*bookmarks SET
|
||||
url = ?, title = ?, public = ?, description = ?,
|
||||
lastmodified = ".self::getNowValue() ."
|
||||
WHERE id = ?
|
||||
AND user_id = ?
|
||||
");
|
||||
|
||||
$params=array(
|
||||
htmlspecialchars_decode($url),
|
||||
htmlspecialchars_decode($title),
|
||||
$is_public,
|
||||
htmlspecialchars_decode($description),
|
||||
$id,
|
||||
$user_id,
|
||||
);
|
||||
|
||||
$result = $query->execute($params);
|
||||
|
||||
// Abort the operation if bookmark couldn't be set
|
||||
// (probably because the user is not allowed to edit this bookmark)
|
||||
if ($result->numRows() == 0) exit();
|
||||
|
||||
|
||||
// Remove old tags
|
||||
$sql = "DELETE from *PREFIX*bookmarks_tags WHERE bookmark_id = ?";
|
||||
$query = OCP\DB::prepare($sql);
|
||||
$query->execute(array($id));
|
||||
|
||||
// Add New Tags
|
||||
self::addTags($id, $tags);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a bookmark
|
||||
* @param string $url
|
||||
* @param string $title Name of the bookmark
|
||||
* @param array $tags Simple array of tags to qualify the bookmark (different tags are taken from values)
|
||||
* @param string $description A longer description about the bookmark
|
||||
* @param boolean $is_public True if the bookmark is publishable to not registered users
|
||||
* @return int The id of the bookmark created
|
||||
*/
|
||||
public static function addBookmark($url, $title, $tags=array(), $description='', $is_public=false) {
|
||||
|
||||
$is_public = $is_public ? 1 : 0;
|
||||
//FIXME: Detect and do smth when user adds a known URL
|
||||
$_ut = self::getNowValue();
|
||||
|
||||
$query = OCP\DB::prepare("
|
||||
INSERT INTO *PREFIX*bookmarks
|
||||
(url, title, user_id, public, added, lastmodified, description)
|
||||
VALUES (?, ?, ?, ?, $_ut, $_ut, ?)
|
||||
");
|
||||
|
||||
$params=array(
|
||||
htmlspecialchars_decode($url),
|
||||
htmlspecialchars_decode($title),
|
||||
OCP\USER::getUser(),
|
||||
$is_public,
|
||||
$description,
|
||||
);
|
||||
$query->execute($params);
|
||||
|
||||
$b_id = OCP\DB::insertid('*PREFIX*bookmarks');
|
||||
|
||||
if($b_id !== false) {
|
||||
self::addTags($b_id, $tags);
|
||||
return $b_id;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a set of tags for a bookmark
|
||||
* @param int $bookmark_id The bookmark reference
|
||||
* @param array $tags Set of tags to add to the bookmark
|
||||
* @return null
|
||||
**/
|
||||
private static function addTags($bookmark_id, $tags) {
|
||||
$query = OCP\DB::prepare("
|
||||
INSERT INTO *PREFIX*bookmarks_tags
|
||||
(bookmark_id, tag)
|
||||
VALUES (?, ?)");
|
||||
|
||||
foreach ($tags as $tag) {
|
||||
if(empty($tag)) {
|
||||
//avoid saving blankspaces
|
||||
continue;
|
||||
}
|
||||
$params = array($bookmark_id, trim($tag));
|
||||
$query->execute($params);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Simple function to search for bookmark. call findBookmarks
|
||||
* @param array $search_words Set of words to look for in bookmars fields
|
||||
* @return array An Array of bookmarks
|
||||
**/
|
||||
public static function searchBookmarks($search_words) {
|
||||
return self::findBookmarks(0, 'id', $search_words, false);
|
||||
}
|
||||
|
||||
public static function importFile($file){
|
||||
libxml_use_internal_errors(true);
|
||||
$dom = new domDocument();
|
||||
|
||||
$dom->loadHTMLFile($file);
|
||||
$links = $dom->getElementsByTagName('a');
|
||||
|
||||
OCP\DB::beginTransaction();
|
||||
foreach($links as $link) {
|
||||
$title = $link->nodeValue;
|
||||
$ref = $link->getAttribute("href");
|
||||
$tag_str = '';
|
||||
if($link->hasAttribute("tags"))
|
||||
$tag_str = $link->getAttribute("tags");
|
||||
$tags = explode(',', $tag_str);
|
||||
|
||||
self::addBookmark($ref, $title, $tags);
|
||||
}
|
||||
OCP\DB::commit();
|
||||
return array();
|
||||
}
|
||||
}
|
||||
|
@ -24,23 +24,18 @@ class OC_Search_Provider_Bookmarks extends OC_Search_Provider{
|
||||
function search($query) {
|
||||
$l=OC_L10N::get('bookmarks');
|
||||
$results=array();
|
||||
|
||||
$offset = 0;
|
||||
$sqlSortColumn = 'id';
|
||||
|
||||
$searchquery=array();
|
||||
|
||||
$search_words=array();
|
||||
if(substr_count($query, ' ') > 0) {
|
||||
$searchquery = explode(' ', $query);
|
||||
$search_words = explode(' ', $query);
|
||||
}else{
|
||||
$searchquery = $query;
|
||||
$search_words = $query;
|
||||
}
|
||||
|
||||
// OCP\Util::writeLog('bookmarks', 'search ' .$query ,OCP\Util::DEBUG);
|
||||
$bookmarks = OC_Bookmarks_Bookmarks::findBookmarks($offset, $sqlSortColumn, $searchquery, false);
|
||||
// OCP\Util::writeLog('bookmarks', 'found ' .count($bookmarks) ,OCP\Util::DEBUG);
|
||||
//$l = new OC_l10n('bookmarks'); //resulttype can't be localized, javascript relies on that type
|
||||
$bookmarks = OC_Bookmarks_Bookmarks::searchBookmarks($search_words);
|
||||
$l = new OC_l10n('bookmarks'); //resulttype can't be localized, javascript relies on that type
|
||||
foreach($bookmarks as $bookmark) {
|
||||
$results[]=new OC_Search_Result($bookmark['title'],'', $bookmark['url'],(string) $l->t('Bookm.'));
|
||||
$results[]=new OC_Search_Result($bookmark['title'], '', $bookmark['url'], (string) $l->t('Bookm.'));
|
||||
}
|
||||
|
||||
return $results;
|
||||
|
25
settings.php
25
settings.php
@ -6,6 +6,27 @@
|
||||
* See the COPYING-README file.
|
||||
*/
|
||||
|
||||
$tmpl = new OCP\Template( 'bookmarks', 'settings');
|
||||
OCP\App::checkAppEnabled('bookmarks');
|
||||
|
||||
return $tmpl->fetchPage();
|
||||
if (isset($_POST['bm_import'])) {
|
||||
$error = array();
|
||||
|
||||
$file = $_FILES['bm_import']['tmp_name'];
|
||||
if($_FILES['bm_import']['type'] =='text/html') {
|
||||
$error = OC_Bookmarks_Bookmarks::importFile($file);
|
||||
|
||||
} else {
|
||||
$error[]= array('error' => 'Unsupported file type for import',
|
||||
'hint' => '');
|
||||
}
|
||||
|
||||
$tmpl = new OCP\Template('bookmarks', 'settings');
|
||||
// Any problems?
|
||||
if(count($error)) {
|
||||
$tmpl->assign('error', $error);
|
||||
}
|
||||
return $tmpl->fetchPage();
|
||||
} else {
|
||||
$tmpl = new OCP\Template( 'bookmarks', 'settings');
|
||||
return $tmpl->fetchPage();
|
||||
}
|
||||
|
@ -1,11 +1,52 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Read later - ownCloud</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="message"><h1>Saved!</h1></div>
|
||||
<a href="javascript:self.close()" >Close the window</a>
|
||||
</body>
|
||||
</html>
|
||||
<form class="addBm" method="post" action="<?php echo OCP\Util::linkTo('bookmarks', 'ajax/editBookmark.php');?>">
|
||||
<?php if(!isset($embedded) || !$embedded):?>
|
||||
<script>
|
||||
var fullTags = <?php echo $_['tags'];?>;
|
||||
$(document).ready(function() {
|
||||
$('body').bookmark_dialog({
|
||||
'on_success': function(){ self.close(); }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<h1><?php echo $l->t('Add a bookmark');?></h1>
|
||||
<div class="close_btn">
|
||||
<a href="javascript:self.close()" class="ui-icon ui-icon-closethick">
|
||||
<?php echo $l->t('Close');?>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<fieldset class="bm_desc">
|
||||
<ul>
|
||||
<li>
|
||||
<input type="text" name="title" class="title" value="<?php echo $_['bookmark']['title']; ?>"
|
||||
placeholder="<?php echo $l->t('The title of the page');?>" />
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<input type="text" name="url" class="url_input" value="<?php echo $_['bookmark']['url']; ?>"
|
||||
placeholder="<?php echo $l->t('The address of the page');?>" />
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<ul class="tags" >
|
||||
<?php foreach($_['bookmark']['tags'] as $tag):?>
|
||||
<li><?php echo $tag;?></li>
|
||||
<?php endforeach;?>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<textarea name="description" class="desc" value="<?php echo $_['bookmark']['desc']; ?>"
|
||||
placeholder="<?php echo $l->t('Description of the page');?>"></textarea>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<input type="submit" class="submit" value="<?php echo $l->t("Save");?>" />
|
||||
<input type="hidden" class="record_id" value="" name="record_id" />
|
||||
<input type="hidden" name="requesttoken" value="<?php echo $_['requesttoken'] ?>">
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</fieldset>
|
||||
</form>
|
@ -3,6 +3,6 @@
|
||||
function createBookmarklet() {
|
||||
$l = OC_L10N::get('bookmarks');
|
||||
echo '<small>' . $l->t('Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:') . '</small>'
|
||||
. '<a class="button bookmarklet" href="javascript:(function() {var a=window,b=document,c=encodeURIComponent,d=a.open(\'' . OCP\Util::linkToAbsolute('bookmarks', 'addBm.php') . '?output=popup&url=\'+c(b.location),\'bkmk_popup\',\'left=\'+((a.screenX||a.screenLeft)+10)+\',top=\'+((a.screenY||a.screenTop)+10)+\',height=230px,width=230px,resizable=1,alwaysRaised=1\');a.setTimeout(function() {d.focus()},300);})();">'
|
||||
. '<a class="button bookmarklet" href="javascript:(function(){var a=window,b=document,c=encodeURIComponent,e=document.title,d=a.open(\'' . OCP\Util::linkToAbsolute('bookmarks', 'addBm.php') . '?output=popup&url=\'+c(b.location)+\'&title=\'+e,\'bkmk_popup\',\'left=\'+((a.screenX||a.screenLeft)+10)+\',top=\'+((a.screenY||a.screenTop)+10)+\',height=400px,width=550px,resizable=1,alwaysRaised=1\');a.setTimeout(function(){d.focus()},300);})();">'
|
||||
. $l->t('Read later') . '</a>';
|
||||
}
|
||||
|
90
templates/js_tpl.php
Normal file
90
templates/js_tpl.php
Normal file
@ -0,0 +1,90 @@
|
||||
<script type="text/html" id="item_tmpl">
|
||||
<div class="bookmark_single" data-id="<%= id %>">
|
||||
<p class="bookmark_actions">
|
||||
<span class="bookmark_edit">
|
||||
<img class="svg" src="<?php echo OCP\image_path("", "actions/rename.svg");?>"
|
||||
title="<?php echo $l->t('Edit');?>">
|
||||
</span>
|
||||
<span class="bookmark_delete">
|
||||
<img class="svg" src="<?php echo OCP\image_path("", "actions/delete.svg");?>"
|
||||
title="<?php echo $l->t('Delete');?>">
|
||||
</span>
|
||||
</p>
|
||||
<p class="bookmark_title">
|
||||
<a href="<%= encodeEntities(url) %>" target="_blank" class="bookmark_link">
|
||||
<%= encodeEntities(title == '' ? url : title ) %>
|
||||
</a>
|
||||
</p>
|
||||
<p class="bookmark_url">
|
||||
<a href="<%= encodeEntities(url) %>" target="_blank" class="bookmark_link">
|
||||
<%= encodeEntities(url) %>
|
||||
</a>
|
||||
</p>
|
||||
<p class="bookmark_date"><%= formatDate(added_date) %></p>
|
||||
<p class="bookmark_desc"><%= encodeEntities(description)%> </p>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="item_form_tmpl">
|
||||
<div class="bookmark_single_form" data-id="<%= id %>">
|
||||
<form method="post" action="<?php echo OCP\Util::linkTo('bookmarks', 'ajax/editBookmark.php');?>" >
|
||||
<input type="hidden" name="record_id" value="<%= id %>" />
|
||||
<p class="bookmark_form_title">
|
||||
<input type="text" name="title" placeholder="<?php echo $l->t('The title of the page');?>"
|
||||
value="<%= title %>"/>
|
||||
</p>
|
||||
<p class="bookmark_form_url">
|
||||
<input type="text" name="url" placeholder="<?php echo $l->t('The address of the page');?>"
|
||||
value="<%= encodeEntities(url)%>"/>
|
||||
</p>
|
||||
<div class="bookmark_form_tags"><ul>
|
||||
<% for ( var i = 0; i < tags.length; i++ ) { %>
|
||||
<li><%=tags[i]%></li>
|
||||
<% } %>
|
||||
</ul></div>
|
||||
<p class="bookmark_form_desc">
|
||||
<textarea name="description" placeholder="<?php echo $l->t('Description of the page');?>"
|
||||
><%= description%></textarea>
|
||||
</p>
|
||||
<p class="bookmark_form_submit"><button class="reset" ><?php echo $l->t('Cancel');?></button>
|
||||
<input type="submit" value="<?php echo $l->t('Save');?>">
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/html" id="tag_tmpl">
|
||||
<li><a href="" class="tag"><%= tag %></a>
|
||||
<p class="tags_actions">
|
||||
<span class="tag_edit">
|
||||
<img class="svg" src="<?php echo OCP\image_path("", "actions/rename.svg");?>"
|
||||
title="<?php echo $l->t('Edit');?>">
|
||||
</span>
|
||||
<span class="tag_delete">
|
||||
<img class="svg" src="<?php echo OCP\image_path("", "actions/delete.svg");?>"
|
||||
title="<?php echo $l->t('Delete');?>">
|
||||
</span>
|
||||
</p>
|
||||
<em><%= nbr %></em>
|
||||
</li>
|
||||
</script>
|
||||
<script type="text/html" id="img_item_tmpl">
|
||||
<div class="bookmark_single" data-id="<%= id %>" >
|
||||
<p class="shot"><img src="<%= service_url %>"></p>
|
||||
<p class="bookmark_actions">
|
||||
<span class="bookmark_edit">
|
||||
<img class="svg" src="<?php echo OCP\image_path("", "actions/rename.svg");?>"
|
||||
title="<?php echo $l->t('Edit');?>">
|
||||
</span>
|
||||
<span class="bookmark_delete">
|
||||
<img class="svg" src="<?php echo OCP\image_path("", "actions/delete.svg");?>"
|
||||
title="<?php echo $l->t('Delete');?>">
|
||||
</span>
|
||||
</p>
|
||||
<p class="bookmark_title">
|
||||
<a href="<%= encodeEntities(url)%>" target="_blank" class="bookmark_link"><%= encodeEntities(title)%></a>
|
||||
</p>
|
||||
<p class="bookmark_desc"><%= encodeEntities(description)%></p>
|
||||
<p class="bookmark_url"><a href="<%= encodeEntities(url)%>" target="_blank"
|
||||
class="bookmark_link"><%= encodeEntities(url)%></a></p>
|
||||
</div>
|
||||
</script>
|
@ -7,20 +7,51 @@
|
||||
* See the COPYING-README file.
|
||||
*/
|
||||
?>
|
||||
<input type="hidden" id="bookmarkFilterTag" value="<?php if(isset($_GET['tag'])) echo OCP\Util::sanitizeHTML($_GET['tag']); ?>" />
|
||||
<input type="hidden" id="bookmarkFilterTag" value="<?php echo $_['req_tag']; ?>" />
|
||||
<div id="controls">
|
||||
<input type="hidden" id="bookmark_add_id" value="0" />
|
||||
<input type="text" id="bookmark_add_url" placeholder="<?php echo $l->t('Address'); ?>" class="bookmarks_input" />
|
||||
<input type="text" id="bookmark_add_title" placeholder="<?php echo $l->t('Title'); ?>" class="bookmarks_input" />
|
||||
<input type="text" id="bookmark_add_tags" placeholder="<?php echo $l->t('Tags'); ?>" class="bookmarks_input" />
|
||||
<input type="submit" value="<?php echo $l->t('Save bookmark'); ?>" id="bookmark_add_submit" />
|
||||
<input type="text" id="add_url" value="" placeholder="<?php echo $l->t('Address'); ?>"/>
|
||||
<input type="submit" value="<?php echo $l->t('Add bookmark'); ?>" id="bookmark_add_submit" />
|
||||
|
||||
<div id="view_type">
|
||||
<input type="button" class="list" value="<?php echo $l->t('List')?>" />
|
||||
<input type="button" class="image" style="display:none" value="<?php echo $l->t('Image')?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="bookmarks_list">
|
||||
<div id="leftcontent">
|
||||
<div class="centercontent">
|
||||
<span class="left_img"> <?php echo $l->t('Hide')?> <<</span>
|
||||
<span class="right_img"> <?php echo $l->t('Show')?> >></span>
|
||||
</div>
|
||||
|
||||
<p id="tag_filter">
|
||||
<input type="text" placeholder="Filter By tag" value="<?php echo $_['req_tag']; ?>"/>
|
||||
</p>
|
||||
|
||||
<label><?php echo $l->t('Related Tags'); ?></label>
|
||||
<ul class="tag_list">
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div id="firstrun" style="display: none;">
|
||||
<?php
|
||||
echo $l->t('You have no bookmarks');
|
||||
require_once OC_App::getAppPath('bookmarks') .'/templates/bookmarklet.php';
|
||||
createBookmarklet();
|
||||
?>
|
||||
<div id="rightcontent" class="rightcontent">
|
||||
<div class="bookmarks_list"></div>
|
||||
<div id="firstrun" style="display: none;">
|
||||
<?php
|
||||
echo $l->t('You have no bookmarks');
|
||||
$embedded = true;
|
||||
require_once OC_App::getAppPath('bookmarks') .'/templates/bookmarklet.php' ;
|
||||
createBookmarklet();
|
||||
?>
|
||||
</div>
|
||||
<script>
|
||||
var fullTags = <?php echo $_['tags'];?>;
|
||||
var init_view = '<?php echo OCP\Config::getUserValue(OCP\USER::getUser(), 'bookmarks', 'currentview', 'text');?>';
|
||||
var init_sidebar = '<?php echo OCP\Config::getUserValue(OCP\USER::getUser(), 'bookmarks', 'sidebar', 'true');?>';
|
||||
var shot_provider = '<?php echo OCP\Config::getUserValue(OCP\USER::getUser(),
|
||||
'bookmarks', 'shot_provider', 'http://screenshots.bookmarkly.com/thumb?url={url}');?>';
|
||||
//http://api.thumbalizr.com/?width={width}&url={url}
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="edit_dialog_tmpl">
|
||||
<?php require 'addBm.php';?>
|
||||
</script>
|
||||
<?php require 'js_tpl.php';?>
|
@ -15,3 +15,24 @@
|
||||
?>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<form id="import_bookmark" action="#" method="post" enctype="multipart/form-data">
|
||||
<fieldset class="personalblock">
|
||||
<?php if(isset($_['error'])): ?>
|
||||
<h3><?php echo $_['error']['error']; ?></h3>
|
||||
<p><?php echo $_['error']['hint']; ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<legend><strong><?php echo $l->t('Import bookmarks');?></strong></legend>
|
||||
<p><input type="file" id="bm_import" name="bm_import" style="width:280px;">
|
||||
<label for="bm_import"> <?php echo $l->t('Bookmark html file');?></label>
|
||||
</p>
|
||||
<input type="submit" name="bm_import" value="<?php echo $l->t('Import'); ?>" />
|
||||
|
||||
|
||||
<legend><strong><?php echo $l->t('Export bookmarks');?></strong></legend>
|
||||
<p><a href="<?php echo OCP\Util::linkTo('bookmarks', 'export.php') ;?>"
|
||||
class="button"><?php echo $l->t('Export'); ?></a></p>
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
|
28
tests/lib_bookmark.php
Normal file
28
tests/lib_bookmark.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
OC_App::loadApp('bookmarks');
|
||||
class Test_LibBookmarks_Bookmarks extends UnitTestCase {
|
||||
|
||||
function testAddBM() {
|
||||
$this->assertCount(0, OC_Bookmarks_Bookmarks::findBookmarks(0, 'id', array(), true, -1));
|
||||
OC_Bookmarks_Bookmarks::addBookmark(
|
||||
'http://owncloud.org', 'Owncloud project', array('oc', 'cloud'), 'An Awesome project');
|
||||
$this->assertCount(1, OC_Bookmarks_Bookmarks::findBookmarks(0, 'id', array(), true, -1));
|
||||
}
|
||||
|
||||
function testFindTags() {
|
||||
// $uid=uniqid();
|
||||
$this->assertEqual(OC_Bookmarks_Bookmarks::findTags(), array());
|
||||
|
||||
OC_Bookmarks_Bookmarks::addBookmark(
|
||||
'http://owncloud.org', 'Owncloud project', array('oc', 'cloud'), 'An Awesome project');
|
||||
$this->assertEqual(array(0=>array('tag' => 'cloud', 'nbr'=>1), 1=>array('tag' => 'oc', 'nbr'=>1)),
|
||||
OC_Bookmarks_Bookmarks::findTags());
|
||||
}
|
||||
|
||||
protected function tearDown() {
|
||||
$query = OC_DB::prepare('DELETE FROM *PREFIX*bookmarks WHERE `user_id` = \'\' ');
|
||||
$query->execute();
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user