Renamed 'hasOnlick' to 'hasOnclick', added function to StandardJS Globals (#1361)

This commit is contained in:
Stapelpanda 2017-03-17 11:42:46 +01:00 committed by Igor Zhukov
parent f3c849b78f
commit 63489fe23f
3 changed files with 5 additions and 5 deletions

View File

@ -6,7 +6,7 @@
*/ */
'use strict' 'use strict'
/* global Config, location, templateUrl, onContentLoaded, tsNow, cancelEvent, safeReplaceObject, dT, SearchIndexManager, setZeroTimeout, versionCompare, calcImageInBox, getSelectedText, SVGElement */ /* global Config, location, templateUrl, onContentLoaded, tsNow, cancelEvent, safeReplaceObject, dT, SearchIndexManager, setZeroTimeout, versionCompare, calcImageInBox, getSelectedText, SVGElement, hasOnclick */
/* Controllers */ /* Controllers */
@ -1666,7 +1666,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
target.className.indexOf('im_message_body') != -1) { target.className.indexOf('im_message_body') != -1) {
break break
} }
if (target.tagName == 'A' || hasOnlick(target)) { if (target.tagName == 'A' || hasOnclick(target)) {
return false return false
} }
target = target.parentNode target = target.parentNode

View File

@ -6,7 +6,7 @@
*/ */
'use strict' 'use strict'
/* global Config, templateUrl, onContentLoaded, cancelEvent, dT, setZeroTimeout calcImageInBox, getSelectedText,Scroller, setFieldSelection, scrollToNode, EmojiTooltip, EmojiPanel, MessageComposer, checkDragEvent, checkClick, Image, Clipboard, EmojiHelper, encodeEntities, FB, twttr, gapi, isInDOM */ /* global Config, templateUrl, onContentLoaded, cancelEvent, dT, setZeroTimeout calcImageInBox, getSelectedText,Scroller, setFieldSelection, scrollToNode, EmojiTooltip, EmojiPanel, MessageComposer, checkDragEvent, checkClick, Image, Clipboard, EmojiHelper, encodeEntities, FB, twttr, gapi, isInDOM, hasOnclick */
/* Directives */ /* Directives */
@ -2848,7 +2848,7 @@ angular.module('myApp.directives', ['myApp.filters'])
} }
} }
if (element[0].tagName == 'A' && !hasOnlick(element[0])) { if (element[0].tagName == 'A' && !hasOnclick(element[0])) {
element.on('click', function () { element.on('click', function () {
if (peerID > 0) { if (peerID > 0) {
AppUsersManager.openUser(peerID, override) AppUsersManager.openUser(peerID, override)

View File

@ -62,7 +62,7 @@ function cancelEvent (event) {
return false return false
} }
function hasOnlick (element) { function hasOnclick (element) {
if (element.onclick || if (element.onclick ||
element.getAttribute('ng-click')) { element.getAttribute('ng-click')) {
return true return true