Version 3.3.4
This commit is contained in:
1 parent
78706903a2
commit
fb6b5baabc
2206 files changed
+409828
-382984
No files matched your search
Vendored
+9
-9
@@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,77 +1,77 @@
|
||||
/************************************************/
|
||||
/* IPB3 Javascript */
|
||||
/* -------------------------------------------- */
|
||||
/* ips.forms.js - Javascript for forms */
|
||||
/* (c) IPS, Inc 2008 */
|
||||
/* -------------------------------------------- */
|
||||
/* Author: Brandon Farber (mostly) */
|
||||
/************************************************/
|
||||
|
||||
var formHelper = {
|
||||
init: function()
|
||||
{
|
||||
Debug.write("Initializing acp.forms.js");
|
||||
|
||||
document.observe("dom:loaded", function(){
|
||||
formHelper.initEvents();
|
||||
});
|
||||
},
|
||||
|
||||
initEvents: function()
|
||||
{
|
||||
if( $('checkAll') )
|
||||
{
|
||||
$('checkAll').observe( 'click', formHelper.checkAll );
|
||||
}
|
||||
|
||||
$$('.checkAll').each( function(check){
|
||||
check.observe( 'click', formHelper.unCheckAll );
|
||||
} );
|
||||
},
|
||||
|
||||
checkAll: function(e)
|
||||
{
|
||||
check = Event.findElement(e, 'input');
|
||||
toCheck = $F(check);
|
||||
|
||||
$$('.checkAll').each( function(check){
|
||||
if( toCheck != null )
|
||||
{
|
||||
check.checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
check.checked = false;
|
||||
}
|
||||
});
|
||||
return false;
|
||||
},
|
||||
|
||||
unCheckAll: function(e)
|
||||
{
|
||||
if( $('checkAll') )
|
||||
{
|
||||
var isAnyUnchecked = false;
|
||||
|
||||
$$('.checkAll').each( function(check){
|
||||
if( !check.checked )
|
||||
{
|
||||
isAnyUnchecked = true;
|
||||
}
|
||||
});
|
||||
|
||||
if( isAnyUnchecked )
|
||||
{
|
||||
$('checkAll').checked = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$('checkAll').checked = true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
/************************************************/
|
||||
/* IPB3 Javascript */
|
||||
/* -------------------------------------------- */
|
||||
/* ips.forms.js - Javascript for forms */
|
||||
/* (c) IPS, Inc 2008 */
|
||||
/* -------------------------------------------- */
|
||||
/* Author: Brandon Farber (mostly) */
|
||||
/************************************************/
|
||||
|
||||
var formHelper = {
|
||||
init: function()
|
||||
{
|
||||
Debug.write("Initializing acp.forms.js");
|
||||
|
||||
document.observe("dom:loaded", function(){
|
||||
formHelper.initEvents();
|
||||
});
|
||||
},
|
||||
|
||||
initEvents: function()
|
||||
{
|
||||
if( $('checkAll') )
|
||||
{
|
||||
$('checkAll').observe( 'click', formHelper.checkAll );
|
||||
}
|
||||
|
||||
$$('.checkAll').each( function(check){
|
||||
check.observe( 'click', formHelper.unCheckAll );
|
||||
} );
|
||||
},
|
||||
|
||||
checkAll: function(e)
|
||||
{
|
||||
check = Event.findElement(e, 'input');
|
||||
toCheck = $F(check);
|
||||
|
||||
$$('.checkAll').each( function(check){
|
||||
if( toCheck != null )
|
||||
{
|
||||
check.checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
check.checked = false;
|
||||
}
|
||||
});
|
||||
return false;
|
||||
},
|
||||
|
||||
unCheckAll: function(e)
|
||||
{
|
||||
if( $('checkAll') )
|
||||
{
|
||||
var isAnyUnchecked = false;
|
||||
|
||||
$$('.checkAll').each( function(check){
|
||||
if( !check.checked )
|
||||
{
|
||||
isAnyUnchecked = true;
|
||||
}
|
||||
});
|
||||
|
||||
if( isAnyUnchecked )
|
||||
{
|
||||
$('checkAll').checked = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$('checkAll').checked = true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
formHelper.init();
|
||||
@@ -291,7 +291,7 @@ _hooks.prototype.hooks = {
|
||||
|
||||
var url = acp.hooks.fields[ id ]['url'];
|
||||
|
||||
if( !url ){ alert("Не возможно сохранить; отсутствует url"); return; }
|
||||
if( !url ){ alert("Cannot save form; url missing"); return; }
|
||||
|
||||
url = ipb.vars['base_url'] + url + '&secure_key=' + ipb.vars['md5_hash'];
|
||||
url = url.replace( /&/g, '&' );
|
||||
@@ -339,13 +339,13 @@ _hooks.prototype.hooks = {
|
||||
{
|
||||
if( Object.isUndefined( t.responseJSON ) )
|
||||
{
|
||||
alert("Ошибка: " + t.responseJSON);
|
||||
alert("An error occurred: " + t.responseJSON);
|
||||
return;
|
||||
}
|
||||
|
||||
if( !t.responseJSON['success'] )
|
||||
{
|
||||
alert("Ошибка: " + t.responseJSON['error'] );
|
||||
alert("An error occurred: " + t.responseJSON['error'] );
|
||||
return;
|
||||
}
|
||||
else
|
||||
@@ -361,10 +361,10 @@ _hooks.prototype.hooks = {
|
||||
|
||||
Debug.write("Success");
|
||||
},
|
||||
onException: function(t){ alert("Ошибка: " + t.responseText); },
|
||||
onFailure: function(t){ alert("Ошибка: " + t.responseText ); }
|
||||
onException: function(t){ alert("An error occurred: " + t.responseText); },
|
||||
onFailure: function(t){ alert("An error occurred: " + t.responseText ); }
|
||||
} );
|
||||
}
|
||||
};
|
||||
|
||||
acp.hooks.init();
|
||||
acp.hooks.init();
|
||||
@@ -104,7 +104,7 @@ function ipsInlineForm()
|
||||
}
|
||||
else
|
||||
{
|
||||
alert( "Неизвестная ошибка" );
|
||||
alert( "Unspecified error" );
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -123,7 +123,7 @@ function ipsInlineForm()
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("Не хватает данных. Невозможно загрузить форму");
|
||||
alert("Data missing, could not load the form");
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -235,7 +235,7 @@ function ipsInlineForm()
|
||||
}
|
||||
else
|
||||
{
|
||||
alert("Не хватает данных. Невозможно загрузить форму");
|
||||
alert("Data missing, could not load the form");
|
||||
}
|
||||
};
|
||||
|
||||
@@ -263,14 +263,14 @@ function ipsInlineForm()
|
||||
*/
|
||||
this.timeOutAjax = function( t )
|
||||
{
|
||||
if ( confirm( "Сервер не отвечает.\nЖелаете подождать еще?" ) )
|
||||
if ( confirm( "No response from the webserver.\nDo you wish to continue waiting?" ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
t.transport.abort();
|
||||
alert( "Запрос отменен" );
|
||||
alert( "Request Cancelled" );
|
||||
}
|
||||
};
|
||||
|
||||
@@ -279,7 +279,7 @@ function ipsInlineForm()
|
||||
*/
|
||||
this.failureAjax = function( t )
|
||||
{
|
||||
alert( "Ошибка: " + t.responseText );
|
||||
alert( "Failure: " + t.responseText );
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
+378
-52
@@ -18,7 +18,7 @@ var ips = (function($){
|
||||
|
||||
jQ(document).ready(function() {
|
||||
ips.init();
|
||||
jQ("#app_menu").ipsMultiMenu();
|
||||
jQ("#app_menu").ipsMultiMenu( { keyboardTrigger: 77 } );
|
||||
sidebar.init();
|
||||
livesearch.init();
|
||||
});
|
||||
@@ -141,8 +141,10 @@ var livesearch = {}, sidebar = {};
|
||||
runSearch = function(){
|
||||
// Keep it going
|
||||
timeouts['show'] = setTimeout( runSearch, options.showDelay );
|
||||
|
||||
var curVal = $elem.val();
|
||||
|
||||
/* trim() is not chainable, throws error in IE8
|
||||
@link http://stackoverflow.com/questions/3439316/ie8-and-jquerys-trim */
|
||||
var curVal = $.trim( $elem.val() );
|
||||
var timeNow = new Date().getTime();
|
||||
|
||||
if ( options.lastPress && timeNow && ( ( timeNow - options.lastPress ) < 800 ) )
|
||||
@@ -174,7 +176,7 @@ var livesearch = {}, sidebar = {};
|
||||
else
|
||||
{
|
||||
$('#acp_loading').show();
|
||||
|
||||
|
||||
$.ajax( {
|
||||
url: ipb.vars['app_url'].replace( /&/g, '&' ) + "app=core&module=ajax§ion=livesearch&do=search&secure_key=" + ipb.vars['md5_hash'],
|
||||
type: 'POST',
|
||||
@@ -329,6 +331,66 @@ var livesearch = {}, sidebar = {};
|
||||
}
|
||||
}(jQuery);
|
||||
|
||||
/****************************************/
|
||||
/* Changes checkboxes into button toggles */
|
||||
/****************************************/
|
||||
$.fn.ipsToggler = function(options) {
|
||||
var $$ = $(this);
|
||||
|
||||
//----------------------------------------------
|
||||
// Prepares this checkbox
|
||||
//----------------------------------------------
|
||||
var setup = function( elem ){
|
||||
var newElem = $('<span/>')
|
||||
.attr('id', elem.id + '_toggler')
|
||||
.addClass( options.baseClass )
|
||||
.html('<span>Toggle</span>')
|
||||
.data('original', elem );
|
||||
|
||||
if( elem.checked ){
|
||||
newElem
|
||||
.addClass( options.on.cssClass )
|
||||
.attr('title', options.on.title );
|
||||
} else {
|
||||
newElem
|
||||
.addClass( options.off.cssClass )
|
||||
.attr('title', options.off.title );
|
||||
}
|
||||
|
||||
$( elem )
|
||||
.hide()
|
||||
.before( newElem );
|
||||
|
||||
$( newElem )
|
||||
.click( function(e){
|
||||
if( $( this ).hasClass('on') ){
|
||||
$( elem ).removeAttr('checked');
|
||||
$( this )
|
||||
.removeClass('on')
|
||||
.addClass('off')
|
||||
.attr('title', options.off.title);
|
||||
} else {
|
||||
$( elem ).attr('checked', 'checked');
|
||||
$( this )
|
||||
.removeClass('off')
|
||||
.addClass('on')
|
||||
.attr('title', options.off.title);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//----------------------------------------------
|
||||
// Event handler for the new toggle element
|
||||
//----------------------------------------------
|
||||
toggle = function(e){
|
||||
|
||||
};
|
||||
|
||||
return this.each(function(){
|
||||
setup( this );
|
||||
});
|
||||
};
|
||||
|
||||
/****************************************/
|
||||
/* Wizard bar (step by step) */
|
||||
/****************************************/
|
||||
@@ -447,61 +509,306 @@ var livesearch = {}, sidebar = {};
|
||||
};
|
||||
|
||||
/****************************************/
|
||||
/* Multi-level drop down menu */
|
||||
/* Multi-level drop down menu, with */
|
||||
/* keyboard navigation */
|
||||
/****************************************/
|
||||
$.fn.ipsMultiMenu = function(options) {
|
||||
$.fn.ipsMultiMenu = function(options) {
|
||||
var defaults = {
|
||||
speed: 'fast'
|
||||
},
|
||||
options = $.extend( defaults, options),
|
||||
useHoverIntent: true,
|
||||
},
|
||||
options = $.extend( defaults, options ),
|
||||
arrow = $("<span class='menu_arrow'>»</span>"),
|
||||
timeouts = {};
|
||||
|
||||
|
||||
// Private methods
|
||||
//----------------------------------------------
|
||||
// Mouse enter event
|
||||
//----------------------------------------------
|
||||
var mOver = function(e){
|
||||
if( $(this).data('timeout') ){
|
||||
clearTimeout( this.data('timeout') );
|
||||
$(this).data('timeout', false);
|
||||
clearTimeout( timeouts['menu'] );
|
||||
|
||||
if( !$(this).parent("ul").hasClass('root') && $(this).children('ul').length ){
|
||||
positionSubmenu( $(this) );
|
||||
}
|
||||
|
||||
var w = ($(this).outerWidth() - 5),
|
||||
children = $(this).children('ul:first'),
|
||||
docSize = $(window).width();
|
||||
|
||||
if( !$(this).parent("ul").hasClass('root') ){
|
||||
|
||||
children.css('left', w).css('top', -20);
|
||||
|
||||
// jQuery can't get offset from hidden elements, so show, measure, then hide.
|
||||
children.show();
|
||||
var childW = children.outerWidth();
|
||||
var realLeft = children.offset().left + childW + 5;
|
||||
children.hide();
|
||||
|
||||
if( realLeft >= docSize ){
|
||||
children.css('left', 5 - childW );
|
||||
}
|
||||
}
|
||||
|
||||
// Check if it's too far off the screen
|
||||
//children.fadeIn( options.speed );
|
||||
$(this).children('ul:first').show();
|
||||
//var _this = this;
|
||||
//setTimeout( function(){ $(_this).children('ul:first').show() }, 150 );
|
||||
|
||||
// Hide any submenus belonging to siblings, then show the submenu for this item
|
||||
$(this).children('ul:first').fadeIn('fast').end().siblings().find('ul').fadeOut('fast');
|
||||
},
|
||||
|
||||
//----------------------------------------------
|
||||
// Mouse leave event
|
||||
//----------------------------------------------
|
||||
mOut = function(e){
|
||||
//$(this).children('ul:first').fadeOut( options.speed );
|
||||
var _this = this;
|
||||
var timeout = setTimeout( function(){ $(_this).children('ul:first').hide() }, 250 );
|
||||
this.data('timeout', timeout);
|
||||
var self = this;
|
||||
timeouts['menu'] = setTimeout(
|
||||
function(){
|
||||
$(self).children('ul:first').fadeOut('fast');
|
||||
}, 800
|
||||
);
|
||||
},
|
||||
|
||||
//----------------------------------------------
|
||||
// Positions a menu according to its parent
|
||||
//----------------------------------------------
|
||||
positionSubmenu = function( menu ){
|
||||
var w = ( $(menu).outerWidth() - 5 ),
|
||||
children = $(menu).children('ul:first'),
|
||||
docSize = $(window).width();
|
||||
|
||||
children.css('left', w).css('top', -5);
|
||||
|
||||
// jQuery can't get offset from hidden elements, so show, measure, then hide.
|
||||
children.show();
|
||||
var childW = children.outerWidth();
|
||||
var realLeft = children.offset().left + childW + 5;
|
||||
children.hide();
|
||||
|
||||
if( realLeft >= docSize ){
|
||||
children.css('left', 5 - childW );
|
||||
}
|
||||
},
|
||||
|
||||
//----------------------------------------------
|
||||
// Main entry point for keydown event
|
||||
//----------------------------------------------
|
||||
kPress = function( e, menu ){
|
||||
e.preventDefault();
|
||||
|
||||
var active = findActiveItem( menu );
|
||||
|
||||
switch( e.keyCode ){
|
||||
case 37: // Left
|
||||
return move.left( $(active) );
|
||||
break;
|
||||
case 39: // Right
|
||||
return move.right( $(active) );
|
||||
break;
|
||||
case 38: // Up
|
||||
return move.up( $(active) );
|
||||
break;
|
||||
case 40: // Down
|
||||
return move.down( $(active) );
|
||||
break;
|
||||
case 32: // Space
|
||||
case 13: // Enter
|
||||
return move.select( $(active) );
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
move = {
|
||||
//----------------------------------------------
|
||||
// Handles selecting an item
|
||||
//----------------------------------------------
|
||||
select: function( active )
|
||||
{
|
||||
if( active.children('a').length ){
|
||||
window.location = active.children('a:first').attr('href');
|
||||
}
|
||||
else if( active.children('ul') ){
|
||||
window.location = active.children('ul').find('a:first').attr('href');
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
//----------------------------------------------
|
||||
// Handles LEFT key
|
||||
//----------------------------------------------
|
||||
left: function( active ){
|
||||
|
||||
// If we're in a sub menu, pressing left should close the sub menu
|
||||
if( !active.parent('ul').is('.root') && !active.parent('ul').is('.root > li > ul') ){
|
||||
active
|
||||
.parent('ul')
|
||||
.find('.current')
|
||||
.removeClass('current')
|
||||
.end()
|
||||
.hide();
|
||||
}
|
||||
// If we're in an app menu, and there's a previous app, we'll show that one
|
||||
else if( active.parent('ul').is('.root > li > ul') && active.parent('ul').parent('li').prev().length ) {
|
||||
active
|
||||
.children('ul')
|
||||
.hide()
|
||||
.end()
|
||||
.removeClass('current')
|
||||
.prev()
|
||||
.addClass('current')
|
||||
.children('ul:first')
|
||||
.show();
|
||||
|
||||
}
|
||||
return false;
|
||||
|
||||
},
|
||||
|
||||
//----------------------------------------------
|
||||
// Handles RIGHT key
|
||||
//----------------------------------------------
|
||||
right: function( active ){
|
||||
|
||||
// If what we have highlighed has a sub menu, show that submenu
|
||||
if( !active.parent().is('.root') && active.has('ul:hidden').length ){
|
||||
positionSubmenu( active );
|
||||
active.children('ul').show().find('li:first').addClass('current');
|
||||
}
|
||||
else {
|
||||
// If we've got something highlighted, and it's in a root app menu, we
|
||||
// close the menu and show the next root app menu instead
|
||||
if( active.parent('ul').is('.root > li > ul') && active.parent('ul').parent('li').next().length ){
|
||||
active
|
||||
.parent('ul')
|
||||
.find('.current')
|
||||
.removeClass('current')
|
||||
.hide()
|
||||
.end()
|
||||
.hide()
|
||||
.parent('li')
|
||||
.removeClass('current')
|
||||
.next()
|
||||
.addClass('current')
|
||||
.children('ul:first')
|
||||
.show();
|
||||
}
|
||||
// If no menu is open but a root app menu is highlighted,
|
||||
// we'll show the next root app
|
||||
else if( active.parent('ul').is('.root') && active.next().length ){
|
||||
active
|
||||
.children('ul')
|
||||
.hide()
|
||||
.end()
|
||||
.removeClass('current')
|
||||
.next()
|
||||
.addClass('current')
|
||||
.children('ul:first')
|
||||
.show();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
//----------------------------------------------
|
||||
// Handles UP key
|
||||
//----------------------------------------------
|
||||
up: function( active ){
|
||||
// Go up an item, if we can
|
||||
if( active.prev().length ){
|
||||
active.removeClass('current').prev().addClass('current');
|
||||
} else {
|
||||
// If not, and this is a root app menu, hide the menu and
|
||||
// make the root item active
|
||||
if( active.parent().is('.root > li > ul') ){
|
||||
active
|
||||
.removeClass('current')
|
||||
.parent()
|
||||
.hide();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
//----------------------------------------------
|
||||
// Handles DOWN key
|
||||
//----------------------------------------------
|
||||
down: function( active ){
|
||||
// If this is a root app menu...
|
||||
if( active.is('.root > li') ){
|
||||
// ...check whether the menu is already shown, and select the first li
|
||||
if( active.children('ul:first').is(':visible') ){
|
||||
active.find('ul:first > li:first').addClass('current');
|
||||
} else {
|
||||
// ...if it isn't visible, show it
|
||||
active.find('>ul').show();
|
||||
}
|
||||
} else {
|
||||
if( active.next().length ){
|
||||
active.removeClass('current').next().addClass('current');
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
//----------------------------------------------
|
||||
// Finds the deepest currently active menu item
|
||||
//----------------------------------------------
|
||||
findActiveItem = function( menu ){
|
||||
return $('.current:visible', menu).last();
|
||||
},
|
||||
|
||||
//----------------------------------------------
|
||||
// Hover event to highlight an item
|
||||
//----------------------------------------------
|
||||
highlight = function( e ){
|
||||
$(this)
|
||||
.addClass('current')
|
||||
.siblings()
|
||||
.removeClass('current')
|
||||
.parents('li')
|
||||
.addClass('current')
|
||||
.siblings()
|
||||
.find('li')
|
||||
.removeClass('current');
|
||||
},
|
||||
|
||||
//----------------------------------------------
|
||||
// Unhighlights an item
|
||||
//----------------------------------------------
|
||||
unhighlight = function( e ){
|
||||
$(this).removeClass('current');
|
||||
};
|
||||
|
||||
return this.each(function(){
|
||||
// Hide all UL
|
||||
$(this).addClass('root');
|
||||
$("ul", this).hide();
|
||||
$("li:has(ul)", this).hover(mOver, mOut).not('.root > li').addClass('has_sub').children("a,span").append(arrow.clone());
|
||||
});
|
||||
};
|
||||
|
||||
//----------------------------------------------
|
||||
// Main item loop
|
||||
//----------------------------------------------
|
||||
return this.each( function(elem){
|
||||
var self = this;
|
||||
|
||||
$(self).addClass('root');
|
||||
$("ul", self).hide();
|
||||
|
||||
$("li", self).hover( highlight, unhighlight );
|
||||
|
||||
$("li", self)[ ( $.fn.hoverIntent && options.useHoverIntent ) ? 'hoverIntent' : 'hover' ]( mOver, mOut )
|
||||
.filter(':has(ul)')
|
||||
.not('.root > li')
|
||||
.addClass('has_sub')
|
||||
.children("a,span")
|
||||
.append( arrow.clone() );
|
||||
|
||||
// Prepare event for keyboard navigation
|
||||
$(document).keydown( function(e){
|
||||
if( options.keyboardTrigger ){
|
||||
// If the user presses the trigger key & ctrl & alt
|
||||
if( e.keyCode == options.keyboardTrigger && e.ctrlKey && e.altKey ){
|
||||
// Show the first menu if nothing is open
|
||||
if( !$('.current', self).length ){
|
||||
$('.root > li:first')
|
||||
.addClass('current')
|
||||
.children('ul:first')
|
||||
.show()
|
||||
.children('li:first')
|
||||
.addClass('current');
|
||||
}
|
||||
// or close everything if something was open
|
||||
else {
|
||||
$( self )
|
||||
.find('.current')
|
||||
.removeClass('current')
|
||||
.end()
|
||||
.find('ul')
|
||||
.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Handle navigational keypresses
|
||||
if( $('.current', self).length ){
|
||||
kPress( e, self );
|
||||
}
|
||||
});
|
||||
})
|
||||
};
|
||||
|
||||
/****************************************/
|
||||
/* Sortable */
|
||||
@@ -572,6 +879,11 @@ var livesearch = {}, sidebar = {};
|
||||
{
|
||||
Debug.write("Sortable update successfully posted");
|
||||
}
|
||||
|
||||
if ( ! Object.isUndefined( o['postUpdateProcess'] ) )
|
||||
{
|
||||
o['postUpdateProcess']( data );
|
||||
}
|
||||
},
|
||||
error: function(){
|
||||
alert( ipb.lang['session_timed_out'] );
|
||||
@@ -614,9 +926,13 @@ var livesearch = {}, sidebar = {};
|
||||
.removeClass("active");
|
||||
|
||||
// Animate tab content
|
||||
$("#tab_" + curID + "_content").fadeOut();
|
||||
/*$("#tab_" + curID + "_content").fadeOut();
|
||||
$( options['tabWrap'] ).animate();
|
||||
$("#tab_" + newID + "_content").fadeIn();
|
||||
$("#tab_" + newID + "_content").fadeIn();*/
|
||||
|
||||
$("#tab_" + curID + "_content").hide();
|
||||
$( options['tabWrap'] ).animate();
|
||||
$("#tab_" + newID + "_content").show();
|
||||
},
|
||||
scrollTabs = function(e){
|
||||
var tar = $(e.target);
|
||||
@@ -703,3 +1019,13 @@ var livesearch = {}, sidebar = {};
|
||||
};
|
||||
|
||||
}(jQuery));
|
||||
|
||||
/**
|
||||
* hoverIntent r6 // 2011.02.26 // jQuery 1.5.1+
|
||||
* <http://cherne.net/brian/resources/jquery.hoverIntent.html>
|
||||
*
|
||||
* @param f onMouseOver function || An object with configuration options
|
||||
* @param g onMouseOut function || Nothing (use configuration options object)
|
||||
* @author Brian Cherne brian(at)cherne(dot)net
|
||||
*/
|
||||
(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev])}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev])};var handleHover=function(e){var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t)}if(e.type=="mouseenter"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob)},cfg.timeout)}}};return this.bind('mouseenter',handleHover).bind('mouseleave',handleHover)}})(jQuery);
|
||||
@@ -183,6 +183,8 @@ var memberlist = {};
|
||||
$( this ).remove();
|
||||
checkForEmptyTable();
|
||||
});
|
||||
|
||||
emptyCache();
|
||||
}
|
||||
}
|
||||
else if( data['error'] ) {
|
||||
@@ -219,7 +221,7 @@ var memberlist = {};
|
||||
|
||||
if( mids == "" ){ return; }
|
||||
mids = mids.join("&");
|
||||
|
||||
|
||||
var url = request_url + "&do=do_" + _do + "&type=" + _action + "&" + mids;
|
||||
|
||||
//Debug.write( url );
|
||||
@@ -234,7 +236,14 @@ var memberlist = {};
|
||||
.fadeOut('slow', function(){
|
||||
$( this ).remove();
|
||||
checkForEmptyTable();
|
||||
});
|
||||
});
|
||||
|
||||
emptyCache();
|
||||
|
||||
if ( _action == 'resend' )
|
||||
{
|
||||
ipb.global.showInlineNotification( ipb.lang['members_validation_resent'] );
|
||||
}
|
||||
}
|
||||
else if( data['error'] ) {
|
||||
alert( data['error'] );
|
||||
@@ -406,6 +415,12 @@ var memberlist = {};
|
||||
return hashParams;
|
||||
},
|
||||
|
||||
// Empties the cache
|
||||
emptyCache = function()
|
||||
{
|
||||
resultsCache = {};
|
||||
},
|
||||
|
||||
// Fetches results from the server or cache using our params object
|
||||
fetchResults = function( options, force )
|
||||
{
|
||||
@@ -484,6 +499,9 @@ var memberlist = {};
|
||||
$("tbody#member_results", table).html( results['members'] );
|
||||
$(".pagination").replaceWith( results['pages'] );
|
||||
|
||||
// Reset check all checkbox
|
||||
$(".check_all").attr("checked", false);
|
||||
|
||||
// Check prune/move
|
||||
checkPruneAndMove( currentOptions['type'] );
|
||||
},
|
||||
@@ -498,7 +516,7 @@ var memberlist = {};
|
||||
searchTimeout = setTimeout( runSearch, 300 );
|
||||
var curVal = $("#member_search").val();
|
||||
|
||||
if( curVal == lastVal || curVal.length < 3 ){
|
||||
if( curVal == lastVal || ( curVal.length > 0 && curVal.length < 3 ) ){
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ var IPBACP = Class.create({
|
||||
{
|
||||
if ( ! t.responseJSON )
|
||||
{
|
||||
acp.errorDialogue( 'К сожалению, возникла проблема при обработке запроса :(' );
|
||||
acp.errorDialogue( 'Oops, something has gone wrong. Sadly I am unable to tell you what. :(' );
|
||||
}
|
||||
if ( t.responseJSON['error'] )
|
||||
{
|
||||
@@ -135,7 +135,7 @@ var IPBACP = Class.create({
|
||||
*/
|
||||
errorDialogue: function( text )
|
||||
{
|
||||
content = "<h3>Ошибка</h3><div class='ajax-inline-error' style='height: 20px; text-align:center'><p>" + text + "</p></div>";
|
||||
content = "<h3>Error</h3><div class='ajax-inline-error' style='height: 40px; text-align:center'><p class='ipsPad'>" + text + "</p></div>";
|
||||
|
||||
new ipb.Popup( 'generic__errorDialogue', { type: 'pane',
|
||||
initial: content,
|
||||
@@ -154,7 +154,7 @@ var IPBACP = Class.create({
|
||||
*/
|
||||
okDialogue: function( text )
|
||||
{
|
||||
content = "<h3>Сообщение</h3><div class='ajax-inline-message' style='height: 20px; text-align:center'><p>" + text + "</p></div>";
|
||||
content = "<h3>Message</h3><div class='ajax-inline-message' style='height: 40px; text-align:center'><p class='ipsPad'>" + text + "</p></div>";
|
||||
|
||||
new ipb.Popup( 'generic__okDialogue', { type: 'pane',
|
||||
initial: content,
|
||||
@@ -171,7 +171,7 @@ var IPBACP = Class.create({
|
||||
|
||||
if ( ! msg )
|
||||
{
|
||||
msg = 'ПОДТВЕРЖДЕНИЕ:\nНажмите OK для продолжения удаления';
|
||||
msg = ipb.lang['ok_to_delete'];
|
||||
}
|
||||
|
||||
if ( confirm( msg ) )
|
||||
@@ -225,7 +225,7 @@ var IPBACP = Class.create({
|
||||
pages = Math.ceil( total_posts / per_page );
|
||||
}
|
||||
|
||||
msg = "Введите номер страницы от 1 до" + " " + pages;
|
||||
msg = ipb.lang['page_multijump'] + pages;
|
||||
|
||||
if ( cur_st > 0 )
|
||||
{
|
||||
|
||||
@@ -61,8 +61,8 @@ _languages.prototype.languages = {
|
||||
*/
|
||||
kill: function( e )
|
||||
{
|
||||
Event.stop(e);
|
||||
if ( confirm( "Нажатие кнопки OK удалит все файлы из директории перевода, а также завершит сессию перевода.\nВНИМАНИЕ - убедитесь что вы импортировали все изменения из файлов." ) )
|
||||
Event.stop(e);
|
||||
if ( confirm( "Click OK to remove files from translate directory and to remove this translate session.\nNOTE - make sure you import any changed files FIRST\nThis will not do this for you" ) )
|
||||
{
|
||||
window.location = ipb.vars['base_url'] + 'app=core&module=languages§ion=manage_languages&do=translateKill';
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ _temp.prototype.members = {
|
||||
|
||||
(evt) ? el.dispatchEvent(evt) : (el.click && el.click());
|
||||
},
|
||||
|
||||
|
||||
newPhoto: function( e, url )
|
||||
{
|
||||
Event.stop(e);
|
||||
@@ -73,7 +73,7 @@ _temp.prototype.members = {
|
||||
|
||||
acp.members.popups['photo'] = new ipb.Popup('m_ban', { type: 'pane', modal: false, hideAtStart: false, w: '600px', h: 500, ajaxURL: url } );
|
||||
},
|
||||
|
||||
|
||||
removePhoto: function( e, member_id )
|
||||
{
|
||||
Event.stop(e);
|
||||
@@ -124,10 +124,10 @@ _temp.prototype.members = {
|
||||
|
||||
url = ipb.vars['base_url'] + url + '&secure_key=' + ipb.vars['md5_hash'];
|
||||
url = url.replace( /&/g, '&' );
|
||||
|
||||
|
||||
acp.members.popups[ id ] = new ipb.Popup('m_' + id, { type: 'pane', modal: false, hideAtStart: false, w: '700px', ajaxURL: url } );
|
||||
},
|
||||
|
||||
|
||||
hideActionMenu: function()
|
||||
{
|
||||
if ( $('member_tasks_menucontent').visible() )
|
||||
|
||||
@@ -46,7 +46,14 @@ _menu.prototype.menus = {
|
||||
|
||||
docCloseAll: function( e )
|
||||
{
|
||||
if ( Event.element(e).up('.ipbmenu_content') )
|
||||
try
|
||||
{
|
||||
if ( Event.element(e).up('.ipbmenu_content') )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
+103
-103
@@ -1,103 +1,103 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// IPS JS: Permissions
|
||||
// (c) 2008 Invision Power Services, Inc.
|
||||
// http://hatynka.in
|
||||
// Brandon Farber - 16th December
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
ACPPermissions = {
|
||||
hasBeenLoaded: false,
|
||||
|
||||
/*------------------------------*/
|
||||
/* Constructor */
|
||||
/*------------------------------*/
|
||||
init: function()
|
||||
{
|
||||
Debug.write("Initializing acp.permissions.js");
|
||||
|
||||
document.observe("dom:loaded", function(){
|
||||
Event.observe(
|
||||
'adminform',
|
||||
'submit',
|
||||
function( e )
|
||||
{
|
||||
var checkboxes = $('perm-matrix').getElementsByTagName( 'input' );
|
||||
|
||||
for( var i = 0; i < checkboxes.length; i++ )
|
||||
{
|
||||
if( checkboxes[i].checked )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if( confirm( 'Вы не выбрали никаких прав доступа. Хотите продолжить ?' ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Event.stop( e );
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
$$('.column_header').each( function(elem){
|
||||
elem.observe( "click", ACPPermissions.checkColumn );
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
checkColumn: function(e)
|
||||
{
|
||||
// Conditional to see if checkbox or cell was clicked...
|
||||
|
||||
try
|
||||
{
|
||||
var master = Event.findElement( e, 'input' ).id;
|
||||
var checked = $(master).checked ? 1 : 0;
|
||||
|
||||
$(master).checked = checked;
|
||||
}
|
||||
catch( error )
|
||||
{
|
||||
var master = Event.findElement( e, 'td' ).down('input').id;
|
||||
var checked = $(master).checked ? 0 : 1;
|
||||
$(master).checked = checked;
|
||||
}
|
||||
|
||||
var column = master.replace( /col_/, '' );
|
||||
|
||||
var checkboxes = $('perm-matrix').getElementsByTagName( 'input' );
|
||||
|
||||
for( var i = 0; i < checkboxes.length; i++ )
|
||||
{
|
||||
var cbox = checkboxes[i];
|
||||
|
||||
if( cbox.id.match( "^perm_(.+?)_" + column ) )
|
||||
{
|
||||
cbox.checked = checked;
|
||||
}
|
||||
}
|
||||
|
||||
Event.stop(e);
|
||||
return false;
|
||||
},
|
||||
|
||||
checkRow: function( row, value )
|
||||
{
|
||||
var checkboxes = $('perm-matrix').getElementsByTagName( 'input' );
|
||||
|
||||
for( var i = 0; i < checkboxes.length; i++ )
|
||||
{
|
||||
var cbox = checkboxes[i];
|
||||
|
||||
if( cbox.id.match( "^perm_" + row + "_(.+?)" ) )
|
||||
{
|
||||
cbox.checked = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
ACPPermissions.init();
|
||||
//------------------------------------------------------------------------------
|
||||
// IPS JS: Permissions
|
||||
// (c) 2008 Invision Power Services, Inc.
|
||||
// http://www.invisionpower.com
|
||||
// Brandon Farber - 16th December
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
ACPPermissions = {
|
||||
hasBeenLoaded: false,
|
||||
|
||||
/*------------------------------*/
|
||||
/* Constructor */
|
||||
/*------------------------------*/
|
||||
init: function()
|
||||
{
|
||||
Debug.write("Initializing acp.permissions.js");
|
||||
|
||||
document.observe("dom:loaded", function(){
|
||||
Event.observe(
|
||||
'adminform',
|
||||
'submit',
|
||||
function( e )
|
||||
{
|
||||
var checkboxes = $('perm-matrix').getElementsByTagName( 'input' );
|
||||
|
||||
for( var i = 0; i < checkboxes.length; i++ )
|
||||
{
|
||||
if( checkboxes[i].checked )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if( confirm( 'You did not select any permissions, would you like to continue anyways?' ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Event.stop( e );
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
$$('.column_header').each( function(elem){
|
||||
elem.observe( "click", ACPPermissions.checkColumn );
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
checkColumn: function(e)
|
||||
{
|
||||
// Conditional to see if checkbox or cell was clicked...
|
||||
|
||||
try
|
||||
{
|
||||
var master = Event.findElement( e, 'input' ).id;
|
||||
var checked = $(master).checked ? 1 : 0;
|
||||
|
||||
$(master).checked = checked;
|
||||
}
|
||||
catch( error )
|
||||
{
|
||||
var master = Event.findElement( e, 'td' ).down('input').id;
|
||||
var checked = $(master).checked ? 0 : 1;
|
||||
$(master).checked = checked;
|
||||
}
|
||||
|
||||
var column = master.replace( /col_/, '' );
|
||||
|
||||
var checkboxes = $('perm-matrix').getElementsByTagName( 'input' );
|
||||
|
||||
for( var i = 0; i < checkboxes.length; i++ )
|
||||
{
|
||||
var cbox = checkboxes[i];
|
||||
|
||||
if( cbox.id.match( "^perm_(.+?)_" + column ) )
|
||||
{
|
||||
cbox.checked = checked;
|
||||
}
|
||||
}
|
||||
|
||||
Event.stop(e);
|
||||
return false;
|
||||
},
|
||||
|
||||
checkRow: function( row, value )
|
||||
{
|
||||
var checkboxes = $('perm-matrix').getElementsByTagName( 'input' );
|
||||
|
||||
for( var i = 0; i < checkboxes.length; i++ )
|
||||
{
|
||||
var cbox = checkboxes[i];
|
||||
|
||||
if( cbox.id.match( "^perm_" + row + "_(.+?)" ) )
|
||||
{
|
||||
cbox.checked = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
ACPPermissions.init();
|
||||
@@ -150,7 +150,7 @@ _temp.prototype.permissions = Class.create({
|
||||
|
||||
if( !test )
|
||||
{
|
||||
if( !confirm("Ничего не выбрано, действительно хотите продолжить?") )
|
||||
if( !confirm("No permissions have been checked, are you sure you want to continue?") )
|
||||
{
|
||||
Event.stop(e);
|
||||
return false;
|
||||
|
||||
@@ -70,13 +70,13 @@ _temp.prototype.replacements = {
|
||||
{
|
||||
if( Object.isUndefined( t.responseJSON ) )
|
||||
{
|
||||
alert("Произошла ошибка при добавлении макроса");
|
||||
alert("An error occurred trying to add this replacement");
|
||||
return;
|
||||
}
|
||||
|
||||
if( t.responseJSON['error'] )
|
||||
{
|
||||
alert("При добавлении макроса произошла ошибка: " + t.responseJSON['error']);
|
||||
alert("There was an error adding this replacement: " + t.responseJSON['error']);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ _temp.prototype.replacements = {
|
||||
return;
|
||||
}
|
||||
|
||||
if( !confirm("Вы уверены в том что хотите удалить этот макрос ?") )
|
||||
if( !confirm("Are you sure you want to delete this replacement? Deleting will also remove it from any child set.") )
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -143,13 +143,13 @@ _temp.prototype.replacements = {
|
||||
{
|
||||
if( Object.isUndefined( t.responseJSON ) )
|
||||
{
|
||||
alert("Ошибка удаления макроса");
|
||||
alert("There was an error deleting this replacement");
|
||||
return;
|
||||
}
|
||||
|
||||
if( t.responseJSON['error'] )
|
||||
{
|
||||
alert("При удалении макроса произошла ошибка: " + t.responseJSON['error']);
|
||||
alert("There was an error deleting this replacement: " + t.responseJSON['error']);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@ _temp.prototype.replacements = {
|
||||
return;
|
||||
}
|
||||
|
||||
if( !confirm("Вы уверены в том что хотите отменить этот макрос ?") )
|
||||
if( !confirm("Are you sure you want to revert this replacement? Reverting will remove any changes made to this replacement in this skin set.") )
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -189,13 +189,13 @@ _temp.prototype.replacements = {
|
||||
{
|
||||
if( Object.isUndefined( t.responseJSON ) )
|
||||
{
|
||||
alert("Ошибка отмены макроса");
|
||||
alert("There was an error reverting this replacement");
|
||||
return;
|
||||
}
|
||||
|
||||
if( t.responseJSON['error'] )
|
||||
{
|
||||
alert("В ходе отмены макроса произошла ошибка: " + t.responseJSON['error']);
|
||||
alert("There was an error reverting this replacement: " + t.responseJSON['error']);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -223,8 +223,8 @@ _temp.prototype.replacements = {
|
||||
|
||||
$('r_status_' + id ).src = acp.replacements.templateUrl + status + '.png';
|
||||
},
|
||||
onException: function( f,e ){ alert( "Исключение: " + e ); },
|
||||
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); },
|
||||
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||
onFailure: function( t ){ alert( "Failure: " + t.responseText ); },
|
||||
onComplete: function(t){ }
|
||||
});
|
||||
|
||||
@@ -296,12 +296,12 @@ _temp.prototype.replacements = {
|
||||
{
|
||||
if( Object.isUndefined( t.responseJSON ) )
|
||||
{
|
||||
alert("Ошибка сохранения макроса");
|
||||
alert("There was an error saving this replacement");
|
||||
return;
|
||||
}
|
||||
else if( t.responseJSON['error'] )
|
||||
{
|
||||
alert("При сохранении макроса произошла ошибка: " + t.responseJSON['error']);
|
||||
alert("There was an error saving this replacement: " + t.responseJSON['error']);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+171
-171
@@ -1,172 +1,172 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// IPS JS: Tab handler
|
||||
// (c) 2008 Invision Power Services, Inc.
|
||||
// http://hatynka.in
|
||||
// Dan Cryer - 8th September 08
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
var Ipb3AcpTabStrip = Class.create();
|
||||
|
||||
Ipb3AcpTabStrip.prototype = {
|
||||
|
||||
tabstrips: $H(),
|
||||
first_on_load: '',
|
||||
|
||||
initialize: function()
|
||||
{
|
||||
Debug.write('IPB3 ACP Tabs: Initialize');
|
||||
},
|
||||
|
||||
register: function(tabstripId)
|
||||
{
|
||||
Debug.write('IPB3 ACP Tabs: Register ' + tabstripId);
|
||||
|
||||
try {
|
||||
if( Object.isUndefined( _go_go_gadget_editor_hack ) ){
|
||||
fix_hack = true;
|
||||
} else {
|
||||
fix_hack = false;
|
||||
}
|
||||
} catch(err) { fix_hack = false; }
|
||||
|
||||
Debug.write( "Fix hack is " + fix_hack );
|
||||
|
||||
var first = true;
|
||||
var firsttab = null;
|
||||
this.tabstrips[tabstripId] = $(tabstripId);
|
||||
this.tabstrips[tabstripId].tabs = new Array();
|
||||
|
||||
var tabitems = $$('#main_content #' + tabstripId + ' li');
|
||||
|
||||
for(var i = 0; i < tabitems.length; i++)
|
||||
{
|
||||
var tabId = tabitems[i].id.replace( /^(.*)-(\S+)$/, "$2" );
|
||||
|
||||
Debug.write('IPB3 ACP Tabs: Adding ' + tabId + ' to tabstrip ' + this.tabstrips[tabstripId].id);
|
||||
|
||||
this.tabstrips[tabstripId].tabs[i] = tabitems[i];
|
||||
this.tabstrips[tabstripId].tabs[i].tabStrip = this.tabstrips[tabstripId];
|
||||
this.tabstrips[tabstripId].tabs[i].tabPane = $('tabpane-' + tabId);
|
||||
|
||||
this.tabstrips[tabstripId].tabs[i].style.cursor = 'normal';
|
||||
Event.observe(this.tabstrips[tabstripId].tabs[i], 'click', this.toggle.bindAsEventListener( this ));
|
||||
|
||||
if ( this.first_on_load )
|
||||
{
|
||||
if ( this.first_on_load == tabId )
|
||||
{
|
||||
firsttab = this.tabstrips[tabstripId].tabs[i];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( first )
|
||||
{
|
||||
first = false;
|
||||
firsttab = this.tabstrips[tabstripId].tabs[i];
|
||||
}
|
||||
}
|
||||
|
||||
this.tabstrips[tabstripId].tabs[i].initSizeVals = { 'width' : this.tabstrips[tabstripId].tabs[i].tabPane.getWidth(), 'height' : this.tabstrips[tabstripId].tabs[i].tabPane.getHeight() };
|
||||
}
|
||||
|
||||
Debug.write('IPB3 ACP Tabs: Registered ' + this.tabstrips[tabstripId].tabs.length + ' tabs');
|
||||
|
||||
this.doToggle(firsttab);
|
||||
},
|
||||
|
||||
toggle: function(e)
|
||||
{
|
||||
var clickedTab = $(Event.findElement(e,'li'));
|
||||
this.doToggle(clickedTab);
|
||||
},
|
||||
|
||||
doToggle: function(clickedTab)
|
||||
{
|
||||
/* Reset stuff */
|
||||
if( Prototype.Browser.Gecko && fix_hack )
|
||||
{
|
||||
//Debug.dir( clickedTab );
|
||||
/* Grab pane wrapper */
|
||||
//_paneWrap = $( $$('ul#tab_member')[0].down().id.replace( 'tabtab-', 'tabpane-' ) ).up();
|
||||
_paneWrap = $( clickedTab.tabPane ).up();
|
||||
|
||||
/* Reset pane height */
|
||||
_paneWrap.style.height = 'auto';
|
||||
|
||||
/* Reset save button */
|
||||
_paneWrap.down('div.acp-actionbar').relativize();
|
||||
_paneWrap.down('div.acp-actionbar').setStyle( { top: '0px', left: '0px', width: 'auto', height: 'auto' } );
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
for(var i = 0; i < clickedTab.tabStrip.tabs.length; i++)
|
||||
{
|
||||
var tabitm = clickedTab.tabStrip.tabs[i];
|
||||
|
||||
if ( typeof( tabitm ) != 'undefined' && typeof( tabitm ) != 'function' )
|
||||
{
|
||||
if(clickedTab.id == tabitm.id)
|
||||
{
|
||||
tabitm.className = 'active';
|
||||
|
||||
if( tabitm.tabPane != null )
|
||||
{
|
||||
if( tabitm.tabPane.hasClassName('has_editor') && Prototype.Browser.Gecko && fix_hack )
|
||||
{
|
||||
/* Goodness, what a kludge */
|
||||
tabitm.tabPane.style.visibility = 'visible'; // Hack to make sure our editor works proper like
|
||||
tabitm.tabPane.style.height = tabitm.initSizeVals['height'] + 'px';
|
||||
tabitm.tabPane.style.width = tabitm.initSizeVals['width'] + 'px';
|
||||
tabitm.tabPane.style.clip = "auto";
|
||||
|
||||
/* Update size of parent to prevent background not reaching to the bottom*/
|
||||
tabitm.tabPane.down('div.editor').style.height = tabitm.initSizeVals['height'] + 'px';
|
||||
tabitm.tabPane.up('div.acp-box').style.height = tabitm.initSizeVals['height'] + 50 + 'px';
|
||||
|
||||
/* Now try and get the save button to place correctly */
|
||||
buttonEl = tabitm.tabPane.up().down('div.acp-actionbar');
|
||||
|
||||
buttonEl.absolutize();
|
||||
|
||||
/* It is offset slightly, so tweak to make it look 'normal' */
|
||||
buttonEl.style.width = parseInt( buttonEl.style.width ) - 20 + 'px';
|
||||
buttonEl.style.height = parseInt( buttonEl.style.height ) - 20 + 'px';
|
||||
buttonEl.style.top = parseInt( $('tab_member').positionedOffset()[1] ) + tabitm.initSizeVals['height'] + 75 + 'px';
|
||||
}
|
||||
else
|
||||
{
|
||||
tabitm.tabPane.style.display = 'block';
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
tabitm.className = '';
|
||||
|
||||
if( tabitm.tabPane != null )
|
||||
{
|
||||
if( tabitm.tabPane.hasClassName('has_editor') && Prototype.Browser.Gecko && fix_hack )
|
||||
{
|
||||
tabitm.tabPane.style.visibility = 'hidden';
|
||||
tabitm.tabPane.style.height = '0px';
|
||||
tabitm.tabPane.style.width = '0px';
|
||||
tabitm.tabPane.style.position = 'absolute';
|
||||
tabitm.tabPane.style.clip = "rect(0px,0px,0px,0px)";
|
||||
}
|
||||
else
|
||||
{
|
||||
tabitm.tabPane.style.display = 'none';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch( e ){}
|
||||
}
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// IPS JS: Tab handler
|
||||
// (c) 2008 Invision Power Services, Inc.
|
||||
// http://www.invisionpower.com
|
||||
// Dan Cryer - 8th September 08
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
var Ipb3AcpTabStrip = Class.create();
|
||||
|
||||
Ipb3AcpTabStrip.prototype = {
|
||||
|
||||
tabstrips: $H(),
|
||||
first_on_load: '',
|
||||
|
||||
initialize: function()
|
||||
{
|
||||
Debug.write('IPB3 ACP Tabs: Initialize');
|
||||
},
|
||||
|
||||
register: function(tabstripId)
|
||||
{
|
||||
Debug.write('IPB3 ACP Tabs: Register ' + tabstripId);
|
||||
|
||||
try {
|
||||
if( Object.isUndefined( _go_go_gadget_editor_hack ) ){
|
||||
fix_hack = true;
|
||||
} else {
|
||||
fix_hack = false;
|
||||
}
|
||||
} catch(err) { fix_hack = false; }
|
||||
|
||||
Debug.write( "Fix hack is " + fix_hack );
|
||||
|
||||
var first = true;
|
||||
var firsttab = null;
|
||||
this.tabstrips[tabstripId] = $(tabstripId);
|
||||
this.tabstrips[tabstripId].tabs = new Array();
|
||||
|
||||
var tabitems = $$('#main_content #' + tabstripId + ' li');
|
||||
|
||||
for(var i = 0; i < tabitems.length; i++)
|
||||
{
|
||||
var tabId = tabitems[i].id.replace( /^(.*)-(\S+)$/, "$2" );
|
||||
|
||||
Debug.write('IPB3 ACP Tabs: Adding ' + tabId + ' to tabstrip ' + this.tabstrips[tabstripId].id);
|
||||
|
||||
this.tabstrips[tabstripId].tabs[i] = tabitems[i];
|
||||
this.tabstrips[tabstripId].tabs[i].tabStrip = this.tabstrips[tabstripId];
|
||||
this.tabstrips[tabstripId].tabs[i].tabPane = $('tabpane-' + tabId);
|
||||
|
||||
this.tabstrips[tabstripId].tabs[i].style.cursor = 'normal';
|
||||
Event.observe(this.tabstrips[tabstripId].tabs[i], 'click', this.toggle.bindAsEventListener( this ));
|
||||
|
||||
if ( this.first_on_load )
|
||||
{
|
||||
if ( this.first_on_load == tabId )
|
||||
{
|
||||
firsttab = this.tabstrips[tabstripId].tabs[i];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( first )
|
||||
{
|
||||
first = false;
|
||||
firsttab = this.tabstrips[tabstripId].tabs[i];
|
||||
}
|
||||
}
|
||||
|
||||
this.tabstrips[tabstripId].tabs[i].initSizeVals = { 'width' : this.tabstrips[tabstripId].tabs[i].tabPane.getWidth(), 'height' : this.tabstrips[tabstripId].tabs[i].tabPane.getHeight() };
|
||||
}
|
||||
|
||||
Debug.write('IPB3 ACP Tabs: Registered ' + this.tabstrips[tabstripId].tabs.length + ' tabs');
|
||||
|
||||
this.doToggle(firsttab);
|
||||
},
|
||||
|
||||
toggle: function(e)
|
||||
{
|
||||
var clickedTab = $(Event.findElement(e,'li'));
|
||||
this.doToggle(clickedTab);
|
||||
},
|
||||
|
||||
doToggle: function(clickedTab)
|
||||
{
|
||||
/* Reset stuff */
|
||||
if( Prototype.Browser.Gecko && fix_hack )
|
||||
{
|
||||
//Debug.dir( clickedTab );
|
||||
/* Grab pane wrapper */
|
||||
//_paneWrap = $( $$('ul#tab_member')[0].down().id.replace( 'tabtab-', 'tabpane-' ) ).up();
|
||||
_paneWrap = $( clickedTab.tabPane ).up();
|
||||
|
||||
/* Reset pane height */
|
||||
_paneWrap.style.height = 'auto';
|
||||
|
||||
/* Reset save button */
|
||||
_paneWrap.down('div.acp-actionbar').relativize();
|
||||
_paneWrap.down('div.acp-actionbar').setStyle( { top: '0px', left: '0px', width: 'auto', height: 'auto' } );
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
for(var i = 0; i < clickedTab.tabStrip.tabs.length; i++)
|
||||
{
|
||||
var tabitm = clickedTab.tabStrip.tabs[i];
|
||||
|
||||
if ( typeof( tabitm ) != 'undefined' && typeof( tabitm ) != 'function' )
|
||||
{
|
||||
if(clickedTab.id == tabitm.id)
|
||||
{
|
||||
tabitm.className = 'active';
|
||||
|
||||
if( tabitm.tabPane != null )
|
||||
{
|
||||
if( tabitm.tabPane.hasClassName('has_editor') && Prototype.Browser.Gecko && fix_hack )
|
||||
{
|
||||
/* Goodness, what a kludge */
|
||||
tabitm.tabPane.style.visibility = 'visible'; // Hack to make sure our editor works proper like
|
||||
tabitm.tabPane.style.height = tabitm.initSizeVals['height'] + 'px';
|
||||
tabitm.tabPane.style.width = tabitm.initSizeVals['width'] + 'px';
|
||||
tabitm.tabPane.style.clip = "auto";
|
||||
|
||||
/* Update size of parent to prevent background not reaching to the bottom*/
|
||||
tabitm.tabPane.down('div.editor').style.height = tabitm.initSizeVals['height'] + 'px';
|
||||
tabitm.tabPane.up('div.acp-box').style.height = tabitm.initSizeVals['height'] + 50 + 'px';
|
||||
|
||||
/* Now try and get the save button to place correctly */
|
||||
buttonEl = tabitm.tabPane.up().down('div.acp-actionbar');
|
||||
|
||||
buttonEl.absolutize();
|
||||
|
||||
/* It is offset slightly, so tweak to make it look 'normal' */
|
||||
buttonEl.style.width = parseInt( buttonEl.style.width ) - 20 + 'px';
|
||||
buttonEl.style.height = parseInt( buttonEl.style.height ) - 20 + 'px';
|
||||
buttonEl.style.top = parseInt( $('tab_member').positionedOffset()[1] ) + tabitm.initSizeVals['height'] + 75 + 'px';
|
||||
}
|
||||
else
|
||||
{
|
||||
tabitm.tabPane.style.display = 'block';
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
tabitm.className = '';
|
||||
|
||||
if( tabitm.tabPane != null )
|
||||
{
|
||||
if( tabitm.tabPane.hasClassName('has_editor') && Prototype.Browser.Gecko && fix_hack )
|
||||
{
|
||||
tabitm.tabPane.style.visibility = 'hidden';
|
||||
tabitm.tabPane.style.height = '0px';
|
||||
tabitm.tabPane.style.width = '0px';
|
||||
tabitm.tabPane.style.position = 'absolute';
|
||||
tabitm.tabPane.style.clip = "rect(0px,0px,0px,0px)";
|
||||
}
|
||||
else
|
||||
{
|
||||
tabitm.tabPane.style.display = 'none';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch( e ){}
|
||||
}
|
||||
};
|
||||
|
||||
var ipbAcpTabStrips = new Ipb3AcpTabStrip;
|
||||
@@ -163,8 +163,8 @@ _temp.prototype.template_editor = {
|
||||
$('add_css_name').value = '';
|
||||
acp.template_editor.popups['add_css'].hide();
|
||||
},
|
||||
onException: function( f,e ){ alert( "Исключение: " + e ); },
|
||||
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); },
|
||||
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||
onFailure: function( t ){ alert( "Failure: " + t.responseText ); },
|
||||
onComplete: function(t){ acp.template_editor.setLoadingMsg(''); }
|
||||
});
|
||||
},
|
||||
@@ -301,8 +301,8 @@ _temp.prototype.template_editor = {
|
||||
acp.template_editor.popups['add_bit'].hide();
|
||||
|
||||
},
|
||||
onException: function( f,e ){ alert( "Исключение: " + e ); },
|
||||
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); },
|
||||
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||
onFailure: function( t ){ alert( "Failure: " + t.responseText ); },
|
||||
onComplete: function(t){ acp.template_editor.setLoadingMsg(''); }
|
||||
|
||||
});
|
||||
@@ -415,7 +415,7 @@ _temp.prototype.template_editor = {
|
||||
acp.template_editor.setLoadingMsg( ipb.lang['templates_loading'] );
|
||||
|
||||
var url = ipb.vars['base_url'] + "app=core&module=ajax&section=css&do=getCSSGroups&setID=" + acp.template_editor.currentSetData['set_id'] + '&secure_key=' + ipb.vars['md5_hash'];
|
||||
|
||||
|
||||
new Ajax.Request( url.replace( /&/g, '&' ),
|
||||
{
|
||||
method: 'get',
|
||||
@@ -441,8 +441,8 @@ _temp.prototype.template_editor = {
|
||||
|
||||
acp.template_editor.enableToolbar('css', current['id'].replace( 'css_file_', '' ) );
|
||||
},
|
||||
onFailure: function(t){ alert("Возникла ошибка при выполнении команды"); Debug.error(t.responseText); return; },
|
||||
onException: function(f,e){ alert("Возникла исключительная ситуация при выполнении команды"); Debug.error(e); return; },
|
||||
onFailure: function(t){ alert("There was an error executing this command"); Debug.error(t.responseText); return; },
|
||||
onException: function(f,e){ alert("There was an exception executing this command"); Debug.error(e); return; },
|
||||
onComplete: function(t){ acp.template_editor.setLoadingMsg(''); }
|
||||
});
|
||||
}
|
||||
@@ -536,7 +536,7 @@ _temp.prototype.template_editor = {
|
||||
}
|
||||
|
||||
acp.template_editor.setLoadingMsg( ipb.lang['templates_loading'] );
|
||||
|
||||
|
||||
var url = ipb.vars['base_url'] + "app=core&module=ajax&section=css&do=getCSSForEdit&setID=" + acp.template_editor.currentSetData['set_id'] + '&css_id=' + acp.template_editor.checkMap( cssid, 'css' ) + '&secure_key=' + ipb.vars['md5_hash'];
|
||||
|
||||
new Ajax.Request( url.replace( /&/g, '&' ),
|
||||
@@ -560,8 +560,8 @@ _temp.prototype.template_editor = {
|
||||
//Debug.dir( cssfile );
|
||||
acp.template_editor.openCSSfile( cssid, cssfile );
|
||||
},
|
||||
onFailure: function(t){ alert("Возникла ошибка при выполнении команды"); Debug.error(t.responseText); return; },
|
||||
onException: function(f,e){ alert("Возникла исключительная ситуация при выполнении команды"); Debug.error(e); return; },
|
||||
onFailure: function(t){ alert("There was an error executing this command"); Debug.error(t.responseText); return; },
|
||||
onException: function(f,e){ alert("There was an exception executing this command"); Debug.error(e); return; },
|
||||
onComplete: function(t){ acp.template_editor.setLoadingMsg(''); }
|
||||
});
|
||||
|
||||
@@ -643,8 +643,8 @@ _temp.prototype.template_editor = {
|
||||
acp.template_editor.enableToolbar('template', current['id'].replace( 'template_', '' ) );
|
||||
}
|
||||
},
|
||||
onFailure: function(t){ alert("Возникла ошибка при выполнении команды"); Debug.error(t.responseText); return; },
|
||||
onException: function(f,e){ alert("Возникла исключительная ситуация при выполнении команды"); Debug.error(e); return; },
|
||||
onFailure: function(t){ alert("There was an error executing this command"); Debug.error(t.responseText); return; },
|
||||
onException: function(f,e){ alert("There was an exception executing this command"); Debug.error(e); return; },
|
||||
onComplete: function(t){ $('group_' + group).removeClassName('loading'); }
|
||||
});
|
||||
},
|
||||
@@ -857,8 +857,8 @@ _temp.prototype.template_editor = {
|
||||
}
|
||||
}
|
||||
},
|
||||
onException: function( f,e ){ alert( "Исключение: " + e ); },
|
||||
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); },
|
||||
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||
onFailure: function( t ){ alert( "Failure: " + t.responseText ); },
|
||||
onComplete: function(t){ acp.template_editor.setLoadingMsg(''); }
|
||||
});
|
||||
},
|
||||
@@ -938,6 +938,7 @@ _temp.prototype.template_editor = {
|
||||
|
||||
if( acp.template_editor.checkMap( fileid, 'template' ) != t.responseJSON['templateData']['template_id'] )
|
||||
{
|
||||
acp.template_editor.modifyMap['template'][ t.responseJSON['templateData']['template_id'] ] = undefined; // Remove old map
|
||||
acp.template_editor.modifyMap['template'][ fileid ] = t.responseJSON['templateData']['template_id'];
|
||||
Debug.write("Updated modify map!");
|
||||
}
|
||||
@@ -960,6 +961,7 @@ _temp.prototype.template_editor = {
|
||||
|
||||
if ( acp.template_editor.checkMap( fileid, 'css' ) != t.responseJSON['cssData'][ info['css_group'] ]['css_id'] )
|
||||
{
|
||||
acp.template_editor.modifyMap['css'][ t.responseJSON['cssData'][ info['css_group'] ]['css_id'] ] = t.responseJSON['cssData'][ info['css_group'] ]['css_id']; // Remove old map
|
||||
acp.template_editor.modifyMap['css'][ fileid ] = t.responseJSON['cssData'][ info['css_group'] ]['css_id'];
|
||||
Debug.write("Updated modify map! fileid " + fileid + " is now " + acp.template_editor.modifyMap['css'][ fileid ] );
|
||||
}
|
||||
@@ -970,8 +972,8 @@ _temp.prototype.template_editor = {
|
||||
//Debug.dir( t.responseJSON );
|
||||
}
|
||||
},
|
||||
onException: function( f,e ){ alert( "Исключение: " + e ); },
|
||||
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); },
|
||||
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||
onFailure: function( t ){ alert( "Failure: " + t.responseText ); },
|
||||
onComplete: function(t){ acp.template_editor.setLoadingMsg(''); }
|
||||
});
|
||||
},
|
||||
@@ -1017,8 +1019,8 @@ _temp.prototype.template_editor = {
|
||||
//Debug.dir( template );
|
||||
acp.template_editor.openTemplateBit( templateid, template );
|
||||
},
|
||||
onException: function( f,e ){ alert( "Исключение: " + e ); },
|
||||
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); },
|
||||
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||
onFailure: function( t ){ alert( "Failure: " + t.responseText ); },
|
||||
onComplete: function(t){ acp.template_editor.setLoadingMsg(''); }
|
||||
} );
|
||||
},
|
||||
@@ -1320,6 +1322,7 @@ _temp.prototype.template_editor = {
|
||||
|
||||
if( acp.template_editor.checkMap( fileid, 'css' ) != t.responseJSON['cssData']['css_id'] )
|
||||
{
|
||||
acp.template_editor.modifyMap['css'][ t.responseJSON['cssData']['css_id'] ] = t.responseJSON['cssData']['css_id']; // Remove old map
|
||||
acp.template_editor.modifyMap['css'][ fileid ] = t.responseJSON['cssData']['css_id'];
|
||||
Debug.write("Updated modify map!");
|
||||
}
|
||||
@@ -1331,8 +1334,8 @@ _temp.prototype.template_editor = {
|
||||
acp.template_editor._buildCSS( true );
|
||||
|
||||
},
|
||||
onException: function( f,e ){ alert( "Исключение: " + e ); },
|
||||
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); },
|
||||
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||
onFailure: function( t ){ alert( "Failure: " + t.responseText ); },
|
||||
onComplete: function(t){ acp.template_editor.setLoadingMsg(''); }
|
||||
});
|
||||
},
|
||||
@@ -1363,7 +1366,7 @@ _temp.prototype.template_editor = {
|
||||
|
||||
var _id = current['id'].replace('template_', '');
|
||||
var fileid = ( Object.isUndefined( acp.template_editor.currentlyOpen.get( 'template_' + _id ) ) ) ? acp.template_editor.checkMap( _id, 'template' ) : _id;
|
||||
var _data = acp.template_editor.currentlyOpen.get( 'template_' + fileid )['template_data'].replace( '"', "'", 'g' ).replace( ''', "'", 'g' );
|
||||
var _data = acp.template_editor.currentlyOpen.get( 'template_' + fileid )['template_data'].replace( /"/g, "'" ).replace( /'/g, "'" );
|
||||
|
||||
var content = ipb.templates['edit_variables'].evaluate( { id: fileid, value: _data } );
|
||||
|
||||
@@ -1434,7 +1437,8 @@ _temp.prototype.template_editor = {
|
||||
Debug.write("File ID returned: " + t.responseJSON['templateData']['template_id']);
|
||||
|
||||
if( acp.template_editor.checkMap( fileid, 'template' ) != t.responseJSON['templateData']['template_id'] )
|
||||
{
|
||||
{
|
||||
acp.template_editor.modifyMap['template'][ t.responseJSON['templateData']['template_id'] ] = undefined; // Remove old map
|
||||
acp.template_editor.modifyMap['template'][ fileid ] = t.responseJSON['templateData']['template_id'];
|
||||
Debug.write("Updated modify map!");
|
||||
}
|
||||
@@ -1450,8 +1454,8 @@ _temp.prototype.template_editor = {
|
||||
acp.template_editor.popups.get('variables_' + fileid).hide();
|
||||
|
||||
},
|
||||
onException: function( f,e ){ alert( "Исключение: " + e ); },
|
||||
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); },
|
||||
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||
onFailure: function( t ){ alert( "Failure: " + t.responseText ); },
|
||||
onComplete: function(t){ acp.template_editor.setLoadingMsg(''); }
|
||||
});
|
||||
|
||||
@@ -1513,7 +1517,7 @@ _temp.prototype.template_editor = {
|
||||
|
||||
// Set status
|
||||
acp.template_editor.setLoadingMsg( ipb.lang['tpl_savegeneric'] );
|
||||
|
||||
|
||||
new Ajax.Request( url.replace( /&/g, '&' ),
|
||||
{
|
||||
method: 'POST',
|
||||
@@ -1539,10 +1543,11 @@ _temp.prototype.template_editor = {
|
||||
|
||||
if( acp.template_editor.checkMap( fileid, 'template' ) != t.responseJSON['templateData']['template_id'] )
|
||||
{
|
||||
acp.template_editor.modifyMap['template'][ t.responseJSON['templateData']['template_id'] ] = undefined; // Remove old map
|
||||
acp.template_editor.modifyMap['template'][ fileid ] = t.responseJSON['templateData']['template_id'];
|
||||
Debug.write("Updated modify map!");
|
||||
}
|
||||
|
||||
|
||||
acp.template_editor.currentlyOpen.set( 'template_' + fileid, t.responseJSON['templateData'] );
|
||||
acp.tabbedEditor.setFileEditedMode( 'template_' + fileid, false );
|
||||
/* Rebuild Template groups */
|
||||
@@ -1553,18 +1558,19 @@ _temp.prototype.template_editor = {
|
||||
|
||||
if( acp.template_editor.checkMap( fileid, 'css' )!= t.responseJSON['cssData']['css_id'] )
|
||||
{
|
||||
acp.template_editor.modifyMap['css'][ t.responseJSON['cssData']['css_id'] ] = undefined; // Remove old map
|
||||
acp.template_editor.modifyMap['css'][ fileid ] = t.responseJSON['cssData']['css_id'];
|
||||
Debug.write("Updated modify map!");
|
||||
}
|
||||
|
||||
|
||||
acp.template_editor.currentlyOpen.set( 'css_' + fileid, t.responseJSON['cssData'] );
|
||||
acp.tabbedEditor.setFileEditedMode( 'css_file_' + fileid, false );
|
||||
/* Rebuild CSS groups */
|
||||
acp.template_editor._buildCSS( true );
|
||||
}
|
||||
},
|
||||
onException: function( f,e ){ alert( "Исключение: " + e ); },
|
||||
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); },
|
||||
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||
onFailure: function( t ){ alert( "Failure: " + t.responseText ); },
|
||||
onComplete: function(t){ acp.template_editor.setLoadingMsg(''); }
|
||||
});
|
||||
},
|
||||
@@ -1681,7 +1687,7 @@ _temp.prototype.template_editor = {
|
||||
|
||||
var _dims = document.viewport.getDimensions();
|
||||
|
||||
popup = new ipb.Popup( 'comparison', { type: 'pane', modal: true, w: ( _dims.width - 50 ) + 'px', h: ( _dims.height - 50 ), ajaxURL: url, hideAtStart: false, close: 'a[rel="close"]' }, { 'afterAjax': _callback } );
|
||||
popup = new ipb.Popup( 'comparison', { type: 'pane', modal: true, w: ( _dims.width - 50 ) + 'px', h: ( _dims.height - 150 ), ajaxURL: url, hideAtStart: false, close: 'a[rel="close"]' }, { 'afterAjax': _callback } );
|
||||
return false;
|
||||
},
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@ function ipsUpgrade()
|
||||
}
|
||||
|
||||
/* Start text output.. */
|
||||
this.writeToLog( "Обновление <strong>" + this.applications[ app_dir ].real_name + "</strong>" );
|
||||
this.writeToLog( "Starting upgrade for <strong>" + this.applications[ app_dir ].real_name + "</strong>" );
|
||||
|
||||
/* Reset progress bar */
|
||||
this.updateProgressBar( false );
|
||||
@@ -293,14 +293,14 @@ function ipsUpgrade()
|
||||
*/
|
||||
this.timeOutAjax = function( t )
|
||||
{
|
||||
if ( confirm( "Сервер не отвечает.\nПодождать еще ?" ) )
|
||||
if ( confirm( "No response from the webserver.\nDo you wish to continue waiting?" ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
t.transport.abort();
|
||||
alert( "Запрос отменен" );
|
||||
alert( "Request Cancelled" );
|
||||
}
|
||||
};
|
||||
|
||||
@@ -309,7 +309,7 @@ function ipsUpgrade()
|
||||
*/
|
||||
this.failureAjax = function( t )
|
||||
{
|
||||
alert( "Ошибка: " + t.responseText );
|
||||
alert( "Failure: " + t.responseText );
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -317,7 +317,7 @@ function ipsUpgrade()
|
||||
*/
|
||||
this.exceptionAjax = function( t )
|
||||
{
|
||||
alert( "Исключение: " + t.responseText );
|
||||
alert( "Exception: " + t.responseText );
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -332,7 +332,7 @@ function ipsUpgrade()
|
||||
|
||||
if ( ! t.responseText.match( /^(\s+?)?\{/ ) )
|
||||
{
|
||||
alert( "Ошибка:\n" + t.responseText );
|
||||
alert( "Error:\n" + t.responseText );
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -347,7 +347,7 @@ function ipsUpgrade()
|
||||
|
||||
if ( json['warning'] )
|
||||
{
|
||||
alert( 'Предупреждение: ' + json['warning'] );
|
||||
alert( 'Warning: ' + json['warning'] );
|
||||
}
|
||||
|
||||
/* All good: Update status message... */
|
||||
@@ -377,7 +377,7 @@ function ipsUpgrade()
|
||||
this.updateProgressBar( 'finish' );
|
||||
this.updateProgressImage( 'ready' );
|
||||
|
||||
this.writeToLog( "<strong>Обновление завершено</strong>" );
|
||||
this.writeToLog( "<strong>Upgrade Completed</strong>" );
|
||||
|
||||
/* Update version information */
|
||||
this.applications[ this.upgradingApp.app_dir ].current_human = json['new_human'];
|
||||
@@ -466,7 +466,7 @@ function ipsUpgrade()
|
||||
{
|
||||
_button.className = _button.className.replace( / available$/, '' );
|
||||
_button.title = '';
|
||||
_button.innerHTML = "Нет доступных обновлений";
|
||||
_button.innerHTML = "No Upgrade Available";
|
||||
|
||||
Event.stopObserving( 'upgradeRowButton-' + this.applications[i].app_dir, 'click', this._buttonClicker );
|
||||
|
||||
@@ -474,8 +474,8 @@ function ipsUpgrade()
|
||||
else
|
||||
{
|
||||
_button.className = _button.className + ' available';
|
||||
_button.title = 'Нажмите для начала обновления';
|
||||
_button.innerHTML = "Есть обновления";
|
||||
_button.title = 'Click to begin upgrade';
|
||||
_button.innerHTML = "Upgrade Available";
|
||||
|
||||
this._buttonClicker = this.beginUpgrade.bindAsEventListener( this, 'upgradeRowButton-' + this.applications[i].app_dir, this.applications[i].app_dir );
|
||||
Event.observe( 'upgradeRowButton-' + this.applications[i].app_dir, 'click', this._buttonClicker );
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user