diff --git a/www/borders.js b/www/borders.js index 74e829a..594a52e 100644 --- a/www/borders.js +++ b/www/borders.js @@ -6,7 +6,7 @@ var FILL_ZERO = 'black'; var OLD_BORDERS_NAME; // filled in checkHasOSM() var IMPORT_ENABLED = false; -var map, borders = {}, bordersLayer, selectedId, editing = false; +var map, borders = {}, bordersLayer, selectedId, editing = false, readonly = false; var size_good = 5, size_bad = 50; var tooSmallLayer = null; var oldBordersLayer = null; @@ -54,6 +54,8 @@ function checkHasOSM() { if( res.readonly ) { $('#action_buttons').css('display', 'none'); $('#import_link').css('display', 'none'); + $('#backups').css('display', 'none'); + readonly = true; } if( !res.readonly && IMPORT_ENABLED ) { $('#import_link').css('display', 'none'); @@ -352,7 +354,7 @@ function bImport() { } function bShowRename() { - if( !selectedId || !(selectedId in borders) ) + if( !selectedId || !(selectedId in borders) || readonly ) return; $('#b_rename').val(borders[selectedId].name); $('#rename').css('display', 'block'); diff --git a/www/index.html b/www/index.html index b04840f..ebc3473 100644 --- a/www/index.html +++ b/www/index.html @@ -61,7 +61,9 @@
Импорт
-
+
+
+
@@ -87,7 +89,7 @@
- Название: + Название: