aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2014-04-07 21:27:48 +0200
committerMarc Alexander <admin@m-a-styles.de>2014-04-07 21:27:48 +0200
commit966a2b4892762f3a1f032089d0b01c97a1d1c2e1 (patch)
treef258183522b97560e0eb0d26bce5126f8e53956f
parentad98a070c37a66f773851851888f7e98dc447d92 (diff)
downloadforums-966a2b4892762f3a1f032089d0b01c97a1d1c2e1.tar
forums-966a2b4892762f3a1f032089d0b01c97a1d1c2e1.tar.gz
forums-966a2b4892762f3a1f032089d0b01c97a1d1c2e1.tar.bz2
forums-966a2b4892762f3a1f032089d0b01c97a1d1c2e1.tar.xz
forums-966a2b4892762f3a1f032089d0b01c97a1d1c2e1.zip
[ticket/12372] Move dE() function core.js
PHPBB3-12372
-rw-r--r--phpBB/adm/style/install_header.html28
-rw-r--r--phpBB/adm/style/overall_header.html21
-rw-r--r--phpBB/adm/style/simple_footer.html2
-rw-r--r--phpBB/adm/style/simple_header.html21
-rw-r--r--phpBB/assets/javascript/core.js21
-rw-r--r--phpBB/styles/prosilver/template/forum_fn.js21
-rw-r--r--phpBB/styles/subsilver2/template/ucp_prefs_personal.html21
7 files changed, 23 insertions, 112 deletions
diff --git a/phpBB/adm/style/install_header.html b/phpBB/adm/style/install_header.html
index 4980fd36fb..a8f7009e4b 100644
--- a/phpBB/adm/style/install_header.html
+++ b/phpBB/adm/style/install_header.html
@@ -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">
diff --git a/phpBB/adm/style/overall_header.html b/phpBB/adm/style/overall_header.html
index 668c0f4e92..774df48917 100644
--- a/phpBB/adm/style/overall_header.html
+++ b/phpBB/adm/style/overall_header.html
@@ -36,27 +36,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]
*/
diff --git a/phpBB/adm/style/simple_footer.html b/phpBB/adm/style/simple_footer.html
index a559b25b72..c549a2df4e 100644
--- a/phpBB/adm/style/simple_footer.html
+++ b/phpBB/adm/style/simple_footer.html
@@ -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>
diff --git a/phpBB/adm/style/simple_header.html b/phpBB/adm/style/simple_header.html
index 01757f1032..8950c4c394 100644
--- a/phpBB/adm/style/simple_header.html
+++ b/phpBB/adm/style/simple_header.html
@@ -49,27 +49,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]
*/
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js
index aa9dc9af82..ccb031de24 100644
--- a/phpBB/assets/javascript/core.js
+++ b/phpBB/assets/javascript/core.js
@@ -1062,6 +1062,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
*/
$(document).ready(function() {
diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js
index 7d114d9593..96f665492d 100644
--- a/phpBB/styles/prosilver/template/forum_fn.js
+++ b/phpBB/styles/prosilver/template/forum_fn.js
@@ -92,27 +92,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
*/
jQuery(document).ready(function() {
diff --git a/phpBB/styles/subsilver2/template/ucp_prefs_personal.html b/phpBB/styles/subsilver2/template/ucp_prefs_personal.html
index 3499f5ef9a..47e43cafba 100644
--- a/phpBB/styles/subsilver2/template/ucp_prefs_personal.html
+++ b/phpBB/styles/subsilver2/template/ucp_prefs_personal.html
@@ -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>