diff --git a/js/main.js b/js/main.js index 1b7b304a24..b08e451509 100644 --- a/js/main.js +++ b/js/main.js @@ -72,21 +72,19 @@ /* setup comment textarea buttons */ /* comment textarea buttons needs some "data-*" attributes to work: * data-role="insert-formatting" : to mark the element as a formatting button - * data-comment="" : string for "Comment", used by insertFormatting() function * data-bbcode="" : name of the bbcode element to insert. insertFormatting() will insert it as "[name][/name]" * data-id="" : id of the comment, used to find other comment-related element, like the textarea * */ $('body').on('click','[data-role="insert-formatting"]', function(e) { e.preventDefault(); var o = $(this); - var comment = o.data('comment'); var bbcode = o.data('bbcode'); var id = o.data('id'); if (bbcode=="img") { Dialog.doImageBrowser("comment", id); return; } - insertFormatting(comment, bbcode, id); + insertFormatting(bbcode, id); }); /* event from comment textarea button popups */ diff --git a/view/theme/duepuntozero/templates/comment_item.tpl b/view/theme/duepuntozero/templates/comment_item.tpl index b7158f4eea..f1ef37f14b 100644 --- a/view/theme/duepuntozero/templates/comment_item.tpl +++ b/view/theme/duepuntozero/templates/comment_item.tpl @@ -20,28 +20,28 @@
  • + data-role="insert-formatting" data-bbcode="b" data-id="{{$id}}">
  • + data-role="insert-formatting" data-bbcode="i" data-id="{{$id}}">
  • + data-role="insert-formatting" data-bbcode="u" data-id="{{$id}}">
  • + data-role="insert-formatting" data-bbcode="quote" data-id="{{$id}}">
  • + data-role="insert-formatting" data-bbcode="code" data-id="{{$id}}">
  • + data-role="insert-formatting" data-bbcode="img" data-id="{{$id}}">
  • + data-role="insert-formatting" data-bbcode="url" data-id="{{$id}}">
  • + data-role="insert-formatting" data-bbcode="video" data-id="{{$id}}">
diff --git a/view/theme/duepuntozero/templates/moderated_comment.tpl b/view/theme/duepuntozero/templates/moderated_comment.tpl index ede08751a6..e5c2e5b9ad 100644 --- a/view/theme/duepuntozero/templates/moderated_comment.tpl +++ b/view/theme/duepuntozero/templates/moderated_comment.tpl @@ -23,28 +23,28 @@
  • + onclick="insertFormatting('b', {{$id}});">
  • + onclick="insertFormatting('i', {{$id}});">
  • + onclick="insertFormatting('u', {{$id}});">
  • + onclick="insertFormatting('quote', {{$id}});">
  • + onclick="insertFormatting('code', {{$id}});">
  • + onclick="insertFormatting('img', {{$id}});">
  • + onclick="insertFormatting('url', {{$id}});">
  • + onclick="insertFormatting('video', {{$id}});">
diff --git a/view/theme/duepuntozero/theme.php b/view/theme/duepuntozero/theme.php index 347e542e1c..c1a1321ae0 100644 --- a/view/theme/duepuntozero/theme.php +++ b/view/theme/duepuntozero/theme.php @@ -23,33 +23,34 @@ set_template_engine($a, 'smarty3'); } $a->page['htmlhead'] .= <<< EOT