mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-10-31 14:10:08 +00:00
Enable DOMNodeInsertedHandler
This commit is contained in:
parent
60d23310e3
commit
ec8eba6986
@ -192,7 +192,7 @@ window.console ?=
|
||||
# Desktop Notifications
|
||||
unless typeof window.webkitNotifications is 'undefined'
|
||||
$('#timsChatNotify').click (event) ->
|
||||
if $(@).data 'status' and window.webkitNotifications.checkPermission() isnt 0
|
||||
if $(@).data('status') and window.webkitNotifications.checkPermission() isnt 0
|
||||
window.webkitNotifications.requestPermission()
|
||||
|
||||
###
|
||||
@ -280,8 +280,10 @@ window.console ?=
|
||||
dataType: 'json'
|
||||
type: 'POST'
|
||||
success: $.proxy((data, textStatus, jqXHR) ->
|
||||
WCF.DOMNodeInsertedHandler.enable()
|
||||
@handleMessages(data.messages)
|
||||
@handleUsers(data.users)
|
||||
WCF.DOMNodeInsertedHandler.disable()
|
||||
, @)
|
||||
error: $.proxy((jqXHR, textStatus, errorThrown) ->
|
||||
console.error 'Battle Station hit - shields at ' + (--@shields / 3 * 104) + ' percent'
|
||||
|
@ -84,19 +84,14 @@ public function prune() {
|
||||
public function validateUpdatePosition() {
|
||||
// validate permissions
|
||||
if (is_array($this->permissionsUpdate) && count($this->permissionsUpdate)) {
|
||||
try {
|
||||
WCF::getSession()->checkPermissions($this->permissionsUpdate);
|
||||
}
|
||||
catch (\wcf\system\exception\PermissionDeniedException $e) {
|
||||
throw new ValidateActionException('Insufficient permissions');
|
||||
}
|
||||
WCF::getSession()->checkPermissions($this->permissionsUpdate);
|
||||
}
|
||||
else {
|
||||
throw new ValidateActionException('Insufficient permissions');
|
||||
throw new PermissionDeniedException();
|
||||
}
|
||||
|
||||
if (!isset($this->parameters['data']['structure'])) {
|
||||
throw new ValidateActionException('Missing parameter structure');
|
||||
throw new UserInputException('structure');
|
||||
}
|
||||
|
||||
if (!isset($this->parameters['data']['offset'])) $this->parameters['data']['offset'] = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user