1. Редактор карты зала.
This commit is contained in:
miroman-afk
2022-10-27 15:48:02 +03:00
parent 0e5f2002b1
commit 4d3ad7727d
21 changed files with 625 additions and 192 deletions

View File

@@ -1,9 +1,9 @@
<div id="container-places" style="bottom: 20px; right: 20px; position: fixed;">
<div class="m-b">
<div class="btn-group">
<button id="create_place" type="button" class="btn info btn-outline b-info">Добавить зал</button>
<button id="create_place" type="button" class="btn info btn-outline b-info" ng-click="createPlace()">Добавить зал</button>
<button id="back" type="button" class="btn info p-x-md pull-left" data-toggle="modal" data-target="#back_places">Назад</button>
<button id="create_table" type="button" class="btn info btn-outline b-info">Добавить стол</button>
<button id="create_table" type="button" class="btn info btn-outline b-info" ng-click="createTable(place_id)">Добавить стол</button>
<button id="save_tables" type="button" class="btn info btn-outline b-info" ng-click="saveTables(place_id, tables)">Сохранить</button>
<button id="save_places" type="button" class="btn info btn-outline b-info" ng-click="savePlaces(roommap)">Сохранить</button>
</div>
@@ -49,7 +49,7 @@
<ul class="dropdown-menu" role="menu">
<li>
<a class="pointer" role="menuitem" tabindex="1"
ng-click="editPlace($index, place)">
ng-click="editPlace(place.place_id, place.place_name)">
Редактировать
</a>
<a class="pointer" role="menuitem" tabindex="1"
@@ -83,14 +83,27 @@
</div>
<div ng-repeat="table in tables" ng-model="tables" context-menu>
<div id="{{ 'table_' + $index }}" class="demo-div" draggable resize context-menu
<div ng-if="table.type == 0" id="{{ 'table_' + $index }}" class="demo-div" draggable resize context-menu
data-target="table-{{ $index }}"
ng-mouseup="getCoords($event, $index, table.table_id, table.place_id)"
ng-style="{'width':'' + table.width * percentWidth + 'px', 'height':'' + table.height * percentHeight + 'px', 'top':'calc(' + top + 'px + ' + table.x * percentHeight + 'px)', 'left': 'calc(' + left + 'px + ' + table.y * percentWidth + 'px)'}"
style="position: fixed;cursor: default;font-family: sans-serif;text-align: center;background-color: #FFFFFF;border: 2px solid #183147; z-index: 1;">
<span class="demo-text">
{{table.name}} {{table.table_id}}
</span>
style="position: fixed;cursor: default;font-family: sans-serif;text-align: center;background-color: #FFFFFF;border: 2px solid #183147; z-index: 1; border-radius: 5%">
<div class="box-header">
<small>{{table.name}}</small>
<small>{{table.table_id}}</small>
</div>
</div>
<div ng-if="table.type == 1" id="{{ 'table_' + $index }}" class="demo-div" draggable resize context-menu
data-target="table-{{ $index }}"
ng-mouseup="getCoords($event, $index, table.table_id, table.place_id)"
ng-style="{'width':'' + table.width * percentWidth + 'px', 'height':'' + table.height * percentHeight + 'px', 'top':'calc(' + top + 'px + ' + table.x * percentHeight + 'px)', 'left': 'calc(' + left + 'px + ' + table.y * percentWidth + 'px)'}"
style="position: fixed;cursor: default;font-family: sans-serif;text-align: center;background-color: #FFFFFF;border: 2px solid #183147; z-index: 1; border-radius: 50%">
<div class="box-header">
<small>{{table.name}}</small>
<small>{{table.table_id}}</small>
</div>
</div>
<div class="dropdown" id="table-{{ $index }}" style="position: fixed; z-index: 2;">
<ul class="dropdown-menu" role="menu">
@@ -120,7 +133,16 @@
<div class="modal fade" id="table-edit" data-backdrop="true">
<div ui-include="'../views/roommap/items/edit.html'"></div>
<div ui-include="'../views/roommap/items/edit-table.html'"></div>
</div>
<div class="modal fade" id="table-create" data-backdrop="true">
<div ui-include="'../views/roommap/items/create-table.html'"></div>
</div>
<div class="modal fade" id="place-create" data-backdrop="true">
<div ui-include="'../views/roommap/items/create-place.html'"></div>
</div>
<div class="modal fade" id="place-edit" data-backdrop="true">
<div ui-include="'../views/roommap/items/edit-place.html'"></div>
</div>
<script type="text/javascript" src="/libs/js/moment/locale/ru.js"></script>