mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 16:35:45 +01:00
enable grouping view by default
This commit is contained in:
@@ -65,12 +65,12 @@ public class ScmClientConfig
|
|||||||
* @since 1.9
|
* @since 1.9
|
||||||
*
|
*
|
||||||
* @param dateFormat
|
* @param dateFormat
|
||||||
* @param enableGroupingGrid
|
* @param disableGroupingGrid true to disable repository grouping
|
||||||
*/
|
*/
|
||||||
public ScmClientConfig(String dateFormat, boolean enableGroupingGrid)
|
public ScmClientConfig(String dateFormat, boolean disableGroupingGrid)
|
||||||
{
|
{
|
||||||
this.dateFormat = dateFormat;
|
this.dateFormat = dateFormat;
|
||||||
this.enableGroupingGrid = enableGroupingGrid;
|
this.disableGroupingGrid = disableGroupingGrid;
|
||||||
}
|
}
|
||||||
|
|
||||||
//~--- get methods ----------------------------------------------------------
|
//~--- get methods ----------------------------------------------------------
|
||||||
@@ -89,15 +89,15 @@ public class ScmClientConfig
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if the grouping of repositories is enabled.
|
* Returns true if the grouping of repositories is disabled.
|
||||||
*
|
*
|
||||||
* @since 1.9
|
* @since 1.9
|
||||||
*
|
*
|
||||||
* @return true if the grouping of repositories is enabled
|
* @return true if the grouping of repositories is disabled
|
||||||
*/
|
*/
|
||||||
public boolean isEnableGroupingGrid()
|
public boolean isDisableGroupingGrid()
|
||||||
{
|
{
|
||||||
return enableGroupingGrid;
|
return disableGroupingGrid;
|
||||||
}
|
}
|
||||||
|
|
||||||
//~--- set methods ----------------------------------------------------------
|
//~--- set methods ----------------------------------------------------------
|
||||||
@@ -119,11 +119,12 @@ public class ScmClientConfig
|
|||||||
*
|
*
|
||||||
* @since 1.9
|
* @since 1.9
|
||||||
*
|
*
|
||||||
* @param enableGroupingGrid - true to enable repository grouping
|
*
|
||||||
|
* @param disableGroupingGrid
|
||||||
*/
|
*/
|
||||||
public void setEnableGroupingGrid(boolean enableGroupingGrid)
|
public void setDisableGroupingGrid(boolean disableGroupingGrid)
|
||||||
{
|
{
|
||||||
this.enableGroupingGrid = enableGroupingGrid;
|
this.disableGroupingGrid = disableGroupingGrid;
|
||||||
}
|
}
|
||||||
|
|
||||||
//~--- fields ---------------------------------------------------------------
|
//~--- fields ---------------------------------------------------------------
|
||||||
@@ -132,5 +133,5 @@ public class ScmClientConfig
|
|||||||
private String dateFormat;
|
private String dateFormat;
|
||||||
|
|
||||||
/** Field description */
|
/** Field description */
|
||||||
private boolean enableGroupingGrid = true;
|
private boolean disableGroupingGrid = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ public class ScmConfiguration
|
|||||||
this.proxyPassword = other.proxyPassword;
|
this.proxyPassword = other.proxyPassword;
|
||||||
this.forceBaseUrl = other.forceBaseUrl;
|
this.forceBaseUrl = other.forceBaseUrl;
|
||||||
this.baseUrl = other.baseUrl;
|
this.baseUrl = other.baseUrl;
|
||||||
this.enableGroupingGrid = other.enableGroupingGrid;
|
this.disableGroupingGrid = other.disableGroupingGrid;
|
||||||
|
|
||||||
// deprecated fields
|
// deprecated fields
|
||||||
this.sslPort = other.sslPort;
|
this.sslPort = other.sslPort;
|
||||||
@@ -349,14 +349,12 @@ public class ScmConfiguration
|
|||||||
/**
|
/**
|
||||||
* Method description
|
* Method description
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* @since 1.9
|
* @since 1.9
|
||||||
*
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public boolean isEnableGroupingGrid()
|
public boolean isDisableGroupingGrid()
|
||||||
{
|
{
|
||||||
return enableGroupingGrid;
|
return disableGroupingGrid;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -468,14 +466,13 @@ public class ScmConfiguration
|
|||||||
/**
|
/**
|
||||||
* Method description
|
* Method description
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* @since 1.9
|
* @since 1.9
|
||||||
*
|
*
|
||||||
* @param enableGroupingGrid
|
* @param disableGroupingGrid
|
||||||
*/
|
*/
|
||||||
public void setEnableGroupingGrid(boolean enableGroupingGrid)
|
public void setDisableGroupingGrid(boolean disableGroupingGrid)
|
||||||
{
|
{
|
||||||
this.enableGroupingGrid = enableGroupingGrid;
|
this.disableGroupingGrid = disableGroupingGrid;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -686,7 +683,7 @@ public class ScmConfiguration
|
|||||||
new HashSet<ConfigChangedListener>();
|
new HashSet<ConfigChangedListener>();
|
||||||
|
|
||||||
/** Field description */
|
/** Field description */
|
||||||
private boolean enableGroupingGrid = false;
|
private boolean disableGroupingGrid = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* JavaScript date format, see http://jacwright.com/projects/javascript/date_format
|
* JavaScript date format, see http://jacwright.com/projects/javascript/date_format
|
||||||
|
|||||||
@@ -248,7 +248,7 @@ public class AuthenticationResource
|
|||||||
return new ScmState(contextProvider, securityContext,
|
return new ScmState(contextProvider, securityContext,
|
||||||
repositoryManger.getConfiguredTypes(),
|
repositoryManger.getConfiguredTypes(),
|
||||||
new ScmClientConfig(configuration.getDateFormat(),
|
new ScmClientConfig(configuration.getDateFormat(),
|
||||||
configuration.isEnableGroupingGrid()));
|
configuration.isDisableGroupingGrid()));
|
||||||
}
|
}
|
||||||
|
|
||||||
//~--- fields ---------------------------------------------------------------
|
//~--- fields ---------------------------------------------------------------
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ Sonia.config.ScmConfigPanel = Ext.extend(Sonia.config.ConfigPanel,{
|
|||||||
forceBaseUrlText: 'Force Base Url',
|
forceBaseUrlText: 'Force Base Url',
|
||||||
|
|
||||||
// TODO i18n
|
// TODO i18n
|
||||||
enableGroupingGridText: 'Enable repository Groups',
|
disableGroupingGridText: 'Disable repository Groups',
|
||||||
|
|
||||||
|
|
||||||
// help
|
// help
|
||||||
@@ -84,7 +84,7 @@ Sonia.config.ScmConfigPanel = Ext.extend(Sonia.config.ConfigPanel,{
|
|||||||
forceBaseUrlHelpText: 'Redirects to the base url if the request comes from a other url',
|
forceBaseUrlHelpText: 'Redirects to the base url if the request comes from a other url',
|
||||||
|
|
||||||
// TODO i18n
|
// TODO i18n
|
||||||
enableGroupingGridHelpText: 'Enable repository Groups. A complete page reload is required after a change of this value.',
|
disableGroupingGridHelpText: 'Disable repository Groups. A complete page reload is required after a change of this value.',
|
||||||
|
|
||||||
|
|
||||||
initComponent: function(){
|
initComponent: function(){
|
||||||
@@ -107,10 +107,10 @@ Sonia.config.ScmConfigPanel = Ext.extend(Sonia.config.ConfigPanel,{
|
|||||||
helpText: this.forceBaseUrlHelpText
|
helpText: this.forceBaseUrlHelpText
|
||||||
},{
|
},{
|
||||||
xtype: 'checkbox',
|
xtype: 'checkbox',
|
||||||
fieldLabel: this.enableGroupingGridText,
|
fieldLabel: this.disableGroupingGridText,
|
||||||
name: 'enableGroupingGrid',
|
name: 'disableGroupingGrid',
|
||||||
inputValue: 'true',
|
inputValue: 'true',
|
||||||
helpText: this.enableGroupingGridHelpText
|
helpText: this.disableGroupingGridHelpText
|
||||||
},{
|
},{
|
||||||
xtype: 'textfield',
|
xtype: 'textfield',
|
||||||
fieldLabel: this.dateFormatText,
|
fieldLabel: this.dateFormatText,
|
||||||
|
|||||||
@@ -146,10 +146,10 @@ Sonia.repository.Grid = Ext.extend(Sonia.rest.Grid, {
|
|||||||
|
|
||||||
if (debug){
|
if (debug){
|
||||||
var msg = "grouping is ";
|
var msg = "grouping is ";
|
||||||
if ( state.clientConfig.enableGroupingGrid ){
|
if ( state.clientConfig.disableGroupingGrid ){
|
||||||
msg += "enabled";
|
|
||||||
} else {
|
|
||||||
msg += "disabled";
|
msg += "disabled";
|
||||||
|
} else {
|
||||||
|
msg += "enabled";
|
||||||
}
|
}
|
||||||
console.debug( msg );
|
console.debug( msg );
|
||||||
}
|
}
|
||||||
@@ -166,7 +166,7 @@ Sonia.repository.Grid = Ext.extend(Sonia.rest.Grid, {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
view: new Ext.grid.GroupingView({
|
view: new Ext.grid.GroupingView({
|
||||||
enableGrouping: state.clientConfig.enableGroupingGrid,
|
enableGrouping: ! state.clientConfig.disableGroupingGrid,
|
||||||
enableNoGroups: false,
|
enableNoGroups: false,
|
||||||
forceFit: true,
|
forceFit: true,
|
||||||
groupMode: 'value',
|
groupMode: 'value',
|
||||||
|
|||||||
Reference in New Issue
Block a user