Iniit
@@ -0,0 +1,225 @@
|
||||
/**
|
||||
* Author and copyright: Stefan Haack (https://shaack.com)
|
||||
* Repository: https://github.com/shaack/bootstrap-input-spinner
|
||||
* License: MIT, see file 'LICENSE'
|
||||
*/
|
||||
|
||||
(function ($) {
|
||||
"use strict"
|
||||
|
||||
var spacePressed = false
|
||||
var originalVal = $.fn.val
|
||||
$.fn.val = function (value) {
|
||||
if (arguments.length >= 1) {
|
||||
if (this[0]["bootstrap-input-spinner"] && this[0].setValue) {
|
||||
this[0].setValue(value)
|
||||
}
|
||||
}
|
||||
return originalVal.apply(this, arguments)
|
||||
}
|
||||
|
||||
$.fn.InputSpinner = $.fn.inputSpinner = function (options) {
|
||||
|
||||
var config = {
|
||||
decrementButton: "<strong>-</strong>", // button text
|
||||
incrementButton: "<strong>+</strong>", // ..
|
||||
groupClass: "", // css class of the input-group (sizing with input-group-sm, input-group-lg)
|
||||
buttonsClass: "btn-outline-secondary",
|
||||
buttonsWidth: "2.5em",
|
||||
textAlign: "center",
|
||||
autoDelay: 500, // ms holding before auto value change
|
||||
autoInterval: 100, // speed of auto value change
|
||||
boostThreshold: 10, // boost after these steps
|
||||
boostMultiplier: "auto", // you can also set a constant number as multiplier
|
||||
locale: null // the locale for number rendering; if null, the browsers language is used
|
||||
}
|
||||
Object.assign(config, options)
|
||||
|
||||
var html = '<div class="input-group ' + config.groupClass + '">' +
|
||||
'<div class="input-group-prepend">' +
|
||||
'<button style="min-width: ' + config.buttonsWidth + '" class="btn btn-decrement ' + config.buttonsClass + '" type="button">' + config.decrementButton + '</button>' +
|
||||
'</div>' +
|
||||
'<input type="text" style="text-align: ' + config.textAlign + '" class="form-control"/>' +
|
||||
'<div class="input-group-append">' +
|
||||
'<button style="min-width: ' + config.buttonsWidth + '" class="btn btn-increment ' + config.buttonsClass + '" type="button">' + config.incrementButton + '</button>' +
|
||||
'</div>' +
|
||||
'</div>'
|
||||
|
||||
var locale = config.locale || navigator.language || "en-US"
|
||||
|
||||
this.each(function () {
|
||||
|
||||
var $original = $(this)
|
||||
$original[0]["bootstrap-input-spinner"] = true
|
||||
$original.hide()
|
||||
|
||||
var autoDelayHandler = null
|
||||
var autoIntervalHandler = null
|
||||
var autoMultiplier = config.boostMultiplier === "auto"
|
||||
var boostMultiplier = autoMultiplier ? 1 : config.boostMultiplier
|
||||
|
||||
var $inputGroup = $(html)
|
||||
var $buttonDecrement = $inputGroup.find(".btn-decrement")
|
||||
var $buttonIncrement = $inputGroup.find(".btn-increment")
|
||||
var $input = $inputGroup.find("input")
|
||||
|
||||
var min = parseFloat($original.prop("min")) || 0
|
||||
var max = isNaN($original.prop("max")) || $original.prop("max") === "" ? Infinity : parseFloat($original.prop("max"))
|
||||
var step = parseFloat($original.prop("step")) || 1
|
||||
var decimals = parseInt($original.attr("data-decimals")) || 0
|
||||
|
||||
var numberFormat = new Intl.NumberFormat(locale, {
|
||||
minimumFractionDigits: decimals,
|
||||
maximumFractionDigits: decimals
|
||||
})
|
||||
var value = parseFloat($original[0].value)
|
||||
var boostStepsCount = 0
|
||||
|
||||
$original[0].setValue = function (newValue) {
|
||||
setValue(newValue)
|
||||
}
|
||||
|
||||
if ($original.prop("class").indexOf("is-invalid") !== -1) { // TODO dynamically copy all classes
|
||||
$input.addClass("is-invalid")
|
||||
}
|
||||
if ($original.prop("class").indexOf("is-valid") !== -1) {
|
||||
$input.addClass("is-valid")
|
||||
}
|
||||
if ($original.prop("required")) {
|
||||
$input.prop("required", true)
|
||||
}
|
||||
if ($original.prop("placeholder")) {
|
||||
$input.prop("placeholder", $original.prop("placeholder"))
|
||||
}
|
||||
|
||||
$original.after($inputGroup)
|
||||
|
||||
if (isNaN(value)) {
|
||||
$original[0].value = ""
|
||||
$input[0].value = ""
|
||||
} else {
|
||||
$original[0].value = value
|
||||
$input[0].value = numberFormat.format(value)
|
||||
}
|
||||
|
||||
$input.on("paste keyup change", function () {
|
||||
var inputValue = $input[0].value
|
||||
if (locale === "en-US" || locale === "en-GB" || locale === "th-TH") {
|
||||
value = parseFloat(inputValue)
|
||||
} else {
|
||||
value = parseFloat(inputValue.replace(/[. ]/g, '').replace(/,/g, '.')) // i18n
|
||||
}
|
||||
if (isNaN(value)) {
|
||||
$original[0].value = ""
|
||||
} else {
|
||||
$original[0].value = value
|
||||
}
|
||||
dispatchChangeEvents($original)
|
||||
})
|
||||
|
||||
onPointerDown($buttonDecrement[0], function () {
|
||||
stepHandling(-step)
|
||||
})
|
||||
onPointerDown($buttonIncrement[0], function () {
|
||||
stepHandling(step)
|
||||
})
|
||||
onPointerUp(document.body, function () {
|
||||
resetTimer()
|
||||
})
|
||||
|
||||
function setValue(newValue) {
|
||||
if (isNaN(newValue) || newValue === "") {
|
||||
$original[0].value = ""
|
||||
$input[0].value = ""
|
||||
value = 0.0
|
||||
} else {
|
||||
$original[0].value = newValue
|
||||
$input[0].value = numberFormat.format(newValue)
|
||||
value = parseFloat(newValue)
|
||||
}
|
||||
}
|
||||
|
||||
function dispatchChangeEvents($element) {
|
||||
setTimeout(function () {
|
||||
var changeEvent = new Event("change", {bubbles: true})
|
||||
var inputEvent = new Event("input", {bubbles: true})
|
||||
$element[0].dispatchEvent(changeEvent)
|
||||
$element[0].dispatchEvent(inputEvent)
|
||||
})
|
||||
}
|
||||
|
||||
function stepHandling(step) {
|
||||
calcStep(step)
|
||||
resetTimer()
|
||||
autoDelayHandler = setTimeout(function () {
|
||||
autoIntervalHandler = setInterval(function () {
|
||||
if (boostStepsCount > config.boostThreshold) {
|
||||
if (autoMultiplier) {
|
||||
calcStep(step * parseInt(boostMultiplier, 10))
|
||||
boostMultiplier = Math.min(1000000, boostMultiplier * 1.1)
|
||||
} else {
|
||||
calcStep(step * boostMultiplier)
|
||||
}
|
||||
} else {
|
||||
calcStep(step)
|
||||
}
|
||||
boostStepsCount++
|
||||
}, config.autoInterval)
|
||||
}, config.autoDelay)
|
||||
}
|
||||
|
||||
function calcStep(step) {
|
||||
if (isNaN(value)) {
|
||||
value = 0
|
||||
}
|
||||
value = Math.round(value / step) * step
|
||||
value = Math.min(Math.max(value + step, min), max)
|
||||
$input[0].value = numberFormat.format(value)
|
||||
$original[0].value = Math.round(value * Math.pow(10, decimals)) / Math.pow(10, decimals)
|
||||
dispatchChangeEvents($original)
|
||||
}
|
||||
|
||||
function resetTimer() {
|
||||
boostStepsCount = 0
|
||||
boostMultiplier = boostMultiplier = autoMultiplier ? 1 : config.boostMultiplier
|
||||
clearTimeout(autoDelayHandler)
|
||||
clearTimeout(autoIntervalHandler)
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
function onPointerUp(element, callback) {
|
||||
element.addEventListener("mouseup", function (e) {
|
||||
callback(e)
|
||||
})
|
||||
element.addEventListener("touchend", function (e) {
|
||||
callback(e)
|
||||
})
|
||||
element.addEventListener("keyup", function (e) {
|
||||
if (e.keyCode === 32) {
|
||||
spacePressed = false
|
||||
callback(e)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function onPointerDown(element, callback) {
|
||||
element.addEventListener("mousedown", function (e) {
|
||||
e.preventDefault()
|
||||
callback(e)
|
||||
})
|
||||
element.addEventListener("touchstart", function (e) {
|
||||
e.preventDefault()
|
||||
callback(e)
|
||||
})
|
||||
element.addEventListener("keydown", function (e) {
|
||||
if (e.keyCode === 32 && !spacePressed) {
|
||||
spacePressed = true
|
||||
callback(e)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}(jQuery))
|
||||
@@ -0,0 +1,329 @@
|
||||
/*!
|
||||
* Bootstrap Reboot v4.0.0 (https://getbootstrap.com)
|
||||
* Copyright 2011-2018 The Bootstrap Authors
|
||||
* Copyright 2011-2018 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||
*/
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html {
|
||||
font-family: sans-serif;
|
||||
line-height: 1.15;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-ms-text-size-adjust: 100%;
|
||||
-ms-overflow-style: scrollbar;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
@-ms-viewport {
|
||||
width: device-width;
|
||||
}
|
||||
|
||||
article, aside, dialog, figcaption, figure, footer, header, hgroup, main, nav, section {
|
||||
display: block;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
||||
font-size: 1rem;
|
||||
font-weight: 400;
|
||||
line-height: 1.5;
|
||||
color: #212529;
|
||||
text-align: left;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
[tabindex="-1"]:focus {
|
||||
outline: 0 !important;
|
||||
}
|
||||
|
||||
hr {
|
||||
box-sizing: content-box;
|
||||
height: 0;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
abbr[title],
|
||||
abbr[data-original-title] {
|
||||
text-decoration: underline;
|
||||
-webkit-text-decoration: underline dotted;
|
||||
text-decoration: underline dotted;
|
||||
cursor: help;
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
address {
|
||||
margin-bottom: 1rem;
|
||||
font-style: normal;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul,
|
||||
dl {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
ol ol,
|
||||
ul ul,
|
||||
ol ul,
|
||||
ul ol {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
dt {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
dd {
|
||||
margin-bottom: .5rem;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
dfn {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
sub,
|
||||
sup {
|
||||
position: relative;
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -.5em;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #007bff;
|
||||
text-decoration: none;
|
||||
background-color: transparent;
|
||||
-webkit-text-decoration-skip: objects;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #0056b3;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a:not([href]):not([tabindex]) {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:not([href]):not([tabindex]):hover, a:not([href]):not([tabindex]):focus {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:not([href]):not([tabindex]):focus {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
pre,
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: monospace, monospace;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
pre {
|
||||
margin-top: 0;
|
||||
margin-bottom: 1rem;
|
||||
overflow: auto;
|
||||
-ms-overflow-style: scrollbar;
|
||||
}
|
||||
|
||||
figure {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
img {
|
||||
vertical-align: middle;
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
svg:not(:root) {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
caption {
|
||||
padding-top: 0.75rem;
|
||||
padding-bottom: 0.75rem;
|
||||
color: #6c757d;
|
||||
text-align: left;
|
||||
caption-side: bottom;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: inherit;
|
||||
}
|
||||
|
||||
label {
|
||||
display: inline-block;
|
||||
margin-bottom: .5rem;
|
||||
}
|
||||
|
||||
button {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
button:focus {
|
||||
outline: 1px dotted;
|
||||
outline: 5px auto -webkit-focus-ring-color;
|
||||
}
|
||||
|
||||
input,
|
||||
button,
|
||||
select,
|
||||
optgroup,
|
||||
textarea {
|
||||
margin: 0;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
button,
|
||||
input {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
button,
|
||||
select {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
button,
|
||||
html [type="button"],
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
button::-moz-focus-inner,
|
||||
[type="button"]::-moz-focus-inner,
|
||||
[type="reset"]::-moz-focus-inner,
|
||||
[type="submit"]::-moz-focus-inner {
|
||||
padding: 0;
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
input[type="radio"],
|
||||
input[type="checkbox"] {
|
||||
box-sizing: border-box;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
input[type="date"],
|
||||
input[type="time"],
|
||||
input[type="datetime-local"],
|
||||
input[type="month"] {
|
||||
-webkit-appearance: listbox;
|
||||
}
|
||||
|
||||
textarea {
|
||||
overflow: auto;
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
min-width: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
legend {
|
||||
display: block;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
padding: 0;
|
||||
margin-bottom: .5rem;
|
||||
font-size: 1.5rem;
|
||||
line-height: inherit;
|
||||
color: inherit;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
[type="number"]::-webkit-inner-spin-button,
|
||||
[type="number"]::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
[type="search"] {
|
||||
outline-offset: -2px;
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
[type="search"]::-webkit-search-cancel-button,
|
||||
[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
font: inherit;
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
output {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
/*!
|
||||
* Bootstrap Reboot v4.0.0 (https://getbootstrap.com)
|
||||
* Copyright 2011-2018 The Bootstrap Authors
|
||||
* Copyright 2011-2018 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||
*/*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}@-ms-viewport{width:device-width}article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent;-webkit-text-decoration-skip:objects}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg:not(:root){overflow:hidden}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}
|
||||
@@ -0,0 +1,91 @@
|
||||
/* ========================================================================
|
||||
* Tutorial specific Javascript
|
||||
*
|
||||
* ========================================================================
|
||||
* Copyright 2015 Bootbites.com (unless otherwise stated)
|
||||
* For license information see: http://bootbites.com/license
|
||||
* ======================================================================== */
|
||||
'use strict';
|
||||
|
||||
var dropdownSelectors = $('.dropdown, .dropup');
|
||||
|
||||
// Custom function to read dropdown data
|
||||
// =========================
|
||||
function dropdownEffectData(target) {
|
||||
// @todo - page level global?
|
||||
var effectInDefault = null,
|
||||
effectOutDefault = null;
|
||||
var dropdown = $(target),
|
||||
dropdownMenu = $('.dropdown-menu', target);
|
||||
var parentUl = dropdown.parents('ul.nav');
|
||||
|
||||
// If parent is ul.nav allow global effect settings
|
||||
if (parentUl.length > 0) {
|
||||
effectInDefault = parentUl.data('dropdown-in') || null;
|
||||
effectOutDefault = parentUl.data('dropdown-out') || null;
|
||||
}
|
||||
|
||||
return {
|
||||
target: target,
|
||||
dropdown: dropdown,
|
||||
dropdownMenu: dropdownMenu,
|
||||
effectIn: dropdownMenu.data('dropdown-in') || effectInDefault,
|
||||
effectOut: dropdownMenu.data('dropdown-out') || effectOutDefault,
|
||||
};
|
||||
}
|
||||
|
||||
// Custom function to start effect (in or out)
|
||||
// =========================
|
||||
function dropdownEffectStart(data, effectToStart) {
|
||||
if (effectToStart) {
|
||||
data.dropdown.addClass('dropdown-animating');
|
||||
data.dropdownMenu.addClass('animated');
|
||||
data.dropdownMenu.addClass(effectToStart);
|
||||
}
|
||||
}
|
||||
|
||||
// Custom function to read when animation is over
|
||||
// =========================
|
||||
function dropdownEffectEnd(data, callbackFunc) {
|
||||
var animationEnd = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend';
|
||||
data.dropdown.one(animationEnd, function() {
|
||||
data.dropdown.removeClass('dropdown-animating');
|
||||
data.dropdownMenu.removeClass('animated');
|
||||
data.dropdownMenu.removeClass(data.effectIn);
|
||||
data.dropdownMenu.removeClass(data.effectOut);
|
||||
|
||||
// Custom callback option, used to remove open class in out effect
|
||||
if(typeof callbackFunc == 'function'){
|
||||
callbackFunc();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Bootstrap API hooks
|
||||
// =========================
|
||||
dropdownSelectors.on({
|
||||
"show.bs.dropdown": function () {
|
||||
// On show, start in effect
|
||||
var dropdown = dropdownEffectData(this);
|
||||
dropdownEffectStart(dropdown, dropdown.effectIn);
|
||||
},
|
||||
"shown.bs.dropdown": function () {
|
||||
// On shown, remove in effect once complete
|
||||
var dropdown = dropdownEffectData(this);
|
||||
if (dropdown.effectIn && dropdown.effectOut) {
|
||||
dropdownEffectEnd(dropdown, function() {});
|
||||
}
|
||||
},
|
||||
"hide.bs.dropdown": function(e) {
|
||||
// On hide, start out effect
|
||||
var dropdown = dropdownEffectData(this);
|
||||
if (dropdown.effectOut) {
|
||||
e.preventDefault();
|
||||
dropdownEffectStart(dropdown, dropdown.effectOut);
|
||||
dropdownEffectEnd(dropdown, function() {
|
||||
dropdown.dropdown.removeClass('show');
|
||||
dropdown.dropdownMenu.removeClass('show');
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* DOM element rendering detection
|
||||
* https://davidwalsh.name/detect-node-insertion
|
||||
*/
|
||||
@keyframes chartjs-render-animation {
|
||||
from { opacity: 0.99; }
|
||||
to { opacity: 1; }
|
||||
}
|
||||
|
||||
.chartjs-render-monitor {
|
||||
animation: chartjs-render-animation 0.001s;
|
||||
}
|
||||
|
||||
/*
|
||||
* DOM element resizing detection
|
||||
* https://github.com/marcj/css-element-queries
|
||||
*/
|
||||
.chartjs-size-monitor,
|
||||
.chartjs-size-monitor-expand,
|
||||
.chartjs-size-monitor-shrink {
|
||||
position: absolute;
|
||||
direction: ltr;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
visibility: hidden;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.chartjs-size-monitor-expand > div {
|
||||
position: absolute;
|
||||
width: 1000000px;
|
||||
height: 1000000px;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.chartjs-size-monitor-shrink > div {
|
||||
position: absolute;
|
||||
width: 200%;
|
||||
height: 200%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
@keyframes chartjs-render-animation{from{opacity:.99}to{opacity:1}}.chartjs-render-monitor{animation:chartjs-render-animation 1ms}.chartjs-size-monitor,.chartjs-size-monitor-expand,.chartjs-size-monitor-shrink{position:absolute;direction:ltr;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1}.chartjs-size-monitor-expand>div{position:absolute;width:1000000px;height:1000000px;left:0;top:0}.chartjs-size-monitor-shrink>div{position:absolute;width:200%;height:200%;left:0;top:0}
|
||||
@@ -0,0 +1,388 @@
|
||||
.daterangepicker {
|
||||
position: absolute;
|
||||
color: inherit;
|
||||
background-color: #fff;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #ddd;
|
||||
width: 278px;
|
||||
max-width: none;
|
||||
padding: 0;
|
||||
margin-top: 7px;
|
||||
top: 100px;
|
||||
left: 20px;
|
||||
z-index: 3001;
|
||||
display: none;
|
||||
font-family: arial;
|
||||
font-size: 15px;
|
||||
line-height: 1em;
|
||||
}
|
||||
|
||||
.daterangepicker:before, .daterangepicker:after {
|
||||
position: absolute;
|
||||
display: inline-block;
|
||||
border-bottom-color: rgba(0, 0, 0, 0.2);
|
||||
content: '';
|
||||
}
|
||||
|
||||
.daterangepicker:before {
|
||||
top: -7px;
|
||||
border-right: 7px solid transparent;
|
||||
border-left: 7px solid transparent;
|
||||
border-bottom: 7px solid #ccc;
|
||||
}
|
||||
|
||||
.daterangepicker:after {
|
||||
top: -6px;
|
||||
border-right: 6px solid transparent;
|
||||
border-bottom: 6px solid #fff;
|
||||
border-left: 6px solid transparent;
|
||||
}
|
||||
|
||||
.daterangepicker.opensleft:before {
|
||||
right: 9px;
|
||||
}
|
||||
|
||||
.daterangepicker.opensleft:after {
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
.daterangepicker.openscenter:before {
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 0;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.daterangepicker.openscenter:after {
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 0;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.daterangepicker.opensright:before {
|
||||
left: 9px;
|
||||
}
|
||||
|
||||
.daterangepicker.opensright:after {
|
||||
left: 10px;
|
||||
}
|
||||
|
||||
.daterangepicker.drop-up {
|
||||
margin-top: -7px;
|
||||
}
|
||||
|
||||
.daterangepicker.drop-up:before {
|
||||
top: initial;
|
||||
bottom: -7px;
|
||||
border-bottom: initial;
|
||||
border-top: 7px solid #ccc;
|
||||
}
|
||||
|
||||
.daterangepicker.drop-up:after {
|
||||
top: initial;
|
||||
bottom: -6px;
|
||||
border-bottom: initial;
|
||||
border-top: 6px solid #fff;
|
||||
}
|
||||
|
||||
.daterangepicker.single .daterangepicker .ranges, .daterangepicker.single .drp-calendar {
|
||||
float: none;
|
||||
}
|
||||
|
||||
.daterangepicker.single .drp-selected {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.daterangepicker.show-calendar .drp-calendar {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.daterangepicker.show-calendar .drp-buttons {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.daterangepicker.auto-apply .drp-buttons {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.daterangepicker .drp-calendar {
|
||||
display: none;
|
||||
max-width: 270px;
|
||||
}
|
||||
|
||||
.daterangepicker .drp-calendar.left {
|
||||
padding: 8px 0 8px 8px;
|
||||
}
|
||||
|
||||
.daterangepicker .drp-calendar.right {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.daterangepicker .drp-calendar.single .calendar-table {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.daterangepicker .calendar-table .next span, .daterangepicker .calendar-table .prev span {
|
||||
color: #fff;
|
||||
border: solid black;
|
||||
border-width: 0 2px 2px 0;
|
||||
border-radius: 0;
|
||||
display: inline-block;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.daterangepicker .calendar-table .next span {
|
||||
transform: rotate(-45deg);
|
||||
-webkit-transform: rotate(-45deg);
|
||||
}
|
||||
|
||||
.daterangepicker .calendar-table .prev span {
|
||||
transform: rotate(135deg);
|
||||
-webkit-transform: rotate(135deg);
|
||||
}
|
||||
|
||||
.daterangepicker .calendar-table th, .daterangepicker .calendar-table td {
|
||||
white-space: nowrap;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
min-width: 32px;
|
||||
width: 32px;
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
font-size: 12px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid transparent;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.daterangepicker .calendar-table {
|
||||
border: 1px solid #fff;
|
||||
border-radius: 4px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.daterangepicker .calendar-table table {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
border-spacing: 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.daterangepicker td.available:hover, .daterangepicker th.available:hover {
|
||||
background-color: #eee;
|
||||
border-color: transparent;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.daterangepicker td.week, .daterangepicker th.week {
|
||||
font-size: 80%;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.daterangepicker td.off, .daterangepicker td.off.in-range, .daterangepicker td.off.start-date, .daterangepicker td.off.end-date {
|
||||
background-color: #fff;
|
||||
border-color: transparent;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.daterangepicker td.in-range {
|
||||
background-color: #ebf4f8;
|
||||
border-color: transparent;
|
||||
color: #000;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.daterangepicker td.start-date {
|
||||
border-radius: 4px 0 0 4px;
|
||||
}
|
||||
|
||||
.daterangepicker td.end-date {
|
||||
border-radius: 0 4px 4px 0;
|
||||
}
|
||||
|
||||
.daterangepicker td.start-date.end-date {
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.daterangepicker td.active, .daterangepicker td.active:hover {
|
||||
background-color: #357ebd;
|
||||
border-color: transparent;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.daterangepicker th.month {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.daterangepicker td.disabled, .daterangepicker option.disabled {
|
||||
color: #999;
|
||||
cursor: not-allowed;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.daterangepicker select.monthselect, .daterangepicker select.yearselect {
|
||||
font-size: 12px;
|
||||
padding: 1px;
|
||||
height: auto;
|
||||
margin: 0;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.daterangepicker select.monthselect {
|
||||
margin-right: 2%;
|
||||
width: 56%;
|
||||
}
|
||||
|
||||
.daterangepicker select.yearselect {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
.daterangepicker select.hourselect, .daterangepicker select.minuteselect, .daterangepicker select.secondselect, .daterangepicker select.ampmselect {
|
||||
width: 50px;
|
||||
margin: 0 auto;
|
||||
background: #eee;
|
||||
border: 1px solid #eee;
|
||||
padding: 2px;
|
||||
outline: 0;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.daterangepicker .calendar-time {
|
||||
text-align: center;
|
||||
margin: 4px auto 0 auto;
|
||||
line-height: 30px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.daterangepicker .calendar-time select.disabled {
|
||||
color: #ccc;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.daterangepicker .drp-buttons {
|
||||
clear: both;
|
||||
text-align: right;
|
||||
padding: 8px;
|
||||
border-top: 1px solid #ddd;
|
||||
display: none;
|
||||
line-height: 12px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.daterangepicker .drp-selected {
|
||||
display: inline-block;
|
||||
font-size: 12px;
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
.daterangepicker .drp-buttons .btn {
|
||||
margin-left: 8px;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
padding: 4px 8px;
|
||||
}
|
||||
|
||||
.daterangepicker.show-ranges .drp-calendar.left {
|
||||
border-left: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.daterangepicker .ranges {
|
||||
float: none;
|
||||
text-align: left;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.daterangepicker.show-calendar .ranges {
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.daterangepicker .ranges ul {
|
||||
list-style: none;
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.daterangepicker .ranges li {
|
||||
font-size: 12px;
|
||||
padding: 8px 12px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.daterangepicker .ranges li:hover {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
.daterangepicker .ranges li.active {
|
||||
background-color: #08c;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* Larger Screen Styling */
|
||||
@media (min-width: 564px) {
|
||||
.daterangepicker {
|
||||
width: auto; }
|
||||
.daterangepicker .ranges ul {
|
||||
width: 140px; }
|
||||
.daterangepicker.single .ranges ul {
|
||||
width: 100%; }
|
||||
.daterangepicker.single .drp-calendar.left {
|
||||
clear: none; }
|
||||
.daterangepicker.single.ltr .ranges, .daterangepicker.single.ltr .drp-calendar {
|
||||
float: left; }
|
||||
.daterangepicker.single.rtl .ranges, .daterangepicker.single.rtl .drp-calendar {
|
||||
float: right; }
|
||||
.daterangepicker.ltr {
|
||||
direction: ltr;
|
||||
text-align: left; }
|
||||
.daterangepicker.ltr .drp-calendar.left {
|
||||
clear: left;
|
||||
margin-right: 0; }
|
||||
.daterangepicker.ltr .drp-calendar.left .calendar-table {
|
||||
border-right: none;
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0; }
|
||||
.daterangepicker.ltr .drp-calendar.right {
|
||||
margin-left: 0; }
|
||||
.daterangepicker.ltr .drp-calendar.right .calendar-table {
|
||||
border-left: none;
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0; }
|
||||
.daterangepicker.ltr .drp-calendar.left .calendar-table {
|
||||
padding-right: 8px; }
|
||||
.daterangepicker.ltr .ranges, .daterangepicker.ltr .drp-calendar {
|
||||
float: left; }
|
||||
.daterangepicker.rtl {
|
||||
direction: rtl;
|
||||
text-align: right; }
|
||||
.daterangepicker.rtl .drp-calendar.left {
|
||||
clear: right;
|
||||
margin-left: 0; }
|
||||
.daterangepicker.rtl .drp-calendar.left .calendar-table {
|
||||
border-left: none;
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0; }
|
||||
.daterangepicker.rtl .drp-calendar.right {
|
||||
margin-right: 0; }
|
||||
.daterangepicker.rtl .drp-calendar.right .calendar-table {
|
||||
border-right: none;
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0; }
|
||||
.daterangepicker.rtl .drp-calendar.left .calendar-table {
|
||||
padding-left: 12px; }
|
||||
.daterangepicker.rtl .ranges, .daterangepicker.rtl .drp-calendar {
|
||||
text-align: right;
|
||||
float: right; } }
|
||||
@media (min-width: 730px) {
|
||||
.daterangepicker .ranges {
|
||||
width: auto; }
|
||||
.daterangepicker.ltr .ranges {
|
||||
float: left; }
|
||||
.daterangepicker.rtl .ranges {
|
||||
float: right; }
|
||||
.daterangepicker .drp-calendar.left {
|
||||
clear: none !important; } }
|
||||
@@ -0,0 +1 @@
|
||||
.gu-mirror{position:fixed!important;margin:0!important;z-index:9999!important;opacity:.8;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";filter:alpha(opacity=80)}.gu-hide{display:none!important}.gu-unselectable{-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important}.gu-transit{opacity:.2;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=20)";filter:alpha(opacity=20)}
|
||||
@@ -0,0 +1,801 @@
|
||||
/** *************Init JS*********************
|
||||
|
||||
TABLE OF CONTENTS
|
||||
---------------------------
|
||||
1.Ready function
|
||||
2.Load function
|
||||
3.Full height function
|
||||
4.pangong function
|
||||
5.Chat App function
|
||||
6.Resize function
|
||||
** ***************************************/
|
||||
|
||||
"use strict";
|
||||
/*****Ready function start*****/
|
||||
$(document).ready(function () {
|
||||
pangong();
|
||||
/*Disabled*/
|
||||
$(document).on("click", "a.disabled,a:disabled", function (e) {
|
||||
return false;
|
||||
});
|
||||
});
|
||||
/*****Ready function end*****/
|
||||
|
||||
/*****Load function start*****/
|
||||
$(window).on("load", function () {
|
||||
$(".preloader-it").delay(500).fadeOut("slow");
|
||||
});
|
||||
/*****Load function* end*****/
|
||||
|
||||
/*Variables*/
|
||||
var height, width,
|
||||
$wrapper = $(".biz-wrapper"),
|
||||
$nav = $(".biz-nav"),
|
||||
$vertnaltNav = $(".biz-wrapper.biz-vertical-nav,.biz-wrapper.biz-alt-nav"),
|
||||
$horizontalNav = $(".biz-wrapper.biz-horizontal-nav"),
|
||||
$navbar = $(".biz-navbar");
|
||||
|
||||
/***** pangong function start *****/
|
||||
var pangong = function () {
|
||||
|
||||
/*Form Animation Icon*/
|
||||
$('.custom-form-animation .form-control').focus(function () {
|
||||
$(this).parents('.custom-form-animation').addClass('focused');
|
||||
});
|
||||
$('.custom-form-animation .form-control').attr('autocomplete', 'off');
|
||||
$('.custom-form-animation .form-control').blur(function () {
|
||||
var inputValue = $(this).val();
|
||||
if (inputValue == "")
|
||||
$(this).parents('.custom-form-animation').removeClass('focused');
|
||||
});
|
||||
|
||||
/*Builder aside responsive*/
|
||||
$(document).on('click', '.left-aside-togglable', function (e) {
|
||||
$('.biz-bldr-wrap').toggleClass('bldr__aside__left__toggle');
|
||||
return false;
|
||||
});
|
||||
|
||||
/*Counter Animation*/
|
||||
var counterAnim = $('.counter-anim');
|
||||
if (counterAnim.length > 0) {
|
||||
counterAnim.counterUp({
|
||||
delay: 10,
|
||||
time: 1000
|
||||
});
|
||||
}
|
||||
|
||||
/*Navbar Collapse Animation*/
|
||||
var navbarNavAnchor = '.biz-nav .navbar-nav li a';
|
||||
$(document).on("click", navbarNavAnchor, function (e) {
|
||||
if ($(this).attr('aria-expanded') === "false")
|
||||
$(this).blur();
|
||||
$(this).parent().siblings().find('.collapse').collapse('hide');
|
||||
$(this).parent().find('.collapse').collapse('hide');
|
||||
});
|
||||
|
||||
/*Card Remove*/
|
||||
$(document).on('click', '.card-close', function (e) {
|
||||
$(this).closest('.card').remove();
|
||||
return false;
|
||||
});
|
||||
|
||||
/*Accordion js*/
|
||||
$(document).on('show.bs.collapse', '.accordion .collapse', function (e) {
|
||||
$(this).siblings('.card-header').addClass('activestate');
|
||||
});
|
||||
|
||||
$(document).on('hide.bs.collapse', '.accordion .collapse', function (e) {
|
||||
$(this).siblings('.card-header').removeClass('activestate');
|
||||
});
|
||||
|
||||
/*Navbar Collapse Animation*/
|
||||
var navbarNavAnchor = '.biz-main-menu .navbar-nav li a,.nav-vertical li a';
|
||||
$(document).on("click", navbarNavAnchor, function (e) {
|
||||
if ($(this).attr('aria-expanded') === "false")
|
||||
$(this).blur();
|
||||
$(this).parent().parent().siblings().find('.collapse').collapse('hide');
|
||||
$(this).parent().siblings().find('.collapse').collapse('hide');
|
||||
$(this).parent().find('.collapse').collapse('hide');
|
||||
});
|
||||
|
||||
/*Icon Style Navbar*/
|
||||
$(document).on('click', '.biz__icon__menu .biz-main-menu .menu-content-wrap .nav-link', function (e) {
|
||||
$(this).parent().parent().find('.sunbnav-active').removeClass('sunbnav-active');
|
||||
$(this).parent().addClass('sunbnav-active');
|
||||
$wrapper.addClass('biz__submenu');
|
||||
var id = $(this).attr('data-target');
|
||||
$(".biz-submenu .subnav-list").removeClass('d-flex');
|
||||
$(".biz-submenu").find(id).addClass('d-flex');
|
||||
});
|
||||
$(document).on('click', '#pane_toggle_btn', function (e) {
|
||||
$wrapper.toggleClass('biz__submenu');
|
||||
$(window).trigger("resize");
|
||||
return;
|
||||
});
|
||||
$(document).on('click', '#close_pane', function (e) {
|
||||
$('.biz__icon__menu .biz-main-menu .navbar-nav').find('.sunbnav-active').removeClass('sunbnav-active');
|
||||
$wrapper.removeClass('biz__submenu');
|
||||
});
|
||||
var navbarNavAnchor = '.biz-submenu .navbar-nav li a';
|
||||
$(document).on("click", navbarNavAnchor, function (e) {
|
||||
if ($(this).attr('aria-expanded') === "false")
|
||||
$(this).blur();
|
||||
$(this).parent().siblings().find('.collapse').collapse('hide');
|
||||
$(this).parent().find('.collapse').collapse('hide');
|
||||
});
|
||||
$(document).on('click', '.btn-search-toggle', function (e) {
|
||||
$(this).closest('.nav-header').find('.collapse').collapse('toggle');
|
||||
return false;
|
||||
});
|
||||
$(document).on("input", ".nav-search input", function (e) {
|
||||
if (!$(this).val().length == 0) {
|
||||
$(this).closest('.input-group').find('.feather-icon.clear-search').show();
|
||||
$(this).closest('.input-group').find('.feather-icon.icon-search').hide();
|
||||
} else {
|
||||
$(this).closest('.input-group').find('.feather-icon.clear-search').hide();
|
||||
$(this).closest('.input-group').find('.feather-icon.icon-search').show();
|
||||
}
|
||||
return false;
|
||||
});
|
||||
$(document).on('click', '.nav-search .feather-icon.clear-search', function (e) {
|
||||
$(this).closest('.nav-header').find('input').val("");
|
||||
$(this).closest('.input-group').find('.feather-icon.icon-search').show();
|
||||
$(this).hide();
|
||||
return false;
|
||||
});
|
||||
$(document).on('click', '.nav-search .feather-icon.close-search', function (e) {
|
||||
$(this).closest('.header-wth-search').find('.nav-search').fadeOut();
|
||||
$(this).closest('.header-wth-search').find('.nav-header-text').css({ "opacity": "1", "pointer-events": "auto" });
|
||||
|
||||
return false;
|
||||
});
|
||||
$(document).on('click', '.header-wth-search .btn-search-toggle', function (e) {
|
||||
$(this).closest('.nav-header').find('input').val("");
|
||||
$(this).closest('.nav-header').find('.feather-icon.clear-search').hide();
|
||||
$(this).closest('.header-wth-search').find('.feather-icon.icon-search').show();
|
||||
$(this).closest('.header-wth-search').find('.nav-header-text').css({ "opacity": "0", "pointer-events": "none" });
|
||||
$(this).closest('.header-wth-search').find('.nav-search').fadeIn();
|
||||
$(this).closest('.header-wth-search').find('.nav-search input').focus();
|
||||
});
|
||||
/*Drawer Js*/
|
||||
$(document).on('click', '.drawer-toggle-link', function (e) {
|
||||
/* New Code */
|
||||
$('.biz-wrapper2').addClass('biz-drawer-push biz-drawer-pushright');
|
||||
/* New Code */
|
||||
|
||||
var targetDrawer = $(this).attr('data-target');
|
||||
$(this).addClass('active');
|
||||
$('.hk-drawer').css({ "box-shadow": "none" });
|
||||
$('.biz-drawer').removeClass('biz-drawer-toggle');
|
||||
$wrapper.remove('.biz-drawer-backdrop');
|
||||
$wrapper.removeClass(function (index, className) {
|
||||
return (className.match(/biz-drawer-\S+/g) || []).join(' ');
|
||||
});
|
||||
|
||||
if ($(this).attr('data-drawer') == "push-normal") {
|
||||
if ($(targetDrawer).hasClass('drawer-left'))
|
||||
$wrapper.addClass('biz-drawer-push biz-drawer-pushleft');
|
||||
else
|
||||
$wrapper.addClass('biz-drawer-push biz-drawer-pushright');
|
||||
|
||||
}
|
||||
else if ($(this).attr('data-drawer') == "push-wth-nav") {
|
||||
if ($(targetDrawer).hasClass('drawer-left'))
|
||||
$wrapper.addClass('biz-drawer-push biz-drawer-wth-nav-push biz-drawer-pushleft');
|
||||
else
|
||||
$wrapper.addClass('biz-drawer-push biz-drawer-wth-nav-push biz-drawer-pushright');
|
||||
}
|
||||
|
||||
else if ($(this).attr('data-drawer') == "overlay") {
|
||||
$(targetDrawer).css({ "border": "none", "box-shadow": "0 8px 32px rgba(0, 0, 0, 0.1)" });
|
||||
if ($(this).attr('data-backdrop') == "")
|
||||
$wrapper.append('<div class="biz-drawer-backdrop"></div>');
|
||||
}
|
||||
$(targetDrawer).addClass('biz-drawer-toggle');
|
||||
$('#biz-wrapper').addClass('biz-drawer-pushright');
|
||||
$("#drawer_push").addClass("biz-drawer-toggle")
|
||||
|
||||
return false;
|
||||
});
|
||||
$(document).on('click', '.biz-drawer-backdrop', function (e) {
|
||||
$(this).remove();
|
||||
$('.hk-drawer').css({ "box-shadow": "none" });
|
||||
$('.biz-drawer').removeClass('biz-drawer-toggle');
|
||||
$wrapper.removeClass(function (index, className) {
|
||||
return (className.match(/biz-drawer-\S+/g) || []).join(' ');
|
||||
});
|
||||
return false;
|
||||
});
|
||||
$(document).on('click', '.drawer-close', function (e) {
|
||||
/* New Code */
|
||||
$('.biz-wrapper2').removeClass('biz-drawer-push biz-drawer-pushright');
|
||||
/* New Code */
|
||||
|
||||
$(this).closest('.biz-drawer').css({ "box-shadow": "none" });
|
||||
$('.bldr-body').removeClass('biz-body-margin-right');
|
||||
$('.biz-drawer-backdrop').remove();
|
||||
$(this).closest('.biz-drawer').removeClass('biz-drawer-toggle');
|
||||
$wrapper.removeClass(function (index, className) {
|
||||
return (className.match(/biz-drawer-\S+/g) || []).join(' ');
|
||||
});
|
||||
return false;
|
||||
});
|
||||
$(document).on('click', '.drawer-close', function (e) {
|
||||
var id = $(this).closest('.biz-drawer').attr('id');
|
||||
$('[data-target="#' + id + '"]').removeClass('active');
|
||||
$('#biz-wrapper').removeClass('biz-drawer-pushright');
|
||||
return false;
|
||||
});
|
||||
/*Settings panel Toggle*/
|
||||
$(document).on('click', '#settings_toggle_btn', function (e) {
|
||||
$wrapper.toggleClass('biz-settings-toggle');
|
||||
return false;
|
||||
});
|
||||
$(document).on('click', '#settings_panel_close', function (e) {
|
||||
$wrapper.removeClass('biz-settings-toggle');
|
||||
return false;
|
||||
});
|
||||
$(document).on('click', '#nav_light_select', function (e) {
|
||||
$nav.removeClass('biz-menu-dark').addClass('biz-menu-light');
|
||||
return false;
|
||||
});
|
||||
$(document).on('click', '#nav_dark_select', function (e) {
|
||||
$nav.removeClass('biz-menu-light').addClass('biz-menu-dark');
|
||||
return false;
|
||||
});
|
||||
$(document).on('click', '#nav_light_select,#nav_dark_select', function (e) {
|
||||
$('.biz-nav-select').find('.btn').removeClass('btn-outline-primary').addClass('btn-outline-light');
|
||||
$(this).removeClass('btn-outline-light').addClass('btn-outline-primary').blur();
|
||||
return false;
|
||||
});
|
||||
$(document).on('click', '#navtop_light_select,#navtop_dark_select', function (e) {
|
||||
$('.biz-navbar-select').find('.btn').removeClass('btn-outline-primary').addClass('btn-outline-light');
|
||||
$(this).removeClass('btn-outline-light').addClass('btn-outline-primary').blur();
|
||||
return false;
|
||||
});
|
||||
$(document).on('click', '#navtop_light_select', function (e) {
|
||||
$navbar.removeClass('navbar-dark').addClass('navbar-light').find('img.brand-img').attr('src', 'dist/img/logo-light.png');
|
||||
return false;
|
||||
});
|
||||
$(document).on('click', '#navtop_dark_select', function (e) {
|
||||
$navbar.removeClass('navbar-light').addClass('navbar-dark').find('img.brand-img').attr('src', 'dist/img/logo-dark.png');
|
||||
return false;
|
||||
});
|
||||
if ($('.scroll-nav-switch').length > 0) {
|
||||
$('.scroll-nav-switch').toggles({
|
||||
drag: true, // allow dragging the toggle between positions
|
||||
click: true, // allow clicking on the toggle
|
||||
text: {
|
||||
on: '', // text for the ON position
|
||||
off: '' // and off
|
||||
},
|
||||
on: false, // is the toggle ON on init
|
||||
animate: 250, // animation time (ms)
|
||||
easing: 'swing', // animation transition easing function
|
||||
checkbox: null, // the checkbox to toggle (for use in forms)
|
||||
clicker: null, // element that can be clicked on to toggle. removes binding from the toggle itself (use nesting)
|
||||
|
||||
type: 'compact' // if this is set to 'select' then the select style toggle will be used
|
||||
});
|
||||
$('.scroll-nav-switch.toggle').on('toggle', function (e, active) {
|
||||
if (active) {
|
||||
$wrapper.addClass('scrollable-nav');
|
||||
} else {
|
||||
$wrapper.removeClass('scrollable-nav');
|
||||
}
|
||||
});
|
||||
}
|
||||
var navBarChk = ($('.biz-navbar').hasClass('navbar-dark')),
|
||||
navChk = ($('.biz-nav').hasClass('biz-menu-dark'))
|
||||
$(document).on('click', '#reset_settings', function (e) {
|
||||
if (navBarChk)
|
||||
$('#navtop_dark_select').click();
|
||||
else
|
||||
$('#navtop_light_select').click();
|
||||
if (navChk)
|
||||
$('#nav_dark_select').click();
|
||||
else
|
||||
$('#nav_light_select').click();
|
||||
$('.scroll-nav-switch').click();
|
||||
if ($('.scroll-nav-switch').find('.toggle-on').hasClass('active'))
|
||||
$('.scroll-nav-switch').click();
|
||||
return false;
|
||||
});
|
||||
|
||||
/*Search form Collapse*/
|
||||
$(document).on('click', '#navbar_search_btn', function (e) {
|
||||
$('html,body').animate({ scrollTop: 0 }, 'slow');
|
||||
$(".navbar-search input").focus();
|
||||
$wrapper.addClass('navbar-search-toggle');
|
||||
$(window).trigger("resize");
|
||||
});
|
||||
$(document).on('click', '#navbar_search_close', function (e) {
|
||||
$wrapper.removeClass('navbar-search-toggle');
|
||||
$(window).trigger("resize");
|
||||
return false;
|
||||
});
|
||||
|
||||
/*Slimscroll*/
|
||||
if ($('.nicescroll-bar').length > 0) {
|
||||
$('.nicescroll-bar').slimscroll({ height: '100%', color: '#d6d9da', disableFadeOut: true, borderRadius: 0, size: '6px', enableKeyNavigation: true, opacity: .8 });
|
||||
}
|
||||
|
||||
//Report builder slimscroll
|
||||
$(document).on('click', '[data-target="adj_drawer_1"]', function (e) {
|
||||
if ($('.nicescroll-bar').length > 0) {
|
||||
$('.nicescroll-bar').slimscroll({ height: '100%', color: '#d6d9da', disableFadeOut: true, borderRadius: 0, size: '6px', enableKeyNavigation: true, opacity: .8 });
|
||||
}
|
||||
});
|
||||
|
||||
/*Slimscroll Key Control*/
|
||||
$(".slimScrollDiv").hover(function () {
|
||||
$(this).find('[class*="nicescroll-bar"]').focus();
|
||||
}, function () {
|
||||
$(this).find('[class*="nicescroll-bar"]').blur();
|
||||
});
|
||||
|
||||
/*Refresh Init Js*/
|
||||
var refreshMe = '.refresh';
|
||||
$(document).on("click", refreshMe, function (e) {
|
||||
var panelToRefresh = $(this).closest('.card').find('.refresh-container');
|
||||
var dataToRefresh = $(this).closest('.card').find('.panel-wrapper');
|
||||
var loadingAnim = panelToRefresh.find('.la-anim-1');
|
||||
panelToRefresh.show();
|
||||
setTimeout(function () {
|
||||
loadingAnim.addClass('la-animate');
|
||||
}, 100);
|
||||
function started() { } //function before timeout
|
||||
setTimeout(function () {
|
||||
function completed() { } //function after timeout
|
||||
panelToRefresh.fadeOut(800);
|
||||
setTimeout(function () {
|
||||
loadingAnim.removeClass('la-animate');
|
||||
}, 800);
|
||||
}, 1500);
|
||||
return false;
|
||||
});
|
||||
|
||||
/*Fullscreen Init Js*/
|
||||
$(document).on("click", ".full-screen", function (e) {
|
||||
$(this).parents('.card').toggleClass('fullscreen');
|
||||
$(window).trigger("resize");
|
||||
return false;
|
||||
});
|
||||
|
||||
/** Bizgaze **/
|
||||
|
||||
/*Multi select Js*/
|
||||
$(document).on('click', '.multi-sel > li,.multi-sel > div', function (e) {
|
||||
if ($(this).hasClass('selected'))
|
||||
$(this).removeClass('selected');
|
||||
else
|
||||
$(this).addClass('selected');
|
||||
return false;
|
||||
});
|
||||
|
||||
/*Bizgaze ext Js*/
|
||||
$(document).on('click', '.dataset-list-wrap #modalDataListItems .nav-item', function (e) {
|
||||
$(this).closest('.biz-new-report').find('.columns-list-wrap').addClass('active');
|
||||
return false;
|
||||
});
|
||||
$(document).on('click', '.close-columns-list', function (e) {
|
||||
$(this).closest('.columns-list-wrap').removeClass('active');
|
||||
return false;
|
||||
});
|
||||
$(document).on("click", ".save-draft", function (e) {
|
||||
$.notify({
|
||||
icon: 'ri-checkbox-line font-21 mr-10',
|
||||
message: "Report Saved in Draft",
|
||||
}, {
|
||||
type: "dismissible alert alert-inv alert-inv-primary",
|
||||
placement: {
|
||||
from: "top",
|
||||
align: "right"
|
||||
},
|
||||
animate: {
|
||||
enter: 'animated fadeInUp',
|
||||
exit: 'animated fadeOutUp'
|
||||
},
|
||||
delay: 500000,
|
||||
});
|
||||
});
|
||||
|
||||
/*Add Sub Report*/
|
||||
$(document).on('click', '.add-sub-report', function (e) {
|
||||
$(this).closest('.modal-content').find('.modal-body').append('<div class="sub-report-block card"><header class="sub-report-head"><h6 class="required">Sub report</h6><i class="las la-braille dragger"></i></header><div class="report-body"><div class="form-group"><select class="form-control custom-select mb-10"><option selected>- Choose -</option><option value="1">Two</option><option value="2">Three</option></select><div class="repeater"><div data-repeater-list="category-group"><div class="form-row"><div class="col"><select class="form-control custom-select mb-10"><option selected>Main report column</option><option value="1">Two</option><option value="2">Three</option></select></div><div class="col-auto"><select class="form-control custom-select mb-10"><option value="1" selected>=</option><option value="2">Three</option></select></div><div class="col"><select class="form-control custom-select mb-10"><option selected>Sub report column</option><option value="1">Two</option><option value="2">Three</option></select></div><div class="col-auto"><button class="btn btn-icon btn-theme" data-repeater-create><span class="btn-icon-wrap"><span class="feather-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-plus"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg></span></span></button></div></div><div data-repeater-item class="form-row"><div class="col"><input type="text" class="form-control mb-2" value="Main report column=Sub report column"></div><div class="col-auto"><a href="#" data-repeater-delete class="btn btn-icon btn-flush-danger flush-soft-hover btn-rounded"><span class="btn-icon-wrap"><span class="feather-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-trash-2"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path><line x1="10" y1="11" x2="10" y2="17"></line><line x1="14" y1="11" x2="14" y2="17"></line></svg></span></span></a></div></div></div></div></div></div></div>');
|
||||
return false;
|
||||
});
|
||||
|
||||
//Delete Subreport
|
||||
$(document).on('click', '.delete-report', function (e) {
|
||||
$(this).closest('.sub-report-block').remove();
|
||||
})
|
||||
|
||||
/*Adjsent Drawer*/
|
||||
$(document).on('click', '.biz-adj-drawer-wrap > .adj-drawer-open', function (e) {
|
||||
$(this).closest('.biz-adj-drawer-wrap').find('.biz-adj-drawer').hide();
|
||||
var id = $(this).attr('data-target');
|
||||
var leftOffset = $('.bldr-aside-left').width(); var clickevent = $('.adj-drawer-open').attr('data-clickevent')
|
||||
$(this).closest('.biz-adj-drawer-wrap').find('#' + id).css({ 'left': leftOffset }).show();
|
||||
});
|
||||
|
||||
$(document).on('click', '.biz-adj-drawer-wrap > .adj-drawer-open-parameters', function (e) {
|
||||
$(this).closest('.biz-adj-drawer-wrap').find('.biz-adj-drawer').hide();
|
||||
var id = $(this).attr('data-target');
|
||||
$('.drawer-header > .drawer-close.close').addClass('hidden');
|
||||
$(this).closest('.biz-adj-drawer-wrap').find('#' + id).css({ 'left': '0%', 'right': '0%', }).show();
|
||||
});
|
||||
|
||||
$(document).on('click', '.btn-adj-drawer-close', function (e) {
|
||||
$('.drawer-header > .drawer-close.close').removeClass('hidden');
|
||||
$(this).closest('.biz-adj-drawer').hide();
|
||||
});
|
||||
|
||||
/*Adjsent Mini Drawer*/
|
||||
$(document).on('click', '.biz-mini-adj-drawer-wrap > .adj-drawer-open', function (e) {
|
||||
$(this).closest('.biz-mini-adj-drawer-wrap').find('.biz-mini-adj-drawer').hide();
|
||||
var id = $(this).attr('data-target');
|
||||
var topOffset = $(this).offset().top;
|
||||
var leftOffset = $('.bldr-aside-left').width();
|
||||
var elementHeight = $(this).closest('.biz-mini-adj-drawer-wrap').find('#' + id).height();
|
||||
if (topOffset + elementHeight > height)
|
||||
$(this).closest('.biz-mini-adj-drawer-wrap').find('#' + id).css({ 'top': 'auto', 'bottom': 0, 'left': leftOffset }).show();
|
||||
else
|
||||
$(this).closest('.biz-mini-adj-drawer-wrap').find('#' + id).css({ 'top': topOffset, 'bottom': 'auto', 'left': leftOffset }).show();
|
||||
});
|
||||
|
||||
$(document).on('click', '.btn-mini-drawer-close', function (e) {
|
||||
$(this).closest('.biz-mini-adj-drawer').hide();
|
||||
});
|
||||
|
||||
$(document).on('click', '.dsl-block-wrap .dsl-block .dsl-block-close', function (e) {
|
||||
$(this).closest('.dsl-block').remove();
|
||||
});
|
||||
|
||||
/*Dragula*/
|
||||
dragula([document.getElementById("sub_report")], {
|
||||
moves: function (el, container, handle) {
|
||||
return handle.classList.contains('sub-report-head');
|
||||
}
|
||||
});
|
||||
dragula([document.getElementById("tab_front")], {
|
||||
moves: function (el, container, handle) {
|
||||
return handle.classList.contains('sec-block-head');
|
||||
}
|
||||
});
|
||||
dragula([document.getElementById("sfl_1")], {
|
||||
moves: function (el, container, handle) {
|
||||
return handle.classList.contains('dragger');
|
||||
}
|
||||
});
|
||||
dragula([document.getElementById("sfl_2")], {
|
||||
moves: function (el, container, handle) {
|
||||
return handle.classList.contains('dragger');
|
||||
}
|
||||
});
|
||||
dragula([document.getElementById("sfl_3")], {
|
||||
moves: function (el, container, handle) {
|
||||
return handle.classList.contains('dragger');
|
||||
}
|
||||
});
|
||||
dragula([document.getElementById("sfl_4")], {
|
||||
moves: function (el, container, handle) {
|
||||
return handle.classList.contains('dragger');
|
||||
}
|
||||
});
|
||||
dragula([document.getElementById("sfl_5")], {
|
||||
moves: function (el, container, handle) {
|
||||
return handle.classList.contains('dragger');
|
||||
}
|
||||
});
|
||||
dragula([document.getElementById("sfl_6")], {
|
||||
moves: function (el, container, handle) {
|
||||
return handle.classList.contains('dragger');
|
||||
}
|
||||
});
|
||||
dragula([document.getElementById("sfl_7")], {
|
||||
moves: function (el, container, handle) {
|
||||
return handle.classList.contains('dragger');
|
||||
}
|
||||
});
|
||||
dragula([document.getElementById("sfl_8")], {
|
||||
moves: function (el, container, handle) {
|
||||
return handle.classList.contains('dragger');
|
||||
}
|
||||
});
|
||||
dragula([document.getElementById("sfl_9")], {
|
||||
moves: function (el, container, handle) {
|
||||
return handle.classList.contains('dragger');
|
||||
}
|
||||
});
|
||||
|
||||
// Report Dragula
|
||||
$(document).on('click', '#headerLinkReportIcon', function (e) {
|
||||
dragula([document.getElementById("linkreport_modal")], {
|
||||
moves: function (el, container, handle) {
|
||||
return handle.classList.contains('sub-report-head');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
dragula([document.getElementById("tab_front")], {
|
||||
moves: function (el, container, handle) {
|
||||
return handle.classList.contains('sec-block-head');
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '#groupby_selected_columns', function (e) {
|
||||
dragula([document.getElementById("groupby_selected_columns")], {
|
||||
moves: function (el, container, handle) {
|
||||
return handle.classList.contains('dragger');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '#categories_selected_columns', function (e) {
|
||||
dragula([document.getElementById("categories_selected_columns")], {
|
||||
moves: function (el, container, handle) {
|
||||
return handle.classList.contains('dragger');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '#xaxis_selected_columns', function (e) {
|
||||
dragula([document.getElementById("xaxis_selected_columns")], {
|
||||
moves: function (el, container, handle) {
|
||||
return handle.classList.contains('dragger');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '#yaxis_selected_columns', function (e) {
|
||||
dragula([document.getElementById("yaxis_selected_columns")], {
|
||||
moves: function (el, container, handle) {
|
||||
return handle.classList.contains('dragger');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '#selectedColumns', function (e) {
|
||||
dragula([document.getElementById("selectedColumns")], {
|
||||
moves: function (el, container, handle) {
|
||||
return handle.classList.contains('dragger');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', '#tooltip_selected_columns', function (e) {
|
||||
dragula([document.getElementById("tooltip_selected_columns")], {
|
||||
moves: function (el, container, handle) {
|
||||
return handle.classList.contains('dragger');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/*Color Filter*/
|
||||
$(document).on("click", '.color-board .color-block', function (e) {
|
||||
$(this).closest('.color-board').find('.color-block').removeClass('selected');
|
||||
$(this).addClass('selected');
|
||||
return false;
|
||||
});
|
||||
|
||||
/*Query Builder*/
|
||||
$(document).on("click", '.qry-builder-open', function (e) {
|
||||
$('.qry-builder-container').show();
|
||||
return false;
|
||||
});
|
||||
$(document).on("click", '.qry-builder-container header .close', function (e) {
|
||||
$('.qry-builder-container').hide();
|
||||
return false;
|
||||
});
|
||||
|
||||
/*Builder aside responsive*/
|
||||
$(document).on('click', '.right-aside-togglable', function (e) {
|
||||
$('.biz-bldr-wrap').toggleClass('bldr__aside__right__toggle');
|
||||
$('.biz-wrapper').toggleClass('bldr__aside__right__toggle');
|
||||
$('.biz-wrapper .bldr-aside-right').toggleClass("biz-aside-margin-right");
|
||||
$(".bldr-body").toggleClass("biz-body-margin-right");
|
||||
return false;
|
||||
});
|
||||
|
||||
/*Content editable*/
|
||||
$(document).on("click", '.inline-edit .inline-edit-btn', function (e) {
|
||||
$(this).closest('.inline-edit').find('.edit').attr("contenteditable", "true").focus();
|
||||
$(this).closest('.inline-edit').find('.edit').css("outline", "none");
|
||||
});
|
||||
$(document).on("focusout", ".inline-edit .edit", function (e) {
|
||||
$(this).attr("contenteditable", "false");
|
||||
});
|
||||
|
||||
// Report Content Editable
|
||||
$(document).on("click", '#tooltip_selected_columns .inline-edit .inline-edit-btn', function (e) {
|
||||
$(this).closest('.inline-edit').find('.edit').removeAttr('disabled')
|
||||
$(this).closest('.inline-edit').find('.edit').addClass('input-styles');
|
||||
$(this).closest('.inline-edit').find('.reset-text').removeClass('hidden');
|
||||
});
|
||||
|
||||
$(document).on("click", '#tooltip_selected_columns .inline-edit .reset-text', function (e) {
|
||||
$(this).closest('.inline-edit').find('.edit').attr('disabled', true);
|
||||
$(this).closest('.inline-edit').find('.edit').removeClass('input-styles');
|
||||
$(this).addClass('hidden');
|
||||
});
|
||||
|
||||
|
||||
/*Sub-Dropdown*/
|
||||
$('.dropdown-menu > .inner-dropdown-menu.dropdown > a').addClass('dropdown-toggle');
|
||||
$('.dropdown-menu a.dropdown-toggle').on('click', function (e) {
|
||||
if (!$(this).next().hasClass('show')) {
|
||||
$(this).parents('.dropdown-menu').first().find('.show').removeClass("show");
|
||||
}
|
||||
var $subMenu = $(this).next(".dropdown-menu");
|
||||
$subMenu.toggleClass('show');
|
||||
$(this).parents('li.nav-item.dropdown.show').on('hidden.bs.dropdown', function (e) {
|
||||
$('.dropdown-menu > .dropdown .show').removeClass("show");
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
/*Coupon Modal*/
|
||||
$(document).on("click", '.coupon-modal-open', function (e) {
|
||||
var idTarget = $(this).attr('data-target');
|
||||
$('.timeline-wrap').addClass('d-none');
|
||||
$(idTarget).addClass('d-block');
|
||||
return false;
|
||||
});
|
||||
$(document).on("click", '.coupon-modal-close', function (e) {
|
||||
$('.timeline-wrap').removeClass('d-none');
|
||||
$(this).closest('.coupon-modal').removeClass('d-block');
|
||||
return false;
|
||||
});
|
||||
};
|
||||
/***** pangong function end *****/
|
||||
|
||||
/***** Full height function start *****/
|
||||
var setHeightWidth = function () {
|
||||
height = window.innerHeight;
|
||||
width = window.innerWidth;
|
||||
/*Icon Nav Height for differnt brekpoints with Horizontal menu*/
|
||||
if (width > 1200) {
|
||||
if ($('.biz__icon__menu').hasClass('biz__nav__toggle'))
|
||||
$('.biz__icon__menu').removeClass('biz__nav__toggle');
|
||||
} else
|
||||
$('.biz__icon__menu').addClass('biz__submenu');
|
||||
|
||||
//Right Tab Responsiveness below 1200 width
|
||||
$(function () {
|
||||
if ($(window).width() < 1200) {
|
||||
$('.biz-wrapper2 .drawer-close').trigger('click');
|
||||
}
|
||||
})
|
||||
|
||||
/*Drawer Responsive JS*/
|
||||
if (width < 1200) {
|
||||
$wrapper.removeClass(function (index, className) {
|
||||
return (className.match(/biz-drawer-\S+/g) || []).join(' ');
|
||||
});
|
||||
$('.biz-drawer').removeClass('biz-drawer-toggle');
|
||||
$('.drawer-toggle-link').removeClass('active');
|
||||
|
||||
} else {
|
||||
$("#form-builder-container .right-toggle-link").trigger('click');
|
||||
}
|
||||
};
|
||||
/***** Full height function end *****/
|
||||
|
||||
/***** Resize function start *****/
|
||||
$(window).on("resize", function () {
|
||||
setHeightWidth();
|
||||
});
|
||||
$(window).trigger("resize");
|
||||
/***** Resize function end *****/
|
||||
|
||||
|
||||
/***** New Form Data *****/
|
||||
|
||||
$(document).on('click', '.dsl-sec-block-wrap .dsl-block', function (e) {
|
||||
var hash = this.hash;
|
||||
if ($(this).hasClass('focused-block')) {
|
||||
$(this).removeClass('focused-block');
|
||||
$(hash).removeClass('focused');
|
||||
}
|
||||
else {
|
||||
$('.dsl-sec-block-wrap .dsl-block').removeClass('focused-block');
|
||||
$(this).addClass('focused-block');
|
||||
$('.form-sec-wrap').removeClass('focused');
|
||||
$(hash).addClass('focused');
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.dsl-doc-type-wrap .dsl-block.selected', function (e) {
|
||||
var target = $(this).attr("data-target");
|
||||
console.log(target);
|
||||
if ($(this).hasClass('focused-block')) {
|
||||
$(this).removeClass('focused-block');
|
||||
$(target).removeClass('focused');
|
||||
}
|
||||
else {
|
||||
$('.dsl-doc-type-wrap .dsl-block.selected').removeClass('focused-block');
|
||||
$(this).addClass('focused-block');
|
||||
//$('.form-sec-block .form-group').removeClass('focused');
|
||||
$('.PropertyText').removeClass('focused');
|
||||
$(target).addClass('focused');
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
$(document).on('click', '.doc-type-close', function (e) {
|
||||
$(this).closest('.form-group').parent().remove();
|
||||
return false;
|
||||
});
|
||||
$(document).on('click', '.default-doc-type', function (e) {
|
||||
$('.already-created-doc').removeClass('default-doc');
|
||||
$(this).closest('.already-created-doc').addClass('default-doc');
|
||||
});
|
||||
var idCount = 0;
|
||||
$('.dsl-doc-type-wrap .dsl-block').each(function () {
|
||||
$(this).attr('id', 'doc_type_block_' + idCount);
|
||||
idCount++;
|
||||
});
|
||||
function hasClass(element, cls) {
|
||||
return (' ' + element.className + ' ').indexOf(' ' + cls + ' ') > -1;
|
||||
}
|
||||
|
||||
|
||||
dragula([document.getElementById("drag_elements"), document.getElementById("drop_elements"), document.getElementById("drop_elements_2"), document.getElementById("drop_elements_3"), document.getElementById("drop_elements_4"), document.getElementById("drop_elements_5")], {
|
||||
copy: function (el, source) {
|
||||
return source === document.getElementById("drag_elements")
|
||||
},
|
||||
accepts: function (el, target) {
|
||||
return target !== document.getElementById("drag_elements")
|
||||
},
|
||||
moves: function (el, container, handle) {
|
||||
return handle.classList.contains('dragger')
|
||||
}
|
||||
}).on('drop', function (el, target) {
|
||||
if (hasClass(el, 'dsl-block'))
|
||||
$('#' + el.id).addClass('selected');
|
||||
if ($('.form-sec-block .dsl-block').length > 0) {
|
||||
$('#' + target.id).append('<div class="col-lg-4"><div class="form-group form-name"><div><div class="form-label-group"> <label> <span class="required"> ' + $('.form-sec-block .row').find('.dsl-block-name').text() + ' </span> </label><div class="form-group-action"> <a class="btn btn-xs btn-icon btn-flush-dark btn-rounded flush-soft-hover" href="#"><span class="btn-icon-wrap"><span class="feather-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-edit"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path></svg></span></span></a> <a class="btn btn-xs btn-icon btn-flush-dark btn-rounded flush-soft-hover doc-type-close" href="#"><span class="btn-icon-wrap"><span class="feather-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x-circle"><circle cx="12" cy="12" r="10"></circle><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg></span></span></a></div></div> <input type="text" class="form-control"></div></div></div>');
|
||||
}
|
||||
$('.form-sec-block .row').find('.dsl-block').remove();
|
||||
});
|
||||
dragula([document.getElementById("drag_elements_2"), document.getElementById("drop_elements"), document.getElementById("drop_elements_2"), document.getElementById("drop_elements_3"), document.getElementById("drop_elements_4"), document.getElementById("drop_elements_5")], {
|
||||
copy: function (el, source) {
|
||||
return source === document.getElementById("drag_elements_2")
|
||||
},
|
||||
accepts: function (el, target) {
|
||||
return target !== document.getElementById("drag_elements_2")
|
||||
},
|
||||
moves: function (el, container, handle) {
|
||||
return handle.classList.contains('dragger')
|
||||
}
|
||||
}).on('drop', function (el, target) {
|
||||
if (hasClass(el, 'dsl-block'))
|
||||
$('#' + el.id).addClass('selected');
|
||||
if ($('.form-sec-block .dsl-block').length > 0) {
|
||||
$('#' + target.id).append('<div class="col-lg-4"><div class="form-group form-name"><div><div class="form-label-group"> <label> <span class="required"> ' + $('.form-sec-block .row').find('.dsl-block-name').text() + ' </span> </label><div class="form-group-action"> <a class="btn btn-xs btn-icon btn-flush-dark btn-rounded flush-soft-hover" href="#"><span class="btn-icon-wrap"><span class="feather-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-edit"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path></svg></span></span></a> <a class="btn btn-xs btn-icon btn-flush-dark btn-rounded flush-soft-hover doc-type-close" href="#"><span class="btn-icon-wrap"><span class="feather-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x-circle"><circle cx="12" cy="12" r="10"></circle><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg></span></span></a></div></div> <input type="text" class="form-control"></div></div></div>');
|
||||
}
|
||||
$('.form-sec-block .row').find('.dsl-block').remove();
|
||||
});
|
||||
dragula([document.getElementById("drag_elements_3"), document.getElementById("drop_elements"), document.getElementById("drop_elements_2"), document.getElementById("drop_elements_3"), document.getElementById("drop_elements_4"), document.getElementById("drop_elements_5")], {
|
||||
copy: function (el, source) {
|
||||
return source === document.getElementById("drag_elements_3")
|
||||
},
|
||||
accepts: function (el, target) {
|
||||
return target !== document.getElementById("drag_elements_3")
|
||||
},
|
||||
moves: function (el, container, handle) {
|
||||
return handle.classList.contains('dragger')
|
||||
}
|
||||
}).on('drop', function (el, target) {
|
||||
if (hasClass(el, 'dsl-block'))
|
||||
$('#' + el.id).addClass('selected');
|
||||
if ($('.form-sec-block .dsl-block').length > 0) {
|
||||
$('#' + target.id).append('<div class="col-lg-4"><div class="form-group"><div><div class="form-label-group"> <label> <span class="required"> ' + $('.form-sec-block .row').find('.dsl-block-name').text() + ' </span> </label><div class="form-group-action"> <a class="btn btn-xs btn-icon btn-flush-dark btn-rounded flush-soft-hover" href="#"><span class="btn-icon-wrap"><span class="feather-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-edit"><path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"></path><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"></path></svg></span></span></a> <a class="btn btn-xs btn-icon btn-flush-dark btn-rounded flush-soft-hover doc-type-close" href="#"><span class="btn-icon-wrap"><span class="feather-icon"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x-circle"><circle cx="12" cy="12" r="10"></circle><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg></span></span></a></div></div> <input type="text" class="form-control"></div></div></div>');
|
||||
}
|
||||
$('.form-sec-block .row').find('.dsl-block').remove();
|
||||
});
|
||||
dragula([document.getElementById("drop_elements"), document.getElementById("drop_elements_2"), document.getElementById("drop_elements_3"), document.getElementById("drop_elements_4"), document.getElementById("drop_elements_5")]);
|
||||
|
||||
/***** New Form Data *****/
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
var rules_basic = {
|
||||
condition: 'AND',
|
||||
rules: [{
|
||||
id: 'price',
|
||||
operator: 'less',
|
||||
value: 10.25
|
||||
},
|
||||
{
|
||||
condition: 'OR',
|
||||
rules: [{
|
||||
id: 'category',
|
||||
operator: 'equal',
|
||||
value: 2
|
||||
},
|
||||
{
|
||||
id: 'category',
|
||||
operator: 'equal',
|
||||
value: 1
|
||||
}]
|
||||
}]
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
$('#builder').queryBuilder({
|
||||
|
||||
filters: [{
|
||||
id: 'name',
|
||||
label: 'Name',
|
||||
type: 'string'
|
||||
},
|
||||
{
|
||||
id: 'category',
|
||||
label: 'Category',
|
||||
type: 'integer',
|
||||
input: 'select',
|
||||
values: {
|
||||
1: 'Books',
|
||||
2: 'Movies',
|
||||
3: 'Music',
|
||||
4: 'Tools',
|
||||
5: 'Goodies',
|
||||
6: 'Clothes'
|
||||
},
|
||||
|
||||
operators: ['equal', 'not_equal', 'in', 'not_in', 'is_null', 'is_not_null']
|
||||
},
|
||||
{
|
||||
id: 'in_stock',
|
||||
label: 'In stock',
|
||||
type: 'integer',
|
||||
input: 'radio',
|
||||
values: {
|
||||
1: 'Yes',
|
||||
0: 'No'
|
||||
},
|
||||
|
||||
operators: ['equal']
|
||||
},
|
||||
{
|
||||
id: 'price',
|
||||
label: 'Price',
|
||||
type: 'double',
|
||||
validation: {
|
||||
min: 0,
|
||||
step: 0.01
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
id: 'id',
|
||||
label: 'Identifier',
|
||||
type: 'string',
|
||||
placeholder: '____-____-____',
|
||||
operators: ['equal', 'not_equal'],
|
||||
validation: {
|
||||
format: /^.{4}-.{4}-.{4}$/
|
||||
}
|
||||
}],
|
||||
|
||||
|
||||
rules: rules_basic
|
||||
});
|
||||
|
||||
/****************************************************************
|
||||
Triggers and Changers QueryBuilder
|
||||
*****************************************************************/
|
||||
|
||||
$('#btn-get').on('click', function () {
|
||||
var result = $('#builder').queryBuilder('getRules');
|
||||
if (!$.isEmptyObject(result)) {
|
||||
alert(JSON.stringify(result, null, 2));
|
||||
} else {
|
||||
console.log("invalid object :");
|
||||
}
|
||||
console.log(result);
|
||||
});
|
||||
|
||||
$('#btn-reset').on('click', function () {
|
||||
$('#builder').queryBuilder('reset');
|
||||
});
|
||||
|
||||
$('#btn-set').on('click', function () {
|
||||
//$('#builder').queryBuilder('setRules', rules_basic);
|
||||
var result = $('#builder').queryBuilder('getRules');
|
||||
if (!$.isEmptyObject(result)) {
|
||||
rules_basic = result;
|
||||
}
|
||||
});
|
||||
|
||||
//When rules changed :
|
||||
$('#builder').on('getRules.queryBuilder.filter', function (e) {
|
||||
//$log.info(e.value);
|
||||
});
|
||||
//# sourceURL=pen.js
|
||||
@@ -0,0 +1,53 @@
|
||||
$(document).ready(function () {
|
||||
'use strict';
|
||||
$('.repeater').repeater({
|
||||
defaultValues: {
|
||||
},
|
||||
show: function () {
|
||||
$(this).slideDown();
|
||||
},
|
||||
hide: function (deleteElement) {
|
||||
$(this).slideUp(deleteElement);
|
||||
},
|
||||
ready: function (setIndexes) { }
|
||||
});
|
||||
|
||||
$('.repeater-swal').repeater({
|
||||
defaultValues: {
|
||||
},
|
||||
show: function () {
|
||||
$(this).slideDown();
|
||||
},
|
||||
hide: function (deleteElement) {
|
||||
Swal.fire({
|
||||
html:
|
||||
'<div class="mb-10"><i class="ri-delete-bin-6-line font-29 text-danger"></i></div><h5 class="text-danger">Delete Note ?</h5><p>Deleting a note will permanently remove from your library.</p>',
|
||||
customClass: {
|
||||
confirmButton: 'btn btn-outline-secondary text-danger',
|
||||
cancelButton: 'btn btn-outline-secondary text-grey',
|
||||
container: 'swal2-has-bg'
|
||||
},
|
||||
showCancelButton: true,
|
||||
buttonsStyling: false,
|
||||
confirmButtonText: 'YES, DELETE NOTE!',
|
||||
cancelButtonText: 'NO KEEP NOTE!',
|
||||
reverseButtons: true,
|
||||
}).then((result) => {
|
||||
if (result.value) {
|
||||
$(this).slideUp(deleteElement);
|
||||
Swal.fire({
|
||||
html:
|
||||
'<div class="d-flex align-items-center"><i class="ri-delete-bin-5-fill mr-15 font-24 text-danger"></i><h5 class="text-danger mb-0">Your file has been deleted!</h5></div>',
|
||||
customClass: {
|
||||
content: 'pa-0 text-left',
|
||||
confirmButton: 'btn btn-primary',
|
||||
actions: 'justify-content-start',
|
||||
},
|
||||
buttonsStyling: false,
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
ready: function (setIndexes) { }
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,514 @@
|
||||
/*Tabulator Init*/
|
||||
var tabledata = [{
|
||||
id: 1,
|
||||
name: "Oli Bob",
|
||||
progress: 12,
|
||||
gender: "male",
|
||||
rating: 1,
|
||||
col: "red",
|
||||
dob: "19/02/1984",
|
||||
car: 1,
|
||||
lucky_no: 5,
|
||||
activity: [1, 20, 5, 3, 10, 13, 17, 15, 9, 11, 10, 12, 14, 16, 13, 9, 7, 11, 10, 13]
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "Mary May",
|
||||
progress: 1,
|
||||
gender: "female",
|
||||
rating: 2,
|
||||
col: "blue",
|
||||
dob: "14/05/1982",
|
||||
car: true,
|
||||
lucky_no: 10,
|
||||
activity: [10, 12, 14, 16, 13, 9, 7, 11, 10, 13, 1, 2, 5, 4, 1, 16, 4, 2, 1, 3]
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: "Christine Lobowski",
|
||||
progress: 42,
|
||||
gender: "female",
|
||||
rating: 0,
|
||||
col: "green",
|
||||
dob: "22/05/1982",
|
||||
car: "true",
|
||||
lucky_no: 12,
|
||||
activity: [1, 2, 5, 4, 1, 16, 4, 2, 1, 3, 3, 7, 9, 1, 4, 8, 2, 6, 4, 2]
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: "Brendon Philips",
|
||||
progress: 100,
|
||||
gender: "male",
|
||||
rating: 1,
|
||||
col: "orange",
|
||||
dob: "01/08/1980",
|
||||
lucky_no: 18,
|
||||
activity: [3, 7, 9, 1, 4, 8, 2, 6, 4, 2, 1, 3, 1, 3, 3, 1, 1, 3, 1, 3]
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: "Margret Marmajuke",
|
||||
progress: 16,
|
||||
gender: "female",
|
||||
rating: 5,
|
||||
col: "yellow",
|
||||
dob: "31/01/1999",
|
||||
lucky_no: 33,
|
||||
activity: [1, 3, 1, 3, 3, 1, 1, 3, 1, 3, 20, 17, 15, 11, 16, 9, 12, 14, 20, 12]
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
name: "Frank Harbours",
|
||||
progress: 38,
|
||||
gender: "male",
|
||||
rating: 4,
|
||||
col: "red",
|
||||
dob: "12/05/1966",
|
||||
car: 1,
|
||||
lucky_no: 2,
|
||||
activity: [20, 17, 15, 11, 16, 9, 12, 14, 20, 12, 11, 7, 6, 12, 14, 13, 11, 10, 9, 6]
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
name: "Jamie Newhart",
|
||||
progress: 23,
|
||||
gender: "male",
|
||||
rating: 3,
|
||||
col: "green",
|
||||
dob: "14/05/1985",
|
||||
car: true,
|
||||
lucky_no: 63,
|
||||
activity: [11, 7, 6, 12, 14, 13, 11, 10, 9, 6, 4, 17, 11, 12, 0, 5, 12, 14, 18, 11]
|
||||
},
|
||||
{
|
||||
id: 8,
|
||||
name: "Gemma Jane",
|
||||
progress: 60,
|
||||
gender: "female",
|
||||
rating: 0,
|
||||
col: "red",
|
||||
dob: "22/05/1982",
|
||||
car: "true",
|
||||
lucky_no: 72,
|
||||
activity: [4, 17, 11, 12, 0, 5, 12, 14, 18, 11, 11, 15, 19, 20, 17, 16, 16, 5, 3, 2]
|
||||
},
|
||||
{
|
||||
id: 9,
|
||||
name: "Emily Sykes",
|
||||
progress: 42,
|
||||
gender: "female",
|
||||
rating: 1,
|
||||
col: "maroon",
|
||||
dob: "11/11/1970",
|
||||
lucky_no: 44,
|
||||
activity: [11, 15, 19, 20, 17, 16, 16, 5, 3, 2, 1, 2, 3, 4, 5, 4, 2, 5, 9, 8]
|
||||
},
|
||||
{
|
||||
id: 10,
|
||||
name: "James Newman",
|
||||
progress: 73,
|
||||
gender: "male",
|
||||
rating: 5,
|
||||
col: "red",
|
||||
dob: "22/03/1998",
|
||||
lucky_no: 9,
|
||||
activity: [1, 20, 5, 3, 10, 13, 17, 15, 9, 11, 1, 2, 3, 4, 5, 4, 2, 5, 9, 8]
|
||||
},
|
||||
{
|
||||
id: 11,
|
||||
name: "Martin Barryman",
|
||||
progress: 20,
|
||||
gender: "male",
|
||||
rating: 5,
|
||||
col: "violet",
|
||||
dob: "04/04/2001",
|
||||
activity: [1, 2, 3, 4, 5, 4, 11, 7, 6, 12, 14, 13, 11, 10, 9, 6, 2, 5, 9, 8]
|
||||
},
|
||||
{
|
||||
id: 12,
|
||||
name: "Jenny Green",
|
||||
progress: 56,
|
||||
gender: "female",
|
||||
rating: 4,
|
||||
col: "indigo",
|
||||
dob: "12/11/1998",
|
||||
car: true,
|
||||
activity: [11, 15, 19, 20, 17, 15, 11, 16, 9, 12, 14, 20, 12, 20, 17, 16, 16, 5, 3, 2]
|
||||
},
|
||||
{
|
||||
id: 13,
|
||||
name: "Alan Francis",
|
||||
progress: 90,
|
||||
gender: "male",
|
||||
rating: 3,
|
||||
col: "blue",
|
||||
dob: "07/08/1972",
|
||||
car: true,
|
||||
activity: [4, 17, 11, 7, 6, 12, 14, 13, 11, 10, 9, 6, 11, 12, 0, 5, 12, 14, 18, 11]
|
||||
},
|
||||
{
|
||||
id: 14,
|
||||
name: "John Phillips",
|
||||
progress: 80,
|
||||
gender: "male",
|
||||
rating: 1,
|
||||
col: "green",
|
||||
dob: "24/09/1950",
|
||||
car: true,
|
||||
activity: [11, 7, 6, 12, 14, 1, 20, 5, 3, 10, 13, 17, 15, 9, 1, 13, 11, 10, 9, 6]
|
||||
},
|
||||
{
|
||||
id: 15,
|
||||
name: "Ed White",
|
||||
progress: 70,
|
||||
gender: "male",
|
||||
rating: 0,
|
||||
col: "yellow",
|
||||
dob: "19/06/1976",
|
||||
activity: [20, 17, 15, 11, 16, 9, 4, 17, 11, 12, 0, 5, 12, 14, 18, 11, 12, 14, 20, 12]
|
||||
},
|
||||
{
|
||||
id: 16,
|
||||
name: "Paul Branderson",
|
||||
progress: 60,
|
||||
gender: "male",
|
||||
rating: 5,
|
||||
col: "orange",
|
||||
dob: "01/01/1982",
|
||||
activity: [1, 3, 1, 3, 3, 1, 11, 15, 19, 20, 17, 16, 16, 5, 3, 2, 1, 3, 1, 3]
|
||||
},
|
||||
{
|
||||
id: 18,
|
||||
name: "Emma Netwon",
|
||||
progress: 40,
|
||||
gender: "female",
|
||||
rating: 4,
|
||||
col: "brown",
|
||||
dob: "07/10/1963",
|
||||
car: true,
|
||||
activity: [3, 7, 9, 1, 4, 8, 3, 7, 9, 1, 4, 8, 2, 6, 4, 2, 2, 6, 4, 2]
|
||||
},
|
||||
{
|
||||
id: 19,
|
||||
name: "Hannah Farnsworth",
|
||||
progress: 30,
|
||||
gender: "female",
|
||||
rating: 1,
|
||||
col: "pink",
|
||||
dob: "11/02/1991",
|
||||
activity: [1, 2, 5, 4, 1, 16, 10, 12, 14, 16, 13, 9, 7, 11, 10, 13, 4, 2, 1, 3]
|
||||
},
|
||||
{
|
||||
id: 20,
|
||||
name: "Victoria Bath",
|
||||
progress: 20,
|
||||
gender: "female",
|
||||
rating: 2,
|
||||
col: "purple",
|
||||
dob: "22/03/1986",
|
||||
activity: [10, 12, 14, 16, 13, 9, 7, 1, 2, 3, 4, 5, 4, 2, 5, 9, 8, 11, 10, 13]
|
||||
},
|
||||
];
|
||||
var tableDataNested = [{
|
||||
name: "Oli Bob",
|
||||
location: "United Kingdom",
|
||||
gender: "male",
|
||||
col: "red",
|
||||
dob: "14/04/1984",
|
||||
_children: [{
|
||||
name: "Mary May",
|
||||
location: "Germany",
|
||||
gender: "female",
|
||||
col: "blue",
|
||||
dob: "14/05/1982"
|
||||
},
|
||||
{
|
||||
name: "Christine Lobowski",
|
||||
location: "France",
|
||||
gender: "female",
|
||||
col: "green",
|
||||
dob: "22/05/1982"
|
||||
},
|
||||
{
|
||||
name: "Brendon Philips",
|
||||
location: "USA",
|
||||
gender: "male",
|
||||
col: "orange",
|
||||
dob: "01/08/1980",
|
||||
_children: [{
|
||||
name: "Margret Marmajuke",
|
||||
location: "Canada",
|
||||
gender: "female",
|
||||
col: "yellow",
|
||||
dob: "31/01/1999"
|
||||
},
|
||||
{
|
||||
name: "Frank Harbours",
|
||||
location: "Russia",
|
||||
gender: "male",
|
||||
col: "red",
|
||||
dob: "12/05/1966"
|
||||
},
|
||||
]
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Jamie Newhart",
|
||||
location: "India",
|
||||
gender: "male",
|
||||
col: "green",
|
||||
dob: "14/05/1985"
|
||||
},
|
||||
{
|
||||
name: "Gemma Jane",
|
||||
location: "China",
|
||||
gender: "female",
|
||||
col: "red",
|
||||
dob: "22/05/1982",
|
||||
_children: [{
|
||||
name: "Emily Sykes",
|
||||
location: "South Korea",
|
||||
gender: "female",
|
||||
col: "maroon",
|
||||
dob: "11/11/1970"
|
||||
},]
|
||||
},
|
||||
{
|
||||
name: "James Newman",
|
||||
location: "Japan",
|
||||
gender: "male",
|
||||
col: "red",
|
||||
dob: "22/03/1998"
|
||||
},
|
||||
];
|
||||
|
||||
var nestedData = [{
|
||||
id: 1,
|
||||
make: "Ford",
|
||||
model: "focus",
|
||||
reg: "P232 NJP",
|
||||
color: "white",
|
||||
serviceHistory: [{
|
||||
date: "01/02/2016",
|
||||
engineer: "Steve Boberson",
|
||||
actions: "Changed oli filter"
|
||||
},
|
||||
{
|
||||
date: "07/02/2017",
|
||||
engineer: "Martin Stevenson",
|
||||
actions: "Break light broken"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
make: "BMW",
|
||||
model: "m3",
|
||||
reg: "W342 SEF",
|
||||
color: "red",
|
||||
serviceHistory: [{
|
||||
date: "22/05/2017",
|
||||
engineer: "Jimmy Brown",
|
||||
actions: "Aligned wheels"
|
||||
},
|
||||
{
|
||||
date: "11/02/2018",
|
||||
engineer: "Lotty Ferberson",
|
||||
actions: "Changed Oil"
|
||||
},
|
||||
{
|
||||
date: "04/04/2018",
|
||||
engineer: "Franco Martinez",
|
||||
actions: "Fixed Tracking"
|
||||
},
|
||||
]
|
||||
},
|
||||
]
|
||||
var rowMenu = [{
|
||||
label: "Change Name",
|
||||
action: function (e, row) {
|
||||
row.update({
|
||||
name: "Steve Bobberson"
|
||||
});
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "Select Row",
|
||||
action: function (e, row) {
|
||||
row.select();
|
||||
}
|
||||
},
|
||||
{
|
||||
separator: true,
|
||||
},
|
||||
{
|
||||
label: "Delete Row",
|
||||
action: function (e, row) {
|
||||
row.delete();
|
||||
}
|
||||
},
|
||||
]
|
||||
|
||||
//define row context menu
|
||||
var headerMenu = [{
|
||||
label: "COUNT",
|
||||
action: function (e, column) {
|
||||
//column.hide();
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "SUM",
|
||||
action: function (e, column) {
|
||||
//column.move("col");
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "AVERAGE",
|
||||
action: function (e, column) {
|
||||
//column.move("col");
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "MAX",
|
||||
action: function (e, column) {
|
||||
//column.move("col");
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "MIN",
|
||||
action: function (e, column) {
|
||||
//column.move("col");
|
||||
}
|
||||
},
|
||||
{
|
||||
separator: true,
|
||||
},
|
||||
{
|
||||
label: "Calendar",
|
||||
action: function (e, column) {
|
||||
//column.move("col");
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "Hide Column",
|
||||
action: function (e, column) {
|
||||
//column.move("col");
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "Remove column",
|
||||
action: function (e, column) {
|
||||
//column.move("col");
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
var table = new Tabulator("#tabulator-example", {
|
||||
height: '100%',
|
||||
data: tabledata,
|
||||
layout: "fitColumns",
|
||||
responsiveLayout: "hide",
|
||||
tooltips: true,
|
||||
addRowPos: "top",
|
||||
history: true,
|
||||
movableColumns: true,
|
||||
resizableRows: true,
|
||||
langs: {
|
||||
"fr-fr": { //French language definition
|
||||
"columns": {
|
||||
"name": "Nom",
|
||||
"gender": "Genre",
|
||||
"col": "Couleur",
|
||||
"dob": "Date de Naissance",
|
||||
},
|
||||
"pagination": {
|
||||
"first": "Premier",
|
||||
"first_title": "Première Page",
|
||||
"last": "Dernier",
|
||||
"last_title": "Dernière Page",
|
||||
"prev": "Précédent",
|
||||
"prev_title": "Page Précédente",
|
||||
"next": "Suivant",
|
||||
"next_title": "Page Suivante",
|
||||
"all": "Toute",
|
||||
},
|
||||
},
|
||||
"de-de": { //German language definition
|
||||
"columns": {
|
||||
"name": "Name",
|
||||
"gender": "Genre",
|
||||
"col": "Farbe",
|
||||
"dob": "Geburtsdatum",
|
||||
},
|
||||
"pagination": {
|
||||
"first": "Zuerst",
|
||||
"first_title": "Zuerst Seite",
|
||||
"last": "Last",
|
||||
"last_title": "Letzte Seite",
|
||||
"prev": "Zurück",
|
||||
"prev_title": "Zurück Seite",
|
||||
"next": "Nächster",
|
||||
"next_title": "Nächster Seite",
|
||||
"all": "Alle",
|
||||
},
|
||||
},
|
||||
},
|
||||
initialSort: [{
|
||||
column: "name",
|
||||
dir: "asc"
|
||||
},],
|
||||
columns: [
|
||||
{
|
||||
title: "#",
|
||||
field: "id",
|
||||
width: 100,
|
||||
minWidth: 80,
|
||||
},
|
||||
{
|
||||
title: "Name",
|
||||
field: "name",
|
||||
headerMenu: headerMenu,
|
||||
minWidth: 100,
|
||||
},
|
||||
{
|
||||
title: "Gender",
|
||||
field: "gender",
|
||||
headerMenu: headerMenu,
|
||||
width: 195,
|
||||
editorParams: {
|
||||
values: ["male", "female"]
|
||||
},
|
||||
editableTitle: true
|
||||
},
|
||||
{
|
||||
title: "Rating",
|
||||
field: "rating",
|
||||
width: 100,
|
||||
minWidth: 150,
|
||||
editableTitle: true
|
||||
},
|
||||
{
|
||||
title: "Color",
|
||||
field: "col",
|
||||
headerMenu: headerMenu,
|
||||
width: 130,
|
||||
editableTitle: true
|
||||
},
|
||||
{
|
||||
title: "Date Of Birth",
|
||||
field: "dob",
|
||||
headerMenu: headerMenu,
|
||||
width: 180,
|
||||
sorter: "date",
|
||||
hozAlign: "center",
|
||||
editableTitle: true
|
||||
}
|
||||
],
|
||||
});
|
||||
|
||||
$("#tabulator-controls input[name=name]").on("keyup", function () {
|
||||
table.setFilter("name", "like", $(this).val())
|
||||
});
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
.floating-label-form-group {
|
||||
/*border-bottom: 1px solid #ccc;*/
|
||||
margin-bottom: 0;
|
||||
position: relative;
|
||||
/*padding-bottom: 0.5em;*/
|
||||
}
|
||||
|
||||
.floating-label-form-group input,
|
||||
.floating-label-form-group textarea {
|
||||
background: none;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
box-shadow: none !important;
|
||||
position: relative;
|
||||
/*font-size: 1.1em;*/
|
||||
resize: none;
|
||||
}
|
||||
|
||||
.floating-label-form-group select {
|
||||
margin-top: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
margin-left: -4px;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.floating-label-form-group label {
|
||||
display: block;
|
||||
position: relative;
|
||||
top: 2em;
|
||||
opacity: 0;
|
||||
z-index: 0;
|
||||
/*font-size: 0.85em;*/
|
||||
line-height: 1.764705882em;
|
||||
vertical-align: middle;
|
||||
vertical-align: baseline;
|
||||
margin: 0;
|
||||
-webkit-transition: top 0.5s ease, opacity 0.5s ease;
|
||||
-moz-transition: top 0.5s ease, opacity 0.5s ease;
|
||||
-ms-transition: top 0.5s ease, opacity 0.5s ease;
|
||||
transition: top 0.5s ease, opacity 0.5s ease;
|
||||
}
|
||||
|
||||
.floating-label-form-group:not(:first-child) {
|
||||
border-left: 1px solid #ccc;
|
||||
padding-left: 14px;
|
||||
}
|
||||
|
||||
.floating-label-form-group-with-value label {
|
||||
top: 0;
|
||||
opacity: .5;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.select2-choices {
|
||||
border: 0px !important;
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
|
||||
.floating-label-form-group-with-focus label {
|
||||
color: #808080;
|
||||
}
|
||||
|
||||
form .row:first-child .floating-label-form-group {
|
||||
/*border-top: 1px solid #ccc;*/
|
||||
}
|
||||
|
||||
.form-group-required {
|
||||
border-bottom: 1px solid #fb6b5b !important;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
$(function () {
|
||||
$("body").on("input propertychange", ".floating-label-form-group", function (e) {
|
||||
//$(this).toggleClass("floating-label-form-group-with-value", !!$(e.target).val());
|
||||
}).on("focus", ".floating-label-form-group", function () {
|
||||
//$(this).addClass("floating-label-form-group-with-focus");
|
||||
$(this).addClass("floating-label-form-group-with-value");
|
||||
}).on("blur", ".floating-label-form-group", function () {
|
||||
//$(this).removeClass("floating-label-form-group-with-focus");
|
||||
//$(this).removeClass("floating-label-form-group-with-value");
|
||||
//if ($('.floating-label-control').val().length == 0) {
|
||||
// $(this).removeClass("floating-label-form-group-with-value");
|
||||
//}
|
||||
if ($(this).find('.floating-label-control').val() != "") {
|
||||
$(this).addClass("floating-label-form-group-with-value");
|
||||
}
|
||||
else if ($(this).find('.floating-label-control').val() == "") {
|
||||
$(this).removeClass("floating-label-form-group-with-value");
|
||||
}
|
||||
}).on("focusin", ".floating-label-control", function () {
|
||||
$(this).attr('placeholder', $(this).data('placeholder'));
|
||||
}).on("focusout", ".floating-label-control", function () {
|
||||
$(this).attr('placeholder', $(this).data('label'));
|
||||
});
|
||||
});
|
||||
var _floatingLabelHelper = {
|
||||
init: function () {
|
||||
$('div.floating-label-form-group > input,textarea,select').each(function () {
|
||||
if ($(this).val() && !$(this).parent(".floating-label-form-group").hasClass("floating-label-form-group-with-value")) {
|
||||
$(this).parent(".floating-label-form-group").addClass("floating-label-form-group-with-value");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M13.7539 3.98326C13.8457 3.17488 12.8126 2.76135 12.3213 3.40985L4.22204 14.1009C3.82288 14.6278 4.19869 15.384 4.85971 15.384H12.1039C12.5815 15.384 12.9528 15.7998 12.8988 16.2743L12.2461 22.018C12.1543 22.8264 13.1874 23.24 13.6787 22.5914L21.778 11.9004C22.1771 11.3735 21.8013 10.6173 21.1403 10.6173H13.8961C13.4185 10.6173 13.0472 10.2015 13.1012 9.72699L13.7539 3.98326Z" fill="#808292"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 509 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M15.9205 4.14928C16.0124 3.3409 14.9793 2.92737 14.488 3.57587L4.72203 16.4669C4.32287 16.9938 4.69869 17.75 5.35971 17.75H14.1039C14.5815 17.75 14.9528 18.1658 14.8988 18.6403L14.0795 25.8507C13.9876 26.6591 15.0207 27.0726 15.512 26.4241L25.278 13.5331C25.6771 13.0062 25.3013 12.25 24.6403 12.25H15.8961C15.4185 12.25 15.0472 11.8342 15.1012 11.3597L15.9205 4.14928Z" fill="#217CE8"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 500 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14.8372 4.06628C14.9291 3.25789 13.8959 2.84436 13.4046 3.49286L4.47203 15.2839C4.07287 15.8108 4.44869 16.567 5.10971 16.567H13.1039C13.5815 16.567 13.9528 16.9828 13.8988 17.4573L13.1628 23.9344C13.0709 24.7428 14.1041 25.1563 14.5954 24.5078L23.528 12.7167C23.9271 12.1899 23.5513 11.4337 22.8903 11.4337H14.8961C14.4185 11.4337 14.0472 11.0179 14.1012 10.5433L14.8372 4.06628Z" fill="#E88C21"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 512 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 5c3.453 0 5.891 2.797 5.567 6.78 1.745-.046 4.433.751 4.433 3.72 0 1.93-1.57 3.5-3.5 3.5h-13c-1.93 0-3.5-1.57-3.5-3.5 0-2.797 2.479-3.833 4.433-3.72-.167-4.218 2.208-6.78 5.567-6.78zm0-2c-4.006 0-7.267 3.141-7.479 7.092-2.57.463-4.521 2.706-4.521 5.408 0 3.037 2.463 5.5 5.5 5.5h13c3.037 0 5.5-2.463 5.5-5.5 0-2.702-1.951-4.945-4.521-5.408-.212-3.951-3.473-7.092-7.479-7.092zm-1 14l.58-3h-2.496l3.916-5-.912 3h2.828l-3.916 5z"/></svg>
|
||||
|
After Width: | Height: | Size: 530 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="10" height="14" viewBox="0 0 10 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M8 2L2.18437 6.84636C2.08842 6.92631 2.08842 7.07369 2.18437 7.15364L8 12" stroke="#393C44" stroke-width="2.5" stroke-linecap="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 248 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="#dc7d7d"><path d="M15 21c0 1.598-1.392 3-2.971 3s-3.029-1.402-3.029-3h6zm.137-17.055c-.644-.374-1.042-1.07-1.041-1.82v-.003c.001-1.172-.938-2.122-2.096-2.122s-2.097.95-2.097 2.122v.003c.001.751-.396 1.446-1.041 1.82-4.668 2.709-1.985 11.715-6.862 13.306v1.749h20v-1.749c-4.877-1.591-2.193-10.598-6.863-13.306zm-3.137-2.945c.552 0 1 .449 1 1 0 .552-.448 1-1 1s-1-.448-1-1c0-.551.448-1 1-1zm-6.451 16c1.189-1.667 1.605-3.891 1.964-5.815.447-2.39.869-4.648 2.354-5.509 1.38-.801 2.956-.76 4.267 0 1.485.861 1.907 3.119 2.354 5.509.359 1.924.775 4.148 1.964 5.815h-12.903z"/></svg>
|
||||
|
After Width: | Height: | Size: 666 B |
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 490 490" style="enable-background:new 0 0 490 490;" xml:space="preserve">
|
||||
<g>
|
||||
<path d="M383.945,490L230.694,364.254H50.716c-27.924,0-50.63-23.11-50.63-51.527V51.535C0.086,23.118,22.792,0,50.716,0h388.568
|
||||
c27.924,0,50.63,23.118,50.63,51.535v261.193c0,28.417-22.707,51.527-50.63,51.527h-55.339V490z M50.716,30.614
|
||||
c-11.032,0-20.016,9.388-20.016,20.92v261.193c0,11.525,8.984,20.913,20.016,20.913h190.921l111.694,91.633V333.64h85.953
|
||||
c11.032,0,20.016-9.388,20.016-20.913V51.535c0-11.533-8.984-20.92-20.016-20.92H50.716z"/>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
<g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 952 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="21" height="21" viewBox="0 0 21 21" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="0.5" y="0.5" width="20" height="20" rx="4.5" stroke="#E8E8EF"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 176 B |
@@ -0,0 +1,4 @@
|
||||
<svg width="21" height="21" viewBox="0 0 21 21" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="21" height="21" rx="5" fill="#217CE8"/>
|
||||
<path d="M15.6654 7.5L9.2487 13.9167L6.33203 11" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 286 B |
@@ -0,0 +1,4 @@
|
||||
<svg width="19" height="19" viewBox="0 0 19 19" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14.25 4.75L4.75 14.25" stroke="#A6A6B3" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M4.75 4.75L14.25 14.25" stroke="#A6A6B3" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 339 B |
@@ -0,0 +1,4 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M11 17L6 12L11 7" stroke="#B3B6C9" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M18 17L13 12L18 7" stroke="#B3B6C9" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 324 B |
@@ -0,0 +1,13 @@
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0)">
|
||||
<path d="M11 7.33301C15.5563 7.33301 19.25 6.10179 19.25 4.58301C19.25 3.06422 15.5563 1.83301 11 1.83301C6.44365 1.83301 2.75 3.06422 2.75 4.58301C2.75 6.10179 6.44365 7.33301 11 7.33301Z" fill="#808292"/>
|
||||
<path d="M2.75 4.58301V17.4163C2.75 18.938 6.41667 20.1663 11 20.1663C15.5833 20.1663 19.25 18.938 19.25 17.4163V4.58301" fill="#808292"/>
|
||||
<path d="M21.0846 9.16699C21.0846 10.6887 16.6032 11.917 11.0013 11.917C5.39945 11.917 0.917969 10.6887 0.917969 9.16699" stroke="#F1F4FC" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M21.0846 3.66699C21.0846 5.18866 16.6032 6.41699 11.0013 6.41699C5.39945 6.41699 0.917969 5.18866 0.917969 3.66699" stroke="#F1F4FC" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0">
|
||||
<rect width="22" height="22" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 988 B |
@@ -0,0 +1,6 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12 8C16.9706 8 21 6.65685 21 5C21 3.34315 16.9706 2 12 2C7.02944 2 3 3.34315 3 5C3 6.65685 7.02944 8 12 8Z" fill="#E88C21"/>
|
||||
<path d="M3 5V19C3 20.66 7 22 12 22C17 22 21 20.66 21 19V5" fill="#E88C21"/>
|
||||
<path d="M23 10C23 11.66 18.1111 13 12 13C5.88889 13 1 11.66 1 10" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M23 4C23 5.66 18.1111 7 12 7C5.88889 7 1 5.66 1 4" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 604 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="12" height="7" viewBox="0 0 12 7" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M11 1L6.14142 5.85858C6.06332 5.93668 5.93668 5.93668 5.85858 5.85858L1 1" stroke="#B3B6C9" stroke-width="2" stroke-linecap="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 244 B |
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="blue">
|
||||
<path d="M0 3v18h24v-18h-24zm6.623 7.929l-4.623 5.712v-9.458l4.623 3.746zm-4.141-5.929h19.035l-9.517 7.713-9.518-7.713zm5.694 7.188l3.824 3.099 3.83-3.104 5.612 6.817h-18.779l5.513-6.812zm9.208-1.264l4.616-3.741v9.348l-4.616-5.607z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 340 B |
@@ -0,0 +1,5 @@
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M8.57465 3.21635L1.51632 14.9997C1.37079 15.2517 1.29379 15.5374 1.29298 15.8284C1.29216 16.1195 1.36756 16.4056 1.51167 16.6585C1.65579 16.9113 1.86359 17.122 2.11441 17.2696C2.36523 17.4171 2.65032 17.4965 2.94132 17.4997H17.058C17.349 17.4965 17.6341 17.4171 17.8849 17.2696C18.1357 17.122 18.3435 16.9113 18.4876 16.6585C18.6317 16.4056 18.7071 16.1195 18.7063 15.8284C18.7055 15.5374 18.6285 15.2517 18.483 14.9997L11.4247 3.21635C11.2761 2.97144 11.0669 2.76895 10.8173 2.62842C10.5677 2.48789 10.2861 2.41406 9.99965 2.41406C9.71321 2.41406 9.43159 2.48789 9.18199 2.62842C8.93238 2.76895 8.72321 2.97144 8.57465 3.21635Z" fill="#808292"/>
|
||||
<path d="M10 7.5V10.8333" stroke="#F1F4FC" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M10 14.166H10.0083" stroke="#F1F4FC" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 980 B |
@@ -0,0 +1,5 @@
|
||||
<svg width="23" height="23" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M9.86222 3.69997L1.74513 17.2508C1.57778 17.5406 1.48923 17.8692 1.48829 18.2039C1.48735 18.5386 1.57406 18.8676 1.73979 19.1584C1.90552 19.4491 2.14449 19.6914 2.43294 19.8612C2.72138 20.0309 3.04923 20.1221 3.38388 20.1258H19.6181C19.9527 20.1221 20.2806 20.0309 20.569 19.8612C20.8574 19.6914 21.0964 19.4491 21.2621 19.1584C21.4279 18.8676 21.5146 18.5386 21.5136 18.2039C21.5127 17.8692 21.4242 17.5406 21.2568 17.2508L13.1397 3.69997C12.9689 3.41833 12.7283 3.18546 12.4413 3.02385C12.1542 2.86224 11.8304 2.77734 11.501 2.77734C11.1716 2.77734 10.8477 2.86224 10.5607 3.02385C10.2736 3.18546 10.0331 3.41833 9.86222 3.69997V3.69997Z" fill="#217CE8"/>
|
||||
<path d="M11.5 8.625V12.4583" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M11.5 16.291H11.5083" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 993 B |
@@ -0,0 +1,5 @@
|
||||
<svg width="23" height="23" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M9.86222 3.699L1.74513 17.2498C1.57778 17.5397 1.48923 17.8682 1.48829 18.2029C1.48735 18.5376 1.57406 18.8667 1.73979 19.1574C1.90552 19.4482 2.14449 19.6905 2.43294 19.8602C2.72138 20.0299 3.04923 20.1212 3.38388 20.1248H19.618C19.9527 20.1212 20.2806 20.0299 20.569 19.8602C20.8574 19.6905 21.0964 19.4482 21.2621 19.1574C21.4279 18.8667 21.5146 18.5376 21.5136 18.2029C21.5127 17.8682 21.4242 17.5397 21.2568 17.2498L13.1397 3.699C12.9689 3.41735 12.7283 3.18449 12.4413 3.02288C12.1542 2.86127 11.8304 2.77637 11.501 2.77637C11.1716 2.77637 10.8477 2.86127 10.5607 3.02288C10.2736 3.18449 10.0331 3.41735 9.86222 3.699V3.699Z" fill="#E8215D"/>
|
||||
<path d="M11.5 8.625V12.4583" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M11.5 16.292H11.5096" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 984 B |
@@ -0,0 +1,4 @@
|
||||
<svg width="21" height="21" viewBox="0 0 21 21" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0.875 10.5C0.875 10.5 4.375 3.5 10.5 3.5C16.625 3.5 20.125 10.5 20.125 10.5C20.125 10.5 16.625 17.5 10.5 17.5C4.375 17.5 0.875 10.5 0.875 10.5Z" fill="#808292"/>
|
||||
<path d="M10.5 13.125C11.9497 13.125 13.125 11.9497 13.125 10.5C13.125 9.05025 11.9497 7.875 10.5 7.875C9.05025 7.875 7.875 9.05025 7.875 10.5C7.875 11.9497 9.05025 13.125 10.5 13.125Z" fill="#F1F4FC"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 478 B |
@@ -0,0 +1,4 @@
|
||||
<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M1.16699 14.0003C1.16699 14.0003 5.83366 4.66699 14.0003 4.66699C22.167 4.66699 26.8337 14.0003 26.8337 14.0003C26.8337 14.0003 22.167 23.3337 14.0003 23.3337C5.83366 23.3337 1.16699 14.0003 1.16699 14.0003Z" fill="#217CE8"/>
|
||||
<path d="M14 17.5C15.933 17.5 17.5 15.933 17.5 14C17.5 12.067 15.933 10.5 14 10.5C12.067 10.5 10.5 12.067 10.5 14C10.5 15.933 12.067 17.5 14 17.5Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 501 B |
@@ -0,0 +1,8 @@
|
||||
<svg width="11" height="16" viewBox="0 0 11 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="2.22798" cy="1.45455" r="1.45455" fill="#CED0D7"/>
|
||||
<circle cx="8.77486" cy="1.45455" r="1.45455" fill="#CED0D7"/>
|
||||
<circle cx="2.22798" cy="14.5454" r="1.45455" fill="#CED0D7"/>
|
||||
<circle cx="8.77486" cy="14.5454" r="1.45455" fill="#CED0D7"/>
|
||||
<circle cx="2.22798" cy="8.00044" r="1.45455" fill="#CED0D7"/>
|
||||
<circle cx="8.77486" cy="8.00044" r="1.45455" fill="#CED0D7"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 481 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="18" height="16" viewBox="0 0 18 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M16.3651 1.84124C15.9395 1.41541 15.4342 1.07761 14.8779 0.847138C14.3217 0.61667 13.7255 0.498047 13.1235 0.498047C12.5214 0.498047 11.9252 0.61667 11.369 0.847138C10.8128 1.07761 10.3074 1.41541 9.88181 1.84124L8.99847 2.72457L8.11514 1.84124C7.25539 0.981492 6.08933 0.498493 4.87347 0.498493C3.65761 0.498493 2.49155 0.981492 1.6318 1.84124C0.772061 2.70098 0.289063 3.86704 0.289062 5.0829C0.289062 6.29876 0.772061 7.46483 1.6318 8.32457L2.51514 9.2079L8.99847 15.6912L15.4818 9.2079L16.3651 8.32457C16.791 7.89894 17.1288 7.39358 17.3592 6.83736C17.5897 6.28115 17.7083 5.68497 17.7083 5.0829C17.7083 4.48083 17.5897 3.88465 17.3592 3.32844C17.1288 2.77222 16.791 2.26686 16.3651 1.84124V1.84124Z" fill="#393C44"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 834 B |
|
After Width: | Height: | Size: 1.8 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M3.66797 15.583L9.16797 10.083L3.66797 4.58301" stroke="#808292" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M11 17.417H18.3333" stroke="#808292" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 355 B |
@@ -0,0 +1,4 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4 17L10 11L4 5" stroke="#E8215D" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M12 19H20" stroke="#E8215D" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 315 B |
|
After Width: | Height: | Size: 236 KiB |
@@ -0,0 +1,5 @@
|
||||
<svg width="12" height="3" viewBox="0 0 12 3" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="1.2" cy="1.2" r="1.2" fill="#C5C5D0"/>
|
||||
<circle cx="5.9998" cy="1.2" r="1.2" fill="#C5C5D0"/>
|
||||
<circle cx="10.7996" cy="1.2" r="1.2" fill="#C5C5D0"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 261 B |
@@ -0,0 +1,4 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M7.33333 12.6667C10.2789 12.6667 12.6667 10.2789 12.6667 7.33333C12.6667 4.38781 10.2789 2 7.33333 2C4.38781 2 2 4.38781 2 7.33333C2 10.2789 4.38781 12.6667 7.33333 12.6667Z" stroke="#A5A5B8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M14.0016 13.9996L11.1016 11.0996" stroke="#A5A5B8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 496 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="green"><path d="M12 3c5.514 0 10 3.592 10 8.007 0 4.917-5.144 7.961-9.91 7.961-1.937 0-3.384-.397-4.394-.644-1 .613-1.594 1.037-4.272 1.82.535-1.373.722-2.748.601-4.265-.837-1-2.025-2.4-2.025-4.872 0-4.415 4.486-8.007 10-8.007zm0-2c-6.338 0-12 4.226-12 10.007 0 2.05.739 4.063 2.047 5.625.055 1.83-1.023 4.456-1.993 6.368 2.602-.47 6.301-1.508 7.978-2.536 1.417.345 2.774.503 4.059.503 7.084 0 11.91-4.837 11.91-9.961-.001-5.811-5.702-10.006-12.001-10.006zm-4.449 10.151c.246.277.369.621.369 1.034 0 .529-.208.958-.624 1.289-.416.33-.996.495-1.74.495-.637 0-1.201-.123-1.69-.367l.274-1.083c.494.249.993.375 1.501.375.293 0 .521-.056.686-.167.315-.214.334-.646.023-.892-.149-.117-.404-.236-.769-.357-1.097-.366-1.645-.937-1.645-1.716 0-.503.202-.917.604-1.243.404-.325.943-.488 1.614-.488.586 0 1.096.099 1.535.298l-.299 1.049c-.401-.187-.82-.28-1.254-.28-.267 0-.476.052-.627.153-.299.204-.293.57-.035.787.126.107.428.246.91.416.532.187.92.42 1.167.697zm12.205-.021c-.249-.28-.645-.518-1.181-.706-.475-.168-.776-.307-.899-.41-.243-.205-.249-.545.032-.738.146-.099.352-.148.609-.148.464 0 .87.104 1.274.295l.316-1.111-.022-.012c-.441-.199-.962-.3-1.55-.3-.675 0-1.225.166-1.632.495-.41.33-.618.757-.618 1.267 0 .791.562 1.377 1.67 1.745.357.122.612.239.757.353.292.231.28.637-.022.841-.157.108-.381.162-.667.162-.549 0-1.042-.145-1.522-.39l-.29 1.147c.549.273 1.122.38 1.728.38.749 0 1.34-.168 1.759-.502.422-.334.636-.776.636-1.313 0-.418-.127-.772-.378-1.055zm-6.644-3.005l-1.228 3.967-1.014-3.967h-1.791l-.366 5.75h1.229l.204-4.642h.018s.702 2.878 1.178 4.547h1.031c.794-2.419 1.261-3.936 1.399-4.547h.026c0 .813.045 2.36.136 4.642h1.298l-.309-5.75h-1.811z"/></svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" ?><svg id="Layer_1_1_" style="enable-background:new 0 0 64 64;" version="1.1" viewBox="0 0 64 64" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="#5e7a8a"><path d="M32,27c7.168,0,13-5.832,13-13S39.168,1,32,1S19,6.832,19,14S24.832,27,32,27z M32,3c6.065,0,11,4.935,11,11 s-4.935,11-11,11s-11-4.935-11-11S25.935,3,32,3z"/><path d="M14,37C6.832,37,1,42.832,1,50s5.832,13,13,13s13-5.832,13-13S21.168,37,14,37z M14,61C7.935,61,3,56.065,3,50 s4.935-11,11-11s11,4.935,11,11S20.065,61,14,61z"/><path d="M50,37c-7.168,0-13,5.832-13,13s5.832,13,13,13s13-5.832,13-13S57.168,37,50,37z M50,61c-6.065,0-11-4.935-11-11 s4.935-11,11-11s11,4.935,11,11S56.065,61,50,61z"/><path d="M50,47c-1.654,0-3,1.346-3,3s1.346,3,3,3s3-1.346,3-3S51.654,47,50,47z M50,51c-0.552,0-1-0.448-1-1s0.448-1,1-1 s1,0.448,1,1S50.552,51,50,51z"/><path d="M43,47c-1.654,0-3,1.346-3,3s1.346,3,3,3s3-1.346,3-3S44.654,47,43,47z M43,51c-0.552,0-1-0.448-1-1s0.448-1,1-1 s1,0.448,1,1S43.552,51,43,51z"/><path d="M54,50c0,1.654,1.346,3,3,3s3-1.346,3-3s-1.346-3-3-3S54,48.346,54,50z M58,50c0,0.552-0.448,1-1,1s-1-0.448-1-1 s0.448-1,1-1S58,49.448,58,50z"/><path d="M35.5,17c1.654,0,3-1.346,3-3s-1.346-3-3-3s-3,1.346-3,3S33.846,17,35.5,17z M35.5,13c0.552,0,1,0.448,1,1s-0.448,1-1,1 s-1-0.448-1-1S34.948,13,35.5,13z"/><path d="M28.5,17c1.654,0,3-1.346,3-3s-1.346-3-3-3s-3,1.346-3,3S26.846,17,28.5,17z M28.5,13c0.552,0,1,0.448,1,1s-0.448,1-1,1 s-1-0.448-1-1S27.948,13,28.5,13z"/><path d="M14,47c-1.654,0-3,1.346-3,3s1.346,3,3,3s3-1.346,3-3S15.654,47,14,47z M14,51c-0.552,0-1-0.448-1-1s0.448-1,1-1 s1,0.448,1,1S14.552,51,14,51z"/><path d="M17.599,15.8l-1.201-1.6C9.79,19.164,6,26.745,6,35c0,0.348,0.007,0.693,0.021,1.038l1.998-0.076 C8.007,35.643,8,35.322,8,35C8,27.38,11.499,20.382,17.599,15.8z"/><path d="M26.239,58.305l-0.479,1.941C27.79,60.746,29.889,61,32,61s4.21-0.254,6.239-0.754l-0.479-1.941 C34.015,59.227,29.985,59.227,26.239,58.305z"/><path d="M57.979,36.038C57.993,35.693,58,35.348,58,35c0-8.255-3.79-15.836-10.397-20.8l-1.201,1.6C52.501,20.382,56,27.38,56,35 c0,0.322-0.007,0.643-0.019,0.962L57.979,36.038z"/></svg>
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
@@ -0,0 +1 @@
|
||||
<svg width="24" height="24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" fill="#5682a9"><path d="M13.403 24h-13.403v-22h3c1.231 0 2.181-1.084 3-2h8c.821.916 1.772 2 3 2h3v9.15c-.485-.098-.987-.15-1.5-.15l-.5.016v-7.016h-4l-2 2h-3.897l-2.103-2h-4v18h9.866c.397.751.919 1.427 1.537 2zm5.097-11c3.035 0 5.5 2.464 5.5 5.5s-2.465 5.5-5.5 5.5c-3.036 0-5.5-2.464-5.5-5.5s2.464-5.5 5.5-5.5zm0 2c1.931 0 3.5 1.568 3.5 3.5s-1.569 3.5-3.5 3.5c-1.932 0-3.5-1.568-3.5-3.5s1.568-3.5 3.5-3.5zm2.5 4h-3v-3h1v2h2v1zm-15.151-4.052l-1.049-.984-.8.823 1.864 1.776 3.136-3.192-.815-.808-2.336 2.385zm6.151 1.052h-2v-1h2v1zm2-2h-4v-1h4v1zm-8.151-4.025l-1.049-.983-.8.823 1.864 1.776 3.136-3.192-.815-.808-2.336 2.384zm8.151 1.025h-4v-1h4v1zm0-2h-4v-1h4v1zm-5-6c0 .552.449 1 1 1 .553 0 1-.448 1-1s-.447-1-1-1c-.551 0-1 .448-1 1z"/></svg>
|
||||
|
After Width: | Height: | Size: 844 B |
|
After Width: | Height: | Size: 10 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10.0013 18.3327C14.6037 18.3327 18.3346 14.6017 18.3346 9.99935C18.3346 5.39698 14.6037 1.66602 10.0013 1.66602C5.39893 1.66602 1.66797 5.39698 1.66797 9.99935C1.66797 14.6017 5.39893 18.3327 10.0013 18.3327Z" fill="#808292"/>
|
||||
<path d="M10 5V10L13.3333 11.6667" stroke="#F1F4FC" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 458 B |
@@ -0,0 +1,4 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" fill="#217CE8"/>
|
||||
<path d="M12 6V12L16 14" stroke="#F1F4FC" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 352 B |
@@ -0,0 +1,10 @@
|
||||
<svg width="21" height="21" viewBox="0 0 21 21" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0)">
|
||||
<path d="M21 3.98717C20.2274 4.33017 19.397 4.56117 18.5255 4.6653C19.4154 4.13242 20.0987 3.28805 20.4199 2.2818C19.5877 2.7753 18.6655 3.13405 17.6837 3.32742C16.8989 2.49005 15.778 1.9668 14.539 1.9668C11.7574 1.9668 9.71338 4.56205 10.3416 7.25617C6.762 7.0768 3.5875 5.3618 1.46213 2.75517C0.333375 4.69155 0.87675 7.22467 2.79475 8.50742C2.0895 8.48467 1.4245 8.2913 0.844375 7.96842C0.797125 9.9643 2.22775 11.8315 4.29975 12.2472C3.69338 12.4117 3.02925 12.4502 2.35375 12.3207C2.9015 14.0322 4.49225 15.2773 6.37875 15.3123C4.5675 16.7324 2.2855 17.3668 0 17.0973C1.90662 18.3197 4.172 19.0328 6.6045 19.0328C14.6038 19.0328 19.1231 12.2769 18.8501 6.21755C19.6919 5.60942 20.4225 4.8508 21 3.98717V3.98717Z" fill="#808292"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0">
|
||||
<rect width="21" height="21" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 964 B |
@@ -0,0 +1,10 @@
|
||||
<svg width="23" height="23" viewBox="0 0 23 23" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0)">
|
||||
<path d="M23 4.36709C22.1538 4.74276 21.2443 4.99575 20.2898 5.1098C21.2645 4.52617 22.0129 3.60138 22.3646 2.4993C21.4532 3.0398 20.4432 3.43271 19.3679 3.64451C18.5083 2.72738 17.2807 2.1543 15.9237 2.1543C12.8771 2.1543 10.6385 4.99671 11.3265 7.94742C7.406 7.75096 3.92917 5.87263 1.60137 3.01776C0.365125 5.13855 0.96025 7.91292 3.06092 9.31784C2.2885 9.29292 1.56017 9.08113 0.924792 8.7275C0.873042 10.9135 2.43992 12.9585 4.70925 13.4138C4.04512 13.5939 3.31775 13.6361 2.57792 13.4943C3.17783 15.3688 4.92008 16.7325 6.98625 16.7708C5.0025 18.3262 2.50317 19.021 0 18.7258C2.08821 20.0646 4.56933 20.8456 7.2335 20.8456C15.9946 20.8456 20.9444 13.4463 20.6454 6.80988C21.5673 6.14384 22.3675 5.31296 23 4.36709V4.36709Z" fill="#E88C21"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0">
|
||||
<rect width="23" height="23" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 976 B |
|
After Width: | Height: | Size: 4.9 KiB |
@@ -0,0 +1,722 @@
|
||||
var flowy = function (canvas, grab, release, snapping, rearrange, spacing_x, spacing_y) {
|
||||
try {
|
||||
if (!grab) {
|
||||
grab = function () { };
|
||||
}
|
||||
if (!release) {
|
||||
release = function () { };
|
||||
}
|
||||
if (!snapping) {
|
||||
snapping = function () {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (!rearrange) {
|
||||
rearrange = function () {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (!spacing_x) {
|
||||
spacing_x = 20;
|
||||
}
|
||||
if (!spacing_y) {
|
||||
spacing_y = 80;
|
||||
}
|
||||
if (!Element.prototype.matches) {
|
||||
|
||||
Element.prototype.matches = Element.prototype.msMatchesSelector ||
|
||||
Element.prototype.webkitMatchesSelector;
|
||||
}
|
||||
if (!Element.prototype.closest) {
|
||||
|
||||
Element.prototype.closest = function (s) {
|
||||
var el = this;
|
||||
do {
|
||||
if (Element.prototype.matches.call(el, s)) return el;
|
||||
el = el.parentElement || el.parentNode;
|
||||
} while (el !== null && el.nodeType === 1);
|
||||
return null;
|
||||
};
|
||||
}
|
||||
var loaded = false;
|
||||
flowy.load = function () {
|
||||
if (!loaded)
|
||||
loaded = true;
|
||||
else
|
||||
return;
|
||||
var blocks = [];
|
||||
var blockstemp = [];
|
||||
var canvas_div = canvas;
|
||||
var absx = 0;
|
||||
var absy = 0;
|
||||
if (window.getComputedStyle(canvas_div).position == "absolute" || window.getComputedStyle(canvas_div).position == "fixed") {
|
||||
absx = canvas_div.getBoundingClientRect().left;
|
||||
absy = canvas_div.getBoundingClientRect().top;
|
||||
}
|
||||
var active = false;
|
||||
var paddingx = spacing_x;
|
||||
var paddingy = spacing_y;
|
||||
var offsetleft = 0;
|
||||
var rearrange = false;
|
||||
var drag, dragx, dragy, original;
|
||||
var mouse_x, mouse_y;
|
||||
var dragblock = false;
|
||||
var prevblock = 0;
|
||||
var el = document.createElement("DIV");
|
||||
el.classList.add('indicator');
|
||||
el.classList.add('invisible');
|
||||
canvas_div.appendChild(el);
|
||||
flowy.import = function (output) {
|
||||
debugger
|
||||
canvas_div.innerHTML = output.html;
|
||||
for (var a = 0; a < output.blockarr.length; a++) {
|
||||
blocks.push({
|
||||
childwidth: parseFloat(output.blockarr[a].childwidth),
|
||||
parent: parseFloat(output.blockarr[a].parent),
|
||||
id: parseFloat(output.blockarr[a].id),
|
||||
x: parseFloat(output.blockarr[a].x),
|
||||
y: parseFloat(output.blockarr[a].y),
|
||||
width: parseFloat(output.blockarr[a].width),
|
||||
height: parseFloat(output.blockarr[a].height)
|
||||
})
|
||||
}
|
||||
if (blocks.length > 1) {
|
||||
rearrangeMe();
|
||||
checkOffset();
|
||||
}
|
||||
}
|
||||
flowy.output = function () {
|
||||
var html_ser = canvas_div.innerHTML;
|
||||
var json_data = {
|
||||
html: html_ser,
|
||||
blockarr: blocks,
|
||||
blocks: []
|
||||
};
|
||||
if (blocks.length > 0) {
|
||||
for (var i = 0; i < blocks.length; i++) {
|
||||
json_data.blocks.push({
|
||||
id: blocks[i].id,
|
||||
parent: blocks[i].parent,
|
||||
data: [],
|
||||
attr: []
|
||||
});
|
||||
var blockParent = document.querySelector(".blockid[value='" + blocks[i].id + "']").parentNode;
|
||||
blockParent.querySelectorAll("input").forEach(function (block) {
|
||||
var json_name = block.getAttribute("name");
|
||||
var json_value = block.value;
|
||||
json_data.blocks[i].data.push({
|
||||
name: json_name,
|
||||
value: json_value
|
||||
});
|
||||
});
|
||||
//Customized To Get Block Id of Class .blockyinfo
|
||||
blockParent.querySelectorAll(".blockyinfo").forEach(function (block) {
|
||||
var json_name = block.innerHTML;
|
||||
var json_value = block.id;
|
||||
json_data.blocks[i].data.push({
|
||||
name: json_name,
|
||||
value: json_value
|
||||
});
|
||||
});
|
||||
Array.prototype.slice.call(blockParent.attributes).forEach(function (attribute) {
|
||||
var jsonobj = {};
|
||||
jsonobj[attribute.name] = attribute.value;
|
||||
json_data.blocks[i].attr.push(jsonobj);
|
||||
});
|
||||
}
|
||||
return json_data;
|
||||
}
|
||||
}
|
||||
//flowy.deleteBlocks = function () {
|
||||
// blocks = [];
|
||||
// canvas_div.innerHTML = "<div class='indicator invisible'></div>";
|
||||
//}
|
||||
flowy.deleteBlock = function (id, removeChildren) {
|
||||
//Track orginal parent
|
||||
let newParentId;
|
||||
|
||||
if (!Number.isInteger(id)) {
|
||||
id = parseInt(id);
|
||||
}
|
||||
for (var i = 0; i < blocks.length; i++) {
|
||||
if (blocks[i].id === id) {
|
||||
newParentId = blocks[i].parent;
|
||||
removeBlockEls(blocks[i].id, blocks[i].parent);
|
||||
blocks.splice(i, 1);
|
||||
modifyChildBlocks(id);
|
||||
break;
|
||||
}
|
||||
}
|
||||
rearrangeMe();
|
||||
function modifyChildBlocks(parentId) {
|
||||
let children = [];
|
||||
for (var i = blocks.length - 1; i >= 0; i--) {
|
||||
if (blocks[i].parent === parentId) {
|
||||
children.push(blocks[i].id);
|
||||
if (removeChildren === true) {
|
||||
removeBlockEls(blocks[i].id, blocks[i].parent);
|
||||
blocks.splice(i, 1);
|
||||
} else {
|
||||
blocks[i].parent = newParentId;
|
||||
rearrange = true;
|
||||
document.querySelector(".arrowid[value='" + blocks[i].id + "']").parentNode.remove();
|
||||
blockstemp = [];
|
||||
blockstemp.push(blocks.filter(a => a.id == blocks[i].id)[0]);
|
||||
snap(document.querySelector(".blockid[value='" + blocks[i].id + "']").parentNode, newParentId, blocks.map(a => a.id));
|
||||
rearrange = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
//Only call repeat of function if removing children
|
||||
if (removeChildren === true) {
|
||||
for (var i = 0; i < children.length; i++) {
|
||||
modifyChildBlocks(children[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
function removeBlockEls(id, parentid) {
|
||||
if (parentid == -1) {
|
||||
document.querySelector(".blockid[value='" + id + "']").parentNode.remove();
|
||||
}
|
||||
else {
|
||||
document.querySelector(".blockid[value='" + id + "']").parentNode.remove();
|
||||
document.querySelector(".arrowid[value='" + id + "']").parentNode.remove();
|
||||
}
|
||||
}
|
||||
};
|
||||
flowy.beginDrag = function (event) {
|
||||
if (window.getComputedStyle(canvas_div).position == "absolute" || window.getComputedStyle(canvas_div).position == "fixed") {
|
||||
absx = canvas_div.getBoundingClientRect().left;
|
||||
absy = canvas_div.getBoundingClientRect().top;
|
||||
}
|
||||
if (event.targetTouches) {
|
||||
mouse_x = event.changedTouches[0].clientX;
|
||||
mouse_y = event.changedTouches[0].clientY;
|
||||
} else {
|
||||
mouse_x = event.clientX;
|
||||
mouse_y = event.clientY;
|
||||
}
|
||||
if (event.which != 3 && event.target.closest(".create-flowy")) {
|
||||
original = event.target.closest(".create-flowy");
|
||||
var newNode = event.target.closest(".create-flowy").cloneNode(true);
|
||||
event.target.closest(".create-flowy").classList.add("dragnow");
|
||||
newNode.classList.add("block");
|
||||
newNode.classList.remove("create-flowy");
|
||||
if (blocks.length === 0) {
|
||||
newNode.innerHTML += "<input type='hidden' name='blockid' class='blockid' value='" + blocks.length + "'>";
|
||||
//document.body.appendChild(newNode);
|
||||
$('._bizgaze_popup_container').append(newNode);
|
||||
drag = document.querySelector(".blockid[value='" + blocks.length + "']").parentNode;
|
||||
} else {
|
||||
newNode.innerHTML += "<input type='hidden' name='blockid' class='blockid' value='" + (Math.max.apply(Math, blocks.map(a => a.id)) + 1) + "'>";
|
||||
//document.body.appendChild(newNode);
|
||||
$('._bizgaze_popup_container').append(newNode);
|
||||
drag = document.querySelector(".blockid[value='" + (parseInt(Math.max.apply(Math, blocks.map(a => a.id))) + 1) + "']").parentNode;
|
||||
}
|
||||
blockGrabbed(event.target.closest(".create-flowy"));
|
||||
drag.classList.add("dragging");
|
||||
active = true;
|
||||
dragx = mouse_x - (event.target.closest(".create-flowy").getBoundingClientRect().left);
|
||||
dragy = mouse_y - (event.target.closest(".create-flowy").getBoundingClientRect().top);
|
||||
drag.style.left = mouse_x - dragx + "px";
|
||||
drag.style.top = mouse_y - dragy + "px";
|
||||
}
|
||||
}
|
||||
flowy.endDrag = function (event) {
|
||||
if (event.which != 3 && (active || rearrange)) {
|
||||
dragblock = false;
|
||||
blockReleased(event);
|
||||
if (!document.querySelector(".indicator").classList.contains("invisible")) {
|
||||
document.querySelector(".indicator").classList.add("invisible");
|
||||
}
|
||||
if (active) {
|
||||
original.classList.remove("dragnow");
|
||||
drag.classList.remove("dragging");
|
||||
}
|
||||
if (parseInt(drag.querySelector(".blockid").value) === 0 && rearrange) {
|
||||
firstBlock("rearrange")
|
||||
} else if (active && blocks.length == 0 && (drag.getBoundingClientRect().top + window.scrollY) > (canvas_div.getBoundingClientRect().top + window.scrollY) && (drag.getBoundingClientRect().left + window.scrollX) > (canvas_div.getBoundingClientRect().left + window.scrollX)) {
|
||||
firstBlock("drop");
|
||||
} else if (active && blocks.length == 0) {
|
||||
removeSelection();
|
||||
} else if (active) {
|
||||
var blocko = blocks.map(a => a.id);
|
||||
for (var i = 0; i < blocks.length; i++) {
|
||||
if (checkAttach(blocko[i])) {
|
||||
active = false;
|
||||
if (blockSnap(drag, false, document.querySelector(".blockid[value='" + blocko[i] + "']").parentNode)) {
|
||||
snap(drag, i, blocko);
|
||||
} else {
|
||||
active = false;
|
||||
removeSelection();
|
||||
}
|
||||
break;
|
||||
} else if (i == blocks.length - 1) {
|
||||
active = false;
|
||||
removeSelection();
|
||||
}
|
||||
}
|
||||
} else if (rearrange) {
|
||||
var blocko = blocks.map(a => a.id);
|
||||
for (var i = 0; i < blocks.length; i++) {
|
||||
if (checkAttach(blocko[i])) {
|
||||
active = false;
|
||||
drag.classList.remove("dragging");
|
||||
snap(drag, i, blocko);
|
||||
break;
|
||||
} else if (i == blocks.length - 1) {
|
||||
if (beforeDelete(drag, blocks.filter(id => id.id == blocko[i])[0])) {
|
||||
active = false;
|
||||
drag.classList.remove("dragging");
|
||||
snap(drag, blocko.indexOf(prevblock), blocko);
|
||||
break;
|
||||
} else {
|
||||
rearrange = false;
|
||||
blockstemp = [];
|
||||
active = false;
|
||||
removeSelection();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
eval("bizgaze_automation_flow_main.Deleteblock()");
|
||||
}
|
||||
function checkAttach(id) {
|
||||
const xpos = (drag.getBoundingClientRect().left + window.scrollX) + (parseInt(window.getComputedStyle(drag).width) / 2) + canvas_div.scrollLeft - canvas_div.getBoundingClientRect().left;
|
||||
const ypos = (drag.getBoundingClientRect().top + window.scrollY) + canvas_div.scrollTop - canvas_div.getBoundingClientRect().top;
|
||||
if (xpos >= blocks.filter(a => a.id == id)[0].x - (blocks.filter(a => a.id == id)[0].width / 2) - paddingx && xpos <= blocks.filter(a => a.id == id)[0].x + (blocks.filter(a => a.id == id)[0].width / 2) + paddingx && ypos >= blocks.filter(a => a.id == id)[0].y - (blocks.filter(a => a.id == id)[0].height / 2) && ypos <= blocks.filter(a => a.id == id)[0].y + blocks.filter(a => a.id == id)[0].height) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
function removeSelection() {
|
||||
canvas_div.appendChild(document.querySelector(".indicator"));
|
||||
drag.parentNode.removeChild(drag);
|
||||
}
|
||||
function firstBlock(type) {
|
||||
if (type == "drop") {
|
||||
blockSnap(drag, true, undefined);
|
||||
active = false;
|
||||
drag.style.top = (drag.getBoundingClientRect().top + window.scrollY) - (absy + window.scrollY) + canvas_div.scrollTop + "px";
|
||||
drag.style.left = (drag.getBoundingClientRect().left + window.scrollX) - (absx + window.scrollX) + canvas_div.scrollLeft + "px";
|
||||
canvas_div.appendChild(drag);
|
||||
blocks.push({
|
||||
parent: -1,
|
||||
childwidth: 0,
|
||||
id: parseInt(drag.querySelector(".blockid").value),
|
||||
x: (drag.getBoundingClientRect().left + window.scrollX) + (parseInt(window.getComputedStyle(drag).width) / 2) + canvas_div.scrollLeft - canvas_div.getBoundingClientRect().left,
|
||||
y: (drag.getBoundingClientRect().top + window.scrollY) + (parseInt(window.getComputedStyle(drag).height) / 2) + canvas_div.scrollTop - canvas_div.getBoundingClientRect().top,
|
||||
width: parseInt(window.getComputedStyle(drag).width),
|
||||
height: parseInt(window.getComputedStyle(drag).height)
|
||||
});
|
||||
} else if (type == "rearrange") {
|
||||
drag.classList.remove("dragging");
|
||||
rearrange = false;
|
||||
for (var w = 0; w < blockstemp.length; w++) {
|
||||
if (blockstemp[w].id != parseInt(drag.querySelector(".blockid").value)) {
|
||||
const blockParent = document.querySelector(".blockid[value='" + blockstemp[w].id + "']").parentNode;
|
||||
const arrowParent = document.querySelector(".arrowid[value='" + blockstemp[w].id + "']").parentNode;
|
||||
blockParent.style.left = (blockParent.getBoundingClientRect().left + window.scrollX) - (window.scrollX) + canvas_div.scrollLeft - 1 - absx + "px";
|
||||
blockParent.style.top = (blockParent.getBoundingClientRect().top + window.scrollY) - (window.scrollY) + canvas_div.scrollTop - absy - 1 + "px";
|
||||
arrowParent.style.left = (arrowParent.getBoundingClientRect().left + window.scrollX) - (window.scrollX) + canvas_div.scrollLeft - absx - 1 + "px";
|
||||
arrowParent.style.top = (arrowParent.getBoundingClientRect().top + window.scrollY) + canvas_div.scrollTop - 1 - absy + "px";
|
||||
canvas_div.appendChild(blockParent);
|
||||
canvas_div.appendChild(arrowParent);
|
||||
blockstemp[w].x = (blockParent.getBoundingClientRect().left + window.scrollX) + (parseInt(blockParent.offsetWidth) / 2) + canvas_div.scrollLeft - canvas_div.getBoundingClientRect().left - 1;
|
||||
blockstemp[w].y = (blockParent.getBoundingClientRect().top + window.scrollY) + (parseInt(blockParent.offsetHeight) / 2) + canvas_div.scrollTop - canvas_div.getBoundingClientRect().top - 1;
|
||||
}
|
||||
}
|
||||
blockstemp.filter(a => a.id == 0)[0].x = (drag.getBoundingClientRect().left + window.scrollX) + (parseInt(window.getComputedStyle(drag).width) / 2) + canvas_div.scrollLeft - canvas_div.getBoundingClientRect().left;
|
||||
blockstemp.filter(a => a.id == 0)[0].y = (drag.getBoundingClientRect().top + window.scrollY) + (parseInt(window.getComputedStyle(drag).height) / 2) + canvas_div.scrollTop - canvas_div.getBoundingClientRect().top;
|
||||
blocks = blocks.concat(blockstemp);
|
||||
blockstemp = [];
|
||||
}
|
||||
}
|
||||
function drawArrow(arrow, x, y, id) {
|
||||
if (x < 0) {
|
||||
canvas_div.innerHTML += '<div class="arrowblock"><input type="hidden" class="arrowid" value="' + drag.querySelector(".blockid").value + '"><svg preserveaspectratio="none" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M' + (blocks.filter(a => a.id == id)[0].x - arrow.x + 5) + ' 0L' + (blocks.filter(a => a.id == id)[0].x - arrow.x + 5) + ' ' + (paddingy / 2) + 'L5 ' + (paddingy / 2) + 'L5 ' + y + '" stroke="#C5CCD0" stroke-width="2px"/><path d="M0 ' + (y - 5) + 'H10L5 ' + y + 'L0 ' + (y - 5) + 'Z" fill="#C5CCD0"/></svg></div>';
|
||||
document.querySelector('.arrowid[value="' + drag.querySelector(".blockid").value + '"]').parentNode.style.left = (arrow.x - 5) - (absx + window.scrollX) + canvas_div.scrollLeft + canvas_div.getBoundingClientRect().left + "px";
|
||||
} else {
|
||||
canvas_div.innerHTML += '<div class="arrowblock"><input type="hidden" class="arrowid" value="' + drag.querySelector(".blockid").value + '"><svg preserveaspectratio="none" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 0L20 ' + (paddingy / 2) + 'L' + (x) + ' ' + (paddingy / 2) + 'L' + x + ' ' + y + '" stroke="#C5CCD0" stroke-width="2px"/><path d="M' + (x - 5) + ' ' + (y - 5) + 'H' + (x + 5) + 'L' + x + ' ' + y + 'L' + (x - 5) + ' ' + (y - 5) + 'Z" fill="#C5CCD0"/></svg></div>';
|
||||
document.querySelector('.arrowid[value="' + parseInt(drag.querySelector(".blockid").value) + '"]').parentNode.style.left = blocks.filter(a => a.id == id)[0].x - 20 - (absx + window.scrollX) + canvas_div.scrollLeft + canvas_div.getBoundingClientRect().left + "px";
|
||||
}
|
||||
document.querySelector('.arrowid[value="' + parseInt(drag.querySelector(".blockid").value) + '"]').parentNode.style.top = blocks.filter(a => a.id == id)[0].y + (blocks.filter(a => a.id == id)[0].height / 2) + canvas_div.getBoundingClientRect().top - absy + "px";
|
||||
}
|
||||
function updateArrow(arrow, x, y, children) {
|
||||
if (x < 0) {
|
||||
document.querySelector('.arrowid[value="' + children.id + '"]').parentNode.style.left = (arrow.x - 5) - (absx + window.scrollX) + canvas_div.getBoundingClientRect().left + "px";
|
||||
document.querySelector('.arrowid[value="' + children.id + '"]').parentNode.innerHTML = '<input type="hidden" class="arrowid" value="' + children.id + '"><svg preserveaspectratio="none" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M' + (blocks.filter(id => id.id == children.parent)[0].x - arrow.x + 5) + ' 0L' + (blocks.filter(id => id.id == children.parent)[0].x - arrow.x + 5) + ' ' + (paddingy / 2) + 'L5 ' + (paddingy / 2) + 'L5 ' + y + '" stroke="#C5CCD0" stroke-width="2px"/><path d="M0 ' + (y - 5) + 'H10L5 ' + y + 'L0 ' + (y - 5) + 'Z" fill="#C5CCD0"/></svg>';
|
||||
} else {
|
||||
document.querySelector('.arrowid[value="' + children.id + '"]').parentNode.style.left = blocks.filter(id => id.id == children.parent)[0].x - 20 - (absx + window.scrollX) + canvas_div.getBoundingClientRect().left + "px";
|
||||
document.querySelector('.arrowid[value="' + children.id + '"]').parentNode.innerHTML = '<input type="hidden" class="arrowid" value="' + children.id + '"><svg preserveaspectratio="none" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 0L20 ' + (paddingy / 2) + 'L' + (x) + ' ' + (paddingy / 2) + 'L' + x + ' ' + y + '" stroke="#C5CCD0" stroke-width="2px"/><path d="M' + (x - 5) + ' ' + (y - 5) + 'H' + (x + 5) + 'L' + x + ' ' + y + 'L' + (x - 5) + ' ' + (y - 5) + 'Z" fill="#C5CCD0"/></svg>';
|
||||
}
|
||||
}
|
||||
function snap(drag, i, blocko) {
|
||||
if (!rearrange) {
|
||||
canvas_div.appendChild(drag);
|
||||
}
|
||||
var totalwidth = 0;
|
||||
var totalremove = 0;
|
||||
var maxheight = 0;
|
||||
for (var w = 0; w < blocks.filter(id => id.parent == blocko[i]).length; w++) {
|
||||
var children = blocks.filter(id => id.parent == blocko[i])[w];
|
||||
if (children.childwidth > children.width) {
|
||||
totalwidth += children.childwidth + paddingx;
|
||||
} else {
|
||||
totalwidth += children.width + paddingx;
|
||||
}
|
||||
}
|
||||
totalwidth += parseInt(window.getComputedStyle(drag).width);
|
||||
for (var w = 0; w < blocks.filter(id => id.parent == blocko[i]).length; w++) {
|
||||
var children = blocks.filter(id => id.parent == blocko[i])[w];
|
||||
if (children.childwidth > children.width) {
|
||||
document.querySelector(".blockid[value='" + children.id + "']").parentNode.style.left = blocks.filter(a => a.id == blocko[i])[0].x - (totalwidth / 2) + totalremove + (children.childwidth / 2) - (children.width / 2) + "px";
|
||||
children.x = blocks.filter(id => id.parent == blocko[i])[0].x - (totalwidth / 2) + totalremove + (children.childwidth / 2);
|
||||
totalremove += children.childwidth + paddingx;
|
||||
} else {
|
||||
document.querySelector(".blockid[value='" + children.id + "']").parentNode.style.left = blocks.filter(a => a.id == blocko[i])[0].x - (totalwidth / 2) + totalremove + "px";
|
||||
children.x = blocks.filter(id => id.parent == blocko[i])[0].x - (totalwidth / 2) + totalremove + (children.width / 2);
|
||||
totalremove += children.width + paddingx;
|
||||
}
|
||||
}
|
||||
drag.style.left = blocks.filter(id => id.id == blocko[i])[0].x - (totalwidth / 2) + totalremove - (window.scrollX + absx) + canvas_div.scrollLeft + canvas_div.getBoundingClientRect().left + "px";
|
||||
drag.style.top = blocks.filter(id => id.id == blocko[i])[0].y + (blocks.filter(id => id.id == blocko[i])[0].height / 2) + paddingy - (window.scrollY + absy) + canvas_div.getBoundingClientRect().top + "px";
|
||||
if (rearrange) {
|
||||
blockstemp.filter(a => a.id == parseInt(drag.querySelector(".blockid").value))[0].x = (drag.getBoundingClientRect().left + window.scrollX) + (parseInt(window.getComputedStyle(drag).width) / 2) + canvas_div.scrollLeft - canvas_div.getBoundingClientRect().left;
|
||||
blockstemp.filter(a => a.id == parseInt(drag.querySelector(".blockid").value))[0].y = (drag.getBoundingClientRect().top + window.scrollY + absy) + (parseInt(window.getComputedStyle(drag).height) / 2) + canvas_div.scrollTop - canvas_div.getBoundingClientRect().top;
|
||||
blockstemp.filter(a => a.id == drag.querySelector(".blockid").value)[0].parent = blocko[i];
|
||||
for (var w = 0; w < blockstemp.length; w++) {
|
||||
if (blockstemp[w].id != parseInt(drag.querySelector(".blockid").value)) {
|
||||
const blockParent = document.querySelector(".blockid[value='" + blockstemp[w].id + "']").parentNode;
|
||||
const arrowParent = document.querySelector(".arrowid[value='" + blockstemp[w].id + "']").parentNode;
|
||||
blockParent.style.left = (blockParent.getBoundingClientRect().left + window.scrollX) - (window.scrollX + canvas_div.getBoundingClientRect().left) + canvas_div.scrollLeft + "px";
|
||||
blockParent.style.top = (blockParent.getBoundingClientRect().top + window.scrollY) - (window.scrollY + canvas_div.getBoundingClientRect().top) + canvas_div.scrollTop + "px";
|
||||
arrowParent.style.left = (arrowParent.getBoundingClientRect().left + window.scrollX) - (window.scrollX + canvas_div.getBoundingClientRect().left) + canvas_div.scrollLeft + 20 + "px";
|
||||
arrowParent.style.top = (arrowParent.getBoundingClientRect().top + window.scrollY) - (window.scrollY + canvas_div.getBoundingClientRect().top) + canvas_div.scrollTop + "px";
|
||||
canvas_div.appendChild(blockParent);
|
||||
canvas_div.appendChild(arrowParent);
|
||||
|
||||
blockstemp[w].x = (blockParent.getBoundingClientRect().left + window.scrollX) + (parseInt(window.getComputedStyle(blockParent).width) / 2) + canvas_div.scrollLeft - canvas_div.getBoundingClientRect().left;
|
||||
blockstemp[w].y = (blockParent.getBoundingClientRect().top + window.scrollY) + (parseInt(window.getComputedStyle(blockParent).height) / 2) + canvas_div.scrollTop - canvas_div.getBoundingClientRect().top;
|
||||
}
|
||||
}
|
||||
blocks = blocks.concat(blockstemp);
|
||||
blockstemp = [];
|
||||
} else {
|
||||
blocks.push({
|
||||
childwidth: 0,
|
||||
parent: blocko[i],
|
||||
id: parseInt(drag.querySelector(".blockid").value),
|
||||
x: (drag.getBoundingClientRect().left + window.scrollX) + (parseInt(window.getComputedStyle(drag).width) / 2) + canvas_div.scrollLeft - canvas_div.getBoundingClientRect().left,
|
||||
y: (drag.getBoundingClientRect().top + window.scrollY) + (parseInt(window.getComputedStyle(drag).height) / 2) + canvas_div.scrollTop - canvas_div.getBoundingClientRect().top,
|
||||
width: parseInt(window.getComputedStyle(drag).width),
|
||||
height: parseInt(window.getComputedStyle(drag).height)
|
||||
});
|
||||
}
|
||||
var arrowblock = blocks.filter(a => a.id == parseInt(drag.querySelector(".blockid").value))[0];
|
||||
var arrowx = arrowblock.x - blocks.filter(a => a.id == blocko[i])[0].x + 20;
|
||||
var arrowy = paddingy;
|
||||
drawArrow(arrowblock, arrowx, arrowy, blocko[i]);
|
||||
if (blocks.filter(a => a.id == blocko[i])[0].parent != -1) {
|
||||
var flag = false;
|
||||
var idval = blocko[i];
|
||||
while (!flag) {
|
||||
if (blocks.filter(a => a.id == idval)[0].parent == -1) {
|
||||
flag = true;
|
||||
} else {
|
||||
var zwidth = 0;
|
||||
for (var w = 0; w < blocks.filter(id => id.parent == idval).length; w++) {
|
||||
var children = blocks.filter(id => id.parent == idval)[w];
|
||||
if (children.childwidth > children.width) {
|
||||
if (w == blocks.filter(id => id.parent == idval).length - 1) {
|
||||
zwidth += children.childwidth;
|
||||
} else {
|
||||
zwidth += children.childwidth + paddingx;
|
||||
}
|
||||
} else {
|
||||
if (w == blocks.filter(id => id.parent == idval).length - 1) {
|
||||
zwidth += children.width;
|
||||
} else {
|
||||
zwidth += children.width + paddingx;
|
||||
}
|
||||
}
|
||||
}
|
||||
blocks.filter(a => a.id == idval)[0].childwidth = zwidth;
|
||||
idval = blocks.filter(a => a.id == idval)[0].parent;
|
||||
}
|
||||
}
|
||||
blocks.filter(id => id.id == idval)[0].childwidth = totalwidth;
|
||||
}
|
||||
if (rearrange) {
|
||||
rearrange = false;
|
||||
drag.classList.remove("dragging");
|
||||
}
|
||||
rearrangeMe();
|
||||
checkOffset();
|
||||
}
|
||||
function touchblock(event) {
|
||||
dragblock = false;
|
||||
if (hasParentClass(event.target, "block")) {
|
||||
var theblock = event.target.closest(".block");
|
||||
if (event.targetTouches) {
|
||||
mouse_x = event.targetTouches[0].clientX;
|
||||
mouse_y = event.targetTouches[0].clientY;
|
||||
} else {
|
||||
mouse_x = event.clientX;
|
||||
mouse_y = event.clientY;
|
||||
}
|
||||
if (event.type !== "mouseup" && hasParentClass(event.target, "block")) {
|
||||
if (event.which != 3) {
|
||||
if (!active && !rearrange) {
|
||||
dragblock = true;
|
||||
drag = theblock;
|
||||
dragx = mouse_x - (drag.getBoundingClientRect().left + window.scrollX);
|
||||
dragy = mouse_y - (drag.getBoundingClientRect().top + window.scrollY);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function hasParentClass(element, classname) {
|
||||
if (element.className) {
|
||||
if (element.className.split(' ').indexOf(classname) >= 0) return true;
|
||||
}
|
||||
return element.parentNode && hasParentClass(element.parentNode, classname);
|
||||
}
|
||||
flowy.moveBlock = function (event) {
|
||||
if (event.targetTouches) {
|
||||
mouse_x = event.targetTouches[0].clientX;
|
||||
mouse_y = event.targetTouches[0].clientY;
|
||||
} else {
|
||||
mouse_x = event.clientX;
|
||||
mouse_y = event.clientY;
|
||||
}
|
||||
if (dragblock) {
|
||||
rearrange = true;
|
||||
drag.classList.add("dragging");
|
||||
var blockid = parseInt(drag.querySelector(".blockid").value);
|
||||
prevblock = blocks.filter(a => a.id == blockid)[0].parent;
|
||||
blockstemp.push(blocks.filter(a => a.id == blockid)[0]);
|
||||
blocks = blocks.filter(function (e) {
|
||||
return e.id != blockid
|
||||
});
|
||||
if (blockid != 0) {
|
||||
document.querySelector(".arrowid[value='" + blockid + "']").parentNode.remove();
|
||||
}
|
||||
var layer = blocks.filter(a => a.parent == blockid);
|
||||
var flag = false;
|
||||
var foundids = [];
|
||||
var allids = [];
|
||||
while (!flag) {
|
||||
for (var i = 0; i < layer.length; i++) {
|
||||
if (layer[i] != blockid) {
|
||||
blockstemp.push(blocks.filter(a => a.id == layer[i].id)[0]);
|
||||
const blockParent = document.querySelector(".blockid[value='" + layer[i].id + "']").parentNode;
|
||||
const arrowParent = document.querySelector(".arrowid[value='" + layer[i].id + "']").parentNode;
|
||||
blockParent.style.left = (blockParent.getBoundingClientRect().left + window.scrollX) - (drag.getBoundingClientRect().left + window.scrollX) + "px";
|
||||
blockParent.style.top = (blockParent.getBoundingClientRect().top + window.scrollY) - (drag.getBoundingClientRect().top + window.scrollY) + "px";
|
||||
arrowParent.style.left = (arrowParent.getBoundingClientRect().left + window.scrollX) - (drag.getBoundingClientRect().left + window.scrollX) + "px";
|
||||
arrowParent.style.top = (arrowParent.getBoundingClientRect().top + window.scrollY) - (drag.getBoundingClientRect().top + window.scrollY) + "px";
|
||||
drag.appendChild(blockParent);
|
||||
drag.appendChild(arrowParent);
|
||||
foundids.push(layer[i].id);
|
||||
allids.push(layer[i].id);
|
||||
}
|
||||
}
|
||||
if (foundids.length == 0) {
|
||||
flag = true;
|
||||
} else {
|
||||
layer = blocks.filter(a => foundids.includes(a.parent));
|
||||
foundids = [];
|
||||
}
|
||||
}
|
||||
for (var i = 0; i < blocks.filter(a => a.parent == blockid).length; i++) {
|
||||
var blocknumber = blocks.filter(a => a.parent == blockid)[i];
|
||||
blocks = blocks.filter(function (e) {
|
||||
return e.id != blocknumber
|
||||
});
|
||||
}
|
||||
for (var i = 0; i < allids.length; i++) {
|
||||
var blocknumber = allids[i];
|
||||
blocks = blocks.filter(function (e) {
|
||||
return e.id != blocknumber
|
||||
});
|
||||
}
|
||||
if (blocks.length > 1) {
|
||||
rearrangeMe();
|
||||
}
|
||||
dragblock = false;
|
||||
}
|
||||
if (active) {
|
||||
drag.style.left = mouse_x - dragx + "px";
|
||||
drag.style.top = mouse_y - dragy + "px";
|
||||
} else if (rearrange) {
|
||||
drag.style.left = mouse_x - dragx - (window.scrollX + absx) + canvas_div.scrollLeft + "px";
|
||||
drag.style.top = mouse_y - dragy - (window.scrollY + absy) + canvas_div.scrollTop + "px";
|
||||
blockstemp.filter(a => a.id == parseInt(drag.querySelector(".blockid").value)).x = (drag.getBoundingClientRect().left + window.scrollX) + (parseInt(window.getComputedStyle(drag).width) / 2) + canvas_div.scrollLeft;
|
||||
blockstemp.filter(a => a.id == parseInt(drag.querySelector(".blockid").value)).y = (drag.getBoundingClientRect().top + window.scrollY) + (parseInt(window.getComputedStyle(drag).height) / 2) + canvas_div.scrollTop;
|
||||
}
|
||||
if (active || rearrange) {
|
||||
if (mouse_x > canvas_div.getBoundingClientRect().width + canvas_div.getBoundingClientRect().left - 10 && mouse_x < canvas_div.getBoundingClientRect().width + canvas_div.getBoundingClientRect().left + 10) {
|
||||
canvas_div.scrollLeft += 10;
|
||||
} else if (mouse_x < canvas_div.getBoundingClientRect().left + 10 && mouse_x > canvas_div.getBoundingClientRect().left - 10) {
|
||||
canvas_div.scrollLeft -= 10;
|
||||
} else if (mouse_y > canvas_div.getBoundingClientRect().height + canvas_div.getBoundingClientRect().top - 10 && mouse_y < canvas_div.getBoundingClientRect().height + canvas_div.getBoundingClientRect().top + 10) {
|
||||
canvas_div.scrollTop += 10;
|
||||
} else if (mouse_y < canvas_div.getBoundingClientRect().top + 10 && mouse_y > canvas_div.getBoundingClientRect().top - 10) {
|
||||
canvas_div.scrollLeft -= 10;
|
||||
}
|
||||
var xpos = (drag.getBoundingClientRect().left + window.scrollX) + (parseInt(window.getComputedStyle(drag).width) / 2) + canvas_div.scrollLeft - canvas_div.getBoundingClientRect().left;
|
||||
var ypos = (drag.getBoundingClientRect().top + window.scrollY) + canvas_div.scrollTop - canvas_div.getBoundingClientRect().top;
|
||||
var blocko = blocks.map(a => a.id);
|
||||
for (var i = 0; i < blocks.length; i++) {
|
||||
if (checkAttach(blocko[i])) {
|
||||
document.querySelector(".blockid[value='" + blocko[i] + "']").parentNode.appendChild(document.querySelector(".indicator"));
|
||||
document.querySelector(".indicator").style.left = (document.querySelector(".blockid[value='" + blocko[i] + "']").parentNode.offsetWidth / 2) - 5 + "px";
|
||||
document.querySelector(".indicator").style.top = document.querySelector(".blockid[value='" + blocko[i] + "']").parentNode.offsetHeight + "px";
|
||||
document.querySelector(".indicator").classList.remove("invisible");
|
||||
break;
|
||||
} else if (i == blocks.length - 1) {
|
||||
if (!document.querySelector(".indicator").classList.contains("invisible")) {
|
||||
document.querySelector(".indicator").classList.add("invisible");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function checkOffset() {
|
||||
offsetleft = blocks.map(a => a.x);
|
||||
var widths = blocks.map(a => a.width);
|
||||
var mathmin = offsetleft.map(function (item, index) {
|
||||
return item - (widths[index] / 2);
|
||||
})
|
||||
offsetleft = Math.min.apply(Math, mathmin);
|
||||
if (offsetleft < (canvas_div.getBoundingClientRect().left + window.scrollX - absx)) {
|
||||
var blocko = blocks.map(a => a.id);
|
||||
for (var w = 0; w < blocks.length; w++) {
|
||||
document.querySelector(".blockid[value='" + blocks.filter(a => a.id == blocko[w])[0].id + "']").parentNode.style.left = blocks.filter(a => a.id == blocko[w])[0].x - (blocks.filter(a => a.id == blocko[w])[0].width / 2) - offsetleft + canvas_div.getBoundingClientRect().left - absx + 20 + "px";
|
||||
if (blocks.filter(a => a.id == blocko[w])[0].parent != -1) {
|
||||
var arrowblock = blocks.filter(a => a.id == blocko[w])[0];
|
||||
var arrowx = arrowblock.x - blocks.filter(a => a.id == blocks.filter(a => a.id == blocko[w])[0].parent)[0].x;
|
||||
if (arrowx < 0) {
|
||||
document.querySelector('.arrowid[value="' + blocko[w] + '"]').parentNode.style.left = (arrowblock.x - offsetleft + 20 - 5) + canvas_div.getBoundingClientRect().left - absx + "px";
|
||||
} else {
|
||||
document.querySelector('.arrowid[value="' + blocko[w] + '"]').parentNode.style.left = blocks.filter(id => id.id == blocks.filter(a => a.id == blocko[w])[0].parent)[0].x - 20 - offsetleft + canvas_div.getBoundingClientRect().left - absx + 20 + "px";
|
||||
}
|
||||
}
|
||||
}
|
||||
for (var w = 0; w < blocks.length; w++) {
|
||||
blocks[w].x = (document.querySelector(".blockid[value='" + blocks[w].id + "']").parentNode.getBoundingClientRect().left + window.scrollX) + (canvas_div.scrollLeft) + (parseInt(window.getComputedStyle(document.querySelector(".blockid[value='" + blocks[w].id + "']").parentNode).width) / 2) - 20 - canvas_div.getBoundingClientRect().left;
|
||||
}
|
||||
}
|
||||
}
|
||||
function rearrangeMe() {
|
||||
var result = blocks.map(a => a.parent);
|
||||
for (var z = 0; z < result.length; z++) {
|
||||
if (result[z] == -1) {
|
||||
z++;
|
||||
}
|
||||
var totalwidth = 0;
|
||||
var totalremove = 0;
|
||||
var maxheight = 0;
|
||||
for (var w = 0; w < blocks.filter(id => id.parent == result[z]).length; w++) {
|
||||
var children = blocks.filter(id => id.parent == result[z])[w];
|
||||
if (blocks.filter(id => id.parent == children.id).length == 0) {
|
||||
children.childwidth = 0;
|
||||
}
|
||||
if (children.childwidth > children.width) {
|
||||
if (w == blocks.filter(id => id.parent == result[z]).length - 1) {
|
||||
totalwidth += children.childwidth;
|
||||
} else {
|
||||
totalwidth += children.childwidth + paddingx;
|
||||
}
|
||||
} else {
|
||||
if (w == blocks.filter(id => id.parent == result[z]).length - 1) {
|
||||
totalwidth += children.width;
|
||||
} else {
|
||||
totalwidth += children.width + paddingx;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (result[z] != -1) {
|
||||
blocks.filter(a => a.id == result[z])[0].childwidth = totalwidth;
|
||||
}
|
||||
for (var w = 0; w < blocks.filter(id => id.parent == result[z]).length; w++) {
|
||||
var children = blocks.filter(id => id.parent == result[z])[w];
|
||||
const r_block = document.querySelector(".blockid[value='" + children.id + "']").parentNode;
|
||||
const r_array = blocks.filter(id => id.id == result[z]);
|
||||
r_block.style.top = r_array.y + paddingy + canvas_div.getBoundingClientRect().top - absy + "px";
|
||||
r_array.y = r_array.y + paddingy;
|
||||
if (children.childwidth > children.width) {
|
||||
r_block.style.left = r_array[0].x - (totalwidth / 2) + totalremove + (children.childwidth / 2) - (children.width / 2) - (absx + window.scrollX) + canvas_div.getBoundingClientRect().left + "px";
|
||||
children.x = r_array[0].x - (totalwidth / 2) + totalremove + (children.childwidth / 2);
|
||||
totalremove += children.childwidth + paddingx;
|
||||
} else {
|
||||
r_block.style.left = r_array[0].x - (totalwidth / 2) + totalremove - (absx + window.scrollX) + canvas_div.getBoundingClientRect().left + "px";
|
||||
children.x = r_array[0].x - (totalwidth / 2) + totalremove + (children.width / 2);
|
||||
totalremove += children.width + paddingx;
|
||||
}
|
||||
var arrowblock = blocks.filter(a => a.id == children.id)[0];
|
||||
var arrowx = arrowblock.x - blocks.filter(a => a.id == children.parent)[0].x + 20;
|
||||
var arrowy = paddingy;
|
||||
updateArrow(arrowblock, arrowx, arrowy, children);
|
||||
}
|
||||
}
|
||||
}
|
||||
document.addEventListener("mousedown", flowy.beginDrag);
|
||||
document.addEventListener("mousedown", touchblock, false);
|
||||
document.addEventListener("touchstart", flowy.beginDrag);
|
||||
document.addEventListener("touchstart", touchblock, false);
|
||||
document.addEventListener("mouseup", touchblock, false);
|
||||
document.addEventListener("mousemove", flowy.moveBlock, false);
|
||||
document.addEventListener("touchmove", flowy.moveBlock, false);
|
||||
document.addEventListener("mouseup", flowy.endDrag, false);
|
||||
document.addEventListener("touchend", flowy.endDrag, false);
|
||||
flowy.remove = function () {
|
||||
document.removeEventListener("touchstart", touchblock, false);
|
||||
document.removeEventListener("mouseup", touchblock, false);
|
||||
document.removeEventListener("mousedown", touchblock, false);
|
||||
}
|
||||
}
|
||||
function blockGrabbed(block) {
|
||||
grab(block);
|
||||
}
|
||||
function blockReleased(event) {
|
||||
release(event);
|
||||
}
|
||||
function blockSnap(drag, first, parent) {
|
||||
return snapping(drag, first, parent);
|
||||
}
|
||||
function beforeDelete(drag, parent) {
|
||||
return rearrange(drag, parent);
|
||||
}
|
||||
function addEventListenerMulti(type, listener, capture, selector) {
|
||||
var nodes = document.querySelectorAll(selector);
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
nodes[i].addEventListener(type, listener, capture);
|
||||
}
|
||||
}
|
||||
function removeEventListenerMulti(type, listener, capture, selector) {
|
||||
var nodes = document.querySelectorAll(selector);
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
nodes[i].removeEventListener(type, listener, capture);
|
||||
}
|
||||
}
|
||||
flowy.load();
|
||||
flowy.destroy = function () {
|
||||
document.removeEventListener("mousedown", flowy.beginDrag);
|
||||
document.removeEventListener("touchstart", flowy.beginDrag);
|
||||
document.removeEventListener("mousemove", flowy.moveBlock, false);
|
||||
document.removeEventListener("touchmove", flowy.moveBlock, false);
|
||||
document.removeEventListener("mouseup", flowy.endDrag, false);
|
||||
document.removeEventListener("touchend", flowy.endDrag, false);
|
||||
eval("flowy.remove()");
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
flowy.destroy();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
.dragging {z-index: 111 !important}.block {position: absolute;z-index: 9}.indicator {width: 12px;height: 12px;border-radius: 60px;background-color: #217ce8;margin-top: -5px;opacity: 1;transition: all .3s cubic-bezier(.05,.03,.35,1);transform: scale(1);position: absolute;z-index: 2}.invisible {opacity: 0 !important;transform: scale(0)}.indicator:after {content: "";display: block;width: 12px;height: 12px;background-color: #217ce8;transform: scale(1.7);opacity: .2;border-radius: 60px}.arrowblock {position: absolute;width: 100%;overflow: visible;pointer-events: none}.arrowblock svg {width: -webkit-fill-available;overflow: visible;}
|
||||
@@ -0,0 +1,640 @@
|
||||
body, html {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
overflow: hidden;
|
||||
background-image: url(assets/tile.png);
|
||||
background-repeat: repeat;
|
||||
background-size: 30px 30px;
|
||||
background-color: #FBFBFB;
|
||||
height: 100%;
|
||||
}
|
||||
#navigation {
|
||||
height: 71px;
|
||||
background-color: #FFF;
|
||||
border: 1px solid #E8E8EF;
|
||||
width: 100%;
|
||||
display: table;
|
||||
box-sizing: border-box;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
z-index: 9
|
||||
}
|
||||
#back {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 100px;
|
||||
background-color: #F1F4FC;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin-top: 12px;
|
||||
margin-right: 10px
|
||||
}
|
||||
#back img {
|
||||
margin-top: 13px;
|
||||
}
|
||||
#names {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
#title {
|
||||
font-family: Roboto;
|
||||
font-weight: 500;
|
||||
font-size: 16px;
|
||||
color: #393C44;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
#subtitle {
|
||||
font-family: Roboto;
|
||||
color: #808292;
|
||||
font-size: 14px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
#leftside {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin-left: 20px;
|
||||
}
|
||||
#centerswitch {
|
||||
position: absolute;
|
||||
width: 222px;
|
||||
left: 50%;
|
||||
margin-left: -111px;
|
||||
top: 15px;
|
||||
}
|
||||
#leftswitch {
|
||||
border: 1px solid #E8E8EF;
|
||||
background-color: #FBFBFB;
|
||||
width: 111px;
|
||||
height: 39px;
|
||||
line-height: 39px;
|
||||
border-radius: 5px 0px 0px 5px;
|
||||
font-family: Roboto;
|
||||
color: #393C44;
|
||||
display: inline-block;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
}
|
||||
#rightswitch {
|
||||
font-family: Roboto;
|
||||
color: #808292;
|
||||
border-radius: 0px 5px 5px 0px;
|
||||
border: 1px solid #E8E8EF;
|
||||
height: 39px;
|
||||
width: 102px;
|
||||
display: inline-block;
|
||||
font-size: 14px;
|
||||
line-height: 39px;
|
||||
text-align: center;
|
||||
margin-left: -5px;
|
||||
}
|
||||
#discard {
|
||||
font-family: Roboto;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
color: #A6A6B3;
|
||||
width: 95px;
|
||||
height: 38px;
|
||||
border: 1px solid #E8E8EF;
|
||||
border-radius: 5px;
|
||||
text-align: center;
|
||||
line-height: 38px;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
transition: all .2s cubic-bezier(.05,.03,.35,1);
|
||||
}
|
||||
#discard:hover {
|
||||
cursor: pointer;
|
||||
opacity: .7;
|
||||
}
|
||||
#publish {
|
||||
font-family: Roboto;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
color: #FFF;
|
||||
background-color: #217CE8;
|
||||
border-radius: 5px;
|
||||
width: 143px;
|
||||
height: 38px;
|
||||
margin-left: 10px;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
text-align: center;
|
||||
line-height: 38px;
|
||||
margin-right: 20px;
|
||||
transition: all .2s cubic-bezier(.05,.03,.35,1);
|
||||
}
|
||||
#publish:hover {
|
||||
cursor: pointer;
|
||||
opacity: .7;
|
||||
}
|
||||
#buttonsright {
|
||||
float: right;
|
||||
margin-top: 15px;
|
||||
}
|
||||
#leftcard {
|
||||
width: 363px;
|
||||
background-color: #FFF;
|
||||
border: 1px solid #E8E8EF;
|
||||
box-sizing: border-box;
|
||||
padding-top: 85px;
|
||||
padding-left: 20px;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
}
|
||||
#search input {
|
||||
width: 318px;
|
||||
height: 40px;
|
||||
background-color: #FFF;
|
||||
border: 1px solid #E8E8EF;
|
||||
box-sizing: border-box;
|
||||
box-shadow: 0px 2px 8px rgba(34,34,87,0.05);
|
||||
border-radius: 5px;
|
||||
text-indent: 35px;
|
||||
font-family: Roboto;
|
||||
font-size: 16px;
|
||||
}
|
||||
::-webkit-input-placeholder { /* Edge */
|
||||
color: #C9C9D5;
|
||||
}
|
||||
:-ms-input-placeholder { /* Internet Explorer 10-11 */
|
||||
color: #C9C9D5
|
||||
}
|
||||
::placeholder {
|
||||
color: #C9C9D5;
|
||||
}
|
||||
#search img {
|
||||
position: absolute;
|
||||
margin-top: 10px;
|
||||
width: 18px;
|
||||
margin-left: 12px;
|
||||
}
|
||||
#header {
|
||||
font-size: 20px;
|
||||
font-family: Roboto;
|
||||
font-weight: bold;
|
||||
color: #393C44;
|
||||
}
|
||||
#subnav {
|
||||
border-bottom: 1px solid #E8E8EF;
|
||||
width: calc(100% + 20px);
|
||||
margin-left: -20px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.navdisabled {
|
||||
transition: all .3s cubic-bezier(.05,.03,.35,1);
|
||||
}
|
||||
.navdisabled:hover {
|
||||
cursor: pointer;
|
||||
opacity: .5;
|
||||
}
|
||||
.navactive {
|
||||
color: #393C44 !important;
|
||||
}
|
||||
#triggers {
|
||||
margin-left: 20px;
|
||||
font-family: Roboto;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
color: #808292;
|
||||
width: calc(88% / 3);
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
display: inline-block;
|
||||
float: left;
|
||||
}
|
||||
.navactive:after {
|
||||
display: block;
|
||||
content: "";
|
||||
width: 100%;
|
||||
height: 4px;
|
||||
background-color: #217CE8;
|
||||
margin-top: -4px;
|
||||
}
|
||||
#actions {
|
||||
display: inline-block;
|
||||
font-family: Roboto;
|
||||
font-weight: 500;
|
||||
color: #808292;
|
||||
font-size: 14px;
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
width: calc(88% / 3);
|
||||
text-align: center;
|
||||
float: left;
|
||||
}
|
||||
#loggers {
|
||||
width: calc(88% / 3);
|
||||
display: inline-block;
|
||||
font-family: Roboto;
|
||||
font-weight: 500;
|
||||
color: #808292;
|
||||
font-size: 14px;
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
text-align: center;
|
||||
}
|
||||
#footer {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
padding-left: 20px;
|
||||
line-height: 40px;
|
||||
bottom: 0;
|
||||
width: 362px;
|
||||
border: 1px solid #E8E8EF;
|
||||
height: 67px;
|
||||
box-sizing: border-box;
|
||||
background-color: #FFF;
|
||||
font-family: Roboto;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
#footer a {
|
||||
text-decoration: none;
|
||||
color: #393C44;
|
||||
transition: all .2s cubic-bezier(.05,.03,.35,1);
|
||||
}
|
||||
#footer a:hover {
|
||||
opacity: .5;
|
||||
}
|
||||
#footer span {
|
||||
color: #808292;
|
||||
}
|
||||
#footer p {
|
||||
display: inline-block;
|
||||
color: #808292;
|
||||
}
|
||||
#footer img {
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.blockelem:first-child {
|
||||
margin-top: 20px
|
||||
}
|
||||
.blockelem {
|
||||
padding-top: 10px;
|
||||
width: 318px;
|
||||
border: 1px solid transparent;
|
||||
transition-property: box-shadow, height;
|
||||
transition-duration: .2s;
|
||||
transition-timing-function: cubic-bezier(.05,.03,.35,1);
|
||||
border-radius: 5px;
|
||||
box-shadow: 0px 0px 30px rgba(22, 33, 74, 0);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.blockelem:hover {
|
||||
box-shadow: 0px 4px 30px rgba(22, 33, 74, 0.08);
|
||||
border-radius: 5px;
|
||||
background-color: #FFF;
|
||||
cursor: pointer;
|
||||
}
|
||||
.grabme, .blockico {
|
||||
display: inline-block;
|
||||
}
|
||||
.grabme {
|
||||
margin-top: 10px;
|
||||
margin-left: 10px;
|
||||
margin-bottom: -14px;
|
||||
width: 15px;
|
||||
}
|
||||
#blocklist {
|
||||
height: calc(100% - 220px);
|
||||
overflow: auto;
|
||||
float: left;
|
||||
}
|
||||
#proplist {
|
||||
height: calc(100% - 305px);
|
||||
overflow: auto;
|
||||
margin-top: -30px;
|
||||
padding-top: 30px;
|
||||
}
|
||||
.blockin {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin-left: 12px;
|
||||
}
|
||||
.blockico {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
background-color: #F1F4FC;
|
||||
border-radius: 5px;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.blockico span {
|
||||
height: 100%;
|
||||
width: 0px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.blockico img {
|
||||
vertical-align: middle;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
display: inline-block;
|
||||
}
|
||||
.blocktext {
|
||||
display: inline-block;
|
||||
width: 220px;
|
||||
vertical-align: top;
|
||||
margin-left: 12px
|
||||
}
|
||||
.blocktitle {
|
||||
margin: 0px !important;
|
||||
padding: 0px !important;
|
||||
font-family: Roboto;
|
||||
font-weight: 500;
|
||||
font-size: 16px;
|
||||
color: #393C44;
|
||||
}
|
||||
.blockdesc {
|
||||
margin-top: 5px;
|
||||
font-family: Roboto;
|
||||
color: #808292;
|
||||
font-size: 14px;
|
||||
line-height: 21px;
|
||||
}
|
||||
.blockdisabled {
|
||||
background-color: #F0F2F9;
|
||||
opacity: .5;
|
||||
}
|
||||
#closecard {
|
||||
position: absolute;
|
||||
margin-left: 340px;
|
||||
background-color: #FFF;
|
||||
border-radius: 0px 5px 5px 0px;
|
||||
border-bottom: 1px solid #E8E8EF;
|
||||
border-right: 1px solid #E8E8EF;
|
||||
border-top: 1px solid #E8E8EF;
|
||||
width: 53px;
|
||||
height: 53px;
|
||||
text-align: center;
|
||||
z-index: 10;
|
||||
}
|
||||
#closecard img {
|
||||
margin-top: 15px
|
||||
}
|
||||
#canvas {
|
||||
position: absolute;
|
||||
width: calc(100% - 361px);
|
||||
height: calc(100% - 71px);
|
||||
top: 71px;
|
||||
left: 361px;
|
||||
z-index: 0;
|
||||
overflow: auto;
|
||||
}
|
||||
#propwrap {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 311px;
|
||||
height: 100%;
|
||||
padding-left: 20px;
|
||||
overflow: hidden;
|
||||
z-index: -2;
|
||||
}
|
||||
#properties {
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
width: 311px;
|
||||
background-color: #FFF;
|
||||
right: -150px;
|
||||
opacity: 0;
|
||||
z-index: 2;
|
||||
top: 0px;
|
||||
box-shadow: -4px 0px 40px rgba(26, 26, 73, 0);
|
||||
padding-left: 20px;
|
||||
transition: all .25s cubic-bezier(.05,.03,.35,1);
|
||||
}
|
||||
.itson {
|
||||
z-index: 2 !important;
|
||||
}
|
||||
.expanded {
|
||||
right: 0 !important;
|
||||
opacity: 1 !important;
|
||||
box-shadow: -4px 0px 40px rgba(26, 26, 73, 0.05);
|
||||
z-index: 2;
|
||||
}
|
||||
#header2 {
|
||||
font-size: 20px;
|
||||
font-family: Roboto;
|
||||
font-weight: bold;
|
||||
color: #393C44;
|
||||
margin-top: 101px;
|
||||
}
|
||||
#close {
|
||||
margin-top: 100px;
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
z-index: 9999;
|
||||
transition: all .25s cubic-bezier(.05,.03,.35,1);
|
||||
}
|
||||
#close:hover {
|
||||
cursor: pointer;
|
||||
opacity: .7;
|
||||
}
|
||||
#propswitch {
|
||||
border-bottom: 1px solid #E8E8EF;
|
||||
width: 331px;
|
||||
margin-top: 10px;
|
||||
margin-left: -20px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
#dataprop {
|
||||
font-family: Roboto;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
color: #393C44;
|
||||
width: calc(88% / 3);
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
display: inline-block;
|
||||
float: left;
|
||||
margin-left: 20px;
|
||||
}
|
||||
#dataprop:after {
|
||||
display: block;
|
||||
content: "";
|
||||
width: 100%;
|
||||
height: 4px;
|
||||
background-color: #217CE8;
|
||||
margin-top: -4px;
|
||||
}
|
||||
#alertprop {
|
||||
display: inline-block;
|
||||
font-family: Roboto;
|
||||
font-weight: 500;
|
||||
color: #808292;
|
||||
font-size: 14px;
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
width: calc(88% / 3);
|
||||
text-align: center;
|
||||
float: left;
|
||||
}
|
||||
#logsprop {
|
||||
width: calc(88% / 3);
|
||||
display: inline-block;
|
||||
font-family: Roboto;
|
||||
font-weight: 500;
|
||||
color: #808292;
|
||||
font-size: 14px;
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
text-align: center;
|
||||
}
|
||||
.inputlabel {
|
||||
font-family: Roboto;
|
||||
font-size: 14px;
|
||||
color: #253134;
|
||||
}
|
||||
.dropme {
|
||||
background-color: #FFF;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #E8E8EF;
|
||||
box-shadow: 0px 2px 8px rgba(34, 34, 87, 0.05);
|
||||
font-family: Roboto;
|
||||
font-size: 14px;
|
||||
color: #253134;
|
||||
text-indent: 20px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
width: 287px;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
.dropme img {
|
||||
margin-top: 17px;
|
||||
float: right;
|
||||
margin-right: 15px;
|
||||
}
|
||||
.checkus {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.checkus img {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.checkus p {
|
||||
display: inline-block;
|
||||
font-family: Roboto;
|
||||
font-size: 14px;
|
||||
vertical-align: middle;
|
||||
margin-left: 10px;
|
||||
}
|
||||
#divisionthing {
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
background-color: #E8E8EF;
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
bottom: 80;
|
||||
}
|
||||
#removeblock {
|
||||
border-radius: 5px;
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
font-family: Roboto;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
width: 287px;
|
||||
height: 38px;
|
||||
line-height: 38px;
|
||||
color: #253134;
|
||||
border: 1px solid #E8E8EF;
|
||||
transition: all .3s cubic-bezier(.05,.03,.35,1);
|
||||
}
|
||||
#removeblock:hover {
|
||||
cursor: pointer;
|
||||
opacity: .5;
|
||||
}
|
||||
.noselect {
|
||||
-webkit-touch-callout: none; /* iOS Safari */
|
||||
-webkit-user-select: none; /* Safari */
|
||||
-khtml-user-select: none; /* Konqueror HTML */
|
||||
-moz-user-select: none; /* Old versions of Firefox */
|
||||
-ms-user-select: none; /* Internet Explorer/Edge */
|
||||
user-select: none; /* Non-prefixed version, currently
|
||||
supported by Chrome, Opera and Firefox */
|
||||
}
|
||||
.blockyname {
|
||||
font-family: Roboto;
|
||||
font-weight: 500;
|
||||
color: #253134;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin-left: 8px;
|
||||
font-size: 16px;
|
||||
}
|
||||
.blockyleft img {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.blockyright {
|
||||
display: inline-block;
|
||||
float: right;
|
||||
vertical-align: middle;
|
||||
margin-right: 20px;
|
||||
margin-top: 10px;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-radius: 5px;
|
||||
text-align: center;
|
||||
background-color: #FFF;
|
||||
transition: all .3s cubic-bezier(.05,.03,.35,1);
|
||||
z-index: 10;
|
||||
}
|
||||
.blockyright:hover {
|
||||
background-color: #F1F4FC;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.blockyright img {
|
||||
margin-top: 12px;
|
||||
}
|
||||
.blockyleft {
|
||||
display: inline-block;
|
||||
margin-left: 20px;
|
||||
}
|
||||
.blockydiv {
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
background-color: #E9E9EF;
|
||||
}
|
||||
.blockyinfo {
|
||||
font-family: Roboto;
|
||||
font-size: 14px;
|
||||
color: #808292;
|
||||
margin-top: 15px;
|
||||
text-indent: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.blockyinfo span {
|
||||
color: #253134;
|
||||
font-weight: 500;
|
||||
display: inline-block;
|
||||
border-bottom: 1px solid #D3DCEA;
|
||||
line-height: 20px;
|
||||
text-indent: 0px;
|
||||
}
|
||||
.block {
|
||||
background-color: #FFF;
|
||||
margin-top: 0px !important;
|
||||
box-shadow: 0px 4px 30px rgba(22, 33, 74, 0.05);
|
||||
}
|
||||
.selectedblock {
|
||||
border: 2px solid #217CE8;
|
||||
box-shadow: 0px 4px 30px rgba(22, 33, 74, 0.08);
|
||||
}
|
||||
@media only screen and (max-width: 832px) {
|
||||
#centerswitch {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width: 560px) {
|
||||
#names {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
.gantt-container {
|
||||
width: auto;
|
||||
margin: 10px auto;
|
||||
}
|
||||
|
||||
.chart-controls {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.chart-controls > p {
|
||||
font-size: 1.2rem;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.chart-label {
|
||||
font-size: 1.5rem;
|
||||
text-align: center;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.gantt-container .popup-wrapper {
|
||||
width: 300px;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
/*.popup-wrapper {
|
||||
border: 1px solid black;
|
||||
background-color: #F4F5F6;
|
||||
}*/
|
||||
@@ -0,0 +1,133 @@
|
||||
.gantt .grid-background {
|
||||
fill: none;
|
||||
}
|
||||
.gantt .grid-header {
|
||||
fill: #ffffff;
|
||||
stroke: #e0e0e0;
|
||||
stroke-width: 1.4;
|
||||
}
|
||||
.gantt .grid-row {
|
||||
fill: #ffffff;
|
||||
}
|
||||
.gantt .grid-row:nth-child(even) {
|
||||
fill: #f5f5f5;
|
||||
}
|
||||
.gantt .row-line {
|
||||
stroke: #ebeff2;
|
||||
}
|
||||
.gantt .tick {
|
||||
stroke: #e0e0e0;
|
||||
stroke-width: 0.2;
|
||||
}
|
||||
.gantt .tick.thick {
|
||||
stroke-width: 0.4;
|
||||
}
|
||||
.gantt .today-highlight {
|
||||
fill: #fcf8e3;
|
||||
opacity: 0.5;
|
||||
}
|
||||
.gantt .arrow {
|
||||
fill: none;
|
||||
stroke: #666;
|
||||
stroke-width: 1.4;
|
||||
}
|
||||
.gantt .bar {
|
||||
fill: #b8c2cc;
|
||||
stroke: #8D99A6;
|
||||
stroke-width: 0;
|
||||
transition: stroke-width 0.3s ease;
|
||||
user-select: none;
|
||||
}
|
||||
.gantt .bar-progress {
|
||||
fill: #a3a3ff;
|
||||
}
|
||||
.gantt .bar-invalid {
|
||||
fill: transparent;
|
||||
stroke: #8D99A6;
|
||||
stroke-width: 1;
|
||||
stroke-dasharray: 5;
|
||||
}
|
||||
.gantt .bar-invalid ~ .bar-label {
|
||||
fill: #555;
|
||||
}
|
||||
.gantt .bar-label {
|
||||
fill: #fff;
|
||||
dominant-baseline: central;
|
||||
text-anchor: middle;
|
||||
font-size: 12px;
|
||||
font-weight: lighter;
|
||||
}
|
||||
.gantt .bar-label.big {
|
||||
fill: #555;
|
||||
text-anchor: start;
|
||||
}
|
||||
.gantt .handle {
|
||||
fill: #ddd;
|
||||
cursor: ew-resize;
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
.gantt .bar-wrapper {
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
}
|
||||
.gantt .bar-wrapper:hover .bar {
|
||||
fill: #a9b5c1;
|
||||
}
|
||||
.gantt .bar-wrapper:hover .bar-progress {
|
||||
fill: #8a8aff;
|
||||
}
|
||||
.gantt .bar-wrapper:hover .handle {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
}
|
||||
.gantt .bar-wrapper.active .bar {
|
||||
fill: #a9b5c1;
|
||||
}
|
||||
.gantt .bar-wrapper.active .bar-progress {
|
||||
fill: #8a8aff;
|
||||
}
|
||||
.gantt .lower-text, .gantt .upper-text {
|
||||
font-size: 12px;
|
||||
text-anchor: middle;
|
||||
}
|
||||
.gantt .upper-text {
|
||||
fill: #555;
|
||||
}
|
||||
.gantt .lower-text {
|
||||
fill: #333;
|
||||
}
|
||||
.gantt .hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.gantt-container {
|
||||
position: relative;
|
||||
overflow: auto;
|
||||
font-size: 12px;
|
||||
}
|
||||
.gantt-container .popup-wrapper {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
padding: 0;
|
||||
color: #959da5;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.gantt-container .popup-wrapper .title {
|
||||
border-bottom: 3px solid #a3a3ff;
|
||||
padding: 10px;
|
||||
}
|
||||
.gantt-container .popup-wrapper .subtitle {
|
||||
padding: 10px;
|
||||
color: #dfe2e5;
|
||||
}
|
||||
.gantt-container .popup-wrapper .pointer {
|
||||
position: absolute;
|
||||
height: 5px;
|
||||
margin: 0 0 0 -5px;
|
||||
border: 5px solid transparent;
|
||||
border-top-color: rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
loadganttchart = {
|
||||
load_ganttchart(tasks, elem, popuphtml_ins) {
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadJsFiles(["libs/frappe-gantt/js/frappe-gantt.min.js"], function () {
|
||||
Unibase.Platform.Helpers.FileCacheHelper.Instance().loadCssFiles(["libs/frappe-gantt/css/frappe-gantt.min.css", "libs/frappe-gantt/css/frappe-gantt-custom.css", "libs/frappe-gantt/css/frappe-gantt.css"], function () {
|
||||
let html = `<svg id="gantt" class=""></svg>
|
||||
<div class="chart-controls ma-20">
|
||||
<p class="hidden">Change Chart Timescale</p>
|
||||
<div class="button-cont TimeScale_Cls">
|
||||
<button id="day-btn" class="bg-primary">
|
||||
Day
|
||||
</button>
|
||||
|
||||
<button id="week-btn">
|
||||
Week
|
||||
</button>
|
||||
|
||||
<button id="month-btn">
|
||||
Month
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<p class="chart-label hidden"> Timescale: <span id="current-timescale">Day</span> </p>`;
|
||||
$(elem).append(html);
|
||||
let ganttChart = eval(`new Gantt("#gantt", tasks, {
|
||||
on_click: function (task) {
|
||||
//alert(task);
|
||||
},
|
||||
on_date_change: function(task, start, end) {
|
||||
//alert(task + "," + start + "," + end);
|
||||
},
|
||||
on_progress_change: function(task, progress) {
|
||||
//alert(task + "," + progress);
|
||||
},
|
||||
on_view_change: function(mode) {
|
||||
//alert(mode);
|
||||
},
|
||||
custom_popup_html: function(task) {
|
||||
//return Bizgaze.Apps.Transact.Controls.WorkOrderItems.Instance().getPopUpHtml(task);
|
||||
if(popuphtml_ins == "")
|
||||
{
|
||||
return loadganttchart.getpopuphtml(task);
|
||||
}
|
||||
else
|
||||
{
|
||||
return eval(popuphtml_ins);
|
||||
}
|
||||
}
|
||||
}
|
||||
)`);
|
||||
$(".chart-controls #day-btn").on("click", () => {
|
||||
ganttChart.change_view_mode("Day");
|
||||
$(".TimeScale_Cls").find("button").removeClass("bg-primary");
|
||||
$(".TimeScale_Cls").find("#day-btn").addClass("bg-primary");
|
||||
});
|
||||
$(".chart-controls #week-btn").on("click", () => {
|
||||
ganttChart.change_view_mode("Week");
|
||||
$(".TimeScale_Cls").find("button").removeClass("bg-primary");
|
||||
$(".TimeScale_Cls").find("#week-btn").addClass("bg-primary");
|
||||
});
|
||||
$(".chart-controls #month-btn").on("click", () => {
|
||||
ganttChart.change_view_mode("Month");
|
||||
$(".TimeScale_Cls").find("button").removeClass("bg-primary");
|
||||
$(".TimeScale_Cls").find("#month-btn").addClass("bg-primary");
|
||||
});
|
||||
});
|
||||
});
|
||||
},
|
||||
getpopuphtml(task) {
|
||||
return `<div class="details-container bg-light pa-5 text-left" style="border:2px solid black">
|
||||
<h5>${task.name}</h5>
|
||||
<p>Task Started on: ${task._start.getDate()}</p>
|
||||
<p>Expected to finish by ${task._end.getDate()}</p>
|
||||
<p>${task.progress}% completed!</p>
|
||||
</div>`;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,595 @@
|
||||
/**
|
||||
* jQuery Geocoding and Places Autocomplete Plugin - V 1.7.0
|
||||
*
|
||||
* @author Martin Kleppe <kleppe@ubilabs.net>, 2016
|
||||
* @author Ubilabs http://ubilabs.net, 2016
|
||||
* @license MIT License <http://www.opensource.org/licenses/mit-license.php>
|
||||
*/
|
||||
|
||||
// # $.geocomplete()
|
||||
// ## jQuery Geocoding and Places Autocomplete Plugin
|
||||
//
|
||||
// * https://github.com/ubilabs/geocomplete/
|
||||
// * by Martin Kleppe <kleppe@ubilabs.net>
|
||||
|
||||
(function ($, window, document, undefined) {
|
||||
|
||||
// ## Options
|
||||
// The default options for this plugin.
|
||||
//
|
||||
// * `map` - Might be a selector, an jQuery object or a DOM element. Default is `false` which shows no map.
|
||||
// * `details` - The container that should be populated with data. Defaults to `false` which ignores the setting.
|
||||
// * 'detailsScope' - Allows you to scope the 'details' container and have multiple geocomplete fields on one page. Must be a parent of the input. Default is 'null'
|
||||
// * `location` - Location to initialize the map on. Might be an address `string` or an `array` with [latitude, longitude] or a `google.maps.LatLng`object. Default is `false` which shows a blank map.
|
||||
// * `bounds` - Whether to snap geocode search to map bounds. Default: `true` if false search globally. Alternatively pass a custom `LatLngBounds object.
|
||||
// * `autoselect` - Automatically selects the highlighted item or the first item from the suggestions list on Enter.
|
||||
// * `detailsAttribute` - The attribute's name to use as an indicator. Default: `"name"`
|
||||
// * `mapOptions` - Options to pass to the `google.maps.Map` constructor. See the full list [here](http://code.google.com/apis/maps/documentation/javascript/reference.html#MapOptions).
|
||||
// * `mapOptions.zoom` - The inital zoom level. Default: `14`
|
||||
// * `mapOptions.scrollwheel` - Whether to enable the scrollwheel to zoom the map. Default: `false`
|
||||
// * `mapOptions.mapTypeId` - The map type. Default: `"roadmap"`
|
||||
// * `markerOptions` - The options to pass to the `google.maps.Marker` constructor. See the full list [here](http://code.google.com/apis/maps/documentation/javascript/reference.html#MarkerOptions).
|
||||
// * `markerOptions.draggable` - If the marker is draggable. Default: `false`. Set to true to enable dragging.
|
||||
// * `markerOptions.disabled` - Do not show marker. Default: `false`. Set to true to disable marker.
|
||||
// * `maxZoom` - The maximum zoom level too zoom in after a geocoding response. Default: `16`
|
||||
// * `types` - An array containing one or more of the supported types for the places request. Default: `['geocode']` See the full list [here](http://code.google.com/apis/maps/documentation/javascript/places.html#place_search_requests).
|
||||
// * `blur` - Trigger geocode when input loses focus.
|
||||
// * `geocodeAfterResult` - If blur is set to true, choose whether to geocode if user has explicitly selected a result before blur.
|
||||
// * `restoreValueAfterBlur` - Restores the input's value upon blurring. Default is `false` which ignores the setting.
|
||||
|
||||
var defaults = {
|
||||
bounds: true,
|
||||
country: null,
|
||||
map: false,
|
||||
details: false,
|
||||
detailsAttribute: "name",
|
||||
detailsScope: null,
|
||||
autoselect: true,
|
||||
location: false,
|
||||
|
||||
mapOptions: {
|
||||
zoom: 14,
|
||||
scrollwheel: true,
|
||||
mapTypeId: "roadmap"
|
||||
},
|
||||
|
||||
markerOptions: {
|
||||
draggable: false
|
||||
},
|
||||
|
||||
maxZoom: 16,
|
||||
types: ['geocode'],
|
||||
blur: false,
|
||||
geocodeAfterResult: false,
|
||||
restoreValueAfterBlur: false
|
||||
};
|
||||
|
||||
// See: [Geocoding Types](https://developers.google.com/maps/documentation/geocoding/#Types)
|
||||
// on Google Developers.
|
||||
var componentTypes = ("street_address route intersection political " +
|
||||
"country administrative_area_level_1 administrative_area_level_2 " +
|
||||
"administrative_area_level_3 colloquial_area locality sublocality " +
|
||||
"neighborhood premise subpremise postal_code natural_feature airport " +
|
||||
"park point_of_interest post_box street_number floor room " +
|
||||
"lat lng viewport location " +
|
||||
"formatted_address location_type bounds").split(" ");
|
||||
|
||||
// See: [Places Details Responses](https://developers.google.com/maps/documentation/javascript/places#place_details_responses)
|
||||
// on Google Developers.
|
||||
var placesDetails = ("id place_id url website vicinity reference name rating " +
|
||||
"international_phone_number icon formatted_phone_number").split(" ");
|
||||
|
||||
// The actual plugin constructor.
|
||||
function GeoComplete(input, options) {
|
||||
|
||||
this.options = $.extend(true, {}, defaults, options);
|
||||
|
||||
// This is a fix to allow types:[] not to be overridden by defaults
|
||||
// so search results includes everything
|
||||
if (options && options.types) {
|
||||
this.options.types = options.types;
|
||||
}
|
||||
|
||||
this.input = input;
|
||||
this.$input = $(input);
|
||||
|
||||
this._defaults = defaults;
|
||||
this._name = 'geocomplete';
|
||||
|
||||
this.init();
|
||||
}
|
||||
|
||||
// Initialize all parts of the plugin.
|
||||
$.extend(GeoComplete.prototype, {
|
||||
init: function () {
|
||||
this.initMap();
|
||||
this.initMarker();
|
||||
this.initGeocoder();
|
||||
this.initDetails();
|
||||
this.initLocation();
|
||||
},
|
||||
|
||||
// Initialize the map but only if the option `map` was set.
|
||||
// This will create a `map` within the given container
|
||||
// using the provided `mapOptions` or link to the existing map instance.
|
||||
initMap: function () {
|
||||
if (!this.options.map) { return; }
|
||||
|
||||
if (typeof this.options.map.setCenter == "function") {
|
||||
this.map = this.options.map;
|
||||
return;
|
||||
}
|
||||
|
||||
this.map = new google.maps.Map(
|
||||
$(this.options.map)[0],
|
||||
this.options.mapOptions
|
||||
);
|
||||
|
||||
// add click event listener on the map
|
||||
google.maps.event.addListener(
|
||||
this.map,
|
||||
'click',
|
||||
$.proxy(this.mapClicked, this)
|
||||
);
|
||||
|
||||
// add dragend even listener on the map
|
||||
google.maps.event.addListener(
|
||||
this.map,
|
||||
'dragend',
|
||||
$.proxy(this.mapDragged, this)
|
||||
);
|
||||
|
||||
// add idle even listener on the map
|
||||
google.maps.event.addListener(
|
||||
this.map,
|
||||
'idle',
|
||||
$.proxy(this.mapIdle, this)
|
||||
);
|
||||
|
||||
google.maps.event.addListener(
|
||||
this.map,
|
||||
'zoom_changed',
|
||||
$.proxy(this.mapZoomed, this)
|
||||
);
|
||||
},
|
||||
|
||||
// Add a marker with the provided `markerOptions` but only
|
||||
// if the option was set. Additionally it listens for the `dragend` event
|
||||
// to notify the plugin about changes.
|
||||
initMarker: function () {
|
||||
if (!this.map) { return; }
|
||||
var options = $.extend(this.options.markerOptions, { map: this.map });
|
||||
|
||||
if (options.disabled) { return; }
|
||||
|
||||
this.marker = new google.maps.Marker(options);
|
||||
|
||||
google.maps.event.addListener(
|
||||
this.marker,
|
||||
'dragend',
|
||||
$.proxy(this.markerDragged, this)
|
||||
);
|
||||
},
|
||||
|
||||
// Associate the input with the autocompleter and create a geocoder
|
||||
// to fall back when the autocompleter does not return a value.
|
||||
initGeocoder: function () {
|
||||
|
||||
// Indicates is user did select a result from the dropdown.
|
||||
var selected = false;
|
||||
|
||||
var options = {
|
||||
types: this.options.types,
|
||||
bounds: this.options.bounds === true ? null : this.options.bounds,
|
||||
componentRestrictions: this.options.componentRestrictions
|
||||
};
|
||||
|
||||
if (this.options.country) {
|
||||
options.componentRestrictions = { country: this.options.country };
|
||||
}
|
||||
|
||||
this.autocomplete = new google.maps.places.Autocomplete(
|
||||
this.input, options
|
||||
);
|
||||
|
||||
this.geocoder = new google.maps.Geocoder();
|
||||
|
||||
// Bind autocomplete to map bounds but only if there is a map
|
||||
// and `options.bindToMap` is set to true.
|
||||
if (this.map && this.options.bounds === true) {
|
||||
this.autocomplete.bindTo('bounds', this.map);
|
||||
}
|
||||
|
||||
// Watch `place_changed` events on the autocomplete input field.
|
||||
google.maps.event.addListener(
|
||||
this.autocomplete,
|
||||
'place_changed',
|
||||
$.proxy(this.placeChanged, this)
|
||||
);
|
||||
|
||||
// Prevent parent form from being submitted if user hit enter.
|
||||
this.$input.on('keypress.' + this._name, function (event) {
|
||||
if (event.keyCode === 13) { return false; }
|
||||
});
|
||||
|
||||
// Assume that if user types anything after having selected a result,
|
||||
// the selected location is not valid any more.
|
||||
if (this.options.geocodeAfterResult === true) {
|
||||
this.$input.bind('keypress.' + this._name, $.proxy(function () {
|
||||
if (event.keyCode != 9 && this.selected === true) {
|
||||
this.selected = false;
|
||||
}
|
||||
}, this));
|
||||
}
|
||||
|
||||
// Listen for "geocode" events and trigger find action.
|
||||
this.$input.bind('geocode.' + this._name, $.proxy(function () {
|
||||
this.find();
|
||||
}, this));
|
||||
|
||||
// Saves the previous input value
|
||||
this.$input.bind('geocode:result.' + this._name, $.proxy(function () {
|
||||
this.lastInputVal = this.$input.val();
|
||||
}, this));
|
||||
|
||||
// Trigger find action when input element is blurred out and user has
|
||||
// not explicitly selected a result.
|
||||
// (Useful for typing partial location and tabbing to the next field
|
||||
// or clicking somewhere else.)
|
||||
if (this.options.blur === true) {
|
||||
this.$input.on('blur.' + this._name, $.proxy(function () {
|
||||
if (this.options.geocodeAfterResult === true && this.selected === true) { return; }
|
||||
|
||||
if (this.options.restoreValueAfterBlur === true && this.selected === true) {
|
||||
setTimeout($.proxy(this.restoreLastValue, this), 0);
|
||||
} else {
|
||||
this.find();
|
||||
}
|
||||
}, this));
|
||||
}
|
||||
},
|
||||
|
||||
// Prepare a given DOM structure to be populated when we got some data.
|
||||
// This will cycle through the list of component types and map the
|
||||
// corresponding elements.
|
||||
initDetails: function () {
|
||||
if (!this.options.details) { return; }
|
||||
|
||||
if (this.options.detailsScope) {
|
||||
var $details = $(this.input).parents(this.options.detailsScope).find(this.options.details);
|
||||
} else {
|
||||
var $details = $(this.options.details);
|
||||
}
|
||||
|
||||
var attribute = this.options.detailsAttribute,
|
||||
details = {};
|
||||
|
||||
function setDetail(value) {
|
||||
details[value] = $details.find("[" + attribute + "=" + value + "]");
|
||||
}
|
||||
|
||||
$.each(componentTypes, function (index, key) {
|
||||
setDetail(key);
|
||||
setDetail(key + "_short");
|
||||
});
|
||||
|
||||
$.each(placesDetails, function (index, key) {
|
||||
setDetail(key);
|
||||
});
|
||||
|
||||
this.$details = $details;
|
||||
this.details = details;
|
||||
},
|
||||
|
||||
// Set the initial location of the plugin if the `location` options was set.
|
||||
// This method will care about converting the value into the right format.
|
||||
initLocation: function () {
|
||||
|
||||
var location = this.options.location, latLng;
|
||||
|
||||
if (!location) { return; }
|
||||
|
||||
if (typeof location == 'string') {
|
||||
this.find(location);
|
||||
return;
|
||||
}
|
||||
|
||||
if (location instanceof Array) {
|
||||
latLng = new google.maps.LatLng(location[0], location[1]);
|
||||
}
|
||||
|
||||
if (location instanceof google.maps.LatLng) {
|
||||
latLng = location;
|
||||
}
|
||||
|
||||
if (latLng) {
|
||||
if (this.map) { this.map.setCenter(latLng); }
|
||||
if (this.marker) { this.marker.setPosition(latLng); }
|
||||
}
|
||||
},
|
||||
|
||||
destroy: function () {
|
||||
if (this.map) {
|
||||
google.maps.event.clearInstanceListeners(this.map);
|
||||
google.maps.event.clearInstanceListeners(this.marker);
|
||||
}
|
||||
|
||||
this.autocomplete.unbindAll();
|
||||
google.maps.event.clearInstanceListeners(this.autocomplete);
|
||||
google.maps.event.clearInstanceListeners(this.input);
|
||||
this.$input.removeData();
|
||||
this.$input.off(this._name);
|
||||
this.$input.unbind('.' + this._name);
|
||||
},
|
||||
|
||||
// Look up a given address. If no `address` was specified it uses
|
||||
// the current value of the input.
|
||||
find: function (address) {
|
||||
this.geocode({
|
||||
address: address || this.$input.val()
|
||||
});
|
||||
},
|
||||
|
||||
// Requests details about a given location.
|
||||
// Additionally it will bias the requests to the provided bounds.
|
||||
geocode: function (request) {
|
||||
// Don't geocode if the requested address is empty
|
||||
if (!request.address) {
|
||||
return;
|
||||
}
|
||||
if (this.options.bounds && !request.bounds) {
|
||||
if (this.options.bounds === true) {
|
||||
request.bounds = this.map && this.map.getBounds();
|
||||
} else {
|
||||
request.bounds = this.options.bounds;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.options.country) {
|
||||
request.region = this.options.country;
|
||||
}
|
||||
|
||||
this.geocoder.geocode(request, $.proxy(this.handleGeocode, this));
|
||||
},
|
||||
|
||||
// Get the selected result. If no result is selected on the list, then get
|
||||
// the first result from the list.
|
||||
selectFirstResult: function () {
|
||||
//$(".pac-container").hide();
|
||||
|
||||
var selected = '';
|
||||
// Check if any result is selected.
|
||||
if ($(".pac-item-selected")[0]) {
|
||||
selected = '-selected';
|
||||
}
|
||||
|
||||
// Get the first suggestion's text.
|
||||
var $span1 = $(".pac-container:visible .pac-item" + selected + ":first span:nth-child(2)").text();
|
||||
var $span2 = $(".pac-container:visible .pac-item" + selected + ":first span:nth-child(3)").text();
|
||||
|
||||
// Adds the additional information, if available.
|
||||
var firstResult = $span1;
|
||||
if ($span2) {
|
||||
firstResult += " - " + $span2;
|
||||
}
|
||||
|
||||
this.$input.val(firstResult);
|
||||
|
||||
return firstResult;
|
||||
},
|
||||
|
||||
// Restores the input value using the previous value if it exists
|
||||
restoreLastValue: function () {
|
||||
if (this.lastInputVal) { this.$input.val(this.lastInputVal); }
|
||||
},
|
||||
|
||||
// Handles the geocode response. If more than one results was found
|
||||
// it triggers the "geocode:multiple" events. If there was an error
|
||||
// the "geocode:error" event is fired.
|
||||
handleGeocode: function (results, status) {
|
||||
if (status === google.maps.GeocoderStatus.OK) {
|
||||
var result = results[0];
|
||||
this.$input.val(result.formatted_address);
|
||||
this.update(result);
|
||||
|
||||
if (results.length > 1) {
|
||||
this.trigger("geocode:multiple", results);
|
||||
}
|
||||
|
||||
} else {
|
||||
this.trigger("geocode:error", status);
|
||||
}
|
||||
},
|
||||
|
||||
// Triggers a given `event` with optional `arguments` on the input.
|
||||
trigger: function (event, argument) {
|
||||
this.$input.trigger(event, [argument]);
|
||||
},
|
||||
|
||||
// Set the map to a new center by passing a `geometry`.
|
||||
// If the geometry has a viewport, the map zooms out to fit the bounds.
|
||||
// Additionally it updates the marker position.
|
||||
center: function (geometry) {
|
||||
if (geometry.viewport) {
|
||||
this.map.fitBounds(geometry.viewport);
|
||||
if (this.map.getZoom() > this.options.maxZoom) {
|
||||
this.map.setZoom(this.options.maxZoom);
|
||||
}
|
||||
} else {
|
||||
this.map.setZoom(this.options.maxZoom);
|
||||
this.map.setCenter(geometry.location);
|
||||
}
|
||||
|
||||
if (this.marker) {
|
||||
this.marker.setPosition(geometry.location);
|
||||
this.marker.setAnimation(this.options.markerOptions.animation);
|
||||
}
|
||||
},
|
||||
|
||||
// Update the elements based on a single places or geocoding response
|
||||
// and trigger the "geocode:result" event on the input.
|
||||
update: function (result) {
|
||||
|
||||
if (this.map) {
|
||||
this.center(result.geometry);
|
||||
}
|
||||
|
||||
if (this.$details) {
|
||||
this.fillDetails(result);
|
||||
}
|
||||
|
||||
this.trigger("geocode:result", result);
|
||||
},
|
||||
|
||||
// Populate the provided elements with new `result` data.
|
||||
// This will lookup all elements that has an attribute with the given
|
||||
// component type.
|
||||
fillDetails: function (result) {
|
||||
|
||||
var data = {},
|
||||
geometry = result.geometry,
|
||||
viewport = geometry.viewport,
|
||||
bounds = geometry.bounds;
|
||||
|
||||
// Create a simplified version of the address components.
|
||||
$.each(result.address_components, function (index, object) {
|
||||
var name = object.types[0];
|
||||
|
||||
$.each(object.types, function (index, name) {
|
||||
data[name] = object.long_name;
|
||||
data[name + "_short"] = object.short_name;
|
||||
});
|
||||
});
|
||||
|
||||
// Add properties of the places details.
|
||||
$.each(placesDetails, function (index, key) {
|
||||
data[key] = result[key];
|
||||
});
|
||||
|
||||
// Add infos about the address and geometry.
|
||||
$.extend(data, {
|
||||
formatted_address: result.formatted_address,
|
||||
location_type: geometry.location_type || "PLACES",
|
||||
viewport: viewport,
|
||||
bounds: bounds,
|
||||
location: geometry.location,
|
||||
lat: geometry.location.lat(),
|
||||
lng: geometry.location.lng()
|
||||
});
|
||||
|
||||
// Set the values for all details.
|
||||
$.each(this.details, $.proxy(function (key, $detail) {
|
||||
var value = data[key];
|
||||
this.setDetail($detail, value);
|
||||
}, this));
|
||||
|
||||
this.data = data;
|
||||
},
|
||||
|
||||
// Assign a given `value` to a single `$element`.
|
||||
// If the element is an input, the value is set, otherwise it updates
|
||||
// the text content.
|
||||
setDetail: function ($element, value) {
|
||||
|
||||
if (value === undefined) {
|
||||
value = "";
|
||||
} else if (typeof value.toUrlValue == "function") {
|
||||
value = value.toUrlValue();
|
||||
}
|
||||
|
||||
if ($element.is(":input")) {
|
||||
$element.val(value);
|
||||
} else {
|
||||
$element.text(value);
|
||||
}
|
||||
},
|
||||
|
||||
// Fire the "geocode:dragged" event and pass the new position.
|
||||
markerDragged: function (event) {
|
||||
this.trigger("geocode:dragged", event.latLng);
|
||||
},
|
||||
markerPositionChanged: function (event) {
|
||||
this.trigger("geocode:dragged", event.latLng);
|
||||
},
|
||||
mapClicked: function (event) {
|
||||
this.trigger("geocode:click", event.latLng);
|
||||
},
|
||||
|
||||
// Fire the "geocode:mapdragged" event and pass the current position of the map center.
|
||||
mapDragged: function (event) {
|
||||
this.trigger("geocode:mapdragged", this.map.getCenter());
|
||||
},
|
||||
|
||||
// Fire the "geocode:idle" event and pass the current position of the map center.
|
||||
mapIdle: function (event) {
|
||||
this.trigger("geocode:idle", this.map.getCenter());
|
||||
},
|
||||
|
||||
mapZoomed: function (event) {
|
||||
this.trigger("geocode:zoom", this.map.getZoom());
|
||||
},
|
||||
|
||||
// Restore the old position of the marker to the last knwon location.
|
||||
resetMarker: function () {
|
||||
this.marker.setPosition(this.data.location);
|
||||
this.setDetail(this.details.lat, this.data.location.lat());
|
||||
this.setDetail(this.details.lng, this.data.location.lng());
|
||||
},
|
||||
|
||||
// Update the plugin after the user has selected an autocomplete entry.
|
||||
// If the place has no geometry it passes it to the geocoder.
|
||||
placeChanged: function () {
|
||||
var place = this.autocomplete.getPlace();
|
||||
this.selected = true;
|
||||
|
||||
if (!place.geometry) {
|
||||
if (this.options.autoselect) {
|
||||
// Automatically selects the highlighted item or the first item from the
|
||||
// suggestions list.
|
||||
var autoSelection = this.selectFirstResult();
|
||||
this.find(autoSelection);
|
||||
}
|
||||
} else {
|
||||
// Use the input text if it already gives geometry.
|
||||
this.update(place);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// A plugin wrapper around the constructor.
|
||||
// Pass `options` with all settings that are different from the default.
|
||||
// The attribute is used to prevent multiple instantiations of the plugin.
|
||||
$.fn.geocomplete = function (options) {
|
||||
|
||||
var attribute = 'plugin_geocomplete';
|
||||
|
||||
// If you call `.geocomplete()` with a string as the first parameter
|
||||
// it returns the corresponding property or calls the method with the
|
||||
// following arguments.
|
||||
if (typeof options == "string") {
|
||||
|
||||
var instance = $(this).data(attribute) || $(this).geocomplete().data(attribute),
|
||||
prop = instance[options];
|
||||
|
||||
if (typeof prop == "function") {
|
||||
prop.apply(instance, Array.prototype.slice.call(arguments, 1));
|
||||
return $(this);
|
||||
} else {
|
||||
if (arguments.length == 2) {
|
||||
prop = arguments[1];
|
||||
}
|
||||
return prop;
|
||||
}
|
||||
} else {
|
||||
return this.each(function () {
|
||||
// Prevent against multiple instantiations.
|
||||
var instance = $.data(this, attribute);
|
||||
if (!instance) {
|
||||
instance = new GeoComplete(this, options);
|
||||
$.data(this, attribute, instance);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
})(jQuery, window, document);
|
||||
@@ -0,0 +1,556 @@
|
||||
/*!
|
||||
* gridstack 1.1.2 extra CSS for [2-11] columns (non default)
|
||||
* https://gridstackjs.com/
|
||||
* (c) 2014-2020 Alain Dumesny, Dylan Weiss, Pavel Reznikov
|
||||
* gridstack.js may be freely distributed under the MIT license.
|
||||
*/
|
||||
.grid-stack.grid-stack-2 > .grid-stack-item {
|
||||
min-width: 50%; }
|
||||
.grid-stack.grid-stack-2 > .grid-stack-item[data-gs-width='1'] {
|
||||
width: 50%; }
|
||||
.grid-stack.grid-stack-2 > .grid-stack-item[data-gs-x='1'] {
|
||||
left: 50%; }
|
||||
.grid-stack.grid-stack-2 > .grid-stack-item[data-gs-min-width='1'] {
|
||||
min-width: 50%; }
|
||||
.grid-stack.grid-stack-2 > .grid-stack-item[data-gs-max-width='1'] {
|
||||
max-width: 50%; }
|
||||
.grid-stack.grid-stack-2 > .grid-stack-item[data-gs-width='2'] {
|
||||
width: 100%; }
|
||||
.grid-stack.grid-stack-2 > .grid-stack-item[data-gs-x='2'] {
|
||||
left: 100%; }
|
||||
.grid-stack.grid-stack-2 > .grid-stack-item[data-gs-min-width='2'] {
|
||||
min-width: 100%; }
|
||||
.grid-stack.grid-stack-2 > .grid-stack-item[data-gs-max-width='2'] {
|
||||
max-width: 100%; }
|
||||
|
||||
.grid-stack.grid-stack-3 > .grid-stack-item {
|
||||
min-width: 33.3333333333%; }
|
||||
.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-width='1'] {
|
||||
width: 33.3333333333%; }
|
||||
.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-x='1'] {
|
||||
left: 33.3333333333%; }
|
||||
.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-min-width='1'] {
|
||||
min-width: 33.3333333333%; }
|
||||
.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-max-width='1'] {
|
||||
max-width: 33.3333333333%; }
|
||||
.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-width='2'] {
|
||||
width: 66.6666666667%; }
|
||||
.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-x='2'] {
|
||||
left: 66.6666666667%; }
|
||||
.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-min-width='2'] {
|
||||
min-width: 66.6666666667%; }
|
||||
.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-max-width='2'] {
|
||||
max-width: 66.6666666667%; }
|
||||
.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-width='3'] {
|
||||
width: 100%; }
|
||||
.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-x='3'] {
|
||||
left: 100%; }
|
||||
.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-min-width='3'] {
|
||||
min-width: 100%; }
|
||||
.grid-stack.grid-stack-3 > .grid-stack-item[data-gs-max-width='3'] {
|
||||
max-width: 100%; }
|
||||
|
||||
.grid-stack.grid-stack-4 > .grid-stack-item {
|
||||
min-width: 25%; }
|
||||
.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-width='1'] {
|
||||
width: 25%; }
|
||||
.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-x='1'] {
|
||||
left: 25%; }
|
||||
.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-min-width='1'] {
|
||||
min-width: 25%; }
|
||||
.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-max-width='1'] {
|
||||
max-width: 25%; }
|
||||
.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-width='2'] {
|
||||
width: 50%; }
|
||||
.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-x='2'] {
|
||||
left: 50%; }
|
||||
.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-min-width='2'] {
|
||||
min-width: 50%; }
|
||||
.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-max-width='2'] {
|
||||
max-width: 50%; }
|
||||
.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-width='3'] {
|
||||
width: 75%; }
|
||||
.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-x='3'] {
|
||||
left: 75%; }
|
||||
.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-min-width='3'] {
|
||||
min-width: 75%; }
|
||||
.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-max-width='3'] {
|
||||
max-width: 75%; }
|
||||
.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-width='4'] {
|
||||
width: 100%; }
|
||||
.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-x='4'] {
|
||||
left: 100%; }
|
||||
.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-min-width='4'] {
|
||||
min-width: 100%; }
|
||||
.grid-stack.grid-stack-4 > .grid-stack-item[data-gs-max-width='4'] {
|
||||
max-width: 100%; }
|
||||
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item {
|
||||
min-width: 20%; }
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-width='1'] {
|
||||
width: 20%; }
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-x='1'] {
|
||||
left: 20%; }
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-min-width='1'] {
|
||||
min-width: 20%; }
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-max-width='1'] {
|
||||
max-width: 20%; }
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-width='2'] {
|
||||
width: 40%; }
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-x='2'] {
|
||||
left: 40%; }
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-min-width='2'] {
|
||||
min-width: 40%; }
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-max-width='2'] {
|
||||
max-width: 40%; }
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-width='3'] {
|
||||
width: 60%; }
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-x='3'] {
|
||||
left: 60%; }
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-min-width='3'] {
|
||||
min-width: 60%; }
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-max-width='3'] {
|
||||
max-width: 60%; }
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-width='4'] {
|
||||
width: 80%; }
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-x='4'] {
|
||||
left: 80%; }
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-min-width='4'] {
|
||||
min-width: 80%; }
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-max-width='4'] {
|
||||
max-width: 80%; }
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-width='5'] {
|
||||
width: 100%; }
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-x='5'] {
|
||||
left: 100%; }
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-min-width='5'] {
|
||||
min-width: 100%; }
|
||||
.grid-stack.grid-stack-5 > .grid-stack-item[data-gs-max-width='5'] {
|
||||
max-width: 100%; }
|
||||
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item {
|
||||
min-width: 16.6666666667%; }
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-width='1'] {
|
||||
width: 16.6666666667%; }
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-x='1'] {
|
||||
left: 16.6666666667%; }
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-min-width='1'] {
|
||||
min-width: 16.6666666667%; }
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-max-width='1'] {
|
||||
max-width: 16.6666666667%; }
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-width='2'] {
|
||||
width: 33.3333333333%; }
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-x='2'] {
|
||||
left: 33.3333333333%; }
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-min-width='2'] {
|
||||
min-width: 33.3333333333%; }
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-max-width='2'] {
|
||||
max-width: 33.3333333333%; }
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-width='3'] {
|
||||
width: 50%; }
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-x='3'] {
|
||||
left: 50%; }
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-min-width='3'] {
|
||||
min-width: 50%; }
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-max-width='3'] {
|
||||
max-width: 50%; }
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-width='4'] {
|
||||
width: 66.6666666667%; }
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-x='4'] {
|
||||
left: 66.6666666667%; }
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-min-width='4'] {
|
||||
min-width: 66.6666666667%; }
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-max-width='4'] {
|
||||
max-width: 66.6666666667%; }
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-width='5'] {
|
||||
width: 83.3333333333%; }
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-x='5'] {
|
||||
left: 83.3333333333%; }
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-min-width='5'] {
|
||||
min-width: 83.3333333333%; }
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-max-width='5'] {
|
||||
max-width: 83.3333333333%; }
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-width='6'] {
|
||||
width: 100%; }
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-x='6'] {
|
||||
left: 100%; }
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-min-width='6'] {
|
||||
min-width: 100%; }
|
||||
.grid-stack.grid-stack-6 > .grid-stack-item[data-gs-max-width='6'] {
|
||||
max-width: 100%; }
|
||||
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item {
|
||||
min-width: 14.2857142857%; }
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-width='1'] {
|
||||
width: 14.2857142857%; }
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-x='1'] {
|
||||
left: 14.2857142857%; }
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-min-width='1'] {
|
||||
min-width: 14.2857142857%; }
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-max-width='1'] {
|
||||
max-width: 14.2857142857%; }
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-width='2'] {
|
||||
width: 28.5714285714%; }
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-x='2'] {
|
||||
left: 28.5714285714%; }
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-min-width='2'] {
|
||||
min-width: 28.5714285714%; }
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-max-width='2'] {
|
||||
max-width: 28.5714285714%; }
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-width='3'] {
|
||||
width: 42.8571428571%; }
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-x='3'] {
|
||||
left: 42.8571428571%; }
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-min-width='3'] {
|
||||
min-width: 42.8571428571%; }
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-max-width='3'] {
|
||||
max-width: 42.8571428571%; }
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-width='4'] {
|
||||
width: 57.1428571429%; }
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-x='4'] {
|
||||
left: 57.1428571429%; }
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-min-width='4'] {
|
||||
min-width: 57.1428571429%; }
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-max-width='4'] {
|
||||
max-width: 57.1428571429%; }
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-width='5'] {
|
||||
width: 71.4285714286%; }
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-x='5'] {
|
||||
left: 71.4285714286%; }
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-min-width='5'] {
|
||||
min-width: 71.4285714286%; }
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-max-width='5'] {
|
||||
max-width: 71.4285714286%; }
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-width='6'] {
|
||||
width: 85.7142857143%; }
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-x='6'] {
|
||||
left: 85.7142857143%; }
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-min-width='6'] {
|
||||
min-width: 85.7142857143%; }
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-max-width='6'] {
|
||||
max-width: 85.7142857143%; }
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-width='7'] {
|
||||
width: 100%; }
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-x='7'] {
|
||||
left: 100%; }
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-min-width='7'] {
|
||||
min-width: 100%; }
|
||||
.grid-stack.grid-stack-7 > .grid-stack-item[data-gs-max-width='7'] {
|
||||
max-width: 100%; }
|
||||
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item {
|
||||
min-width: 12.5%; }
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-width='1'] {
|
||||
width: 12.5%; }
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-x='1'] {
|
||||
left: 12.5%; }
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-min-width='1'] {
|
||||
min-width: 12.5%; }
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-max-width='1'] {
|
||||
max-width: 12.5%; }
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-width='2'] {
|
||||
width: 25%; }
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-x='2'] {
|
||||
left: 25%; }
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-min-width='2'] {
|
||||
min-width: 25%; }
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-max-width='2'] {
|
||||
max-width: 25%; }
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-width='3'] {
|
||||
width: 37.5%; }
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-x='3'] {
|
||||
left: 37.5%; }
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-min-width='3'] {
|
||||
min-width: 37.5%; }
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-max-width='3'] {
|
||||
max-width: 37.5%; }
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-width='4'] {
|
||||
width: 50%; }
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-x='4'] {
|
||||
left: 50%; }
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-min-width='4'] {
|
||||
min-width: 50%; }
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-max-width='4'] {
|
||||
max-width: 50%; }
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-width='5'] {
|
||||
width: 62.5%; }
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-x='5'] {
|
||||
left: 62.5%; }
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-min-width='5'] {
|
||||
min-width: 62.5%; }
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-max-width='5'] {
|
||||
max-width: 62.5%; }
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-width='6'] {
|
||||
width: 75%; }
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-x='6'] {
|
||||
left: 75%; }
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-min-width='6'] {
|
||||
min-width: 75%; }
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-max-width='6'] {
|
||||
max-width: 75%; }
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-width='7'] {
|
||||
width: 87.5%; }
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-x='7'] {
|
||||
left: 87.5%; }
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-min-width='7'] {
|
||||
min-width: 87.5%; }
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-max-width='7'] {
|
||||
max-width: 87.5%; }
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-width='8'] {
|
||||
width: 100%; }
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-x='8'] {
|
||||
left: 100%; }
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-min-width='8'] {
|
||||
min-width: 100%; }
|
||||
.grid-stack.grid-stack-8 > .grid-stack-item[data-gs-max-width='8'] {
|
||||
max-width: 100%; }
|
||||
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item {
|
||||
min-width: 11.1111111111%; }
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-width='1'] {
|
||||
width: 11.1111111111%; }
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-x='1'] {
|
||||
left: 11.1111111111%; }
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-min-width='1'] {
|
||||
min-width: 11.1111111111%; }
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-max-width='1'] {
|
||||
max-width: 11.1111111111%; }
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-width='2'] {
|
||||
width: 22.2222222222%; }
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-x='2'] {
|
||||
left: 22.2222222222%; }
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-min-width='2'] {
|
||||
min-width: 22.2222222222%; }
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-max-width='2'] {
|
||||
max-width: 22.2222222222%; }
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-width='3'] {
|
||||
width: 33.3333333333%; }
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-x='3'] {
|
||||
left: 33.3333333333%; }
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-min-width='3'] {
|
||||
min-width: 33.3333333333%; }
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-max-width='3'] {
|
||||
max-width: 33.3333333333%; }
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-width='4'] {
|
||||
width: 44.4444444444%; }
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-x='4'] {
|
||||
left: 44.4444444444%; }
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-min-width='4'] {
|
||||
min-width: 44.4444444444%; }
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-max-width='4'] {
|
||||
max-width: 44.4444444444%; }
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-width='5'] {
|
||||
width: 55.5555555556%; }
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-x='5'] {
|
||||
left: 55.5555555556%; }
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-min-width='5'] {
|
||||
min-width: 55.5555555556%; }
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-max-width='5'] {
|
||||
max-width: 55.5555555556%; }
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-width='6'] {
|
||||
width: 66.6666666667%; }
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-x='6'] {
|
||||
left: 66.6666666667%; }
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-min-width='6'] {
|
||||
min-width: 66.6666666667%; }
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-max-width='6'] {
|
||||
max-width: 66.6666666667%; }
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-width='7'] {
|
||||
width: 77.7777777778%; }
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-x='7'] {
|
||||
left: 77.7777777778%; }
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-min-width='7'] {
|
||||
min-width: 77.7777777778%; }
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-max-width='7'] {
|
||||
max-width: 77.7777777778%; }
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-width='8'] {
|
||||
width: 88.8888888889%; }
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-x='8'] {
|
||||
left: 88.8888888889%; }
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-min-width='8'] {
|
||||
min-width: 88.8888888889%; }
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-max-width='8'] {
|
||||
max-width: 88.8888888889%; }
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-width='9'] {
|
||||
width: 100%; }
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-x='9'] {
|
||||
left: 100%; }
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-min-width='9'] {
|
||||
min-width: 100%; }
|
||||
.grid-stack.grid-stack-9 > .grid-stack-item[data-gs-max-width='9'] {
|
||||
max-width: 100%; }
|
||||
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item {
|
||||
min-width: 10%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='1'] {
|
||||
width: 10%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='1'] {
|
||||
left: 10%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='1'] {
|
||||
min-width: 10%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='1'] {
|
||||
max-width: 10%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='2'] {
|
||||
width: 20%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='2'] {
|
||||
left: 20%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='2'] {
|
||||
min-width: 20%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='2'] {
|
||||
max-width: 20%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='3'] {
|
||||
width: 30%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='3'] {
|
||||
left: 30%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='3'] {
|
||||
min-width: 30%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='3'] {
|
||||
max-width: 30%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='4'] {
|
||||
width: 40%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='4'] {
|
||||
left: 40%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='4'] {
|
||||
min-width: 40%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='4'] {
|
||||
max-width: 40%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='5'] {
|
||||
width: 50%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='5'] {
|
||||
left: 50%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='5'] {
|
||||
min-width: 50%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='5'] {
|
||||
max-width: 50%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='6'] {
|
||||
width: 60%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='6'] {
|
||||
left: 60%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='6'] {
|
||||
min-width: 60%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='6'] {
|
||||
max-width: 60%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='7'] {
|
||||
width: 70%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='7'] {
|
||||
left: 70%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='7'] {
|
||||
min-width: 70%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='7'] {
|
||||
max-width: 70%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='8'] {
|
||||
width: 80%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='8'] {
|
||||
left: 80%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='8'] {
|
||||
min-width: 80%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='8'] {
|
||||
max-width: 80%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='9'] {
|
||||
width: 90%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='9'] {
|
||||
left: 90%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='9'] {
|
||||
min-width: 90%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='9'] {
|
||||
max-width: 90%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-width='10'] {
|
||||
width: 100%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-x='10'] {
|
||||
left: 100%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-min-width='10'] {
|
||||
min-width: 100%; }
|
||||
.grid-stack.grid-stack-10 > .grid-stack-item[data-gs-max-width='10'] {
|
||||
max-width: 100%; }
|
||||
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item {
|
||||
min-width: 9.0909090909%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='1'] {
|
||||
width: 9.0909090909%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='1'] {
|
||||
left: 9.0909090909%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='1'] {
|
||||
min-width: 9.0909090909%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='1'] {
|
||||
max-width: 9.0909090909%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='2'] {
|
||||
width: 18.1818181818%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='2'] {
|
||||
left: 18.1818181818%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='2'] {
|
||||
min-width: 18.1818181818%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='2'] {
|
||||
max-width: 18.1818181818%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='3'] {
|
||||
width: 27.2727272727%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='3'] {
|
||||
left: 27.2727272727%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='3'] {
|
||||
min-width: 27.2727272727%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='3'] {
|
||||
max-width: 27.2727272727%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='4'] {
|
||||
width: 36.3636363636%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='4'] {
|
||||
left: 36.3636363636%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='4'] {
|
||||
min-width: 36.3636363636%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='4'] {
|
||||
max-width: 36.3636363636%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='5'] {
|
||||
width: 45.4545454545%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='5'] {
|
||||
left: 45.4545454545%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='5'] {
|
||||
min-width: 45.4545454545%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='5'] {
|
||||
max-width: 45.4545454545%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='6'] {
|
||||
width: 54.5454545455%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='6'] {
|
||||
left: 54.5454545455%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='6'] {
|
||||
min-width: 54.5454545455%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='6'] {
|
||||
max-width: 54.5454545455%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='7'] {
|
||||
width: 63.6363636364%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='7'] {
|
||||
left: 63.6363636364%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='7'] {
|
||||
min-width: 63.6363636364%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='7'] {
|
||||
max-width: 63.6363636364%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='8'] {
|
||||
width: 72.7272727273%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='8'] {
|
||||
left: 72.7272727273%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='8'] {
|
||||
min-width: 72.7272727273%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='8'] {
|
||||
max-width: 72.7272727273%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='9'] {
|
||||
width: 81.8181818182%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='9'] {
|
||||
left: 81.8181818182%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='9'] {
|
||||
min-width: 81.8181818182%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='9'] {
|
||||
max-width: 81.8181818182%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='10'] {
|
||||
width: 90.9090909091%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='10'] {
|
||||
left: 90.9090909091%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='10'] {
|
||||
min-width: 90.9090909091%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='10'] {
|
||||
max-width: 90.9090909091%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-width='11'] {
|
||||
width: 100%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-x='11'] {
|
||||
left: 100%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-min-width='11'] {
|
||||
min-width: 100%; }
|
||||
.grid-stack.grid-stack-11 > .grid-stack-item[data-gs-max-width='11'] {
|
||||
max-width: 100%; }
|
||||
|
||||
@@ -0,0 +1,121 @@
|
||||
/** gridstack.js 1.1.2 - IE and older browsers Polyfills for this library @preserve*/
|
||||
/**
|
||||
* https://gridstackjs.com/
|
||||
* (c) 2019-2020 Alain Dumesny
|
||||
* gridstack.js may be freely distributed under the MIT license.
|
||||
*/
|
||||
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent
|
||||
(function () {
|
||||
if (typeof window.CustomEvent === "function") {
|
||||
return false;
|
||||
}
|
||||
|
||||
function CustomEvent (event, params) {
|
||||
params = params || {bubbles: false, cancelable: false, detail: null};
|
||||
var evt = document.createEvent('CustomEvent');
|
||||
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
|
||||
return evt;
|
||||
}
|
||||
|
||||
window.CustomEvent = CustomEvent;
|
||||
})();
|
||||
|
||||
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN
|
||||
Number.isNaN = Number.isNaN || function isNaN(input) {
|
||||
return typeof input === 'number' && input !== input;
|
||||
}
|
||||
|
||||
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find
|
||||
if (!Array.prototype.find) {
|
||||
Object.defineProperty(Array.prototype, 'find', {
|
||||
value: function (predicate) {
|
||||
// 1. Let O be ? ToObject(this value).
|
||||
if (this == null) {
|
||||
throw TypeError('"this" is null or not defined');
|
||||
}
|
||||
|
||||
var o = Object(this);
|
||||
|
||||
// 2. Let len be ? ToLength(? Get(O, "length")).
|
||||
var len = o.length >>> 0;
|
||||
|
||||
// 3. If IsCallable(predicate) is false, throw a TypeError exception.
|
||||
if (typeof predicate !== 'function') {
|
||||
throw TypeError('predicate must be a function');
|
||||
}
|
||||
|
||||
// 4. If thisArg was supplied, let T be thisArg; else let T be undefined.
|
||||
var thisArg = arguments[1];
|
||||
|
||||
// 5. Let k be 0.
|
||||
var k = 0;
|
||||
|
||||
// 6. Repeat, while k < len
|
||||
while (k < len) {
|
||||
// a. Let Pk be ! ToString(k).
|
||||
// b. Let kValue be ? Get(O, Pk).
|
||||
// c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)).
|
||||
// d. If testResult is true, return kValue.
|
||||
var kValue = o[k];
|
||||
if (predicate.call(thisArg, kValue, k, o)) {
|
||||
return kValue;
|
||||
}
|
||||
// e. Increase k by 1.
|
||||
k++;
|
||||
}
|
||||
|
||||
// 7. Return undefined.
|
||||
return undefined;
|
||||
},
|
||||
configurable: true,
|
||||
writable: true
|
||||
});
|
||||
}
|
||||
|
||||
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex
|
||||
if (!Array.prototype.findIndex) {
|
||||
Object.defineProperty(Array.prototype, 'findIndex', {
|
||||
value: function(predicate) {
|
||||
// 1. Let O be ? ToObject(this value).
|
||||
if (this == null) {
|
||||
throw new TypeError('"this" is null or not defined');
|
||||
}
|
||||
|
||||
var o = Object(this);
|
||||
|
||||
// 2. Let len be ? ToLength(? Get(O, "length")).
|
||||
var len = o.length >>> 0;
|
||||
|
||||
// 3. If IsCallable(predicate) is false, throw a TypeError exception.
|
||||
if (typeof predicate !== 'function') {
|
||||
throw new TypeError('predicate must be a function');
|
||||
}
|
||||
|
||||
// 4. If thisArg was supplied, let T be thisArg; else let T be undefined.
|
||||
var thisArg = arguments[1];
|
||||
|
||||
// 5. Let k be 0.
|
||||
var k = 0;
|
||||
|
||||
// 6. Repeat, while k < len
|
||||
while (k < len) {
|
||||
// a. Let Pk be ! ToString(k).
|
||||
// b. Let kValue be ? Get(O, Pk).
|
||||
// c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)).
|
||||
// d. If testResult is true, return k.
|
||||
var kValue = o[k];
|
||||
if (predicate.call(thisArg, kValue, k, o)) {
|
||||
return k;
|
||||
}
|
||||
// e. Increase k by 1.
|
||||
k++;
|
||||
}
|
||||
|
||||
// 7. Return -1.
|
||||
return -1;
|
||||
},
|
||||
configurable: true,
|
||||
writable: true
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
/** gridstack.js 1.1.2 - IE and older browsers Polyfills for this library @preserve*/
|
||||
"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(e,t){t=t||{bubbles:!1,cancelable:!1,detail:null};var r=document.createEvent("CustomEvent");return r.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),r}),Number.isNaN=Number.isNaN||function(e){return"number"==typeof e&&e!=e},Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null==this)throw TypeError('"this" is null or not defined');var t=Object(this),r=t.length>>>0;if("function"!=typeof e)throw TypeError("predicate must be a function");for(var n=arguments[1],o=0;o<r;){var i=t[o];if(e.call(n,i,o,t))return i;o++}},configurable:!0,writable:!0}),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(e){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),r=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var n=arguments[1],o=0;o<r;){var i=t[o];if(e.call(n,i,o,t))return o;o++}return-1},configurable:!0,writable:!0});
|
||||
@@ -0,0 +1,244 @@
|
||||
/*!
|
||||
* required gridstack 1.1.2 CSS for default 12 and 1 columnMode size. Use gridstack-extra.css for others
|
||||
* https://gridstackjs.com/
|
||||
* (c) 2014-2020 Alain Dumesny, Dylan Weiss, Pavel Reznikov
|
||||
* gridstack.js may be freely distributed under the MIT license.
|
||||
*/
|
||||
:root .grid-stack-item > .ui-resizable-handle {
|
||||
filter: none; }
|
||||
|
||||
.grid-stack {
|
||||
position: relative; }
|
||||
.grid-stack.grid-stack-rtl {
|
||||
direction: ltr; }
|
||||
.grid-stack.grid-stack-rtl > .grid-stack-item {
|
||||
direction: rtl; }
|
||||
.grid-stack .grid-stack-placeholder > .placeholder-content {
|
||||
border: 1px dashed lightgray;
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 10px;
|
||||
right: 10px;
|
||||
bottom: 0;
|
||||
width: auto;
|
||||
z-index: 0 !important;
|
||||
text-align: center; }
|
||||
.grid-stack > .grid-stack-item {
|
||||
min-width: 8.3333333333%;
|
||||
position: absolute;
|
||||
padding: 0; }
|
||||
.grid-stack > .grid-stack-item > .grid-stack-item-content {
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 10px;
|
||||
right: 10px;
|
||||
bottom: 0;
|
||||
width: auto;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto; }
|
||||
.grid-stack > .grid-stack-item > .ui-resizable-handle {
|
||||
position: absolute;
|
||||
font-size: 0.1px;
|
||||
display: block;
|
||||
-ms-touch-action: none;
|
||||
touch-action: none; }
|
||||
.grid-stack > .grid-stack-item.ui-resizable-disabled > .ui-resizable-handle,
|
||||
.grid-stack > .grid-stack-item.ui-resizable-autohide > .ui-resizable-handle {
|
||||
display: none; }
|
||||
.grid-stack > .grid-stack-item.ui-draggable-dragging, .grid-stack > .grid-stack-item.ui-resizable-resizing {
|
||||
z-index: 100; }
|
||||
.grid-stack > .grid-stack-item.ui-draggable-dragging > .grid-stack-item-content,
|
||||
.grid-stack > .grid-stack-item.ui-draggable-dragging > .grid-stack-item-content, .grid-stack > .grid-stack-item.ui-resizable-resizing > .grid-stack-item-content,
|
||||
.grid-stack > .grid-stack-item.ui-resizable-resizing > .grid-stack-item-content {
|
||||
box-shadow: 1px 4px 6px rgba(0, 0, 0, 0.2);
|
||||
opacity: 0.8; }
|
||||
.grid-stack > .grid-stack-item > .ui-resizable-se,
|
||||
.grid-stack > .grid-stack-item > .ui-resizable-sw {
|
||||
background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjE2cHgiIGhlaWdodD0iMTZweCIgdmlld0JveD0iMCAwIDUxMS42MjYgNTExLjYyNyIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNTExLjYyNiA1MTEuNjI3OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxnPgoJPHBhdGggZD0iTTMyOC45MDYsNDAxLjk5NGgtMzYuNTUzVjEwOS42MzZoMzYuNTUzYzQuOTQ4LDAsOS4yMzYtMS44MDksMTIuODQ3LTUuNDI2YzMuNjEzLTMuNjE1LDUuNDIxLTcuODk4LDUuNDIxLTEyLjg0NSAgIGMwLTQuOTQ5LTEuODAxLTkuMjMxLTUuNDI4LTEyLjg1MWwtNzMuMDg3LTczLjA5QzI2NS4wNDQsMS44MDksMjYwLjc2LDAsMjU1LjgxMywwYy00Ljk0OCwwLTkuMjI5LDEuODA5LTEyLjg0Nyw1LjQyNCAgIGwtNzMuMDg4LDczLjA5Yy0zLjYxOCwzLjYxOS01LjQyNCw3LjkwMi01LjQyNCwxMi44NTFjMCw0Ljk0NiwxLjgwNyw5LjIyOSw1LjQyNCwxMi44NDVjMy42MTksMy42MTcsNy45MDEsNS40MjYsMTIuODUsNS40MjYgICBoMzYuNTQ1djI5Mi4zNThoLTM2LjU0MmMtNC45NTIsMC05LjIzNSwxLjgwOC0xMi44NSw1LjQyMWMtMy42MTcsMy42MjEtNS40MjQsNy45MDUtNS40MjQsMTIuODU0ICAgYzAsNC45NDUsMS44MDcsOS4yMjcsNS40MjQsMTIuODQ3bDczLjA4OSw3My4wODhjMy42MTcsMy42MTcsNy44OTgsNS40MjQsMTIuODQ3LDUuNDI0YzQuOTUsMCw5LjIzNC0xLjgwNywxMi44NDktNS40MjQgICBsNzMuMDg3LTczLjA4OGMzLjYxMy0zLjYyLDUuNDIxLTcuOTAxLDUuNDIxLTEyLjg0N2MwLTQuOTQ4LTEuODA4LTkuMjMyLTUuNDIxLTEyLjg1NCAgIEMzMzguMTQyLDQwMy44MDIsMzMzLjg1Nyw0MDEuOTk0LDMyOC45MDYsNDAxLjk5NHoiIGZpbGw9IiM2NjY2NjYiLz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8Zz4KPC9nPgo8L3N2Zz4K);
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
-webkit-transform: rotate(45deg);
|
||||
-moz-transform: rotate(45deg);
|
||||
-ms-transform: rotate(45deg);
|
||||
-o-transform: rotate(45deg);
|
||||
transform: rotate(45deg); }
|
||||
.grid-stack > .grid-stack-item > .ui-resizable-se {
|
||||
-webkit-transform: rotate(-45deg);
|
||||
-moz-transform: rotate(-45deg);
|
||||
-ms-transform: rotate(-45deg);
|
||||
-o-transform: rotate(-45deg);
|
||||
transform: rotate(-45deg); }
|
||||
.grid-stack > .grid-stack-item > .ui-resizable-nw {
|
||||
cursor: nw-resize;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
left: 10px;
|
||||
top: 0; }
|
||||
.grid-stack > .grid-stack-item > .ui-resizable-n {
|
||||
cursor: n-resize;
|
||||
height: 10px;
|
||||
top: 0;
|
||||
left: 25px;
|
||||
right: 25px; }
|
||||
.grid-stack > .grid-stack-item > .ui-resizable-ne {
|
||||
cursor: ne-resize;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
right: 10px;
|
||||
top: 0; }
|
||||
.grid-stack > .grid-stack-item > .ui-resizable-e {
|
||||
cursor: e-resize;
|
||||
width: 10px;
|
||||
right: 10px;
|
||||
top: 15px;
|
||||
bottom: 15px; }
|
||||
.grid-stack > .grid-stack-item > .ui-resizable-se {
|
||||
cursor: se-resize;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
right: 10px;
|
||||
bottom: 0; }
|
||||
.grid-stack > .grid-stack-item > .ui-resizable-s {
|
||||
cursor: s-resize;
|
||||
height: 10px;
|
||||
left: 25px;
|
||||
bottom: 0;
|
||||
right: 25px; }
|
||||
.grid-stack > .grid-stack-item > .ui-resizable-sw {
|
||||
cursor: sw-resize;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
left: 10px;
|
||||
bottom: 0; }
|
||||
.grid-stack > .grid-stack-item > .ui-resizable-w {
|
||||
cursor: w-resize;
|
||||
width: 10px;
|
||||
left: 10px;
|
||||
top: 15px;
|
||||
bottom: 15px; }
|
||||
.grid-stack > .grid-stack-item.ui-draggable-dragging > .ui-resizable-handle {
|
||||
display: none !important; }
|
||||
.grid-stack > .grid-stack-item[data-gs-width='1'] {
|
||||
width: 8.3333333333%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-x='1'] {
|
||||
left: 8.3333333333%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-min-width='1'] {
|
||||
min-width: 8.3333333333%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-max-width='1'] {
|
||||
max-width: 8.3333333333%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-width='2'] {
|
||||
width: 16.6666666667%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-x='2'] {
|
||||
left: 16.6666666667%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-min-width='2'] {
|
||||
min-width: 16.6666666667%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-max-width='2'] {
|
||||
max-width: 16.6666666667%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-width='3'] {
|
||||
width: 25%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-x='3'] {
|
||||
left: 25%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-min-width='3'] {
|
||||
min-width: 25%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-max-width='3'] {
|
||||
max-width: 25%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-width='4'] {
|
||||
width: 33.3333333333%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-x='4'] {
|
||||
left: 33.3333333333%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-min-width='4'] {
|
||||
min-width: 33.3333333333%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-max-width='4'] {
|
||||
max-width: 33.3333333333%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-width='5'] {
|
||||
width: 41.6666666667%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-x='5'] {
|
||||
left: 41.6666666667%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-min-width='5'] {
|
||||
min-width: 41.6666666667%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-max-width='5'] {
|
||||
max-width: 41.6666666667%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-width='6'] {
|
||||
width: 50%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-x='6'] {
|
||||
left: 50%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-min-width='6'] {
|
||||
min-width: 50%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-max-width='6'] {
|
||||
max-width: 50%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-width='7'] {
|
||||
width: 58.3333333333%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-x='7'] {
|
||||
left: 58.3333333333%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-min-width='7'] {
|
||||
min-width: 58.3333333333%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-max-width='7'] {
|
||||
max-width: 58.3333333333%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-width='8'] {
|
||||
width: 66.6666666667%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-x='8'] {
|
||||
left: 66.6666666667%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-min-width='8'] {
|
||||
min-width: 66.6666666667%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-max-width='8'] {
|
||||
max-width: 66.6666666667%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-width='9'] {
|
||||
width: 75%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-x='9'] {
|
||||
left: 75%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-min-width='9'] {
|
||||
min-width: 75%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-max-width='9'] {
|
||||
max-width: 75%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-width='10'] {
|
||||
width: 83.3333333333%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-x='10'] {
|
||||
left: 83.3333333333%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-min-width='10'] {
|
||||
min-width: 83.3333333333%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-max-width='10'] {
|
||||
max-width: 83.3333333333%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-width='11'] {
|
||||
width: 91.6666666667%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-x='11'] {
|
||||
left: 91.6666666667%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-min-width='11'] {
|
||||
min-width: 91.6666666667%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-max-width='11'] {
|
||||
max-width: 91.6666666667%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-width='12'] {
|
||||
width: 100%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-x='12'] {
|
||||
left: 100%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-min-width='12'] {
|
||||
min-width: 100%; }
|
||||
.grid-stack > .grid-stack-item[data-gs-max-width='12'] {
|
||||
max-width: 100%; }
|
||||
.grid-stack.grid-stack-1 > .grid-stack-item {
|
||||
min-width: 100%; }
|
||||
.grid-stack.grid-stack-1 > .grid-stack-item[data-gs-width='1'] {
|
||||
width: 100%; }
|
||||
.grid-stack.grid-stack-1 > .grid-stack-item[data-gs-x='1'] {
|
||||
left: 100%; }
|
||||
.grid-stack.grid-stack-1 > .grid-stack-item[data-gs-min-width='1'] {
|
||||
min-width: 100%; }
|
||||
.grid-stack.grid-stack-1 > .grid-stack-item[data-gs-max-width='1'] {
|
||||
max-width: 100%; }
|
||||
.grid-stack.grid-stack-animate,
|
||||
.grid-stack.grid-stack-animate .grid-stack-item {
|
||||
-webkit-transition: left 0.3s, top 0.3s, height 0.3s, width 0.3s;
|
||||
-moz-transition: left 0.3s, top 0.3s, height 0.3s, width 0.3s;
|
||||
-ms-transition: left 0.3s, top 0.3s, height 0.3s, width 0.3s;
|
||||
-o-transition: left 0.3s, top 0.3s, height 0.3s, width 0.3s;
|
||||
transition: left 0.3s, top 0.3s, height 0.3s, width 0.3s; }
|
||||
.grid-stack.grid-stack-animate .grid-stack-item.ui-draggable-dragging,
|
||||
.grid-stack.grid-stack-animate .grid-stack-item.ui-resizable-resizing,
|
||||
.grid-stack.grid-stack-animate .grid-stack-item.grid-stack-placeholder {
|
||||
-webkit-transition: left 0s, top 0s, height 0s, width 0s;
|
||||
-moz-transition: left 0s, top 0s, height 0s, width 0s;
|
||||
-ms-transition: left 0s, top 0s, height 0s, width 0s;
|
||||
-o-transition: left 0s, top 0s, height 0s, width 0s;
|
||||
transition: left 0s, top 0s, height 0s, width 0s; }
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
/** gridstack.js 1.1.2 - JQuery UI Drag&Drop plugin @preserve */
|
||||
/**
|
||||
* https://gridstackjs.com/
|
||||
* (c) 2014-2020 Alain Dumesny, Dylan Weiss, Pavel Reznikov
|
||||
* gridstack.js may be freely distributed under the MIT license.
|
||||
*/
|
||||
(function(factory) {
|
||||
/* we compile this in so no need for required loading
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define(['jquery', 'gridstack', 'exports'], factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
try { jQuery = require('jquery'); } catch (e) {}
|
||||
try { gridstack = require('gridstack'); } catch (e) {}
|
||||
factory(jQuery, gridstack.GridStack, exports);
|
||||
} else */{
|
||||
factory(jQuery, GridStack, window);
|
||||
}
|
||||
})(function($, GridStack, scope) {
|
||||
/**
|
||||
* @class JQueryUIGridStackDragDropPlugin
|
||||
* jQuery UI implementation of drag'n'drop gridstack plugin.
|
||||
*/
|
||||
function JQueryUIGridStackDragDropPlugin(grid) {
|
||||
GridStack.DragDropPlugin.call(this, grid);
|
||||
}
|
||||
|
||||
GridStack.DragDropPlugin.registerPlugin(JQueryUIGridStackDragDropPlugin);
|
||||
|
||||
JQueryUIGridStackDragDropPlugin.prototype = Object.create(GridStack.DragDropPlugin.prototype);
|
||||
JQueryUIGridStackDragDropPlugin.prototype.constructor = JQueryUIGridStackDragDropPlugin;
|
||||
|
||||
JQueryUIGridStackDragDropPlugin.prototype.resizable = function(el, opts) {
|
||||
el = $(el);
|
||||
if (opts === 'disable' || opts === 'enable' || opts === 'destroy') {
|
||||
el.resizable(opts);
|
||||
} else if (opts === 'option') {
|
||||
var key = arguments[2];
|
||||
var value = arguments[3];
|
||||
el.resizable(opts, key, value);
|
||||
} else {
|
||||
var handles = el.data('gs-resize-handles') ? el.data('gs-resize-handles') :
|
||||
this.grid.opts.resizable.handles;
|
||||
el.resizable($.extend({}, this.grid.opts.resizable, {
|
||||
handles: handles
|
||||
}, {
|
||||
start: opts.start || function() {},
|
||||
stop: opts.stop || function() {},
|
||||
resize: opts.resize || function() {}
|
||||
}));
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
JQueryUIGridStackDragDropPlugin.prototype.draggable = function(el, opts) {
|
||||
el = $(el);
|
||||
if (opts === 'disable' || opts === 'enable' || opts === 'destroy') {
|
||||
el.draggable(opts);
|
||||
} else {
|
||||
el.draggable($.extend({}, this.grid.opts.draggable, {
|
||||
containment: (this.grid.opts.isNested && !this.grid.opts.dragOut) ?
|
||||
this.grid.$el.parent() :
|
||||
(this.grid.opts.draggable.containment || null),
|
||||
start: opts.start || function() {},
|
||||
stop: opts.stop || function() {},
|
||||
drag: opts.drag || function() {}
|
||||
}));
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
JQueryUIGridStackDragDropPlugin.prototype.droppable = function(el, opts) {
|
||||
el = $(el);
|
||||
el.droppable(opts);
|
||||
return this;
|
||||
};
|
||||
|
||||
JQueryUIGridStackDragDropPlugin.prototype.isDroppable = function(el, opts) {
|
||||
el = $(el);
|
||||
return Boolean(el.data('droppable'));
|
||||
};
|
||||
|
||||
JQueryUIGridStackDragDropPlugin.prototype.on = function(el, eventName, callback) {
|
||||
$(el).on(eventName, callback);
|
||||
return this;
|
||||
};
|
||||
|
||||
scope.JQueryUIGridStackDragDropPlugin = JQueryUIGridStackDragDropPlugin;
|
||||
|
||||
return JQueryUIGridStackDragDropPlugin;
|
||||
});
|
||||
@@ -0,0 +1,2 @@
|
||||
/** gridstack.js 1.1.2 - JQuery UI Drag&Drop plugin @preserve */
|
||||
!function(){function t(t){e.DragDropPlugin.call(this,t)}var o,e,r;o=jQuery,e=GridStack,r=window,e.DragDropPlugin.registerPlugin(t),((t.prototype=Object.create(e.DragDropPlugin.prototype)).constructor=t).prototype.resizable=function(t,e){if(t=o(t),"disable"===e||"enable"===e||"destroy"===e)t.resizable(e);else if("option"===e){var r=arguments[2],i=arguments[3];t.resizable(e,r,i)}else{var n=t.data("gs-resize-handles")?t.data("gs-resize-handles"):this.grid.opts.resizable.handles;t.resizable(o.extend({},this.grid.opts.resizable,{handles:n},{start:e.start||function(){},stop:e.stop||function(){},resize:e.resize||function(){}}))}return this},t.prototype.draggable=function(t,e){return t=o(t),"disable"===e||"enable"===e||"destroy"===e?t.draggable(e):t.draggable(o.extend({},this.grid.opts.draggable,{containment:this.grid.opts.isNested&&!this.grid.opts.dragOut?this.grid.$el.parent():this.grid.opts.draggable.containment||null,start:e.start||function(){},stop:e.stop||function(){},drag:e.drag||function(){}})),this},t.prototype.droppable=function(t,e){return(t=o(t)).droppable(e),this},t.prototype.isDroppable=function(t,e){return t=o(t),Boolean(t.data("droppable"))},t.prototype.on=function(t,e,r){return o(t).on(e,r),this},r.JQueryUIGridStackDragDropPlugin=t}();
|
||||
@@ -0,0 +1,46 @@
|
||||
import runtime from './handlebars.runtime';
|
||||
|
||||
// Compiler imports
|
||||
import AST from './handlebars/compiler/ast';
|
||||
import {
|
||||
parser as Parser,
|
||||
parse,
|
||||
parseWithoutProcessing
|
||||
} from './handlebars/compiler/base';
|
||||
import { Compiler, compile, precompile } from './handlebars/compiler/compiler';
|
||||
import JavaScriptCompiler from './handlebars/compiler/javascript-compiler';
|
||||
import Visitor from './handlebars/compiler/visitor';
|
||||
|
||||
import noConflict from './handlebars/no-conflict';
|
||||
|
||||
let _create = runtime.create;
|
||||
function create() {
|
||||
let hb = _create();
|
||||
|
||||
hb.compile = function(input, options) {
|
||||
return compile(input, options, hb);
|
||||
};
|
||||
hb.precompile = function(input, options) {
|
||||
return precompile(input, options, hb);
|
||||
};
|
||||
|
||||
hb.AST = AST;
|
||||
hb.Compiler = Compiler;
|
||||
hb.JavaScriptCompiler = JavaScriptCompiler;
|
||||
hb.Parser = Parser;
|
||||
hb.parse = parse;
|
||||
hb.parseWithoutProcessing = parseWithoutProcessing;
|
||||
|
||||
return hb;
|
||||
}
|
||||
|
||||
let inst = create();
|
||||
inst.create = create;
|
||||
|
||||
noConflict(inst);
|
||||
|
||||
inst.Visitor = Visitor;
|
||||
|
||||
inst['default'] = inst;
|
||||
|
||||
export default inst;
|
||||
@@ -0,0 +1,37 @@
|
||||
import * as base from './handlebars/base';
|
||||
|
||||
// Each of these augment the Handlebars object. No need to setup here.
|
||||
// (This is done to easily share code between commonjs and browse envs)
|
||||
import SafeString from './handlebars/safe-string';
|
||||
import Exception from './handlebars/exception';
|
||||
import * as Utils from './handlebars/utils';
|
||||
import * as runtime from './handlebars/runtime';
|
||||
|
||||
import noConflict from './handlebars/no-conflict';
|
||||
|
||||
// For compatibility and usage outside of module systems, make the Handlebars object a namespace
|
||||
function create() {
|
||||
let hb = new base.HandlebarsEnvironment();
|
||||
|
||||
Utils.extend(hb, base);
|
||||
hb.SafeString = SafeString;
|
||||
hb.Exception = Exception;
|
||||
hb.Utils = Utils;
|
||||
hb.escapeExpression = Utils.escapeExpression;
|
||||
|
||||
hb.VM = runtime;
|
||||
hb.template = function(spec) {
|
||||
return runtime.template(spec, hb);
|
||||
};
|
||||
|
||||
return hb;
|
||||
}
|
||||
|
||||
let inst = create();
|
||||
inst.create = create;
|
||||
|
||||
noConflict(inst);
|
||||
|
||||
inst['default'] = inst;
|
||||
|
||||
export default inst;
|
||||
@@ -0,0 +1,94 @@
|
||||
import { createFrame, extend, toString } from './utils';
|
||||
import Exception from './exception';
|
||||
import { registerDefaultHelpers } from './helpers';
|
||||
import { registerDefaultDecorators } from './decorators';
|
||||
import logger from './logger';
|
||||
import { resetLoggedProperties } from './internal/proto-access';
|
||||
|
||||
export const VERSION = '4.7.6';
|
||||
export const COMPILER_REVISION = 8;
|
||||
export const LAST_COMPATIBLE_COMPILER_REVISION = 7;
|
||||
|
||||
export const REVISION_CHANGES = {
|
||||
1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it
|
||||
2: '== 1.0.0-rc.3',
|
||||
3: '== 1.0.0-rc.4',
|
||||
4: '== 1.x.x',
|
||||
5: '== 2.0.0-alpha.x',
|
||||
6: '>= 2.0.0-beta.1',
|
||||
7: '>= 4.0.0 <4.3.0',
|
||||
8: '>= 4.3.0'
|
||||
};
|
||||
|
||||
const objectType = '[object Object]';
|
||||
|
||||
export function HandlebarsEnvironment(helpers, partials, decorators) {
|
||||
this.helpers = helpers || {};
|
||||
this.partials = partials || {};
|
||||
this.decorators = decorators || {};
|
||||
|
||||
registerDefaultHelpers(this);
|
||||
registerDefaultDecorators(this);
|
||||
}
|
||||
|
||||
HandlebarsEnvironment.prototype = {
|
||||
constructor: HandlebarsEnvironment,
|
||||
|
||||
logger: logger,
|
||||
log: logger.log,
|
||||
|
||||
registerHelper: function(name, fn) {
|
||||
if (toString.call(name) === objectType) {
|
||||
if (fn) {
|
||||
throw new Exception('Arg not supported with multiple helpers');
|
||||
}
|
||||
extend(this.helpers, name);
|
||||
} else {
|
||||
this.helpers[name] = fn;
|
||||
}
|
||||
},
|
||||
unregisterHelper: function(name) {
|
||||
delete this.helpers[name];
|
||||
},
|
||||
|
||||
registerPartial: function(name, partial) {
|
||||
if (toString.call(name) === objectType) {
|
||||
extend(this.partials, name);
|
||||
} else {
|
||||
if (typeof partial === 'undefined') {
|
||||
throw new Exception(
|
||||
`Attempting to register a partial called "${name}" as undefined`
|
||||
);
|
||||
}
|
||||
this.partials[name] = partial;
|
||||
}
|
||||
},
|
||||
unregisterPartial: function(name) {
|
||||
delete this.partials[name];
|
||||
},
|
||||
|
||||
registerDecorator: function(name, fn) {
|
||||
if (toString.call(name) === objectType) {
|
||||
if (fn) {
|
||||
throw new Exception('Arg not supported with multiple decorators');
|
||||
}
|
||||
extend(this.decorators, name);
|
||||
} else {
|
||||
this.decorators[name] = fn;
|
||||
}
|
||||
},
|
||||
unregisterDecorator: function(name) {
|
||||
delete this.decorators[name];
|
||||
},
|
||||
/**
|
||||
* Reset the memory of illegal property accesses that have already been logged.
|
||||
* @deprecated should only be used in handlebars test-cases
|
||||
*/
|
||||
resetLoggedPropertyAccesses() {
|
||||
resetLoggedProperties();
|
||||
}
|
||||
};
|
||||
|
||||
export let log = logger.log;
|
||||
|
||||
export { createFrame, logger };
|
||||
@@ -0,0 +1,32 @@
|
||||
let AST = {
|
||||
// Public API used to evaluate derived attributes regarding AST nodes
|
||||
helpers: {
|
||||
// a mustache is definitely a helper if:
|
||||
// * it is an eligible helper, and
|
||||
// * it has at least one parameter or hash segment
|
||||
helperExpression: function(node) {
|
||||
return (
|
||||
node.type === 'SubExpression' ||
|
||||
((node.type === 'MustacheStatement' ||
|
||||
node.type === 'BlockStatement') &&
|
||||
!!((node.params && node.params.length) || node.hash))
|
||||
);
|
||||
},
|
||||
|
||||
scopedId: function(path) {
|
||||
return /^\.|this\b/.test(path.original);
|
||||
},
|
||||
|
||||
// an ID is simple if it only has one part, and that part is not
|
||||
// `..` or `this`.
|
||||
simpleId: function(path) {
|
||||
return (
|
||||
path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Must be exported as an object rather than the root of the module as the jison lexer
|
||||
// must modify the object to operate properly.
|
||||
export default AST;
|
||||
@@ -0,0 +1,34 @@
|
||||
import parser from './parser';
|
||||
import WhitespaceControl from './whitespace-control';
|
||||
import * as Helpers from './helpers';
|
||||
import { extend } from '../utils';
|
||||
|
||||
export { parser };
|
||||
|
||||
let yy = {};
|
||||
extend(yy, Helpers);
|
||||
|
||||
export function parseWithoutProcessing(input, options) {
|
||||
// Just return if an already-compiled AST was passed in.
|
||||
if (input.type === 'Program') {
|
||||
return input;
|
||||
}
|
||||
|
||||
parser.yy = yy;
|
||||
|
||||
// Altering the shared object here, but this is ok as parser is a sync operation
|
||||
yy.locInfo = function(locInfo) {
|
||||
return new yy.SourceLocation(options && options.srcName, locInfo);
|
||||
};
|
||||
|
||||
let ast = parser.parse(input);
|
||||
|
||||
return ast;
|
||||
}
|
||||
|
||||
export function parse(input, options) {
|
||||
let ast = parseWithoutProcessing(input, options);
|
||||
let strip = new WhitespaceControl(options);
|
||||
|
||||
return strip.accept(ast);
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
/* global define */
|
||||
import { isArray } from '../utils';
|
||||
|
||||
let SourceNode;
|
||||
|
||||
try {
|
||||
/* istanbul ignore next */
|
||||
if (typeof define !== 'function' || !define.amd) {
|
||||
// We don't support this in AMD environments. For these environments, we asusme that
|
||||
// they are running on the browser and thus have no need for the source-map library.
|
||||
let SourceMap = require('source-map');
|
||||
SourceNode = SourceMap.SourceNode;
|
||||
}
|
||||
} catch (err) {
|
||||
/* NOP */
|
||||
}
|
||||
|
||||
/* istanbul ignore if: tested but not covered in istanbul due to dist build */
|
||||
if (!SourceNode) {
|
||||
SourceNode = function(line, column, srcFile, chunks) {
|
||||
this.src = '';
|
||||
if (chunks) {
|
||||
this.add(chunks);
|
||||
}
|
||||
};
|
||||
/* istanbul ignore next */
|
||||
SourceNode.prototype = {
|
||||
add: function(chunks) {
|
||||
if (isArray(chunks)) {
|
||||
chunks = chunks.join('');
|
||||
}
|
||||
this.src += chunks;
|
||||
},
|
||||
prepend: function(chunks) {
|
||||
if (isArray(chunks)) {
|
||||
chunks = chunks.join('');
|
||||
}
|
||||
this.src = chunks + this.src;
|
||||
},
|
||||
toStringWithSourceMap: function() {
|
||||
return { code: this.toString() };
|
||||
},
|
||||
toString: function() {
|
||||
return this.src;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function castChunk(chunk, codeGen, loc) {
|
||||
if (isArray(chunk)) {
|
||||
let ret = [];
|
||||
|
||||
for (let i = 0, len = chunk.length; i < len; i++) {
|
||||
ret.push(codeGen.wrap(chunk[i], loc));
|
||||
}
|
||||
return ret;
|
||||
} else if (typeof chunk === 'boolean' || typeof chunk === 'number') {
|
||||
// Handle primitives that the SourceNode will throw up on
|
||||
return chunk + '';
|
||||
}
|
||||
return chunk;
|
||||
}
|
||||
|
||||
function CodeGen(srcFile) {
|
||||
this.srcFile = srcFile;
|
||||
this.source = [];
|
||||
}
|
||||
|
||||
CodeGen.prototype = {
|
||||
isEmpty() {
|
||||
return !this.source.length;
|
||||
},
|
||||
prepend: function(source, loc) {
|
||||
this.source.unshift(this.wrap(source, loc));
|
||||
},
|
||||
push: function(source, loc) {
|
||||
this.source.push(this.wrap(source, loc));
|
||||
},
|
||||
|
||||
merge: function() {
|
||||
let source = this.empty();
|
||||
this.each(function(line) {
|
||||
source.add([' ', line, '\n']);
|
||||
});
|
||||
return source;
|
||||
},
|
||||
|
||||
each: function(iter) {
|
||||
for (let i = 0, len = this.source.length; i < len; i++) {
|
||||
iter(this.source[i]);
|
||||
}
|
||||
},
|
||||
|
||||
empty: function() {
|
||||
let loc = this.currentLocation || { start: {} };
|
||||
return new SourceNode(loc.start.line, loc.start.column, this.srcFile);
|
||||
},
|
||||
wrap: function(chunk, loc = this.currentLocation || { start: {} }) {
|
||||
if (chunk instanceof SourceNode) {
|
||||
return chunk;
|
||||
}
|
||||
|
||||
chunk = castChunk(chunk, this, loc);
|
||||
|
||||
return new SourceNode(
|
||||
loc.start.line,
|
||||
loc.start.column,
|
||||
this.srcFile,
|
||||
chunk
|
||||
);
|
||||
},
|
||||
|
||||
functionCall: function(fn, type, params) {
|
||||
params = this.generateList(params);
|
||||
return this.wrap([fn, type ? '.' + type + '(' : '(', params, ')']);
|
||||
},
|
||||
|
||||
quotedString: function(str) {
|
||||
return (
|
||||
'"' +
|
||||
(str + '')
|
||||
.replace(/\\/g, '\\\\')
|
||||
.replace(/"/g, '\\"')
|
||||
.replace(/\n/g, '\\n')
|
||||
.replace(/\r/g, '\\r')
|
||||
.replace(/\u2028/g, '\\u2028') // Per Ecma-262 7.3 + 7.8.4
|
||||
.replace(/\u2029/g, '\\u2029') +
|
||||
'"'
|
||||
);
|
||||
},
|
||||
|
||||
objectLiteral: function(obj) {
|
||||
let pairs = [];
|
||||
|
||||
Object.keys(obj).forEach(key => {
|
||||
let value = castChunk(obj[key], this);
|
||||
if (value !== 'undefined') {
|
||||
pairs.push([this.quotedString(key), ':', value]);
|
||||
}
|
||||
});
|
||||
|
||||
let ret = this.generateList(pairs);
|
||||
ret.prepend('{');
|
||||
ret.add('}');
|
||||
return ret;
|
||||
},
|
||||
|
||||
generateList: function(entries) {
|
||||
let ret = this.empty();
|
||||
|
||||
for (let i = 0, len = entries.length; i < len; i++) {
|
||||
if (i) {
|
||||
ret.add(',');
|
||||
}
|
||||
|
||||
ret.add(castChunk(entries[i], this));
|
||||
}
|
||||
|
||||
return ret;
|
||||
},
|
||||
|
||||
generateArray: function(entries) {
|
||||
let ret = this.generateList(entries);
|
||||
ret.prepend('[');
|
||||
ret.add(']');
|
||||
|
||||
return ret;
|
||||
}
|
||||
};
|
||||
|
||||
export default CodeGen;
|
||||