Version 3.2.3
This commit is contained in:
1 parent
ae5c01cc78
commit
78706903a2
2641 files changed
+228363
-201264
No files matched your search
@@ -238,13 +238,13 @@ function IPB3TemplateDiffResults()
|
||||
{
|
||||
default:
|
||||
case 'orig':
|
||||
_text = 'Старый';
|
||||
_text = ipb.lang['comparediff_oldd'];
|
||||
break;
|
||||
case 'new':
|
||||
_text = 'Новый';
|
||||
_text = ipb.lang['comparediff_newd'];
|
||||
break;
|
||||
case 'custom':
|
||||
_text = 'Пользовательский';
|
||||
_text = ipb.lang['comparediff_cust'];
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -253,11 +253,11 @@ function IPB3TemplateDiffResults()
|
||||
{
|
||||
if ( json['data_type'] == 'css' )
|
||||
{
|
||||
content = '<h3>' + _text + ': ' + json['data_title'] + '.css</h3><div style="padding:4px;line-height:125%;overflow:auto"><pre>' + json['data_content'] + '</pre></div>';
|
||||
content = '<div class="acp-box"><h3>' + _text + ': ' + json['data_title'] + '.css</h3><div style="padding:4px;line-height:125%;overflow:auto"><pre>' + json['data_content'] + '</pre></div></div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
content = '<h3>' + _text + ': ' + json['data_group'] + ' > ' + json['data_title'] + '</h3><div style="padding:4px;line-height:125%;overflow:auto"><pre>' + json['data_content'] + '</pre></div>';
|
||||
content = '<div class="acp-box"><h3>' + _text + ': ' + json['data_group'] + ' > ' + json['data_title'] + '</h3><div style="padding:4px;line-height:125%;overflow:auto"><pre>' + json['data_content'] + '</pre></div></div>';
|
||||
}
|
||||
|
||||
max = document.viewport.getHeight();
|
||||
@@ -313,10 +313,10 @@ function IPB3TemplateDiffResults()
|
||||
{
|
||||
default:
|
||||
case 'diff':
|
||||
_text = 'Различия';
|
||||
_text = ipb.lang['comparediff_diff'];
|
||||
break;
|
||||
case 'merge':
|
||||
_text = 'Препросмотр объединения';
|
||||
_text = ipb.lang['comparediff_merg'];
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -326,7 +326,7 @@ function IPB3TemplateDiffResults()
|
||||
/* Extra work for merge */
|
||||
if ( type == 'merge' )
|
||||
{
|
||||
_qb = "<div class='acp-actionbar' style='text-align:left;'><div style='float:right'><input type='button' id='mergeEditCustom' class='button __re" + changeId + "' value='Изменить' /></div><input type='button' id='mergeResolveCustom' class='button __rc" + changeId + "' value='Решить все: в пользу пользовательских изменений' /> <input type='button' id='mergeResolveNew' class='button __rn" + changeId + "' value='Решить все: в пользу новых изменений' /></div>";
|
||||
_qb = "<div class='acp-actionbar' style='text-align:left;'><div style='float:right'><input type='button' id='mergeEditCustom' class='button __re" + changeId + "' value='" + ipb.lang['merge_edititem'] + "' /></div><input type='button' id='mergeResolveCustom' class='button __rc" + changeId + "' value='" + ipb.lang['resolveall_button'] + "' /> <input type='button' id='mergeResolveNew' class='button __rn" + changeId + "' value='" + ipb.lang['resolveall_newwin'] + "' /></div>";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -335,11 +335,11 @@ function IPB3TemplateDiffResults()
|
||||
|
||||
if ( json['change_data_type'] == 'css' )
|
||||
{
|
||||
content = '<h3>'+ _text + ': ' + json['change_data_title'] + '.css</h3><div style="padding:4px;line-height:125%;"><pre>' + json['change_data_content'] + '</pre></div>' + _qb;
|
||||
content = '<div class="acp-box"><h3>'+ _text + ': ' + json['change_data_title'] + '.css</h3><div style="padding:4px;line-height:125%;"><pre>' + json['change_data_content'] + '</pre></div>' + _qb + "</div>";
|
||||
}
|
||||
else
|
||||
{
|
||||
content = '<h3>'+ _text + ': ' + json['change_data_group'] + ' > ' + json['change_data_title'] + '</h3><div style="padding:4px;line-height:125%;"><pre>' + json['change_data_content'] + '</pre></div>' + _qb;
|
||||
content = '<div class="acp-box"><h3>'+ _text + ': ' + json['change_data_group'] + ' > ' + json['change_data_title'] + '</h3><div style="padding:4px;line-height:125%;"><pre>' + json['change_data_content'] + '</pre></div>' + _qb + "</div>";
|
||||
}
|
||||
|
||||
max = document.viewport.getHeight();
|
||||
@@ -410,16 +410,16 @@ function IPB3TemplateDiffResults()
|
||||
<3 javascript */
|
||||
var _tmp = Math.floor( Math.random() * 1001 );
|
||||
|
||||
_qb = "<div style='float:left; margin-top:6px'><input type='button' id='mergeResolveCustom_" + _tmp + "' class='button __rc" + changeId + "' value='Решить все: в пользу пользовательских изменений' /> <input type='button' id='mergeResolveNew_" + _tmp + "' class='button __rn" + changeId + "' value='Решить все: в пользу новых изменений' /></div>";
|
||||
_tb = '<textarea name="content" id="mergeContent" style="width:100%; height:700px; line-height:150%">' + json['change_merge_content'] + '</textarea>' + _qb + '<div style="text-align:right" class="acp-actionbar"><input type="button" id="mergeSubmit" value="Сохранить" class="button primary __i' + changeId + '" /></div>';
|
||||
_qb = "<div style='float:left; margin-top:6px'><input type='button' id='mergeResolveCustom_" + _tmp + "' class='button __rc" + changeId + "' value='" + ipb.lang['resolveall_button'] + "' /> <input type='button' id='mergeResolveNew_" + _tmp + "' class='button __rn" + changeId + "' value='" + ipb.lang['resolveall_newwin'] + "' /></div>";
|
||||
_tb = '<textarea name="content" id="mergeContent" style="width:100%; height:700px; line-height:150%">' + json['change_merge_content'] + '</textarea>' + _qb + '<div style="text-align:right" class="acp-actionbar"><input type="button" id="mergeSubmit" value="' + ipb.lang['save_button'] + '" class="button primary __i' + changeId + '" /></div>';
|
||||
|
||||
if ( json['change_data_type'] == 'css' )
|
||||
{
|
||||
content = '<h3>' + json['change_data_title'] + '.css' + '</h3><div style="padding:4px;">' + _tb + '</div>';
|
||||
content = '<div class="acp-box"><h3>' + json['change_data_title'] + '.css' + '</h3><div style="padding:4px;">' + _tb + '</div></div>';
|
||||
}
|
||||
else
|
||||
{
|
||||
content = '<h3>' + json['change_data_group'] + ' > ' + json['change_data_title'] + '</h3><div style="padding:4px;">' + _tb + '</div>';
|
||||
content = '<div class="acp-box"><h3>' + json['change_data_group'] + ' > ' + json['change_data_title'] + '</h3><div style="padding:4px;">' + _tb + '</div></div>';
|
||||
}
|
||||
|
||||
IPB3TemplateDiffResults.popUps['edit-' + changeId ] = new ipb.Popup('diffEditPopUp_' + _tmp, { type: 'pane', modal: false, hideAtStart: true, w: '800px', h: '600px', initial: '<div style="height:750px"> </div>' } );
|
||||
@@ -535,7 +535,7 @@ function IPB3TemplateDiffResults()
|
||||
}
|
||||
else
|
||||
{
|
||||
alert( "Ошибка: " + t.responseText );
|
||||
alert( ipb.lang['oops'] + t.responseText );
|
||||
}
|
||||
},
|
||||
onFailure: function()
|
||||
@@ -567,7 +567,7 @@ function IPB3TemplateDiffResults()
|
||||
/* Test to see if we've left in merge stuff */
|
||||
if ( content.match( '<<<<<<<<<<' ) || content.match( '>>>>>>>>>' ) )
|
||||
{
|
||||
alert( 'Нельзя сохранить пока не будут устранены все конфликты' );
|
||||
alert( ipb.lang['mustfixfirst'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -608,7 +608,7 @@ function IPB3TemplateDiffResults()
|
||||
}
|
||||
else
|
||||
{
|
||||
alert( "Ошибка: " + t.responseText );
|
||||
alert( ipb.lang['oops'] + t.responseText );
|
||||
}
|
||||
},
|
||||
onException: function( f,e ){ alert( "Исключение: " + e ); },
|
||||
|
||||
@@ -5,6 +5,6 @@
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -40,7 +40,7 @@ function IPBCSS()
|
||||
* @var hash
|
||||
*/
|
||||
this.cssNames = {
|
||||
'cssRow' : 'tablerow2',
|
||||
'cssRow' : 'row2',
|
||||
'cssHover' : 'cssHover' };
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ function IPBCSS()
|
||||
}
|
||||
else
|
||||
{
|
||||
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
|
||||
alert( "Похоже у нас проблемы: " + t.responseText );
|
||||
}
|
||||
},
|
||||
onException: function( f,e ){ alert( "Исключение: " + e ); },
|
||||
@@ -143,7 +143,7 @@ function IPBCSS()
|
||||
}
|
||||
else
|
||||
{
|
||||
alert( "Галектеко ОПАСНОСТЕ! ПЫЩПЫЩ!11: " + t.responseText );
|
||||
alert( "Похоже у нас проблемы: " + t.responseText );
|
||||
}
|
||||
},
|
||||
onException: function( f,e ){ alert( "Исключение: " + e ); },
|
||||
@@ -196,13 +196,13 @@ function IPBCSS()
|
||||
if ( json['errors'] )
|
||||
{
|
||||
/* Something inline would be very nice here.. rather than this ugly alert */
|
||||
alert("Я СКАЗАЛ: " + json['errors'] );
|
||||
alert("Ошибка: " + json['errors'] );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
alert( "Галектеко ОПАСНОСТЕ! ПЫЩПЫЩ!11: " + t.responseText );
|
||||
alert( "Похоже у нас проблемы: " + t.responseText );
|
||||
}
|
||||
},
|
||||
onException: function( f,e ){ alert( "Исключение: " + e ); },
|
||||
@@ -239,7 +239,7 @@ function IPBCSS()
|
||||
}
|
||||
else
|
||||
{
|
||||
alert( "Галектеко ОПАСНОСТЕ! ПЫЩПЫЩ!11: " + t.responseText );
|
||||
alert( "Похоже у нас проблемы: " + t.responseText );
|
||||
}
|
||||
},
|
||||
onException: function( f,e ){ alert( "Исключение: " + e ); },
|
||||
|
||||
@@ -1,27 +1,74 @@
|
||||
|
||||
function addAnotherRequirement()
|
||||
{
|
||||
requireIndex = parseInt(requireIndex) + 1;
|
||||
|
||||
// Show the data location dropdown now
|
||||
|
||||
url = ipb.vars['base_url'] + "app=core&module=ajax&section=hooks&do=getApplications&secure_key=" + ipb.vars['md5_hash'] + "&i=" + requireIndex + "&name=requireApp";
|
||||
url = url.replace( /&/g, '&' );
|
||||
|
||||
new Ajax.Request( url,
|
||||
{
|
||||
method: 'GET',
|
||||
onSuccess: function ( t )
|
||||
{
|
||||
var newApp = ipb.templates['new_app_require'].evaluate({ index: requireIndex, dropdown: t.responseText });
|
||||
|
||||
if ( $('RequirementsContainer').down('tbody') )
|
||||
{
|
||||
$('RequirementsContainer').down('tbody').insert( newApp );
|
||||
}
|
||||
else
|
||||
{
|
||||
$('RequirementsContainer').insert( newApp );
|
||||
}
|
||||
},
|
||||
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
|
||||
} );
|
||||
}
|
||||
|
||||
function removeRequirement( idToRemove )
|
||||
{
|
||||
idToRemove = parseInt(idToRemove);
|
||||
|
||||
if( $('requirementTitleRow_' + idToRemove ) != null )
|
||||
{
|
||||
$('requirementTitleRow_' + idToRemove ).remove();
|
||||
}
|
||||
|
||||
if( $('requirementRow_' + idToRemove ) != null )
|
||||
{
|
||||
$('requirementRow_' + idToRemove ).remove();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function addAnotherFile()
|
||||
{
|
||||
elementIndex = parseInt(elementIndex) + 1;
|
||||
|
||||
var header = new Element( 'div', { 'class': 'tablesubheader' } );
|
||||
header.update( ipb.lang['hookfilenumber'] + elementIndex );
|
||||
var newFile = ipb.templates['new_hook_file'].evaluate({ index: elementIndex });
|
||||
|
||||
var list = new Element( 'ul', { 'id': 'fileTable_' + elementIndex } );
|
||||
list.addClassName( 'acp-form' );
|
||||
list.addClassName( 'alternate_rows' );
|
||||
|
||||
$('fileTableContainer').insert( header );
|
||||
$('fileTableContainer').insert( list );
|
||||
|
||||
var li1 = new Element( 'li' ).update( "<label>" + ipb.lang['hook_filename'] + "</label><input type='text' name='file[" + elementIndex + "]' value='' size='50' class='inputtext' />" );
|
||||
var li2 = new Element( 'li' ).update( "<label>" + ipb.lang['hook_classname'] + "</label><input type='text' name='hook_classname[" + elementIndex + "]' value='' size='50' class='inputtext' />" );
|
||||
var li3 = new Element( 'li' ).update( "<label>" + ipb.lang['hook_filetype'] + "</label><select name='hook_type[" + elementIndex + "]' id='hook_type[" + elementIndex + "]' onchange='selectHookType(" + elementIndex + ");'><option value='0'>" + ipb.lang['hook_filetype_select'] + "</option><option value='commandHooks'>" + ipb.lang['hook_filetype_action'] + "</option><option value='skinHooks'>" + ipb.lang['hook_filetype_skin'] + "</option><option value='templateHooks'>" + ipb.lang['hook_filetype_template'] + "</option><option value='dataHooks'>" + ipb.lang['hook_filetype_data'] + "</option><option value='libraryHooks'>" + ipb.lang['hook_filetype_library'] + "</option></select>" );
|
||||
if ( $('fileTableContainer').down('tbody') )
|
||||
{
|
||||
$('fileTableContainer').down('tbody').insert( newFile );
|
||||
}
|
||||
else
|
||||
{
|
||||
$('fileTableContainer').insert( newFile );
|
||||
}
|
||||
}
|
||||
|
||||
$('fileTable_' + elementIndex).insert( li1 );
|
||||
$('fileTable_' + elementIndex).insert( li2 );
|
||||
$('fileTable_' + elementIndex).insert( li3 );
|
||||
|
||||
doStriping();
|
||||
function removeFile( elementIndex )
|
||||
{
|
||||
elementIndex = parseInt(elementIndex);
|
||||
|
||||
if( $('fileRow_' + elementIndex ) != null )
|
||||
{
|
||||
$('fileRow_' + elementIndex ).remove();
|
||||
}
|
||||
}
|
||||
|
||||
function selectHookType( elementIndex )
|
||||
@@ -63,7 +110,6 @@ function selectHookType( elementIndex )
|
||||
$('tr_dataLocation[' + elementIndex + ']').remove();
|
||||
}
|
||||
|
||||
|
||||
if( $('tr_libApplication[' + elementIndex + ']') != null )
|
||||
{
|
||||
$('tr_libApplication[' + elementIndex + ']').remove();
|
||||
@@ -81,9 +127,16 @@ function selectHookType( elementIndex )
|
||||
method: 'GET',
|
||||
onSuccess: function (t )
|
||||
{
|
||||
li1 = new Element( 'li', { 'id': 'tr_skinGroup[' + elementIndex + ']' } ).update( "<label>" + ipb.lang['hook_skingroup'] + "</label>" + t.responseText );
|
||||
$('fileTable_' + elementIndex).insert( li1 );
|
||||
doStriping();
|
||||
var newRow = ipb.templates['hook_skinGroup'].evaluate({ index: elementIndex, dropdown: t.responseText });
|
||||
|
||||
if ( $('fileTable_' + elementIndex).down('tbody') )
|
||||
{
|
||||
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
|
||||
}
|
||||
else
|
||||
{
|
||||
$('fileTable_' + elementIndex).insert( newRow );
|
||||
}
|
||||
},
|
||||
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
|
||||
@@ -101,9 +154,16 @@ function selectHookType( elementIndex )
|
||||
method: 'GET',
|
||||
onSuccess: function (t )
|
||||
{
|
||||
li1 = new Element( 'li', { 'id': 'tr_dataLocation[' + elementIndex + ']' } ).update( "<label>" + ipb.lang['hook_data_location'] + "</label>" + t.responseText );
|
||||
$('fileTable_' + elementIndex).insert( li1 );
|
||||
doStriping();
|
||||
var newRow = ipb.templates['hook_dataLocation'].evaluate({ index: elementIndex, dropdown: t.responseText });
|
||||
|
||||
if ( $('fileTable_' + elementIndex).down('tbody') )
|
||||
{
|
||||
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
|
||||
}
|
||||
else
|
||||
{
|
||||
$('fileTable_' + elementIndex).insert( newRow );
|
||||
}
|
||||
},
|
||||
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
|
||||
@@ -111,9 +171,6 @@ function selectHookType( elementIndex )
|
||||
}
|
||||
else if( type == 'libraryHooks' )
|
||||
{
|
||||
var li1 = new Element( 'li', { 'id': 'tr_classToOverload[' + elementIndex + ']' } ).update( "<label>" + ipb.lang['hook_extends'] + "</label><input type='text' name='classToOverload[" + elementIndex + "]' value='' size='50' class='inputtext' />" );
|
||||
$('fileTable_' + elementIndex).insert( li1 );
|
||||
|
||||
// Show the data location dropdown now
|
||||
|
||||
url = ipb.vars['base_url'] + "app=core&module=ajax&section=hooks&do=getApplications&secure_key=" + ipb.vars['md5_hash'] + "&i=" + elementIndex;
|
||||
@@ -124,9 +181,17 @@ function selectHookType( elementIndex )
|
||||
method: 'GET',
|
||||
onSuccess: function (t )
|
||||
{
|
||||
li1 = new Element( 'li', { 'id': 'tr_libApplication[' + elementIndex + ']' } ).update( "<label>" + ipb.lang['hook_application'] + "</label>" + t.responseText );
|
||||
$('fileTable_' + elementIndex).insert( li1 );
|
||||
doStriping();
|
||||
var replace = { index: elementIndex, dropdown: t.responseText };
|
||||
var newRow = ipb.templates['hook_classToOverload'].evaluate(replace) + ipb.templates['hook_libApplication'].evaluate(replace);
|
||||
|
||||
if ( $('fileTable_' + elementIndex).down('tbody') )
|
||||
{
|
||||
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
|
||||
}
|
||||
else
|
||||
{
|
||||
$('fileTable_' + elementIndex).insert( newRow );
|
||||
}
|
||||
},
|
||||
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
|
||||
@@ -136,8 +201,16 @@ function selectHookType( elementIndex )
|
||||
{
|
||||
// Show the classToOverload field
|
||||
|
||||
var li1 = new Element( 'li', { 'id': 'tr_classToOverload[' + elementIndex + ']' } ).update( "<label>" + ipb.lang['hook_extends'] + "</label><input type='text' name='classToOverload[" + elementIndex + "]' value='' size='50' class='inputtext' />" );
|
||||
$('fileTable_' + elementIndex).insert( li1 );
|
||||
var newRow = ipb.templates['hook_classToOverload'].evaluate({ index: elementIndex });
|
||||
|
||||
if ( $('fileTable_' + elementIndex).down('tbody') )
|
||||
{
|
||||
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
|
||||
}
|
||||
else
|
||||
{
|
||||
$('fileTable_' + elementIndex).insert( newRow );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,27 +238,38 @@ function getTemplatesForAdd( elementIndex )
|
||||
$('tr_position[' + elementIndex + ']').remove();
|
||||
}
|
||||
|
||||
url = ipb.vars['base_url'] + "app=core&module=ajax&section=hooks&do=getTemplatesForAdd&secure_key=" + ipb.vars['md5_hash'] + "&i=" + elementIndex + "&group=" + type;
|
||||
url = url.replace( /&/g, '&' );
|
||||
|
||||
new Ajax.Request( url,
|
||||
{
|
||||
method: 'GET',
|
||||
onSuccess: function (t )
|
||||
{
|
||||
li1 = new Element( 'li', { 'id': 'tr_skinFunction[' + elementIndex + ']' } ).update( "<label>" + ipb.lang['hook_skinfunc'] + "</label>" + t.responseText );
|
||||
$('fileTable_' + elementIndex).insert( li1 );
|
||||
doStriping();
|
||||
},
|
||||
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
|
||||
} );
|
||||
/* Got a type? */
|
||||
if( type != '0' )
|
||||
{
|
||||
url = ipb.vars['base_url'] + "app=core&module=ajax&section=hooks&do=getTemplatesForAdd&secure_key=" + ipb.vars['md5_hash'] + "&i=" + elementIndex + "&group=" + type;
|
||||
url = url.replace( /&/g, '&' );
|
||||
|
||||
new Ajax.Request( url,
|
||||
{
|
||||
method: 'GET',
|
||||
onSuccess: function (t )
|
||||
{
|
||||
var newRow = ipb.templates['hook_skinFunction'].evaluate({ index: elementIndex, dropdown: t.responseText });
|
||||
|
||||
if ( $('fileTable_' + elementIndex).down('tbody') )
|
||||
{
|
||||
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
|
||||
}
|
||||
else
|
||||
{
|
||||
$('fileTable_' + elementIndex).insert( newRow );
|
||||
}
|
||||
},
|
||||
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
||||
function getTypeOfHook( elementIndex )
|
||||
{
|
||||
var type = $F('skinFunction[' + elementIndex + ']');
|
||||
|
||||
var template = $F('skinFunction[' + elementIndex + ']');
|
||||
|
||||
if( $('tr_type[' + elementIndex + ']') != null )
|
||||
{
|
||||
$('tr_type[' + elementIndex + ']').remove();
|
||||
@@ -200,11 +284,21 @@ function getTypeOfHook( elementIndex )
|
||||
{
|
||||
$('tr_position[' + elementIndex + ']').remove();
|
||||
}
|
||||
|
||||
li1 = new Element( 'li', { 'id': 'tr_type[' + elementIndex + ']' } ).update( "<label>" + ipb.lang['hook_temptype'] + "</label><select name='type[" + elementIndex + "]' id='type[" + elementIndex + "]' onchange='getHookIds(" + elementIndex + ");'><option value='0'>" + ipb.lang['hook_filetype_select'] + "</option><option value='foreach'>foreach loop</option><option value='if'>if statement</option></select>" );
|
||||
$('fileTable_' + elementIndex).insert( li1 );
|
||||
|
||||
doStriping();
|
||||
/* Insert the new hook type row */
|
||||
if ( template != '0' )
|
||||
{
|
||||
var newRow = ipb.templates['hook_pointTypes'].evaluate({ index: elementIndex });
|
||||
|
||||
if ( $('fileTable_' + elementIndex).down('tbody') )
|
||||
{
|
||||
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
|
||||
}
|
||||
else
|
||||
{
|
||||
$('fileTable_' + elementIndex).insert( newRow );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getHookIds( elementIndex )
|
||||
@@ -222,34 +316,46 @@ function getHookIds( elementIndex )
|
||||
$('tr_position[' + elementIndex + ']').remove();
|
||||
}
|
||||
|
||||
url = ipb.vars['base_url'] + "app=core&module=ajax&section=hooks&do=getHookIds&secure_key=" + ipb.vars['md5_hash'] + "&i=" + elementIndex + "&type=" + type + "&template=" + template;
|
||||
url = url.replace( /&/g, '&' );
|
||||
|
||||
new Ajax.Request( url,
|
||||
{
|
||||
method: 'GET',
|
||||
onSuccess: function (t )
|
||||
{
|
||||
li1 = new Element( 'li', { 'id': 'tr_id[' + elementIndex + ']' } ).update( "<label>" + ipb.lang['hook_hookid'] + "</label>" + t.responseText );
|
||||
$('fileTable_' + elementIndex).insert( li1 );
|
||||
doStriping();
|
||||
},
|
||||
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
|
||||
} );
|
||||
/* Got a type? */
|
||||
if( type != '0' )
|
||||
{
|
||||
url = ipb.vars['base_url'] + "app=core&module=ajax&section=hooks&do=getHookIds&secure_key=" + ipb.vars['md5_hash'] + "&i=" + elementIndex + "&type=" + type + "&template=" + template;
|
||||
url = url.replace( /&/g, '&' );
|
||||
|
||||
new Ajax.Request( url,
|
||||
{
|
||||
method: 'GET',
|
||||
onSuccess: function (t )
|
||||
{
|
||||
var newRow = ipb.templates['hook_pointIds'].evaluate({ index: elementIndex, dropdown: t.responseText });
|
||||
|
||||
if ( $('fileTable_' + elementIndex).down('tbody') )
|
||||
{
|
||||
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
|
||||
}
|
||||
else
|
||||
{
|
||||
$('fileTable_' + elementIndex).insert( newRow );
|
||||
}
|
||||
},
|
||||
onException: function( f,e ){ alert( "Exception: " + e ); },
|
||||
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
||||
function getHookEntryPoints( elementIndex )
|
||||
{
|
||||
var type = $F('type[' + elementIndex + ']');
|
||||
|
||||
var type = $F('type[' + elementIndex + ']');
|
||||
|
||||
Debug.write( type );
|
||||
|
||||
if( $('tr_position[' + elementIndex + ']') != null )
|
||||
{
|
||||
$('tr_position[' + elementIndex + ']').remove();
|
||||
}
|
||||
|
||||
|
||||
var options = '';
|
||||
options += "<option value='0'>" + ipb.lang['hook_filetype_select'] + "</option>";
|
||||
|
||||
if( type == 'foreach' )
|
||||
{
|
||||
@@ -267,9 +373,18 @@ function getHookEntryPoints( elementIndex )
|
||||
options += "<option value='pre.endif'>(pre.endif) " + ipb.lang['a_preendif'] + "</option>";
|
||||
options += "<option value='post.endif'>(post.endif) " + ipb.lang['a_postendif'] + "</option>";
|
||||
}
|
||||
|
||||
var li1 = new Element( 'li', { 'id': 'tr_position[' + elementIndex + ']' } ).update( "<label>" + ipb.lang['hook_tempposi'] + "</label><select name='position[" + elementIndex + "]' id='position[" + elementIndex + "]'>" + options + "</select>" );
|
||||
$('fileTable_' + elementIndex).insert( li1 );
|
||||
|
||||
doStriping();
|
||||
/* Insert the new hook type row */
|
||||
//if ( type != '0' )
|
||||
//{
|
||||
var newRow = ipb.templates['hook_pointLocation'].evaluate({ index: elementIndex, hookPoints: options });
|
||||
|
||||
if ( $('fileTable_' + elementIndex).down('tbody') )
|
||||
{
|
||||
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
|
||||
}
|
||||
else
|
||||
{
|
||||
$('fileTable_' + elementIndex).insert( newRow );
|
||||
}
|
||||
//}
|
||||
}
|
||||
@@ -40,7 +40,7 @@ function IPBReplacements()
|
||||
* @var hash
|
||||
*/
|
||||
this.cssNames = {
|
||||
'replacementsRow' : 'tablerow2',
|
||||
'replacementsRow' : 'row2',
|
||||
'replacementsHover' : 'replacementsHover' };
|
||||
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ function IPBTemplateSandR()
|
||||
url = ipb.vars['base_url'] + "app=core&module=ajax&section=templatesandr&do=replace&&sessionID=" + this.sessionID + '&secure_key=' + ipb.vars['md5_hash'];
|
||||
|
||||
$('replaceButton').disabled = true;
|
||||
$('replaceButton').value = "Сохранение...";
|
||||
$('replaceButton').value = ipb.lang['tpl_savegeneric'];
|
||||
|
||||
new Ajax.Request( url.replace( /&/g, '&' ),
|
||||
{
|
||||
@@ -189,7 +189,7 @@ function IPBTemplateSandR()
|
||||
url = ipb.vars['base_url'] + "app=core&module=ajax&section=templates&do=saveTemplateBit&setID=" + this.setData['set_id'] + '&template_id=' + template_id + '&secure_key=' + ipb.vars['md5_hash'];
|
||||
|
||||
/* Set up params */
|
||||
var params = { 'template_content' : $F('tplate_editBox_' + template_id ),
|
||||
var params = { 'template_content' : $F('tplate_editBox_' + template_id ).encodeParam(), /* Need to run encodeParam or urlencoding is lost on save - same as acp.templates.js */
|
||||
'template_data' : $F('tplate_dataBox_' + template_id ),
|
||||
'template_set' : this.setData['set_id'],
|
||||
'template_group' : IPB3TemplatesSandR.currentTemplateGroup,
|
||||
@@ -259,10 +259,7 @@ function IPBTemplateSandR()
|
||||
var _output = '';
|
||||
var _tplate = new Template( $('tplate_groupRow').innerHTML );
|
||||
var json = IPB3TemplatesSandR.templateGroups;
|
||||
|
||||
var ROW_ON_OFF = true;
|
||||
var CLASS_NAME = '';
|
||||
|
||||
|
||||
var _groups = Object.keys( json['groups'] ).sort();
|
||||
|
||||
/* Clear out any current listing */
|
||||
@@ -271,18 +268,7 @@ function IPBTemplateSandR()
|
||||
/* Format... */
|
||||
_groups.each( function( i )
|
||||
{
|
||||
if( ROW_ON_OFF)
|
||||
{
|
||||
ROW_ON_OFF = false;
|
||||
CLASS_NAME = 'acp-row-off';
|
||||
}
|
||||
else
|
||||
{
|
||||
ROW_ON_OFF = true;
|
||||
CLASS_NAME = 'acp-row-on';
|
||||
}
|
||||
|
||||
_output += _tplate.evaluate( { 'groupName' : i, '_matches' : Object.keys( json['groups'][i] ).length, 'classname' : CLASS_NAME } );
|
||||
_output += _tplate.evaluate( { 'groupName' : i, '_matches' : Object.keys( json['groups'][i] ).length } );
|
||||
} );
|
||||
|
||||
/* Write it out */
|
||||
@@ -300,8 +286,6 @@ function IPBTemplateSandR()
|
||||
$( 'groupRowCbox_' + i ).show();
|
||||
}
|
||||
} );
|
||||
|
||||
doStriping();
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -315,17 +299,20 @@ function IPBTemplateSandR()
|
||||
|
||||
IPB3TemplatesSandR.currentTemplateGroup = groupName;
|
||||
|
||||
/* Clear out any current listing */
|
||||
$( 'groupRowTemplates_' + groupName ).update('');
|
||||
|
||||
/* Add in the new... */
|
||||
for( i = 0 ; i < json['templates'].length; i++ )
|
||||
{
|
||||
_output += _tplate.evaluate( json['templates'][i] );
|
||||
};
|
||||
|
||||
/* Clear out any current listing */
|
||||
$$( '#groupRowTemplates_' + groupName + " table.ipsTable" ).each( function(elem) {
|
||||
elem.update( _output );
|
||||
});
|
||||
//$( 'groupRowTemplates_' + groupName ).update('');
|
||||
|
||||
/* Write it out */
|
||||
$( 'groupRowTemplates_' + groupName ).update( _output );
|
||||
//$( 'groupRowTemplates_' + groupName ).update( _output );
|
||||
|
||||
/* Post process */
|
||||
for( i = 0 ; i < json['templates'].length; i++ )
|
||||
|
||||
@@ -48,9 +48,9 @@ function IPBTemplates()
|
||||
*/
|
||||
this.cssNames = { 'groupRowLit' : 'tplateLit',
|
||||
'groupHover' : 'groupHover',
|
||||
'groupRowLitMain' : 'tablerow1',
|
||||
'groupRow' : 'tablerow2',
|
||||
'templateRow' : 'tablerow2',
|
||||
'groupRowLitMain' : 'row1',
|
||||
'groupRow' : 'row2',
|
||||
'templateRow' : 'row2',
|
||||
'templateHover' : 'templateHover' };
|
||||
|
||||
|
||||
|
||||
@@ -119,6 +119,8 @@ function IPBUAgents()
|
||||
IPB3UAgents.uAgentsData = json;
|
||||
IPB3UAgents.buildUAgentsList();
|
||||
|
||||
ipb.global.showInlineNotification( ipb.lang['useragent_saved'], { showClose: true } );
|
||||
|
||||
if ( json['errors'] )
|
||||
{
|
||||
/* Something inline would be very nice here.. rather than this ugly alert */
|
||||
@@ -132,11 +134,11 @@ function IPBUAgents()
|
||||
}
|
||||
else
|
||||
{
|
||||
alert( "Ошибка: " + t.responseText );
|
||||
alert( ipb.lang['oops'] + t.responseText );
|
||||
}
|
||||
},
|
||||
onException: function( f,e ){ alert( "Исключение: " + e ); },
|
||||
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
|
||||
onException: function( f,e ){ alert( ipb.lang['oops'] + e ); },
|
||||
onFailure: function( t ){ alert( ipb.lang['oops'] + t.responseText ); }
|
||||
} );
|
||||
};
|
||||
|
||||
@@ -146,7 +148,7 @@ function IPBUAgents()
|
||||
this.removeuAgent = function( uagent_id )
|
||||
{
|
||||
/* Make sure we're mean it... */
|
||||
if ( ! confirm( "Удалить user agent?\\nОн будет удален полностью из системы" ) )
|
||||
if ( ! confirm( ipb.lang['removeuseragent'] ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -183,11 +185,11 @@ function IPBUAgents()
|
||||
}
|
||||
else
|
||||
{
|
||||
alert( "Ошибка: " + t.responseText );
|
||||
alert( ipb.lang['oops'] + t.responseText );
|
||||
}
|
||||
},
|
||||
onException: function( f,e ){ alert( "Исключение: " + e ); },
|
||||
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
|
||||
onException: function( f,e ){ alert( ipb.lang['oops'] + e ); },
|
||||
onFailure: function( t ){ alert( ipb.lang['oops'] + t.responseText ); }
|
||||
} );
|
||||
};
|
||||
|
||||
@@ -235,7 +237,7 @@ function IPBUAgents()
|
||||
/* Adjust title */
|
||||
if ( ! uagent_id )
|
||||
{
|
||||
$('tplate_title_' + uagent_id ).update("Добавление User Agent");
|
||||
$('tplate_title_' + uagent_id ).update( ipb.lang['adduagenttitle'] );
|
||||
}
|
||||
|
||||
/* Select box type */
|
||||
@@ -290,7 +292,7 @@ function IPBUAgents()
|
||||
_groups.each( function( i )
|
||||
{
|
||||
json['uagents'][i]['_cssClass'] = IPB3UAgents.cssNames['uagentsRow'];
|
||||
|
||||
json['uagents'][i]['uagent_name'] = json['uagents'][i]['uagent_name'].replace("%20", " ");
|
||||
_output += _tplate.evaluate( json['uagents'][i] );
|
||||
|
||||
} );
|
||||
|
||||
Reference in new issue
Block a user