Commit 1f550364 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

frontend doesn't allow to remove default project

parent 749399e2
......@@ -7,6 +7,7 @@ var AddProjectDialog = require('./AddProjectDialog');
var EditProjectDialog = require('./EditProjectDialog');
var LogListDialog = require('./LogListDialog');
var PrivilegeType = require('../../map/data/PrivilegeType');
var ConfigurationType = require('../../ConfigurationType');
var UserPreferences = require('../../map/data/UserPreferences');
// noinspection JSUnusedLocalSymbols
......@@ -208,6 +209,10 @@ MapsAdminPanel.prototype.projectToTableRow = function (project, row, user) {
disabled = "";
}
row[5] = "<button name='showEditDialog' data='" + project.getProjectId() + "'" + disabled + "><i class='fa fa-edit' style='font-size:17px'></i></button>";
if (self.getConfiguration().getOption(ConfigurationType.DEFAULT_MAP).getValue() === projectId) {
disabled = " disabled ";
}
row[6] = "<button name='removeProject' data='" + project.getProjectId() + "'" + disabled + "><i class='fa fa-trash-o' style='font-size:17px'></button>";
return row;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment