contex menu
This commit is contained in:
@@ -76,7 +76,7 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Prekliči</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -135,8 +135,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-primary" onclick="saveModalEditNote();">Save changes</button>
|
<button type="button" class="btn btn-primary" onclick="saveModalEditNote();">Shrani</button>
|
||||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Prekliči</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
@using System.Security.Claims
|
@using System.Security.Claims
|
||||||
@using Microsoft.AspNetCore.Identity
|
@using Microsoft.AspNetCore.Identity
|
||||||
@* @using Microsoft.EntityFrameworkCore
|
@using Microsoft.AspNetCore.Mvc.TagHelpers
|
||||||
@inject UserManager<IdentityApplicationUser> _userManager *@
|
@using Microsoft.EntityFrameworkCore
|
||||||
|
@using ZpcBulletinBoard.Models
|
||||||
|
@inject UserManager<IdentityApplicationUser> _userManager
|
||||||
@{bool hideToggle = ViewData["LayoutNavbarHideToggle"] != null && ViewData["LayoutNavbarHideToggle"].ToString() == "True";}
|
@{bool hideToggle = ViewData["LayoutNavbarHideToggle"] != null && ViewData["LayoutNavbarHideToggle"].ToString() == "True";}
|
||||||
|
|
||||||
@* @{
|
@{
|
||||||
var user = _userManager.Users.Include(x => x.Company).FirstOrDefaultAsync(x => x.Id == _userManager.GetUserAsync(User).Result.Id).Result;
|
var user = _userManager.Users.FirstOrDefaultAsync(x => x.Id == _userManager.GetUserAsync(User).Result.Id).Result;
|
||||||
} *@
|
}
|
||||||
|
|
||||||
<!-- Layout navbar -->
|
<!-- Layout navbar -->
|
||||||
<nav class="layout-navbar navbar navbar-expand-lg align-items-lg-center bg-white container-p-x" id="layout-navbar">
|
<nav class="layout-navbar navbar navbar-expand-lg align-items-lg-center bg-white container-p-x" id="layout-navbar">
|
||||||
@@ -36,7 +38,7 @@
|
|||||||
|
|
||||||
<div class="navbar-nav align-items-lg-center">
|
<div class="navbar-nav align-items-lg-center">
|
||||||
<div class="navbar-text col-lg-12 order-lg-1 w-auto w-lg-100 small px-0">
|
<div class="navbar-text col-lg-12 order-lg-1 w-auto w-lg-100 small px-0">
|
||||||
@* <strong>@user.Company.Title</strong>, @user.Company.Street @user.Company.HouseNumber, @user.Company.PostNumber @user.Company.Post *@
|
<strong>@user.Name</strong> @user.Surname
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,7 @@
|
|||||||
<link rel="stylesheet" href="~/lib/spinkit/spinkit.css" asp-append-version="true">
|
<link rel="stylesheet" href="~/lib/spinkit/spinkit.css" asp-append-version="true">
|
||||||
@* <link rel="stylesheet" href="~/node_modules/dist/ladda/ladda.css" asp-append-version="true"> *@
|
@* <link rel="stylesheet" href="~/node_modules/dist/ladda/ladda.css" asp-append-version="true"> *@
|
||||||
<link rel="stylesheet" href="~/lib/sweetalert2/dist/sweetalert2.css" asp-append-version="true">
|
<link rel="stylesheet" href="~/lib/sweetalert2/dist/sweetalert2.css" asp-append-version="true">
|
||||||
|
<link rel="stylesheet" href="~/lib/jquery-contextmenu/jquery.contextMenu.min.css" asp-append-version="true">
|
||||||
|
|
||||||
<!-- Custom -->
|
<!-- Custom -->
|
||||||
<link rel="stylesheet" href="~/css/demo.css" asp-append-version="true" />
|
<link rel="stylesheet" href="~/css/demo.css" asp-append-version="true" />
|
||||||
@@ -64,6 +65,8 @@
|
|||||||
<script src="~/lib/spin/dist/spin.js" asp-append-version="true"></script>
|
<script src="~/lib/spin/dist/spin.js" asp-append-version="true"></script>
|
||||||
@* <script src="~/node_modules/ladda/ladda.js" asp-append-version="true"></script> *@
|
@* <script src="~/node_modules/ladda/ladda.js" asp-append-version="true"></script> *@
|
||||||
<script src="~/lib/sweetalert2/dist/sweetalert2.js"></script>
|
<script src="~/lib/sweetalert2/dist/sweetalert2.js"></script>
|
||||||
|
<script src="~/lib/jquery-contextmenu/jquery.contextMenu.min.js"></script>
|
||||||
|
<script src="~/lib/jquery-contextmenu/jquery.ui.position.min.js"></script>
|
||||||
|
|
||||||
<!-- Custom -->
|
<!-- Custom -->
|
||||||
@* <script src="~/lib/jquery/dist/jquery.min.js"></script> *@
|
@* <script src="~/lib/jquery/dist/jquery.min.js"></script> *@
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ $(function () {
|
|||||||
$('.div-note-edit-color>div').removeClass('active');
|
$('.div-note-edit-color>div').removeClass('active');
|
||||||
$(this).addClass('active');
|
$(this).addClass('active');
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -18,7 +19,7 @@ function addNewNote(){
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let tmpId = -1;
|
let tmpId = -1;
|
||||||
let tmpZindex = 1;
|
let tmpZindex = 50;
|
||||||
notes.forEach(note => {
|
notes.forEach(note => {
|
||||||
if (note.id <= tmpId){
|
if (note.id <= tmpId){
|
||||||
tmpId = note.id -1;
|
tmpId = note.id -1;
|
||||||
@@ -33,6 +34,45 @@ function addNewNote(){
|
|||||||
note.refresh();
|
note.refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function noteChangeZindex(id, front){
|
||||||
|
let note = getNote(id);
|
||||||
|
let maxIndex = 0;
|
||||||
|
let minIndex = 999999999999;
|
||||||
|
notes.forEach(tmpNote => {
|
||||||
|
if (tmpNote.zindex > maxIndex){
|
||||||
|
maxIndex = tmpNote.zindex;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tmpNote.zindex < minIndex){
|
||||||
|
minIndex = tmpNote.zindex;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (front){
|
||||||
|
//ce je isti ga potem ne premikam
|
||||||
|
if (note.zindex != maxIndex){
|
||||||
|
note.zindex = maxIndex + 1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (note.zindex != minIndex){
|
||||||
|
note.zindex = minIndex - 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
note.refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
function deleteNote(id){
|
||||||
|
let note = getNote(id);
|
||||||
|
note.element.remove();
|
||||||
|
let newArray = [];
|
||||||
|
|
||||||
|
notes.forEach(tmpNote => {
|
||||||
|
if (tmpNote.id != note.id){
|
||||||
|
newArray.push(tmpNote);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
notes = newArray;
|
||||||
|
}
|
||||||
|
|
||||||
function openModalEditNote(id){
|
function openModalEditNote(id){
|
||||||
$('#inpModalEditNoteIdNote').val(id);
|
$('#inpModalEditNoteIdNote').val(id);
|
||||||
note = getNote(id);
|
note = getNote(id);
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ class Note{
|
|||||||
let note = getNote(id);
|
let note = getNote(id);
|
||||||
note.x = ui.position.left;
|
note.x = ui.position.left;
|
||||||
note.y = ui.position.top;
|
note.y = ui.position.top;
|
||||||
console.log(ui.position);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.element.resizable({
|
this.element.resizable({
|
||||||
@@ -49,6 +48,59 @@ class Note{
|
|||||||
openModalEditNote(parseInt($(this).attr('data-id')));
|
openModalEditNote(parseInt($(this).attr('data-id')));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$.contextMenu({
|
||||||
|
selector: '.card[data-id="' + this.id + '"]',
|
||||||
|
callback: function(key, options) {
|
||||||
|
let id = parseInt($(this).attr('data-id'));
|
||||||
|
switch (key){
|
||||||
|
case 'toFront':
|
||||||
|
noteChangeZindex(id, true)
|
||||||
|
break;
|
||||||
|
case 'toBack':
|
||||||
|
noteChangeZindex(id, false)
|
||||||
|
break;
|
||||||
|
case 'edit':
|
||||||
|
openModalEditNote(id);
|
||||||
|
break;
|
||||||
|
case 'delete':
|
||||||
|
deleteNote(id);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
items: {
|
||||||
|
"toFront": {
|
||||||
|
icon: function(opt, $itemElement, itemKey, item){
|
||||||
|
$itemElement.html('<i class="fas fa-reply"></i> V odspredje');
|
||||||
|
|
||||||
|
return 'context-menu-icon-updated';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"toBack": {
|
||||||
|
icon: function(opt, $itemElement, itemKey, item){
|
||||||
|
$itemElement.html('<i class="fas fa-share"></i> V ozadje');
|
||||||
|
|
||||||
|
return 'context-menu-icon-updated';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"edit": {
|
||||||
|
icon: function(opt, $itemElement, itemKey, item){
|
||||||
|
$itemElement.html('<i class="fas fa-edit"></i> Uredi');
|
||||||
|
|
||||||
|
return 'context-menu-icon-updated';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"delete": {
|
||||||
|
icon: function(opt, $itemElement, itemKey, item){
|
||||||
|
$itemElement.html('<i class="fas fa-trash-alt"></i> Izbriši');
|
||||||
|
|
||||||
|
return 'context-menu-icon-updated';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
this.divCanvas.append(this.element);
|
this.divCanvas.append(this.element);
|
||||||
this.setPosition();
|
this.setPosition();
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,309 @@
|
|||||||
|
@charset "UTF-8";
|
||||||
|
/*!
|
||||||
|
* jQuery contextMenu - Plugin for simple contextMenu handling
|
||||||
|
*
|
||||||
|
* Version: v2.9.2
|
||||||
|
*
|
||||||
|
* Authors: Björn Brala (SWIS.nl), Rodney Rehm, Addy Osmani (patches for FF)
|
||||||
|
* Web: http://swisnl.github.io/jQuery-contextMenu/
|
||||||
|
*
|
||||||
|
* Copyright (c) 2011-2020 SWIS BV and contributors
|
||||||
|
*
|
||||||
|
* Licensed under
|
||||||
|
* MIT License http://www.opensource.org/licenses/mit-license
|
||||||
|
*
|
||||||
|
* Date: 2020-05-13T13:55:37.023Z
|
||||||
|
*/
|
||||||
|
@-webkit-keyframes cm-spin {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: translateY(-50%) rotate(0deg);
|
||||||
|
transform: translateY(-50%) rotate(0deg);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
-webkit-transform: translateY(-50%) rotate(359deg);
|
||||||
|
transform: translateY(-50%) rotate(359deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@-o-keyframes cm-spin {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: translateY(-50%) rotate(0deg);
|
||||||
|
-o-transform: translateY(-50%) rotate(0deg);
|
||||||
|
transform: translateY(-50%) rotate(0deg);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
-webkit-transform: translateY(-50%) rotate(359deg);
|
||||||
|
-o-transform: translateY(-50%) rotate(359deg);
|
||||||
|
transform: translateY(-50%) rotate(359deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes cm-spin {
|
||||||
|
0% {
|
||||||
|
-webkit-transform: translateY(-50%) rotate(0deg);
|
||||||
|
-o-transform: translateY(-50%) rotate(0deg);
|
||||||
|
transform: translateY(-50%) rotate(0deg);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
-webkit-transform: translateY(-50%) rotate(359deg);
|
||||||
|
-o-transform: translateY(-50%) rotate(359deg);
|
||||||
|
transform: translateY(-50%) rotate(359deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: "context-menu-icons";
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: normal;
|
||||||
|
|
||||||
|
src: url("font/context-menu-icons.eot?33lxn");
|
||||||
|
src: url("font/context-menu-icons.eot?33lxn#iefix") format("embedded-opentype"), url("font/context-menu-icons.woff2?33lxn") format("woff2"), url("font/context-menu-icons.woff?33lxn") format("woff"), url("font/context-menu-icons.ttf?33lxn") format("truetype");
|
||||||
|
}
|
||||||
|
|
||||||
|
.context-menu-icon-add:before {
|
||||||
|
content: "\EA01";
|
||||||
|
}
|
||||||
|
|
||||||
|
.context-menu-icon-copy:before {
|
||||||
|
content: "\EA02";
|
||||||
|
}
|
||||||
|
|
||||||
|
.context-menu-icon-cut:before {
|
||||||
|
content: "\EA03";
|
||||||
|
}
|
||||||
|
|
||||||
|
.context-menu-icon-delete:before {
|
||||||
|
content: "\EA04";
|
||||||
|
}
|
||||||
|
|
||||||
|
.context-menu-icon-edit:before {
|
||||||
|
content: "\EA05";
|
||||||
|
}
|
||||||
|
|
||||||
|
.context-menu-icon-loading:before {
|
||||||
|
content: "\EA06";
|
||||||
|
}
|
||||||
|
|
||||||
|
.context-menu-icon-paste:before {
|
||||||
|
content: "\EA07";
|
||||||
|
}
|
||||||
|
|
||||||
|
.context-menu-icon-quit:before {
|
||||||
|
content: "\EA08";
|
||||||
|
}
|
||||||
|
|
||||||
|
.context-menu-icon::before {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 0;
|
||||||
|
width: 2em;
|
||||||
|
font-family: "context-menu-icons";
|
||||||
|
font-size: 1em;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: normal;
|
||||||
|
line-height: 1;
|
||||||
|
color: #2980b9;
|
||||||
|
text-align: center;
|
||||||
|
-webkit-transform: translateY(-50%);
|
||||||
|
-ms-transform: translateY(-50%);
|
||||||
|
-o-transform: translateY(-50%);
|
||||||
|
transform: translateY(-50%);
|
||||||
|
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
}
|
||||||
|
|
||||||
|
.context-menu-icon.context-menu-hover:before {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.context-menu-icon.context-menu-disabled::before {
|
||||||
|
color: #bbb;
|
||||||
|
}
|
||||||
|
|
||||||
|
.context-menu-icon.context-menu-icon-loading:before {
|
||||||
|
-webkit-animation: cm-spin 2s infinite;
|
||||||
|
-o-animation: cm-spin 2s infinite;
|
||||||
|
animation: cm-spin 2s infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
.context-menu-icon.context-menu-icon--fa {
|
||||||
|
display: list-item;
|
||||||
|
font-family: inherit;
|
||||||
|
line-height: inherit;
|
||||||
|
}
|
||||||
|
.context-menu-icon.context-menu-icon--fa::before {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 0;
|
||||||
|
width: 2em;
|
||||||
|
font-family: FontAwesome;
|
||||||
|
font-size: 1em;
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: normal;
|
||||||
|
line-height: 1;
|
||||||
|
color: #2980b9;
|
||||||
|
text-align: center;
|
||||||
|
-webkit-transform: translateY(-50%);
|
||||||
|
-ms-transform: translateY(-50%);
|
||||||
|
-o-transform: translateY(-50%);
|
||||||
|
transform: translateY(-50%);
|
||||||
|
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
}
|
||||||
|
.context-menu-icon.context-menu-icon--fa.context-menu-hover:before {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.context-menu-icon.context-menu-icon--fa.context-menu-disabled::before {
|
||||||
|
color: #bbb;
|
||||||
|
}
|
||||||
|
|
||||||
|
.context-menu-icon.context-menu-icon--fa5 {
|
||||||
|
display: list-item;
|
||||||
|
font-family: inherit;
|
||||||
|
line-height: inherit;
|
||||||
|
}
|
||||||
|
.context-menu-icon.context-menu-icon--fa5 i, .context-menu-icon.context-menu-icon--fa5 svg {
|
||||||
|
position: absolute;
|
||||||
|
top: .3em;
|
||||||
|
left: .5em;
|
||||||
|
color: #2980b9;
|
||||||
|
}
|
||||||
|
.context-menu-icon.context-menu-icon--fa5.context-menu-hover > i, .context-menu-icon.context-menu-icon--fa5.context-menu-hover > svg {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.context-menu-icon.context-menu-icon--fa5.context-menu-disabled i, .context-menu-icon.context-menu-icon--fa5.context-menu-disabled svg {
|
||||||
|
color: #bbb;
|
||||||
|
}
|
||||||
|
|
||||||
|
.context-menu-list {
|
||||||
|
position: absolute;
|
||||||
|
display: inline-block;
|
||||||
|
min-width: 13em;
|
||||||
|
max-width: 26em;
|
||||||
|
padding: .25em 0;
|
||||||
|
margin: .3em;
|
||||||
|
font-family: inherit;
|
||||||
|
font-size: inherit;
|
||||||
|
list-style-type: none;
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid #bebebe;
|
||||||
|
border-radius: .2em;
|
||||||
|
-webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, .5);
|
||||||
|
box-shadow: 0 2px 5px rgba(0, 0, 0, .5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.context-menu-item {
|
||||||
|
position: relative;
|
||||||
|
-webkit-box-sizing: content-box;
|
||||||
|
-moz-box-sizing: content-box;
|
||||||
|
box-sizing: content-box;
|
||||||
|
padding: .2em 2em;
|
||||||
|
color: #2f2f2f;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.context-menu-separator {
|
||||||
|
padding: 0;
|
||||||
|
margin: .35em 0;
|
||||||
|
border-bottom: 1px solid #e6e6e6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.context-menu-item > label > input,
|
||||||
|
.context-menu-item > label > textarea {
|
||||||
|
-webkit-user-select: text;
|
||||||
|
-moz-user-select: text;
|
||||||
|
-ms-user-select: text;
|
||||||
|
user-select: text;
|
||||||
|
}
|
||||||
|
|
||||||
|
.context-menu-item.context-menu-hover {
|
||||||
|
color: #fff;
|
||||||
|
cursor: pointer;
|
||||||
|
background-color: #2980b9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.context-menu-item.context-menu-disabled {
|
||||||
|
color: #bbb;
|
||||||
|
cursor: default;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.context-menu-input.context-menu-hover {
|
||||||
|
color: #2f2f2f;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
|
.context-menu-submenu:after {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
right: .5em;
|
||||||
|
z-index: 1;
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
content: '';
|
||||||
|
border-color: transparent transparent transparent #2f2f2f;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: .25em 0 .25em .25em;
|
||||||
|
-webkit-transform: translateY(-50%);
|
||||||
|
-ms-transform: translateY(-50%);
|
||||||
|
-o-transform: translateY(-50%);
|
||||||
|
transform: translateY(-50%);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Inputs
|
||||||
|
*/
|
||||||
|
.context-menu-item.context-menu-input {
|
||||||
|
padding: .3em .6em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* vertically align inside labels */
|
||||||
|
.context-menu-input > label > * {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* position checkboxes and radios as icons */
|
||||||
|
.context-menu-input > label > input[type="checkbox"],
|
||||||
|
.context-menu-input > label > input[type="radio"] {
|
||||||
|
position: relative;
|
||||||
|
top: .12em;
|
||||||
|
margin-right: .4em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.context-menu-input > label {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.context-menu-input > label,
|
||||||
|
.context-menu-input > label > input[type="text"],
|
||||||
|
.context-menu-input > label > textarea,
|
||||||
|
.context-menu-input > label > select {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.context-menu-input > label > textarea {
|
||||||
|
height: 7em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.context-menu-item > .context-menu-list {
|
||||||
|
top: .3em;
|
||||||
|
/* re-positioned by js */
|
||||||
|
right: -.3em;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.context-menu-item.context-menu-visible > .context-menu-list {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.context-menu-accesskey {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
16
ZpcBulletinBoard/wwwroot/lib/jquery-contextmenu/jquery.contextMenu.min.css
vendored
Normal file
16
ZpcBulletinBoard/wwwroot/lib/jquery-contextmenu/jquery.contextMenu.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
ZpcBulletinBoard/wwwroot/lib/jquery-contextmenu/jquery.contextMenu.min.js
vendored
Normal file
2
ZpcBulletinBoard/wwwroot/lib/jquery-contextmenu/jquery.contextMenu.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
513
ZpcBulletinBoard/wwwroot/lib/jquery-contextmenu/jquery.ui.position.js
vendored
Normal file
513
ZpcBulletinBoard/wwwroot/lib/jquery-contextmenu/jquery.ui.position.js
vendored
Normal file
@@ -0,0 +1,513 @@
|
|||||||
|
/*! jQuery UI - v1.12.1 - 2016-09-16
|
||||||
|
* http://jqueryui.com
|
||||||
|
* Includes: position.js
|
||||||
|
* Copyright jQuery Foundation and other contributors; Licensed MIT */
|
||||||
|
|
||||||
|
(function( factory ) {
|
||||||
|
if ( typeof define === "function" && define.amd ) {
|
||||||
|
|
||||||
|
// AMD. Register as an anonymous module.
|
||||||
|
define([ "jquery" ], factory );
|
||||||
|
} else {
|
||||||
|
|
||||||
|
// Browser globals
|
||||||
|
factory( jQuery );
|
||||||
|
}
|
||||||
|
}(function( $ ) {
|
||||||
|
|
||||||
|
$.ui = $.ui || {};
|
||||||
|
|
||||||
|
var version = $.ui.version = "1.12.1";
|
||||||
|
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* jQuery UI Position 1.12.1
|
||||||
|
* http://jqueryui.com
|
||||||
|
*
|
||||||
|
* Copyright jQuery Foundation and other contributors
|
||||||
|
* Released under the MIT license.
|
||||||
|
* http://jquery.org/license
|
||||||
|
*
|
||||||
|
* http://api.jqueryui.com/position/
|
||||||
|
*/
|
||||||
|
|
||||||
|
//>>label: Position
|
||||||
|
//>>group: Core
|
||||||
|
//>>description: Positions elements relative to other elements.
|
||||||
|
//>>docs: http://api.jqueryui.com/position/
|
||||||
|
//>>demos: http://jqueryui.com/position/
|
||||||
|
|
||||||
|
|
||||||
|
( function() {
|
||||||
|
var cachedScrollbarWidth,
|
||||||
|
max = Math.max,
|
||||||
|
abs = Math.abs,
|
||||||
|
rhorizontal = /left|center|right/,
|
||||||
|
rvertical = /top|center|bottom/,
|
||||||
|
roffset = /[\+\-]\d+(\.[\d]+)?%?/,
|
||||||
|
rposition = /^\w+/,
|
||||||
|
rpercent = /%$/,
|
||||||
|
_position = $.fn.position;
|
||||||
|
|
||||||
|
function getOffsets( offsets, width, height ) {
|
||||||
|
return [
|
||||||
|
parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
|
||||||
|
parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseCss( element, property ) {
|
||||||
|
return parseInt( $.css( element, property ), 10 ) || 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getDimensions( elem ) {
|
||||||
|
var raw = elem[ 0 ];
|
||||||
|
if ( raw.nodeType === 9 ) {
|
||||||
|
return {
|
||||||
|
width: elem.width(),
|
||||||
|
height: elem.height(),
|
||||||
|
offset: { top: 0, left: 0 }
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if ( $.isWindow( raw ) ) {
|
||||||
|
return {
|
||||||
|
width: elem.width(),
|
||||||
|
height: elem.height(),
|
||||||
|
offset: { top: elem.scrollTop(), left: elem.scrollLeft() }
|
||||||
|
};
|
||||||
|
}
|
||||||
|
if ( raw.preventDefault ) {
|
||||||
|
return {
|
||||||
|
width: 0,
|
||||||
|
height: 0,
|
||||||
|
offset: { top: raw.pageY, left: raw.pageX }
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
width: elem.outerWidth(),
|
||||||
|
height: elem.outerHeight(),
|
||||||
|
offset: elem.offset()
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
$.position = {
|
||||||
|
scrollbarWidth: function() {
|
||||||
|
if ( cachedScrollbarWidth !== undefined ) {
|
||||||
|
return cachedScrollbarWidth;
|
||||||
|
}
|
||||||
|
var w1, w2,
|
||||||
|
div = $( "<div " +
|
||||||
|
"style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'>" +
|
||||||
|
"<div style='height:100px;width:auto;'></div></div>" ),
|
||||||
|
innerDiv = div.children()[ 0 ];
|
||||||
|
|
||||||
|
$( "body" ).append( div );
|
||||||
|
w1 = innerDiv.offsetWidth;
|
||||||
|
div.css( "overflow", "scroll" );
|
||||||
|
|
||||||
|
w2 = innerDiv.offsetWidth;
|
||||||
|
|
||||||
|
if ( w1 === w2 ) {
|
||||||
|
w2 = div[ 0 ].clientWidth;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.remove();
|
||||||
|
|
||||||
|
return ( cachedScrollbarWidth = w1 - w2 );
|
||||||
|
},
|
||||||
|
getScrollInfo: function( within ) {
|
||||||
|
var overflowX = within.isWindow || within.isDocument ? "" :
|
||||||
|
within.element.css( "overflow-x" ),
|
||||||
|
overflowY = within.isWindow || within.isDocument ? "" :
|
||||||
|
within.element.css( "overflow-y" ),
|
||||||
|
hasOverflowX = overflowX === "scroll" ||
|
||||||
|
( overflowX === "auto" && within.width < within.element[ 0 ].scrollWidth ),
|
||||||
|
hasOverflowY = overflowY === "scroll" ||
|
||||||
|
( overflowY === "auto" && within.height < within.element[ 0 ].scrollHeight );
|
||||||
|
return {
|
||||||
|
width: hasOverflowY ? $.position.scrollbarWidth() : 0,
|
||||||
|
height: hasOverflowX ? $.position.scrollbarWidth() : 0
|
||||||
|
};
|
||||||
|
},
|
||||||
|
getWithinInfo: function( element ) {
|
||||||
|
var withinElement = $( element || window ),
|
||||||
|
isWindow = $.isWindow( withinElement[ 0 ] ),
|
||||||
|
isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9,
|
||||||
|
hasOffset = !isWindow && !isDocument;
|
||||||
|
return {
|
||||||
|
element: withinElement,
|
||||||
|
isWindow: isWindow,
|
||||||
|
isDocument: isDocument,
|
||||||
|
offset: hasOffset ? $( element ).offset() : { left: 0, top: 0 },
|
||||||
|
scrollLeft: withinElement.scrollLeft(),
|
||||||
|
scrollTop: withinElement.scrollTop(),
|
||||||
|
width: withinElement.outerWidth(),
|
||||||
|
height: withinElement.outerHeight()
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
$.fn.position = function( options ) {
|
||||||
|
if ( !options || !options.of ) {
|
||||||
|
return _position.apply( this, arguments );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Make a copy, we don't want to modify arguments
|
||||||
|
options = $.extend( {}, options );
|
||||||
|
|
||||||
|
var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,
|
||||||
|
target = $( options.of ),
|
||||||
|
within = $.position.getWithinInfo( options.within ),
|
||||||
|
scrollInfo = $.position.getScrollInfo( within ),
|
||||||
|
collision = ( options.collision || "flip" ).split( " " ),
|
||||||
|
offsets = {};
|
||||||
|
|
||||||
|
dimensions = getDimensions( target );
|
||||||
|
if ( target[ 0 ].preventDefault ) {
|
||||||
|
|
||||||
|
// Force left top to allow flipping
|
||||||
|
options.at = "left top";
|
||||||
|
}
|
||||||
|
targetWidth = dimensions.width;
|
||||||
|
targetHeight = dimensions.height;
|
||||||
|
targetOffset = dimensions.offset;
|
||||||
|
|
||||||
|
// Clone to reuse original targetOffset later
|
||||||
|
basePosition = $.extend( {}, targetOffset );
|
||||||
|
|
||||||
|
// Force my and at to have valid horizontal and vertical positions
|
||||||
|
// if a value is missing or invalid, it will be converted to center
|
||||||
|
$.each( [ "my", "at" ], function() {
|
||||||
|
var pos = ( options[ this ] || "" ).split( " " ),
|
||||||
|
horizontalOffset,
|
||||||
|
verticalOffset;
|
||||||
|
|
||||||
|
if ( pos.length === 1 ) {
|
||||||
|
pos = rhorizontal.test( pos[ 0 ] ) ?
|
||||||
|
pos.concat( [ "center" ] ) :
|
||||||
|
rvertical.test( pos[ 0 ] ) ?
|
||||||
|
[ "center" ].concat( pos ) :
|
||||||
|
[ "center", "center" ];
|
||||||
|
}
|
||||||
|
pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center";
|
||||||
|
pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center";
|
||||||
|
|
||||||
|
// Calculate offsets
|
||||||
|
horizontalOffset = roffset.exec( pos[ 0 ] );
|
||||||
|
verticalOffset = roffset.exec( pos[ 1 ] );
|
||||||
|
offsets[ this ] = [
|
||||||
|
horizontalOffset ? horizontalOffset[ 0 ] : 0,
|
||||||
|
verticalOffset ? verticalOffset[ 0 ] : 0
|
||||||
|
];
|
||||||
|
|
||||||
|
// Reduce to just the positions without the offsets
|
||||||
|
options[ this ] = [
|
||||||
|
rposition.exec( pos[ 0 ] )[ 0 ],
|
||||||
|
rposition.exec( pos[ 1 ] )[ 0 ]
|
||||||
|
];
|
||||||
|
} );
|
||||||
|
|
||||||
|
// Normalize collision option
|
||||||
|
if ( collision.length === 1 ) {
|
||||||
|
collision[ 1 ] = collision[ 0 ];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( options.at[ 0 ] === "right" ) {
|
||||||
|
basePosition.left += targetWidth;
|
||||||
|
} else if ( options.at[ 0 ] === "center" ) {
|
||||||
|
basePosition.left += targetWidth / 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( options.at[ 1 ] === "bottom" ) {
|
||||||
|
basePosition.top += targetHeight;
|
||||||
|
} else if ( options.at[ 1 ] === "center" ) {
|
||||||
|
basePosition.top += targetHeight / 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
atOffset = getOffsets( offsets.at, targetWidth, targetHeight );
|
||||||
|
basePosition.left += atOffset[ 0 ];
|
||||||
|
basePosition.top += atOffset[ 1 ];
|
||||||
|
|
||||||
|
return this.each( function() {
|
||||||
|
var collisionPosition, using,
|
||||||
|
elem = $( this ),
|
||||||
|
elemWidth = elem.outerWidth(),
|
||||||
|
elemHeight = elem.outerHeight(),
|
||||||
|
marginLeft = parseCss( this, "marginLeft" ),
|
||||||
|
marginTop = parseCss( this, "marginTop" ),
|
||||||
|
collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) +
|
||||||
|
scrollInfo.width,
|
||||||
|
collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) +
|
||||||
|
scrollInfo.height,
|
||||||
|
position = $.extend( {}, basePosition ),
|
||||||
|
myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );
|
||||||
|
|
||||||
|
if ( options.my[ 0 ] === "right" ) {
|
||||||
|
position.left -= elemWidth;
|
||||||
|
} else if ( options.my[ 0 ] === "center" ) {
|
||||||
|
position.left -= elemWidth / 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( options.my[ 1 ] === "bottom" ) {
|
||||||
|
position.top -= elemHeight;
|
||||||
|
} else if ( options.my[ 1 ] === "center" ) {
|
||||||
|
position.top -= elemHeight / 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
position.left += myOffset[ 0 ];
|
||||||
|
position.top += myOffset[ 1 ];
|
||||||
|
|
||||||
|
collisionPosition = {
|
||||||
|
marginLeft: marginLeft,
|
||||||
|
marginTop: marginTop
|
||||||
|
};
|
||||||
|
|
||||||
|
$.each( [ "left", "top" ], function( i, dir ) {
|
||||||
|
if ( $.ui.position[ collision[ i ] ] ) {
|
||||||
|
$.ui.position[ collision[ i ] ][ dir ]( position, {
|
||||||
|
targetWidth: targetWidth,
|
||||||
|
targetHeight: targetHeight,
|
||||||
|
elemWidth: elemWidth,
|
||||||
|
elemHeight: elemHeight,
|
||||||
|
collisionPosition: collisionPosition,
|
||||||
|
collisionWidth: collisionWidth,
|
||||||
|
collisionHeight: collisionHeight,
|
||||||
|
offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],
|
||||||
|
my: options.my,
|
||||||
|
at: options.at,
|
||||||
|
within: within,
|
||||||
|
elem: elem
|
||||||
|
} );
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
|
||||||
|
if ( options.using ) {
|
||||||
|
|
||||||
|
// Adds feedback as second argument to using callback, if present
|
||||||
|
using = function( props ) {
|
||||||
|
var left = targetOffset.left - position.left,
|
||||||
|
right = left + targetWidth - elemWidth,
|
||||||
|
top = targetOffset.top - position.top,
|
||||||
|
bottom = top + targetHeight - elemHeight,
|
||||||
|
feedback = {
|
||||||
|
target: {
|
||||||
|
element: target,
|
||||||
|
left: targetOffset.left,
|
||||||
|
top: targetOffset.top,
|
||||||
|
width: targetWidth,
|
||||||
|
height: targetHeight
|
||||||
|
},
|
||||||
|
element: {
|
||||||
|
element: elem,
|
||||||
|
left: position.left,
|
||||||
|
top: position.top,
|
||||||
|
width: elemWidth,
|
||||||
|
height: elemHeight
|
||||||
|
},
|
||||||
|
horizontal: right < 0 ? "left" : left > 0 ? "right" : "center",
|
||||||
|
vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle"
|
||||||
|
};
|
||||||
|
if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {
|
||||||
|
feedback.horizontal = "center";
|
||||||
|
}
|
||||||
|
if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {
|
||||||
|
feedback.vertical = "middle";
|
||||||
|
}
|
||||||
|
if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {
|
||||||
|
feedback.important = "horizontal";
|
||||||
|
} else {
|
||||||
|
feedback.important = "vertical";
|
||||||
|
}
|
||||||
|
options.using.call( this, props, feedback );
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
elem.offset( $.extend( position, { using: using } ) );
|
||||||
|
} );
|
||||||
|
};
|
||||||
|
|
||||||
|
$.ui.position = {
|
||||||
|
fit: {
|
||||||
|
left: function( position, data ) {
|
||||||
|
var within = data.within,
|
||||||
|
withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
|
||||||
|
outerWidth = within.width,
|
||||||
|
collisionPosLeft = position.left - data.collisionPosition.marginLeft,
|
||||||
|
overLeft = withinOffset - collisionPosLeft,
|
||||||
|
overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,
|
||||||
|
newOverRight;
|
||||||
|
|
||||||
|
// Element is wider than within
|
||||||
|
if ( data.collisionWidth > outerWidth ) {
|
||||||
|
|
||||||
|
// Element is initially over the left side of within
|
||||||
|
if ( overLeft > 0 && overRight <= 0 ) {
|
||||||
|
newOverRight = position.left + overLeft + data.collisionWidth - outerWidth -
|
||||||
|
withinOffset;
|
||||||
|
position.left += overLeft - newOverRight;
|
||||||
|
|
||||||
|
// Element is initially over right side of within
|
||||||
|
} else if ( overRight > 0 && overLeft <= 0 ) {
|
||||||
|
position.left = withinOffset;
|
||||||
|
|
||||||
|
// Element is initially over both left and right sides of within
|
||||||
|
} else {
|
||||||
|
if ( overLeft > overRight ) {
|
||||||
|
position.left = withinOffset + outerWidth - data.collisionWidth;
|
||||||
|
} else {
|
||||||
|
position.left = withinOffset;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Too far left -> align with left edge
|
||||||
|
} else if ( overLeft > 0 ) {
|
||||||
|
position.left += overLeft;
|
||||||
|
|
||||||
|
// Too far right -> align with right edge
|
||||||
|
} else if ( overRight > 0 ) {
|
||||||
|
position.left -= overRight;
|
||||||
|
|
||||||
|
// Adjust based on position and margin
|
||||||
|
} else {
|
||||||
|
position.left = max( position.left - collisionPosLeft, position.left );
|
||||||
|
}
|
||||||
|
},
|
||||||
|
top: function( position, data ) {
|
||||||
|
var within = data.within,
|
||||||
|
withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
|
||||||
|
outerHeight = data.within.height,
|
||||||
|
collisionPosTop = position.top - data.collisionPosition.marginTop,
|
||||||
|
overTop = withinOffset - collisionPosTop,
|
||||||
|
overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,
|
||||||
|
newOverBottom;
|
||||||
|
|
||||||
|
// Element is taller than within
|
||||||
|
if ( data.collisionHeight > outerHeight ) {
|
||||||
|
|
||||||
|
// Element is initially over the top of within
|
||||||
|
if ( overTop > 0 && overBottom <= 0 ) {
|
||||||
|
newOverBottom = position.top + overTop + data.collisionHeight - outerHeight -
|
||||||
|
withinOffset;
|
||||||
|
position.top += overTop - newOverBottom;
|
||||||
|
|
||||||
|
// Element is initially over bottom of within
|
||||||
|
} else if ( overBottom > 0 && overTop <= 0 ) {
|
||||||
|
position.top = withinOffset;
|
||||||
|
|
||||||
|
// Element is initially over both top and bottom of within
|
||||||
|
} else {
|
||||||
|
if ( overTop > overBottom ) {
|
||||||
|
position.top = withinOffset + outerHeight - data.collisionHeight;
|
||||||
|
} else {
|
||||||
|
position.top = withinOffset;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Too far up -> align with top
|
||||||
|
} else if ( overTop > 0 ) {
|
||||||
|
position.top += overTop;
|
||||||
|
|
||||||
|
// Too far down -> align with bottom edge
|
||||||
|
} else if ( overBottom > 0 ) {
|
||||||
|
position.top -= overBottom;
|
||||||
|
|
||||||
|
// Adjust based on position and margin
|
||||||
|
} else {
|
||||||
|
position.top = max( position.top - collisionPosTop, position.top );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
flip: {
|
||||||
|
left: function( position, data ) {
|
||||||
|
var within = data.within,
|
||||||
|
withinOffset = within.offset.left + within.scrollLeft,
|
||||||
|
outerWidth = within.width,
|
||||||
|
offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
|
||||||
|
collisionPosLeft = position.left - data.collisionPosition.marginLeft,
|
||||||
|
overLeft = collisionPosLeft - offsetLeft,
|
||||||
|
overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
|
||||||
|
myOffset = data.my[ 0 ] === "left" ?
|
||||||
|
-data.elemWidth :
|
||||||
|
data.my[ 0 ] === "right" ?
|
||||||
|
data.elemWidth :
|
||||||
|
0,
|
||||||
|
atOffset = data.at[ 0 ] === "left" ?
|
||||||
|
data.targetWidth :
|
||||||
|
data.at[ 0 ] === "right" ?
|
||||||
|
-data.targetWidth :
|
||||||
|
0,
|
||||||
|
offset = -2 * data.offset[ 0 ],
|
||||||
|
newOverRight,
|
||||||
|
newOverLeft;
|
||||||
|
|
||||||
|
if ( overLeft < 0 ) {
|
||||||
|
newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth -
|
||||||
|
outerWidth - withinOffset;
|
||||||
|
if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {
|
||||||
|
position.left += myOffset + atOffset + offset;
|
||||||
|
}
|
||||||
|
} else if ( overRight > 0 ) {
|
||||||
|
newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset +
|
||||||
|
atOffset + offset - offsetLeft;
|
||||||
|
if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {
|
||||||
|
position.left += myOffset + atOffset + offset;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
top: function( position, data ) {
|
||||||
|
var within = data.within,
|
||||||
|
withinOffset = within.offset.top + within.scrollTop,
|
||||||
|
outerHeight = within.height,
|
||||||
|
offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
|
||||||
|
collisionPosTop = position.top - data.collisionPosition.marginTop,
|
||||||
|
overTop = collisionPosTop - offsetTop,
|
||||||
|
overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,
|
||||||
|
top = data.my[ 1 ] === "top",
|
||||||
|
myOffset = top ?
|
||||||
|
-data.elemHeight :
|
||||||
|
data.my[ 1 ] === "bottom" ?
|
||||||
|
data.elemHeight :
|
||||||
|
0,
|
||||||
|
atOffset = data.at[ 1 ] === "top" ?
|
||||||
|
data.targetHeight :
|
||||||
|
data.at[ 1 ] === "bottom" ?
|
||||||
|
-data.targetHeight :
|
||||||
|
0,
|
||||||
|
offset = -2 * data.offset[ 1 ],
|
||||||
|
newOverTop,
|
||||||
|
newOverBottom;
|
||||||
|
if ( overTop < 0 ) {
|
||||||
|
newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight -
|
||||||
|
outerHeight - withinOffset;
|
||||||
|
if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) {
|
||||||
|
position.top += myOffset + atOffset + offset;
|
||||||
|
}
|
||||||
|
} else if ( overBottom > 0 ) {
|
||||||
|
newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset +
|
||||||
|
offset - offsetTop;
|
||||||
|
if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) {
|
||||||
|
position.top += myOffset + atOffset + offset;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
flipfit: {
|
||||||
|
left: function() {
|
||||||
|
$.ui.position.flip.left.apply( this, arguments );
|
||||||
|
$.ui.position.fit.left.apply( this, arguments );
|
||||||
|
},
|
||||||
|
top: function() {
|
||||||
|
$.ui.position.flip.top.apply( this, arguments );
|
||||||
|
$.ui.position.fit.top.apply( this, arguments );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
} )();
|
||||||
|
|
||||||
|
var position = $.ui.position;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}));
|
||||||
6
ZpcBulletinBoard/wwwroot/lib/jquery-contextmenu/jquery.ui.position.min.js
vendored
Normal file
6
ZpcBulletinBoard/wwwroot/lib/jquery-contextmenu/jquery.ui.position.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
20
package-lock.json
generated
20
package-lock.json
generated
@@ -9,6 +9,7 @@
|
|||||||
"gulp": "^4.0.2",
|
"gulp": "^4.0.2",
|
||||||
"html-to-image": "^1.11.11",
|
"html-to-image": "^1.11.11",
|
||||||
"htmlsvg": "^1.2.3",
|
"htmlsvg": "^1.2.3",
|
||||||
|
"jquery-contextmenu": "^2.9.2",
|
||||||
"jquery-ui": "^1.13.2",
|
"jquery-ui": "^1.13.2",
|
||||||
"summernote": "^0.8.20"
|
"summernote": "^0.8.20"
|
||||||
}
|
}
|
||||||
@@ -1722,6 +1723,17 @@
|
|||||||
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz",
|
||||||
"integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg=="
|
"integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg=="
|
||||||
},
|
},
|
||||||
|
"node_modules/jquery-contextmenu": {
|
||||||
|
"version": "2.9.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/jquery-contextmenu/-/jquery-contextmenu-2.9.2.tgz",
|
||||||
|
"integrity": "sha512-6S6sH/08owDStC/7zNwcN366yR0ydX6PmMB0RnjLRQOp7Nc/rqwEHglshfHrrw2kdTev97GXwRXrayDUmToIOw==",
|
||||||
|
"dependencies": {
|
||||||
|
"jquery": "^3.5.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"jquery": ">=1.8.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/jquery-ui": {
|
"node_modules/jquery-ui": {
|
||||||
"version": "1.13.2",
|
"version": "1.13.2",
|
||||||
"resolved": "https://registry.npmjs.org/jquery-ui/-/jquery-ui-1.13.2.tgz",
|
"resolved": "https://registry.npmjs.org/jquery-ui/-/jquery-ui-1.13.2.tgz",
|
||||||
@@ -4961,6 +4973,14 @@
|
|||||||
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz",
|
||||||
"integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg=="
|
"integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg=="
|
||||||
},
|
},
|
||||||
|
"jquery-contextmenu": {
|
||||||
|
"version": "2.9.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/jquery-contextmenu/-/jquery-contextmenu-2.9.2.tgz",
|
||||||
|
"integrity": "sha512-6S6sH/08owDStC/7zNwcN366yR0ydX6PmMB0RnjLRQOp7Nc/rqwEHglshfHrrw2kdTev97GXwRXrayDUmToIOw==",
|
||||||
|
"requires": {
|
||||||
|
"jquery": "^3.5.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"jquery-ui": {
|
"jquery-ui": {
|
||||||
"version": "1.13.2",
|
"version": "1.13.2",
|
||||||
"resolved": "https://registry.npmjs.org/jquery-ui/-/jquery-ui-1.13.2.tgz",
|
"resolved": "https://registry.npmjs.org/jquery-ui/-/jquery-ui-1.13.2.tgz",
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
"gulp": "^4.0.2",
|
"gulp": "^4.0.2",
|
||||||
"html-to-image": "^1.11.11",
|
"html-to-image": "^1.11.11",
|
||||||
"htmlsvg": "^1.2.3",
|
"htmlsvg": "^1.2.3",
|
||||||
|
"jquery-contextmenu": "^2.9.2",
|
||||||
"jquery-ui": "^1.13.2",
|
"jquery-ui": "^1.13.2",
|
||||||
"summernote": "^0.8.20"
|
"summernote": "^0.8.20"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user