From 93dc7f12e9114cdfd21b8b265255857cb2885821 Mon Sep 17 00:00:00 2001 From: cdujeu Date: Tue, 23 May 2017 15:01:10 +0200 Subject: [PATCH] Fix reload in admin - Fix DND in admin. --- core/src/plugins/access.ajxp_conf/ajxp_confActions.xml | 1 + .../access.ajxp_conf/res/js/AdminPeople/board/Dashboard.js | 1 + .../gui.ajax/res/js/ui/Components/list/SimpleList.js | 7 +++++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/core/src/plugins/access.ajxp_conf/ajxp_confActions.xml b/core/src/plugins/access.ajxp_conf/ajxp_confActions.xml index 282a4c719d..1ef6c26d2f 100644 --- a/core/src/plugins/access.ajxp_conf/ajxp_confActions.xml +++ b/core/src/plugins/access.ajxp_conf/ajxp_confActions.xml @@ -196,6 +196,7 @@ + diff --git a/core/src/plugins/access.ajxp_conf/res/js/AdminPeople/board/Dashboard.js b/core/src/plugins/access.ajxp_conf/res/js/AdminPeople/board/Dashboard.js index 1a5bb2260e..b48bd39919 100644 --- a/core/src/plugins/access.ajxp_conf/res/js/AdminPeople/board/Dashboard.js +++ b/core/src/plugins/access.ajxp_conf/res/js/AdminPeople/board/Dashboard.js @@ -347,6 +347,7 @@ let Dashboard = React.createClass({ node={this.state.currentNode} dataModel={this.state.dataModel} openEditor={this.openRoleEditor} + clearSelectionOnReload={false} entryRenderIcon={this.renderListUserAvatar} entryRenderFirstLine={this.renderListEntryFirstLine} entryRenderSecondLine={this.renderListEntrySecondLine} diff --git a/core/src/plugins/gui.ajax/res/js/ui/Components/list/SimpleList.js b/core/src/plugins/gui.ajax/res/js/ui/Components/list/SimpleList.js index f478d564e4..23e81b8a5a 100644 --- a/core/src/plugins/gui.ajax/res/js/ui/Components/list/SimpleList.js +++ b/core/src/plugins/gui.ajax/res/js/ui/Components/list/SimpleList.js @@ -54,6 +54,7 @@ let SimpleList = React.createClass({ tableKeys : React.PropTypes.object, autoRefresh : React.PropTypes.number, reloadAtCursor : React.PropTypes.bool, + clearSelectionOnReload: React.PropTypes.bool, heightAutoWithMax : React.PropTypes.number, containerHeight : React.PropTypes.number, observeNodeReload : React.PropTypes.bool, @@ -97,7 +98,7 @@ let SimpleList = React.createClass({ }, getDefaultProps:function(){ - return {infiniteSliceCount:30} + return {infiniteSliceCount:30, clearSelectionOnReload: true} }, clickRow: function(gridRow, event){ @@ -409,7 +410,9 @@ let SimpleList = React.createClass({ this.loadStartingAtCursor(); return; } - this.props.dataModel.setSelectedNodes([]); + if(this.props.clearSelectionOnReload){ + this.props.dataModel.setSelectedNodes([]); + } this._loadingListener(); this.props.node.observeOnce("loaded", this._loadedListener); this.props.node.reload();