Clean up whitespace
This commit is contained in:
@@ -18,8 +18,8 @@ function helpline(help)
|
||||
/**
|
||||
* Fix a bug involving the TextRange object. From
|
||||
* http://www.frostjedi.com/terra/scripts/demo/caretBug.html
|
||||
*/
|
||||
function initInsertions()
|
||||
*/
|
||||
function initInsertions()
|
||||
{
|
||||
var doc;
|
||||
|
||||
@@ -27,7 +27,7 @@ function initInsertions()
|
||||
{
|
||||
doc = document;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
doc = opener.document;
|
||||
}
|
||||
@@ -45,12 +45,12 @@ function initInsertions()
|
||||
* bbstyle
|
||||
*/
|
||||
function bbstyle(bbnumber)
|
||||
{
|
||||
{
|
||||
if (bbnumber != -1)
|
||||
{
|
||||
bbfontstyle(bbtags[bbnumber], bbtags[bbnumber+1]);
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
insert_text('[*]');
|
||||
document.getElementById(text_name).focus();
|
||||
@@ -92,7 +92,7 @@ function bbfontstyle(bbopen, bbclose)
|
||||
|
||||
//The new position for the cursor after adding the bbcode
|
||||
var caret_pos = getCaretPosition(textarea).start;
|
||||
var new_pos = caret_pos + bbopen.length;
|
||||
var new_pos = caret_pos + bbopen.length;
|
||||
|
||||
// Open tag
|
||||
insert_text(bbopen + bbclose);
|
||||
@@ -103,7 +103,7 @@ function bbfontstyle(bbopen, bbclose)
|
||||
{
|
||||
textarea.selectionStart = new_pos;
|
||||
textarea.selectionEnd = new_pos;
|
||||
}
|
||||
}
|
||||
// IE
|
||||
else if (document.selection)
|
||||
{
|
||||
@@ -124,15 +124,15 @@ function insert_text(text, spaces, popup)
|
||||
{
|
||||
var textarea;
|
||||
|
||||
if (!popup)
|
||||
if (!popup)
|
||||
{
|
||||
textarea = document.getElementById(text_name);
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
textarea = opener.document.getElementById(text_name);
|
||||
}
|
||||
if (spaces)
|
||||
if (spaces)
|
||||
{
|
||||
text = ' ' + text + ' ';
|
||||
}
|
||||
@@ -148,7 +148,7 @@ function insert_text(text, spaces, popup)
|
||||
}
|
||||
else if (textarea.createTextRange && textarea.caretPos)
|
||||
{
|
||||
if (baseHeight != textarea.caretPos.boundingHeight)
|
||||
if (baseHeight != textarea.caretPos.boundingHeight)
|
||||
{
|
||||
textarea.focus();
|
||||
storeCaret(textarea);
|
||||
@@ -161,7 +161,7 @@ function insert_text(text, spaces, popup)
|
||||
{
|
||||
textarea.value = textarea.value + text;
|
||||
}
|
||||
if (!popup)
|
||||
if (!popup)
|
||||
{
|
||||
textarea.focus();
|
||||
}
|
||||
@@ -298,7 +298,7 @@ function mozWrap(txtarea, open, close)
|
||||
var selEnd = txtarea.selectionEnd;
|
||||
var scrollTop = txtarea.scrollTop;
|
||||
|
||||
if (selEnd == 1 || selEnd == 2)
|
||||
if (selEnd == 1 || selEnd == 2)
|
||||
{
|
||||
selEnd = selLength;
|
||||
}
|
||||
@@ -424,7 +424,7 @@ function getCaretPosition(txtarea)
|
||||
// calculate selection start point by moving beginning of range_all to beginning of range
|
||||
var sel_start;
|
||||
for (sel_start = 0; range_all.compareEndPoints('StartToStart', range) < 0; sel_start++)
|
||||
{
|
||||
{
|
||||
range_all.moveStart('character', 1);
|
||||
}
|
||||
|
||||
@@ -432,7 +432,7 @@ function getCaretPosition(txtarea)
|
||||
|
||||
// we ignore the end value for IE, this is already dirty enough and we don't need it
|
||||
caretPos.start = txtarea.sel_start;
|
||||
caretPos.end = txtarea.sel_start;
|
||||
caretPos.end = txtarea.sel_start;
|
||||
}
|
||||
|
||||
return caretPos;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*! Copyright (c) 2008 Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
|
||||
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
|
||||
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
|
||||
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
|
||||
*/
|
||||
|
||||
|
||||
@@ -5,33 +5,33 @@
|
||||
* to offer multiple easing options
|
||||
*
|
||||
* TERMS OF USE - jQuery Easing
|
||||
*
|
||||
* Open source under the BSD License.
|
||||
*
|
||||
*
|
||||
* Open source under the BSD License.
|
||||
*
|
||||
* Copyright © 2008 George McGinley Smith
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this list of
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the author nor the names of contributors may be used to endorse
|
||||
*
|
||||
* Neither the name of the author nor the names of contributors may be used to endorse
|
||||
* or promote products derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -147,7 +147,7 @@ jQuery.extend( jQuery.easing,
|
||||
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
|
||||
},
|
||||
easeInOutBack: function (x, t, b, c, d, s) {
|
||||
if (s == undefined) s = 1.70158;
|
||||
if (s == undefined) s = 1.70158;
|
||||
if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
|
||||
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
|
||||
},
|
||||
@@ -174,32 +174,32 @@ jQuery.extend( jQuery.easing,
|
||||
/*
|
||||
*
|
||||
* TERMS OF USE - EASING EQUATIONS
|
||||
*
|
||||
* Open source under the BSD License.
|
||||
*
|
||||
*
|
||||
* Open source under the BSD License.
|
||||
*
|
||||
* Copyright © 2001 Robert Penner
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this list of
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* Neither the name of the author nor the names of contributors may be used to endorse
|
||||
*
|
||||
* Neither the name of the author nor the names of contributors may be used to endorse
|
||||
* or promote products derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -1,87 +1,86 @@
|
||||
/**
|
||||
*
|
||||
* @package Board3 Portal v2.1 - javascript code
|
||||
* @copyright (c) 2014 Board3 Group ( www.board3.de )
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
/* global phpbb, jQuery */
|
||||
|
||||
(function($) { // Avoid conflicts with other libraries
|
||||
|
||||
"use strict";
|
||||
|
||||
var portal_right_width;
|
||||
|
||||
/**
|
||||
* Correctly align the right column underneath the left column.
|
||||
* This will make sure that the right column doesn't start before the end of
|
||||
* the center column but rather right after the last module of the left column.
|
||||
*/
|
||||
phpbb.b3p_fix_right_column_margin = function() {
|
||||
var width = $(window).width(),
|
||||
$portal_right = $('#portal-right'),
|
||||
$portal_left = $('#portal-left'),
|
||||
$portal_center = $('#portal-center'),
|
||||
marginLeft = 'margin-left',
|
||||
marginRight = 'margin-right';
|
||||
|
||||
if ($('body').hasClass('rtl')) {
|
||||
marginLeft = marginRight;
|
||||
marginRight = 'margin-left';
|
||||
}
|
||||
|
||||
|
||||
if (width <= (895 - $.getScrollbarWidth())) {
|
||||
// Get correct margin-left for portal-right and add 10px for padding
|
||||
if ($portal_left.width() > 0) {
|
||||
if (!$portal_center.length && $portal_left.length) {
|
||||
$portal_right.css(marginLeft, 5);
|
||||
$portal_left.css(marginRight, 0);
|
||||
} else {
|
||||
$portal_right.css(marginLeft, - ($portal_right.width() + 1));
|
||||
}
|
||||
} else {
|
||||
$portal_right.css(marginLeft, 0);
|
||||
}
|
||||
} else {
|
||||
if (!$portal_center.length && $portal_left.length) {
|
||||
$portal_right.css(marginLeft, 0);
|
||||
} else {
|
||||
$portal_right.css(marginLeft, -portal_right_width);
|
||||
}
|
||||
$portal_right.width(portal_right_width);
|
||||
phpbb.b3pFixLeftColumnMargin();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Correctly align left column if center column does not exist
|
||||
*/
|
||||
phpbb.b3pFixLeftColumnMargin = function() {
|
||||
var $portalLeft = $('#portal-left'),
|
||||
marginLeft = 'margin-left',
|
||||
marginRight = 'margin-right';
|
||||
|
||||
if ($('body').hasClass('rtl')) {
|
||||
marginLeft = marginRight;
|
||||
marginRight = 'margin-left';
|
||||
}
|
||||
|
||||
if ($portalLeft.length && !$('#portal-center').length) {
|
||||
$portalLeft.css(marginLeft, '0');
|
||||
$portalLeft.css(marginRight, 10);
|
||||
}
|
||||
};
|
||||
|
||||
$(document).ready(function() {
|
||||
portal_right_width = $('#portal-right').attr('data-width');
|
||||
phpbb.b3pFixLeftColumnMargin();
|
||||
phpbb.b3p_fix_right_column_margin();
|
||||
$(window).resize(function() {
|
||||
phpbb.b3p_fix_right_column_margin();
|
||||
});
|
||||
});
|
||||
|
||||
})(jQuery); // Avoid conflicts with other libraries
|
||||
/**
|
||||
*
|
||||
* @package Board3 Portal v2.1 - javascript code
|
||||
* @copyright (c) 2014 Board3 Group ( www.board3.de )
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
/* global phpbb, jQuery */
|
||||
|
||||
(function($) { // Avoid conflicts with other libraries
|
||||
|
||||
"use strict";
|
||||
|
||||
var portal_right_width;
|
||||
|
||||
/**
|
||||
* Correctly align the right column underneath the left column.
|
||||
* This will make sure that the right column doesn't start before the end of
|
||||
* the center column but rather right after the last module of the left column.
|
||||
*/
|
||||
phpbb.b3p_fix_right_column_margin = function() {
|
||||
var width = $(window).width(),
|
||||
$portal_right = $('#portal-right'),
|
||||
$portal_left = $('#portal-left'),
|
||||
$portal_center = $('#portal-center'),
|
||||
marginLeft = 'margin-left',
|
||||
marginRight = 'margin-right';
|
||||
|
||||
if ($('body').hasClass('rtl')) {
|
||||
marginLeft = marginRight;
|
||||
marginRight = 'margin-left';
|
||||
}
|
||||
|
||||
if (width <= (895 - $.getScrollbarWidth())) {
|
||||
// Get correct margin-left for portal-right and add 10px for padding
|
||||
if ($portal_left.width() > 0) {
|
||||
if (!$portal_center.length && $portal_left.length) {
|
||||
$portal_right.css(marginLeft, 5);
|
||||
$portal_left.css(marginRight, 0);
|
||||
} else {
|
||||
$portal_right.css(marginLeft, - ($portal_right.width() + 1));
|
||||
}
|
||||
} else {
|
||||
$portal_right.css(marginLeft, 0);
|
||||
}
|
||||
} else {
|
||||
if (!$portal_center.length && $portal_left.length) {
|
||||
$portal_right.css(marginLeft, 0);
|
||||
} else {
|
||||
$portal_right.css(marginLeft, -portal_right_width);
|
||||
}
|
||||
$portal_right.width(portal_right_width);
|
||||
phpbb.b3pFixLeftColumnMargin();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Correctly align left column if center column does not exist
|
||||
*/
|
||||
phpbb.b3pFixLeftColumnMargin = function() {
|
||||
var $portalLeft = $('#portal-left'),
|
||||
marginLeft = 'margin-left',
|
||||
marginRight = 'margin-right';
|
||||
|
||||
if ($('body').hasClass('rtl')) {
|
||||
marginLeft = marginRight;
|
||||
marginRight = 'margin-left';
|
||||
}
|
||||
|
||||
if ($portalLeft.length && !$('#portal-center').length) {
|
||||
$portalLeft.css(marginLeft, '0');
|
||||
$portalLeft.css(marginRight, 10);
|
||||
}
|
||||
};
|
||||
|
||||
$(document).ready(function() {
|
||||
portal_right_width = $('#portal-right').attr('data-width');
|
||||
phpbb.b3pFixLeftColumnMargin();
|
||||
phpbb.b3p_fix_right_column_margin();
|
||||
$(window).resize(function() {
|
||||
phpbb.b3p_fix_right_column_margin();
|
||||
});
|
||||
});
|
||||
|
||||
})(jQuery); // Avoid conflicts with other libraries
|
||||
|
||||
Reference in New Issue
Block a user