PATH:
home
/
rwabteecom
/
project_11
/
resources
/
views
/
dashboard
/
sections
/
Editing: text.blade.php
<script> $('#AddText').on('click', function() { // let uuid = $("#sortable").sortable("toArray").length; var uuid = () => { var w = () => { return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1); } return `${w()}${w()}-${w()}-${w()}-${w()}-${w()}${w()}${w()}`; } let linksArray = $("#sortable").sortable(); var uuid = uuid() let newElement = ` <div class="link-form my-4" data-uuid="${uuid}" data-id="${uuid}" id="${uuid}"> <form method="post" action="{{ route('dashboard.link.store') }}" id="form${uuid}"> @csrf <input name="link[${uuid}][pen]" class="pen_check onchange_store" value="" hidden> <input hidden value="text" name="link[${uuid}][link_type]" class="onchange_store" readonly> <input name="link[${uuid}][order]" readonly class="order_link" hidden> <input hidden value="${uuid}" name="link[${uuid}][uuid]" class="onchange_store" readonly> <div class="d-flex"> <div class="d-flex"> <button type="button" class="drage-btn"> <svg width="32" height="24" viewBox="0 0 32 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13Z" stroke="#525252" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 6C12.5523 6 13 5.55228 13 5C13 4.44772 12.5523 4 12 4C11.4477 4 11 4.44772 11 5C11 5.55228 11.4477 6 12 6Z" stroke="#525252" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> <path d="M12 20C12.5523 20 13 19.5523 13 19C13 18.4477 12.5523 18 12 18C11.4477 18 11 18.4477 11 19C11 19.5523 11.4477 20 12 20Z" stroke="#525252" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> <path d="M20 13C20.5523 13 21 12.5523 21 12C21 11.4477 20.5523 11 20 11C19.4477 11 19 11.4477 19 12C19 12.5523 19.4477 13 20 13Z" stroke="#525252" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> <path d="M20 6C20.5523 6 21 5.55228 21 5C21 4.44772 20.5523 4 20 4C19.4477 4 19 4.44772 19 5C19 5.55228 19.4477 6 20 6Z" stroke="#525252" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> <path d="M20 20C20.5523 20 21 19.5523 21 19C21 18.4477 20.5523 18 20 18C19.4477 18 19 18.4477 19 19C19 19.5523 19.4477 20 20 20Z" stroke="#525252" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> </svg> </button> </div> <div class="link-form-con py-3 px-1 px-md-3 pt-4 w-100"> <div class="d-flex"> <textarea class="mark-down-area onchange_store" value="" name="link[${uuid}][title]" placeholder="{{ __('Add Section content ( you can use Markdown ) here') }}"></textarea> </div> <div class="d-flex align-items-center justify-content-between mt-3"> <div class="d-flex"> <div class="form-check form-switch visibility-switch" data-mdb-tooltip-init title="{{ __('Link Visibility') }}"> <input class="form-check-input onchange_store" value="1" checked type="checkbox" name="link[${uuid}][link_visibility]" role="switch" id="flexSwitchCheckChecked${uuid}" /> <span class="invisible-span"> <svg width="15" height="14" viewBox="0 0 15 14" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M6.15 3.425C6.57376 3.23077 7.03386 3.12853 7.5 3.125C8.39511 3.125 9.25355 3.48058 9.88649 4.11351C10.5194 4.74645 10.875 5.60489 10.875 6.5C10.8748 6.89759 10.801 7.29172 10.6575 7.6625L12.75 9.605C13.6842 8.71688 14.4469 7.66433 15 6.5C15 6.5 12.75 1.25 7.5 1.25C6.46582 1.24458 5.44261 1.46201 4.5 1.8875L6.15 3.425ZM1.5 0.5L0.75 1.25L2.6625 3.05C1.54186 3.99959 0.634541 5.17527 0 6.5C0 6.5 2.25 11.75 7.5 11.75C8.71443 11.755 9.9108 11.4559 10.98 10.88L13.5 13.25L14.25 12.5L1.5 0.5ZM7.5 9.875C6.60489 9.875 5.74645 9.51942 5.11351 8.88648C4.48058 8.25355 4.125 7.3951 4.125 6.5C4.12914 5.92025 4.28423 5.35158 4.575 4.85L5.7225 5.93C5.66072 6.11381 5.62783 6.3061 5.625 6.5C5.62424 6.80525 5.69832 7.10604 5.84075 7.37603C5.98318 7.64601 6.18963 7.87697 6.44201 8.04868C6.69439 8.22039 6.98502 8.32761 7.28844 8.36096C7.59187 8.39432 7.89885 8.35278 8.1825 8.24L9.3375 9.3275C8.79136 9.68499 8.15274 9.87527 7.5 9.875Z" fill="#565656" /> </svg> </span> <span class="visible-span"> <svg width="17" height="12" viewBox="0 0 17 12" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M11.4078 6C11.4078 6.66304 11.1444 7.29893 10.6755 7.76777C10.2067 8.23661 9.57082 8.5 8.90778 8.5C8.24473 8.5 7.60885 8.23661 7.14001 7.76777C6.67117 7.29893 6.40778 6.66304 6.40778 6C6.40778 5.33696 6.67117 4.70107 7.14001 4.23223C7.60885 3.76339 8.24473 3.5 8.90778 3.5C9.57082 3.5 10.2067 3.76339 10.6755 4.23223C11.1444 4.70107 11.4078 5.33696 11.4078 6Z" fill="white" /> <path d="M0.907776 6C0.907776 6 3.90778 0.5 8.90778 0.5C13.9078 0.5 16.9078 6 16.9078 6C16.9078 6 13.9078 11.5 8.90778 11.5C3.90778 11.5 0.907776 6 0.907776 6ZM8.90778 9.5C9.83603 9.5 10.7263 9.13125 11.3826 8.47487C12.039 7.8185 12.4078 6.92826 12.4078 6C12.4078 5.07174 12.039 4.1815 11.3826 3.52513C10.7263 2.86875 9.83603 2.5 8.90778 2.5C7.97952 2.5 7.08928 2.86875 6.4329 3.52513C5.77653 4.1815 5.40778 5.07174 5.40778 6C5.40778 6.92826 5.77653 7.8185 6.4329 8.47487C7.08928 9.13125 7.97952 9.5 8.90778 9.5Z" fill="white" /> </svg> </svg> </span> </div> <button class="lock-link" type="button" data-mdb-tooltip-init title="{{ __('Content Section') }}"> <svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M14 11.4531H8M10 15.4531H8M16 7.45312H8M20 7.25313V17.6531C20 19.3333 20 20.1734 19.673 20.8151C19.3854 21.3796 18.9265 21.8385 18.362 22.1261C17.7202 22.4531 16.8802 22.4531 15.2 22.4531H8.8C7.11984 22.4531 6.27976 22.4531 5.63803 22.1261C5.07354 21.8385 4.6146 21.3796 4.32698 20.8151C4 20.1734 4 19.3333 4 17.6531V7.25313C4 5.57297 4 4.73289 4.32698 4.09115C4.6146 3.52667 5.07354 3.06773 5.63803 2.78011C6.27976 2.45312 7.11984 2.45312 8.8 2.45312H15.2C16.8802 2.45312 17.7202 2.45312 18.362 2.78011C18.9265 3.06773 19.3854 3.52667 19.673 4.09115C20 4.73289 20 5.57297 20 7.25313Z" stroke="#252525" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> </svg> </button> <button type="button" class="pin-to-top" data-mdb-tooltip-init title="{{ __('Pin to top') }}"> <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M9.00032 11.25L9.00032 16.5M6.00032 5.4811V7.07906C6.00032 7.23508 6.00032 7.31308 5.98501 7.3877C5.97142 7.45389 5.94895 7.51795 5.91821 7.57813C5.88356 7.64596 5.83483 7.70687 5.73736 7.8287L4.56003 9.30037C4.06073 9.92449 3.81108 10.2366 3.81079 10.4992C3.81054 10.7276 3.91439 10.9437 4.0929 11.0862C4.29816 11.25 4.6978 11.25 5.49707 11.25H12.5036C13.3028 11.25 13.7025 11.25 13.9077 11.0862C14.0863 10.9437 14.1901 10.7276 14.1899 10.4992C14.1896 10.2366 13.9399 9.92449 13.4406 9.30037L12.2633 7.8287C12.1658 7.70687 12.1171 7.64596 12.0824 7.57813C12.0517 7.51795 12.0292 7.45389 12.0156 7.3877C12.0003 7.31308 12.0003 7.23508 12.0003 7.07906V5.4811C12.0003 5.39476 12.0003 5.35158 12.0052 5.30901C12.0095 5.27119 12.0167 5.23375 12.0268 5.19702C12.038 5.15568 12.0541 5.1156 12.0862 5.03543L12.8421 3.14567C13.0626 2.59435 13.1728 2.3187 13.1269 2.09741C13.0866 1.9039 12.9717 1.73408 12.8069 1.62488C12.6186 1.5 12.3217 1.5 11.7279 1.5H6.27276C5.67898 1.5 5.38208 1.5 5.1937 1.62488C5.02897 1.73408 4.914 1.9039 4.87378 2.09741C4.8278 2.3187 4.93806 2.59435 5.15859 3.14567L5.91449 5.03543C5.94656 5.1156 5.9626 5.15568 5.97388 5.19702C5.9839 5.23375 5.9911 5.27119 5.99544 5.30901C6.00032 5.35158 6.00032 5.39476 6.00032 5.4811Z" stroke="#252525" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> </svg> </button> <button type="button" class="unpin-to-top" data-mdb-tooltip-init title="{{ __('Unpin to top') }}"> <svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg"> <g clip-path="url(#clip0_233_482)"> <path d="M11.4092 14.6659L7.69692 18.3782M13.3671 8.46535L12.2372 9.59528C12.1269 9.70559 12.0717 9.76075 12.0081 9.80269C11.9517 9.83989 11.8905 9.86929 11.8263 9.89011C11.7538 9.91357 11.6763 9.92218 11.5212 9.93941L9.64807 10.1475C8.85369 10.2358 8.45649 10.2799 8.27058 10.4654C8.1089 10.6268 8.02955 10.853 8.05502 11.08C8.0843 11.341 8.36689 11.6235 8.93206 12.1887L13.8864 17.1431C14.4516 17.7082 14.7342 17.9908 14.9952 18.0201C15.2221 18.0456 15.4484 17.9662 15.6097 17.8045C15.7952 17.6186 15.8393 17.2214 15.9276 16.4271L16.1357 14.5539C16.1529 14.3989 16.1616 14.3213 16.185 14.2489C16.2058 14.1846 16.2352 14.1234 16.2724 14.067C16.3144 14.0034 16.3695 13.9482 16.4799 13.8379L17.6098 12.708C17.6708 12.6469 17.7014 12.6164 17.7349 12.5898C17.7647 12.5661 17.7963 12.5447 17.8294 12.5258C17.8666 12.5046 17.9062 12.4876 17.9856 12.4535L19.8564 11.6518C20.4022 11.4179 20.675 11.3009 20.799 11.1119C20.9074 10.9467 20.9462 10.7453 20.9069 10.5516C20.862 10.3301 20.6521 10.1201 20.2322 9.70028L16.3748 5.84293C15.955 5.42306 15.745 5.21312 15.5235 5.16822C15.3298 5.12895 15.1285 5.16773 14.9632 5.27613C14.7742 5.40009 14.6572 5.67298 14.4233 6.21875L13.6216 8.08952C13.5876 8.16888 13.5706 8.20856 13.5493 8.24577C13.5304 8.27883 13.5091 8.3104 13.4854 8.34021C13.4587 8.37376 13.4282 8.40429 13.3671 8.46535Z" stroke="#545454" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> </g> <defs> <clipPath id="clip0_233_482"> <rect width="18" height="18" fill="white" transform="translate(13 0.34668) rotate(45)"/> </clipPath> </defs> </svg> </button> </div> <button type="button" class="delete-btn"> <svg width="20" height="22" viewBox="0 0 20 22" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M14 5V4.2C14 3.0799 14 2.51984 13.782 2.09202C13.5903 1.71569 13.2843 1.40973 12.908 1.21799C12.4802 1 11.9201 1 10.8 1H9.2C8.07989 1 7.51984 1 7.09202 1.21799C6.71569 1.40973 6.40973 1.71569 6.21799 2.09202C6 2.51984 6 3.0799 6 4.2V5M8 10.5V15.5M12 10.5V15.5M1 5H19M17 5V16.2C17 17.8802 17 18.7202 16.673 19.362C16.3854 19.9265 15.9265 20.3854 15.362 20.673C14.7202 21 13.8802 21 12.2 21H7.8C6.11984 21 5.27976 21 4.63803 20.673C4.07354 20.3854 3.6146 19.9265 3.32698 19.362C3 18.7202 3 17.8802 3 16.2V5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> </svg> </button> </div> <button type="button" class="mt-3 open-marked-example" data-mdb-collapse-init data-mdb-ripple-init data-mdb-target="#collapseExample-Link-${uuid}" aria-expanded="false" aria-controls="collapseExample">{{ __('Learn about markdown') }} <svg width="19" height="19" class="ms-2" viewBox="0 0 19 19" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M4.75 11.875L9.5 7.125L14.25 11.875" stroke="#585858" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /> </svg> </button> <div class="collapse lock-password" id="collapseExample-Link-${uuid}"> <div class="py-4"> <div class="marked-example p-3"> <div class="mb-3"> <p class="mb-1">// Headers</p> <p class="mb-1"># H1 </p> <p class="mb-1">## H2 </p> <p class="mb-1">### H3 </p> </div> <div class="mb-3"> <p class="mb-1">// Lists </p> <p class="mb-1">- unordered list </p> <p class="mb-1">1. ordered list </p> </div> <div> <p class="mb-1">// Emphasis </p> <p class="mb-1">**bold** </p> <p class="mb-1">*italic*</p> <p class="mb-1">~~strikethrough~~</p> </div> </div> </div> </div> </div> </div> </form> </div>` linksArray.append(newElement); Toastify({ text: 'Text Added Successflly', duration: 3000, close: true, className: "add-success", style: { background: "#FF8A2D", } }).showToast(); navToNew(uuid) }) </script>
SAVE
CANCEL