1
0
mirror of https://github.com/e107inc/e107.git synced 2025-05-30 23:59:54 +02:00

Merge pull request #1448 from lonalore/master

Fixed: Insert an image from Media Manager does not work (bbarea). Fixed bbcode buttons.
This commit is contained in:
Cameron 2016-03-23 08:45:13 -07:00
commit 5cac882925
2 changed files with 38 additions and 7 deletions

View File

@ -1206,12 +1206,15 @@ $(document).ready(function()
$(this).attr("target",'_blank');
}
});
// Store selected textarea.
$('.tbox.bbarea').click(function() {
storeCaret(this);
});
@ -1444,6 +1447,8 @@ function SyncWithServerTime(serverTime, path, domain)
var res = window.screen.width + "x" + window.screen.height;
var eself = document.location;
var e107_selectedInputArea;
/* TODO: @SecretR - Object of removal
// From http://phpbb.com
var clientPC = navigator.userAgent.toLowerCase();

View File

@ -36,6 +36,8 @@ $(document).ready(function()
var _float = $('#float').val();
var alt = $('#alt').val();
var target = $(e).attr('data-target');
if(margin_right !='' && margin_right !== undefined)
{
@ -105,7 +107,31 @@ $(document).ready(function()
bb = bb + ']';
bb = bb + path;
bb = bb + '[/img]';
$('#bbcode_holder').val(bb); // Set the BBcode Value.
if(target && target.charAt(0) != "#" && target.charAt(0) != ".")
{
target = "#" + target;
}
var $target = $(target);
if($target.length > 0)
{
$target.val($target.val() + bb);
}
else
{
var $parentTarget = parent.$(target); // From iframe.
if($parentTarget.length > 0)
{
$parentTarget.val($parentTarget.val() + bb);
}
else
{
$('#bbcode_holder').val(bb); // Set the BBcode Value.
}
}
}