[MediaWiki-commits] [Gerrit] Stop click event propagation for a href - change (labs...crosswatch)

2015-07-10 Thread Sitic (Code Review)
Sitic has submitted this change and it was merged.

Change subject: Stop click event propagation for a href
..


Stop click event propagation for a href

Change-Id: I119bcf84e4ad1ef4e7ea6e50db78d506c7dc957b
---
M backend/celery/tasks.py
M frontend/src/components/watchlist/edit_oneline.directive.html
M frontend/src/components/watchlist/edit_twolines.directive.html
M frontend/src/components/watchlist/entry.directive.html
M frontend/src/components/watchlist/page.directive.js
M frontend/src/components/watchlist/user.directive.js
6 files changed, 7 insertions(+), 7 deletions(-)

Approvals:
  Sitic: Verified; Looks good to me, approved



diff --git a/backend/celery/tasks.py b/backend/celery/tasks.py
index c9e91c2..fe4df54 100644
--- a/backend/celery/tasks.py
+++ b/backend/celery/tasks.py
@@ -95,7 +95,7 @@
 
 
 def fix_urls(html, url):
-a = u'a target=_blank href=' + url + u'/'
+a = u'a stop-event target=_blank href=' + url + u'/'
 html = html.replace(u'a href=/', a)
 return html
 
diff --git a/frontend/src/components/watchlist/edit_oneline.directive.html 
b/frontend/src/components/watchlist/edit_oneline.directive.html
index 91a9b97..a051f6c 100644
--- a/frontend/src/components/watchlist/edit_oneline.directive.html
+++ b/frontend/src/components/watchlist/edit_oneline.directive.html
@@ -1,7 +1,7 @@
 span class=newpage ng-if=::event.new translate=NEWPAGE_FLAG/span
 span class=minoredit ng-if=::event.minor 
 translate=MINOREDIT_FLAG/span
 span class=botedit ng-if=::event.bot translate=BOTEDIT_FLAG/span
-a dir=ltr 
href={{::event.projecturl}}/w/index.php?oldid={{::event.old_revid}}diff={{::event.revid}}
+a stop-event dir=ltr 
href={{::event.projecturl}}/w/index.php?oldid={{::event.old_revid}}diff={{::event.revid}}
ng-class=::event.titlestyle  target=_blank{{::event.title}}/a
 span ng-if=event.clicked
   (a stop-event 
href={{::event.projecturl}}/w/index.php?title={{::event.title | 
urlEncode}}action=history target=_blank translate=HISTORY/a)
diff --git a/frontend/src/components/watchlist/edit_twolines.directive.html 
b/frontend/src/components/watchlist/edit_twolines.directive.html
index 50910bb..4413525 100644
--- a/frontend/src/components/watchlist/edit_twolines.directive.html
+++ b/frontend/src/components/watchlist/edit_twolines.directive.html
@@ -1,7 +1,7 @@
 span class=newpage ng-if=::event.new translate=NEWPAGE_FLAG/span
 span class=minoredit ng-if=::event.minor 
 translate=MINOREDIT_FLAG/span
 span class=botedit ng-if=::event.bot translate=BOTEDIT_FLAG/span
-a 
href={{::event.projecturl}}/w/index.php?oldid={{::event.old_revid}}diff={{::event.revid}}
+a stop-event 
href={{::event.projecturl}}/w/index.php?oldid={{::event.old_revid}}diff={{::event.revid}}
ng-class=::event.titlestyle  target=_blank{{::event.title}}/a
 span ng-if=event.clicked
   (a stop-event 
href={{::event.projecturl}}/w/index.php?title={{::event.title | 
urlEncode}}action=history target=_blank translate=HISTORY/a)
diff --git a/frontend/src/components/watchlist/entry.directive.html 
b/frontend/src/components/watchlist/entry.directive.html
index c31c419..9adbcbb 100644
--- a/frontend/src/components/watchlist/entry.directive.html
+++ b/frontend/src/components/watchlist/entry.directive.html
@@ -1,6 +1,6 @@
 div ng-if=ctrl.config.oneline layout=row
   div class=left
-a href={{::event.projecturl}}/wiki/Special:Watchlist class=project
+a stop-event href={{::event.projecturl}}/wiki/Special:Watchlist 
class=project
title={{::event.project}} target=_blank
   img height=16px ng-src={{::ctrl.icons[event.projectgroup]}} 
alt={{::event.projectgroup}}
   span ng-if=::event.projectlang
@@ -22,7 +22,7 @@
 div ng-if=!ctrl.config.oneline layout=row
   div class=left
 div am-time-ago=event.timestamp/div
-a href={{::event.projecturl}}/wiki/Special:Watchlist class=project
+a stop-event href={{::event.projecturl}}/wiki/Special:Watchlist 
class=project
title={{::event.project}} target=_blank
   img height=16px ng-src={{::ctrl.icons[event.projectgroup]}} 
alt={{::event.projectgroup}}
   span ng-if=::event.projectlang
diff --git a/frontend/src/components/watchlist/page.directive.js 
b/frontend/src/components/watchlist/page.directive.js
index f7b42f8..a3e79ac 100644
--- a/frontend/src/components/watchlist/page.directive.js
+++ b/frontend/src/components/watchlist/page.directive.js
@@ -6,7 +6,7 @@
   var directive = {
 link: link,
 scope: true,
-template: 'a href={{::event.projecturl}}/wiki/{{::event.title | 
urlEncode}}  target=_blank{{::event.title}}/a ' +
+template: 'a stop-event href={{::event.projecturl}}/wiki/{{::event.title 
| urlEncode}}  target=_blank{{::event.title}}/a ' +
 'span ng-if=event.clicked' +
 '(a stop-event 
href={{::event.projecturl}}/w/index.php?title={{::event.title | 
urlEncode}}action=history target=_blank translate=HISTORY/a)' +
 '/span',
diff --git 

[MediaWiki-commits] [Gerrit] Stop click event propagation for a href - change (labs...crosswatch)

2015-07-10 Thread Sitic (Code Review)
Sitic has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/224209

Change subject: Stop click event propagation for a href
..

Stop click event propagation for a href

Change-Id: I119bcf84e4ad1ef4e7ea6e50db78d506c7dc957b
---
M backend/celery/tasks.py
M frontend/src/components/watchlist/edit_oneline.directive.html
M frontend/src/components/watchlist/edit_twolines.directive.html
M frontend/src/components/watchlist/entry.directive.html
M frontend/src/components/watchlist/page.directive.js
M frontend/src/components/watchlist/user.directive.js
6 files changed, 7 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/crosswatch 
refs/changes/09/224209/1

diff --git a/backend/celery/tasks.py b/backend/celery/tasks.py
index c9e91c2..fe4df54 100644
--- a/backend/celery/tasks.py
+++ b/backend/celery/tasks.py
@@ -95,7 +95,7 @@
 
 
 def fix_urls(html, url):
-a = u'a target=_blank href=' + url + u'/'
+a = u'a stop-event target=_blank href=' + url + u'/'
 html = html.replace(u'a href=/', a)
 return html
 
diff --git a/frontend/src/components/watchlist/edit_oneline.directive.html 
b/frontend/src/components/watchlist/edit_oneline.directive.html
index 91a9b97..a051f6c 100644
--- a/frontend/src/components/watchlist/edit_oneline.directive.html
+++ b/frontend/src/components/watchlist/edit_oneline.directive.html
@@ -1,7 +1,7 @@
 span class=newpage ng-if=::event.new translate=NEWPAGE_FLAG/span
 span class=minoredit ng-if=::event.minor 
 translate=MINOREDIT_FLAG/span
 span class=botedit ng-if=::event.bot translate=BOTEDIT_FLAG/span
-a dir=ltr 
href={{::event.projecturl}}/w/index.php?oldid={{::event.old_revid}}diff={{::event.revid}}
+a stop-event dir=ltr 
href={{::event.projecturl}}/w/index.php?oldid={{::event.old_revid}}diff={{::event.revid}}
ng-class=::event.titlestyle  target=_blank{{::event.title}}/a
 span ng-if=event.clicked
   (a stop-event 
href={{::event.projecturl}}/w/index.php?title={{::event.title | 
urlEncode}}action=history target=_blank translate=HISTORY/a)
diff --git a/frontend/src/components/watchlist/edit_twolines.directive.html 
b/frontend/src/components/watchlist/edit_twolines.directive.html
index 50910bb..4413525 100644
--- a/frontend/src/components/watchlist/edit_twolines.directive.html
+++ b/frontend/src/components/watchlist/edit_twolines.directive.html
@@ -1,7 +1,7 @@
 span class=newpage ng-if=::event.new translate=NEWPAGE_FLAG/span
 span class=minoredit ng-if=::event.minor 
 translate=MINOREDIT_FLAG/span
 span class=botedit ng-if=::event.bot translate=BOTEDIT_FLAG/span
-a 
href={{::event.projecturl}}/w/index.php?oldid={{::event.old_revid}}diff={{::event.revid}}
+a stop-event 
href={{::event.projecturl}}/w/index.php?oldid={{::event.old_revid}}diff={{::event.revid}}
ng-class=::event.titlestyle  target=_blank{{::event.title}}/a
 span ng-if=event.clicked
   (a stop-event 
href={{::event.projecturl}}/w/index.php?title={{::event.title | 
urlEncode}}action=history target=_blank translate=HISTORY/a)
diff --git a/frontend/src/components/watchlist/entry.directive.html 
b/frontend/src/components/watchlist/entry.directive.html
index c31c419..9adbcbb 100644
--- a/frontend/src/components/watchlist/entry.directive.html
+++ b/frontend/src/components/watchlist/entry.directive.html
@@ -1,6 +1,6 @@
 div ng-if=ctrl.config.oneline layout=row
   div class=left
-a href={{::event.projecturl}}/wiki/Special:Watchlist class=project
+a stop-event href={{::event.projecturl}}/wiki/Special:Watchlist 
class=project
title={{::event.project}} target=_blank
   img height=16px ng-src={{::ctrl.icons[event.projectgroup]}} 
alt={{::event.projectgroup}}
   span ng-if=::event.projectlang
@@ -22,7 +22,7 @@
 div ng-if=!ctrl.config.oneline layout=row
   div class=left
 div am-time-ago=event.timestamp/div
-a href={{::event.projecturl}}/wiki/Special:Watchlist class=project
+a stop-event href={{::event.projecturl}}/wiki/Special:Watchlist 
class=project
title={{::event.project}} target=_blank
   img height=16px ng-src={{::ctrl.icons[event.projectgroup]}} 
alt={{::event.projectgroup}}
   span ng-if=::event.projectlang
diff --git a/frontend/src/components/watchlist/page.directive.js 
b/frontend/src/components/watchlist/page.directive.js
index f7b42f8..a3e79ac 100644
--- a/frontend/src/components/watchlist/page.directive.js
+++ b/frontend/src/components/watchlist/page.directive.js
@@ -6,7 +6,7 @@
   var directive = {
 link: link,
 scope: true,
-template: 'a href={{::event.projecturl}}/wiki/{{::event.title | 
urlEncode}}  target=_blank{{::event.title}}/a ' +
+template: 'a stop-event href={{::event.projecturl}}/wiki/{{::event.title 
| urlEncode}}  target=_blank{{::event.title}}/a ' +
 'span ng-if=event.clicked' +
 '(a stop-event 
href={{::event.projecturl}}/w/index.php?title={{::event.title | 
urlEncode}}action=history target=_blank