[MediaWiki-commits] [Gerrit] Add option to show traditional oneline watchlist - change (labs...crosswatch)

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

Change subject: Add option to show traditional oneline watchlist
..


Add option to show traditional oneline watchlist

Was wished by many users who don't like the two lines layout.

Change-Id: I5265ebe4ecedf7621dc4b2ee6b700f2763c8ac85
---
M frontend/src/app/index.css
M frontend/src/components/settings/settings.html
M frontend/src/components/watchlist/edit.directive.js
A frontend/src/components/watchlist/edit_oneline.directive.html
R frontend/src/components/watchlist/edit_twolines.directive.html
M frontend/src/components/watchlist/entry.directive.html
M frontend/src/components/watchlist/watchlist.html
M frontend/src/i18n/locale-en.json
8 files changed, 62 insertions(+), 15 deletions(-)

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



diff --git a/frontend/src/app/index.css b/frontend/src/app/index.css
index f8efe72..6434707 100644
--- a/frontend/src/app/index.css
+++ b/frontend/src/app/index.css
@@ -107,6 +107,9 @@
   max-width: 1200px;
 }
 
+.watchlist-list-item-oneline {
+  min-height: 32px;
+}
 watchlist-entry {
   overflow: hidden;
   width: 100%;
@@ -117,9 +120,7 @@
 }
 
 watchlist-entry .left {
-  float: left;
-  width: 125px;
-  overflow: hidden;
+  min-width: 8em;
 }
 
 watchlist-entry a.project {
diff --git a/frontend/src/components/settings/settings.html 
b/frontend/src/components/settings/settings.html
index 54bb943..c40abcd 100644
--- a/frontend/src/components/settings/settings.html
+++ b/frontend/src/components/settings/settings.html
@@ -65,6 +65,10 @@
 md-checkbox ng-model=ctrl.config.lastrevonly 
ng-change=ctrl.resetWatchlist()/md-checkbox
   /md-list-item
   md-list-item
+p translate=ONELINE/p
+md-checkbox ng-model=ctrl.config.oneline 
ng-change=ctrl.saveConfig()/md-checkbox
+  /md-list-item
+  md-list-item
 p translate=FLAGS/p
 md-checkbox ng-model=ctrl.config.flagsenable 
ng-change=ctrl.saveConfig()/md-checkbox
   /md-list-item
diff --git a/frontend/src/components/watchlist/edit.directive.js 
b/frontend/src/components/watchlist/edit.directive.js
index 6ce2eb2..56247df 100644
--- a/frontend/src/components/watchlist/edit.directive.js
+++ b/frontend/src/components/watchlist/edit.directive.js
@@ -6,7 +6,9 @@
   var directive = {
 link: link,
 scope: true,
-templateUrl: 'components/watchlist/edit.directive.html',
+templateUrl: function(elem, attr){
+  return 'components/watchlist/edit_' + attr.type + '.directive.html';
+},
 restrict: 'E'
   };
   return directive;
diff --git a/frontend/src/components/watchlist/edit_oneline.directive.html 
b/frontend/src/components/watchlist/edit_oneline.directive.html
new file mode 100644
index 000..91a9b97
--- /dev/null
+++ b/frontend/src/components/watchlist/edit_oneline.directive.html
@@ -0,0 +1,16 @@
+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}}
+   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)
+/span
+span am-time-ago=event.timestamp/span
+span class=mw-changeslist-separator. ./span
+span dir=ltr ng-class=::event.bytestyle({{::event.bytes}})/span
+span class=mw-changeslist-separator. ./span
+span
+  user/user
+  span ng-if=::event.parsedcomment class=comment(span 
ng-bind-html=::event.parsedcomment/span)/span
+/span
diff --git a/frontend/src/components/watchlist/edit.directive.html 
b/frontend/src/components/watchlist/edit_twolines.directive.html
similarity index 100%
rename from frontend/src/components/watchlist/edit.directive.html
rename to frontend/src/components/watchlist/edit_twolines.directive.html
diff --git a/frontend/src/components/watchlist/entry.directive.html 
b/frontend/src/components/watchlist/entry.directive.html
index 83e99f3..2de1f20 100644
--- a/frontend/src/components/watchlist/entry.directive.html
+++ b/frontend/src/components/watchlist/entry.directive.html
@@ -1,15 +1,38 @@
-div class=left
-  div am-time-ago=event.timestamp/div
-  a href={{::event.projecturl}}/wiki/Special:Watchlist class=project
- title={{::event.project}} target=_blank
+div ng-if=ctrl.config.oneline layout=row
+  div class=left
+a href={{::event.projecturl}}/wiki/Special:Watchlist class=project
+   title={{::event.project}} target=_blank
 span ng-if=::event.projectlang
   span ng-if=!ctrl.config.flagsenable || 
!ctrl.flagurl(event.projectlang){{::event.projectlangname}}#32;/span
   img 

[MediaWiki-commits] [Gerrit] Add option to show traditional oneline watchlist - change (labs...crosswatch)

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

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

Change subject: Add option to show traditional oneline watchlist
..

Add option to show traditional oneline watchlist

Was wished by many users who don't like the two lines layout.

Change-Id: I5265ebe4ecedf7621dc4b2ee6b700f2763c8ac85
---
M frontend/src/app/index.css
M frontend/src/components/settings/settings.html
M frontend/src/components/watchlist/edit.directive.js
A frontend/src/components/watchlist/edit_oneline.directive.html
R frontend/src/components/watchlist/edit_twolines.directive.html
M frontend/src/components/watchlist/entry.directive.html
M frontend/src/components/watchlist/watchlist.html
M frontend/src/i18n/locale-en.json
8 files changed, 62 insertions(+), 15 deletions(-)


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

diff --git a/frontend/src/app/index.css b/frontend/src/app/index.css
index f8efe72..6434707 100644
--- a/frontend/src/app/index.css
+++ b/frontend/src/app/index.css
@@ -107,6 +107,9 @@
   max-width: 1200px;
 }
 
+.watchlist-list-item-oneline {
+  min-height: 32px;
+}
 watchlist-entry {
   overflow: hidden;
   width: 100%;
@@ -117,9 +120,7 @@
 }
 
 watchlist-entry .left {
-  float: left;
-  width: 125px;
-  overflow: hidden;
+  min-width: 8em;
 }
 
 watchlist-entry a.project {
diff --git a/frontend/src/components/settings/settings.html 
b/frontend/src/components/settings/settings.html
index 54bb943..c40abcd 100644
--- a/frontend/src/components/settings/settings.html
+++ b/frontend/src/components/settings/settings.html
@@ -65,6 +65,10 @@
 md-checkbox ng-model=ctrl.config.lastrevonly 
ng-change=ctrl.resetWatchlist()/md-checkbox
   /md-list-item
   md-list-item
+p translate=ONELINE/p
+md-checkbox ng-model=ctrl.config.oneline 
ng-change=ctrl.saveConfig()/md-checkbox
+  /md-list-item
+  md-list-item
 p translate=FLAGS/p
 md-checkbox ng-model=ctrl.config.flagsenable 
ng-change=ctrl.saveConfig()/md-checkbox
   /md-list-item
diff --git a/frontend/src/components/watchlist/edit.directive.js 
b/frontend/src/components/watchlist/edit.directive.js
index 6ce2eb2..56247df 100644
--- a/frontend/src/components/watchlist/edit.directive.js
+++ b/frontend/src/components/watchlist/edit.directive.js
@@ -6,7 +6,9 @@
   var directive = {
 link: link,
 scope: true,
-templateUrl: 'components/watchlist/edit.directive.html',
+templateUrl: function(elem, attr){
+  return 'components/watchlist/edit_' + attr.type + '.directive.html';
+},
 restrict: 'E'
   };
   return directive;
diff --git a/frontend/src/components/watchlist/edit_oneline.directive.html 
b/frontend/src/components/watchlist/edit_oneline.directive.html
new file mode 100644
index 000..91a9b97
--- /dev/null
+++ b/frontend/src/components/watchlist/edit_oneline.directive.html
@@ -0,0 +1,16 @@
+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}}
+   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)
+/span
+span am-time-ago=event.timestamp/span
+span class=mw-changeslist-separator. ./span
+span dir=ltr ng-class=::event.bytestyle({{::event.bytes}})/span
+span class=mw-changeslist-separator. ./span
+span
+  user/user
+  span ng-if=::event.parsedcomment class=comment(span 
ng-bind-html=::event.parsedcomment/span)/span
+/span
diff --git a/frontend/src/components/watchlist/edit.directive.html 
b/frontend/src/components/watchlist/edit_twolines.directive.html
similarity index 100%
rename from frontend/src/components/watchlist/edit.directive.html
rename to frontend/src/components/watchlist/edit_twolines.directive.html
diff --git a/frontend/src/components/watchlist/entry.directive.html 
b/frontend/src/components/watchlist/entry.directive.html
index 83e99f3..2de1f20 100644
--- a/frontend/src/components/watchlist/entry.directive.html
+++ b/frontend/src/components/watchlist/entry.directive.html
@@ -1,15 +1,38 @@
-div class=left
-  div am-time-ago=event.timestamp/div
-  a href={{::event.projecturl}}/wiki/Special:Watchlist class=project
- title={{::event.project}} target=_blank
+div ng-if=ctrl.config.oneline layout=row
+  div class=left
+a href={{::event.projecturl}}/wiki/Special:Watchlist class=project
+   title={{::event.project}} target=_blank
 span ng-if=::event.projectlang
   span ng-if=!ctrl.config.flagsenable ||