Merge branch 'stable-2.9'

* stable-2.9:
  Enable automatic close changes on 'refs/meta/config'
  Implement pagination in group list screen
  Add option 'n' and 'S' to groups REST API to limit group results.
  Do not refresh group list if filter did not change
  Don't show the submit button for draft patch sets
  Prevent draft changes from being abandoned
  Allow plugins to refresh Gerrit's menu bar

Change-Id: Iedfdea0105829119dfe5e2d729bb53b55b233d74
This commit is contained in:
David Pursehouse
2014-04-17 14:31:33 +09:00
14 changed files with 171 additions and 19 deletions

View File

@@ -38,6 +38,7 @@ public class ActionContext extends JavaScriptObject {
Gerrit.ActionContext.prototype = {
go: Gerrit.go,
refresh: Gerrit.refresh,
refreshMenuBar: Gerrit.refreshMenuBar,
showError: Gerrit.showError,
br: function(){return doc.createElement('br')},

View File

@@ -63,6 +63,7 @@ public class ApiGlue {
go: @com.google.gerrit.client.api.ApiGlue::go(Ljava/lang/String;),
refresh: @com.google.gerrit.client.api.ApiGlue::refresh(),
refreshMenuBar: @com.google.gerrit.client.api.ApiGlue::refreshMenuBar(),
showError: @com.google.gerrit.client.api.ApiGlue::showError(Ljava/lang/String;),
on: function (e,f){(this.events[e] || (this.events[e]=[])).push(f)},
@@ -191,6 +192,10 @@ public class ApiGlue {
Gerrit.display(History.getToken());
}
private static final void refreshMenuBar() {
Gerrit.refreshMenuBar();
}
private static final void showError(String message) {
new ErrorDialog(message).center();
}

View File

@@ -52,6 +52,7 @@ final class Plugin extends JavaScriptObject {
getPluginName: function(){return this.name},
go: @com.google.gerrit.client.api.ApiGlue::go(Ljava/lang/String;),
refresh: @com.google.gerrit.client.api.ApiGlue::refresh(),
refreshMenuBar: @com.google.gerrit.client.api.ApiGlue::refreshMenuBar(),
showError: @com.google.gerrit.client.api.ApiGlue::showError(Ljava/lang/String;),
on: function(e,f){G.on(e,f)},
onAction: function(t,n,c){G._onAction(this.name,t,n,c)},