--- /dev/null
+/**\r
+ * Filebrowser - Friendica Communications Server\r
+ * \r
+ * Copyright (c) 2010-2013 the Friendica Project\r
+ *\r
+ * This program is free software: you can redistribute it and/or modify\r
+ * it under the terms of the GNU Affero General Public License as published by\r
+ * the Free Software Foundation, either version 3 of the License, or\r
+ * (at your option) any later version.\r
+ *\r
+ * This code handle user interaction for image/file upload/browser dialog.\r
+ * Is loaded from filebrowser_plain.tpl\r
+ *\r
+ * To load filebrowser in colorbox, call\r
+ *\r
+ * $.colorbox({href: ulr, iframe:true,innerWidth:'500px',innerHeight:'400px'})\r
+ *\r
+ * where url is:\r
+ *\r
+ * <baseurl>/fbrowser/<type>/?mode=minimal[#<eventname>-<id>]\r
+ *\r
+ * baseurl: baseurl from friendica\r
+ * type: one of "image", "file"\r
+ * eventname: event name to catch return value\r
+ * id: id returned to event handler\r
+ *\r
+ * When user select an item, an event in fired in parent page, on body element\r
+ * The event is named\r
+ *\r
+ * fbrowser.<type>.[<eventname>]\r
+ * \r
+ * with params:\r
+ *\r
+ * filemane: filename of item choosed by user\r
+ * embed: bbcode to embed element into posts\r
+ * id: id from url\r
+ *\r
+ * example:\r
+ *\r
+ * // open dialog for select an image for a textarea with id "myeditor"\r
+ * var id="myeditor";\r
+ * $.colorbox({href: baseurl + "/fbrowser/image/?mode=minimal#example-"+id, iframe:true,innerWidth:'500px',innerHeight:'400px'})\r
+ *\r
+ * // setup event handler to get user selection\r
+ * $("body").on("fbrowser.image.example", function(event, filename, bbcode, id) {\r
+ * // close colorbox\r
+ * $.colorbox.close();\r
+ * // replace textxarea text with bbcode\r
+ * $(id).value = bbcode;\r
+ * });\r
+ **/\r
+ \r
+var FileBrowser = {\r
+ nickname : "",\r
+ type : "",\r
+ event: "",\r
+ id : null,\r
+ \r
+ init: function(nickname, type) {\r
+ FileBrowser.nickname = nickname;\r
+ FileBrowser.type = type;\r
+ FileBrowser.event = "fbrowser."+type;\r
+ if (location['hash']!=="") {\r
+ var h = location['hash'].replace("#","");\r
+ FileBrowser.event = FileBrowser.event + "." + h.split("-")[0];\r
+ FileBrowser.id = h.split("-")[1];\r
+ }\r
+ \r
+ console.log("FileBrowser:", nickname, type,FileBrowser.event, FileBrowser.id );\r
+ $(".photo-album-photo-link").on('click', function(e){\r
+ e.preventDefault();\r
+ \r
+ var embed = "";\r
+ if (FileBrowser.type == "image") {\r
+ embed = "[url="+this.dataset.link+"][img]"+this.dataset.img+"[/img][/url]";\r
+ }\r
+ if (FileBrowser.type=="file") {\r
+ // attachment links are "baseurl/attach/id"; we need id\r
+ embed = "[attachment]"+this.dataset.link.split("/").pop()+"[/attachment]";\r
+ }\r
+ console.log(FileBrowser.event, this.dataset.filename, embed, FileBrowser.id);\r
+ parent.$("body").trigger(FileBrowser.event, [\r
+ this.dataset.filename,\r
+ embed,\r
+ FileBrowser.id\r
+ ]);\r
+ \r
+ });\r
+ \r
+ if ($("#upload-image").length)\r
+ var image_uploader = new window.AjaxUpload(\r
+ 'upload-image',\r
+ { action: 'wall_upload/'+FileBrowser.nickname,\r
+ name: 'userfile',\r
+ onSubmit: function(file,ext) { $('#profile-rotator').show(); },\r
+ onComplete: function(file,response) {\r
+ location = baseurl + "/fbrowser/image/?mode=minimal"+location['hash'];\r
+ location.reload(true);\r
+ } \r
+ }\r
+ );\r
+\r
+ if ($("#upload-file").length)\r
+ var file_uploader = new window.AjaxUpload(\r
+ 'upload-file',\r
+ { action: 'wall_attach/'+FileBrowser.nickname,\r
+ name: 'userfile',\r
+ onSubmit: function(file,ext) { $('#profile-rotator').show(); },\r
+ onComplete: function(file,response) {\r
+ location = baseurl + "/fbrowser/file/?mode=minimal"+location['hash'];\r
+ location.reload(true); } \r
+ }\r
+ );\r
+ }\r
+};\r
+\r
e.tipTip({defaultPosition: pos, edgeOffset: 8});
});*/
+ /* setup comment textarea buttons */
+
+ $('[data-role="insert-formatting"]').on('click', 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") {
+ $.colorbox({href: baseurl + "/fbrowser/image/?mode=minimal#comment-"+id, iframe:true,innerWidth:'500px',innerHeight:'400px'})
+ return;
+ }
+
+ insertFormatting(comment, bbcode, id);
+ });
+
+ /* event from comment textarea button popups */
+ /* insert returned bbcode at cursor position or replace selected text */
+ $("body").on("fbrowser.image.comment", function(e, filename, bbcode, id) {
+ console.log("on", id);
+ $.colorbox.close();
+ var textarea = document.getElementById("comment-edit-text-" +id);
+ var start = textarea.selectionStart;
+ var end = textarea.selectionEnd;
+ textarea.value = textarea.value.substring(0, start) + bbcode + textarea.value.substring(end, textarea.value.length);
+ });
+
/* setup onoff widgets */
-->
<script type="text/javascript" src="{{$baseurl}}/js/ajaxupload.js" ></script>
-
+<script type="text/javascript" src="{{$baseurl}}/js/filebrowser.js"></script>
+<script>
+ $(function() {
+ FileBrowser.init("{{$nickname}}", "{{$type}}");
+ });
+</script>
<div class="fbrowser {{$type}}">
<div class="path">
{{foreach $path as $p}}<a href="{{$p.0}}">{{$p.1}}</a>{{/foreach}}
</div>
+ {{if $folders }}
<div class="folders">
<ul>
{{foreach $folders as $f}}<li><a href="{{$baseurl}}/fbrowser/{{$type}}/{{$f.0}}">{{$f.1}}</a></li>{{/foreach}}
</ul>
</div>
+ {{/if}}
- {{foreach $files as $f}}
- <div class="photo-album-image-wrapper">
- <a href="#" class="photo-album-photo-link" data-link="{{$f.0}}" data-filename="{{$f.1}}" data-img="{{$f.2}}">
- <img src="{{$f.2}}">
- <p>{{$f.1}}</p>
- </a>
+ <div class="list">
+ {{foreach $files as $f}}
+ <div class="photo-album-image-wrapper">
+ <a href="#" class="photo-album-photo-link" data-link="{{$f.0}}" data-filename="{{$f.1}}" data-img="{{$f.2}}">
+ <img src="{{$f.2}}">
+ <p>{{$f.1}}</p>
+ </a>
+ </div>
+ {{/foreach}}
</div>
- <div class="photo-album-image-wrapper-end"></div>
- {{/foreach}}
<div class="upload">
<button id="upload-{{$type}}"><img id="profile-rotator" src="images/rotator.gif" alt="{{$wait}}" title="{{$wait|escape:'html'}}" style="display: none;" /> {{"Upload"|t}}</button>
</div>
-
- <script>
- $(".photo-album-photo-link").on('click', function(e){
- e.preventDefault();
-
- {{if $type == "image"}}
- var embed = "[url="+this.dataset.link+"][img]"+this.dataset.img+"[/img][/url]";
- {{/if}}
- {{if $type == "file"}}
- var embed = "[url="+this.dataset.link+"][img]"+this.dataset.img+"[/img] "+this.dataset.filename+"[/url]";
- {{/if}}
- console.log(this.dataset.filename, embed, parent.$("body"));
- parent.$("body").trigger("fbrowser.{{$type}}", [
- this.dataset.filename,
- embed,
- ]);
-
- });
-
- if ($("#upload-image").length)
- var image_uploader = new window.AjaxUpload(
- 'upload-image',
- { action: 'wall_upload/{{$nickname}}',
- name: 'userfile',
- onSubmit: function(file,ext) { $('#profile-rotator').show(); },
- onComplete: function(file,response) {
- location = baseurl + "/fbrowser/image/?mode=minimal";
- location.reload(true);
- }
- }
- );
-
- if ($("#upload-file").length)
- var file_uploader = new window.AjaxUpload(
- 'upload-file',
- { action: 'wall_attach/{{$nickname}}',
- name: 'userfile',
- onSubmit: function(file,ext) { $('#profile-rotator').show(); },
- onComplete: function(file,response) {
- location = baseurl + "/fbrowser/file/?mode=minimal";
- location.reload(true); }
- }
- );
-
-
-
- </script>
-
</body>
</html>
**/
/* callback */
- $('body').on('fbrowser.image', function(e, filename, embedcode) {
+ $('body').on('fbrowser.image', function(e, filename, embedcode, id) {
$.colorbox.close();
addeditortext(embedcode);
});
- $('body').on('fbrowser.file', function(e, filename, embedcode) {
+ $('body').on('fbrowser.file', function(e, filename, embedcode, id) {
$.colorbox.close();
addeditortext(embedcode);
});
<ul class="comment-edit-bb-{{$id}}">
<li><a class="editicon boldbb shadow"
style="cursor: pointer;"
- onclick="insertFormatting('{{$comment}}','b', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="b" data-id="{{$id}}"></a></li>
<li><a class="editicon italicbb shadow"
style="cursor: pointer;"
- onclick="insertFormatting('{{$comment}}','i', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="i" data-id="{{$id}}"></a></li>
<li><a class="editicon underlinebb shadow"
style="cursor: pointer;"
- onclick="insertFormatting('{{$comment}}','u', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="u" data-id="{{$id}}"></a></li>
<li><a class="editicon quotebb shadow"
style="cursor: pointer;"
- onclick="insertFormatting('{{$comment}}','quote', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="quote" data-id="{{$id}}"></a></li>
<li><a class="editicon codebb shadow"
style="cursor: pointer;"
- onclick="insertFormatting('{{$comment}}','code', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="code" data-id="{{$id}}"></a></li>
<li><a class="editicon imagebb shadow"
style="cursor: pointer;"
- onclick="insertFormatting('{{$comment}}','img', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="img" data-id="{{$id}}"></a></li>
<li><a class="editicon urlbb shadow"
style="cursor: pointer;"
- onclick="insertFormatting('{{$comment}}','url', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="url" data-id="{{$id}}"></a></li>
<li><a class="editicon videobb shadow"
style="cursor: pointer;"
- onclick="insertFormatting('{{$comment}}','video', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="video" data-id="{{$id}}"></a></li>
</ul>
<div class="comment-edit-bb-end"></div>
<textarea id="comment-edit-text-{{$id}}"
<ul class="comment-edit-bb-{{$id}}">
<li><a class="editicon boldbb shadow"
style="cursor: pointer;" title="{{$edbold}}"
- onclick="insertFormatting('{{$comment}}','b', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="b" data-id="{{$id}}"></a></li>
<li><a class="editicon italicbb shadow"
style="cursor: pointer;" title="{{$editalic}}"
- onclick="insertFormatting('{{$comment}}','i', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="i" data-id="{{$id}}"></a></li>
<li><a class="editicon underlinebb shadow"
style="cursor: pointer;" title="{{$eduline}}"
- onclick="insertFormatting('{{$comment}}','u', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="u" data-id="{{$id}}"></a></li>
<li><a class="editicon quotebb shadow"
style="cursor: pointer;" title="{{$edquote}}"
- onclick="insertFormatting('{{$comment}}','quote', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="quote" data-id="{{$id}}"></a></li>
<li><a class="editicon codebb shadow"
style="cursor: pointer;" title="{{$edcode}}"
- onclick="insertFormatting('{{$comment}}','code', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="code" data-id="{{$id}}"></a></li>
<li><a class="editicon imagebb shadow"
style="cursor: pointer;" title="{{$edimg}}"
- onclick="insertFormatting('{{$comment}}','img', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="img" data-id="{{$id}}"></a></li>
<li><a class="editicon urlbb shadow"
style="cursor: pointer;" title="{{$edurl}}"
- onclick="insertFormatting('{{$comment}}','url', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="url" data-id="{{$id}}"></a></li>
<li><a class="editicon videobb shadow"
style="cursor: pointer;" title="{{$edvideo}}"
- onclick="insertFormatting('{{$comment}}','video', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="video" data-id="{{$id}}"></a></li>
</ul>
<div class="comment-edit-bb-end"></div>
<textarea id="comment-edit-text-{{$id}}" class="comment-edit-text-empty" name="body" onFocus="commentOpen(this,{{$id}});cmtBbOpen(this, {{$id}});" onBlur="commentClose(this,{{$id}});cmtBbClose(this,{{$id}});" >{{$comment}}</textarea>
<ul class="comment-edit-bb-{{$id}}">
<li><a class="editicon boldbb shadow"
style="cursor: pointer;" title="{{$edbold}}"
- onclick="insertFormatting('{{$comment}}','b', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="b" data-id="{{$id}}"></a></li>
<li><a class="editicon italicbb shadow"
style="cursor: pointer;" title="{{$editalic}}"
- onclick="insertFormatting('{{$comment}}','i', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="i" data-id="{{$id}}"></a></li>
<li><a class="editicon underlinebb shadow"
style="cursor: pointer;" title="{{$eduline}}"
- onclick="insertFormatting('{{$comment}}','u', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="u" data-id="{{$id}}"></a></li>
<li><a class="editicon quotebb shadow"
style="cursor: pointer;" title="{{$edquote}}"
- onclick="insertFormatting('{{$comment}}','quote', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="quote" data-id="{{$id}}"></a></li>
<li><a class="editicon codebb shadow"
style="cursor: pointer;" title="{{$edcode}}"
- onclick="insertFormatting('{{$comment}}','code', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="code" data-id="{{$id}}"></a></li>
{{*<!-- <li><a class="editicon imagebb shadow"
style="cursor: pointer;" title="{{$edimg}}"
- onclick="insertFormatting('{{$comment}}','img', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="img" data-id="{{$id}}"></a></li>
<li><a class="editicon urlbb shadow"
style="cursor: pointer;" title="{{$edurl}}"
- onclick="insertFormatting('{{$comment}}','url', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="url" data-id="{{$id}}"></a></li>
<li><a class="editicon videobb shadow"
style="cursor: pointer;" title="{{$edvideo}}"
- onclick="insertFormatting('{{$comment}}','video', {{$id}});"></a></li>-->*}}
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="video" data-id="{{$id}}"></a></li>-->*}}
</ul>
{{*<!--<div class="comment-edit-bb-end"></div>-->*}}
{{*<!-- <textarea id="comment-edit-text-{{$id}}" class="comment-edit-text-empty" name="body" onFocus="commentOpen(this,{{$id}});cmtBbOpen({{$id}});" onBlur="commentClose(this,{{$id}});cmtBbClose({{$id}});" >{{$comment}}</textarea>-->*}}
<ul class="comment-edit-bb" id="comment-edit-bb-{{$id}}">
<li><a class="editicon boldbb shadow"
style="cursor: pointer;" title="{{$edbold}}"
- onclick="insertFormatting('{{$comment}}','b', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="b" data-id="{{$id}}"></a></li>
<li><a class="editicon italicbb shadow"
style="cursor: pointer;" title="{{$editalic}}"
- onclick="insertFormatting('{{$comment}}','i', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="i" data-id="{{$id}}"></a></li>
<li><a class="editicon underlinebb shadow"
style="cursor: pointer;" title="{{$eduline}}"
- onclick="insertFormatting('{{$comment}}','u', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="u" data-id="{{$id}}"></a></li>
<li><a class="editicon quotebb shadow"
style="cursor: pointer;" title="{{$edquote}}"
- onclick="insertFormatting('{{$comment}}','quote', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="quote" data-id="{{$id}}"></a></li>
<li><a class="editicon codebb shadow"
style="cursor: pointer;" title="{{$edcode}}"
- onclick="insertFormatting('{{$comment}}','code', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="code" data-id="{{$id}}"></a></li>
<li><a class="editicon imagebb shadow"
style="cursor: pointer;" title="{{$edimg}}"
- onclick="insertFormatting('{{$comment}}','img', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="img" data-id="{{$id}}"></a></li>
<li><a class="editicon urlbb shadow"
style="cursor: pointer;" title="{{$edurl}}"
- onclick="insertFormatting('{{$comment}}','url', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="url" data-id="{{$id}}"></a></li>
<li><a class="editicon videobb shadow"
style="cursor: pointer;" title="{{$edvideo}}"
- onclick="insertFormatting('{{$comment}}','video', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="video" data-id="{{$id}}"></a></li>
</ul>
{{*<!-- <div class="comment-edit-bb-end"></div>-->*}}
{{*<!-- <textarea id="comment-edit-text-{{$id}}" class="comment-edit-text-empty" name="body" onFocus="commentOpen(this,{{$id}});cmtBbOpen({{$id}});" onBlur="commentClose(this,{{$id}});cmtBbClose({{$id}});" >{{$comment}}</textarea>-->*}}
class="comment-edit-bb">
<li><a class="editicon boldbb shadow"
style="cursor: pointer;" title="{{$edbold}}"
- onclick="insertFormatting('{{$comment}}','b', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="b" data-id="{{$id}}"></a></li>
<li><a class="editicon italicbb shadow"
style="cursor: pointer;" title="{{$editalic}}"
- onclick="insertFormatting('{{$comment}}','i', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="i" data-id="{{$id}}"></a></li>
<li><a class="editicon underlinebb shadow"
style="cursor: pointer;" title="{{$eduline}}"
- onclick="insertFormatting('{{$comment}}','u', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="u" data-id="{{$id}}"></a></li>
<li><a class="editicon quotebb shadow"
style="cursor: pointer;" title="{{$edquote}}"
- onclick="insertFormatting('{{$comment}}','quote', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="quote" data-id="{{$id}}"></a></li>
<li><a class="editicon codebb shadow"
style="cursor: pointer;" title="{{$edcode}}"
- onclick="insertFormatting('{{$comment}}','code', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="code" data-id="{{$id}}"></a></li>
<li><a class="editicon imagebb shadow"
style="cursor: pointer;" title="{{$edimg}}"
- onclick="insertFormatting('{{$comment}}','img', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="img" data-id="{{$id}}"></a></li>
<li><a class="editicon urlbb shadow"
style="cursor: pointer;" title="{{$edurl}}"
- onclick="insertFormatting('{{$comment}}','url', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="url" data-id="{{$id}}"></a></li>
<li><a class="editicon videobb shadow"
style="cursor: pointer;" title="{{$edvideo}}"
- onclick="insertFormatting('{{$comment}}','video', {{$id}});"></a></li>
+ data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="video" data-id="{{$id}}"></a></li>
</ul>
<textarea id="comment-edit-text-{{$id}}"
class="comment-edit-text-empty"
name="body"
- onFocus="commentOpen(this,{{$id}}) && cmtBbOpen({{$id}});"
- onBlur="commentClose(this,{{$id}}) && cmtBbClose({{$id}});" >{{$comment}}</textarea>
+ onFocus="commentOpen(this,{{$id}}) && cmtBbOpen({{$id}});" >{{$comment}}</textarea>
{{if $qcomment}}
<select id="qcomment-select-{{$id}}" name="qcomment-{{$id}}" class="qcomment" onchange="qCommentInsert(this,{{$id}});" >
<option value=""></option>
<div class="comment-edit-submit-wrapper" id="comment-edit-submit-wrapper-{{$id}}" style="display: none;" >
<div class="comment-edit-bb">
- <a title="{{$edimg}}" onclick="insertFormatting('{{$comment}}','img',{{$id}});"><i class="icon-picture"></i></a>
- <a title="{{$edurl}}" onclick="insertFormatting('{{$comment}}','url',{{$id}});"><i class="icon-link"></i></a>
- <a title="{{$edvideo}}" onclick="insertFormatting('{{$comment}}','video',{{$id}});"><i class="icon-film"></i></a>
+ <a title="{{$edimg}}" data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="img" data-id="{{$id}}"><i class="icon-picture"></i></a>
+ <a title="{{$edurl}}" data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="url" data-id="{{$id}}"><i class="icon-link"></i></a>
+ <a title="{{$edvideo}}" data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="video" data-id="{{$id}}"><i class="icon-film"></i></a>
- <a title="{{$eduline}}" onclick="insertFormatting('{{$comment}}','u',{{$id}});"><i class="icon-underline"></i></a>
- <a title="{{$editalic}}" onclick="insertFormatting('{{$comment}}','i',{{$id}});"><i class="icon-italic"></i></a>
- <a title="{{$edbold}}" onclick="insertFormatting('{{$comment}}','b',{{$id}});"><i class="icon-bold"></i></a>
- <a title="{{$edquote}}" onclick="insertFormatting('{{$comment}}','quote',{{$id}});"><i class="icon-quote-left"></i></a>
+ <a title="{{$eduline}}" data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="u" data-id="{{$id}}"><i class="icon-underline"></i></a>
+ <a title="{{$editalic}}" data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="i" data-id="{{$id}}"><i class="icon-italic"></i></a>
+ <a title="{{$edbold}}" data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="b" data-id="{{$id}}"><i class="icon-bold"></i></a>
+ <a title="{{$edquote}}" data-role="insert-formatting" data-comment="{{$comment}}" data-bbcode="quote" data-id="{{$id}}"><i class="icon-quote-left"></i></a>
</div>
<input type="submit" onclick="post_comment({{$id}}); return false;" id="comment-edit-submit-{{$id}}" class="comment-edit-submit" name="submit" value="{{$submit}}" />