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