mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-28 12:30:42 +02:00
Merge remote-tracking branch 'marc/ticket/12372' into develop-ascraeus
* marc/ticket/12372: [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:
@@ -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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user