@page
@model EditMainModel
@{
    ViewData["Title"] = "Urejanje";
}

@section Styles
{
    <link rel="stylesheet" href="~/lib/summernote/summernote-bs4.css" asp-append-version="true" />
    <link rel="stylesheet" href="~/css/pages/editor-main.css" asp-append-version="true" />
}
<input id="inpIdPage" type="hidden" asp-for="@Model.Page.IdBulletinBoardPage"/>

<h4 class="d-flex justify-content-between align-items-center w-100 font-weight-bold py-1 mb-4">
    <span>
        <span class="text-muted font-weight-light">
            <i>Oglasna deska strani</i>/
            <i>@Model.Page.Name</i>/
        </span> Urejanje
    </span>
</h4>

<div class="fab-container-add">
    <div class="button iconbutton btn-success" onclick="addNewNote()">
        <i class="far fa-sticky-note fa-2x"></i>
    </div>
</div>

<div class="fab-container-save">
    <div class="button iconbutton btn-primary" onclick="saveNotes();">
        <i class="far fa-save fa-2x"></i>
    </div>
</div>

<div class="row">
    <div class="col-12">
        <div class="card">
            <div class="card-body div-main-body">
                <input class="input-hidden" id="inpSelectedBoardPageId" />
                <div id="divPlaceholder">
                </div>
            </div>
        </div>

    </div>
</div>

<div id="divModalEditNote" class="modal" tabindex="-1" role="dialog">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">Urejanje zapiska</h5>
                <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <input id="inpModalEditNoteIdNote" class="input-hidden" />
                <label class="control-label">Vsebina:</label>
                <div id="divModalEditNoteSummernote"></div>
                <label class="control-label">Barva:</label>
                <div class="div-note-edit-color">
                    <div class="note-color-white active"></div>
                    <div class="note-color-yellow"></div>
                    <div class="note-color-orange"></div>
                    <div class="note-color-light-green"></div>
                    <div class="note-color-blue"></div>
                    <div class="note-color-purple"></div>
                    <div class="note-color-grey"></div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" onclick="saveModalEditNote();">Shrani</button>
                <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Prekliči</button>
            </div>
        </div>
    </div>
</div>

@Html.AntiForgeryToken()

@section Scripts
{
    <script src="~/lib/summernote/summernote-bs4.js" asp-append-version="true"></script>
    <script src="~/lib/html-to-image/dist/html-to-image.js" asp-append-version="true"></script>
    <script src="~/js/pages/note.js" asp-append-version="true"></script>
    <script src="~/js/pages/edit-main.js" asp-append-version="true"></script>
}
