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 () {
|
$(function () {
|
||||||
$(".submit").click(function () {
|
$(".submit").click(function () {
|
||||||
increaseAjaxCallCount();
|
increaseAjaxCallCount();
|
||||||
var dataString = 'url=' + $("input#url").val() + '&description=' +
|
var tags = '';
|
||||||
$("textarea#description").val() + '&title=' + $("input#title").val();
|
$('.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({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: "bookmark",
|
url: "bookmark",
|
||||||
@ -48,6 +52,13 @@ $(function () {
|
|||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
$.get('tag', function(data) {
|
||||||
|
$('.tags').tagit({
|
||||||
|
allowSpaces: true,
|
||||||
|
availableTags : data,
|
||||||
|
placeholderText: t('bookmark', 'Tags')
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function closeWindow() {
|
function closeWindow() {
|
||||||
|
@ -35,9 +35,9 @@ $bookmarkExists = $_['bookmarkExists'];
|
|||||||
|
|
||||||
<li>
|
<li>
|
||||||
<ul class="tags" >
|
<ul class="tags" >
|
||||||
<?php foreach ($_['bookmark']['tags'] as $tag): ?>
|
<ul class="tags" >
|
||||||
<li><?php p($tag); ?></li>
|
<li></li>
|
||||||
<?php endforeach; ?>
|
</ul>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user