diff options
Diffstat (limited to 'themes')
-rwxr-xr-x | themes/_global/js/autoCompleteTags.js | 3 | ||||
-rwxr-xr-x | themes/baggy/css/main.css | 29 | ||||
-rwxr-xr-x | themes/baggy/edit-tags.twig | 2 | ||||
-rwxr-xr-x | themes/default/css/style.css | 30 | ||||
-rwxr-xr-x | themes/default/edit-tags.twig | 5 |
5 files changed, 66 insertions, 3 deletions
diff --git a/themes/_global/js/autoCompleteTags.js b/themes/_global/js/autoCompleteTags.js index 986e71d1..8b32f8ca 100755 --- a/themes/_global/js/autoCompleteTags.js +++ b/themes/_global/js/autoCompleteTags.js | |||
@@ -48,6 +48,9 @@ jQuery(function($) { | |||
48 | var value = input.val(); | 48 | var value = input.val(); |
49 | var tag = $(this).text(); | 49 | var tag = $(this).text(); |
50 | var terms = value.split(','); // tags into the <input> | 50 | var terms = value.split(','); // tags into the <input> |
51 | $(".alreadytagged").each(function(index) { | ||
52 | terms.push($(this).text() ); | ||
53 | }); | ||
51 | if (jQuery.inArray(tag, terms) == -1 ) { // if the tag hasn't already been added | 54 | if (jQuery.inArray(tag, terms) == -1 ) { // if the tag hasn't already been added |
52 | value += tag + ","; | 55 | value += tag + ","; |
53 | input.val(value); | 56 | input.val(value); |
diff --git a/themes/baggy/css/main.css b/themes/baggy/css/main.css index 5319fd68..91c1ab9f 100755 --- a/themes/baggy/css/main.css +++ b/themes/baggy/css/main.css | |||
@@ -960,6 +960,35 @@ pre code { | |||
960 | font-size: 0.96em; | 960 | font-size: 0.96em; |
961 | } | 961 | } |
962 | 962 | ||
963 | /* ========================================================================== | ||
964 | 5.1 = Tags-related styles | ||
965 | ========================================================================== */ | ||
966 | |||
967 | .suggestedtag { | ||
968 | padding: 4px; | ||
969 | cursor: pointer; | ||
970 | display: inline-block; | ||
971 | } | ||
972 | |||
973 | #tagcloud .smallesttag { | ||
974 | font-size: x-small; | ||
975 | } | ||
976 | |||
977 | #tagcloud .smalltag { | ||
978 | font-size: small; | ||
979 | } | ||
980 | |||
981 | #tagcloud .mediumtag { | ||
982 | font-size:medium; | ||
983 | } | ||
984 | |||
985 | #tagcloud .largetag { | ||
986 | font-size:large; | ||
987 | } | ||
988 | |||
989 | #tagcloud .largesttag { | ||
990 | font-size:larger; | ||
991 | } | ||
963 | 992 | ||
964 | /* ========================================================================== | 993 | /* ========================================================================== |
965 | 6 = Media Queries | 994 | 6 = Media Queries |
diff --git a/themes/baggy/edit-tags.twig b/themes/baggy/edit-tags.twig index ae6684f2..3b829eae 100755 --- a/themes/baggy/edit-tags.twig +++ b/themes/baggy/edit-tags.twig | |||
@@ -26,6 +26,6 @@ | |||
26 | {% trans "You can enter multiple tags, separated by commas." %}</p> | 26 | {% trans "You can enter multiple tags, separated by commas." %}</p> |
27 | </form> | 27 | </form> |
28 | All existing tags : | 28 | All existing tags : |
29 | <ul>{% for eachtag in alltags %}<li class="suggestedtag" style="display: inline-block; margin:10px;">{{ eachtag.value }}</li>{% endfor %}</ul> | 29 | <ul id="tagcloud">{% for eachtag in alltags %}<li class="suggestedtag {{ eachtag.cssclass }}">{{ eachtag.value }}</li>{% endfor %}</ul> |
30 | <a class="icon icon-reply return" href="./?view=view&id={{ entry_id }}">{% trans "return to article" %}</a> | 30 | <a class="icon icon-reply return" href="./?view=view&id={{ entry_id }}">{% trans "return to article" %}</a> |
31 | {% endblock %} | 31 | {% endblock %} |
diff --git a/themes/default/css/style.css b/themes/default/css/style.css index a122dc54..58d908ee 100755 --- a/themes/default/css/style.css +++ b/themes/default/css/style.css | |||
@@ -455,3 +455,33 @@ pre code { | |||
455 | border: 1px solid #ddd; | 455 | border: 1px solid #ddd; |
456 | font-size: 0.96em; | 456 | font-size: 0.96em; |
457 | } | 457 | } |
458 | |||
459 | /* ========================================================================== | ||
460 | Tags-related styles | ||
461 | ========================================================================== */ | ||
462 | |||
463 | .suggestedtag { | ||
464 | padding: 4px; | ||
465 | cursor: pointer; | ||
466 | display: inline-block; | ||
467 | } | ||
468 | |||
469 | #tagcloud .smallesttag { | ||
470 | font-size: x-small; | ||
471 | } | ||
472 | |||
473 | #tagcloud .smalltag { | ||
474 | font-size: small; | ||
475 | } | ||
476 | |||
477 | #tagcloud .mediumtag { | ||
478 | font-size:medium; | ||
479 | } | ||
480 | |||
481 | #tagcloud .largetag { | ||
482 | font-size:large; | ||
483 | } | ||
484 | |||
485 | #tagcloud .largesttag { | ||
486 | font-size:larger; | ||
487 | } | ||
diff --git a/themes/default/edit-tags.twig b/themes/default/edit-tags.twig index c29427e0..61cc94f1 100755 --- a/themes/default/edit-tags.twig +++ b/themes/default/edit-tags.twig | |||
@@ -19,7 +19,7 @@ | |||
19 | {% trans "no tags" %} | 19 | {% trans "no tags" %} |
20 | {% endif %} | 20 | {% endif %} |
21 | <ul> | 21 | <ul> |
22 | {% for tag in tags %}<li>{{ tag.value }} <a href="./?action=remove_tag&tag_id={{ tag.id }}&id={{ entry_id }}">✘</a></li>{% endfor %} | 22 | {% for tag in tags %}<li><span class="alreadytagged">{{ tag.value }}</span> <a href="./?action=remove_tag&tag_id={{ tag.id }}&id={{ entry_id }}">✘</a></li>{% endfor %} |
23 | </ul> | 23 | </ul> |
24 | <form method="post" action="./?action=add_tag" id="editTags"> | 24 | <form method="post" action="./?action=add_tag" id="editTags"> |
25 | <input type="hidden" name="entry_id" value="{{ entry_id }}" /> | 25 | <input type="hidden" name="entry_id" value="{{ entry_id }}" /> |
@@ -30,6 +30,7 @@ | |||
30 | {% trans "You can enter multiple tags, separated by commas." %}</p> | 30 | {% trans "You can enter multiple tags, separated by commas." %}</p> |
31 | 31 | ||
32 | </form> | 32 | </form> |
33 | <br> | 33 | All existing tags : |
34 | <ul id="tagcloud">{% for eachtag in alltags %}<li class="suggestedtag {{ eachtag.cssclass }}">{{ eachtag.value }}</li>{% endfor %}</ul> | ||
34 | <a href="./?view=view&id={{ entry_id }}">« {% trans "return to article" %}</a> | 35 | <a href="./?view=view&id={{ entry_id }}">« {% trans "return to article" %}</a> |
35 | {% endblock %} | 36 | {% endblock %} |