PATH:
home
/
rwabteecom
/
project_11
/
resources
/
views
/
dashboard
/
sections
/
Editing: title.blade.php
<script> $('#AddTitle').on('click', function() { let linksArray = $("#sortable").sortable(); // 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()}`; } 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" value="" hidden> <input hidden value="title" readonly name="link[${uuid}][link_type]"> <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="title-form-con p-3 pt-4 w-100"> <div class="formInput d-flex align-items-center px-3 pe-2 mb-3"> <input class="ps-0 onchange_store" type="text" name="link[${uuid}][title]" placeholder="{{ __('Add section title') }}"> <div class="open-emoji-con"> <button type="button" class="open-emoji"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12 2C17.523 2 22 6.477 22 12C22 17.523 17.523 22 12 22C6.477 22 2 17.523 2 12C2 6.477 6.477 2 12 2ZM12 4C9.87827 4 7.84344 4.84285 6.34315 6.34315C4.84285 7.84344 4 9.87827 4 12C4 14.1217 4.84285 16.1566 6.34315 17.6569C7.84344 19.1571 9.87827 20 12 20C14.1217 20 16.1566 19.1571 17.6569 17.6569C19.1571 16.1566 20 14.1217 20 12C20 9.87827 19.1571 7.84344 17.6569 6.34315C16.1566 4.84285 14.1217 4 12 4ZM14.8 13.857C14.8933 13.7629 15.0044 13.6882 15.1268 13.6374C15.2492 13.5866 15.3804 13.5606 15.513 13.561C15.6455 13.5614 15.7766 13.5881 15.8987 13.6396C16.0208 13.6911 16.1315 13.7663 16.2243 13.8609C16.317 13.9556 16.3901 14.0677 16.4391 14.1908C16.4882 14.3139 16.5123 14.4455 16.5101 14.578C16.5078 14.7105 16.4792 14.8413 16.426 14.9626C16.3728 15.084 16.2959 15.1936 16.2 15.285C15.0794 16.3858 13.5708 17.0018 12 17C10.4292 17.0018 8.92064 16.3858 7.8 15.285C7.61503 15.0984 7.51093 14.8465 7.5102 14.5838C7.50948 14.321 7.61219 14.0685 7.79613 13.8809C7.98006 13.6933 8.23045 13.5856 8.49316 13.5811C8.75586 13.5767 9.00977 13.6758 9.2 13.857C9.94682 14.5912 10.9527 15.0018 12 15C13.09 15 14.077 14.565 14.8 13.857ZM8.5 8C8.89782 8 9.27936 8.15804 9.56066 8.43934C9.84196 8.72064 10 9.10218 10 9.5C10 9.89782 9.84196 10.2794 9.56066 10.5607C9.27936 10.842 8.89782 11 8.5 11C8.10218 11 7.72064 10.842 7.43934 10.5607C7.15804 10.2794 7 9.89782 7 9.5C7 9.10218 7.15804 8.72064 7.43934 8.43934C7.72064 8.15804 8.10218 8 8.5 8ZM15.5 8C15.8978 8 16.2794 8.15804 16.5607 8.43934C16.842 8.72064 17 9.10218 17 9.5C17 9.89782 16.842 10.2794 16.5607 10.5607C16.2794 10.842 15.8978 11 15.5 11C15.1022 11 14.7206 10.842 14.4393 10.5607C14.158 10.2794 14 9.89782 14 9.5C14 9.10218 14.158 8.72064 14.4393 8.43934C14.7206 8.15804 15.1022 8 15.5 8Z" fill="#414141" /> </svg> </button> <div class="emoji-picker-con"> <emoji-picker></emoji-picker> </div> </div> </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 type="button" class="text-btn" data-mdb-tooltip-init title="{{ __('Title Section') }}"> <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M5 5.5C5 6.33 5.67 7 6.5 7H10.5V17.5C10.5 18.33 11.17 19 12 19C12.83 19 13.5 18.33 13.5 17.5V7H17.5C18.33 7 19 6.33 19 5.5C19 4.67 18.33 4 17.5 4H6.5C5.67 4 5 4.67 5 5.5Z" fill="#252525" /> </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> </div> </div> </form> </div> ` linksArray.append(newElement); Toastify({ text: 'Title Added Successflly', duration: 3000, close: true, className: "add-success", style: { background: "#FF8A2D", } }).showToast(); navToNew(uuid) }) </script>
SAVE
CANCEL