Skip to content
Snippets Groups Projects
Commit 101e306f authored by felmer's avatar felmer
Browse files

Merge branch 'master' of sissource.ethz.ch:sis/openbis

parents 6a077fa2 3cc643c5
No related branches found
No related tags found
No related merge requests found
/build/
/bin/
...@@ -2,6 +2,5 @@ ...@@ -2,6 +2,5 @@
<classpath> <classpath>
<classpathentry kind="src" path="source/java"/> <classpathentry kind="src" path="source/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry exported="true" kind="lib" path="/libraries/cisd-base/cisd-base.jar" sourcepath="/libraries/cisd-base/cisd-base-src.zip"/>
<classpathentry kind="output" path="targets/classes"/> <classpathentry kind="output" path="targets/classes"/>
</classpath> </classpath>
...@@ -23,6 +23,7 @@ var LayoutManager = { ...@@ -23,6 +23,7 @@ var LayoutManager = {
thirdColumn : null, thirdColumn : null,
isResizingColumn : false, isResizingColumn : false,
isLoadingView : false, isLoadingView : false,
isBlocked : false,
_init : function(isFirstTime) { _init : function(isFirstTime) {
var _this = this; var _this = this;
...@@ -338,7 +339,7 @@ var LayoutManager = { ...@@ -338,7 +339,7 @@ var LayoutManager = {
} }
}, },
canReload : function() { canReload : function() {
return this.isResizingColumn === false && this.isLoadingView === false; return this.isBlocked == false && this.isResizingColumn === false && this.isLoadingView === false && this.firstColumn.width() > 0;
}, },
reloadView : function(view, forceFirstTime) { reloadView : function(view, forceFirstTime) {
var _this = this; var _this = this;
...@@ -373,6 +374,7 @@ var LayoutManager = { ...@@ -373,6 +374,7 @@ var LayoutManager = {
this.secondColumnContentResize(); this.secondColumnContentResize();
}, },
resize : function(view, forceFirstTime) { resize : function(view, forceFirstTime) {
console.log("resize");
if(this.canReload()) { if(this.canReload()) {
this.reloadView(view, forceFirstTime); this.reloadView(view, forceFirstTime);
} }
......
...@@ -258,6 +258,7 @@ function MainController(profile) { ...@@ -258,6 +258,7 @@ function MainController(profile) {
this._changeView(newViewChange, arg, true, shouldStateBePushToHistory); this._changeView(newViewChange, arg, true, shouldStateBePushToHistory);
} }
this._changeView = function(newViewChange, arg, shouldURLBePushToHistory, shouldStateBePushToHistory) { this._changeView = function(newViewChange, arg, shouldURLBePushToHistory, shouldStateBePushToHistory) {
LayoutManager.isBlocked = false;
// //
// Dirty forms management, to avoid loosing changes. // Dirty forms management, to avoid loosing changes.
// //
...@@ -463,6 +464,7 @@ function MainController(profile) { ...@@ -463,6 +464,7 @@ function MainController(profile) {
}); });
break; break;
case "showEditExperimentPageFromIdentifier": case "showEditExperimentPageFromIdentifier":
LayoutManager.isBlocked = true; // CKEDITOR owns hooks and variables that will break if the layout manager does its magic
var _this = this; var _this = this;
this.serverFacade.listExperimentsForIdentifiers([arg], function(data) { this.serverFacade.listExperimentsForIdentifiers([arg], function(data) {
document.title = "" + ELNDictionary.getExperimentKindName(arg) + " " + arg; document.title = "" + ELNDictionary.getExperimentKindName(arg) + " " + arg;
...@@ -495,6 +497,7 @@ function MainController(profile) { ...@@ -495,6 +497,7 @@ function MainController(profile) {
//window.scrollTo(0,0); //window.scrollTo(0,0);
break; break;
case "showEditSamplePageFromPermId": case "showEditSamplePageFromPermId":
LayoutManager.isBlocked = true; // CKEDITOR owns hooks and variables that will break if the layout manager does its magic
var _this = this; var _this = this;
var permId = null; var permId = null;
var paginationInfo = null; var paginationInfo = null;
...@@ -614,6 +617,7 @@ function MainController(profile) { ...@@ -614,6 +617,7 @@ function MainController(profile) {
}); });
break; break;
case "showEditDataSetPageFromPermId": case "showEditDataSetPageFromPermId":
LayoutManager.isBlocked = true; // CKEDITOR owns hooks and variables that will break if the layout manager does its magic
var _this = this; var _this = this;
var dsCriteria = { var dsCriteria = {
entityKind : "DATASET", entityKind : "DATASET",
......
...@@ -142,11 +142,24 @@ function StorageListView(storageListController, storageListModel) { ...@@ -142,11 +142,24 @@ function StorageListView(storageListController, storageListModel) {
_this.showStorageWidget(data.data['$object']) _this.showStorageWidget(data.data['$object'])
} }
} }
this._dataGrid = new DataGridController(null, columns, [], null, getDataList, rowClick, false, "STORAGE_WIDGET"); // multi-select delete option
let isMultiselectable = false;
var extraOptions = [];
if(!this._storageListModel.isDisabled) {
isMultiselectable = true;
extraOptions.push({ name : "Delete selected", action : function(selected) {
for (let i=0; i<selected.length; i++) {
_this.removeChildFromSampleOrMarkToDelete(selected[i]);
}
_this._dataGrid.refresh();
}});
}
this._dataGrid = new DataGridController(null, columns, [], null, getDataList, rowClick, false, "STORAGE_WIDGET", isMultiselectable);
var $dataGridContainer = $("<div>"); var $dataGridContainer = $("<div>");
this._dataGrid.init($dataGridContainer); this._dataGrid.init($dataGridContainer, extraOptions);
$container.append($dataGridContainer); $container.append($dataGridContainer);
var $storageAddButton = $("<a>", { class : 'btn btn-default', style : "float: right; background-color:#f9f9f9;" }).append($("<i>", { class : "glyphicon glyphicon-plus" } )); var $storageAddButton = $("<a>", { class : 'btn btn-default', style : "float: right; background-color:#f9f9f9;" }).append($("<i>", { class : "glyphicon glyphicon-plus" } ));
...@@ -280,4 +293,4 @@ function StorageListView(storageListController, storageListModel) { ...@@ -280,4 +293,4 @@ function StorageListView(storageListController, storageListModel) {
} }
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment