diff --git a/core/dom/dom.ui.js b/core/dom/dom.ui.js index 44ae6a101b..343994b4e4 100644 --- a/core/dom/dom.ui.js +++ b/core/dom/dom.ui.js @@ -77,7 +77,20 @@ NodeList.prototype.unseen = function() { } return this } - +Element.prototype.toggle = function() { + if (this.offsetParent === null){ + this.style.display = '' + } else { + this.style.display = 'none' + } + return this +} +NodeList.prototype.toggle = function() { + for (var idx = 0; idx < this.length; idx++) { + this[idx].toggle() + } + return this +} Element.prototype.empty = function() { while (this.firstChild) { this.removeChild(this.lastChild) diff --git a/core/php/utils.inc.php b/core/php/utils.inc.php index c113fcf7d0..a786c0d20e 100644 --- a/core/php/utils.inc.php +++ b/core/php/utils.inc.php @@ -254,9 +254,9 @@ function mySqlIsHere() { function displayException($e) { $message = '' . $e->getMessage() . ''; - if (DEBUG) { - $message .= 'Show traces'; - $message .= '
'; + if (DEBUG !== 0) { + $message .= "Show traces"; + $message .= '
'; } return $message; } diff --git a/sick.php b/sick.php index 6855776dc6..83725699c7 100644 --- a/sick.php +++ b/sick.php @@ -75,7 +75,7 @@ $user->save(); echo "OK (admin/admin)\n"; } -} catch (Exeption $e) { +} catch (Exception $e) { echo "ERROR\n"; echo "Description : " . $e->getMessage(); echo "\n";