mirror of
https://github.com/owncloud/bookmarks.git
synced 2025-01-22 18:52:10 +01:00
Adding tags in bookmarklet, fix #127
This commit is contained in:
parent
e5acadc10e
commit
52ec490ad4
@ -25,8 +25,12 @@ function updateLoadingAnimation() {
|
||||
$(function () {
|
||||
$(".submit").click(function () {
|
||||
increaseAjaxCallCount();
|
||||
var dataString = 'url=' + $("input#url").val() + '&description=' +
|
||||
$("textarea#description").val() + '&title=' + $("input#title").val();
|
||||
var tags = '';
|
||||
$('.tagit-choice .tagit-label').each(function() {
|
||||
tags += '&item[tags][]='+$(this).text();
|
||||
});
|
||||
var dataString = 'url=' + $("input#url").val() + '&description=' +
|
||||
$("textarea#description").val() + '&title=' + $("input#title").val() + tags;
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "bookmark",
|
||||
@ -48,6 +52,13 @@ $(function () {
|
||||
});
|
||||
return false;
|
||||
});
|
||||
$.get('tag', function(data) {
|
||||
$('.tags').tagit({
|
||||
allowSpaces: true,
|
||||
availableTags : data,
|
||||
placeholderText: t('bookmark', 'Tags')
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
function closeWindow() {
|
||||
|
@ -35,9 +35,9 @@ $bookmarkExists = $_['bookmarkExists'];
|
||||
|
||||
<li>
|
||||
<ul class="tags" >
|
||||
<?php foreach ($_['bookmark']['tags'] as $tag): ?>
|
||||
<li><?php p($tag); ?></li>
|
||||
<?php endforeach; ?>
|
||||
<ul class="tags" >
|
||||
<li></li>
|
||||
</ul>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user