mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-21 10:48:59 +00:00
Merge branch 'develop-ascraeus' into develop
* develop-ascraeus: [ticket/12372] Use $() instead of jQuery() in core.js for toggleDisplay [ticket/12372] Use admin.js $(document).ready for hiding questionnaire details [ticket/12372] Rename JS function dE() to phpbb.toggleDisplay() [ticket/12372] Move dE() function core.js [ticket/12372] Unify definition of function dE() across all files [ticket/12372] Use jQuery in javascript dE() function
This commit is contained in:
commit
c88b2f89e9
19 changed files with 73 additions and 148 deletions
|
@ -14,45 +14,45 @@
|
||||||
<!-- IF not S_ADD_ACTION and S_FORUM_ORIG_POST -->
|
<!-- IF not S_ADD_ACTION and S_FORUM_ORIG_POST -->
|
||||||
if (value == {FORUM_POST})
|
if (value == {FORUM_POST})
|
||||||
{
|
{
|
||||||
dE('type_actions', -1);
|
phpbb.toggleDisplay('type_actions', -1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dE('type_actions', 1);
|
phpbb.toggleDisplay('type_actions', 1);
|
||||||
}
|
}
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
|
|
||||||
<!-- IF not S_ADD_ACTION and S_FORUM_ORIG_CAT and S_HAS_SUBFORUMS -->
|
<!-- IF not S_ADD_ACTION and S_FORUM_ORIG_CAT and S_HAS_SUBFORUMS -->
|
||||||
if (value == {FORUM_LINK})
|
if (value == {FORUM_LINK})
|
||||||
{
|
{
|
||||||
dE('cat_to_link_actions', 1);
|
phpbb.toggleDisplay('cat_to_link_actions', 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dE('cat_to_link_actions', -1);
|
phpbb.toggleDisplay('cat_to_link_actions', -1);
|
||||||
}
|
}
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
|
|
||||||
if (value == {FORUM_POST})
|
if (value == {FORUM_POST})
|
||||||
{
|
{
|
||||||
dE('forum_post_options', 1);
|
phpbb.toggleDisplay('forum_post_options', 1);
|
||||||
dE('forum_link_options', -1);
|
phpbb.toggleDisplay('forum_link_options', -1);
|
||||||
dE('forum_rules_options', 1);
|
phpbb.toggleDisplay('forum_rules_options', 1);
|
||||||
dE('forum_cat_options', -1);
|
phpbb.toggleDisplay('forum_cat_options', -1);
|
||||||
}
|
}
|
||||||
else if (value == {FORUM_LINK})
|
else if (value == {FORUM_LINK})
|
||||||
{
|
{
|
||||||
dE('forum_post_options', -1);
|
phpbb.toggleDisplay('forum_post_options', -1);
|
||||||
dE('forum_link_options', 1);
|
phpbb.toggleDisplay('forum_link_options', 1);
|
||||||
dE('forum_rules_options', -1);
|
phpbb.toggleDisplay('forum_rules_options', -1);
|
||||||
dE('forum_cat_options', -1);
|
phpbb.toggleDisplay('forum_cat_options', -1);
|
||||||
}
|
}
|
||||||
else if (value == {FORUM_CAT})
|
else if (value == {FORUM_CAT})
|
||||||
{
|
{
|
||||||
dE('forum_post_options', -1);
|
phpbb.toggleDisplay('forum_post_options', -1);
|
||||||
dE('forum_link_options', -1);
|
phpbb.toggleDisplay('forum_link_options', -1);
|
||||||
dE('forum_rules_options', 1);
|
phpbb.toggleDisplay('forum_rules_options', 1);
|
||||||
dE('forum_cat_options', 1);
|
phpbb.toggleDisplay('forum_cat_options', 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,30 +64,30 @@
|
||||||
{
|
{
|
||||||
<!-- IF not S_ADD_ACTION and S_FORUM_ORIG_POST -->
|
<!-- IF not S_ADD_ACTION and S_FORUM_ORIG_POST -->
|
||||||
<!-- IF S_FORUM_POST -->
|
<!-- IF S_FORUM_POST -->
|
||||||
dE('type_actions', -1);
|
phpbb.toggleDisplay('type_actions', -1);
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
|
|
||||||
<!-- IF not S_ADD_ACTION and S_FORUM_ORIG_CAT and S_HAS_SUBFORUMS -->
|
<!-- IF not S_ADD_ACTION and S_FORUM_ORIG_CAT and S_HAS_SUBFORUMS -->
|
||||||
<!-- IF S_FORUM_CAT -->
|
<!-- IF S_FORUM_CAT -->
|
||||||
dE('cat_to_link_actions', -1);
|
phpbb.toggleDisplay('cat_to_link_actions', -1);
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
|
|
||||||
<!-- IF not S_FORUM_POST -->
|
<!-- IF not S_FORUM_POST -->
|
||||||
dE('forum_post_options', -1);
|
phpbb.toggleDisplay('forum_post_options', -1);
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
|
|
||||||
<!-- IF not S_FORUM_CAT -->
|
<!-- IF not S_FORUM_CAT -->
|
||||||
dE('forum_cat_options', -1);
|
phpbb.toggleDisplay('forum_cat_options', -1);
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
|
|
||||||
<!-- IF not S_FORUM_LINK -->
|
<!-- IF not S_FORUM_LINK -->
|
||||||
dE('forum_link_options', -1);
|
phpbb.toggleDisplay('forum_link_options', -1);
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
|
|
||||||
<!-- IF S_FORUM_LINK -->
|
<!-- IF S_FORUM_LINK -->
|
||||||
dE('forum_rules_options', -1);
|
phpbb.toggleDisplay('forum_rules_options', -1);
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,11 +10,11 @@
|
||||||
{
|
{
|
||||||
if (value == 'category')
|
if (value == 'category')
|
||||||
{
|
{
|
||||||
dE('modoptions', -1);
|
phpbb.toggleDisplay('modoptions', -1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dE('modoptions', 1);
|
phpbb.toggleDisplay('modoptions', 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,8 +35,8 @@
|
||||||
</dl>
|
</dl>
|
||||||
<dl>
|
<dl>
|
||||||
<dt><label for="special_rank">{L_RANK_SPECIAL}{L_COLON}</label></dt>
|
<dt><label for="special_rank">{L_RANK_SPECIAL}{L_COLON}</label></dt>
|
||||||
<dd><label><input onclick="dE('posts', -1)" type="radio" class="radio" name="special_rank" value="1" id="special_rank"<!-- IF S_SPECIAL_RANK --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
<dd><label><input onclick="phpbb.toggleDisplay('posts', -1)" type="radio" class="radio" name="special_rank" value="1" id="special_rank"<!-- IF S_SPECIAL_RANK --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||||
<label><input onclick="dE('posts', 1)" type="radio" class="radio" name="special_rank" value="0"<!-- IF not S_SPECIAL_RANK --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
<label><input onclick="phpbb.toggleDisplay('posts', 1)" type="radio" class="radio" name="special_rank" value="0"<!-- IF not S_SPECIAL_RANK --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||||
</dl>
|
</dl>
|
||||||
<!-- IF S_SPECIAL_RANK --><div id="posts" style="display: none;"><!-- ELSE --><div id="posts"><!-- ENDIF -->
|
<!-- IF S_SPECIAL_RANK --><div id="posts" style="display: none;"><!-- ELSE --><div id="posts"><!-- ENDIF -->
|
||||||
<dl>
|
<dl>
|
||||||
|
|
|
@ -17,8 +17,8 @@ function iframe_updated()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
dE('questionnaire-form', -1);
|
phpbb.toggleDisplay('questionnaire-form', -1);
|
||||||
dE('questionnaire-thanks', 1);
|
phpbb.toggleDisplay('questionnaire-thanks', 1);
|
||||||
}
|
}
|
||||||
//]]>
|
//]]>
|
||||||
</script>
|
</script>
|
||||||
|
@ -31,10 +31,10 @@ function iframe_updated()
|
||||||
|
|
||||||
<p>{L_EXPLAIN_SHOW_STATISTICS}</p>
|
<p>{L_EXPLAIN_SHOW_STATISTICS}</p>
|
||||||
|
|
||||||
<p id="show-button"><input type="button" class="button2" onclick="dE('configlist', 1); dE('show-button', -1);" value="{L_SHOW_STATISTICS}" /></p>
|
<p id="show-button"><input type="button" class="button2" onclick="phpbb.toggleDisplay('configlist', 1); phpbb.toggleDisplay('show-button', -1);" value="{L_SHOW_STATISTICS}" /></p>
|
||||||
|
|
||||||
<div id="configlist">
|
<div id="configlist">
|
||||||
<input type="button" class="button2" onclick="dE('show-button', 1); dE('configlist', -1);" value="{L_HIDE_STATISTICS}" />
|
<input type="button" class="button2" onclick="phpbb.toggleDisplay('show-button', 1); phpbb.toggleDisplay('configlist', -1);" value="{L_HIDE_STATISTICS}" />
|
||||||
<p class="submit-buttons">
|
<p class="submit-buttons">
|
||||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SEND_STATISTICS}" />
|
<input class="button1" type="submit" id="submit" name="submit" value="{L_SEND_STATISTICS}" />
|
||||||
</p>
|
</p>
|
||||||
|
@ -61,11 +61,4 @@ function iframe_updated()
|
||||||
<p><strong>{L_THANKS_SEND_STATISTICS}</strong><br /><br /><a href="{U_ACP_MAIN}">« {L_GO_ACP_MAIN}</a></p>
|
<p><strong>{L_THANKS_SEND_STATISTICS}</strong><br /><br /><a href="{U_ACP_MAIN}">« {L_GO_ACP_MAIN}</a></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
//<![CDATA[
|
|
||||||
dE('configlist', -1);
|
|
||||||
dE('questionnaire-thanks', -1);
|
|
||||||
//]]>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<!-- INCLUDE overall_footer.html -->
|
<!-- INCLUDE overall_footer.html -->
|
||||||
|
|
|
@ -86,11 +86,11 @@
|
||||||
{
|
{
|
||||||
if (option != 'banuser' && option != 'banemail' && option != 'banip')
|
if (option != 'banuser' && option != 'banemail' && option != 'banip')
|
||||||
{
|
{
|
||||||
dE('reasons', -1);
|
phpbb.toggleDisplay('reasons', -1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
dE('reasons', 1);
|
phpbb.toggleDisplay('reasons', 1);
|
||||||
|
|
||||||
element = document.getElementById('user_quick_tools').ban_reason;
|
element = document.getElementById('user_quick_tools').ban_reason;
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
<!-- INCLUDE timezone_option.html -->
|
<!-- INCLUDE timezone_option.html -->
|
||||||
<dl>
|
<dl>
|
||||||
<dt><label for="dateoptions">{L_BOARD_DATE_FORMAT}{L_COLON}</label><br /><span>{L_BOARD_DATE_FORMAT_EXPLAIN}</span></dt>
|
<dt><label for="dateoptions">{L_BOARD_DATE_FORMAT}{L_COLON}</label><br /><span>{L_BOARD_DATE_FORMAT_EXPLAIN}</span></dt>
|
||||||
<dd><select name="dateoptions" id="dateoptions" onchange="if(this.value=='custom'){dE('custom_date',1);}else{dE('custom_date',-1);} if (this.value == 'custom') { document.getElementById('dateformat').value = default_dateformat; } else { document.getElementById('dateformat').value = this.value; }">{S_DATEFORMAT_OPTIONS}</select></dd>
|
<dd><select name="dateoptions" id="dateoptions" onchange="if(this.value=='custom'){phpbb.toggleDisplay('custom_date',1);}else{phpbb.toggleDisplay('custom_date',-1);} if (this.value == 'custom') { document.getElementById('dateformat').value = default_dateformat; } else { document.getElementById('dateformat').value = this.value; }">{S_DATEFORMAT_OPTIONS}</select></dd>
|
||||||
<dd><div id="custom_date"<!-- IF not S_CUSTOM_DATEFORMAT --> style="display:none;"<!-- ENDIF -->><input type="text" name="dateformat" id="dateformat" value="{DATE_FORMAT}" maxlength="30" /></div></dd>
|
<dd><div id="custom_date"<!-- IF not S_CUSTOM_DATEFORMAT --> style="display:none;"<!-- ENDIF -->><input type="text" name="dateformat" id="dateformat" value="{DATE_FORMAT}" maxlength="30" /></div></dd>
|
||||||
</dl>
|
</dl>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
|
@ -242,5 +242,9 @@ function parse_document(container)
|
||||||
});
|
});
|
||||||
|
|
||||||
parse_document($('body'));
|
parse_document($('body'));
|
||||||
|
|
||||||
|
// Hide configlist and success message in send statistics page
|
||||||
|
phpbb.toggleDisplay('configlist', -1);
|
||||||
|
phpbb.toggleDisplay('questionnaire-thanks', -1);
|
||||||
});
|
});
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
|
|
|
@ -7,32 +7,6 @@
|
||||||
<title>{PAGE_TITLE}</title>
|
<title>{PAGE_TITLE}</title>
|
||||||
|
|
||||||
<link href="{T_TEMPLATE_PATH}/admin.css" rel="stylesheet" type="text/css" media="screen" />
|
<link href="{T_TEMPLATE_PATH}/admin.css" rel="stylesheet" type="text/css" media="screen" />
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
// <![CDATA[
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set display of page element
|
|
||||||
* s[-1,0,1] = hide,toggle display,show
|
|
||||||
*/
|
|
||||||
function dE(n, s, type)
|
|
||||||
{
|
|
||||||
if (!type)
|
|
||||||
{
|
|
||||||
type = 'block';
|
|
||||||
}
|
|
||||||
|
|
||||||
var e = document.getElementById(n);
|
|
||||||
if (!s)
|
|
||||||
{
|
|
||||||
s = (e.style.display == '' || e.style.display == 'block') ? -1 : 1;
|
|
||||||
}
|
|
||||||
e.style.display = (s == 1) ? type : 'none';
|
|
||||||
}
|
|
||||||
|
|
||||||
// ]]>
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="{S_CONTENT_DIRECTION} nojs">
|
<body class="{S_CONTENT_DIRECTION} nojs">
|
||||||
|
|
|
@ -224,7 +224,7 @@
|
||||||
|
|
||||||
<!-- IF .not_modified -->
|
<!-- IF .not_modified -->
|
||||||
<h2>{L_FILES_NOT_MODIFIED}</h2>
|
<h2>{L_FILES_NOT_MODIFIED}</h2>
|
||||||
<div style="float: {S_CONTENT_FLOW_END};">» <a href="#" onclick="dE('not_modified', 0); return false;">{L_TOGGLE_DISPLAY}</a></div>
|
<div style="float: {S_CONTENT_FLOW_END};">» <a href="#" onclick="phpbb.toggleDisplay('not_modified', 0); return false;">{L_TOGGLE_DISPLAY}</a></div>
|
||||||
<p>{L_FILES_NOT_MODIFIED_EXPLAIN}</p>
|
<p>{L_FILES_NOT_MODIFIED_EXPLAIN}</p>
|
||||||
|
|
||||||
<fieldset id="not_modified" style="display: none;">
|
<fieldset id="not_modified" style="display: none;">
|
||||||
|
|
|
@ -35,25 +35,6 @@ function jumpto()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set display of page element
|
|
||||||
* s[-1,0,1] = hide,toggle display,show
|
|
||||||
*/
|
|
||||||
function dE(n, s, type)
|
|
||||||
{
|
|
||||||
if (!type)
|
|
||||||
{
|
|
||||||
type = 'block';
|
|
||||||
}
|
|
||||||
|
|
||||||
var e = document.getElementById(n);
|
|
||||||
if (!s)
|
|
||||||
{
|
|
||||||
s = (e.style.display == '') ? -1 : 1;
|
|
||||||
}
|
|
||||||
e.style.display = (s == 1) ? type : 'none';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mark/unmark checkboxes
|
* Mark/unmark checkboxes
|
||||||
* id = ID of parent container, name = name prefix, state = state [true/false]
|
* id = ID of parent container, name = name prefix, state = state [true/false]
|
||||||
|
|
|
@ -177,7 +177,7 @@ function swap_options(pmask, fmask, cat, adv, view) {
|
||||||
var adv_block = document.getElementById('advanced' + pmask + fmask);
|
var adv_block = document.getElementById('advanced' + pmask + fmask);
|
||||||
|
|
||||||
if (adv_block.style.display === 'block' && adv === true) {
|
if (adv_block.style.display === 'block' && adv === true) {
|
||||||
dE('advanced' + pmask + fmask, -1);
|
phpbb.toggleDisplay('advanced' + pmask + fmask, -1);
|
||||||
reset_opacity(1);
|
reset_opacity(1);
|
||||||
display_checkboxes(false);
|
display_checkboxes(false);
|
||||||
return;
|
return;
|
||||||
|
@ -207,11 +207,11 @@ function swap_options(pmask, fmask, cat, adv, view) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
dE('options' + active_option, -1);
|
phpbb.toggleDisplay('options' + active_option, -1);
|
||||||
|
|
||||||
//hiding and showing the checkbox
|
//hiding and showing the checkbox
|
||||||
if (document.getElementById('checkbox' + active_pmask + active_fmask)) {
|
if (document.getElementById('checkbox' + active_pmask + active_fmask)) {
|
||||||
dE('checkbox' + pmask + fmask, -1);
|
phpbb.toggleDisplay('checkbox' + pmask + fmask, -1);
|
||||||
|
|
||||||
if ((pmask + fmask) !== (active_pmask + active_fmask)) {
|
if ((pmask + fmask) !== (active_pmask + active_fmask)) {
|
||||||
document.getElementById('checkbox' + active_pmask + active_fmask).style.display = 'inline';
|
document.getElementById('checkbox' + active_pmask + active_fmask).style.display = 'inline';
|
||||||
|
@ -219,13 +219,13 @@ function swap_options(pmask, fmask, cat, adv, view) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!view) {
|
if (!view) {
|
||||||
dE('advanced' + active_pmask + active_fmask, -1);
|
phpbb.toggleDisplay('advanced' + active_pmask + active_fmask, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!view) {
|
if (!view) {
|
||||||
dE('advanced' + pmask + fmask, 1);
|
phpbb.toggleDisplay('advanced' + pmask + fmask, 1);
|
||||||
}
|
}
|
||||||
dE('options' + id, 1);
|
phpbb.toggleDisplay('options' + id, 1);
|
||||||
|
|
||||||
active_pmask = pmask;
|
active_pmask = pmask;
|
||||||
active_fmask = fmask;
|
active_fmask = fmask;
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
|
|
||||||
<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
|
<script type="text/javascript" src="{T_JQUERY_LINK}"></script>
|
||||||
<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
|
<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write(unescape('%3Cscript src="{T_ASSETS_PATH}/javascript/jquery.js?assets_version={T_ASSETS_VERSION}" type="text/javascript"%3E%3C/script%3E'));</script><!-- ENDIF -->
|
||||||
|
<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
|
||||||
|
|
||||||
<!-- EVENT acp_simple_footer_after -->
|
<!-- EVENT acp_simple_footer_after -->
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -48,25 +48,6 @@ function jumpto()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set display of page element
|
|
||||||
* s[-1,0,1] = hide,toggle display,show
|
|
||||||
*/
|
|
||||||
function dE(n, s, type)
|
|
||||||
{
|
|
||||||
if (!type)
|
|
||||||
{
|
|
||||||
type = 'block';
|
|
||||||
}
|
|
||||||
|
|
||||||
var e = document.getElementById(n);
|
|
||||||
if (!s)
|
|
||||||
{
|
|
||||||
s = (e.style.display == '') ? -1 : 1;
|
|
||||||
}
|
|
||||||
e.style.display = (s == 1) ? type : 'none';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mark/unmark checkboxes
|
* Mark/unmark checkboxes
|
||||||
* id = ID of parent container, name = name prefix, state = state [true/false]
|
* id = ID of parent container, name = name prefix, state = state [true/false]
|
||||||
|
|
|
@ -1081,6 +1081,27 @@ phpbb.registerPalette = function(el) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set display of page element
|
||||||
|
*
|
||||||
|
* @param string id The ID of the element to change
|
||||||
|
* @param int action Set to 0 if element display should be toggled, -1 for
|
||||||
|
* hiding the element, and 1 for showing it.
|
||||||
|
* @param string type Display type that should be used, e.g. inline, block or
|
||||||
|
* other CSS "display" types
|
||||||
|
*/
|
||||||
|
phpbb.toggleDisplay = function(id, action, type) {
|
||||||
|
if (!type) {
|
||||||
|
type = 'block';
|
||||||
|
}
|
||||||
|
|
||||||
|
var display = $('#' + id).css('display');
|
||||||
|
if (!action) {
|
||||||
|
action = (display === '' || display === type) ? -1 : 1;
|
||||||
|
}
|
||||||
|
$('#' + id).css('display', ((action === 1) ? type : 'none'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Apply code editor to all textarea elements with data-bbcode attribute
|
* Apply code editor to all textarea elements with data-bbcode attribute
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1153,7 +1153,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
|
||||||
'S_HAS_ATTACHMENTS' => (!empty($attachments[$row['post_id']])) ? true : false,
|
'S_HAS_ATTACHMENTS' => (!empty($attachments[$row['post_id']])) ? true : false,
|
||||||
'S_FRIEND' => ($row['friend']) ? true : false,
|
'S_FRIEND' => ($row['friend']) ? true : false,
|
||||||
'S_IGNORE_POST' => ($row['foe']) ? true : false,
|
'S_IGNORE_POST' => ($row['foe']) ? true : false,
|
||||||
'L_IGNORE_POST' => ($row['foe']) ? sprintf($user->lang['POST_BY_FOE'], get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), "<a href=\"{$u_show_post}\" onclick=\"dE('{$post_anchor}', 1); return false;\">", '</a>') : '',
|
'L_IGNORE_POST' => ($row['foe']) ? sprintf($user->lang['POST_BY_FOE'], get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), "<a href=\"{$u_show_post}\" onclick=\"phpbb.toggleDisplay('{$post_anchor}', 1); return false;\">", '</a>') : '',
|
||||||
|
|
||||||
'POST_SUBJECT' => $post_subject,
|
'POST_SUBJECT' => $post_subject,
|
||||||
'MINI_POST_IMG' => $user->img('icon_post_target', $user->lang['POST']),
|
'MINI_POST_IMG' => $user->img('icon_post_target', $user->lang['POST']),
|
||||||
|
|
|
@ -91,23 +91,6 @@ function viewableArea(e, itself) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set display of page element
|
|
||||||
* s[-1,0,1] = hide,toggle display,show
|
|
||||||
* type = string: inline, block, inline-block or other CSS "display" type
|
|
||||||
*/
|
|
||||||
function dE(n, s, type) {
|
|
||||||
if (!type) {
|
|
||||||
type = 'block';
|
|
||||||
}
|
|
||||||
|
|
||||||
var e = document.getElementById(n);
|
|
||||||
if (!s) {
|
|
||||||
s = (e.style.display === '' || e.style.display === type) ? -1 : 1;
|
|
||||||
}
|
|
||||||
e.style.display = (s === 1) ? type : 'none';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Alternate display of subPanels
|
* Alternate display of subPanels
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
|
|
||||||
function change_palette()
|
function change_palette()
|
||||||
{
|
{
|
||||||
dE('colour_palette');
|
phpbb.toggleDisplay('colour_palette');
|
||||||
e = document.getElementById('colour_palette');
|
e = document.getElementById('colour_palette');
|
||||||
|
|
||||||
if (e.style.display == 'block')
|
if (e.style.display == 'block')
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
<dl>
|
<dl>
|
||||||
<dt><label for="dateformat">{L_BOARD_DATE_FORMAT}{L_COLON}</label><br /><span>{L_BOARD_DATE_FORMAT_EXPLAIN}</span></dt>
|
<dt><label for="dateformat">{L_BOARD_DATE_FORMAT}{L_COLON}</label><br /><span>{L_BOARD_DATE_FORMAT_EXPLAIN}</span></dt>
|
||||||
<dd>
|
<dd>
|
||||||
<select name="dateoptions" id="dateoptions" onchange="if(this.value=='custom'){dE('custom_date',1);}else{dE('custom_date',-1);} if (this.value == 'custom') { document.getElementById('dateformat').value = default_dateformat; } else { document.getElementById('dateformat').value = this.value; }">
|
<select name="dateoptions" id="dateoptions" onchange="if(this.value=='custom'){phpbb.toggleDisplay('custom_date',1);}else{phpbb.toggleDisplay('custom_date',-1);} if (this.value == 'custom') { document.getElementById('dateformat').value = default_dateformat; } else { document.getElementById('dateformat').value = this.value; }">
|
||||||
{S_DATEFORMAT_OPTIONS}
|
{S_DATEFORMAT_OPTIONS}
|
||||||
</select>
|
</select>
|
||||||
</dd>
|
</dd>
|
||||||
|
@ -109,11 +109,11 @@
|
||||||
// Show/hide custom field
|
// Show/hide custom field
|
||||||
if (e.selectedIndex == e.length - 1)
|
if (e.selectedIndex == e.length - 1)
|
||||||
{
|
{
|
||||||
dE('custom_date',1);
|
phpbb.toggleDisplay('custom_date',1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dE('custom_date',-1);
|
phpbb.toggleDisplay('custom_date',-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,20 +2,6 @@
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
// <![CDATA[
|
// <![CDATA[
|
||||||
/**
|
|
||||||
* Set display of page element
|
|
||||||
* s[-1,0,1] = hide,toggle display,show
|
|
||||||
*/
|
|
||||||
function dE(n,s)
|
|
||||||
{
|
|
||||||
var e = document.getElementById(n);
|
|
||||||
if (!s)
|
|
||||||
{
|
|
||||||
s = (e.style.display == '') ? -1 : 1;
|
|
||||||
}
|
|
||||||
e.style.display = (s == 1) ? 'block' : 'none';
|
|
||||||
}
|
|
||||||
|
|
||||||
var default_dateformat = '{A_DEFAULT_DATEFORMAT}';
|
var default_dateformat = '{A_DEFAULT_DATEFORMAT}';
|
||||||
// ]]>
|
// ]]>
|
||||||
</script>
|
</script>
|
||||||
|
@ -70,7 +56,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td class="row1" width="50%"><b class="genmed">{L_BOARD_DATE_FORMAT}{L_COLON}</b><br /><span class="gensmall">{L_BOARD_DATE_FORMAT_EXPLAIN}</span></td>
|
<td class="row1" width="50%"><b class="genmed">{L_BOARD_DATE_FORMAT}{L_COLON}</b><br /><span class="gensmall">{L_BOARD_DATE_FORMAT_EXPLAIN}</span></td>
|
||||||
<td class="row2">
|
<td class="row2">
|
||||||
<select name="dateoptions" id="dateoptions" onchange="if(this.value=='custom'){dE('custom_date',1);}else{dE('custom_date',-1);} if (this.value == 'custom') { document.getElementById('dateformat').value = default_dateformat; } else { document.getElementById('dateformat').value = this.value; }">
|
<select name="dateoptions" id="dateoptions" onchange="if(this.value=='custom'){phpbb.toggleDisplay('custom_date',1);}else{phpbb.toggleDisplay('custom_date',-1);} if (this.value == 'custom') { document.getElementById('dateformat').value = default_dateformat; } else { document.getElementById('dateformat').value = this.value; }">
|
||||||
{S_DATEFORMAT_OPTIONS}
|
{S_DATEFORMAT_OPTIONS}
|
||||||
</select>
|
</select>
|
||||||
<div id="custom_date"<!-- IF not S_CUSTOM_DATEFORMAT --> style="display:none;"<!-- ENDIF -->><input type="text" name="dateformat" id="dateformat" value="{DATE_FORMAT}" maxlength="30" class="post" style="margin-top: 3px;" /></div>
|
<div id="custom_date"<!-- IF not S_CUSTOM_DATEFORMAT --> style="display:none;"<!-- ENDIF -->><input type="text" name="dateformat" id="dateformat" value="{DATE_FORMAT}" maxlength="30" class="post" style="margin-top: 3px;" /></div>
|
||||||
|
|
Loading…
Add table
Reference in a new issue