mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/12372] Move dE() function core.js
PHPBB3-12372
This commit is contained in:
parent
ad98a070c3
commit
966a2b4892
7 changed files with 23 additions and 112 deletions
|
@ -7,34 +7,6 @@
|
|||
<title>{PAGE_TITLE}</title>
|
||||
|
||||
<link href="{T_TEMPLATE_PATH}/admin.css" rel="stylesheet" type="text/css" media="screen" />
|
||||
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
function dE(id, action, type) {
|
||||
if (!type) {
|
||||
type = 'block';
|
||||
}
|
||||
|
||||
var display = jQuery('#' + id).css('display');
|
||||
if (!action) {
|
||||
action = (display === '' || display === type) ? -1 : 1;
|
||||
}
|
||||
jQuery('#' + id).css('display', ((action === 1) ? type : 'none'));
|
||||
}
|
||||
|
||||
// ]]>
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="{S_CONTENT_DIRECTION} nojs">
|
||||
|
|
|
@ -35,27 +35,6 @@ function jumpto()
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
function dE(id, action, type) {
|
||||
if (!type) {
|
||||
type = 'block';
|
||||
}
|
||||
|
||||
var display = jQuery('#' + id).css('display');
|
||||
if (!action) {
|
||||
action = (display === '' || display === type) ? -1 : 1;
|
||||
}
|
||||
jQuery('#' + id).css('display', ((action === 1) ? type : 'none'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Mark/unmark checkboxes
|
||||
* id = ID of parent container, name = name prefix, state = state [true/false]
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
|
||||
<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 -->
|
||||
<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script>
|
||||
|
||||
<!-- EVENT acp_simple_footer_after -->
|
||||
|
||||
</body>
|
||||
|
|
|
@ -48,27 +48,6 @@ function jumpto()
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
function dE(id, action, type) {
|
||||
if (!type) {
|
||||
type = 'block';
|
||||
}
|
||||
|
||||
var display = jQuery('#' + id).css('display');
|
||||
if (!action) {
|
||||
action = (display === '' || display === type) ? -1 : 1;
|
||||
}
|
||||
jQuery('#' + id).css('display', ((action === 1) ? type : 'none'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Mark/unmark checkboxes
|
||||
* id = ID of parent container, name = name prefix, state = state [true/false]
|
||||
|
|
|
@ -1061,6 +1061,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
|
||||
*/
|
||||
function dE(id, action, type) {
|
||||
if (!type) {
|
||||
type = 'block';
|
||||
}
|
||||
|
||||
var display = jQuery('#' + id).css('display');
|
||||
if (!action) {
|
||||
action = (display === '' || display === type) ? -1 : 1;
|
||||
}
|
||||
jQuery('#' + id).css('display', ((action === 1) ? type : 'none'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply code editor to all textarea elements with data-bbcode attribute
|
||||
*/
|
||||
|
|
|
@ -91,27 +91,6 @@ function viewableArea(e, itself) {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
function dE(id, action, type) {
|
||||
if (!type) {
|
||||
type = 'block';
|
||||
}
|
||||
|
||||
var display = jQuery('#' + id).css('display');
|
||||
if (!action) {
|
||||
action = (display === '' || display === type) ? -1 : 1;
|
||||
}
|
||||
jQuery('#' + id).css('display', ((action === 1) ? type : 'none'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Alternate display of subPanels
|
||||
*/
|
||||
|
|
|
@ -2,27 +2,6 @@
|
|||
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
function dE(id, action, type) {
|
||||
if (!type) {
|
||||
type = 'block';
|
||||
}
|
||||
|
||||
var display = jQuery('#' + id).css('display');
|
||||
if (!action) {
|
||||
action = (display === '' || display === type) ? -1 : 1;
|
||||
}
|
||||
jQuery('#' + id).css('display', ((action === 1) ? type : 'none'));
|
||||
}
|
||||
|
||||
var default_dateformat = '{A_DEFAULT_DATEFORMAT}';
|
||||
// ]]>
|
||||
</script>
|
||||
|
|
Loading…
Add table
Reference in a new issue