upgrade first session to flightphp
This commit is contained in:
@@ -1,506 +0,0 @@
|
||||
.CodeMirror {
|
||||
font-family: monospace;
|
||||
height: 300px;
|
||||
color: #000;
|
||||
direction: ltr
|
||||
}
|
||||
|
||||
.CodeMirror-lines {
|
||||
padding: 4px 0
|
||||
}
|
||||
|
||||
.CodeMirror pre.CodeMirror-line,
|
||||
.CodeMirror pre.CodeMirror-line-like {
|
||||
padding: 0 4px
|
||||
}
|
||||
|
||||
.CodeMirror-scrollbar-filler,
|
||||
.CodeMirror-gutter-filler {
|
||||
background-color: #fff
|
||||
}
|
||||
|
||||
.CodeMirror-gutters {
|
||||
border-right: 1px solid #ddd;
|
||||
background-color: #f7f7f7;
|
||||
white-space: nowrap
|
||||
}
|
||||
|
||||
.CodeMirror-linenumbers {}
|
||||
|
||||
.CodeMirror-linenumber {
|
||||
padding: 0 3px 0 5px;
|
||||
min-width: 20px;
|
||||
text-align: right;
|
||||
color: #999;
|
||||
white-space: nowrap
|
||||
}
|
||||
|
||||
.CodeMirror-guttermarker {
|
||||
color: #000
|
||||
}
|
||||
|
||||
.CodeMirror-guttermarker-subtle {
|
||||
color: #999
|
||||
}
|
||||
|
||||
.CodeMirror-cursor {
|
||||
border-left: 1px solid #000;
|
||||
border-right: none;
|
||||
width: 0
|
||||
}
|
||||
|
||||
.CodeMirror div.CodeMirror-secondarycursor {
|
||||
border-left: 1px solid silver
|
||||
}
|
||||
|
||||
.cm-fat-cursor .CodeMirror-cursor {
|
||||
width: auto;
|
||||
border: 0!important;
|
||||
background: #7e7
|
||||
}
|
||||
|
||||
.cm-fat-cursor div.CodeMirror-cursors {
|
||||
z-index: 1
|
||||
}
|
||||
|
||||
.cm-fat-cursor-mark {
|
||||
background-color: rgba(20, 255, 20, .5);
|
||||
-webkit-animation: blink 1.06s steps(1) infinite;
|
||||
-moz-animation: blink 1.06s steps(1) infinite;
|
||||
animation: blink 1.06s steps(1) infinite
|
||||
}
|
||||
|
||||
.cm-animate-fat-cursor {
|
||||
width: auto;
|
||||
border: 0;
|
||||
-webkit-animation: blink 1.06s steps(1) infinite;
|
||||
-moz-animation: blink 1.06s steps(1) infinite;
|
||||
animation: blink 1.06s steps(1) infinite;
|
||||
background-color: #7e7
|
||||
}
|
||||
|
||||
@-moz-keyframes blink {
|
||||
0% {}
|
||||
50% {
|
||||
background-color: transparent
|
||||
}
|
||||
100% {}
|
||||
}
|
||||
|
||||
@-webkit-keyframes blink {
|
||||
0% {}
|
||||
50% {
|
||||
background-color: transparent
|
||||
}
|
||||
100% {}
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
0% {}
|
||||
50% {
|
||||
background-color: transparent
|
||||
}
|
||||
100% {}
|
||||
}
|
||||
|
||||
.CodeMirror-overwrite .CodeMirror-cursor {}
|
||||
|
||||
.cm-tab {
|
||||
display: inline-block;
|
||||
text-decoration: inherit
|
||||
}
|
||||
|
||||
.CodeMirror-rulers {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: -50px;
|
||||
bottom: 0;
|
||||
overflow: hidden
|
||||
}
|
||||
|
||||
.CodeMirror-ruler {
|
||||
border-left: 1px solid #ccc;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
position: absolute
|
||||
}
|
||||
|
||||
.cm-s-default .cm-header {
|
||||
color: blue
|
||||
}
|
||||
|
||||
.cm-s-default .cm-quote {
|
||||
color: #090
|
||||
}
|
||||
|
||||
.cm-negative {
|
||||
color: #d44
|
||||
}
|
||||
|
||||
.cm-positive {
|
||||
color: #292
|
||||
}
|
||||
|
||||
.cm-header,
|
||||
.cm-strong {
|
||||
font-weight: 700
|
||||
}
|
||||
|
||||
.cm-em {
|
||||
font-style: italic
|
||||
}
|
||||
|
||||
.cm-link {
|
||||
text-decoration: underline
|
||||
}
|
||||
|
||||
.cm-strikethrough {
|
||||
text-decoration: line-through
|
||||
}
|
||||
|
||||
.cm-s-default .cm-keyword {
|
||||
color: #708
|
||||
}
|
||||
|
||||
.cm-s-default .cm-atom {
|
||||
color: #219
|
||||
}
|
||||
|
||||
.cm-s-default .cm-number {
|
||||
color: #164
|
||||
}
|
||||
|
||||
.cm-s-default .cm-def {
|
||||
color: #00f
|
||||
}
|
||||
|
||||
.cm-s-default .cm-variable,
|
||||
.cm-s-default .cm-punctuation,
|
||||
.cm-s-default .cm-property,
|
||||
.cm-s-default .cm-operator {}
|
||||
|
||||
.cm-s-default .cm-variable-2 {
|
||||
color: #05a
|
||||
}
|
||||
|
||||
.cm-s-default .cm-variable-3,
|
||||
.cm-s-default .cm-type {
|
||||
color: #085
|
||||
}
|
||||
|
||||
.cm-s-default .cm-comment {
|
||||
color: #a50
|
||||
}
|
||||
|
||||
.cm-s-default .cm-string {
|
||||
color: #a11
|
||||
}
|
||||
|
||||
.cm-s-default .cm-string-2 {
|
||||
color: #f50
|
||||
}
|
||||
|
||||
.cm-s-default .cm-meta {
|
||||
color: #555
|
||||
}
|
||||
|
||||
.cm-s-default .cm-qualifier {
|
||||
color: #555
|
||||
}
|
||||
|
||||
.cm-s-default .cm-builtin {
|
||||
color: #30a
|
||||
}
|
||||
|
||||
.cm-s-default .cm-bracket {
|
||||
color: #997
|
||||
}
|
||||
|
||||
.cm-s-default .cm-tag {
|
||||
color: #170
|
||||
}
|
||||
|
||||
.cm-s-default .cm-attribute {
|
||||
color: #00c
|
||||
}
|
||||
|
||||
.cm-s-default .cm-hr {
|
||||
color: #999
|
||||
}
|
||||
|
||||
.cm-s-default .cm-link {
|
||||
color: #00c
|
||||
}
|
||||
|
||||
.cm-s-default .cm-error {
|
||||
color: red
|
||||
}
|
||||
|
||||
.cm-invalidchar {
|
||||
color: red
|
||||
}
|
||||
|
||||
.CodeMirror-composing {
|
||||
border-bottom: 2px solid
|
||||
}
|
||||
|
||||
div.CodeMirror span.CodeMirror-matchingbracket {
|
||||
color: #0b0
|
||||
}
|
||||
|
||||
div.CodeMirror span.CodeMirror-nonmatchingbracket {
|
||||
color: #a22
|
||||
}
|
||||
|
||||
.CodeMirror-matchingtag {
|
||||
background: rgba(255, 150, 0, .3)
|
||||
}
|
||||
|
||||
.CodeMirror-activeline-background {
|
||||
background: #e8f2ff
|
||||
}
|
||||
|
||||
.CodeMirror {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: #fff
|
||||
}
|
||||
|
||||
.CodeMirror-scroll {
|
||||
overflow: scroll!important;
|
||||
margin-bottom: -30px;
|
||||
margin-right: -30px;
|
||||
padding-bottom: 30px;
|
||||
height: 100%;
|
||||
outline: none;
|
||||
position: relative
|
||||
}
|
||||
|
||||
.CodeMirror-sizer {
|
||||
position: relative;
|
||||
border-right: 30px solid transparent
|
||||
}
|
||||
|
||||
.CodeMirror-vscrollbar,
|
||||
.CodeMirror-hscrollbar,
|
||||
.CodeMirror-scrollbar-filler,
|
||||
.CodeMirror-gutter-filler {
|
||||
position: absolute;
|
||||
z-index: 6;
|
||||
display: none
|
||||
}
|
||||
|
||||
.CodeMirror-vscrollbar {
|
||||
right: 0;
|
||||
top: 0;
|
||||
overflow-x: hidden;
|
||||
overflow-y: scroll
|
||||
}
|
||||
|
||||
.CodeMirror-hscrollbar {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
overflow-y: hidden;
|
||||
overflow-x: scroll
|
||||
}
|
||||
|
||||
.CodeMirror-scrollbar-filler {
|
||||
right: 0;
|
||||
bottom: 0
|
||||
}
|
||||
|
||||
.CodeMirror-gutter-filler {
|
||||
left: 0;
|
||||
bottom: 0
|
||||
}
|
||||
|
||||
.CodeMirror-gutters {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
min-height: 100%;
|
||||
z-index: 3
|
||||
}
|
||||
|
||||
.CodeMirror-gutter {
|
||||
white-space: normal;
|
||||
height: 100%;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin-bottom: -30px
|
||||
}
|
||||
|
||||
.CodeMirror-gutter-wrapper {
|
||||
position: absolute;
|
||||
z-index: 4;
|
||||
background: 0 0!important;
|
||||
border: none!important
|
||||
}
|
||||
|
||||
.CodeMirror-gutter-background {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
z-index: 4
|
||||
}
|
||||
|
||||
.CodeMirror-gutter-elt {
|
||||
position: absolute;
|
||||
cursor: default;
|
||||
z-index: 4
|
||||
}
|
||||
|
||||
.CodeMirror-gutter-wrapper::selection {
|
||||
background-color: transparent
|
||||
}
|
||||
|
||||
.CodeMirror-gutter-wrapper::-moz-selection {
|
||||
background-color: transparent
|
||||
}
|
||||
|
||||
.CodeMirror-lines {
|
||||
cursor: text;
|
||||
min-height: 1px
|
||||
}
|
||||
|
||||
.CodeMirror pre.CodeMirror-line,
|
||||
.CodeMirror pre.CodeMirror-line-like {
|
||||
-moz-border-radius: 0;
|
||||
-webkit-border-radius: 0;
|
||||
border-radius: 0;
|
||||
border-width: 0;
|
||||
background: 0 0;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
margin: 0;
|
||||
white-space: pre;
|
||||
word-wrap: normal;
|
||||
line-height: inherit;
|
||||
color: inherit;
|
||||
z-index: 2;
|
||||
position: relative;
|
||||
overflow: visible;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
-webkit-font-variant-ligatures: contextual;
|
||||
font-variant-ligatures: contextual
|
||||
}
|
||||
|
||||
.CodeMirror-wrap pre.CodeMirror-line,
|
||||
.CodeMirror-wrap pre.CodeMirror-line-like {
|
||||
word-wrap: break-word;
|
||||
white-space: pre-wrap;
|
||||
word-break: normal
|
||||
}
|
||||
|
||||
.CodeMirror-linebackground {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
z-index: 0
|
||||
}
|
||||
|
||||
.CodeMirror-linewidget {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
padding: .1px
|
||||
}
|
||||
|
||||
.CodeMirror-widget {}
|
||||
|
||||
.CodeMirror-rtl pre {
|
||||
direction: rtl
|
||||
}
|
||||
|
||||
.CodeMirror-code {
|
||||
outline: none
|
||||
}
|
||||
|
||||
.CodeMirror-scroll,
|
||||
.CodeMirror-sizer,
|
||||
.CodeMirror-gutter,
|
||||
.CodeMirror-gutters,
|
||||
.CodeMirror-linenumber {
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box
|
||||
}
|
||||
|
||||
.CodeMirror-measure {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
visibility: hidden
|
||||
}
|
||||
|
||||
.CodeMirror-cursor {
|
||||
position: absolute;
|
||||
pointer-events: none
|
||||
}
|
||||
|
||||
.CodeMirror-measure pre {
|
||||
position: static
|
||||
}
|
||||
|
||||
div.CodeMirror-cursors {
|
||||
visibility: hidden;
|
||||
position: relative;
|
||||
z-index: 3
|
||||
}
|
||||
|
||||
div.CodeMirror-dragcursors {
|
||||
visibility: visible
|
||||
}
|
||||
|
||||
.CodeMirror-focused div.CodeMirror-cursors {
|
||||
visibility: visible
|
||||
}
|
||||
|
||||
.CodeMirror-selected {
|
||||
background: #d9d9d9
|
||||
}
|
||||
|
||||
.CodeMirror-focused .CodeMirror-selected {
|
||||
background: #d7d4f0
|
||||
}
|
||||
|
||||
.CodeMirror-crosshair {
|
||||
cursor: crosshair
|
||||
}
|
||||
|
||||
.CodeMirror-line::selection,
|
||||
.CodeMirror-line>span::selection,
|
||||
.CodeMirror-line>span>span::selection {
|
||||
background: #d7d4f0
|
||||
}
|
||||
|
||||
.CodeMirror-line::-moz-selection,
|
||||
.CodeMirror-line>span::-moz-selection,
|
||||
.CodeMirror-line>span>span::-moz-selection {
|
||||
background: #d7d4f0
|
||||
}
|
||||
|
||||
.cm-searching {
|
||||
background-color: #ffa;
|
||||
background-color: rgba(255, 255, 0, .4)
|
||||
}
|
||||
|
||||
.cm-force-border {
|
||||
padding-right: .1px
|
||||
}
|
||||
|
||||
@media print {
|
||||
.CodeMirror div.CodeMirror-cursors {
|
||||
visibility: hidden
|
||||
}
|
||||
}
|
||||
|
||||
.cm-tab-wrap-hack:after {
|
||||
content: ''
|
||||
}
|
||||
|
||||
span.CodeMirror-selectedtext {
|
||||
background: 0 0
|
||||
}
|
||||
+3
-3
File diff suppressed because one or more lines are too long
@@ -1,217 +0,0 @@
|
||||
[data-simplebar] {
|
||||
position: relative;
|
||||
flex-direction: column;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
align-content: flex-start;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.simplebar-wrapper {
|
||||
overflow: hidden;
|
||||
width: inherit;
|
||||
height: inherit;
|
||||
max-width: inherit;
|
||||
max-height: inherit;
|
||||
}
|
||||
|
||||
.simplebar-mask {
|
||||
direction: inherit;
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
left: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
width: auto !important;
|
||||
height: auto !important;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.simplebar-offset {
|
||||
direction: inherit !important;
|
||||
box-sizing: inherit !important;
|
||||
resize: none !important;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.simplebar-content-wrapper {
|
||||
direction: inherit;
|
||||
box-sizing: border-box !important;
|
||||
position: relative;
|
||||
display: block;
|
||||
height: 100%; /* Required for horizontal native scrollbar to not appear if parent is taller than natural height */
|
||||
width: auto;
|
||||
max-width: 100%; /* Not required for horizontal scroll to trigger */
|
||||
max-height: 100%; /* Needed for vertical scroll to trigger */
|
||||
scrollbar-width: none;
|
||||
-ms-overflow-style: none;
|
||||
}
|
||||
|
||||
.simplebar-content-wrapper::-webkit-scrollbar,
|
||||
.simplebar-hide-scrollbar::-webkit-scrollbar {
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.simplebar-content:before,
|
||||
.simplebar-content:after {
|
||||
content: ' ';
|
||||
display: table;
|
||||
}
|
||||
|
||||
.simplebar-placeholder {
|
||||
max-height: 100%;
|
||||
max-width: 100%;
|
||||
width: 100%;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.simplebar-height-auto-observer-wrapper {
|
||||
box-sizing: inherit !important;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
max-width: 1px;
|
||||
position: relative;
|
||||
float: left;
|
||||
max-height: 1px;
|
||||
overflow: hidden;
|
||||
z-index: -1;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
pointer-events: none;
|
||||
flex-grow: inherit;
|
||||
flex-shrink: 0;
|
||||
flex-basis: 0;
|
||||
}
|
||||
|
||||
.simplebar-height-auto-observer {
|
||||
box-sizing: inherit;
|
||||
display: block;
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 1000%;
|
||||
width: 1000%;
|
||||
min-height: 1px;
|
||||
min-width: 1px;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.simplebar-track {
|
||||
z-index: 1;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
pointer-events: none;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
[data-simplebar].simplebar-dragging .simplebar-content {
|
||||
pointer-events: none;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
|
||||
[data-simplebar].simplebar-dragging .simplebar-track {
|
||||
pointer-events: all;
|
||||
}
|
||||
|
||||
.simplebar-scrollbar {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
min-height: 10px;
|
||||
}
|
||||
|
||||
.simplebar-scrollbar:before {
|
||||
position: absolute;
|
||||
content: '';
|
||||
background: black;
|
||||
border-radius: 7px;
|
||||
left: 2px;
|
||||
right: 2px;
|
||||
opacity: 0;
|
||||
transition: opacity 0.2s linear;
|
||||
}
|
||||
|
||||
.simplebar-scrollbar.simplebar-visible:before {
|
||||
/* When hovered, remove all transitions from drag handle */
|
||||
opacity: 0.5;
|
||||
transition: opacity 0s linear;
|
||||
}
|
||||
|
||||
.simplebar-track.simplebar-vertical {
|
||||
top: 0;
|
||||
width: 11px;
|
||||
}
|
||||
|
||||
.simplebar-track.simplebar-vertical .simplebar-scrollbar:before {
|
||||
top: 2px;
|
||||
bottom: 2px;
|
||||
}
|
||||
|
||||
.simplebar-track.simplebar-horizontal {
|
||||
left: 0;
|
||||
height: 11px;
|
||||
}
|
||||
|
||||
.simplebar-track.simplebar-horizontal .simplebar-scrollbar:before {
|
||||
height: 100%;
|
||||
left: 2px;
|
||||
right: 2px;
|
||||
}
|
||||
|
||||
.simplebar-track.simplebar-horizontal .simplebar-scrollbar {
|
||||
right: auto;
|
||||
left: 0;
|
||||
top: 2px;
|
||||
height: 7px;
|
||||
min-height: 0;
|
||||
min-width: 10px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
/* Rtl support */
|
||||
[data-simplebar-direction='rtl'] .simplebar-track.simplebar-vertical {
|
||||
right: auto;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.hs-dummy-scrollbar-size {
|
||||
direction: rtl;
|
||||
position: fixed;
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
height: 500px;
|
||||
width: 500px;
|
||||
overflow-y: hidden;
|
||||
overflow-x: scroll;
|
||||
}
|
||||
|
||||
.simplebar-hide-scrollbar {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
visibility: hidden;
|
||||
overflow-y: scroll;
|
||||
scrollbar-width: none;
|
||||
-ms-overflow-style: none;
|
||||
}
|
||||
|
||||
.simplebar-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100%;
|
||||
}
|
||||
+3
-5
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -1,402 +0,0 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
||||
|
||||
(function(mod) {
|
||||
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
||||
mod(require("../../lib/codemirror"));
|
||||
else if (typeof define == "function" && define.amd) // AMD
|
||||
define(["../../lib/codemirror"], mod);
|
||||
else // Plain browser env
|
||||
mod(CodeMirror);
|
||||
})(function(CodeMirror) {
|
||||
"use strict";
|
||||
|
||||
var htmlConfig = {
|
||||
autoSelfClosers: {'area': true, 'base': true, 'br': true, 'col': true, 'command': true,
|
||||
'embed': true, 'frame': true, 'hr': true, 'img': true, 'input': true,
|
||||
'keygen': true, 'link': true, 'meta': true, 'param': true, 'source': true,
|
||||
'track': true, 'wbr': true, 'menuitem': true},
|
||||
implicitlyClosed: {'dd': true, 'li': true, 'optgroup': true, 'option': true, 'p': true,
|
||||
'rp': true, 'rt': true, 'tbody': true, 'td': true, 'tfoot': true,
|
||||
'th': true, 'tr': true},
|
||||
contextGrabbers: {
|
||||
'dd': {'dd': true, 'dt': true},
|
||||
'dt': {'dd': true, 'dt': true},
|
||||
'li': {'li': true},
|
||||
'option': {'option': true, 'optgroup': true},
|
||||
'optgroup': {'optgroup': true},
|
||||
'p': {'address': true, 'article': true, 'aside': true, 'blockquote': true, 'dir': true,
|
||||
'div': true, 'dl': true, 'fieldset': true, 'footer': true, 'form': true,
|
||||
'h1': true, 'h2': true, 'h3': true, 'h4': true, 'h5': true, 'h6': true,
|
||||
'header': true, 'hgroup': true, 'hr': true, 'menu': true, 'nav': true, 'ol': true,
|
||||
'p': true, 'pre': true, 'section': true, 'table': true, 'ul': true},
|
||||
'rp': {'rp': true, 'rt': true},
|
||||
'rt': {'rp': true, 'rt': true},
|
||||
'tbody': {'tbody': true, 'tfoot': true},
|
||||
'td': {'td': true, 'th': true},
|
||||
'tfoot': {'tbody': true},
|
||||
'th': {'td': true, 'th': true},
|
||||
'thead': {'tbody': true, 'tfoot': true},
|
||||
'tr': {'tr': true}
|
||||
},
|
||||
doNotIndent: {"pre": true},
|
||||
allowUnquoted: true,
|
||||
allowMissing: true,
|
||||
caseFold: true
|
||||
}
|
||||
|
||||
var xmlConfig = {
|
||||
autoSelfClosers: {},
|
||||
implicitlyClosed: {},
|
||||
contextGrabbers: {},
|
||||
doNotIndent: {},
|
||||
allowUnquoted: false,
|
||||
allowMissing: false,
|
||||
allowMissingTagName: false,
|
||||
caseFold: false
|
||||
}
|
||||
|
||||
CodeMirror.defineMode("xml", function(editorConf, config_) {
|
||||
var indentUnit = editorConf.indentUnit
|
||||
var config = {}
|
||||
var defaults = config_.htmlMode ? htmlConfig : xmlConfig
|
||||
for (var prop in defaults) config[prop] = defaults[prop]
|
||||
for (var prop in config_) config[prop] = config_[prop]
|
||||
|
||||
// Return variables for tokenizers
|
||||
var type, setStyle;
|
||||
|
||||
function inText(stream, state) {
|
||||
function chain(parser) {
|
||||
state.tokenize = parser;
|
||||
return parser(stream, state);
|
||||
}
|
||||
|
||||
var ch = stream.next();
|
||||
if (ch == "<") {
|
||||
if (stream.eat("!")) {
|
||||
if (stream.eat("[")) {
|
||||
if (stream.match("CDATA[")) return chain(inBlock("atom", "]]>"));
|
||||
else return null;
|
||||
} else if (stream.match("--")) {
|
||||
return chain(inBlock("comment", "-->"));
|
||||
} else if (stream.match("DOCTYPE", true, true)) {
|
||||
stream.eatWhile(/[\w\._\-]/);
|
||||
return chain(doctype(1));
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
} else if (stream.eat("?")) {
|
||||
stream.eatWhile(/[\w\._\-]/);
|
||||
state.tokenize = inBlock("meta", "?>");
|
||||
return "meta";
|
||||
} else {
|
||||
type = stream.eat("/") ? "closeTag" : "openTag";
|
||||
state.tokenize = inTag;
|
||||
return "tag bracket";
|
||||
}
|
||||
} else if (ch == "&") {
|
||||
var ok;
|
||||
if (stream.eat("#")) {
|
||||
if (stream.eat("x")) {
|
||||
ok = stream.eatWhile(/[a-fA-F\d]/) && stream.eat(";");
|
||||
} else {
|
||||
ok = stream.eatWhile(/[\d]/) && stream.eat(";");
|
||||
}
|
||||
} else {
|
||||
ok = stream.eatWhile(/[\w\.\-:]/) && stream.eat(";");
|
||||
}
|
||||
return ok ? "atom" : "error";
|
||||
} else {
|
||||
stream.eatWhile(/[^&<]/);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
inText.isInText = true;
|
||||
|
||||
function inTag(stream, state) {
|
||||
var ch = stream.next();
|
||||
if (ch == ">" || (ch == "/" && stream.eat(">"))) {
|
||||
state.tokenize = inText;
|
||||
type = ch == ">" ? "endTag" : "selfcloseTag";
|
||||
return "tag bracket";
|
||||
} else if (ch == "=") {
|
||||
type = "equals";
|
||||
return null;
|
||||
} else if (ch == "<") {
|
||||
state.tokenize = inText;
|
||||
state.state = baseState;
|
||||
state.tagName = state.tagStart = null;
|
||||
var next = state.tokenize(stream, state);
|
||||
return next ? next + " tag error" : "tag error";
|
||||
} else if (/[\'\"]/.test(ch)) {
|
||||
state.tokenize = inAttribute(ch);
|
||||
state.stringStartCol = stream.column();
|
||||
return state.tokenize(stream, state);
|
||||
} else {
|
||||
stream.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);
|
||||
return "word";
|
||||
}
|
||||
}
|
||||
|
||||
function inAttribute(quote) {
|
||||
var closure = function(stream, state) {
|
||||
while (!stream.eol()) {
|
||||
if (stream.next() == quote) {
|
||||
state.tokenize = inTag;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return "string";
|
||||
};
|
||||
closure.isInAttribute = true;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function inBlock(style, terminator) {
|
||||
return function(stream, state) {
|
||||
while (!stream.eol()) {
|
||||
if (stream.match(terminator)) {
|
||||
state.tokenize = inText;
|
||||
break;
|
||||
}
|
||||
stream.next();
|
||||
}
|
||||
return style;
|
||||
}
|
||||
}
|
||||
|
||||
function doctype(depth) {
|
||||
return function(stream, state) {
|
||||
var ch;
|
||||
while ((ch = stream.next()) != null) {
|
||||
if (ch == "<") {
|
||||
state.tokenize = doctype(depth + 1);
|
||||
return state.tokenize(stream, state);
|
||||
} else if (ch == ">") {
|
||||
if (depth == 1) {
|
||||
state.tokenize = inText;
|
||||
break;
|
||||
} else {
|
||||
state.tokenize = doctype(depth - 1);
|
||||
return state.tokenize(stream, state);
|
||||
}
|
||||
}
|
||||
}
|
||||
return "meta";
|
||||
};
|
||||
}
|
||||
|
||||
function Context(state, tagName, startOfLine) {
|
||||
this.prev = state.context;
|
||||
this.tagName = tagName;
|
||||
this.indent = state.indented;
|
||||
this.startOfLine = startOfLine;
|
||||
if (config.doNotIndent.hasOwnProperty(tagName) || (state.context && state.context.noIndent))
|
||||
this.noIndent = true;
|
||||
}
|
||||
function popContext(state) {
|
||||
if (state.context) state.context = state.context.prev;
|
||||
}
|
||||
function maybePopContext(state, nextTagName) {
|
||||
var parentTagName;
|
||||
while (true) {
|
||||
if (!state.context) {
|
||||
return;
|
||||
}
|
||||
parentTagName = state.context.tagName;
|
||||
if (!config.contextGrabbers.hasOwnProperty(parentTagName) ||
|
||||
!config.contextGrabbers[parentTagName].hasOwnProperty(nextTagName)) {
|
||||
return;
|
||||
}
|
||||
popContext(state);
|
||||
}
|
||||
}
|
||||
|
||||
function baseState(type, stream, state) {
|
||||
if (type == "openTag") {
|
||||
state.tagStart = stream.column();
|
||||
return tagNameState;
|
||||
} else if (type == "closeTag") {
|
||||
return closeTagNameState;
|
||||
} else {
|
||||
return baseState;
|
||||
}
|
||||
}
|
||||
function tagNameState(type, stream, state) {
|
||||
if (type == "word") {
|
||||
state.tagName = stream.current();
|
||||
setStyle = "tag";
|
||||
return attrState;
|
||||
} else if (config.allowMissingTagName && type == "endTag") {
|
||||
setStyle = "tag bracket";
|
||||
return attrState(type, stream, state);
|
||||
} else {
|
||||
setStyle = "error";
|
||||
return tagNameState;
|
||||
}
|
||||
}
|
||||
function closeTagNameState(type, stream, state) {
|
||||
if (type == "word") {
|
||||
var tagName = stream.current();
|
||||
if (state.context && state.context.tagName != tagName &&
|
||||
config.implicitlyClosed.hasOwnProperty(state.context.tagName))
|
||||
popContext(state);
|
||||
if ((state.context && state.context.tagName == tagName) || config.matchClosing === false) {
|
||||
setStyle = "tag";
|
||||
return closeState;
|
||||
} else {
|
||||
setStyle = "tag error";
|
||||
return closeStateErr;
|
||||
}
|
||||
} else if (config.allowMissingTagName && type == "endTag") {
|
||||
setStyle = "tag bracket";
|
||||
return closeState(type, stream, state);
|
||||
} else {
|
||||
setStyle = "error";
|
||||
return closeStateErr;
|
||||
}
|
||||
}
|
||||
|
||||
function closeState(type, _stream, state) {
|
||||
if (type != "endTag") {
|
||||
setStyle = "error";
|
||||
return closeState;
|
||||
}
|
||||
popContext(state);
|
||||
return baseState;
|
||||
}
|
||||
function closeStateErr(type, stream, state) {
|
||||
setStyle = "error";
|
||||
return closeState(type, stream, state);
|
||||
}
|
||||
|
||||
function attrState(type, _stream, state) {
|
||||
if (type == "word") {
|
||||
setStyle = "attribute";
|
||||
return attrEqState;
|
||||
} else if (type == "endTag" || type == "selfcloseTag") {
|
||||
var tagName = state.tagName, tagStart = state.tagStart;
|
||||
state.tagName = state.tagStart = null;
|
||||
if (type == "selfcloseTag" ||
|
||||
config.autoSelfClosers.hasOwnProperty(tagName)) {
|
||||
maybePopContext(state, tagName);
|
||||
} else {
|
||||
maybePopContext(state, tagName);
|
||||
state.context = new Context(state, tagName, tagStart == state.indented);
|
||||
}
|
||||
return baseState;
|
||||
}
|
||||
setStyle = "error";
|
||||
return attrState;
|
||||
}
|
||||
function attrEqState(type, stream, state) {
|
||||
if (type == "equals") return attrValueState;
|
||||
if (!config.allowMissing) setStyle = "error";
|
||||
return attrState(type, stream, state);
|
||||
}
|
||||
function attrValueState(type, stream, state) {
|
||||
if (type == "string") return attrContinuedState;
|
||||
if (type == "word" && config.allowUnquoted) {setStyle = "string"; return attrState;}
|
||||
setStyle = "error";
|
||||
return attrState(type, stream, state);
|
||||
}
|
||||
function attrContinuedState(type, stream, state) {
|
||||
if (type == "string") return attrContinuedState;
|
||||
return attrState(type, stream, state);
|
||||
}
|
||||
|
||||
return {
|
||||
startState: function(baseIndent) {
|
||||
var state = {tokenize: inText,
|
||||
state: baseState,
|
||||
indented: baseIndent || 0,
|
||||
tagName: null, tagStart: null,
|
||||
context: null}
|
||||
if (baseIndent != null) state.baseIndent = baseIndent
|
||||
return state
|
||||
},
|
||||
|
||||
token: function(stream, state) {
|
||||
if (!state.tagName && stream.sol())
|
||||
state.indented = stream.indentation();
|
||||
|
||||
if (stream.eatSpace()) return null;
|
||||
type = null;
|
||||
var style = state.tokenize(stream, state);
|
||||
if ((style || type) && style != "comment") {
|
||||
setStyle = null;
|
||||
state.state = state.state(type || style, stream, state);
|
||||
if (setStyle)
|
||||
style = setStyle == "error" ? style + " error" : setStyle;
|
||||
}
|
||||
return style;
|
||||
},
|
||||
|
||||
indent: function(state, textAfter, fullLine) {
|
||||
var context = state.context;
|
||||
// Indent multi-line strings (e.g. css).
|
||||
if (state.tokenize.isInAttribute) {
|
||||
if (state.tagStart == state.indented)
|
||||
return state.stringStartCol + 1;
|
||||
else
|
||||
return state.indented + indentUnit;
|
||||
}
|
||||
if (context && context.noIndent) return CodeMirror.Pass;
|
||||
if (state.tokenize != inTag && state.tokenize != inText)
|
||||
return fullLine ? fullLine.match(/^(\s*)/)[0].length : 0;
|
||||
// Indent the starts of attribute names.
|
||||
if (state.tagName) {
|
||||
if (config.multilineTagIndentPastTag !== false)
|
||||
return state.tagStart + state.tagName.length + 2;
|
||||
else
|
||||
return state.tagStart + indentUnit * (config.multilineTagIndentFactor || 1);
|
||||
}
|
||||
if (config.alignCDATA && /<!\[CDATA\[/.test(textAfter)) return 0;
|
||||
var tagAfter = textAfter && /^<(\/)?([\w_:\.-]*)/.exec(textAfter);
|
||||
if (tagAfter && tagAfter[1]) { // Closing tag spotted
|
||||
while (context) {
|
||||
if (context.tagName == tagAfter[2]) {
|
||||
context = context.prev;
|
||||
break;
|
||||
} else if (config.implicitlyClosed.hasOwnProperty(context.tagName)) {
|
||||
context = context.prev;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if (tagAfter) { // Opening tag spotted
|
||||
while (context) {
|
||||
var grabbers = config.contextGrabbers[context.tagName];
|
||||
if (grabbers && grabbers.hasOwnProperty(tagAfter[2]))
|
||||
context = context.prev;
|
||||
else
|
||||
break;
|
||||
}
|
||||
}
|
||||
while (context && context.prev && !context.startOfLine)
|
||||
context = context.prev;
|
||||
if (context) return context.indent + indentUnit;
|
||||
else return state.baseIndent || 0;
|
||||
},
|
||||
|
||||
electricInput: /<\/[\s\w:]+>$/,
|
||||
blockCommentStart: "<!--",
|
||||
blockCommentEnd: "-->",
|
||||
|
||||
configuration: config.htmlMode ? "html" : "xml",
|
||||
helperType: config.htmlMode ? "html" : "xml",
|
||||
|
||||
skipAttribute: function(state) {
|
||||
if (state.state == attrValueState)
|
||||
state.state = attrState
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
CodeMirror.defineMIME("text/xml", "xml");
|
||||
CodeMirror.defineMIME("application/xml", "xml");
|
||||
if (!CodeMirror.mimeModes.hasOwnProperty("text/html"))
|
||||
CodeMirror.defineMIME("text/html", {name: "xml", htmlMode: true});
|
||||
|
||||
});
|
||||
+142
-103
@@ -17,7 +17,6 @@ var FoniaJS = {
|
||||
APP_ID: 0,
|
||||
APP_SID: "",
|
||||
WEB_HOST: "",
|
||||
WEB_PATH: "",
|
||||
WEB_FULLPATH: "",
|
||||
WEB_MOBILE: 0,
|
||||
AUTH_LEVEL: 9,
|
||||
@@ -35,11 +34,10 @@ var FoniaJS = {
|
||||
this.APP_ID = _adata[0];
|
||||
this.APP_SID = _adata[1];
|
||||
this.WEB_HOST = _adata[2];
|
||||
this.WEB_PATH = _adata[3];
|
||||
this.WEB_FULLPATH = _adata[4];
|
||||
this.WEB_MOBILE = _adata[5];
|
||||
this.AUTH_LEVEL = parseInt(_adata[6]);
|
||||
this.phpversion = _adata[7];
|
||||
this.WEB_FULLPATH = _adata[3];
|
||||
this.WEB_MOBILE = _adata[4];
|
||||
this.AUTH_LEVEL = parseInt(_adata[5]);
|
||||
this.phpversion = '';
|
||||
}
|
||||
if (typeof(skey) === 'string' && skey !== '') {
|
||||
_hasil = $.base64.decode(skey);
|
||||
@@ -62,38 +60,36 @@ var FoniaJS = {
|
||||
var apar = ["p=" + p];
|
||||
if (q != null) apar.push("q=" + q);
|
||||
new Request.JSON({
|
||||
url: this.WEB_PATH + "auth.php",
|
||||
url: "auth/menu",
|
||||
sendParam: apar,
|
||||
onSuccess: (apop) => {
|
||||
if (apop.login == false) {
|
||||
this.showErrorLocale("Fonia.sess_expire");
|
||||
setTimeout(function(){self.location = FoniaJS.WEB_PATH;}, 1600);
|
||||
setTimeout(() => { self.location = self.location.href; }, 1600);
|
||||
return false;
|
||||
}
|
||||
if (apop.php == "" || !window[apop.func]) {
|
||||
this.showErrorLocale("Fonia.page404");
|
||||
return false;
|
||||
}
|
||||
window[apop.func]['PHP'] = this.WEB_PATH + "apps/php/" + apop.php;
|
||||
window[apop.func]['PHP'] = apop.php;
|
||||
window[apop.func]['KODE'] = apop.kode;
|
||||
if (apop.iswindow == true) {
|
||||
if (IndexJS.loading) IndexJS.loading();
|
||||
new Request({
|
||||
url: this.WEB_PATH + "apps/php/" + apop.php,
|
||||
sendParam: ["data=default"],
|
||||
onSuccess: (txt) => {
|
||||
this.showWindow(apop.kode, apop.title, txt, apop.width, apop.button, function(){
|
||||
new Request.JSON({
|
||||
url: apop.php + '/index',
|
||||
onSuccess: (ajson) => {
|
||||
this.showWindow(apop.kode, apop.title, ajson.html, apop.width, apop.button, () => {
|
||||
if (typeof window[apop.func]['loading'] === 'function') window[apop.func]['loading'](q);
|
||||
});
|
||||
}
|
||||
}).send();
|
||||
} else {
|
||||
$("#pageToolbarBot").html(this.genToolButton(apop.button));
|
||||
new Request({
|
||||
url: this.WEB_PATH + "apps/php/" + apop.php,
|
||||
sendParam: ["data=default"],
|
||||
onSuccess: (txt) => {
|
||||
$('#pageContent').html(txt);
|
||||
new Request.JSON({
|
||||
url: apop.php + '/index',
|
||||
onSuccess: (ajson) => {
|
||||
$('#pageContent').html(ajson.html);
|
||||
if (typeof window[apop.func]['loading'] === 'function') window[apop.func]['loading'](q);
|
||||
}
|
||||
}).send();
|
||||
@@ -122,13 +118,12 @@ var FoniaJS = {
|
||||
if ($('#ExitLink').length) {
|
||||
$('#ExitLink').click(() => {
|
||||
new Request.JSON({
|
||||
url: this.WEB_PATH + "apps/php/login.php",
|
||||
sendParam: ["mode=logout"],
|
||||
url: "auth/logout",
|
||||
onFailure: () => {
|
||||
self.location = (['localhost','127.0.0.1'].indexOf(location.hostname) >= 0) ? this.WEB_PATH : "/";
|
||||
self.location = self.location.href;
|
||||
},
|
||||
onSuccess: (respon) => {
|
||||
var _nurl = (['localhost','127.0.0.1'].indexOf(location.hostname) >= 0) ? this.WEB_PATH : "/";
|
||||
var _nurl = self.location.href;
|
||||
if (typeof respon !== 'undefined' && respon.nexthost !== '/') _nurl = respon.nexthost;
|
||||
self.location = _nurl;
|
||||
}
|
||||
@@ -167,8 +162,8 @@ var FoniaJS = {
|
||||
$('#butSOK').click(() => {
|
||||
$('#butSOK').prop('disabled', true);
|
||||
new Request.JSON({
|
||||
url: this.WEB_PATH + "auth.php",
|
||||
sendParam: ["mode=auth", "data=super-check", "UID", "PWD", "SUPER=" + _bsuper, "UOVER=" + _buover],
|
||||
url: "auth/supervisi",
|
||||
sendParam: ["data=super-check", "UID", "PWD", "SUPER=" + _bsuper, "UOVER=" + _buover],
|
||||
onSuccess: (adata) => {
|
||||
if (adata.status == 1) {
|
||||
fungcall();
|
||||
@@ -182,9 +177,9 @@ var FoniaJS = {
|
||||
$('#butSBatal').click(() => {
|
||||
if (_ceksuper) {
|
||||
clearInterval(_ceksuper);
|
||||
new Request({
|
||||
url: this.WEB_PATH + "auth.php",
|
||||
sendParam: ["mode=auth", "data=super-cancel", "KODE=" + ocall.KODE, "REQ_SID=" + this.APP_SID, "REQ=" + _tsid]
|
||||
new Request.JSON({
|
||||
url: "auth/supervisi",
|
||||
sendParam: ["data=super-cancel", "KODE=" + ocall.KODE, "REQ_SID=" + this.APP_SID, "REQ=" + _tsid]
|
||||
}).send();
|
||||
}
|
||||
});
|
||||
@@ -194,26 +189,26 @@ var FoniaJS = {
|
||||
$('#Auth_SP2').addClass('d-none');
|
||||
$('#Auth_SP3').removeClass('d-none');
|
||||
$('#butSOK').prop('disabled', true);
|
||||
new Request({
|
||||
url: this.WEB_PATH + "auth.php",
|
||||
sendParam: ["mode=auth", "data=super-request", "KODE=" + ocall.KODE, "REQ_SID=" + this.APP_SID, "REQ=" + _tsid, "MSG=" + tmsg]
|
||||
new Request.JSON({
|
||||
url: "auth/supervisi",
|
||||
sendParam: ["data=super-request", "KODE=" + ocall.KODE, "REQ_SID=" + this.APP_SID, "REQ=" + _tsid, "MSG=" + tmsg]
|
||||
}).send();
|
||||
var _cobalagi = 5;
|
||||
_ceksuper = setInterval(() => {
|
||||
$('#butSBatal').html(this.locale("Fonia.cancel") + " (" + _cobalagi + ")");
|
||||
if (_cobalagi == 0) {
|
||||
clearInterval(_ceksuper);
|
||||
new Request({
|
||||
url: this.WEB_PATH + "auth.php",
|
||||
sendParam: ["mode=auth", "data=super-cancel", "KODE=" + ocall.KODE, "REQ_SID=" + this.APP_SID, "REQ=" + _tsid]
|
||||
new Request.JSON({
|
||||
url: "auth/supervisi",
|
||||
sendParam: ["data=super-cancel", "KODE=" + ocall.KODE, "REQ_SID=" + this.APP_SID, "REQ=" + _tsid]
|
||||
}).send();
|
||||
this.closeWindow(this.winSAuth);
|
||||
this.showErrorLocale("Fonia.auth_fail");
|
||||
return false;
|
||||
}
|
||||
new Request.JSON({
|
||||
url: this.WEB_PATH + "auth.php",
|
||||
sendParam: ["mode=auth", "data=request-check", "KODE=" + ocall.KODE, "REQ_SID=" + this.APP_SID, "REQ=" + _tsid],
|
||||
url: "auth/supervisi",
|
||||
sendParam: ["data=request-check", "KODE=" + ocall.KODE, "REQ_SID=" + this.APP_SID, "REQ=" + _tsid],
|
||||
onSuccess: (adata) => {
|
||||
if (adata.status == 1) {
|
||||
clearInterval(_ceksuper);
|
||||
@@ -290,48 +285,91 @@ var FoniaJS = {
|
||||
return smenu;
|
||||
},
|
||||
FormDecorated: function() {
|
||||
$('input').each((i, el) => {
|
||||
$('input.form-control[class*=integer], input.form-control[class*=angka]').each((i, el) => {
|
||||
const elm = $(el);
|
||||
// 16:shift 17:ctrl 18:alt 35:end 36:home 37:left 38:up 39:right 40:down 9:tab 13:enter 27:esc
|
||||
// 8:backspace 46:delete 45:delete 48-57/96-105:num 110/190:dot 109/189/173:minus 107/187/61:plus
|
||||
if (elm.hasClass('integer') || elm.hasClass('angka')) {
|
||||
elm.keydown((e) => {
|
||||
var key = e.keyCode ?? e.which;
|
||||
return (jQuery.inArray(key,[8,9,13,46,110,190])!==-1 || (key>=16 && key<=18) || (key>=35 && key<=40) || (key>=48 && key<=57) || (key>=96 && key<=105));
|
||||
});
|
||||
} else if (elm.hasClass('number')) {
|
||||
elm.keydown((e) => {
|
||||
var key = e.keyCode ?? e.which;
|
||||
return (jQuery.inArray(key,[8,9,13,46,110,190,109,189,173])!==-1 || (key>=16 && key<=18) || (key>=35 && key<=40) || (key>=48 && key<=57) || (key>=96 && key<=105));
|
||||
});
|
||||
elm.focus((e) => {
|
||||
$(e.currentTarget).val( FoniaJS.StrToFloat($(e.currentTarget).val()) );
|
||||
});
|
||||
elm.blur((e) => {
|
||||
$(e.currentTarget).val( FoniaJS.FloatToStr($(e.currentTarget).val(), 0) );
|
||||
});
|
||||
} else if (elm.hasClass('double')) {
|
||||
elm.keydown((e) => {
|
||||
var key = e.keyCode ?? e.which;
|
||||
return (jQuery.inArray(key,[8,9,13,46,110,190,109,189,173])!==-1 || (key>=16 && key<=18) || (key>=35 && key<=40) || (key>=48 && key<=57) || (key>=96 && key<=105));
|
||||
});
|
||||
elm.focus((e) => {
|
||||
$(e.currentTarget).val( FoniaJS.StrToFloat($(e.currentTarget).val()) );
|
||||
$(e.currentTarget).select();
|
||||
});
|
||||
elm.blur((e) => {
|
||||
$(e.currentTarget).val( FoniaJS.FloatToStr($(e.currentTarget).val(), 2) );
|
||||
});
|
||||
} else if (elm.hasClass('phone')) {
|
||||
elm.keyup((e) => {
|
||||
var key = e.keyCode ?? e.which;
|
||||
return (jQuery.inArray(key,[8,9,13,46,110,190,109,189,173,107,187,61])!==-1 || (key>=16 && key<=18) || (key>=35 && key<=40) || (key>=48 && key<=57) || (key>=96 && key<=105));
|
||||
});
|
||||
} else if (elm.hasClass('error') && elm.val()) {
|
||||
var tmp_str = elm.val();
|
||||
elm.val('');
|
||||
FoniaJS.showError(tmp_str);
|
||||
}
|
||||
elm.on('keypress keyup blur paste', (e) => {
|
||||
elm.val(elm.val().replace(/[^\d].+/, ""));
|
||||
if ((e.which < 48 || e.which > 57)) e.preventDefault();
|
||||
});
|
||||
});
|
||||
$('input.form-control[class*=double]').each((i, el) => {
|
||||
const elm = $(el);
|
||||
elm.on('keypress keyup blur paste', (e) => {
|
||||
elm.val(elm.val().replace(/[^0-9\.]/g,''));
|
||||
if (e.type === 'blur') elm.val( FoniaJS.FloatToStr(elm.val(), 2) );
|
||||
if ((e.which != 46 || elm.val().indexOf('.') != -1) && (e.which < 48 || e.which > 57)) e.preventDefault();
|
||||
});
|
||||
elm.on('focus', (e) => {
|
||||
elm.val( FoniaJS.StrToFloat(elm.val()) );
|
||||
elm.select();
|
||||
e.preventDefault();
|
||||
});
|
||||
});
|
||||
$('input.form-control[type=number]').each((i, el) => {
|
||||
const elm = $(el);
|
||||
elm.on('keypress keyup blur paste', (e) => {
|
||||
elm.val(elm.val().replace(/[^0-9]/g,''));
|
||||
if ((e.which != 46 || elm.val().indexOf('.') != -1) && (e.which < 48 || e.which > 57)) e.preventDefault();
|
||||
});
|
||||
});
|
||||
$('input.form-control, textarea.form-control, select.form-select').each((i, el) => {
|
||||
const elm = $(el);
|
||||
const okyup = elm.attr('okyup') ?? '';
|
||||
const oblur = elm.attr('oblur') ?? '';
|
||||
const ochan = elm.attr('ochan') ?? '';
|
||||
elm.on('keyup blur change', (e) => {
|
||||
if (e.type === 'keyup' && okyup) {
|
||||
var fnc = okyup.split('.');
|
||||
if (typeof window[fnc[0]][fnc[1]] === 'function'){
|
||||
window[fnc[0]][fnc[1]]();
|
||||
} else console.warn('fungsi '+okyup+' tidak ada !');
|
||||
}
|
||||
if (e.type === 'blur' && oblur) {
|
||||
var fnc = oblur.split('.');
|
||||
if (typeof window[fnc[0]][fnc[1]] === 'function'){
|
||||
window[fnc[0]][fnc[1]]();
|
||||
} else console.warn('fungsi '+oblur+' tidak ada !');
|
||||
}
|
||||
if (e.type === 'change' && ochan) {
|
||||
var fnc = ochan.split('.');
|
||||
if (typeof window[fnc[0]][fnc[1]] === 'function'){
|
||||
window[fnc[0]][fnc[1]]();
|
||||
} else console.warn('fungsi '+ochan+' tidak ada !');
|
||||
}
|
||||
e.preventDefault();
|
||||
});
|
||||
});
|
||||
$('input.form-check-input[type=radio]').each((i, el) => {
|
||||
const elm = $(el);
|
||||
elm.on('click', () => {
|
||||
const oclic = elm.attr('ochan') ?? '';
|
||||
const elp = $('#'+elm.attr('name'));
|
||||
if (elm.is(':checked')) elp.val(elm.val());
|
||||
if (oclic) {
|
||||
var fnc = oclic.split('.');
|
||||
if (typeof window[fnc[0]][fnc[1]] === 'function'){
|
||||
window[fnc[0]][fnc[1]]();
|
||||
} else console.warn('fungsi '+oclic+' tidak ada !');
|
||||
}
|
||||
});
|
||||
});
|
||||
$('input.form-check-input[type=checkbox]').each((i, el) => {
|
||||
const elm = $(el);
|
||||
elm.on('change', () => {
|
||||
const odata = JSON.parse(elm.attr('odata') ?? '[]');
|
||||
const ochan = elm.attr('ochan') ?? '';
|
||||
elm.val(elm.is(':checked') ? odata[0] : odata[1]);
|
||||
if (ochan) {
|
||||
var fnc = ochan.split('.');
|
||||
if (typeof window[fnc[0]][fnc[1]] === 'function'){
|
||||
window[fnc[0]][fnc[1]]();
|
||||
} else console.warn('fungsi '+ochan+' tidak ada !');
|
||||
}
|
||||
});
|
||||
});
|
||||
$('input[class*=error][type=hidden]').each((i, el) => {
|
||||
const elm = $(el);
|
||||
this.showError(elm.val());
|
||||
});
|
||||
$('.option-tags').each((i, el) => {
|
||||
const elm = $(el);
|
||||
@@ -345,7 +383,7 @@ var FoniaJS = {
|
||||
});
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
if('function' == typeof jQuery.fn.datepicker){
|
||||
$('.pickdate').datepicker({
|
||||
$('.input-group.date').datepicker({
|
||||
format: 'dd-mm-yyyy',
|
||||
weekStart: 1,
|
||||
language: 'id',
|
||||
@@ -360,11 +398,6 @@ var FoniaJS = {
|
||||
RequestParam: function(aparam) {
|
||||
var tmp_hasil = [];
|
||||
var tmp_array = aparam;
|
||||
/*$('input').each((i, el) => {
|
||||
if (el.id.indexOf('_db')!==-1){
|
||||
tmp_array.push(el.id);
|
||||
}
|
||||
});*/
|
||||
var tmp_cblist = {};
|
||||
$('tbody input[id*="cbox"][type="checkbox"]:checked').map((i, b) => {
|
||||
const arr = b.id.split('_');
|
||||
@@ -387,15 +420,6 @@ var FoniaJS = {
|
||||
} else {
|
||||
tmp_value = ($('#'+nilai).is('.integer, .number, .double')) ? this.StrToFloat(tmp_value) : encodeURIComponent(tmp_value);
|
||||
}
|
||||
/*if ($('#'+nilai).hasClass("cgrpbox")) {//not used !
|
||||
var _tmp_value = "";
|
||||
$('input').each((i, el) => {
|
||||
if (el.id.indexOf(nilai + "_cgrpbox")!==-1 && el.checked) {
|
||||
_tmp_value += "," + el.value;
|
||||
}
|
||||
});
|
||||
tmp_value = _tmp_value.substr(1);
|
||||
}*/
|
||||
}
|
||||
tmp_value = nilai + "=" + tmp_value;
|
||||
} else {
|
||||
@@ -794,7 +818,7 @@ class _Request_JSONF extends _Request {
|
||||
dataFilter: (data) => {
|
||||
var json = {}, jsono = {'draw':0,'recordsTotal':0,'recordsFiltered':0,'data':[]};
|
||||
try {
|
||||
json = jQuery.parseJSON(data);
|
||||
json = JSON.parse(data);
|
||||
if (!jQuery.isEmptyObject(json) && json.length > 0){
|
||||
$(json).each((i, lini) => {
|
||||
if (lini.type == 'table-live' && lini.id == ini.id) {
|
||||
@@ -841,7 +865,7 @@ class _Request_JSONF extends _Request {
|
||||
}
|
||||
/** end live db **/
|
||||
if (ini.option.length > 0) opsi.columnDefs.push({responsivePriority:3,targets:-1}, {orderable:false,targets:-1});
|
||||
if (ini.navi.func_navi == '') opsi.paging = false;
|
||||
if (ini.navi.no_navi == true) opsi.paging = false;
|
||||
|
||||
if (ini.config.scrollbar == true) {
|
||||
opsi.scrollY = ini.config.scroll_height;
|
||||
@@ -858,12 +882,26 @@ class _Request_JSONF extends _Request {
|
||||
}
|
||||
_navibar += '<div class="row"><div class="col">';
|
||||
$(ini.navi.button).map((key, val) => {
|
||||
_navibar += '<button type="button" class="btn rounded-pill '+_bcss+' me-2"'+_dis+' onclick="'+val.func+'();">'+val.label+'</button>';
|
||||
_navibar += '<button type="button" class="btn rounded-pill '+_bcss+' me-2 navi-btn-'+key+'"'+_dis+'>'+val.label+'</button>';
|
||||
});
|
||||
_navibar += '</div></div>';
|
||||
}
|
||||
opsi.initComplete = function(settings,json){
|
||||
if (ini.navi.button) $('#'+ini.id+'Tabel_wrapper div.toolbar').html(_navibar);
|
||||
if (ini.navi.button) {
|
||||
$('#'+ini.id+'Tabel_wrapper div.toolbar').html(_navibar);
|
||||
// apply navi button
|
||||
if (ini.navi.button.length > 0){
|
||||
$(ini.navi.button).map((key, val) => {
|
||||
$('#'+ini.id+'Tabel_wrapper div.toolbar button[class*=navi-btn-'+key+']').on('click', (e) => {
|
||||
e.preventDefault();
|
||||
var fnc = val.func.split('.');
|
||||
if (typeof window[fnc[0]][fnc[1]] === 'function'){
|
||||
window[fnc[0]][fnc[1]]();
|
||||
} else console.warn('fungsi '+val.func+' tidak ada !');
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
opsi.drawCallback = function(settings){
|
||||
// apply rowcss to tr/row
|
||||
@@ -908,16 +946,16 @@ class _Request_JSONF extends _Request {
|
||||
$(ini.option).map((key, val) => {
|
||||
if (val.type == 'checkbox'){
|
||||
$('#'+ini.id+'Tabel thead input[type=checkbox][id*=_cbhead_]').on('change', (e) => {
|
||||
var _chek = e.currentTarget.checked;
|
||||
e.currentTarget.value = (e.currentTarget.checked ? val.avalue[0] : val.avalue[1]);
|
||||
var _chek = e.currentTarget.is(':checked');
|
||||
e.currentTarget.val(e.currentTarget.is(':checked') ? val.avalue[0] : val.avalue[1]);
|
||||
$('#'+ini.id+'Tabel tbody input[type=checkbox][id*='+val.field+'_cbox_]').each((i, el) => {
|
||||
el.checked = _chek;
|
||||
el.value = (el.checked ? val.avalue[0] : val.avalue[1]);
|
||||
el.prop('checked', _chek);
|
||||
el.val(el.is(':checked') ? val.avalue[0] : val.avalue[1]);
|
||||
});
|
||||
});
|
||||
$('#'+ini.id+'Tabel tbody input[type=checkbox][id*=_cbox_]').on('change', (e) => {
|
||||
e.currentTarget.value = (e.currentTarget.value == val.avalue[1] ? val.avalue[0] : val.avalue[1]);
|
||||
e.currentTarget.checked = e.currentTarget.value == val.avalue[0];
|
||||
e.currentTarget.val(e.currentTarget.val() == val.avalue[1] ? val.avalue[0] : val.avalue[1]);
|
||||
e.currentTarget.prop('checked', e.currentTarget.val() == val.avalue[0]);
|
||||
});
|
||||
} else if (val.type == 'button'){
|
||||
$('#'+ini.id+'Tabel tbody').on('click', '.'+val.icon, (e) => {
|
||||
@@ -971,6 +1009,7 @@ class _Request_JSONF extends _Request {
|
||||
tr.addClass('dt-hasChild parent');
|
||||
}
|
||||
});
|
||||
// disnini
|
||||
}
|
||||
var otabel = $('#'+ini.id+'Tabel').DataTable(opsi);
|
||||
}
|
||||
@@ -981,7 +1020,7 @@ var Request = function (options) {
|
||||
};
|
||||
|
||||
Request.JSON = function (options) {
|
||||
const _options = Object.assign({}, options, {'dataType':'json'});
|
||||
const _options = Object.assign({}, options, { 'dataType': 'json' });
|
||||
return new _Request(_options);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,448 +0,0 @@
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['jquery'], factory);
|
||||
} else if (typeof exports === 'object') {
|
||||
// Node/CommonJS
|
||||
factory(require('jquery'));
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
|
||||
var ua = navigator.userAgent,
|
||||
iPhone = /iphone/i.test(ua),
|
||||
chrome = /chrome/i.test(ua),
|
||||
android = /android/i.test(ua),
|
||||
caretTimeoutId;
|
||||
|
||||
$.mask = {
|
||||
//Predefined character definitions
|
||||
definitions: {
|
||||
'9': "[0-9]",
|
||||
'a': "[A-Za-z]",
|
||||
'*': "[A-Za-z0-9]"
|
||||
},
|
||||
autoclear: true,
|
||||
dataName: "rawMaskFn",
|
||||
placeholder: '_'
|
||||
};
|
||||
|
||||
$.fn.extend({
|
||||
//Helper Function for Caret positioning
|
||||
caret: function(begin, end) {
|
||||
var range;
|
||||
|
||||
if (this.length === 0 || this.is(":hidden") || this.get(0) !== document.activeElement) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (typeof begin == 'number') {
|
||||
end = (typeof end === 'number') ? end : begin;
|
||||
return this.each(function() {
|
||||
if (this.setSelectionRange) {
|
||||
this.setSelectionRange(begin, end);
|
||||
} else if (this.createTextRange) {
|
||||
range = this.createTextRange();
|
||||
range.collapse(true);
|
||||
range.moveEnd('character', end);
|
||||
range.moveStart('character', begin);
|
||||
range.select();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (this[0].setSelectionRange) {
|
||||
begin = this[0].selectionStart;
|
||||
end = this[0].selectionEnd;
|
||||
} else if (document.selection && document.selection.createRange) {
|
||||
range = document.selection.createRange();
|
||||
begin = 0 - range.duplicate().moveStart('character', -100000);
|
||||
end = begin + range.text.length;
|
||||
}
|
||||
return { begin: begin, end: end };
|
||||
}
|
||||
},
|
||||
unmask: function() {
|
||||
return this.trigger("unmask");
|
||||
},
|
||||
mask: function(mask, settings) {
|
||||
var input,
|
||||
defs,
|
||||
tests,
|
||||
partialPosition,
|
||||
firstNonMaskPos,
|
||||
lastRequiredNonMaskPos,
|
||||
len,
|
||||
oldVal;
|
||||
|
||||
if (!mask && this.length > 0) {
|
||||
input = $(this[0]);
|
||||
var fn = input.data($.mask.dataName)
|
||||
return fn?fn():undefined;
|
||||
}
|
||||
|
||||
settings = $.extend({
|
||||
autoclear: $.mask.autoclear,
|
||||
placeholder: $.mask.placeholder, // Load default placeholder
|
||||
completed: null
|
||||
}, settings);
|
||||
|
||||
|
||||
defs = $.mask.definitions;
|
||||
tests = [];
|
||||
partialPosition = len = mask.length;
|
||||
firstNonMaskPos = null;
|
||||
|
||||
mask = String(mask);
|
||||
|
||||
$.each(mask.split(""), function(i, c) {
|
||||
if (c == '?') {
|
||||
len--;
|
||||
partialPosition = i;
|
||||
} else if (defs[c]) {
|
||||
tests.push(new RegExp(defs[c]));
|
||||
if (firstNonMaskPos === null) {
|
||||
firstNonMaskPos = tests.length - 1;
|
||||
}
|
||||
if(i < partialPosition){
|
||||
lastRequiredNonMaskPos = tests.length - 1;
|
||||
}
|
||||
} else {
|
||||
tests.push(null);
|
||||
}
|
||||
});
|
||||
|
||||
return this.trigger("unmask").each(function() {
|
||||
var input = $(this),
|
||||
buffer = $.map(
|
||||
mask.split(""),
|
||||
function(c, i) {
|
||||
if (c != '?') {
|
||||
return defs[c] ? getPlaceholder(i) : c;
|
||||
}
|
||||
}),
|
||||
defaultBuffer = buffer.join(''),
|
||||
focusText = input.val();
|
||||
|
||||
function tryFireCompleted(){
|
||||
if (!settings.completed) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (var i = firstNonMaskPos; i <= lastRequiredNonMaskPos; i++) {
|
||||
if (tests[i] && buffer[i] === getPlaceholder(i)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
settings.completed.call(input);
|
||||
}
|
||||
|
||||
function getPlaceholder(i){
|
||||
if(i < settings.placeholder.length)
|
||||
return settings.placeholder.charAt(i);
|
||||
return settings.placeholder.charAt(0);
|
||||
}
|
||||
|
||||
function seekNext(pos) {
|
||||
while (++pos < len && !tests[pos]);
|
||||
return pos;
|
||||
}
|
||||
|
||||
function seekPrev(pos) {
|
||||
while (--pos >= 0 && !tests[pos]);
|
||||
return pos;
|
||||
}
|
||||
|
||||
function shiftL(begin,end) {
|
||||
var i,
|
||||
j;
|
||||
|
||||
if (begin<0) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = begin, j = seekNext(end); i < len; i++) {
|
||||
if (tests[i]) {
|
||||
if (j < len && tests[i].test(buffer[j])) {
|
||||
buffer[i] = buffer[j];
|
||||
buffer[j] = getPlaceholder(j);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
j = seekNext(j);
|
||||
}
|
||||
}
|
||||
writeBuffer();
|
||||
input.caret(Math.max(firstNonMaskPos, begin));
|
||||
}
|
||||
|
||||
function shiftR(pos) {
|
||||
var i,
|
||||
c,
|
||||
j,
|
||||
t;
|
||||
|
||||
for (i = pos, c = getPlaceholder(pos); i < len; i++) {
|
||||
if (tests[i]) {
|
||||
j = seekNext(i);
|
||||
t = buffer[i];
|
||||
buffer[i] = c;
|
||||
if (j < len && tests[j].test(t)) {
|
||||
c = t;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function androidInputEvent(e) {
|
||||
var curVal = input.val();
|
||||
var pos = input.caret();
|
||||
if (oldVal && oldVal.length && oldVal.length > curVal.length ) {
|
||||
// a deletion or backspace happened
|
||||
checkVal(true);
|
||||
while (pos.begin > 0 && !tests[pos.begin-1])
|
||||
pos.begin--;
|
||||
if (pos.begin === 0)
|
||||
{
|
||||
while (pos.begin < firstNonMaskPos && !tests[pos.begin])
|
||||
pos.begin++;
|
||||
}
|
||||
input.caret(pos.begin,pos.begin);
|
||||
} else {
|
||||
var pos2 = checkVal(true);
|
||||
var lastEnteredValue = curVal.charAt(pos.begin);
|
||||
if (pos.begin < len){
|
||||
if(!tests[pos.begin]){
|
||||
pos.begin++;
|
||||
if(tests[pos.begin].test(lastEnteredValue)){
|
||||
pos.begin++;
|
||||
}
|
||||
}else{
|
||||
if(tests[pos.begin].test(lastEnteredValue)){
|
||||
pos.begin++;
|
||||
}
|
||||
}
|
||||
}
|
||||
input.caret(pos.begin,pos.begin);
|
||||
}
|
||||
tryFireCompleted();
|
||||
}
|
||||
|
||||
|
||||
function blurEvent(e) {
|
||||
checkVal();
|
||||
|
||||
if (input.val() != focusText)
|
||||
input.change();
|
||||
}
|
||||
|
||||
function keydownEvent(e) {
|
||||
if (input.prop("readonly")){
|
||||
return;
|
||||
}
|
||||
|
||||
var k = e.which || e.keyCode,
|
||||
pos,
|
||||
begin,
|
||||
end;
|
||||
oldVal = input.val();
|
||||
//backspace, delete, and escape get special treatment
|
||||
if (k === 8 || k === 46 || (iPhone && k === 127)) {
|
||||
pos = input.caret();
|
||||
begin = pos.begin;
|
||||
end = pos.end;
|
||||
|
||||
if (end - begin === 0) {
|
||||
begin=k!==46?seekPrev(begin):(end=seekNext(begin-1));
|
||||
end=k===46?seekNext(end):end;
|
||||
}
|
||||
clearBuffer(begin, end);
|
||||
shiftL(begin, end - 1);
|
||||
|
||||
e.preventDefault();
|
||||
} else if( k === 13 ) { // enter
|
||||
blurEvent.call(this, e);
|
||||
} else if (k === 27) { // escape
|
||||
input.val(focusText);
|
||||
input.caret(0, checkVal());
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
function keypressEvent(e) {
|
||||
if (input.prop("readonly")){
|
||||
return;
|
||||
}
|
||||
|
||||
var k = e.which || e.keyCode,
|
||||
pos = input.caret(),
|
||||
p,
|
||||
c,
|
||||
next;
|
||||
|
||||
if (e.ctrlKey || e.altKey || e.metaKey || k < 32) {//Ignore
|
||||
return;
|
||||
} else if ( k && k !== 13 ) {
|
||||
if (pos.end - pos.begin !== 0){
|
||||
clearBuffer(pos.begin, pos.end);
|
||||
shiftL(pos.begin, pos.end-1);
|
||||
}
|
||||
|
||||
p = seekNext(pos.begin - 1);
|
||||
if (p < len) {
|
||||
c = String.fromCharCode(k);
|
||||
if (tests[p].test(c)) {
|
||||
shiftR(p);
|
||||
|
||||
buffer[p] = c;
|
||||
writeBuffer();
|
||||
next = seekNext(p);
|
||||
|
||||
if(android){
|
||||
//Path for CSP Violation on FireFox OS 1.1
|
||||
var proxy = function() {
|
||||
$.proxy($.fn.caret,input,next)();
|
||||
};
|
||||
|
||||
setTimeout(proxy,0);
|
||||
}else{
|
||||
input.caret(next);
|
||||
}
|
||||
if(pos.begin <= lastRequiredNonMaskPos){
|
||||
tryFireCompleted();
|
||||
}
|
||||
}
|
||||
}
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
function clearBuffer(start, end) {
|
||||
var i;
|
||||
for (i = start; i < end && i < len; i++) {
|
||||
if (tests[i]) {
|
||||
buffer[i] = getPlaceholder(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function writeBuffer() { input.val(buffer.join('')); }
|
||||
|
||||
function checkVal(allow) {
|
||||
//try to place characters where they belong
|
||||
var test = input.val(),
|
||||
lastMatch = -1,
|
||||
i,
|
||||
c,
|
||||
pos;
|
||||
|
||||
for (i = 0, pos = 0; i < len; i++) {
|
||||
if (tests[i]) {
|
||||
buffer[i] = getPlaceholder(i);
|
||||
while (pos++ < test.length) {
|
||||
c = test.charAt(pos - 1);
|
||||
if (tests[i].test(c)) {
|
||||
buffer[i] = c;
|
||||
lastMatch = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (pos > test.length) {
|
||||
clearBuffer(i + 1, len);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (buffer[i] === test.charAt(pos)) {
|
||||
pos++;
|
||||
}
|
||||
if( i < partialPosition){
|
||||
lastMatch = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (allow) {
|
||||
writeBuffer();
|
||||
} else if (lastMatch + 1 < partialPosition) {
|
||||
if (settings.autoclear || buffer.join('') === defaultBuffer) {
|
||||
// Invalid value. Remove it and replace it with the
|
||||
// mask, which is the default behavior.
|
||||
if(input.val()) input.val("");
|
||||
clearBuffer(0, len);
|
||||
} else {
|
||||
// Invalid value, but we opt to show the value to the
|
||||
// user and allow them to correct their mistake.
|
||||
writeBuffer();
|
||||
}
|
||||
} else {
|
||||
writeBuffer();
|
||||
input.val(input.val().substring(0, lastMatch + 1));
|
||||
}
|
||||
return (partialPosition ? i : firstNonMaskPos);
|
||||
}
|
||||
|
||||
input.data($.mask.dataName,function(){
|
||||
return $.map(buffer, function(c, i) {
|
||||
return tests[i]&&c!=getPlaceholder(i) ? c : null;
|
||||
}).join('');
|
||||
});
|
||||
|
||||
|
||||
input
|
||||
.one("unmask", function() {
|
||||
input
|
||||
.off(".mask")
|
||||
.removeData($.mask.dataName);
|
||||
})
|
||||
.on("focus.mask", function() {
|
||||
if (input.prop("readonly")){
|
||||
return;
|
||||
}
|
||||
|
||||
clearTimeout(caretTimeoutId);
|
||||
var pos;
|
||||
|
||||
focusText = input.val();
|
||||
|
||||
pos = checkVal();
|
||||
|
||||
caretTimeoutId = setTimeout(function(){
|
||||
if(input.get(0) !== document.activeElement){
|
||||
return;
|
||||
}
|
||||
writeBuffer();
|
||||
if (pos == mask.replace("?","").length) {
|
||||
input.caret(0, pos);
|
||||
} else {
|
||||
input.caret(pos);
|
||||
}
|
||||
}, 10);
|
||||
})
|
||||
.on("blur.mask", blurEvent)
|
||||
.on("keydown.mask", keydownEvent)
|
||||
.on("keypress.mask", keypressEvent)
|
||||
.on("input.mask paste.mask", function() {
|
||||
if (input.prop("readonly")){
|
||||
return;
|
||||
}
|
||||
|
||||
setTimeout(function() {
|
||||
var pos=checkVal(true);
|
||||
input.caret(pos);
|
||||
tryFireCompleted();
|
||||
}, 0);
|
||||
});
|
||||
if (chrome && android)
|
||||
{
|
||||
input
|
||||
.off('input.mask')
|
||||
.on('input.mask', androidInputEvent);
|
||||
}
|
||||
checkVal(); //Perform initial check for existing values
|
||||
});
|
||||
}
|
||||
});
|
||||
}));
|
||||
@@ -1,6 +1,6 @@
|
||||
/*!
|
||||
autosize 5.0.1
|
||||
autosize 6.0.1
|
||||
license: MIT
|
||||
http://www.jacklmoore.com/autosize
|
||||
*/
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e||self).autosize=t()}(this,function(){var e,t,n="function"==typeof Map?new Map:(e=[],t=[],{has:function(t){return e.indexOf(t)>-1},get:function(n){return t[e.indexOf(n)]},set:function(n,o){-1===e.indexOf(n)&&(e.push(n),t.push(o))},delete:function(n){var o=e.indexOf(n);o>-1&&(e.splice(o,1),t.splice(o,1))}}),o=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){o=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function r(e){var t=n.get(e);t&&t.destroy()}function i(e){var t=n.get(e);t&&t.update()}var l=null;return"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((l=function(e){return e}).destroy=function(e){return e},l.update=function(e){return e}):((l=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],function(e){return function(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!n.has(e)){var t,r=null,i=null,l=null,d=function(){e.clientWidth!==i&&c()},u=function(t){window.removeEventListener("resize",d,!1),e.removeEventListener("input",c,!1),e.removeEventListener("keyup",c,!1),e.removeEventListener("autosize:destroy",u,!1),e.removeEventListener("autosize:update",c,!1),Object.keys(t).forEach(function(n){e.style[n]=t[n]}),n.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",u,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",c,!1),window.addEventListener("resize",d,!1),e.addEventListener("input",c,!1),e.addEventListener("autosize:update",c,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",n.set(e,{destroy:u,update:c}),"vertical"===(t=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===t.resize&&(e.style.resize="horizontal"),r="content-box"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(r)&&(r=0),c()}function a(t){var n=e.style.width;e.style.width="0px",e.style.width=n,e.style.overflowY=t}function s(){if(0!==e.scrollHeight){var t=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),n=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+r+"px",i=e.clientWidth,t.forEach(function(e){e.node.scrollTop=e.scrollTop}),n&&(document.documentElement.scrollTop=n)}}function c(){s();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(r<t?"hidden"===n.overflowY&&(a("scroll"),s(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(a("hidden"),s(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),l!==r){l=r;var i=o("autosize:resized");try{e.dispatchEvent(i)}catch(e){}}}}(e)}),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],r),e},l.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],i),e}),l});
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e||self).autosize=t()}(this,function(){var e=new Map;function t(t){var o=e.get(t);o&&o.destroy()}function o(t){var o=e.get(t);o&&o.update()}var r=null;return"undefined"==typeof window?((r=function(e){return e}).destroy=function(e){return e},r.update=function(e){return e}):((r=function(t,o){return t&&Array.prototype.forEach.call(t.length?t:[t],function(t){return function(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!e.has(t)){var o,r=null,n=window.getComputedStyle(t),i=(o=t.value,function(){s({testForHeightReduction:""===o||!t.value.startsWith(o),restoreTextAlign:null}),o=t.value}),l=function(o){t.removeEventListener("autosize:destroy",l),t.removeEventListener("autosize:update",a),t.removeEventListener("input",i),window.removeEventListener("resize",a),Object.keys(o).forEach(function(e){return t.style[e]=o[e]}),e.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,textAlign:t.style.textAlign,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",l),t.addEventListener("autosize:update",a),t.addEventListener("input",i),window.addEventListener("resize",a),t.style.overflowX="hidden",t.style.wordWrap="break-word",e.set(t,{destroy:l,update:a}),a()}function s(e){var o,i,l=e.restoreTextAlign,a=void 0===l?null:l,d=e.testForHeightReduction,u=void 0===d||d,f=n.overflowY;if(0!==t.scrollHeight&&("vertical"===n.resize?t.style.resize="none":"both"===n.resize&&(t.style.resize="horizontal"),u&&(o=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push([e.parentNode,e.parentNode.scrollTop]),e=e.parentNode;return function(){return t.forEach(function(e){var t=e[0],o=e[1];t.style.scrollBehavior="auto",t.scrollTop=o,t.style.scrollBehavior=null})}}(t),t.style.height=""),i="content-box"===n.boxSizing?t.scrollHeight-(parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)):t.scrollHeight+parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),"none"!==n.maxHeight&&i>parseFloat(n.maxHeight)?("hidden"===n.overflowY&&(t.style.overflow="scroll"),i=parseFloat(n.maxHeight)):"hidden"!==n.overflowY&&(t.style.overflow="hidden"),t.style.height=i+"px",a&&(t.style.textAlign=a),o&&o(),r!==i&&(t.dispatchEvent(new Event("autosize:resized",{bubbles:!0})),r=i),f!==n.overflow&&!a)){var c=n.textAlign;"hidden"===n.overflow&&(t.style.textAlign="start"===c?"end":"start"),s({restoreTextAlign:c,testForHeightReduction:!0})}}function a(){s({testForHeightReduction:!0,restoreTextAlign:null})}}(t)}),t}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],t),e},r.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],o),e}),r});
|
||||
|
||||
@@ -284,7 +284,7 @@
|
||||
};
|
||||
|
||||
for (var i = 0; i < images.length; i++) {
|
||||
if ($.isArray(images[i])) {
|
||||
if (Array.isArray(images[i])) {
|
||||
images[i] = widthInsertSort(images[i]);
|
||||
var chosen = selectBest(containerWidth, containerHeight, images[i]);
|
||||
chosenImages.push(chosen);
|
||||
@@ -338,7 +338,7 @@
|
||||
if (typeof sources === 'undefined') {
|
||||
return;
|
||||
}
|
||||
if (!$.isArray(sources)) {
|
||||
if (!Array.isArray(sources)) {
|
||||
sources = [sources];
|
||||
}
|
||||
|
||||
@@ -424,7 +424,7 @@
|
||||
if (typeof images[i] === 'string') {
|
||||
processed.push({url: images[i]});
|
||||
}
|
||||
else if ($.isArray(images[i])) {
|
||||
else if (Array.isArray(images[i])) {
|
||||
processed.push(processImagesArray(images[i]));
|
||||
}
|
||||
else {
|
||||
@@ -556,7 +556,7 @@
|
||||
* e.g. $.backstretch('/path/to/image.jpg')
|
||||
* So, we need to turn this back into an array.
|
||||
*/
|
||||
this.images = processImagesArray($.isArray(images) ? images : [images]);
|
||||
this.images = processImagesArray(Array.isArray(images) ? images : [images]);
|
||||
|
||||
/**
|
||||
* Paused-Option
|
||||
|
||||
Vendored
+2
-2
File diff suppressed because one or more lines are too long
Vendored
+3
-3
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
/*******************************************************************
|
||||
|
||||
Module : /js3/qz/qz-start.js
|
||||
Module : /js/qz/qz-start.js
|
||||
Desc. : JS Setup QZ Connection
|
||||
Created By : Siau Pheng (siaupheng@3fonia.com).
|
||||
Created Date : May 27th, 2007.
|
||||
@@ -71,11 +71,11 @@ const _divStatus = '#divQZStatus';
|
||||
if (typeof qz !== 'undefined') {
|
||||
qz.security.setSignatureAlgorithm("SHA512");
|
||||
qz.security.setCertificatePromise((resolve, reject) => {
|
||||
jQuery.ajax({url:FoniaJS.WEB_PATH+'assets/signing/cert.pem', cache:false, dataType:'text'}).then(resolve, reject);
|
||||
jQuery.ajax({url:'qz/cert', cache:false, dataType:'text'}).then(resolve, reject);
|
||||
});
|
||||
qz.security.setSignaturePromise((toSign) => {
|
||||
return (resolve, reject) => {
|
||||
jQuery.post(FoniaJS.WEB_PATH+"assets/signing/sign.php?req="+toSign).then(resolve, reject);
|
||||
jQuery.ajax('qz/sign/'+toSign).then(resolve, reject);
|
||||
};
|
||||
});
|
||||
qz.websocket.setClosedCallbacks((evt) => {
|
||||
|
||||
+445
-51
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user