Import WebThrottle-EX from ca33f6a
No files matched your search
@@ -0,0 +1,116 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg">
|
||||
<metadata>Generated by IcoMoon</metadata>
|
||||
<defs>
|
||||
<font id="icomoon" horiz-adv-x="1024">
|
||||
<font-face units-per-em="1024" ascent="960" descent="-64" />
|
||||
<missing-glyph horiz-adv-x="1024" />
|
||||
<glyph unicode=" " horiz-adv-x="512" d="" />
|
||||
<glyph unicode="" glyph-name="up" horiz-adv-x="1156" d="M502.29 915.862l-489.931-848.331c-7.125-12.45-11.327-27.365-11.327-43.261 0-48.391 38.937-87.687 87.189-88.269l0.055-0.001h979.862c48.308 0.582 87.244 39.879 87.244 88.27 0 15.896-4.202 30.811-11.555 43.695l0.228-0.434-489.931 848.331c-15.663 26.062-43.785 43.229-75.917 43.229s-60.254-17.168-75.695-42.831l-0.222-0.398z" />
|
||||
<glyph unicode="" glyph-name="down" horiz-adv-x="1156" d="M502.29-19.862l-489.931 848.331c-7.125 12.45-11.327 27.365-11.327 43.261 0 48.391 38.937 87.687 87.189 88.269l0.055 0.001h979.862c48.308-0.582 87.244-39.879 87.244-88.27 0-15.896-4.202-30.811-11.555-43.695l0.228 0.434-489.931-848.331c-15.663-26.062-43.785-43.229-75.917-43.229s-60.254 17.168-75.695 42.831l-0.222 0.398z" />
|
||||
<glyph unicode="" glyph-name="droplet" d="M864.626 486.838c-65.754 183.44-205.11 348.15-352.626 473.162-147.516-125.012-286.87-289.722-352.626-473.162-40.664-113.436-44.682-236.562 12.584-345.4 65.846-125.14 198.632-205.438 340.042-205.438s274.196 80.298 340.040 205.44c57.27 108.838 53.25 231.962 12.586 345.398zM738.764 201.044c-43.802-83.252-132.812-137.044-226.764-137.044-55.12 0-108.524 18.536-152.112 50.652 13.242-1.724 26.632-2.652 40.112-2.652 117.426 0 228.668 67.214 283.402 171.242 44.878 85.292 40.978 173.848 23.882 244.338 14.558-28.15 26.906-56.198 36.848-83.932 22.606-63.062 40.024-156.34-5.368-242.604z" />
|
||||
<glyph unicode="" glyph-name="paint-format" d="M1024 384v384h-192v64c0 35.2-28.8 64-64 64h-704c-35.2 0-64-28.8-64-64v-192c0-35.2 28.8-64 64-64h704c35.2 0 64 28.8 64 64v64h128v-256h-576v-128h-32c-17.674 0-32-14.326-32-32v-320c0-17.674 14.326-32 32-32h128c17.674 0 32 14.326 32 32v320c0 17.674-14.326 32-32 32h-32v64h576zM768 768h-704v64h704v-64z" />
|
||||
<glyph unicode="" glyph-name="image" d="M959.884 832c0.040-0.034 0.082-0.076 0.116-0.116v-767.77c-0.034-0.040-0.076-0.082-0.116-0.116h-895.77c-0.040 0.034-0.082 0.076-0.114 0.116v767.772c0.034 0.040 0.076 0.082 0.114 0.114h895.77zM960 896h-896c-35.2 0-64-28.8-64-64v-768c0-35.2 28.8-64 64-64h896c35.2 0 64 28.8 64 64v768c0 35.2-28.8 64-64 64v0zM832 672c0-53.020-42.98-96-96-96s-96 42.98-96 96 42.98 96 96 96 96-42.98 96-96zM896 128h-768v128l224 384 256-320h64l224 192z" />
|
||||
<glyph unicode="" glyph-name="images" horiz-adv-x="1152" d="M1088 832h-64v64c0 35.2-28.8 64-64 64h-896c-35.2 0-64-28.8-64-64v-768c0-35.2 28.8-64 64-64h64v-64c0-35.2 28.8-64 64-64h896c35.2 0 64 28.8 64 64v768c0 35.2-28.8 64-64 64zM128 768v-640h-63.886c-0.040 0.034-0.082 0.076-0.114 0.116v767.77c0.034 0.040 0.076 0.082 0.114 0.114h895.77c0.040-0.034 0.082-0.076 0.116-0.116v-63.884h-768c-35.2 0-64-28.8-64-64v0zM1088 0.116c-0.034-0.040-0.076-0.082-0.116-0.116h-895.77c-0.040 0.034-0.082 0.076-0.114 0.116v767.77c0.034 0.040 0.076 0.082 0.114 0.114h895.77c0.040-0.034 0.082-0.076 0.116-0.116v-767.768zM960 608c0-53.020-42.98-96-96-96s-96 42.98-96 96 42.98 96 96 96 96-42.98 96-96zM1024 64h-768v128l224 384 256-320h64l224 192z" />
|
||||
<glyph unicode="" glyph-name="camera" d="M304 352c0-114.876 93.124-208 208-208s208 93.124 208 208-93.124 208-208 208-208-93.124-208-208zM960 704h-224c-16 64-32 128-96 128h-256c-64 0-80-64-96-128h-224c-35.2 0-64-28.8-64-64v-576c0-35.2 28.8-64 64-64h896c35.2 0 64 28.8 64 64v576c0 35.2-28.8 64-64 64zM512 68c-156.85 0-284 127.148-284 284 0 156.85 127.15 284 284 284 156.852 0 284-127.15 284-284 0-156.852-127.146-284-284-284zM960 512h-128v64h128v-64z" />
|
||||
<glyph unicode="" glyph-name="video-camera" d="M384 672c0 88.366 71.634 160 160 160s160-71.634 160-160c0-88.366-71.634-160-160-160s-160 71.634-160 160zM0 672c0 88.366 71.634 160 160 160s160-71.634 160-160c0-88.366-71.634-160-160-160s-160 71.634-160 160zM768 352v96c0 35.2-28.8 64-64 64h-640c-35.2 0-64-28.8-64-64v-320c0-35.2 28.8-64 64-64h640c35.2 0 64 28.8 64 64v96l256-160v448l-256-160zM640 192h-512v192h512v-192z" />
|
||||
<glyph unicode="" glyph-name="book" d="M896 832v-832h-672c-53.026 0-96 42.98-96 96s42.974 96 96 96h608v768h-640c-70.398 0-128-57.6-128-128v-768c0-70.4 57.602-128 128-128h768v896h-64zM224.056 128v0c-0.018-0.002-0.038 0-0.056 0-17.672 0-32-14.326-32-32s14.328-32 32-32c0.018 0 0.038 0.002 0.056 0.002v-0.002h607.89v64h-607.89z" />
|
||||
<glyph unicode="" glyph-name="file-empty" d="M917.806 730.924c-22.212 30.292-53.174 65.7-87.178 99.704s-69.412 64.964-99.704 87.178c-51.574 37.82-76.592 42.194-90.924 42.194h-496c-44.112 0-80-35.888-80-80v-864c0-44.112 35.888-80 80-80h736c44.112 0 80 35.888 80 80v624c0 14.332-4.372 39.35-42.194 90.924zM785.374 785.374c30.7-30.7 54.8-58.398 72.58-81.374h-153.954v153.946c22.984-17.78 50.678-41.878 81.374-72.572zM896 16c0-8.672-7.328-16-16-16h-736c-8.672 0-16 7.328-16 16v864c0 8.672 7.328 16 16 16 0 0 495.956 0.002 496 0v-224c0-17.672 14.326-32 32-32h224v-624z" />
|
||||
<glyph unicode="" glyph-name="files-empty" d="M917.806 602.924c-22.21 30.292-53.174 65.7-87.178 99.704s-69.412 64.964-99.704 87.178c-51.574 37.82-76.592 42.194-90.924 42.194h-368c-44.114 0-80-35.888-80-80v-736c0-44.112 35.886-80 80-80h608c44.112 0 80 35.888 80 80v496c0 14.332-4.372 39.35-42.194 90.924zM785.374 657.374c30.7-30.7 54.8-58.398 72.58-81.374h-153.954v153.946c22.982-17.78 50.678-41.878 81.374-72.572v0zM896 16c0-8.672-7.328-16-16-16h-608c-8.672 0-16 7.328-16 16v736c0 8.672 7.328 16 16 16 0 0 367.956 0.002 368 0v-224c0-17.672 14.324-32 32-32h224v-496zM602.924 917.804c-51.574 37.822-76.592 42.196-90.924 42.196h-368c-44.112 0-80-35.888-80-80v-736c0-38.632 27.528-70.958 64-78.39v814.39c0 8.672 7.328 16 16 16h486.876c-9.646 7.92-19.028 15.26-27.952 21.804z" />
|
||||
<glyph unicode="" glyph-name="file-play" d="M384 576l320-224-320-224v448zM917.806 730.924c-22.212 30.292-53.174 65.7-87.178 99.704s-69.412 64.964-99.704 87.178c-51.574 37.82-76.592 42.194-90.924 42.194h-496c-44.112 0-80-35.888-80-80v-864c0-44.112 35.888-80 80-80h736c44.112 0 80 35.888 80 80v624c0 14.332-4.372 39.35-42.194 90.924zM785.374 785.374c30.7-30.7 54.8-58.398 72.58-81.374h-153.954v153.946c22.984-17.78 50.678-41.878 81.374-72.572zM896 16c0-8.672-7.328-16-16-16h-736c-8.672 0-16 7.328-16 16v864c0 8.672 7.328 16 16 16 0 0 495.956 0.002 496 0v-224c0-17.672 14.326-32 32-32h224v-624z" />
|
||||
<glyph unicode="" glyph-name="file-video" d="M917.806 730.924c-22.208 30.292-53.174 65.7-87.178 99.704s-69.412 64.964-99.704 87.178c-51.574 37.82-76.594 42.194-90.924 42.194h-496c-44.112 0-80-35.888-80-80v-864c0-44.112 35.882-80 80-80h736c44.112 0 80 35.888 80 80v624c0 14.332-4.372 39.35-42.194 90.924v0 0zM785.374 785.374c30.7-30.7 54.8-58.398 72.58-81.374h-153.954v153.946c22.98-17.78 50.678-41.878 81.374-72.572v0 0zM896 16c0-8.672-7.328-16-16-16h-736c-8.672 0-16 7.328-16 16v864c0 8.672 7.328 16 16 16 0 0 495.956 0.002 496 0v-224c0-17.672 14.32-32 32-32h224v-624zM256 448h320v-320h-320v320zM576 320l192 128v-320l-192 128z" />
|
||||
<glyph unicode="" glyph-name="file-zip" d="M917.806 730.924c-22.208 30.292-53.174 65.7-87.178 99.704s-69.412 64.964-99.704 87.178c-51.574 37.82-76.592 42.194-90.924 42.194h-496c-44.112 0-80-35.888-80-80v-864c0-44.112 35.884-80 80-80h736c44.112 0 80 35.888 80 80v624c0 14.332-4.372 39.35-42.194 90.924v0 0zM785.374 785.374c30.7-30.7 54.8-58.398 72.58-81.374h-153.954v153.946c22.98-17.78 50.678-41.878 81.374-72.572v0 0zM896 16c0-8.672-7.328-16-16-16h-736c-8.672 0-16 7.328-16 16v864c0 8.672 7.328 16 16 16 0 0 495.956 0.002 496 0v-224c0-17.672 14.322-32 32-32h224v-624zM256 896h128v-64h-128v64zM384 832h128v-64h-128v64zM256 768h128v-64h-128v64zM384 704h128v-64h-128v64zM256 640h128v-64h-128v64zM384 576h128v-64h-128v64zM256 512h128v-64h-128v64zM384 448h128v-64h-128v64zM256 112c0-26.4 21.6-48 48-48h160c26.4 0 48 21.6 48 48v160c0 26.4-21.6 48-48 48h-80v64h-128v-272zM448 192v-64h-128v64h128z" />
|
||||
<glyph unicode="" glyph-name="stack" d="M1024 640l-512 256-512-256 512-256 512 256zM512 811.030l342.058-171.030-342.058-171.030-342.058 171.030 342.058 171.030zM921.444 499.278l102.556-51.278-512-256-512 256 102.556 51.278 409.444-204.722zM921.444 307.278l102.556-51.278-512-256-512 256 102.556 51.278 409.444-204.722z" />
|
||||
<glyph unicode="" glyph-name="folder" d="M448 832l128-128h448v-704h-1024v832z" />
|
||||
<glyph unicode="" glyph-name="folder-open" d="M832 0l192 512h-832l-192-512zM128 576l-128-576v832h288l128-128h416v-128z" />
|
||||
<glyph unicode="" glyph-name="folder-plus" d="M576 704l-128 128h-448v-832h1024v704h-448zM704 256h-128v-128h-128v128h-128v128h128v128h128v-128h128v-128z" />
|
||||
<glyph unicode="" glyph-name="folder-minus" d="M576 704l-128 128h-448v-832h1024v704h-448zM704 256h-384v128h384v-128z" />
|
||||
<glyph unicode="" glyph-name="folder-download" d="M576 704l-128 128h-448v-832h1024v704h-448zM512 96l-224 224h160v256h128v-256h160l-224-224z" />
|
||||
<glyph unicode="" glyph-name="folder-upload" d="M576 704l-128 128h-448v-832h1024v704h-448zM512 480l224-224h-160v-256h-128v256h-160l224 224z" />
|
||||
<glyph unicode="" glyph-name="price-tag" d="M976 960h-384c-26.4 0-63.274-15.274-81.942-33.942l-476.116-476.116c-18.668-18.668-18.668-49.214 0-67.882l412.118-412.118c18.668-18.668 49.214-18.668 67.882 0l476.118 476.118c18.666 18.666 33.94 55.54 33.94 81.94v384c0 26.4-21.6 48-48 48zM736 576c-53.020 0-96 42.98-96 96s42.98 96 96 96 96-42.98 96-96-42.98-96-96-96z" />
|
||||
<glyph unicode="" glyph-name="price-tags" horiz-adv-x="1280" d="M1232 960h-384c-26.4 0-63.274-15.274-81.942-33.942l-476.116-476.116c-18.668-18.668-18.668-49.214 0-67.882l412.118-412.118c18.668-18.668 49.214-18.668 67.882 0l476.118 476.118c18.666 18.666 33.94 55.54 33.94 81.94v384c0 26.4-21.6 48-48 48zM992 576c-53.020 0-96 42.98-96 96s42.98 96 96 96 96-42.98 96-96-42.98-96-96-96zM128 416l544 544h-80c-26.4 0-63.274-15.274-81.942-33.942l-476.116-476.116c-18.668-18.668-18.668-49.214 0-67.882l412.118-412.118c18.668-18.668 49.214-18.668 67.882 0l30.058 30.058-416 416z" />
|
||||
<glyph unicode="" glyph-name="location" d="M512 960c-176.732 0-320-143.268-320-320 0-320 320-704 320-704s320 384 320 704c0 176.732-143.27 320-320 320zM512 448c-106.040 0-192 85.96-192 192s85.96 192 192 192 192-85.96 192-192-85.96-192-192-192z" />
|
||||
<glyph unicode="" glyph-name="history" horiz-adv-x="1088" d="M640 896c247.424 0 448-200.576 448-448s-200.576-448-448-448v96c94.024 0 182.418 36.614 248.902 103.098s103.098 154.878 103.098 248.902c0 94.022-36.614 182.418-103.098 248.902s-154.878 103.098-248.902 103.098c-94.022 0-182.418-36.614-248.902-103.098-51.14-51.138-84.582-115.246-97.306-184.902h186.208l-224-256-224 256h164.57c31.060 217.102 217.738 384 443.43 384zM832 512v-128h-256v320h128v-192z" />
|
||||
<glyph unicode="" glyph-name="alarm" d="M512 832c-247.424 0-448-200.576-448-448s200.576-448 448-448 448 200.576 448 448-200.576 448-448 448zM512 24c-198.824 0-360 161.178-360 360 0 198.824 161.176 360 360 360 198.822 0 360-161.176 360-360 0-198.822-161.178-360-360-360zM934.784 672.826c16.042 28.052 25.216 60.542 25.216 95.174 0 106.040-85.96 192-192 192-61.818 0-116.802-29.222-151.92-74.596 131.884-27.236 245.206-105.198 318.704-212.578v0zM407.92 885.404c-35.116 45.374-90.102 74.596-151.92 74.596-106.040 0-192-85.96-192-192 0-34.632 9.174-67.122 25.216-95.174 73.5 107.38 186.822 185.342 318.704 212.578zM512 384v256h-64v-320h256v64z" />
|
||||
<glyph unicode="" glyph-name="bell" d="M1025.5 160c0 288-256 224-256 448 0 18.56-1.788 34.42-5.048 47.928-16.83 113.018-92.156 203.72-189.772 231.36 0.866 3.948 1.32 8.032 1.32 12.21 0 33.278-28.8 60.502-64 60.502s-64-27.224-64-60.5c0-4.18 0.456-8.264 1.32-12.21-109.47-30.998-190.914-141.298-193.254-273.442-0.040-1.92-0.066-3.864-0.066-5.846 0-224.002-256-160.002-256-448.002 0-76.226 170.59-139.996 398.97-156.080 21.524-40.404 64.056-67.92 113.030-67.92s91.508 27.516 113.030 67.92c228.38 16.084 398.97 79.854 398.97 156.080 0 0.228-0.026 0.456-0.028 0.682l1.528-0.682zM826.246 105.904c-54.23-14.47-118.158-24.876-186.768-30.648-5.704 65.418-60.582 116.744-127.478 116.744s-121.774-51.326-127.478-116.744c-68.608 5.772-132.538 16.178-186.768 30.648-74.63 19.914-110.31 42.19-123.368 54.096 13.058 11.906 48.738 34.182 123.368 54.096 86.772 23.152 198.372 35.904 314.246 35.904s227.474-12.752 314.246-35.904c74.63-19.914 110.31-42.19 123.368-54.096-13.058-11.906-48.738-34.182-123.368-54.096z" />
|
||||
<glyph unicode="" glyph-name="stopwatch" d="M512.002 766.788v65.212h128v64c0 35.346-28.654 64-64.002 64h-191.998c-35.346 0-64-28.654-64-64v-64h128v-65.212c-214.798-16.338-384-195.802-384-414.788 0-229.75 186.25-416 416-416s416 186.25 416 416c0 218.984-169.202 398.448-384 414.788zM706.276 125.726c-60.442-60.44-140.798-93.726-226.274-93.726s-165.834 33.286-226.274 93.726c-60.44 60.44-93.726 140.8-93.726 226.274s33.286 165.834 93.726 226.274c58.040 58.038 134.448 91.018 216.114 93.548l-21.678-314.020c-1.86-26.29 12.464-37.802 31.836-37.802s33.698 11.512 31.836 37.802l-21.676 314.022c81.666-2.532 158.076-35.512 216.116-93.55 60.44-60.44 93.726-140.8 93.726-226.274s-33.286-165.834-93.726-226.274z" />
|
||||
<glyph unicode="" glyph-name="display" d="M0 896v-640h1024v640h-1024zM960 320h-896v512h896v-512zM672 192h-320l-32-128-64-64h512l-64 64z" />
|
||||
<glyph unicode="" glyph-name="mobile" d="M736 960h-448c-52.8 0-96-43.2-96-96v-832c0-52.8 43.2-96 96-96h448c52.8 0 96 43.2 96 96v832c0 52.8-43.2 96-96 96zM384 912h256v-32h-256v32zM512 0c-35.346 0-64 28.654-64 64s28.654 64 64 64 64-28.654 64-64-28.654-64-64-64zM768 192h-512v640h512v-640z" />
|
||||
<glyph unicode="" glyph-name="mobile2" d="M768 960h-576c-35.2 0-64-28.798-64-64v-896c0-35.2 28.798-64 64-64h576c35.2 0 64 28.8 64 64v896c0 35.202-28.8 64-64 64zM480-17.782c-27.492 0-49.782 22.29-49.782 49.782s22.29 49.782 49.782 49.782 49.782-22.29 49.782-49.782-22.29-49.782-49.782-49.782zM768 128h-576v704h576v-704z" />
|
||||
<glyph unicode="" glyph-name="box-add" d="M832 896h-640l-192-192v-672c0-17.674 14.326-32 32-32h960c17.672 0 32 14.326 32 32v672l-192 192zM512 128l-320 256h192v192h256v-192h192l-320-256zM154.51 768l64 64h586.978l64-64h-714.978z" />
|
||||
<glyph unicode="" glyph-name="box-remove" d="M832 896h-640l-192-192v-672c0-17.674 14.326-32 32-32h960c17.672 0 32 14.326 32 32v672l-192 192zM640 320v-192h-256v192h-192l320 256 320-256h-192zM154.51 768l64 64h586.976l64-64h-714.976z" />
|
||||
<glyph unicode="" glyph-name="download" d="M512 384l256 256h-192v256h-128v-256h-192zM744.726 488.728l-71.74-71.742 260.080-96.986-421.066-157.018-421.066 157.018 260.080 96.986-71.742 71.742-279.272-104.728v-256l512-192 512 192v256z" />
|
||||
<glyph unicode="" glyph-name="upload" d="M448 384h128v256h192l-256 256-256-256h192zM640 528v-98.712l293.066-109.288-421.066-157.018-421.066 157.018 293.066 109.288v98.712l-384-144v-256l512-192 512 192v256z" />
|
||||
<glyph unicode="" glyph-name="floppy-disk" d="M896 960h-896v-1024h1024v896l-128 128zM512 832h128v-256h-128v256zM896 64h-768v768h64v-320h576v320h74.978l53.022-53.018v-714.982z" />
|
||||
<glyph unicode="" glyph-name="database" d="M512 960c-282.77 0-512-71.634-512-160v-128c0-88.366 229.23-160 512-160s512 71.634 512 160v128c0 88.366-229.23 160-512 160zM512 416c-282.77 0-512 71.634-512 160v-192c0-88.366 229.23-160 512-160s512 71.634 512 160v192c0-88.366-229.23-160-512-160zM512 128c-282.77 0-512 71.634-512 160v-192c0-88.366 229.23-160 512-160s512 71.634 512 160v192c0-88.366-229.23-160-512-160z" />
|
||||
<glyph unicode="" glyph-name="undo" d="M512 896c-141.384 0-269.376-57.32-362.032-149.978l-149.968 149.978v-384h384l-143.532 143.522c69.496 69.492 165.492 112.478 271.532 112.478 212.068 0 384-171.924 384-384 0-114.696-50.292-217.636-130.018-288l84.666-96c106.302 93.816 173.352 231.076 173.352 384 0 282.77-229.23 512-512 512z" />
|
||||
<glyph unicode="" glyph-name="redo" d="M0 384c0-152.924 67.048-290.184 173.35-384l84.666 96c-79.726 70.364-130.016 173.304-130.016 288 0 212.076 171.93 384 384 384 106.042 0 202.038-42.986 271.53-112.478l-143.53-143.522h384v384l-149.97-149.978c-92.654 92.658-220.644 149.978-362.030 149.978-282.77 0-512-229.23-512-512z" />
|
||||
<glyph unicode="" glyph-name="undo2" d="M761.862-64c113.726 206.032 132.888 520.306-313.862 509.824v-253.824l-384 384 384 384v-248.372c534.962 13.942 594.57-472.214 313.862-775.628z" />
|
||||
<glyph unicode="" glyph-name="redo2" d="M576 711.628v248.372l384-384-384-384v253.824c-446.75 10.482-427.588-303.792-313.86-509.824-280.712 303.414-221.1 789.57 313.86 775.628z" />
|
||||
<glyph unicode="" glyph-name="user" d="M576 253.388v52.78c70.498 39.728 128 138.772 128 237.832 0 159.058 0 288-192 288s-192-128.942-192-288c0-99.060 57.502-198.104 128-237.832v-52.78c-217.102-17.748-384-124.42-384-253.388h896c0 128.968-166.898 235.64-384 253.388z" />
|
||||
<glyph unicode="" glyph-name="users" horiz-adv-x="1152" d="M768 189.388v52.78c70.498 39.728 128 138.772 128 237.832 0 159.058 0 288-192 288s-192-128.942-192-288c0-99.060 57.502-198.104 128-237.832v-52.78c-217.102-17.748-384-124.42-384-253.388h896c0 128.968-166.898 235.64-384 253.388zM327.196 164.672c55.31 36.15 124.080 63.636 199.788 80.414-15.054 17.784-28.708 37.622-40.492 59.020-30.414 55.234-46.492 116.058-46.492 175.894 0 86.042 0 167.31 30.6 233.762 29.706 64.504 83.128 104.496 159.222 119.488-16.914 76.48-61.94 126.75-181.822 126.75-192 0-192-128.942-192-288 0-99.060 57.502-198.104 128-237.832v-52.78c-217.102-17.748-384-124.42-384-253.388h279.006c14.518 12.91 30.596 25.172 48.19 36.672z" />
|
||||
<glyph unicode="" glyph-name="spinner2" d="M1024 448c-1.278 66.862-15.784 133.516-42.576 194.462-26.704 61-65.462 116.258-113.042 161.92-47.552 45.696-103.944 81.82-164.984 105.652-61.004 23.924-126.596 35.352-191.398 33.966-64.81-1.282-129.332-15.374-188.334-41.356-59.048-25.896-112.542-63.47-156.734-109.576-44.224-46.082-79.16-100.708-102.186-159.798-23.114-59.062-34.128-122.52-32.746-185.27 1.286-62.76 14.964-125.148 40.134-182.206 25.088-57.1 61.476-108.828 106.11-151.548 44.61-42.754 97.472-76.504 154.614-98.72 57.118-22.304 118.446-32.902 179.142-31.526 60.708 1.29 120.962 14.554 176.076 38.914 55.15 24.282 105.116 59.48 146.366 102.644 41.282 43.14 73.844 94.236 95.254 149.43 13.034 33.458 21.88 68.4 26.542 103.798 1.246-0.072 2.498-0.12 3.762-0.12 35.346 0 64 28.652 64 64 0 1.796-0.094 3.572-0.238 5.332h0.238zM922.306 278.052c-23.472-53.202-57.484-101.4-99.178-141.18-41.67-39.81-91-71.186-144.244-91.79-53.228-20.678-110.29-30.452-166.884-29.082-56.604 1.298-112.596 13.736-163.82 36.474-51.25 22.666-97.684 55.49-135.994 95.712-38.338 40.198-68.528 87.764-88.322 139.058-19.87 51.284-29.228 106.214-27.864 160.756 1.302 54.552 13.328 108.412 35.254 157.69 21.858 49.3 53.498 93.97 92.246 130.81 38.73 36.868 84.53 65.87 133.874 84.856 49.338 19.060 102.136 28.006 154.626 26.644 52.5-1.306 104.228-12.918 151.562-34.034 47.352-21.050 90.256-51.502 125.624-88.782 35.396-37.258 63.21-81.294 81.39-128.688 18.248-47.392 26.782-98.058 25.424-148.496h0.238c-0.144-1.76-0.238-3.536-0.238-5.332 0-33.012 24.992-60.174 57.086-63.624-6.224-34.822-16.53-68.818-30.78-100.992z" />
|
||||
<glyph unicode="" glyph-name="spinner11" d="M1024 576h-384l143.53 143.53c-72.53 72.526-168.96 112.47-271.53 112.47s-199-39.944-271.53-112.47c-72.526-72.53-112.47-168.96-112.47-271.53s39.944-199 112.47-271.53c72.53-72.526 168.96-112.47 271.53-112.47s199 39.944 271.528 112.472c6.056 6.054 11.86 12.292 17.456 18.668l96.32-84.282c-93.846-107.166-231.664-174.858-385.304-174.858-282.77 0-512 229.23-512 512s229.23 512 512 512c141.386 0 269.368-57.326 362.016-149.984l149.984 149.984v-384z" />
|
||||
<glyph unicode="" glyph-name="binoculars" d="M64 960h384v-64h-384zM576 960h384v-64h-384zM952 640h-56v256h-256v-256h-256v256h-256v-256h-56c-39.6 0-72-32.4-72-72v-560c0-39.6 32.4-72 72-72h304c39.6 0 72 32.4 72 72v376h128v-376c0-39.6 32.4-72 72-72h304c39.6 0 72 32.4 72 72v560c0 39.6-32.4 72-72 72zM348 0h-248c-19.8 0-36 14.4-36 32s16.2 32 36 32h248c19.8 0 36-14.4 36-32s-16.2-32-36-32zM544 448h-64c-17.6 0-32 14.4-32 32s14.4 32 32 32h64c17.6 0 32-14.4 32-32s-14.4-32-32-32zM924 0h-248c-19.8 0-36 14.4-36 32s16.2 32 36 32h248c19.8 0 36-14.4 36-32s-16.2-32-36-32z" />
|
||||
<glyph unicode="" glyph-name="search" d="M992.262 88.604l-242.552 206.294c-25.074 22.566-51.89 32.926-73.552 31.926 57.256 67.068 91.842 154.078 91.842 249.176 0 212.078-171.922 384-384 384-212.076 0-384-171.922-384-384s171.922-384 384-384c95.098 0 182.108 34.586 249.176 91.844-1-21.662 9.36-48.478 31.926-73.552l206.294-242.552c35.322-39.246 93.022-42.554 128.22-7.356s31.892 92.898-7.354 128.22zM384 320c-141.384 0-256 114.616-256 256s114.616 256 256 256 256-114.616 256-256-114.614-256-256-256z" />
|
||||
<glyph unicode="" glyph-name="zoom-in" d="M992.262 88.604l-242.552 206.294c-25.074 22.566-51.89 32.926-73.552 31.926 57.256 67.068 91.842 154.078 91.842 249.176 0 212.078-171.922 384-384 384-212.076 0-384-171.922-384-384s171.922-384 384-384c95.098 0 182.108 34.586 249.176 91.844-1-21.662 9.36-48.478 31.926-73.552l206.294-242.552c35.322-39.246 93.022-42.554 128.22-7.356s31.892 92.898-7.354 128.22zM384 320c-141.384 0-256 114.616-256 256s114.616 256 256 256 256-114.616 256-256-114.614-256-256-256zM448 768h-128v-128h-128v-128h128v-128h128v128h128v128h-128z" />
|
||||
<glyph unicode="" glyph-name="zoom-out" d="M992.262 88.604l-242.552 206.294c-25.074 22.566-51.89 32.926-73.552 31.926 57.256 67.068 91.842 154.078 91.842 249.176 0 212.078-171.922 384-384 384-212.076 0-384-171.922-384-384s171.922-384 384-384c95.098 0 182.108 34.586 249.176 91.844-1-21.662 9.36-48.478 31.926-73.552l206.294-242.552c35.322-39.246 93.022-42.554 128.22-7.356s31.892 92.898-7.354 128.22zM384 320c-141.384 0-256 114.616-256 256s114.616 256 256 256 256-114.616 256-256-114.614-256-256-256zM192 640h384v-128h-384z" />
|
||||
<glyph unicode="" glyph-name="key" d="M704 960c-176.73 0-320-143.268-320-320 0-20.026 1.858-39.616 5.376-58.624l-389.376-389.376v-192c0-35.346 28.654-64 64-64h64v64h128v128h128v128h128l83.042 83.042c34.010-12.316 70.696-19.042 108.958-19.042 176.73 0 320 143.268 320 320s-143.27 320-320 320zM799.874 639.874c-53.020 0-96 42.98-96 96s42.98 96 96 96 96-42.98 96-96-42.98-96-96-96z" />
|
||||
<glyph unicode="" glyph-name="key2" d="M1002.132 645.758l-101.106 101.104c-24.792 24.794-65.37 65.368-90.162 90.164l-101.106 101.104c-24.792 24.794-68.954 29.166-98.13 9.716l-276.438-184.292c-29.176-19.452-40.218-61.028-24.536-92.39l70.486-140.974c2.154-4.306 4.646-8.896 7.39-13.66l-356.53-356.53-32-224h192v64h128v128h128v128h128v71.186c6.396-3.812 12.534-7.216 18.192-10.044l140.97-70.488c31.366-15.682 72.94-4.638 92.39 24.538l184.294 276.44c19.454 29.172 15.078 73.33-9.714 98.126zM150.628 105.374l-45.254 45.254 311.572 311.57 45.254-45.254-311.572-311.57zM917.020 536.236l-45.256-45.256c-12.446-12.444-32.808-12.444-45.254 0l-271.53 271.53c-12.446 12.444-12.446 32.81 0 45.254l45.256 45.256c12.446 12.444 32.808 12.444 45.254 0l271.53-271.53c12.446-12.444 12.446-32.81 0-45.254z" />
|
||||
<glyph unicode="" glyph-name="lock" d="M592 512h-16v192c0 105.87-86.13 192-192 192h-128c-105.87 0-192-86.13-192-192v-192h-16c-26.4 0-48-21.6-48-48v-480c0-26.4 21.6-48 48-48h544c26.4 0 48 21.6 48 48v480c0 26.4-21.6 48-48 48zM192 704c0 35.29 28.71 64 64 64h128c35.29 0 64-28.71 64-64v-192h-256v192z" />
|
||||
<glyph unicode="" glyph-name="unlocked" d="M768 896c105.87 0 192-86.13 192-192v-192h-128v192c0 35.29-28.71 64-64 64h-128c-35.29 0-64-28.71-64-64v-192h16c26.4 0 48-21.6 48-48v-480c0-26.4-21.6-48-48-48h-544c-26.4 0-48 21.6-48 48v480c0 26.4 21.6 48 48 48h400v192c0 105.87 86.13 192 192 192h128z" />
|
||||
<glyph unicode="" glyph-name="wrench" d="M1002.934 142.124l-460.552 394.76c21.448 40.298 33.618 86.282 33.618 135.116 0 159.058-128.942 288-288 288-29.094 0-57.172-4.332-83.646-12.354l166.39-166.39c24.89-24.89 24.89-65.62 0-90.51l-101.49-101.49c-24.89-24.89-65.62-24.89-90.51 0l-166.39 166.39c-8.022-26.474-12.354-54.552-12.354-83.646 0-159.058 128.942-288 288-288 48.834 0 94.818 12.17 135.116 33.62l394.76-460.552c22.908-26.724 62.016-28.226 86.904-3.338l101.492 101.492c24.888 24.888 23.386 63.994-3.338 86.902z" />
|
||||
<glyph unicode="" glyph-name="equalizer" d="M448 832v16c0 26.4-21.6 48-48 48h-160c-26.4 0-48-21.6-48-48v-16h-192v-128h192v-16c0-26.4 21.6-48 48-48h160c26.4 0 48 21.6 48 48v16h576v128h-576zM256 704v128h128v-128h-128zM832 528c0 26.4-21.6 48-48 48h-160c-26.4 0-48-21.6-48-48v-16h-576v-128h576v-16c0-26.4 21.6-48 48-48h160c26.4 0 48 21.6 48 48v16h192v128h-192v16zM640 384v128h128v-128h-128zM448 208c0 26.4-21.6 48-48 48h-160c-26.4 0-48-21.6-48-48v-16h-192v-128h192v-16c0-26.4 21.6-48 48-48h160c26.4 0 48 21.6 48 48v16h576v128h-576v16zM256 64v128h128v-128h-128z" />
|
||||
<glyph unicode="" glyph-name="equalizer2" d="M896 512h16c26.4 0 48 21.6 48 48v160c0 26.4-21.6 48-48 48h-16v192h-128v-192h-16c-26.4 0-48-21.6-48-48v-160c0-26.4 21.6-48 48-48h16v-576h128v576zM768 704h128v-128h-128v128zM592 128c26.4 0 48 21.6 48 48v160c0 26.4-21.6 48-48 48h-16v576h-128v-576h-16c-26.4 0-48-21.6-48-48v-160c0-26.4 21.6-48 48-48h16v-192h128v192h16zM448 320h128v-128h-128v128zM272 512c26.4 0 48 21.6 48 48v160c0 26.4-21.6 48-48 48h-16v192h-128v-192h-16c-26.4 0-48-21.6-48-48v-160c0-26.4 21.6-48 48-48h16v-576h128v576h16zM128 704h128v-128h-128v128z" />
|
||||
<glyph unicode="" glyph-name="cog" d="M933.79 349.75c-53.726 93.054-21.416 212.304 72.152 266.488l-100.626 174.292c-28.75-16.854-62.176-26.518-97.846-26.518-107.536 0-194.708 87.746-194.708 195.99h-201.258c0.266-33.41-8.074-67.282-25.958-98.252-53.724-93.056-173.156-124.702-266.862-70.758l-100.624-174.292c28.97-16.472 54.050-40.588 71.886-71.478 53.638-92.908 21.512-211.92-71.708-266.224l100.626-174.292c28.65 16.696 61.916 26.254 97.4 26.254 107.196 0 194.144-87.192 194.7-194.958h201.254c-0.086 33.074 8.272 66.57 25.966 97.218 53.636 92.906 172.776 124.594 266.414 71.012l100.626 174.29c-28.78 16.466-53.692 40.498-71.434 71.228zM512 240.668c-114.508 0-207.336 92.824-207.336 207.334 0 114.508 92.826 207.334 207.336 207.334 114.508 0 207.332-92.826 207.332-207.334-0.002-114.51-92.824-207.334-207.332-207.334z" />
|
||||
<glyph unicode="" glyph-name="cogs" d="M363.722 237.948l41.298 57.816-45.254 45.256-57.818-41.296c-10.722 5.994-22.204 10.774-34.266 14.192l-11.682 70.084h-64l-11.68-70.086c-12.062-3.418-23.544-8.198-34.266-14.192l-57.818 41.298-45.256-45.256 41.298-57.816c-5.994-10.72-10.774-22.206-14.192-34.266l-70.086-11.682v-64l70.086-11.682c3.418-12.060 8.198-23.544 14.192-34.266l-41.298-57.816 45.254-45.256 57.818 41.296c10.722-5.994 22.204-10.774 34.266-14.192l11.682-70.084h64l11.68 70.086c12.062 3.418 23.544 8.198 34.266 14.192l57.818-41.296 45.254 45.256-41.298 57.816c5.994 10.72 10.774 22.206 14.192 34.266l70.088 11.68v64l-70.086 11.682c-3.418 12.060-8.198 23.544-14.192 34.266zM224 96c-35.348 0-64 28.654-64 64s28.652 64 64 64 64-28.654 64-64-28.652-64-64-64zM1024 576v64l-67.382 12.25c-1.242 8.046-2.832 15.978-4.724 23.79l57.558 37.1-24.492 59.128-66.944-14.468c-4.214 6.91-8.726 13.62-13.492 20.13l39.006 56.342-45.256 45.254-56.342-39.006c-6.512 4.766-13.22 9.276-20.13 13.494l14.468 66.944-59.128 24.494-37.1-57.558c-7.812 1.892-15.744 3.482-23.79 4.724l-12.252 67.382h-64l-12.252-67.382c-8.046-1.242-15.976-2.832-23.79-4.724l-37.098 57.558-59.128-24.492 14.468-66.944c-6.91-4.216-13.62-8.728-20.13-13.494l-56.342 39.006-45.254-45.254 39.006-56.342c-4.766-6.51-9.278-13.22-13.494-20.13l-66.944 14.468-24.492-59.128 57.558-37.1c-1.892-7.812-3.482-15.742-4.724-23.79l-67.384-12.252v-64l67.382-12.25c1.242-8.046 2.832-15.978 4.724-23.79l-57.558-37.1 24.492-59.128 66.944 14.468c4.216-6.91 8.728-13.618 13.494-20.13l-39.006-56.342 45.254-45.256 56.342 39.006c6.51-4.766 13.22-9.276 20.13-13.492l-14.468-66.944 59.128-24.492 37.102 57.558c7.81-1.892 15.742-3.482 23.788-4.724l12.252-67.384h64l12.252 67.382c8.044 1.242 15.976 2.832 23.79 4.724l37.1-57.558 59.128 24.492-14.468 66.944c6.91 4.216 13.62 8.726 20.13 13.492l56.342-39.006 45.256 45.256-39.006 56.342c4.766 6.512 9.276 13.22 13.492 20.13l66.944-14.468 24.492 59.13-57.558 37.1c1.892 7.812 3.482 15.742 4.724 23.79l67.382 12.25zM672 468.8c-76.878 0-139.2 62.322-139.2 139.2s62.32 139.2 139.2 139.2 139.2-62.322 139.2-139.2c0-76.878-62.32-139.2-139.2-139.2z" />
|
||||
<glyph unicode="" glyph-name="meter" d="M512 896c282.77 0 512-229.23 512-512 0-192.792-106.576-360.666-264.008-448h-495.984c-157.432 87.334-264.008 255.208-264.008 448 0 282.77 229.23 512 512 512zM801.914 94.086c77.438 77.44 120.086 180.398 120.086 289.914h-90v64h85.038c-7.014 44.998-21.39 88.146-42.564 128h-106.474v64h64.284c-9.438 11.762-19.552 23.096-30.37 33.914-46.222 46.22-101.54 80.038-161.914 99.798v-69.712h-64v85.040c-20.982 3.268-42.36 4.96-64 4.96s-43.018-1.69-64-4.96v-85.040h-64v69.712c-60.372-19.76-115.692-53.576-161.914-99.798-10.818-10.818-20.932-22.152-30.37-33.914h64.284v-64h-106.476c-21.174-39.854-35.552-83.002-42.564-128h85.040v-64h-90c0-109.516 42.648-212.474 120.086-289.914 10.71-10.71 21.924-20.728 33.56-30.086h192.354l36.572 512h54.856l36.572-512h192.354c11.636 9.358 22.852 19.378 33.56 30.086z" />
|
||||
<glyph unicode="" glyph-name="meter2" d="M512 960c-282.77 0-512-229.23-512-512s229.23-512 512-512 512 229.23 512 512-229.23 512-512 512zM302.836 125.848c11.106 30.632 17.164 63.688 17.164 98.152 0 124.35-78.81 230.292-189.208 270.606 10.21 84.924 48.254 163.498 109.678 224.924 72.53 72.526 168.96 112.47 271.53 112.47s199-39.944 271.53-112.47c61.428-61.426 99.468-140 109.682-224.924-110.402-40.314-189.212-146.256-189.212-270.606 0-34.468 6.060-67.52 17.166-98.15-61.706-40.242-133.77-61.85-209.166-61.85-75.394 0-147.458 21.608-209.164 61.848zM551.754 319.004c13.878-3.494 24.246-16.080 24.246-31.004v-64c0-17.6-14.4-32-32-32h-64c-17.6 0-32 14.4-32 32v64c0 14.924 10.368 27.51 24.246 31.004l23.754 448.996h32l23.754-448.996z" />
|
||||
<glyph unicode="" glyph-name="download3" d="M736 512l-256-256-256 256h160v384h192v-384zM480 256h-480v-256h960v256h-480zM896 128h-128v64h128v-64z" />
|
||||
<glyph unicode="" glyph-name="upload3" d="M480 256h-480v-256h960v256h-480zM896 128h-128v64h128v-64zM224 640l256 256 256-256h-160v-320h-192v320z" />
|
||||
<glyph unicode="" glyph-name="earth" d="M512 960c-282.77 0-512-229.23-512-512s229.23-512 512-512 512 229.23 512 512-229.23 512-512 512zM512-0.002c-62.958 0-122.872 13.012-177.23 36.452l233.148 262.29c5.206 5.858 8.082 13.422 8.082 21.26v96c0 17.674-14.326 32-32 32-112.99 0-232.204 117.462-233.374 118.626-6 6.002-14.14 9.374-22.626 9.374h-128c-17.672 0-32-14.328-32-32v-192c0-12.122 6.848-23.202 17.69-28.622l110.31-55.156v-187.886c-116.052 80.956-192 215.432-192 367.664 0 68.714 15.49 133.806 43.138 192h116.862c8.488 0 16.626 3.372 22.628 9.372l128 128c6 6.002 9.372 14.14 9.372 22.628v77.412c40.562 12.074 83.518 18.588 128 18.588 70.406 0 137.004-16.26 196.282-45.2-4.144-3.502-8.176-7.164-12.046-11.036-36.266-36.264-56.236-84.478-56.236-135.764s19.97-99.5 56.236-135.764c36.434-36.432 85.218-56.264 135.634-56.26 3.166 0 6.342 0.080 9.518 0.236 13.814-51.802 38.752-186.656-8.404-372.334-0.444-1.744-0.696-3.488-0.842-5.224-81.324-83.080-194.7-134.656-320.142-134.656z" />
|
||||
<glyph unicode="" glyph-name="flag" d="M0 960h128v-1024h-128v1024zM832 316.998c82.624 0 154.57 19.984 192 49.5v512c-37.43-29.518-109.376-49.502-192-49.502s-154.57 19.984-192 49.502v-512c37.43-29.516 109.376-49.5 192-49.5zM608 927.472c-46.906 19.94-115.52 32.528-192 32.528-96.396 0-180.334-19.984-224-49.502v-512c43.666 29.518 127.604 49.502 224 49.502 76.48 0 145.094-12.588 192-32.528v512z" />
|
||||
<glyph unicode="" glyph-name="attachment" d="M665.832 632.952l-64.952 64.922-324.81-324.742c-53.814-53.792-53.814-141.048 0-194.844 53.804-53.792 141.060-53.792 194.874 0l389.772 389.708c89.714 89.662 89.714 235.062 0 324.726-89.666 89.704-235.112 89.704-324.782 0l-409.23-409.178c-0.29-0.304-0.612-0.576-0.876-0.846-125.102-125.096-125.102-327.856 0-452.906 125.054-125.056 327.868-125.056 452.988 0 0.274 0.274 0.516 0.568 0.82 0.876l0.032-0.034 279.332 279.292-64.986 64.92-279.33-279.262c-0.296-0.268-0.564-0.57-0.846-0.844-89.074-89.058-233.98-89.058-323.076 0-89.062 89.042-89.062 233.922 0 322.978 0.304 0.304 0.604 0.582 0.888 0.846l-0.046 0.060 409.28 409.166c53.712 53.738 141.144 53.738 194.886 0 53.712-53.734 53.712-141.148 0-194.84l-389.772-389.7c-17.936-17.922-47.054-17.922-64.972 0-17.894 17.886-17.894 47.032 0 64.92l324.806 324.782z" />
|
||||
<glyph unicode="" glyph-name="eye" d="M512 768c-223.318 0-416.882-130.042-512-320 95.118-189.958 288.682-320 512-320 223.312 0 416.876 130.042 512 320-95.116 189.958-288.688 320-512 320zM764.45 598.296c60.162-38.374 111.142-89.774 149.434-150.296-38.292-60.522-89.274-111.922-149.436-150.296-75.594-48.218-162.89-73.704-252.448-73.704-89.56 0-176.858 25.486-252.452 73.704-60.158 38.372-111.138 89.772-149.432 150.296 38.292 60.524 89.274 111.924 149.434 150.296 3.918 2.5 7.876 4.922 11.86 7.3-9.96-27.328-15.41-56.822-15.41-87.596 0-141.382 114.616-256 256-256 141.382 0 256 114.618 256 256 0 30.774-5.452 60.268-15.408 87.598 3.978-2.378 7.938-4.802 11.858-7.302v0zM512 544c0-53.020-42.98-96-96-96s-96 42.98-96 96 42.98 96 96 96 96-42.982 96-96z" />
|
||||
<glyph unicode="" glyph-name="eye-plus" d="M1024 832h-128v128h-128v-128h-128v-128h128v-128h128v128h128zM863.862 513.972c18.436-20.478 35.192-42.53 50.022-65.972-38.292-60.522-89.274-111.922-149.436-150.296-75.594-48.218-162.89-73.704-252.448-73.704-89.56 0-176.86 25.486-252.454 73.704-60.156 38.372-111.136 89.772-149.43 150.296 38.292 60.524 89.274 111.924 149.434 150.296 3.918 2.5 7.876 4.922 11.862 7.3-9.962-27.328-15.412-56.822-15.412-87.596 0-141.382 114.616-256 256-256 141.38 0 256 114.618 256 256 0 0.692-0.018 1.38-0.024 2.072-109.284 28.138-190.298 126.63-191.932 244.31-21.026 2.38-42.394 3.618-64.044 3.618-223.318 0-416.882-130.042-512-320 95.118-189.958 288.682-320 512-320 223.31 0 416.876 130.042 512 320-17.64 35.23-38.676 68.394-62.65 99.054-29.28-17.178-62.272-28.71-97.488-33.082zM416 640c53.020 0 96-42.982 96-96 0-53.020-42.98-96-96-96s-96 42.98-96 96 42.98 96 96 96z" />
|
||||
<glyph unicode="" glyph-name="eye-minus" d="M640 832h384v-128h-384v128zM870.32 640h-294.32v124.388c-21.014 2.376-42.364 3.612-64 3.612-223.318 0-416.882-130.042-512-320 95.118-189.958 288.682-320 512-320 223.31 0 416.876 130.042 512 320-37.396 74.686-90.020 140.1-153.68 192zM416 640c53.020 0 96-42.982 96-96 0-53.020-42.98-96-96-96s-96 42.98-96 96 42.98 96 96 96zM764.448 297.704c-75.594-48.218-162.89-73.704-252.448-73.704-89.56 0-176.86 25.486-252.454 73.704-60.156 38.372-111.136 89.772-149.43 150.296 38.292 60.524 89.274 111.924 149.434 150.296 3.918 2.5 7.876 4.922 11.862 7.3-9.962-27.328-15.412-56.822-15.412-87.596 0-141.382 114.616-256 256-256 141.38 0 256 114.618 256 256 0 30.774-5.454 60.268-15.408 87.598 3.976-2.378 7.938-4.802 11.858-7.302 60.162-38.374 111.142-89.774 149.434-150.296-38.292-60.522-89.274-111.922-149.436-150.296z" />
|
||||
<glyph unicode="" glyph-name="star-empty" d="M1024 562.95l-353.78 51.408-158.22 320.582-158.216-320.582-353.784-51.408 256-249.538-60.432-352.352 316.432 166.358 316.432-166.358-60.434 352.352 256.002 249.538zM512 206.502l-223.462-117.48 42.676 248.83-180.786 176.222 249.84 36.304 111.732 226.396 111.736-226.396 249.836-36.304-180.788-176.222 42.678-248.83-223.462 117.48z" />
|
||||
<glyph unicode="" glyph-name="star-half" d="M1024 562.95l-353.78 51.408-158.22 320.582-158.216-320.582-353.784-51.408 256-249.538-60.432-352.352 316.432 166.358 316.432-166.358-60.434 352.352 256.002 249.538zM512 206.502l-0.942-0.496 0.942 570.768 111.736-226.396 249.836-36.304-180.788-176.222 42.678-248.83-223.462 117.48z" />
|
||||
<glyph unicode="" glyph-name="star-full" d="M1024 562.95l-353.78 51.408-158.22 320.582-158.216-320.582-353.784-51.408 256-249.538-60.432-352.352 316.432 166.358 316.432-166.358-60.434 352.352 256.002 249.538z" />
|
||||
<glyph unicode="" glyph-name="warning" d="M512 867.226l429.102-855.226h-858.206l429.104 855.226zM512 960c-22.070 0-44.14-14.882-60.884-44.648l-437.074-871.112c-33.486-59.532-5-108.24 63.304-108.24h869.308c68.3 0 96.792 48.708 63.3 108.24h0.002l-437.074 871.112c-16.742 29.766-38.812 44.648-60.882 44.648v0zM576 128c0-35.346-28.654-64-64-64s-64 28.654-64 64c0 35.346 28.654 64 64 64s64-28.654 64-64zM512 256c-35.346 0-64 28.654-64 64v192c0 35.346 28.654 64 64 64s64-28.654 64-64v-192c0-35.346-28.654-64-64-64z" />
|
||||
<glyph unicode="" glyph-name="notification" d="M512 864c-111.118 0-215.584-43.272-294.156-121.844s-121.844-183.038-121.844-294.156c0-111.118 43.272-215.584 121.844-294.156s183.038-121.844 294.156-121.844c111.118 0 215.584 43.272 294.156 121.844s121.844 183.038 121.844 294.156c0 111.118-43.272 215.584-121.844 294.156s-183.038 121.844-294.156 121.844zM512 960v0c282.77 0 512-229.23 512-512s-229.23-512-512-512c-282.77 0-512 229.23-512 512s229.23 512 512 512zM448 256h128v-128h-128zM448 768h128v-384h-128z" />
|
||||
<glyph unicode="" glyph-name="question" d="M448 256h128v-128h-128zM704 704c35.346 0 64-28.654 64-64v-192l-192-128h-128v64l192 128v64h-320v128h384zM512 864c-111.118 0-215.584-43.272-294.156-121.844s-121.844-183.038-121.844-294.156c0-111.118 43.272-215.584 121.844-294.156s183.038-121.844 294.156-121.844c111.118 0 215.584 43.272 294.156 121.844s121.844 183.038 121.844 294.156c0 111.118-43.272 215.584-121.844 294.156s-183.038 121.844-294.156 121.844zM512 960v0c282.77 0 512-229.23 512-512s-229.23-512-512-512c-282.77 0-512 229.23-512 512s229.23 512 512 512z" />
|
||||
<glyph unicode="" glyph-name="plus" d="M992 576h-352v352c0 17.672-14.328 32-32 32h-192c-17.672 0-32-14.328-32-32v-352h-352c-17.672 0-32-14.328-32-32v-192c0-17.672 14.328-32 32-32h352v-352c0-17.672 14.328-32 32-32h192c17.672 0 32 14.328 32 32v352h352c17.672 0 32 14.328 32 32v192c0 17.672-14.328 32-32 32z" />
|
||||
<glyph unicode="" glyph-name="minus" d="M0 544v-192c0-17.672 14.328-32 32-32h960c17.672 0 32 14.328 32 32v192c0 17.672-14.328 32-32 32h-960c-17.672 0-32-14.328-32-32z" />
|
||||
<glyph unicode="" glyph-name="info" d="M448 656c0 26.4 21.6 48 48 48h32c26.4 0 48-21.6 48-48v-32c0-26.4-21.6-48-48-48h-32c-26.4 0-48 21.6-48 48v32zM640 192h-256v64h64v192h-64v64h192v-256h64zM512 960c-282.77 0-512-229.23-512-512s229.23-512 512-512 512 229.23 512 512-229.23 512-512 512zM512 32c-229.75 0-416 186.25-416 416s186.25 416 416 416 416-186.25 416-416-186.25-416-416-416z" />
|
||||
<glyph unicode="" glyph-name="cancel-circle" d="M512 960c-282.77 0-512-229.23-512-512s229.23-512 512-512 512 229.23 512 512-229.23 512-512 512zM512 32c-229.75 0-416 186.25-416 416s186.25 416 416 416 416-186.25 416-416-186.25-416-416-416zM672 704l-160-160-160 160-96-96 160-160-160-160 96-96 160 160 160-160 96 96-160 160 160 160z" />
|
||||
<glyph unicode="" glyph-name="blocked" d="M874.040 810.040c-96.706 96.702-225.28 149.96-362.040 149.96s-265.334-53.258-362.040-149.96c-96.702-96.706-149.96-225.28-149.96-362.040s53.258-265.334 149.96-362.040c96.706-96.702 225.28-149.96 362.040-149.96s265.334 53.258 362.040 149.96c96.702 96.706 149.96 225.28 149.96 362.040s-53.258 265.334-149.96 362.040zM896 448c0-82.814-26.354-159.588-71.112-222.38l-535.266 535.268c62.792 44.758 139.564 71.112 222.378 71.112 211.738 0 384-172.262 384-384zM128 448c0 82.814 26.354 159.586 71.112 222.378l535.27-535.268c-62.794-44.756-139.568-71.11-222.382-71.11-211.738 0-384 172.262-384 384z" />
|
||||
<glyph unicode="" glyph-name="cross" d="M1014.662 137.34c-0.004 0.004-0.008 0.008-0.012 0.010l-310.644 310.65 310.644 310.65c0.004 0.004 0.008 0.006 0.012 0.010 3.344 3.346 5.762 7.254 7.312 11.416 4.246 11.376 1.824 24.682-7.324 33.83l-146.746 146.746c-9.148 9.146-22.45 11.566-33.828 7.32-4.16-1.55-8.070-3.968-11.418-7.31 0-0.004-0.004-0.006-0.008-0.010l-310.648-310.652-310.648 310.65c-0.004 0.004-0.006 0.006-0.010 0.010-3.346 3.342-7.254 5.76-11.414 7.31-11.38 4.248-24.682 1.826-33.83-7.32l-146.748-146.748c-9.148-9.148-11.568-22.452-7.322-33.828 1.552-4.16 3.97-8.072 7.312-11.416 0.004-0.002 0.006-0.006 0.010-0.010l310.65-310.648-310.65-310.652c-0.002-0.004-0.006-0.006-0.008-0.010-3.342-3.346-5.76-7.254-7.314-11.414-4.248-11.376-1.826-24.682 7.322-33.83l146.748-146.746c9.15-9.148 22.452-11.568 33.83-7.322 4.16 1.552 8.070 3.97 11.416 7.312 0.002 0.004 0.006 0.006 0.010 0.010l310.648 310.65 310.648-310.65c0.004-0.002 0.008-0.006 0.012-0.008 3.348-3.344 7.254-5.762 11.414-7.314 11.378-4.246 24.684-1.826 33.828 7.322l146.746 146.748c9.148 9.148 11.57 22.454 7.324 33.83-1.552 4.16-3.97 8.068-7.314 11.414z" />
|
||||
<glyph unicode="" glyph-name="checkmark" d="M864 832l-480-480-224 224-160-160 384-384 640 640z" />
|
||||
<glyph unicode="" glyph-name="stop" d="M512 960c-282.77 0-512-229.23-512-512s229.23-512 512-512 512 229.23 512 512-229.23 512-512 512zM512 32c-229.75 0-416 186.25-416 416s186.25 416 416 416 416-186.25 416-416-186.25-416-416-416zM320 640h384v-384h-384z" />
|
||||
<glyph unicode="" glyph-name="stop2" d="M128 832h768v-768h-768z" />
|
||||
<glyph unicode="" glyph-name="volume-mute" d="M416.006 0c-8.328 0-16.512 3.25-22.634 9.374l-246.626 246.626h-114.746c-17.672 0-32 14.326-32 32v320c0 17.672 14.328 32 32 32h114.746l246.626 246.628c9.154 9.154 22.916 11.89 34.874 6.936 11.958-4.952 19.754-16.622 19.754-29.564v-832c0-12.944-7.796-24.612-19.754-29.564-3.958-1.64-8.118-2.436-12.24-2.436z" />
|
||||
<glyph unicode="" glyph-name="volume-mute2" d="M960 340.852v-84.852h-84.852l-107.148 107.148-107.148-107.148h-84.852v84.852l107.148 107.148-107.148 107.148v84.852h84.852l107.148-107.148 107.148 107.148h84.852v-84.852l-107.148-107.148 107.148-107.148zM416.006 0c-8.328 0-16.512 3.25-22.634 9.374l-246.626 246.626h-114.746c-17.672 0-32 14.326-32 32v320c0 17.672 14.328 32 32 32h114.746l246.626 246.628c9.154 9.154 22.916 11.89 34.874 6.936 11.958-4.952 19.754-16.622 19.754-29.564v-832c0-12.944-7.796-24.612-19.754-29.564-3.958-1.64-8.118-2.436-12.24-2.436z" />
|
||||
<glyph unicode="" glyph-name="volume-increase" d="M1024 384h-192v-192h-128v192h-192v128h192v192h128v-192h192v-128zM416.006 0c-8.328 0-16.512 3.25-22.634 9.374l-246.626 246.626h-114.746c-17.672 0-32 14.326-32 32v320c0 17.672 14.328 32 32 32h114.746l246.626 246.628c9.154 9.154 22.916 11.89 34.874 6.936 11.958-4.952 19.754-16.622 19.754-29.564v-832c0-12.944-7.796-24.612-19.754-29.564-3.958-1.64-8.118-2.436-12.24-2.436z" />
|
||||
<glyph unicode="" glyph-name="volume-decrease" d="M512 512h512v-128h-512v128zM416.006 0c-8.328 0-16.512 3.25-22.634 9.374l-246.626 246.626h-114.746c-17.672 0-32 14.326-32 32v320c0 17.672 14.328 32 32 32h114.746l246.626 246.628c9.154 9.154 22.916 11.89 34.874 6.936 11.958-4.952 19.754-16.622 19.754-29.564v-832c0-12.944-7.796-24.612-19.754-29.564-3.958-1.64-8.118-2.436-12.24-2.436z" />
|
||||
<glyph unicode="" glyph-name="arrow-up2" d="M877.254 557.254l-320 320c-24.992 24.994-65.514 24.994-90.508 0l-320-320c-24.994-24.994-24.994-65.516 0-90.51 24.994-24.996 65.516-24.996 90.51 0l210.744 210.746v-613.49c0-35.346 28.654-64 64-64s64 28.654 64 64v613.49l210.746-210.746c12.496-12.496 28.876-18.744 45.254-18.744s32.758 6.248 45.254 18.746c24.994 24.994 24.994 65.514 0 90.508z" />
|
||||
<glyph unicode="" glyph-name="arrow-right2" d="M621.254 82.746l320 320c24.994 24.992 24.994 65.516 0 90.51l-320 320c-24.994 24.992-65.516 24.992-90.51 0-24.994-24.994-24.994-65.516 0-90.51l210.746-210.746h-613.49c-35.346 0-64-28.654-64-64s28.654-64 64-64h613.49l-210.746-210.746c-12.496-12.496-18.744-28.876-18.744-45.254s6.248-32.758 18.744-45.254c24.994-24.994 65.516-24.994 90.51 0z" />
|
||||
<glyph unicode="" glyph-name="arrow-down2" d="M877.254 338.746l-320-320c-24.992-24.994-65.514-24.994-90.508 0l-320 320c-24.994 24.994-24.994 65.516 0 90.51 24.994 24.996 65.516 24.996 90.51 0l210.744-210.746v613.49c0 35.346 28.654 64 64 64s64-28.654 64-64v-613.49l210.746 210.746c12.496 12.496 28.876 18.744 45.254 18.744s32.758-6.248 45.254-18.746c24.994-24.994 24.994-65.514 0-90.508z" />
|
||||
<glyph unicode="" glyph-name="arrow-left2" d="M402.746 82.746l-320 320c-24.994 24.992-24.994 65.516 0 90.51l320 320c24.994 24.992 65.516 24.992 90.51 0 24.994-24.994 24.994-65.516 0-90.51l-210.746-210.746h613.49c35.346 0 64-28.654 64-64s-28.654-64-64-64h-613.49l210.746-210.746c12.496-12.496 18.744-28.876 18.744-45.254s-6.248-32.758-18.744-45.254c-24.994-24.994-65.516-24.994-90.51 0z" />
|
||||
<glyph unicode="" glyph-name="circle-up" d="M0 448c0-282.77 229.23-512 512-512s512 229.23 512 512-229.23 512-512 512-512-229.23-512-512zM928 448c0-229.75-186.25-416-416-416s-416 186.25-416 416 186.25 416 416 416 416-186.25 416-416zM706.744 290.744l90.512 90.512-285.256 285.254-285.254-285.256 90.508-90.508 194.746 194.744z" />
|
||||
<glyph unicode="" glyph-name="circle-right" d="M512 960c-282.77 0-512-229.23-512-512s229.23-512 512-512 512 229.23 512 512-229.23 512-512 512zM512 32c-229.75 0-416 186.25-416 416s186.25 416 416 416 416-186.25 416-416-186.25-416-416-416zM354.744 253.256l90.512-90.512 285.254 285.256-285.256 285.254-90.508-90.508 194.744-194.746z" />
|
||||
<glyph unicode="" glyph-name="circle-down" d="M1024 448c0 282.77-229.23 512-512 512s-512-229.23-512-512 229.23-512 512-512 512 229.23 512 512zM96 448c0 229.75 186.25 416 416 416s416-186.25 416-416-186.25-416-416-416-416 186.25-416 416zM317.256 605.256l-90.512-90.512 285.256-285.254 285.254 285.256-90.508 90.508-194.746-194.744z" />
|
||||
<glyph unicode="" glyph-name="circle-left" d="M512-64c282.77 0 512 229.23 512 512s-229.23 512-512 512-512-229.23-512-512 229.23-512 512-512zM512 864c229.75 0 416-186.25 416-416s-186.25-416-416-416-416 186.25-416 416 186.25 416 416 416zM669.256 642.744l-90.512 90.512-285.254-285.256 285.256-285.254 90.508 90.508-194.744 194.746z" />
|
||||
<glyph unicode="" glyph-name="sort-alpha-asc" d="M320 192v768h-128v-768h-160l224-224 224 224h-160zM928-64h-256c-11.8 0-22.644 6.496-28.214 16.9-5.566 10.404-4.958 23.030 1.59 32.85l222.832 334.25h-196.208c-17.672 0-32 14.328-32 32s14.328 32 32 32h256c11.8 0 22.644-6.496 28.214-16.9 5.566-10.404 4.958-23.030-1.59-32.85l-222.83-334.25h196.206c17.672 0 32-14.328 32-32s-14.328-32-32-32zM1020.622 558.314l-192.002 384c-5.42 10.842-16.502 17.69-28.622 17.69-12.122 0-23.202-6.848-28.624-17.69l-191.996-384c-7.904-15.806-1.496-35.030 14.31-42.932 4.594-2.296 9.476-3.386 14.288-3.386 11.736 0 23.040 6.484 28.644 17.698l55.156 110.31h216.446l55.156-110.31c7.902-15.806 27.124-22.21 42.932-14.31 15.808 7.902 22.216 27.124 14.312 42.93zM723.778 704.004l76.22 152.446 76.224-152.446h-152.444z" />
|
||||
<glyph unicode="" glyph-name="sort-alpha-desc" d="M320 192v768h-128v-768h-160l224-224 224 224h-160zM928 512h-256c-11.8 0-22.644 6.496-28.214 16.9-5.566 10.406-4.958 23.030 1.59 32.85l222.832 334.25h-196.208c-17.672 0-32 14.328-32 32s14.328 32 32 32h256c11.8 0 22.644-6.496 28.214-16.9 5.566-10.406 4.958-23.030-1.59-32.85l-222.83-334.25h196.206c17.672 0 32-14.328 32-32s-14.328-32-32-32zM1020.622-17.69l-192.002 384c-5.42 10.842-16.502 17.69-28.622 17.69-12.122 0-23.202-6.848-28.624-17.69l-191.996-384c-7.904-15.806-1.496-35.030 14.31-42.932 4.594-2.296 9.476-3.386 14.288-3.386 11.736 0 23.040 6.484 28.644 17.698l55.158 110.31h216.446l55.156-110.31c7.902-15.806 27.124-22.21 42.932-14.31 15.806 7.902 22.214 27.124 14.31 42.93zM723.778 128l76.22 152.446 76.226-152.446h-152.446z" />
|
||||
<glyph unicode="" glyph-name="sort-amount-asc" d="M320 192v768h-128v-768h-160l224-224 224 224h-160zM448 384h576v-128h-576v128zM448 576h448v-128h-448v128zM448 768h320v-128h-320v128zM448 960h192v-128h-192v128z" />
|
||||
<glyph unicode="" glyph-name="sort-amount-desc" d="M320 192v768h-128v-768h-160l224-224 224 224h-160zM448 960h576v-128h-576v128zM448 768h448v-128h-448v128zM448 576h320v-128h-320v128zM448 384h192v-128h-192v128z" />
|
||||
<glyph unicode="" glyph-name="checkbox-checked" d="M896 960h-768c-70.4 0-128-57.6-128-128v-768c0-70.4 57.6-128 128-128h768c70.4 0 128 57.6 128 128v768c0 70.4-57.6 128-128 128zM448 165.49l-237.254 237.256 90.51 90.508 146.744-146.744 306.746 306.746 90.508-90.51-397.254-397.256z" />
|
||||
<glyph unicode="" glyph-name="checkbox-unchecked" d="M896 960h-768c-70.4 0-128-57.6-128-128v-768c0-70.4 57.6-128 128-128h768c70.4 0 128 57.6 128 128v768c0 70.4-57.6 128-128 128zM896 64h-768v768h768v-768z" />
|
||||
<glyph unicode="" glyph-name="radio-checked" d="M512 960c-282.77 0-512-229.23-512-512s229.23-512 512-512 512 229.23 512 512-229.23 512-512 512zM512 64c-212.078 0-384 171.922-384 384s171.922 384 384 384c212.078 0 384-171.922 384-384s-171.922-384-384-384zM320 448c0 106.039 85.961 192 192 192s192-85.961 192-192c0-106.039-85.961-192-192-192s-192 85.961-192 192z" />
|
||||
<glyph unicode="" glyph-name="radio-checked2" d="M512 960c-282.77 0-512-229.23-512-512s229.23-512 512-512 512 229.23 512 512-229.23 512-512 512zM512 320c-70.692 0-128 57.306-128 128 0 70.692 57.308 128 128 128 70.694 0 128-57.308 128-128 0-70.694-57.306-128-128-128z" />
|
||||
<glyph unicode="" glyph-name="radio-unchecked" d="M512 960c-282.77 0-512-229.23-512-512s229.23-512 512-512 512 229.23 512 512-229.23 512-512 512zM512 64c-212.078 0-384 171.922-384 384s171.922 384 384 384c212.078 0 384-171.922 384-384s-171.922-384-384-384z" />
|
||||
<glyph unicode="" glyph-name="crop" d="M832 704l192 192-64 64-192-192h-448v192h-128v-192h-192v-128h192v-512h512v-192h128v192h192v128h-192v448zM320 640h320l-320-320v320zM384 256l320 320v-320h-320z" />
|
||||
<glyph unicode="" glyph-name="filter" d="M512 960c-282.77 0-512-71.634-512-160v-96l384-384v-320c0-35.346 57.306-64 128-64 70.692 0 128 28.654 128 64v320l384 384v96c0 88.366-229.23 160-512 160zM94.384 821.176c23.944 13.658 57.582 26.62 97.278 37.488 87.944 24.076 201.708 37.336 320.338 37.336 118.628 0 232.394-13.26 320.338-37.336 39.696-10.868 73.334-23.83 97.28-37.488 15.792-9.006 24.324-16.624 28.296-21.176-3.972-4.552-12.506-12.168-28.296-21.176-23.946-13.658-57.584-26.62-97.28-37.488-87.942-24.076-201.708-37.336-320.338-37.336s-232.394 13.26-320.338 37.336c-39.696 10.868-73.334 23.83-97.278 37.488-15.792 9.008-24.324 16.624-28.298 21.176 3.974 4.552 12.506 12.168 28.298 21.176z" />
|
||||
</font></defs></svg>
|
||||
|
After Width: | Height: | Size: 49 KiB |
@@ -0,0 +1,345 @@
|
||||
@font-face {
|
||||
font-family: 'icomoon';
|
||||
src: url('fonts/icomoon.eot?rby20y');
|
||||
src: url('fonts/icomoon.eot?rby20y#iefix') format('embedded-opentype'),
|
||||
url('fonts/icomoon.ttf?rby20y') format('truetype'),
|
||||
url('fonts/icomoon.woff?rby20y') format('woff'),
|
||||
url('fonts/icomoon.svg?rby20y#icomoon') format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-display: block;
|
||||
}
|
||||
|
||||
[class^="icon-"], [class*=" icon-"] {
|
||||
/* use !important to prevent issues with browser extensions that change fonts */
|
||||
font-family: 'icomoon' !important;
|
||||
speak: never;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
line-height: 1;
|
||||
|
||||
/* Better Font Rendering =========== */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-up:before {
|
||||
content: "\e900";
|
||||
}
|
||||
.icon-down:before {
|
||||
content: "\e901";
|
||||
}
|
||||
.icon-droplet:before {
|
||||
content: "\e90b";
|
||||
}
|
||||
.icon-paint-format:before {
|
||||
content: "\e90c";
|
||||
}
|
||||
.icon-image:before {
|
||||
content: "\e90d";
|
||||
}
|
||||
.icon-images:before {
|
||||
content: "\e90e";
|
||||
}
|
||||
.icon-camera:before {
|
||||
content: "\e90f";
|
||||
}
|
||||
.icon-video-camera:before {
|
||||
content: "\e914";
|
||||
}
|
||||
.icon-book:before {
|
||||
content: "\e91f";
|
||||
}
|
||||
.icon-file-empty:before {
|
||||
content: "\e924";
|
||||
}
|
||||
.icon-files-empty:before {
|
||||
content: "\e925";
|
||||
}
|
||||
.icon-file-play:before {
|
||||
content: "\e929";
|
||||
}
|
||||
.icon-file-video:before {
|
||||
content: "\e92a";
|
||||
}
|
||||
.icon-file-zip:before {
|
||||
content: "\e92b";
|
||||
}
|
||||
.icon-stack:before {
|
||||
content: "\e92e";
|
||||
}
|
||||
.icon-folder:before {
|
||||
content: "\e92f";
|
||||
}
|
||||
.icon-folder-open:before {
|
||||
content: "\e930";
|
||||
}
|
||||
.icon-folder-plus:before {
|
||||
content: "\e931";
|
||||
}
|
||||
.icon-folder-minus:before {
|
||||
content: "\e932";
|
||||
}
|
||||
.icon-folder-download:before {
|
||||
content: "\e933";
|
||||
}
|
||||
.icon-folder-upload:before {
|
||||
content: "\e934";
|
||||
}
|
||||
.icon-price-tag:before {
|
||||
content: "\e935";
|
||||
}
|
||||
.icon-price-tags:before {
|
||||
content: "\e936";
|
||||
}
|
||||
.icon-location:before {
|
||||
content: "\e947";
|
||||
}
|
||||
.icon-history:before {
|
||||
content: "\e94d";
|
||||
}
|
||||
.icon-alarm:before {
|
||||
content: "\e950";
|
||||
}
|
||||
.icon-bell:before {
|
||||
content: "\e951";
|
||||
}
|
||||
.icon-stopwatch:before {
|
||||
content: "\e952";
|
||||
}
|
||||
.icon-display:before {
|
||||
content: "\e956";
|
||||
}
|
||||
.icon-mobile:before {
|
||||
content: "\e958";
|
||||
}
|
||||
.icon-mobile2:before {
|
||||
content: "\e959";
|
||||
}
|
||||
.icon-box-add:before {
|
||||
content: "\e95e";
|
||||
}
|
||||
.icon-box-remove:before {
|
||||
content: "\e95f";
|
||||
}
|
||||
.icon-download:before {
|
||||
content: "\e960";
|
||||
}
|
||||
.icon-upload:before {
|
||||
content: "\e961";
|
||||
}
|
||||
.icon-floppy-disk:before {
|
||||
content: "\e962";
|
||||
}
|
||||
.icon-database:before {
|
||||
content: "\e964";
|
||||
}
|
||||
.icon-undo:before {
|
||||
content: "\e965";
|
||||
}
|
||||
.icon-redo:before {
|
||||
content: "\e966";
|
||||
}
|
||||
.icon-undo2:before {
|
||||
content: "\e967";
|
||||
}
|
||||
.icon-redo2:before {
|
||||
content: "\e968";
|
||||
}
|
||||
.icon-user:before {
|
||||
content: "\e971";
|
||||
}
|
||||
.icon-users:before {
|
||||
content: "\e972";
|
||||
}
|
||||
.icon-spinner2:before {
|
||||
content: "\e97b";
|
||||
}
|
||||
.icon-spinner11:before {
|
||||
content: "\e984";
|
||||
}
|
||||
.icon-binoculars:before {
|
||||
content: "\e985";
|
||||
}
|
||||
.icon-search:before {
|
||||
content: "\e986";
|
||||
}
|
||||
.icon-zoom-in:before {
|
||||
content: "\e987";
|
||||
}
|
||||
.icon-zoom-out:before {
|
||||
content: "\e988";
|
||||
}
|
||||
.icon-key:before {
|
||||
content: "\e98d";
|
||||
}
|
||||
.icon-key2:before {
|
||||
content: "\e98e";
|
||||
}
|
||||
.icon-lock:before {
|
||||
content: "\e98f";
|
||||
}
|
||||
.icon-unlocked:before {
|
||||
content: "\e990";
|
||||
}
|
||||
.icon-wrench:before {
|
||||
content: "\e991";
|
||||
}
|
||||
.icon-equalizer:before {
|
||||
content: "\e992";
|
||||
}
|
||||
.icon-equalizer2:before {
|
||||
content: "\e993";
|
||||
}
|
||||
.icon-cog:before {
|
||||
content: "\e994";
|
||||
}
|
||||
.icon-cogs:before {
|
||||
content: "\e995";
|
||||
}
|
||||
.icon-meter:before {
|
||||
content: "\e9a6";
|
||||
}
|
||||
.icon-meter2:before {
|
||||
content: "\e9a7";
|
||||
}
|
||||
.icon-download3:before {
|
||||
content: "\e9c7";
|
||||
}
|
||||
.icon-upload3:before {
|
||||
content: "\e9c8";
|
||||
}
|
||||
.icon-earth:before {
|
||||
content: "\e9ca";
|
||||
}
|
||||
.icon-flag:before {
|
||||
content: "\e9cc";
|
||||
}
|
||||
.icon-attachment:before {
|
||||
content: "\e9cd";
|
||||
}
|
||||
.icon-eye:before {
|
||||
content: "\e9ce";
|
||||
}
|
||||
.icon-eye-plus:before {
|
||||
content: "\e9cf";
|
||||
}
|
||||
.icon-eye-minus:before {
|
||||
content: "\e9d0";
|
||||
}
|
||||
.icon-star-empty:before {
|
||||
content: "\e9d7";
|
||||
}
|
||||
.icon-star-half:before {
|
||||
content: "\e9d8";
|
||||
}
|
||||
.icon-star-full:before {
|
||||
content: "\e9d9";
|
||||
}
|
||||
.icon-warning:before {
|
||||
content: "\ea07";
|
||||
}
|
||||
.icon-notification:before {
|
||||
content: "\ea08";
|
||||
}
|
||||
.icon-question:before {
|
||||
content: "\ea09";
|
||||
}
|
||||
.icon-plus:before {
|
||||
content: "\ea0a";
|
||||
}
|
||||
.icon-minus:before {
|
||||
content: "\ea0b";
|
||||
}
|
||||
.icon-info:before {
|
||||
content: "\ea0c";
|
||||
}
|
||||
.icon-cancel-circle:before {
|
||||
content: "\ea0d";
|
||||
}
|
||||
.icon-blocked:before {
|
||||
content: "\ea0e";
|
||||
}
|
||||
.icon-cross:before {
|
||||
content: "\ea0f";
|
||||
}
|
||||
.icon-checkmark:before {
|
||||
content: "\ea10";
|
||||
}
|
||||
.icon-stop:before {
|
||||
content: "\ea17";
|
||||
}
|
||||
.icon-stop2:before {
|
||||
content: "\ea1e";
|
||||
}
|
||||
.icon-volume-mute:before {
|
||||
content: "\ea29";
|
||||
}
|
||||
.icon-volume-mute2:before {
|
||||
content: "\ea2a";
|
||||
}
|
||||
.icon-volume-increase:before {
|
||||
content: "\ea2b";
|
||||
}
|
||||
.icon-volume-decrease:before {
|
||||
content: "\ea2c";
|
||||
}
|
||||
.icon-arrow-up2:before {
|
||||
content: "\ea3a";
|
||||
}
|
||||
.icon-arrow-right2:before {
|
||||
content: "\ea3c";
|
||||
}
|
||||
.icon-arrow-down2:before {
|
||||
content: "\ea3e";
|
||||
}
|
||||
.icon-arrow-left2:before {
|
||||
content: "\ea40";
|
||||
}
|
||||
.icon-circle-up:before {
|
||||
content: "\ea41";
|
||||
}
|
||||
.icon-circle-right:before {
|
||||
content: "\ea42";
|
||||
}
|
||||
.icon-circle-down:before {
|
||||
content: "\ea43";
|
||||
}
|
||||
.icon-circle-left:before {
|
||||
content: "\ea44";
|
||||
}
|
||||
.icon-sort-alpha-asc:before {
|
||||
content: "\ea48";
|
||||
}
|
||||
.icon-sort-alpha-desc:before {
|
||||
content: "\ea49";
|
||||
}
|
||||
.icon-sort-amount-asc:before {
|
||||
content: "\ea4c";
|
||||
}
|
||||
.icon-sort-amount-desc:before {
|
||||
content: "\ea4d";
|
||||
}
|
||||
.icon-checkbox-checked:before {
|
||||
content: "\ea52";
|
||||
}
|
||||
.icon-checkbox-unchecked:before {
|
||||
content: "\ea53";
|
||||
}
|
||||
.icon-radio-checked:before {
|
||||
content: "\ea54";
|
||||
}
|
||||
.icon-radio-checked2:before {
|
||||
content: "\ea55";
|
||||
}
|
||||
.icon-radio-unchecked:before {
|
||||
content: "\ea56";
|
||||
}
|
||||
.icon-crop:before {
|
||||
content: "\ea57";
|
||||
}
|
||||
.icon-filter:before {
|
||||
content: "\ea5b";
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
|
||||
.rotaryswitchPlugin {
|
||||
position: relative;
|
||||
width: 51px;
|
||||
height: 51px;
|
||||
cursor: pointer;
|
||||
background: url(../images/darkSmallBackground.png) no-repeat;
|
||||
background-size: 100%;
|
||||
background-position: center;
|
||||
}
|
||||
@media only screen and (-moz-min-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2) {
|
||||
.rotaryswitchPlugin {
|
||||
background-image: url(../images/darkSmallBackground@2x.png);
|
||||
background-size: 100% 100%;
|
||||
background-position: center;
|
||||
}
|
||||
}
|
||||
|
||||
.rotaryswitchPlugin .switch {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: url(../images/darkSmallFront.png) no-repeat;
|
||||
background-size: 93%;
|
||||
background-position: center;
|
||||
}
|
||||
@media only screen and (-moz-min-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2) {
|
||||
.rotaryswitchPlugin .switch {
|
||||
background-image: url(../images/darkSmallFront@2x.png);
|
||||
background-size: 100% 100%;
|
||||
background-position: center;
|
||||
}
|
||||
}
|
||||
|
||||
.rotaryswitchPlugin .mark {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
margin: -1px 0 0 0;
|
||||
width: 1px;
|
||||
height: 3px;
|
||||
background-color: #0e0e0e;
|
||||
}
|
||||
|
||||
.rotaryswitchPlugin input {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: -60px;
|
||||
width: 100%;
|
||||
border: none;
|
||||
z-index: 100;
|
||||
text-align: left;
|
||||
background: none;
|
||||
font: normal 18px/18px verdana;
|
||||
color: #0e0e0e;
|
||||
}
|
||||
|
||||
.rotaryswitchPlugin.big {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
background: url(../images/darkBigBackground.png) no-repeat;
|
||||
background-size: 100%;
|
||||
background-position: center;
|
||||
}
|
||||
@media only screen and (-moz-min-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2) {
|
||||
.rotaryswitchPlugin.big {
|
||||
background-image: url(../images/darkBigBackground@2x.png);
|
||||
background-size: 100% 100%;
|
||||
background-position: center;
|
||||
}
|
||||
}
|
||||
|
||||
.rotaryswitchPlugin.big .switch { background: url(../images/darkBigFront.png) no-repeat; }
|
||||
@media only screen and (-moz-min-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2) {
|
||||
.rotaryswitchPlugin.big .switch {
|
||||
background-image: url(../images/darkBigFront@2x.png);
|
||||
background-size: 100% 100%;
|
||||
background-position: center;
|
||||
}
|
||||
}
|
||||
|
||||
.rotaryswitchPlugin.big .mark {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
margin: -4px 0 0 -2px;
|
||||
width: 4px;
|
||||
height: 10px;
|
||||
background-color: #c3c3c2;
|
||||
}
|
||||
|
||||
.rotaryswitchPlugin input {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: -60px;
|
||||
width: 100%;
|
||||
border: none;
|
||||
z-index: 100;
|
||||
text-align: left;
|
||||
background: none;
|
||||
font: normal 18px/18px verdana;
|
||||
color: #0e0e0e;
|
||||
}
|
||||
|
||||
.rotaryswitchPlugin.big.light {
|
||||
margin: 36px;
|
||||
background: url(../images/lightBigBackground.png) no-repeat;
|
||||
background-size: 100%;
|
||||
background-position: center;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.rotaryswitchPlugin.big.light .switch {
|
||||
background: url(../images/lightBigFront.png) no-repeat;
|
||||
background-size: 93%;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.knob-value{
|
||||
left: 50%;
|
||||
font-size: 30px;
|
||||
position: relative;
|
||||
margin-left: -30px;
|
||||
width: 60px;
|
||||
text-align: center;
|
||||
right: auto;
|
||||
top: -16px;
|
||||
color: #00bcd6;
|
||||
text-shadow: 0 1px 1px #ffffff, 0px 0px 4px #78efff;
|
||||
}
|
||||
div#knobthrottle.disabled:before {
|
||||
content: "";
|
||||
height: 200px;
|
||||
background: #ececec;
|
||||
width: 200px;
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
z-index: 100;
|
||||
opacity: 0.5;
|
||||
margin-left: 36px;
|
||||
border-radius: 100%;
|
||||
margin-top: 36px;
|
||||
}
|
||||
.speedController.disabled{
|
||||
position: relative;
|
||||
}
|
||||
@@ -0,0 +1,235 @@
|
||||
body{
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
margin: 0;
|
||||
height: 100vh;
|
||||
background: #efefef;
|
||||
}
|
||||
|
||||
hr{
|
||||
border-bottom: 1px solid #ffffff;
|
||||
}
|
||||
.column-1{
|
||||
float: left;
|
||||
width: 10%;
|
||||
padding: 5px 15px;
|
||||
}
|
||||
.column-2p5 {
|
||||
float: left;
|
||||
width: 25%;
|
||||
padding: 5px 15px;
|
||||
}
|
||||
.column-2 {
|
||||
float: left;
|
||||
width: 20%;
|
||||
padding: 5px 15px;
|
||||
}
|
||||
.column-3 {
|
||||
float: left;
|
||||
width: 30%;
|
||||
padding: 5px 15px;
|
||||
}
|
||||
.column-4 {
|
||||
float: left;
|
||||
width: 40%;
|
||||
padding: 5px 15px;
|
||||
}
|
||||
.column-5 {
|
||||
float: left;
|
||||
width: 50%;
|
||||
padding: 5px 15px;
|
||||
}
|
||||
.column-6{
|
||||
float: left;
|
||||
width: 60%;
|
||||
padding: 5px 15px;
|
||||
}
|
||||
.column-7 {
|
||||
float: left;
|
||||
width: 70%;
|
||||
padding: 5px 15px;
|
||||
}
|
||||
.column-8{
|
||||
width: 80%;
|
||||
float: left;
|
||||
padding: 5px 15px;
|
||||
}
|
||||
.dcmd-clear{
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
/* Clear floats */
|
||||
.row:after {
|
||||
content: "";
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
.topnav{
|
||||
position: fixed;
|
||||
z-index: 100;
|
||||
width: 100%;
|
||||
}
|
||||
.throttle-heading{
|
||||
text-align: center;
|
||||
padding-top:5px;
|
||||
font-size: 14px;
|
||||
display: inline-block;
|
||||
}
|
||||
.throttle-heading .wt-logo{
|
||||
height: 48px;
|
||||
width: 142px;
|
||||
background: url(../images/WebThrottle.png);
|
||||
display: inline-block;
|
||||
background-size: 100%;
|
||||
box-shadow: 0 0 3px #989898;
|
||||
border-radius: 6px;
|
||||
}
|
||||
.throttle-heading p{
|
||||
font-size: 12px;
|
||||
margin: 5px;
|
||||
}
|
||||
.ui-widget.ui-widget-content.credits-tooltip{
|
||||
border: 1px solid #ccc;
|
||||
width: 200px;
|
||||
padding: 10px 15px;
|
||||
font-size: 14px;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 0 4px #aaa;
|
||||
}
|
||||
#rendered-form{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
}
|
||||
.rendered-form {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
padding-top: 68px;
|
||||
}
|
||||
.rendered-form .section{
|
||||
width: 80%;
|
||||
height: 98%;
|
||||
margin: 0 10%;
|
||||
background: rgba(0,0,0,0.05);
|
||||
border-radius: 10px;
|
||||
}
|
||||
#throttle-window{
|
||||
box-shadow: 0 0 5px 0px #777777;
|
||||
overflow: auto;
|
||||
/* height: auto; */
|
||||
padding-bottom: 1px;
|
||||
}
|
||||
.section{
|
||||
box-shadow: 0 0 5px 0px #777777;
|
||||
/*overflow: auto;*/
|
||||
/* height: auto; */
|
||||
padding-bottom: 1px;
|
||||
}
|
||||
.rendered-form div {
|
||||
box-sizing: border-box;
|
||||
justify-content: center;
|
||||
}
|
||||
.rendered-form h4 {
|
||||
margin: 0;
|
||||
}
|
||||
.nav-btn {
|
||||
font-size: 30px;
|
||||
cursor: pointer;
|
||||
color: #666666;
|
||||
padding: 10px 15px;
|
||||
border: none;
|
||||
background: none;
|
||||
line-height: 38px;
|
||||
}
|
||||
.nav-btn.in{
|
||||
color:#cccccc;
|
||||
font-size: 40px;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
line-height: 30px;
|
||||
}
|
||||
.btn-expand, .btn-info{
|
||||
float: right;
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
color: #666666;
|
||||
padding: 10px 15px;
|
||||
border: none;
|
||||
background: none;
|
||||
line-height: 36px;
|
||||
}
|
||||
.btn-info{
|
||||
padding-top: 14px;
|
||||
}
|
||||
.nav-btn:hover {
|
||||
color: #000000;
|
||||
}
|
||||
.nav-btn.in:hover{
|
||||
color: #ffffff;
|
||||
}
|
||||
.menu {
|
||||
background: #00A3B9;
|
||||
height: 100vh;
|
||||
width: 250px;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 1020;
|
||||
box-shadow: 0 0px 10px #666;
|
||||
border-right: 1px solid #929292;
|
||||
outline: none;
|
||||
left: -260px;
|
||||
display: none;
|
||||
}
|
||||
.menu .avatar img {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.menu ul {
|
||||
list-style: none;
|
||||
padding: 0.5em 0;
|
||||
margin: 0;
|
||||
margin-top: 1em;
|
||||
}
|
||||
.menu ul li{
|
||||
padding: 1em;
|
||||
background-repeat: no-repeat;
|
||||
background-position: left 15px center;
|
||||
background-size: auto 20px;
|
||||
transition: all 0.15s linear;
|
||||
cursor: pointer;
|
||||
color: #fff;
|
||||
text-shadow: 0 0 1px #000;
|
||||
}
|
||||
.menu ul li:hover{
|
||||
background-color:rgba(0,0,0,0.1);
|
||||
}
|
||||
.menu ul li:focus{
|
||||
border:none;
|
||||
}
|
||||
.topnav .row div, .add-loco-form .row label, .add-loco-form .row input{
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.align-center{
|
||||
text-align: center;
|
||||
}
|
||||
.pos-rel{
|
||||
position: relative;
|
||||
}
|
||||
.spacer{
|
||||
height: 5px;
|
||||
}
|
||||
.pl0{
|
||||
padding-left: 0;
|
||||
}
|
||||
.pr0{
|
||||
padding-right: 0;
|
||||
}
|
||||
.prh{
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
.add-button {
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
left: 1px;
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
/*! roundSlider v1.6.1 | (c) 2015-2020, Soundar | MIT license | http://roundsliderui.com/licence.html */
|
||||
.rs-ie,.rs-edge,.rs-handle{-ms-touch-action:none;touch-action:none}.rs-control{position:relative;outline:0 none}.rs-container{position:relative}.rs-control *,.rs-control *:before,.rs-control *:after{-webkit-box-sizing:border-box;box-sizing:border-box}.rs-animation .rs-transition{transition:all 0.5s linear 0s}.rs-bar{-webkit-transform-origin:100% 50%;-ms-transform-origin:100% 50%;transform-origin:100% 50%}.rs-control .rs-split .rs-path,.rs-control .rs-overlay1,.rs-control .rs-overlay2{-webkit-transform-origin:50% 100%;-ms-transform-origin:50% 100%;transform-origin:50% 100%}.rs-control .rs-overlay{-webkit-transform-origin:100% 100%;-ms-transform-origin:100% 100%;transform-origin:100% 100%}.rs-rounded .rs-seperator,.rs-split .rs-path{-webkit-background-clip:padding-box;background-clip:padding-box}.rs-disabled{opacity:.35}.rs-inner-container{height:100%;width:100%;position:absolute;top:0;overflow:hidden}.rs-control .rs-quarter div.rs-block{height:200%;width:200%}.rs-control .rs-half.rs-top div.rs-block,.rs-control .rs-half.rs-bottom div.rs-block{height:200%;width:100%}.rs-control .rs-half.rs-left div.rs-block,.rs-control .rs-half.rs-right div.rs-block{height:100%;width:200%}.rs-control .rs-bottom .rs-block{top:auto;bottom:0}.rs-control .rs-right .rs-block{right:0}.rs-block.rs-outer{border-radius:1000px}.rs-block{height:100%;width:100%;display:block;position:absolute;top:0;overflow:hidden;z-index:3}.rs-block .rs-inner{border-radius:1000px;display:block;height:100%;width:100%;position:relative}.rs-overlay{width:50%}.rs-overlay1,.rs-overlay2{width:100%}.rs-overlay,.rs-overlay1,.rs-overlay2{position:absolute;background-color:#fff;z-index:3;top:0;height:50%}.rs-bar{display:block;position:absolute;bottom:0;height:0;z-index:10}.rs-bar.rs-rounded{z-index:5}.rs-bar .rs-seperator{height:0;display:block;float:left}.rs-bar:not(.rs-rounded) .rs-seperator{border-left:none;border-right:none}.rs-bar.rs-start .rs-seperator{border-top:none}.rs-bar.rs-end .rs-seperator{border-bottom:none}.rs-bar.rs-start.rs-rounded .rs-seperator{border-radius:0 0 1000px 1000px}.rs-bar.rs-end.rs-rounded .rs-seperator{border-radius:1000px 1000px 0 0}.rs-full .rs-bar,.rs-half .rs-bar{width:50%}.rs-half.rs-left .rs-bar,.rs-half.rs-right .rs-bar,.rs-quarter .rs-bar{width:100%}.rs-full .rs-bar,.rs-half.rs-left .rs-bar,.rs-half.rs-right .rs-bar{top:50%}.rs-bottom .rs-bar{top:0}.rs-half.rs-right .rs-bar,.rs-quarter.rs-right .rs-bar{right:100%}.rs-handle.rs-move{cursor:move}.rs-readonly .rs-handle.rs-move{cursor:default}.rs-classic-mode .rs-path{display:block;height:100%;width:100%}.rs-split .rs-path{border-radius:1000px 1000px 0 0;overflow:hidden;height:50%;position:absolute;top:0;z-index:2}.rs-control .rs-svg-container{display:block;position:absolute;top:0}.rs-control .rs-bottom .rs-svg-container{top:auto;bottom:0}.rs-control .rs-right .rs-svg-container{right:0}.rs-tooltip{position:absolute;cursor:default;border:1px solid transparent;z-index:10}.rs-full .rs-tooltip{top:50%;left:50%}.rs-bottom .rs-tooltip{top:0}.rs-top .rs-tooltip{bottom:0}.rs-right .rs-tooltip{left:0}.rs-left .rs-tooltip{right:0}.rs-half.rs-top .rs-tooltip,.rs-half.rs-bottom .rs-tooltip{left:50%}.rs-half.rs-left .rs-tooltip,.rs-half.rs-right .rs-tooltip{top:50%}.rs-tooltip .rs-input{outline:0 none;border:none;background:transparent}.rs-tooltip-text{font-family:verdana;font-size:13px;border-radius:7px;text-align:center;color:inherit}.rs-tooltip.rs-edit{padding:5px 8px}.rs-tooltip.rs-hover,.rs-tooltip.rs-edit:hover{border:1px solid #AAA;cursor:pointer}.rs-readonly .rs-tooltip.rs-edit:hover{border-color:transparent;cursor:default}.rs-tooltip.rs-center{margin:0px!important}.rs-half.rs-top .rs-tooltip.rs-center,.rs-half.rs-bottom .rs-tooltip.rs-center{transform:translate(-50%,0)}.rs-half.rs-left .rs-tooltip.rs-center,.rs-half.rs-right .rs-tooltip.rs-center{transform:translate(0,-50%)}.rs-full .rs-tooltip.rs-center{transform:translate(-50%,-50%)}.rs-tooltip.rs-reset{margin:0px!important;top:0px!important;left:0px!important}.rs-handle{border-radius:1000px;outline:0 none;float:left}.rs-handle.rs-handle-square{border-radius:0}.rs-handle-dot{border:1px solid #AAA;padding:6px}.rs-handle-dot:after{display:block;content:"";border:1px solid #AAA;height:100%;width:100%;border-radius:1000px}.rs-seperator{border:1px solid #AAA}.rs-border{border:1px solid #AAA}.rs-path-color{background-color:#FFF}.rs-range-color{background-color:#54BBE0}.rs-bg-color{background-color:#FFF}.rs-handle{background-color:#838383}.rs-handle-dot{background-color:#FFF}.rs-handle-dot:after{background-color:#838383}.rs-path-inherited .rs-path{opacity:.2}.rs-svg-mode .rs-path{stroke:#FFF}.rs-svg-mode .rs-range{stroke:#54BBE0}.rs-svg-mode .rs-border{stroke:#AAA}
|
||||
@@ -0,0 +1,145 @@
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* Style the header */
|
||||
.settings-heading {
|
||||
padding: 10px 20px;
|
||||
text-align: left;
|
||||
font-size: 30px;
|
||||
border-bottom: 1px solid #bbbbbb;
|
||||
}
|
||||
.settings-heading .hdng{
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
/* Container for flexboxes */
|
||||
.settings-content {
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
height: calc(100% - 70px);
|
||||
}
|
||||
|
||||
/* Style the navigation menu */
|
||||
.side-panel {
|
||||
width: 200px;
|
||||
border-right: 1px solid #bbbbbb;
|
||||
padding: 20px 10px;
|
||||
}
|
||||
.settings-section{
|
||||
margin-top: 15px;
|
||||
}
|
||||
/* Style the list inside the menu */
|
||||
.side-panel ul {
|
||||
list-style-type: none;
|
||||
margin: 5px 0;
|
||||
padding: 0;
|
||||
}
|
||||
.side-panel ul li {
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
margin: 5px 0;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
}
|
||||
.settings-subheading{
|
||||
font-size: 18px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.settings-group{
|
||||
border-radius: 5px;
|
||||
border: 1px solid #e0e0e0;
|
||||
padding: 10px 20px;
|
||||
background: #fff;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.setting-entry{
|
||||
margin: 15px 0;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
}
|
||||
.setting-label{
|
||||
padding: 5px;
|
||||
font-size: 14px;
|
||||
-webkit-flex: 1;
|
||||
-ms-flex: 1;
|
||||
flex: 1;
|
||||
}
|
||||
.setting-content{
|
||||
-webkit-flex: 3;
|
||||
-ms-flex: 3;
|
||||
flex: 3;
|
||||
}
|
||||
.side-panel ul li:hover, .side-panel ul li.active {
|
||||
background: rgba(4,4,4, 0.05);
|
||||
}
|
||||
.settings-group.placeholder {
|
||||
min-height: 200px;
|
||||
text-align: center;
|
||||
padding: 20%;
|
||||
}
|
||||
.settings-group.placeholder p {
|
||||
border: 1px dashed;
|
||||
padding: 4%;
|
||||
color: #808080;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.row.settings-group.fnhead {
|
||||
background: #f3f3f3;
|
||||
font-weight: 600;
|
||||
}
|
||||
.maps-content{
|
||||
overflow-y: auto;
|
||||
font-size: 14px;
|
||||
max-height: calc(100% - 90px);
|
||||
}
|
||||
a.edit-cur-loco, a.option-btn{
|
||||
float: right;
|
||||
text-decoration: none;
|
||||
padding: 5px 15px;
|
||||
text-align: center;
|
||||
border-radius: 5px;
|
||||
display: inline-flex;
|
||||
background: #f3f3f3;
|
||||
border: 1px solid #e8e8e8;
|
||||
box-shadow: 0 0 3px #e8e8e8;
|
||||
margin-left: 5px;
|
||||
}
|
||||
a.edit-cur-loco{
|
||||
margin-top: 6px;
|
||||
}
|
||||
.settings-subheading.row .map-name-heading{
|
||||
padding-top: 8px;
|
||||
}
|
||||
/* Style the content */
|
||||
.settings-panel {
|
||||
-webkit-flex: 3;
|
||||
-ms-flex: 3;
|
||||
flex: 3;
|
||||
padding: 24px;
|
||||
padding-top: 10px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.back-button{
|
||||
text-align: left;
|
||||
padding: 10px;
|
||||
}
|
||||
.caplitalize{
|
||||
text-transform: capitalize;
|
||||
}
|
||||
.waste-bin{
|
||||
font-size: 13px;
|
||||
}
|
||||
/* Responsive layout - makes the menu and the content (inside the section) sit on top of each other instead of next to each other */
|
||||
@media (max-width: 600px) {
|
||||
.settings-content {
|
||||
-webkit-flex-direction: column;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
.scrollbar {
|
||||
overflow: auto;
|
||||
width: 100%;
|
||||
}
|
||||
@@ -0,0 +1,226 @@
|
||||
body{
|
||||
background: #111111;
|
||||
}
|
||||
.rendered-form{
|
||||
background: #1b1b1b;
|
||||
background-image: url(../../images/carbon_fibre.png);
|
||||
background-repeat: repeat;
|
||||
color: #fff;
|
||||
background-size: 16px;
|
||||
}
|
||||
.rs-control .rs-bg-color, #throttle-window{
|
||||
background: #1b1b1b;
|
||||
background-image: url(../../images/carbon_fibre.png);
|
||||
background-repeat: repeat;
|
||||
background-size: 16px;
|
||||
}
|
||||
.rs-control .rs-range-color{
|
||||
background-color: #00A3B9;
|
||||
}
|
||||
#throttle-window{
|
||||
border: 1px solid #303030;
|
||||
box-shadow: 0px 0px 10px 0px #0c0c0c;
|
||||
}
|
||||
label.formbuilder-text-label,
|
||||
label.formbuilder-select-label,
|
||||
label.formbuilder-textarea-label,
|
||||
label.formbuilder-file-label{
|
||||
color: #ffffff;
|
||||
}
|
||||
input.form-control, select.form-control, textarea.form-control {
|
||||
border: 1px solid #3b3b3b;
|
||||
border-radius: 4px;
|
||||
background: #282828;
|
||||
color: #ffffff;
|
||||
box-shadow: inset 0px 0px 2px #000000;
|
||||
}
|
||||
.formbuilder-button .btn, .server-button .btn, .fn-button .btn {
|
||||
box-shadow: 0px 0px 2px #000000;
|
||||
}
|
||||
.fn-button.field-button-fn .btn.press{
|
||||
border: 1px solid #3e8e41;
|
||||
box-shadow: 0px 0px 2px #000000;
|
||||
}
|
||||
.fn-button.field-button-fn button[aria-pressed="true"].btn.press{
|
||||
border: 1px solid #3e8e41;
|
||||
box-shadow: none;
|
||||
}
|
||||
.select-control {
|
||||
border: 1px solid #3b3b3b;
|
||||
border-radius: 4px;
|
||||
background: #282828;
|
||||
color: #ffffff;
|
||||
box-shadow: inset 0px 0px 2px #000000;
|
||||
}
|
||||
.btn-grey{
|
||||
background: #282828;
|
||||
border: 1px solid #3f3f3f;
|
||||
box-shadow: 0px 0px 2px #000000;
|
||||
color: #afafaf;
|
||||
}
|
||||
.btn-hide{
|
||||
background: #282828;
|
||||
border: 1px solid #3f3f3f;
|
||||
box-shadow: 0px 0px 2px #000000;
|
||||
color: #afafaf;
|
||||
}
|
||||
.btn-speed {
|
||||
background: #282828;
|
||||
border: 4px solid #3f3f3f;
|
||||
box-shadow: 0px 0px 2px #000000;
|
||||
color: #afafaf;
|
||||
}
|
||||
.btn-speed:hover {
|
||||
background: #3f3f3f;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.rotaryswitchPlugin.big .mark{
|
||||
background: #111111;
|
||||
box-shadow: inset 0px 0px 2px #000000;
|
||||
}
|
||||
|
||||
.slider{
|
||||
border: 1px solid #3b3b3b;
|
||||
background: #121212;
|
||||
box-shadow: inset 0px 0px 2px #000000;
|
||||
-webkit-transition: .4s;
|
||||
transition: .4s;
|
||||
border-radius: 34px;
|
||||
}
|
||||
.slider:before {
|
||||
left: 3px;
|
||||
bottom: 2px;
|
||||
background: #484848;
|
||||
border: 1px solid #3f3f3f;
|
||||
box-shadow: 0px 0px 2px #000000;
|
||||
}
|
||||
input:checked + .slider:before{
|
||||
box-shadow: 0px 0px 2px #b40000;
|
||||
border: 1px solid #ff3a3a;
|
||||
}
|
||||
input + .slider,
|
||||
input:checked + .slider{
|
||||
box-shadow: inset 0px 0px 2px #000000;
|
||||
}
|
||||
input:checked + .slider.debug-slider{
|
||||
box-shadow: inset 0px 0px 2px #000000;
|
||||
}
|
||||
input:checked + .slider.debug-slider:before{
|
||||
box-shadow: 0px 0px 2px #00A3B9;
|
||||
border: 1px solid #01b3ca;
|
||||
}
|
||||
.slider.debug-slider:before {
|
||||
bottom: 1px;
|
||||
}
|
||||
.knob-value{
|
||||
text-shadow: 0 0px 1px #000000, 0px 0px 4px #31d9f3;
|
||||
}
|
||||
.log-msg{
|
||||
color: cyan;
|
||||
border: 1px solid #3b3b3b;
|
||||
background: #121212;
|
||||
box-shadow: inset 0px 0px 2px #000000;
|
||||
}
|
||||
.dir-toggle {
|
||||
background-color: #121212;
|
||||
-moz-box-shadow: inset 0 0 5px #000000;
|
||||
-webkit-box-shadow: inset 0 0 5px #000000;
|
||||
box-shadow: inset 0 0 5px #000000;
|
||||
border: 4px solid #141414;
|
||||
}
|
||||
.dir-toggle:before{
|
||||
-moz-box-shadow: 0 0 5px #000000;
|
||||
-webkit-box-shadow: 0 0 5px #000000;
|
||||
box-shadow: 0 0 5px #000000;
|
||||
}
|
||||
.em-btn button.em-stop{
|
||||
padding: 12px;
|
||||
box-shadow: 0 0 5px 2px #000000;
|
||||
border: 1px solid #ececec;
|
||||
background: #ddd;
|
||||
}
|
||||
|
||||
.rotaryswitchPlugin.big.light {
|
||||
margin: 36px;
|
||||
background: url(../../images/darkmkBigBackground.png) no-repeat;
|
||||
background-size: 100%;
|
||||
background-position: center;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.rotaryswitchPlugin.big.light .switch {
|
||||
background: url(../../images/darkmkBigFront.png) no-repeat;
|
||||
background-size: 93%;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.ui-slider .ui-slider-range {
|
||||
background: #282828;
|
||||
box-shadow: inset 0 0 5px 0px #000;
|
||||
|
||||
}
|
||||
.ui-widget.ui-widget-content {
|
||||
border: 4px solid #3f3f3f;
|
||||
box-shadow: 0px 0px 2px #000000;
|
||||
}
|
||||
.ui-slider-vertical .ui-slider-handle {
|
||||
border: 1px solid #3f3f3f;
|
||||
background-color: #282828;
|
||||
background: linear-gradient(to bottom,#3b3b3b, #282828);
|
||||
left: -6px;
|
||||
}
|
||||
hr {
|
||||
border-color: #3f3f3f;
|
||||
}
|
||||
.menu {
|
||||
box-shadow: 0 0px 10px #000000;
|
||||
border-right: 1px solid #2f2f2f;
|
||||
}
|
||||
.nav-btn, .btn-expand, .btn-info, .btn-hide{
|
||||
color: #afafaf;
|
||||
}
|
||||
.nav-btn:hover, .btn-expand:hover, .btn-info:hover{
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.add-loco-form .add-loco-head,
|
||||
.add-loco-form .row label {
|
||||
color: #333;
|
||||
}
|
||||
.settings-group{
|
||||
border: 1px solid #3b3b3b;
|
||||
background: #121212;
|
||||
box-shadow: inset 0px 0px 2px #000000;
|
||||
}
|
||||
.settings-heading {
|
||||
border-bottom: 1px solid #000000;
|
||||
box-shadow: 0 1px 0px #464646;
|
||||
}
|
||||
.side-panel {
|
||||
border-right: 1px solid #000000;
|
||||
box-shadow: 1px 0 #464646;
|
||||
}
|
||||
.row.settings-group.fnhead{
|
||||
background: #232323;
|
||||
box-shadow: 0 1px 1px black;
|
||||
border: 1px solid #333;
|
||||
}
|
||||
a.edit-cur-loco, a.option-btn{
|
||||
background: #282828;
|
||||
border: 1px solid #3f3f3f;
|
||||
box-shadow: 0px 0px 2px #000000;
|
||||
color: #ffffff;
|
||||
}
|
||||
.loco-details p.ac-loco-name{
|
||||
text-shadow: 0 0 1px #000000;
|
||||
color: #00A3B9
|
||||
}
|
||||
.loco-details .sub-text p{
|
||||
background: #282828;
|
||||
}
|
||||
.loco-list-ctrl input{
|
||||
border: 1px solid #3b3b3b;
|
||||
background: #282828;
|
||||
color: #ffffff;
|
||||
box-shadow: inset 0px 0px 2px #000000;
|
||||
}
|
||||
@@ -0,0 +1,208 @@
|
||||
|
||||
|
||||
.rendered-form{
|
||||
background-image: url("../../images/pattern.png");
|
||||
background-size: 50%;
|
||||
background-repeat: repeat;
|
||||
}
|
||||
.btn-speed {
|
||||
border: 1px solid #dcdcdc;
|
||||
background: linear-gradient(to bottom,#e2e2e2, #cfd0da);
|
||||
color: rgb(59, 59, 59);
|
||||
border: 1px solid #9e9e9e;
|
||||
text-shadow: 0px 1px 0px #fafafa;
|
||||
box-shadow: 0px 1px 1px 1px #b3b3b3;
|
||||
}
|
||||
.btn-speed:hover{
|
||||
background-color: #c7c7c7;
|
||||
background: linear-gradient(to bottom, #e2e2e2, #cfd0da);
|
||||
color: rgb(59, 59, 59);
|
||||
}
|
||||
.btn-speed:active{
|
||||
box-shadow: 0 1px 2px 1px #b3b3b3 inset;
|
||||
background: linear-gradient(to bottom,#cfd0da, #e2e2e2);
|
||||
border: 1px solid #9e9e9e;
|
||||
}
|
||||
.dir-toggle:before{
|
||||
width: 40px;
|
||||
height: 70px;
|
||||
}
|
||||
.dir-btn span.arrow-up,
|
||||
.dir-btn span.arrow-down{
|
||||
color: #4d4d4d;
|
||||
}
|
||||
.dir-btn span.stop{
|
||||
background: #4d4d4d;
|
||||
}
|
||||
.dir-btn.selected span.stop{
|
||||
background: #da0000;
|
||||
box-shadow: 0px 0px 4px #da0000;
|
||||
}
|
||||
.dir-btn.selected span.arrow-up,
|
||||
.dir-btn.selected span.arrow-down{
|
||||
color: #00bcd6;
|
||||
text-shadow: 0px 0px 4px #29d6ec;
|
||||
}
|
||||
.dir-toggle.forward:before, .dir-toggle.stop:before, .dir-toggle.backward:before{
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #f9f9f9;
|
||||
background-color: #efefef;
|
||||
background: linear-gradient(to bottom,#efefef, #e2e2e2);
|
||||
}
|
||||
.em-btn button.em-stop{
|
||||
padding: 12px;
|
||||
background: linear-gradient(to bottom,#e2e2e2, #cfd0da);
|
||||
border: 1px solid #9e9e9e;
|
||||
text-shadow: 0px 1px 0px #fafafa;
|
||||
box-shadow: 0px 1px 1px 1px #b3b3b3;
|
||||
}
|
||||
.fn-button.field-button-fn .btn, .save-fn, .btn-grey,
|
||||
.fn-button.field-button-fn .btn.press{
|
||||
color: rgb(59, 59, 59);
|
||||
border: 1px solid #9e9e9e;
|
||||
border-bottom: 4px solid #9e9e9e;
|
||||
text-shadow: 0px 1px 0px #fafafa;
|
||||
background-color: #efefef;
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#efefef), to(#e2e2e2));
|
||||
background: -moz-linear-gradient(top, #efefef, #e2e2e2);
|
||||
box-shadow: -1px 2px 4px 2px #c7c7c7; /* 0 0 0px 4px #d8d8d8, 0 0 0px 1px #ddd;*/
|
||||
background: linear-gradient(to bottom,#efefef, #e2e2e2);
|
||||
height: 30px;
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.fn-button.field-button-fn button[aria-pressed="true"].btn,
|
||||
.fn-button.field-button-fn button[aria-pressed="true"].btn.press,
|
||||
.save-fn:active {
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#cfd0da), to(#e2e2e2));
|
||||
background: -moz-linear-gradient(top, #bfbfbf, #dcdcdc);
|
||||
box-shadow: 1px 1px 0 #fff, inset 0 1px 1px rgba(0, 0, 0, 0.3);
|
||||
border: 1px solid #9e9e9e;
|
||||
}
|
||||
.fn-button.field-button-fn .btn.press {
|
||||
color: #005a69;
|
||||
}
|
||||
|
||||
.formbuilder-button .btn, .server-button .btn, .fn-button .btn, .dropbtn{
|
||||
border: 1px solid #007a8a;
|
||||
border-bottom: 4px solid #007a8a;
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#00b2ca), to(#00A3B9));
|
||||
background: -moz-linear-gradient(top, #00b2ca, #00A3B9);
|
||||
background: linear-gradient(to bottom,#00b2ca, #00A3B9);
|
||||
box-shadow: -1px 2px 4px 2px #c7c7c7; /* 0 0 0px 4px #d8d8d8, 0 0 0px 1px #ddd;*/
|
||||
vertical-align: middle;
|
||||
box-sizing: border-box;
|
||||
text-shadow: 0px 0px 1px #444444;
|
||||
}
|
||||
.formbuilder-button .btn:active ,
|
||||
.server-button .btn:active, .dropbtn:active{
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#0299ad), to(#00A3B9));
|
||||
background: -moz-linear-gradient(top, #0299ad, #00A3B9);
|
||||
background: linear-gradient(to bottom,#0299ad, #00A3B9);
|
||||
box-shadow: 1px 1px 0 #fff, inset 0 1px 1px rgba(0, 0, 0, 0.3);
|
||||
border-bottom: 1px solid #007a8a;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
.dropbtn{
|
||||
padding: 5px 8px;
|
||||
}
|
||||
.dropbtn:active{
|
||||
padding: 6px 8px;
|
||||
}
|
||||
.server-button .btn, .fn-button .btnm,
|
||||
input.form-control, select.form-control, textarea.form-control {
|
||||
padding: 7px 8px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
input.form-control:active, select.form-control:active, textarea.form-control:active,
|
||||
input.form-control:focus, select.form-control:focus, textarea.form-control:focus{
|
||||
background: #ffffff;
|
||||
}
|
||||
.formbuilder-button .btn.acq-loco-btn,
|
||||
.server-button .btn,
|
||||
.formbuilder-button .add-loco-btn,
|
||||
.formbuilder-button .btn.acq-loco-btn:active,
|
||||
.server-button .btn:active,
|
||||
.formbuilder-button .add-loco-btn:active{
|
||||
height: 34px;
|
||||
}
|
||||
.select-control{
|
||||
height: 30px;
|
||||
border: 1px solid #9e9e9e;
|
||||
box-shadow: 1px 1px 0 #fff, inset 0 1px 1px rgba(0, 0, 0, 0.3);
|
||||
background: #fafafa;
|
||||
}
|
||||
.select-control.select-xl{
|
||||
height: 36px;
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
.btn-grey{
|
||||
padding: 7px;
|
||||
padding-top: 5px;
|
||||
height: 30px;
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
|
||||
/* Acquire loco heading Styles*/
|
||||
.loco-board{
|
||||
display: inline-block;
|
||||
border-radius: 20px;
|
||||
background: linear-gradient(to bottom,#e2e2e2, #cfd0da);
|
||||
color: rgb(59, 59, 59);
|
||||
border: 1px solid #9e9e9e;
|
||||
border-bottom: 4px solid #9e9e9e;
|
||||
text-shadow: 0px 1px 0px #fafafa;
|
||||
box-shadow: inset 0px 1px 1px #f5f5f5;
|
||||
padding: 7px 11px;
|
||||
min-width: 270px;
|
||||
}
|
||||
|
||||
.nut-effect{
|
||||
border-radius: 16px;
|
||||
padding: 5px;
|
||||
background: #dededd;
|
||||
height: 5px;
|
||||
width: 5px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
box-shadow: 0 0 2px #737373;
|
||||
}
|
||||
.nut-effect:after{
|
||||
content: "";
|
||||
display: inline-block;
|
||||
background: #b9b9b9;
|
||||
height: 15px;
|
||||
width: 1px;
|
||||
position: relative;
|
||||
top: -5px;
|
||||
left: 0;
|
||||
}
|
||||
.nut-effect.l{
|
||||
margin-left: 10px;
|
||||
margin-right: 16px;
|
||||
}
|
||||
.nut-effect.r{
|
||||
margin-left: 16px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.nut-effect.l:after{
|
||||
transform: rotate(135deg);
|
||||
}
|
||||
.nut-effect.r:after{
|
||||
transform: rotate(15deg);
|
||||
}
|
||||
|
||||
.rs-control .rs-bg-color {
|
||||
background-color: #ddd;
|
||||
background-image: url(../../images/pattern.png);
|
||||
background-size: 900%;
|
||||
opacity: 0.9;
|
||||
}
|
||||
.rs-overlay.rs-transition.rs-bg-color{
|
||||
background: #dcdcdc;
|
||||
opacity: 1;
|
||||
}
|
||||
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 142 B |
|
After Width: | Height: | Size: 186 KiB |
|
After Width: | Height: | Size: 237 KiB |
|
After Width: | Height: | Size: 730 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 184 KiB |
|
After Width: | Height: | Size: 184 KiB |
|
After Width: | Height: | Size: 606 KiB |
|
After Width: | Height: | Size: 606 KiB |
|
After Width: | Height: | Size: 8.0 MiB |
@@ -0,0 +1,497 @@
|
||||
<!DOCTYPE html>
|
||||
<html HTML>
|
||||
<!--
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Authors: Mani Kumar
|
||||
Fred Decker
|
||||
Matt
|
||||
|
||||
This file is part of the DCC++ EX Project for model railroading and more.
|
||||
For more information, visit use at dcc-ex.com
|
||||
-->
|
||||
<head>
|
||||
<link rel="manifest" href="manifest.json">
|
||||
<script>
|
||||
var version = "1.3.1";
|
||||
</script>
|
||||
|
||||
<link href="images/favicon.ico" rel="shortcut icon" type="image/x-icon">
|
||||
<link href="images/favicon.ico" rel="icon" type="image/x-icon">
|
||||
<link href="css/jquery-ui.css" rel="stylesheet" type="text/css">
|
||||
<link href="css/layout.css" rel="stylesheet" type="text/css">
|
||||
<link href="css/roundslider.min.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="css/throttle.css" rel="stylesheet" type="text/css">
|
||||
<link href="css/jquery.rotaryswitch.css" rel="stylesheet" type="text/css">
|
||||
<link href="css/icons.css" rel="stylesheet" type="text/css">
|
||||
<link href="css/settings.css" rel="stylesheet" type="text/css">
|
||||
<script type="text/javascript" src="js/jquery-3.2.1.min.js"></script>
|
||||
<script type="text/javascript" src="js/jquery-ui.min.js"></script>
|
||||
<script type="text/javascript" src="js/roundslider.min.js"></script>
|
||||
<script type="text/javascript" src="js/jquery.rotaryswitch.js"></script>
|
||||
<script type="text/javascript" src="js/fnMaster.js"></script>
|
||||
<script type="text/javascript" src="js/commandController.js"></script>
|
||||
<script type="text/javascript" src="js/storageController.js"></script>
|
||||
<script type="text/javascript" src="js/addloco.js"></script>
|
||||
<script type="text/javascript" src="js/emulator.js"></script>
|
||||
<script type="text/javascript" src="js/exwebthrottle.js"></script>
|
||||
<script type="text/javascript" src="js/pwa.js"></script>
|
||||
|
||||
<!--
|
||||
NOTE: You can replace the above links with these if you like if you will always run when
|
||||
connected to the internet. Using the links above, they must be installed on your machine.
|
||||
This program will search for them online and import them if you use this method instead.
|
||||
<link href="https://cdn.jsdelivr.net/npm/round-slider@1.6.1/dist/roundslider.min.css" rel="stylesheet" />
|
||||
<script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.js"></script>
|
||||
<script type="text/javascript" src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/round-slider@1.6.1/dist/roundslider.min.js"></script>
|
||||
<script type="text/javascript" src="js/exwebthrottle.js"></script>
|
||||
-->
|
||||
|
||||
<title>DCC++ EX Web Throttle</title>
|
||||
<meta name="description" content="Chromium browser based web throttle for a DCC++ EX Command Station to control model trains">
|
||||
<html lang="en">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav class="menu" id="side-menu" tabindex="0">
|
||||
<header class="avatar">
|
||||
<button class="nav-btn in" id="nav-close">×</button>
|
||||
<img src="images/cover.jpg" />
|
||||
</header>
|
||||
<ul>
|
||||
<li tabindex="0" class="throttle" id="throttle-nav"><span>Throttle</span></li>
|
||||
<li tabindex="0" class="locomotives" id="loco-nav"><span>Locomotives</span></li>
|
||||
<li tabindex="0" class="function-maps" id="fn-map-nav"><span>Function Maps</span></li>
|
||||
<li tabindex="0" class="settings" id="settings-nav"><span>Settings</span></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<div class="topnav">
|
||||
<div class="row">
|
||||
<div class="column-2">
|
||||
<button class="nav-btn" id="nav-open">☰</button>
|
||||
</div>
|
||||
<div class="column-6 align-center">
|
||||
<div class="throttle-heading">
|
||||
<a href="http://www.dcc-ex.com" target="_blank" rel="noopener noreferrer"><div class="wt-logo"></div></a>
|
||||
<!--img src="images/WebThrottle.png" /> -->
|
||||
<!-- <p>Version 1.2.0</p> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="column-2">
|
||||
<button class="btn-expand" id="fs-toggle" state="ws" title="Fullscreen">⤢</button>
|
||||
<button class="btn-info" id="info-tooltip" state="ws" title="Information"><span class="icon-info"></span></button>
|
||||
<button class="btn-info" id="help-button" state="ws" title="Help" onclick=" window.open('https://dcc-ex.com/throttles/ex-webthrottle.html', '_blank')"><span class="icon-question"></span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="rendered-form">
|
||||
<div class="rendered-form">
|
||||
<section id="throttle-window" class="section">
|
||||
<div Class="details-panel" id="details-panel">
|
||||
<div class="row">
|
||||
<div class="column-5">
|
||||
<div class="loco-list-container row">
|
||||
<div class="column-5 loco-list-ctrl">
|
||||
<label for="ex-locoid" class="formbuilder-text-label">
|
||||
Locomotive ID <span class="formbuilder-required">*</span>
|
||||
</label>
|
||||
<input id="ex-locoid" type="text" loco-cv="0" name="Locomotives"/>
|
||||
</div>
|
||||
<div class="column-2 formbuilder-button acquire-wrap">
|
||||
<button id="button-getloco" class="acq-loco-btn btn" data-acquired="false">
|
||||
<span class="icon-circle-right"></span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="column-2 formbuilder-button acquire-wrap">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="server-button column-5">
|
||||
<select id="select-method" class="select-control select-xl" name="selectMethod" title="Change the connection method">
|
||||
<option value="serial">Serial</option>
|
||||
<option value="emulator">Emulator</option>
|
||||
</select>
|
||||
<button type="button" class="btn-default btn" title="Connect to the Command Station" aria-state="connected" name="button-connect" access="false" id="button-connect">
|
||||
<span class="con-ind"></span>Connect DCC++ EX
|
||||
</button>
|
||||
<!-- <button class="btn-grey" id="fs-toggle" state="ws" title="Fullscreen">⤢</button> -->
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
<div class="row pos-rel">
|
||||
<button type="button" class="btn-default btn btn-hide" title="Hide the top bar" name="button-hide" access="false" id="button-hide">
|
||||
<span class="icon-circle-up"></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row flex-center">
|
||||
<div class="column-5 mobile-100 throttle-container">
|
||||
<div class="row mobile-100 width100 flexx">
|
||||
<div class="column-7 flexx">
|
||||
<div class="flexx btns">
|
||||
<button type="button" title="Decrease speed" class="btn-default btn btn btn-speed btn-left" name="button-left" access="false" id="button-left">
|
||||
<span class="left" style="line-height: 12px;"> - </span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="Throttlewrap">
|
||||
<div id="vertical-throttle" class="vertical-throttle speedController">
|
||||
<div id="v-throttle">
|
||||
</div>
|
||||
<div id="speed-indicator" class="progress-numb">
|
||||
0
|
||||
</div>
|
||||
</div>
|
||||
<div id="knobthrottle" class="speedController">
|
||||
<input type="text" class="rotarySwitch" value="0">
|
||||
<div id="knob-value" class="knob-value">0</div>
|
||||
</div>
|
||||
<div id="circular-throttle" class="circular-throttle speedController">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="flexx btns">
|
||||
<button type="button" title="Increase speed" class="btn-default btn btn-speed btn-right" name="button-right" access="false" id="button-right">
|
||||
<span class="right"> + </span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class=" column-2">
|
||||
<div class="em-btn">
|
||||
<button class="em-stop" id="emergency-stop" title="Emergency Stop">
|
||||
<span class="icon-stop"></span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="dir-toggle">
|
||||
<button class="dir-btn forward selected" id="dir-f" aria-label="forward" ><span class="arrow-up icon-up"></span></button>
|
||||
<button class="dir-btn stop" id="dir-S" aria-label="stop"> <span class="stop"></span></button>
|
||||
<button class="dir-btn backward" id="dir-b" aria-label="backward"> <span class="arrow-down icon-down"></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="functionKeys column-5 mobile-100">
|
||||
<div class="row mobile-100">
|
||||
<div class="power-slider column-4 formbuilder-button " id="power-switch-div" title="Enable track power">
|
||||
<label class="switch">
|
||||
<input type="checkbox" id="power-switch">
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
<span class="pow-status">
|
||||
Power <span id="power-status">Off</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="note-msg column-6">
|
||||
<select id="select-map" class="btn select-map select-control" name="selectMap" title="Load a Saved Map">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="fn-wrapper">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="console-slider column-4" title="Enable the debug console">
|
||||
<label class="debug switch">
|
||||
<input type="checkbox" id="console-toggle">
|
||||
<span class="slider round debug-slider"></span>
|
||||
</label>
|
||||
<span class="debug-status">
|
||||
Debug Console
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="debug-console" hidden="true">
|
||||
<hr>
|
||||
<div class="row mobile-margin-top20">
|
||||
<div class="formbuilder-text column-8">
|
||||
<input placeholder="Direct Command (without < >)" class="form-control" name="cmd-direct" access="false" id="cmd-direct">
|
||||
</div>
|
||||
|
||||
<div class="formbuilder-button column-1">
|
||||
<button type="button" class="btn-default btn" name="sendCmd" access="false" data-acquired="false" id="button-sendCmd">
|
||||
Send
|
||||
</button>
|
||||
</div>
|
||||
<div class="formbuilder-button dcmd-clear column-1">
|
||||
<button type="button" class="btn-default btn" name="clearLog" access="false" data-acquired="false" id="button-clearLog">
|
||||
Clear Log
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="log-msg" id="log-box">
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="loco-window" class="section" hidden="true">
|
||||
<div class="row settings-heading">
|
||||
<div class="column-7 pl0 hdng">
|
||||
Locomotives
|
||||
</div>
|
||||
<div class="column-3 pr0">
|
||||
<div class="option-btns formbuilder-button row">
|
||||
<div class="column-2"> </div>
|
||||
<div class="column-4">
|
||||
<button id="add-loco" class="add-loco-btn btn">
|
||||
<span class="icon-plus"></span> Add New
|
||||
</button>
|
||||
<div id="loco-form-content" class="add-loco-form">
|
||||
<form id="loco-form" class="form-inline">
|
||||
<div class="fn-modal-header row">
|
||||
<h4 class="fn-heading add-loco-head">Add Locomotive</h4>
|
||||
<span class="close" id="close-addloco-model">×</span>
|
||||
</div>
|
||||
<!-- <div class="add-loco-head">s
|
||||
Add Locomotive
|
||||
<>
|
||||
<hr>
|
||||
</div> -->
|
||||
<div class="row">
|
||||
<label class="column-4"for="name">Name:*</label>
|
||||
<input class="column-6" type="text" id="name" placeholder="Enter name" name="name" required>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="column-4"for="cv">CV:*</label>
|
||||
<input class="column-6" type="number" id="cv" placeholder="Enter CV" name="cv" required>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="column-4"for="type">Engine Type:</label>
|
||||
<select class="column-6 add-select" id="type" placeholder="Select Type" name="type">
|
||||
<option value="Diesel"> Diesel </option>
|
||||
<option value="Steam"> Steam </option>
|
||||
<option value="Electric"> Electric </option>
|
||||
<option value="Other"> Other </option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="column-4"for="brand">Brand:</label>
|
||||
<input class="column-6" type="text" id="brand" placeholder="Brand Name" name="brand">
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="column-4"for="decoder">Decoder:</label>
|
||||
<input class="column-6" type="text" id="decoder" placeholder="Decoder Name" name="decoder">
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="column-4"for="map">Function map:*</label>
|
||||
<input id="function-maps" class="column-6" type="text" id="map" placeholder="Select Map" name="map" required>
|
||||
</div>
|
||||
<div class="spacer">
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="column-2"></div>
|
||||
<button id="loco-submit" loco-mode="add" class="column-6" type="submit">Submit</button>
|
||||
<div class="column-2"></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="column-2">
|
||||
<button class="add-loco-btn btn" id="export-locolist" title="Export Locomotives"><span class="icon-upload3"></span></button>
|
||||
</div>
|
||||
<div class="column-2">
|
||||
<button class="add-loco-btn btn" id="import-locolist" title="Import Locomotives"><span class="icon-download3"></span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row settings-content">
|
||||
<div class="settings-panel" id="locomotives-panel">
|
||||
<div class="settings-group">
|
||||
Select a Locomotive
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="fn-map-window" class="section" hidden="true">
|
||||
<div class="row settings-heading">
|
||||
<div class="column-7 pl0 hdng">
|
||||
Function Mappings
|
||||
</div>
|
||||
<div class="column-3 pr0">
|
||||
<div class="option-btns formbuilder-button row">
|
||||
<div class="column-2"> </div>
|
||||
<div class="column-4">
|
||||
<button id="add-map" class="add-loco-btn btn">
|
||||
<span class="icon-plus"></span> New Map
|
||||
</button>
|
||||
</div>
|
||||
<div class="column-2">
|
||||
<button class="add-loco-btn btn" id="export-all-maps" title="Export Map" ><span class="icon-upload3"></span></button>
|
||||
</div>
|
||||
<div class="column-2">
|
||||
<button class="add-loco-btn btn" id="import-all-maps" title="Import Map"><span class="icon-download3"></span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row settings-content">
|
||||
<div class="side-panel">
|
||||
<ul id="function-mappings">
|
||||
</ul>
|
||||
</div>
|
||||
<div class="settings-panel" id="mapping-panel">
|
||||
|
||||
<div class="settings-group placeholder">
|
||||
<p>Select a Map</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="settings-window" class="section" hidden="true">
|
||||
<div class="row">
|
||||
<div class="settings-heading hdng">
|
||||
Settings
|
||||
</div>
|
||||
</div>
|
||||
<div class="row settings-content">
|
||||
<div class="side-panel">
|
||||
<ul>
|
||||
<li id="settings-general">General</li>
|
||||
<li id="settings-storage">Storage</li>
|
||||
<li id="settings-app">App</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="settings-panel scrollbar" id="settings-panel">
|
||||
<div class="settings-section" id="general-section">
|
||||
<div class="settings-subheading">
|
||||
General
|
||||
</div>
|
||||
<div class="settings-group">
|
||||
<div class="row setting-entry">
|
||||
<label class="setting-label">
|
||||
Theme
|
||||
</label>
|
||||
<div class="setting-content">
|
||||
<select id="theme-selector" class="btn theme-selector select-control" name="themeselector" title="Change Theme">
|
||||
<option value="simple"> Simple </option>
|
||||
<option value="metallic"> Metallic </option>
|
||||
<option value="dark"> Dark </option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row setting-entry">
|
||||
<label class="setting-label">
|
||||
Speed Controller
|
||||
</label>
|
||||
<div class="setting-content">
|
||||
<select id="throttle-selector" class="btn throttle-selector select-control" name="throttleselector" title="Change Throttle Controller">
|
||||
<option value="vertical"> Vertical </option>
|
||||
<option value="knob"> Knob </option>
|
||||
<option value="circular"> Circular </option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="settings-section" id="storage-section">
|
||||
<div class="settings-subheading">
|
||||
Storage
|
||||
</div>
|
||||
<div class="settings-group">
|
||||
<!--<div class="row setting-entry">
|
||||
<label class="setting-label">
|
||||
Some placeholder
|
||||
</label>
|
||||
<div class="setting-content">
|
||||
<input />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row setting-entry">
|
||||
<label class="setting-label">
|
||||
Some placeholder
|
||||
</label>
|
||||
<div class="setting-content">
|
||||
<input />
|
||||
</div>
|
||||
</div>-->
|
||||
<!--<div class="hr"></div>-->
|
||||
<div class="row setting-entry">
|
||||
<label class="setting-label">
|
||||
<button id="backup-app-settings">⤒ Export App data</button>
|
||||
</label>
|
||||
</div>
|
||||
<div class="row setting-entry">
|
||||
<label class="setting-label">
|
||||
<button id="restore-app-settings">⤓ Import App data</button>
|
||||
</label>
|
||||
</div>
|
||||
<div class="row setting-entry">
|
||||
<label class="setting-label">
|
||||
<button id="wipe-app-settings">⤫ Wipe App data</button>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="settings-section" id="app-section">
|
||||
<div class="settings-subheading">
|
||||
App
|
||||
</div>
|
||||
<div class="settings-group">
|
||||
<div class="row setting-entry">
|
||||
<label class="setting-label">
|
||||
Install as an app
|
||||
</label>
|
||||
<label class="setting-label">
|
||||
<button class="add-button">Install</button>
|
||||
<label class="installed-label">App Installed</label>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="fnModal" class="fn-modal">
|
||||
<!-- Modal content -->
|
||||
<div class="fn-modal-header row">
|
||||
<h4 class="fn-heading" > New Map </h4>
|
||||
<span class="close" id="close-model">×</span>
|
||||
</div>
|
||||
<div class="fn-modal-content">
|
||||
Content
|
||||
</div>
|
||||
<div class="fn-modal-footer row">
|
||||
<button type="button" mode="new" class="btn-default btn save-fn" name="save-fn" id="save-fn-map">
|
||||
Save Map
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<input id="map-upload" type="file" hidden/>
|
||||
<input id="maps-upload" type="file" hidden/>
|
||||
<input id="cabs-upload" type="file" hidden/>
|
||||
<input id="app-upload" type="file" hidden/>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
<script>
|
||||
if('serviceWorker' in navigator) {
|
||||
navigator.serviceWorker.register('sw.js')
|
||||
.then(function() {
|
||||
console.log('Service Worker Registered');
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,156 @@
|
||||
$(document).ready(function(){
|
||||
locoList = getLocoList();
|
||||
savedMaps = getPreparedMaps();
|
||||
$("#loco-form").on("submit", function (e) {
|
||||
e.preventDefault();
|
||||
data = $(this).serializeArray();
|
||||
mode = $("#loco-submit").attr("loco-mode");
|
||||
if(mode != 'edit'){
|
||||
saveLocomotive(data);
|
||||
}else{
|
||||
id = $("#loco-submit").attr("loco-id")
|
||||
saveEditedLocomotive(data, id);
|
||||
}
|
||||
locoList = getLocoList();
|
||||
loadLocomotives();
|
||||
$("#loco-form")[0].reset();
|
||||
$("#loco-form-content").css("display", "none");
|
||||
});
|
||||
|
||||
$("#add-loco").on("click", function () {
|
||||
savedMaps = getPreparedMaps();
|
||||
$("#loco-form")[0].reset();
|
||||
$("#loco-form-content").css("display", "inline-block");
|
||||
$(".add-loco-form .add-loco-head").html("Add Locomotive");
|
||||
$("#loco-submit").attr("loco-mode", "add");
|
||||
});
|
||||
|
||||
$("#close-addloco-model").on("click", function () {
|
||||
if ($("#loco-form-content").is(":visible")) {
|
||||
$("#loco-form-content").css("display", "none");
|
||||
}
|
||||
});
|
||||
|
||||
$("#ex-locoid").autocomplete({
|
||||
delay: 0,
|
||||
minLength: 0,
|
||||
source: function (request, response) {
|
||||
var matcher = new RegExp(
|
||||
$.ui.autocomplete.escapeRegex(request.term),
|
||||
"i"
|
||||
);
|
||||
response(
|
||||
$.grep(locoList, function (item) {
|
||||
if (item != undefined) {
|
||||
console.log(item);
|
||||
return (
|
||||
matcher.test(item.name) ||
|
||||
matcher.test(item.cv) ||
|
||||
matcher.test(item.type) ||
|
||||
matcher.test(item.manufacturer)
|
||||
);
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
})
|
||||
);
|
||||
},
|
||||
select: function (event, ui) {
|
||||
$(this).val(ui.item.cv + " | " + ui.item.name);
|
||||
$(this).attr("loco-cv", ui.item.cv);
|
||||
return false;
|
||||
},
|
||||
})
|
||||
.focus(function () {
|
||||
console.log("Focused");
|
||||
$(this).autocomplete("search", "");
|
||||
})
|
||||
.data("ui-autocomplete")._renderItem = function (ul, item) {
|
||||
$(ul).addClass("res-list");
|
||||
return $("<li></li>")
|
||||
.data("item.autocomplete", item)
|
||||
.append(
|
||||
"<div><p class='ac-loco-name'>" +
|
||||
item.name +
|
||||
"</p><small> <span class='pill'>CV:" +
|
||||
item.cv +
|
||||
"</span>|<span class='pill'>" +
|
||||
item.type +
|
||||
"</span>|<span class='pill wrap'>" +
|
||||
item.brand +
|
||||
"</span></small></div>"
|
||||
)
|
||||
.appendTo(ul);
|
||||
};
|
||||
|
||||
$("#function-maps").autocomplete({
|
||||
delay: 0,
|
||||
minLength: 0,
|
||||
source: function (request, response) {
|
||||
var matcher = new RegExp(
|
||||
$.ui.autocomplete.escapeRegex(request.term),
|
||||
"i"
|
||||
);
|
||||
response(
|
||||
$.grep(savedMaps, function (item) {
|
||||
return matcher.test(item.mname);
|
||||
})
|
||||
);
|
||||
},
|
||||
select: function (event, ui) {
|
||||
$(this).val(ui.item.mname);
|
||||
return false;
|
||||
},
|
||||
})
|
||||
.focus(function () {
|
||||
console.log("Focused");
|
||||
$(this).autocomplete("search", "");
|
||||
})
|
||||
.data("ui-autocomplete")._renderItem = function (ul, item) {
|
||||
$(ul).addClass("res-list-sm");
|
||||
return $("<li></li>")
|
||||
.data("item.autocomplete", item)
|
||||
.append("<div><p class='item'>" + item.mname + "</p></div>")
|
||||
.appendTo(ul);
|
||||
};
|
||||
|
||||
$("#export-locolist").on("click", function (e) {
|
||||
downloadCabData();
|
||||
});
|
||||
|
||||
$("#import-locolist").on("click", function (e) {
|
||||
e.preventDefault();
|
||||
$("#cabs-upload").trigger("click");
|
||||
locoList = getLocoList();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function getPreparedMaps() {
|
||||
const defaultMap = {
|
||||
mname: "Default",
|
||||
fnData: {},
|
||||
}
|
||||
return [defaultMap, ...getMapData()];
|
||||
}
|
||||
|
||||
/** Reference Map Structure
|
||||
maps = [
|
||||
{
|
||||
mname: "mkmap",
|
||||
fnData: {
|
||||
f0: [0, 1, "Head Light", 1],
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
locos = [
|
||||
{
|
||||
name: "Mikado",
|
||||
cv: 3,
|
||||
type: "Diesel",
|
||||
manufacturer: "Kato",
|
||||
},
|
||||
];
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,270 @@
|
||||
/* This is part of the DCC++ EX Project for model railroading and more.
|
||||
For licence information, please see index.html
|
||||
For more information, see us at dcc-ex.com.
|
||||
|
||||
commandController.js
|
||||
|
||||
Open a serial port and create a stream to read and write data
|
||||
While there is data, we read the results in loop function
|
||||
*/
|
||||
$(document).ready(function(){
|
||||
console.log("Command Controller loaded");
|
||||
uiDisable(true)
|
||||
emulatorClass = new Emulator({logger: displayLog});
|
||||
});
|
||||
|
||||
// - Request a port and open an asynchronous connection,
|
||||
// which prevents the UI from blocking when waiting for
|
||||
// input, and allows serial to be received by the web page
|
||||
// whenever it arrives.
|
||||
async function connectServer() {
|
||||
// Gets values of the connection method selector
|
||||
selectMethod = document.getElementById('select-method')
|
||||
mode = selectMethod.value;
|
||||
// Disables selector so it can't be changed whilst connected
|
||||
selectMethod.disabled = true;
|
||||
console.log("Set Mode: "+mode)
|
||||
// Checks which method was selected
|
||||
if (mode == "serial") {
|
||||
try{
|
||||
// - Request a port and open an asynchronous connection,
|
||||
// which prevents the UI from blocking when waiting for
|
||||
// input, and allows serial to be received by the web page
|
||||
// whenever it arrives.
|
||||
|
||||
port = await navigator.serial.requestPort(); // prompt user to select device connected to a com port
|
||||
// - Wait for the port to open.
|
||||
await port.open({ baudRate: 115200 }); // open the port at the proper supported baud rate
|
||||
|
||||
// create a text encoder output stream and pipe the stream to port.writeable
|
||||
const encoder = new TextEncoderStream();
|
||||
outputDone = encoder.readable.pipeTo(port.writable);
|
||||
outputStream = encoder.writable;
|
||||
|
||||
// To put the system into a known state and stop it from echoing back the characters that we send it,
|
||||
// we need to send a CTRL-C and turn off the echo
|
||||
writeToStream('\x03', 'echo(false);');
|
||||
|
||||
// Create an input stream and a reader to read the data. port.readable gets the readable stream
|
||||
// DCC++ commands are text, so we will pipe it through a text decoder.
|
||||
let decoder = new TextDecoderStream();
|
||||
inputDone = port.readable.pipeTo(decoder.writable);
|
||||
inputStream = decoder.readable
|
||||
// .pipeThrough(new TransformStream(new LineBreakTransformer())); // added this line to pump through transformer
|
||||
//.pipeThrough(new TransformStream(new JSONTransformer()));
|
||||
|
||||
// get a reader and start the non-blocking asynchronous read loop to read data from the stream.
|
||||
reader = inputStream.getReader();
|
||||
readLoop();
|
||||
uiDisable(false)
|
||||
displayLog("[CONNECTION] Serial connected")
|
||||
return true;
|
||||
} catch (err) {
|
||||
console.log("User didn't select a port to connect to")
|
||||
return false;
|
||||
}
|
||||
} else{
|
||||
// If using the emulator
|
||||
emulatorMode = true;
|
||||
// Displays dummy hardware message
|
||||
displayLog("\n[CONNECTION] Emulator connected")
|
||||
displayLog("[RECEIVE] DCC++ EX COMMAND STATION FOR EMULATOR / EMULATOR MOTOR SHIELD: V-1.0.0 / Feb 30 2020 13:10:04")
|
||||
uiDisable(false)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// While there is still data in the serial buffer us an asynchronous read loop
|
||||
// to get the data and place it in the "value" variable. When "done" is true
|
||||
// all the data has been read or the port is closed
|
||||
async function readLoop() {
|
||||
while (true) {
|
||||
const { value, done } = await reader.read();
|
||||
// if (value && value.button) { // alternate check and calling a function
|
||||
// buttonPushed(value);
|
||||
if (value) {
|
||||
displayLog('[RECEIVE] '+value);
|
||||
console.log('[RECEIVE] '+value);
|
||||
}
|
||||
if (done) {
|
||||
console.log('[readLoop] DONE'+done.toString());
|
||||
reader.releaseLock();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function writeToStream(...lines) {
|
||||
// Stops data being written to nonexistent port if using emulator
|
||||
let stream = emulatorClass
|
||||
if (port) {
|
||||
stream = outputStream.getWriter();
|
||||
}
|
||||
|
||||
lines.forEach((line) => {
|
||||
if (line == "\x03" || line == "echo(false);") {
|
||||
|
||||
} else {
|
||||
displayLog('[SEND]'+line.toString());
|
||||
}
|
||||
const packet = `<${line}>\n`;
|
||||
stream.write(packet)
|
||||
console.log(packet)
|
||||
});
|
||||
}
|
||||
|
||||
// Transformer for the Web Serial API. Data comes in as a stream so we
|
||||
// need a container to buffer what is coming from the serial port and
|
||||
// parse the data into separate lines by looking for the breaks
|
||||
class LineBreakTransformer {
|
||||
constructor() {
|
||||
// A container for holding stream data until it sees a new line.
|
||||
this.container = '';
|
||||
}
|
||||
|
||||
transform(chunk, controller) {
|
||||
// Handle incoming chunk
|
||||
this.container += chunk; // add new data to the container
|
||||
const lines = this.container.split('\r\n'); // look for line breaks and if it finds any
|
||||
this.container = lines.pop(); // split them into an array
|
||||
lines.forEach(line => controller.enqueue(line)); // iterate parsed lines and send them
|
||||
|
||||
}
|
||||
|
||||
flush(controller) {
|
||||
// When the stream is closed, flush any remaining data
|
||||
controller.enqueue(this.container);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// Optional transformer for use with the web serial API
|
||||
// to parse a JSON file into its component commands
|
||||
class JSONTransformer {
|
||||
transform(chunk, controller) {
|
||||
// Attempt to parse JSON content
|
||||
try {
|
||||
controller.enqueue(JSON.parse(chunk));
|
||||
} catch (e) {
|
||||
//displayLog(chunk.toString());
|
||||
//displayLog(chunk);
|
||||
console.log('No JSON, dumping the raw chunk', chunk);
|
||||
controller.enqueue(chunk);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
async function disconnectServer() {
|
||||
if ($("#power-switch").is(':checked')) {
|
||||
$("#log-box").append('<br>'+'turn off power'+'<br>');
|
||||
writeToStream('0');
|
||||
$("#power-switch").prop('checked', false)
|
||||
$("#power-status").html('Off');
|
||||
}
|
||||
uiDisable(true)
|
||||
if (port) {
|
||||
// Close the input stream (reader).
|
||||
if (reader) {
|
||||
await reader.cancel(); // .cancel is asynchronous so must use await to wave for it to finish
|
||||
await inputDone.catch(() => {});
|
||||
reader = null;
|
||||
inputDone = null;
|
||||
console.log('close reader');
|
||||
}
|
||||
|
||||
// Close the output stream.
|
||||
if (outputStream) {
|
||||
await outputStream.getWriter().close();
|
||||
await outputDone; // have to wait for the azync calls to finish and outputDone to close
|
||||
outputStream = null;
|
||||
outputDone = null;
|
||||
console.log('close outputStream');
|
||||
}
|
||||
// Close the serial port.
|
||||
await port.close();
|
||||
port = null;
|
||||
console.log('close port');
|
||||
displayLog("[CONNECTION] Serial disconnected");
|
||||
} else {
|
||||
// Disables emulator
|
||||
emulatorMode = undefined;
|
||||
displayLog("[CONNECTION] Emulator disconnected");
|
||||
}
|
||||
// Allows a new method to be chosen
|
||||
selectMethod.disabled = false;
|
||||
}
|
||||
|
||||
// Connect or disconnect from the command station
|
||||
async function toggleServer(btn) {
|
||||
// If already connected, disconnect
|
||||
if (port || emulatorMode) {
|
||||
await disconnectServer();
|
||||
btn.attr('aria-state','Disconnected');
|
||||
btn.html('<span class="con-ind"></span>Connect DCC++ EX'); //<span id="con-ind"></span>Connect DCC++ EX
|
||||
return;
|
||||
}
|
||||
|
||||
// Otherwise, call the connect() routine when the user clicks the connect button
|
||||
success = await connectServer();
|
||||
// Checks if the port was opened successfully
|
||||
if (success) {
|
||||
btn.attr('aria-state','Connected');
|
||||
btn.html('<span class="con-ind connected"></span>Disconnect DCC++ EX');
|
||||
} else {
|
||||
selectMethod.disabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Display log of events
|
||||
function displayLog(data){
|
||||
data = data.replace("<"," ");
|
||||
data = data.replace(">"," ");
|
||||
$("#log-box").append("<br>"+data.toString()+"<br>");
|
||||
$("#log-box").scrollTop($("#log-box").prop("scrollHeight"));
|
||||
}
|
||||
|
||||
// Function to generate commands for functions F0 to F4
|
||||
function sendCommandForF0ToF4(fn, opr){
|
||||
setFunCurrentVal(fn,opr);
|
||||
cabval = (128+getFunCurrentVal("f1")*1 + getFunCurrentVal("f2")*2 + getFunCurrentVal("f3")*4 + getFunCurrentVal("f4")*8 + getFunCurrentVal("f0")*16);
|
||||
writeToStream("f "+getCV()+" "+cabval);
|
||||
console.log("Command: "+ "f "+getCV()+" "+cabval);
|
||||
|
||||
}
|
||||
|
||||
// Function to generate commands for functions F5 to F8
|
||||
function sendCommandForF5ToF8(fn, opr){
|
||||
setFunCurrentVal(fn,opr);
|
||||
cabval = (176+getFunCurrentVal("f5")*1 + getFunCurrentVal("f6")*2 + getFunCurrentVal("f7")*4 + getFunCurrentVal("f8")*8);
|
||||
writeToStream("f "+getCV()+" "+cabval);
|
||||
console.log("Command: "+ "f "+getCV()+" "+cabval);
|
||||
|
||||
}
|
||||
|
||||
// Function to generate commands for functions F9 to F12
|
||||
function sendCommandForF9ToF12(fn, opr){
|
||||
setFunCurrentVal(fn,opr);
|
||||
cabval = (160+getFunCurrentVal("f9")*1 + getFunCurrentVal("f10")*2 + getFunCurrentVal("f11")*4 + getFunCurrentVal("f12")*8);
|
||||
writeToStream("f "+getCV()+" "+cabval);
|
||||
console.log("Command: "+ "f "+getCV()+" "+cabval);
|
||||
|
||||
}
|
||||
|
||||
// Function to generate commands for functions F13 to F20
|
||||
function sendCommandForF13ToF20(fn, opr){
|
||||
setFunCurrentVal(fn,opr);
|
||||
cabval = (getFunCurrentVal("f13")*1 + getFunCurrentVal("f14")*2 + getFunCurrentVal("f15")*4 + getFunCurrentVal("f16")*8 + getFunCurrentVal("f17")*16 + getFunCurrentVal("f18")*32 + getFunCurrentVal("f19")*64 + getFunCurrentVal("f20")*128);
|
||||
writeToStream("f "+getCV()+" 222 "+cabval);
|
||||
console.log("Command: "+ "f "+getCV()+" 222 "+cabval);
|
||||
|
||||
}
|
||||
|
||||
// Function to generate commands for functions F21 to F28
|
||||
function sendCommandForF21ToF28(fn, opr){
|
||||
setFunCurrentVal(fn,opr);
|
||||
cabval = (getFunCurrentVal("f21")*1 + getFunCurrentVal("f22")*2 + getFunCurrentVal("f23")*4 + getFunCurrentVal("f24")*8 + getFunCurrentVal("f25")*16 + getFunCurrentVal("f26")*32 + getFunCurrentVal("f27")*64 + getFunCurrentVal("f28")*128);
|
||||
writeToStream("f "+getCV()+" 223 "+cabval);
|
||||
console.log("Command: "+ "f "+getCV()+" 223 "+cabval);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,187 @@
|
||||
/* This is part of the DCC++ EX Project for model railroading and more.
|
||||
For licence information, please see index.html.
|
||||
For more information, see us at dcc-ex.com.
|
||||
|
||||
emulator.js
|
||||
|
||||
Allows the software to operate without a Command Station attached. This
|
||||
file manages the correct response that a Command Station would provide.
|
||||
*/
|
||||
/**
|
||||
* Utility function can be moved when we can import files
|
||||
* @description Removes control characters "<", ">" and "\n"
|
||||
* @param {string} packet
|
||||
* @return {string}
|
||||
*/
|
||||
function removeControlCharacters(packet) {
|
||||
return [...packet].filter(char => !["<", ">", "\n"].includes(char)).join("")
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility function can be moved when we can import files
|
||||
* @description Finds the first non-blank character after control characters are removed
|
||||
* @param {string} packet
|
||||
* @return {string}
|
||||
*/
|
||||
function extractPacketKey(packet) {
|
||||
const cleanedPacket = [...removeControlCharacters(packet)]
|
||||
return cleanedPacket.find(char => char !== " ");
|
||||
}
|
||||
|
||||
class Emulator {
|
||||
constructor({logger}) {
|
||||
this.turnoutEmulator = new TurnoutEmulator()
|
||||
this.logger = logger
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} packet
|
||||
*/
|
||||
write(packet) {
|
||||
if (packet === "<credits>") {
|
||||
console.log("Credits")
|
||||
return credits()
|
||||
}
|
||||
|
||||
let packetKey = extractPacketKey(packet);
|
||||
|
||||
switch (packetKey) {
|
||||
// Cab control
|
||||
case ("t"):
|
||||
this.logger('[RECEIVE] '+ this.#cabControlCommand(packet))
|
||||
break;
|
||||
|
||||
// Track power off
|
||||
case ('0') :
|
||||
this.logger('[RECEIVE] '+ this.#powerOffCommand(packet));
|
||||
break;
|
||||
|
||||
// Track power on
|
||||
case ('1'):
|
||||
this.logger('[RECEIVE] '+ this.#powerOnCommand(packet));
|
||||
break;
|
||||
|
||||
// New cab functions
|
||||
case ('F'):
|
||||
this.logger('[RECEIVE] '+ this.#cabFunctionCommand(packet));
|
||||
break;
|
||||
|
||||
// Legacy cab functions
|
||||
case ('f'):
|
||||
|
||||
this.logger('[RECEIVE] '+ this.#cabFunctionCommand(packet, true));
|
||||
break;
|
||||
|
||||
// Turnouts
|
||||
case ('T'): //Not fully finished
|
||||
this.logger('[RECEIVE] '+ this.#turnoutCommand(packet, this.turnoutEmulator))
|
||||
break
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} packet
|
||||
* @return {string}
|
||||
*/
|
||||
#cabControlCommand(packet) {
|
||||
const splitPacket = packet.split(" ");
|
||||
return 'T 1 ' + splitPacket[3] + ' ' + splitPacket[4].substring(0, splitPacket[4].length - 2);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} packet
|
||||
* @return {string}
|
||||
*/
|
||||
#powerOffCommand(packet) {
|
||||
return 'p0';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} packet
|
||||
* @return {string}
|
||||
*/
|
||||
#powerOnCommand(packet) {
|
||||
return 'p1';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} packet
|
||||
* @param {boolean} legacy
|
||||
* @return number
|
||||
*/
|
||||
#cabFunctionCommand(packet, legacy = false) {
|
||||
return NaN;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} packet
|
||||
* @param {TurnoutEmulator} turnoutEmulator
|
||||
* @return {string}
|
||||
*/
|
||||
#turnoutCommand(packet, turnoutEmulator = new TurnoutEmulator()) {
|
||||
const splitPacket = removeControlCharacters(packet).split(" ");
|
||||
|
||||
if (splitPacket.length === 4) {
|
||||
// Adds a Turnout
|
||||
return turnoutEmulator.addTurnout(new Turnout(packet))
|
||||
} else if (splitPacket.length === 2) {
|
||||
// Removes a Turnout
|
||||
return turnoutEmulator.removeTurnout(splitPacket[1])
|
||||
} else if (splitPacket.length === 1) {
|
||||
// Reads Turnouts
|
||||
return turnoutEmulator.turnouts
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class TurnoutEmulator {
|
||||
/**
|
||||
* @type {[]}
|
||||
*/
|
||||
#turnouts = []
|
||||
|
||||
/**
|
||||
* @return {string|string[]}
|
||||
*/
|
||||
get turnouts() {
|
||||
if (!this.#turnouts.length) {
|
||||
return 'X'
|
||||
}
|
||||
|
||||
return this.#turnouts.map(turnout => `H ${turnout.id} ${turnout.address} ${turnout.subaddress} ${turnout.thrown}`)
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {*} turnout
|
||||
* @return {string}
|
||||
*/
|
||||
addTurnout(turnout) {
|
||||
this.#turnouts = [...this.#turnouts, turnout]
|
||||
console.log(this.#turnouts);
|
||||
return '<O>';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} turnoutId
|
||||
* @return {string}
|
||||
*/
|
||||
removeTurnout(turnoutId) {
|
||||
this.#turnouts = this.#turnouts.filter(turnout => turnout.id !== turnoutId);
|
||||
console.log(this.#turnouts);
|
||||
return 'O';
|
||||
}
|
||||
}
|
||||
|
||||
class Turnout {
|
||||
constructor(packet) {
|
||||
let [_key, id, address, subaddress] = removeControlCharacters(packet).split(" ");
|
||||
|
||||
this.id = id
|
||||
this.address = address
|
||||
this.subaddress = subaddress
|
||||
this.thrown = 0
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,971 @@
|
||||
/*
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or$("#log-box").append("<br>"+data+"<br>");
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Authors: Fred Decker
|
||||
Mani Kumar
|
||||
Matt
|
||||
|
||||
This is part of the DCC++ EX Project for model railroading and more.
|
||||
For more information, see us at dcc-ex.com.
|
||||
*/
|
||||
window.cv=0;
|
||||
window.speed=0;
|
||||
window.direction=1;
|
||||
window.server="";
|
||||
window.port=4444;
|
||||
window.speedStep = 1;
|
||||
window.functions = {
|
||||
"f0": 0,
|
||||
"f1": 0,
|
||||
"f2": 0,
|
||||
"f3": 0,
|
||||
"f4": 0,
|
||||
"f5": 0,
|
||||
"f6": 0,
|
||||
"f7": 0,
|
||||
"f8": 0,
|
||||
"f9": 0,
|
||||
"f10": 0,
|
||||
"f11": 0,
|
||||
"f12": 0,
|
||||
"f13": 0,
|
||||
"f14": 0,
|
||||
"f15": 0,
|
||||
"f16": 0,
|
||||
"f17": 0,
|
||||
"f18": 0,
|
||||
"f19": 0,
|
||||
"f20": 0,
|
||||
"f21": 0,
|
||||
"f22": 0,
|
||||
"f23": 0,
|
||||
"f24": 0,
|
||||
"f25": 0,
|
||||
"f26": 0,
|
||||
"f27": 0,
|
||||
"f28": 0
|
||||
};
|
||||
window.isStopped = true;
|
||||
let port;
|
||||
let emulatorMode;
|
||||
let reader;
|
||||
let inputDone;
|
||||
let outputDone;
|
||||
let inputStream;
|
||||
let outputStream;
|
||||
|
||||
let pressed = false;
|
||||
|
||||
|
||||
// Enables and disables ui elements
|
||||
|
||||
function uiDisable (status) {
|
||||
/*document.getElementById('ex-locoid').disabled = status
|
||||
document.getElementById('power-switch').disabled = status
|
||||
document.getElementById('button-sendCmd').disabled = status
|
||||
document.getElementById('dir-f').disabled = status
|
||||
document.getElementById('dir-S').disabled = status*/
|
||||
//document.getElementById('dir-b').disabled = status
|
||||
$("#ex-locoid").prop('disabled', status)
|
||||
$("#power-switch").prop('disabled', status)
|
||||
$("#button-sendCmd").prop('disabled', status)
|
||||
$("#dir-f").prop('disabled', status)
|
||||
$("#dir-S").prop('disabled', status)
|
||||
$("#dir-b").prop('disabled', status)
|
||||
if (status){
|
||||
//$("#throttle").roundSlider("disable");
|
||||
//toggleThrottleState(false)
|
||||
$("#button-getloco").trigger("click");
|
||||
} else {
|
||||
//$("#throttle").roundSlider("enable");
|
||||
//toggleThrottleState(true)
|
||||
//$("#button-getloco").trigger("click");
|
||||
}
|
||||
}
|
||||
|
||||
// Returns given function current value (0-disable/1-enable)
|
||||
function getFunCurrentVal(fun){
|
||||
return window.functions[fun];
|
||||
}
|
||||
// Set given function current value with given value (0/1)
|
||||
function setFunCurrentVal(fun, val){
|
||||
window.functions[fun]=val;
|
||||
}
|
||||
// Set given CV value
|
||||
function setCV(val){
|
||||
window.cv = val;
|
||||
console.log("Set Cab Address: "+val);
|
||||
}
|
||||
// Get stored CV value
|
||||
function getCV(){
|
||||
return window.cv
|
||||
}
|
||||
|
||||
// Set Speed value
|
||||
function setSpeed(sp){
|
||||
window.speed=sp;
|
||||
}
|
||||
|
||||
// Get Speed value
|
||||
function getSpeed(){
|
||||
return parseInt(window.speed);
|
||||
}
|
||||
|
||||
// Set Direction
|
||||
function setDirection(dir){
|
||||
window.direction=dir;
|
||||
}
|
||||
|
||||
// Get Direction value
|
||||
function getDirection(dir){
|
||||
return window.direction;
|
||||
}
|
||||
|
||||
// Handling Disabling functionality for Knob Type throttle (it will not Out of the box)
|
||||
function toggleKnobState(ele, state) {
|
||||
if(!state){
|
||||
ele.addClass("disabled");
|
||||
}else{
|
||||
ele.removeClass("disabled");
|
||||
}
|
||||
}
|
||||
function loadMapData(map){
|
||||
data = [];
|
||||
if (map == "Default") {
|
||||
data = { mname: "Default", fnData: fnMasterData };
|
||||
} else {
|
||||
data = getStoredMapData(map);
|
||||
}
|
||||
$("#mapping-panel").empty();
|
||||
$("#mapping-panel").append(
|
||||
'<div class="settings-subheading row">' +
|
||||
'<div class="column-7 pl0"><div class="map-name-heading">' +
|
||||
map +
|
||||
"</div></div>" +
|
||||
'<div class="column-3 pr0">' +
|
||||
'<input type="hidden" id="cur-map-val" cur-map="'+map+'"/>' +
|
||||
'<a href="#" class="option-btn waste-bin" id="delete-map"> 🗑</a>' +
|
||||
'<a href="#" class="option-btn" id="import-map"> ↓</a>' +
|
||||
'<a href="#" class="option-btn" id="export-cur-map"> ↑</a>' +
|
||||
'<a href="#" class="option-btn" id="edit-cur-map">✎</a>' +
|
||||
"</div>" +
|
||||
"</div>"
|
||||
);
|
||||
$("#mapping-panel").append(
|
||||
'<div class="row settings-group fnhead">' +
|
||||
'<div class="column-2">Function</div>'+
|
||||
'<div class="column-4">Name</div>'+
|
||||
'<div class="column-2">Type</div>' +
|
||||
'<div class="column-2">Visible</div>' +
|
||||
'</div>'
|
||||
);
|
||||
container = $('<div class="maps-content"></div>').appendTo("#mapping-panel");
|
||||
$.each(data.fnData, function (key, value) {
|
||||
container.append(
|
||||
'<div class="row settings-group" id="'+key+'">' +
|
||||
'<div class="column-2 caplitalize">'+key+'</div>'+
|
||||
'<div class="column-4">'+value[2]+'</div>'+
|
||||
'<div class="column-2">'+ (value[1] == 1 ? '<span class="pill red">Momentary</span>' : '<span class="pill green">Latching</span>') +'</div>' +
|
||||
'<div class="column-2">'+ (value[3] == 1 ? '<span class="pill green">Visible</span>' : '<span class="pill">Hidden</span>') +'</div>' +
|
||||
'</div>'
|
||||
);
|
||||
});
|
||||
|
||||
}
|
||||
function loadLocomotives(){
|
||||
locos = getLocoList();
|
||||
$("#locomotives-panel").empty();
|
||||
$.each(locos, function (key, value) {
|
||||
$("#locomotives-panel").append(
|
||||
'<div class="row settings-group" id="'+key+'">'+
|
||||
'<div class="column-1 sno"><p>' + (key + 1) + "</p></div>" +
|
||||
'<div class="column-7 loco-details">' +
|
||||
'<div class="row">' +
|
||||
'<div class="column-7"><p class="ac-loco-name column-10">' +
|
||||
value.name +
|
||||
"</p></div>" +
|
||||
'<div class="column-2 cv-num"><p><small>CV </small>' +
|
||||
value.cv +
|
||||
"</p></div>" +
|
||||
"</div>" +
|
||||
'<div class="row sub-text">' +
|
||||
'<div class="column-3"><p>' + value.type + '</p></div>' +
|
||||
'<div class="column-3">' +
|
||||
(value.decoder == "" ? '<p class="nd">Undefined</p>' : "<p>" + value.decoder + "</p>") +
|
||||
"</div>" +
|
||||
'<div class="column-3">' +
|
||||
(value.brand == "" ? '<p class="nd">Undefined</p>' : "<p>" + value.brand + "</p>") +
|
||||
"</div></div></div>" +
|
||||
'<div class="column-2 asst-map"><div class="row">' +
|
||||
'<div class="column-7"><p class="muted">Map</p><p>' +
|
||||
value.map +
|
||||
"</p></div>" +
|
||||
'<div class="column-3 prh"><a href="#" loco-id="'+key+'" data-loco="'+
|
||||
value.name+'" class="edit-cur-loco"> ✎ </a></div></div>' +
|
||||
"</div></br>"
|
||||
);
|
||||
});
|
||||
}
|
||||
//Initialization routine for Throttle screen
|
||||
function setThrottleScreenUI() {
|
||||
loadmaps();
|
||||
loadButtons({ mname: "default", fnData: fnMasterData });
|
||||
controller = getPreference("scontroller");
|
||||
$("#throttle-selector").val(controller).trigger("change");
|
||||
setspeedControllerType(controller);
|
||||
|
||||
// Show and hide debug console based on preference set in earlier session
|
||||
if (getPreference("dbugConsole") == null) {
|
||||
setPreference("dbugConsole", true);
|
||||
}
|
||||
if(getPreference("dbugConsole")) {
|
||||
$("#debug-console").show()
|
||||
$("#console-toggle").prop("checked", true);
|
||||
}else{
|
||||
$("#debug-console").hide();
|
||||
$("#console-toggle").prop("checked", false);
|
||||
}
|
||||
|
||||
$(".dir-toggle").addClass("forward");
|
||||
|
||||
// Set theme
|
||||
if (getPreference("theme") == null) {
|
||||
setPreference("theme", "simple");
|
||||
}else{
|
||||
theme = getPreference("theme");
|
||||
$("#theme-selector").val(theme).trigger("change");
|
||||
if (theme != "simple") {
|
||||
$("link[title*='theme']").remove();
|
||||
$("head").append(
|
||||
'<link rel="stylesheet" type="text/css" title="theme" href="css/themes/'+theme+'.css">'
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Change the Speed controller type
|
||||
function setspeedControllerType(pref){
|
||||
// Set saved throttle or use circular throttle as default
|
||||
$(".speedController").hide();
|
||||
switch (pref) {
|
||||
case "vertical":
|
||||
console.log("Vertical Speed Controller");
|
||||
$("#vertical-throttle").show();
|
||||
break;
|
||||
case "knob":
|
||||
console.log("Knob Speed Controller");
|
||||
$("#knobthrottle").show();
|
||||
break;
|
||||
case "circular":
|
||||
console.log("Circular Speed Controller");
|
||||
$("#circular-throttle").show();
|
||||
break;
|
||||
case "default":
|
||||
case null:
|
||||
case undefined:
|
||||
console.log("Fallback Speed Controller");
|
||||
$("#vertical-throttle").show();
|
||||
setPreference("scontroller", "vertical");
|
||||
$("#throttle-selector").val("vertical").trigger("change");
|
||||
}
|
||||
}
|
||||
|
||||
// Enabling/disabling Speed Controllers
|
||||
function toggleThrottleState(state){
|
||||
if(state){
|
||||
$("#circular-throttle").roundSlider("enable");
|
||||
$("#v-throttle").slider("enable");
|
||||
toggleKnobState($("#knobthrottle"), true);
|
||||
}else{
|
||||
$("#circular-throttle").roundSlider("disable");
|
||||
$("#v-throttle").slider("disable");
|
||||
toggleKnobState($("#knobthrottle"), false);
|
||||
}
|
||||
}
|
||||
|
||||
/**********************************************************
|
||||
* This function will
|
||||
1. Send Speed command
|
||||
2. Set speed value of all the available sliders/controllers
|
||||
3. Set respctive speed number
|
||||
************************************************************/
|
||||
function setSpeedofControllers(){
|
||||
spd = getSpeed();
|
||||
|
||||
if(!isStopped){
|
||||
writeToStream("t 01 " + getCV() + " " + spd + " " + getDirection());
|
||||
}
|
||||
// Circular
|
||||
$("#circular-throttle").roundSlider("setValue", spd);
|
||||
|
||||
// Vertical
|
||||
$("#v-throttle").val(spd).change();
|
||||
$("#v-throttle").slider("option", "value", spd);
|
||||
$("#speed-indicator").html(spd);
|
||||
|
||||
// Knob
|
||||
$("#knob-value").html(spd);
|
||||
knob.val(spd).change();
|
||||
}
|
||||
|
||||
// This function will generate commands for each type of function
|
||||
function generateFnCommand(clickedBtn){
|
||||
|
||||
func = clickedBtn.attr('name'); // Gives function name (F1, F2, .... F28)
|
||||
eventType = clickedBtn.data("type"); // Gives type of button (Press/Hold or Toggle)
|
||||
btnPressed = clickedBtn.attr("aria-pressed");
|
||||
//console.log("Function Name=>"+func+" , Button Type=>"+eventType+" , Button Pressed=>"+btnStatus);
|
||||
|
||||
switch(func){
|
||||
case "f0":
|
||||
case "f1":
|
||||
case "f2":
|
||||
case "f3":
|
||||
case "f4":
|
||||
{
|
||||
if(btnPressed=="true"){
|
||||
sendCommandForF0ToF4(func,1);
|
||||
}else{
|
||||
sendCommandForF0ToF4(func,0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "f5":
|
||||
case "f6":
|
||||
case "f7":
|
||||
case "f8":
|
||||
{
|
||||
if(btnPressed=="true"){
|
||||
sendCommandForF5ToF8(func,1);
|
||||
}else{
|
||||
sendCommandForF5ToF8(func,0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "f9":
|
||||
case "f10":
|
||||
case "f11":
|
||||
case "f12":
|
||||
{
|
||||
if(btnPressed=="true"){
|
||||
sendCommandForF9ToF12(func,1);
|
||||
}else{
|
||||
sendCommandForF9ToF12(func,0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "f13":
|
||||
case "f14":
|
||||
case "f15":
|
||||
case "f16":
|
||||
case "f17":
|
||||
case "f18":
|
||||
case "f19":
|
||||
case "f20":
|
||||
{
|
||||
if(btnPressed=="true"){
|
||||
sendCommandForF13ToF20(func,1);
|
||||
}else{
|
||||
sendCommandForF13ToF20(func,0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "f21":
|
||||
case "f22":
|
||||
case "f23":
|
||||
case "f24":
|
||||
case "f25":
|
||||
case "f26":
|
||||
case "f27":
|
||||
case "f28":
|
||||
{
|
||||
if(btnPressed=="true"){
|
||||
sendCommandForF21ToF28(func,1);
|
||||
}else{
|
||||
sendCommandForF21ToF28(func,0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
alert("Invalid Function");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
var mode = 0;
|
||||
// Left Menu
|
||||
$("#nav-open").on("click", function () {
|
||||
$("#side-menu").show().animate({ left: 0 });
|
||||
});
|
||||
$("#nav-close").on("click", function () {
|
||||
$("#side-menu").animate({ left: -260 }, function(){
|
||||
$("#side-menu").hide();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
$("#info-tooltip").tooltip({
|
||||
content:
|
||||
"<p>DCC++ EX Web Throttle<br>(WebThrottle-EX)</p><hr><p>Version: "+version+"</p><p><b>Credits</b><br> Fred Decker <br> Mani Kumar <br> Matt H</p>",
|
||||
show: {
|
||||
effect: "slideDown",
|
||||
delay: 100,
|
||||
},
|
||||
classes: {
|
||||
"ui-tooltip": "credits-tooltip",
|
||||
},
|
||||
position: {
|
||||
my: "left top",
|
||||
at: "left bottom",
|
||||
},
|
||||
});
|
||||
|
||||
// Load function map, buttons throttle etc
|
||||
setThrottleScreenUI();
|
||||
$("#throttle-selector").on("change", function (e) {
|
||||
selectedval = $(this).val();
|
||||
console.log(selectedval);
|
||||
setPreference("scontroller", selectedval);
|
||||
setspeedControllerType(selectedval);
|
||||
});
|
||||
|
||||
$("#theme-selector").on("change", function (e) {
|
||||
selectedval = $(this).val();
|
||||
console.log(selectedval);
|
||||
setPreference("theme", selectedval);
|
||||
$("link[title*='theme']").remove();
|
||||
if (selectedval != "simple") {
|
||||
$("head").append(
|
||||
'<link rel="stylesheet" type="text/css" title="theme" href="css/themes/' +
|
||||
selectedval +
|
||||
'.css">'
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
// Connect command station
|
||||
$("#button-connect").on("click", function () {
|
||||
toggleServer($(this));
|
||||
});
|
||||
|
||||
// Disconnect command station
|
||||
$("#button-disconnect").on("click", function () {
|
||||
disconnectServer();
|
||||
});
|
||||
|
||||
// Aquire loco of given CV
|
||||
$("#button-getloco").on("click", function () {
|
||||
acButton = $(this);
|
||||
isAcquired = $(this).data("acquired");
|
||||
// Parse int only returns number if the string is starting with Number
|
||||
locoid_input = parseInt($("#ex-locoid").val());
|
||||
|
||||
if (locoid_input != 0) {
|
||||
if (isAcquired == false && getCV() == 0) {
|
||||
setCV(locoid_input);
|
||||
$("#loco-info").html("Acquired Locomotive: " + locoid_input);
|
||||
acButton.data("acquired", true);
|
||||
acButton.html('<span class="icon-cross"></span>');
|
||||
toggleThrottleState(true);
|
||||
} else {
|
||||
currentCV = getCV();
|
||||
$("#ex-locoid").val(0);
|
||||
setCV(0);
|
||||
$("#loco-info").html("Released Locomotive: " + currentCV);
|
||||
acButton.data("acquired", false);
|
||||
acButton.html('<span class="icon-circle-right"></span>');
|
||||
toggleThrottleState(false);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Switch ON/OFF power of the Command station
|
||||
$("#power-switch").on("click", function () {
|
||||
pb = $(this).is(":checked");
|
||||
|
||||
if (pb == true) {
|
||||
writeToStream("1");
|
||||
$("#power-status").html("On");
|
||||
} else {
|
||||
writeToStream("0");
|
||||
$("#power-status").html("Off");
|
||||
}
|
||||
});
|
||||
////////////////////////////////////
|
||||
$("#v-throttle").slider({
|
||||
orientation: "vertical",
|
||||
min: 0,
|
||||
max: 126,
|
||||
disabled: true,
|
||||
range: "max",
|
||||
slide: function (event, ui) {
|
||||
$("#speed-indicator").html(ui.value);
|
||||
setSpeed(ui.value);
|
||||
setSpeedofControllers();
|
||||
},
|
||||
});
|
||||
|
||||
/////////////////////////////////////////*/
|
||||
knob = $(".rotarySwitch").rotaryswitch({
|
||||
minimum: 0,
|
||||
maximum: 126,
|
||||
step: 2,
|
||||
beginDeg: 210,
|
||||
lengthDeg: 295,
|
||||
minimumOverMaximum: true,
|
||||
showMarks: true,
|
||||
themeClass: "big light",
|
||||
});
|
||||
toggleKnobState($("#knobthrottle"), false);
|
||||
knob.on("change", function () {
|
||||
oldValue = getSpeed();
|
||||
kval = knob.val();
|
||||
$("#knob-value").html(kval);
|
||||
setSpeed(kval);
|
||||
// Below condition is to avoid infinite loop
|
||||
// that triggers change() event indifinitely
|
||||
if (oldValue != kval) {
|
||||
setSpeedofControllers();
|
||||
} else {
|
||||
writeToStream(
|
||||
"t 01 " + getCV() + " " + getSpeed() + " " + getDirection()
|
||||
);
|
||||
}
|
||||
//console.log( "t 01 " + getCV() + " " + getSpeed() + " " + getDirection());
|
||||
});
|
||||
|
||||
/////////////////////////////////////////////
|
||||
// Speed (round) Slider allows user to change the speed of the locomotive
|
||||
Tht = $("#circular-throttle").roundSlider({
|
||||
width: 20,
|
||||
radius: 116,
|
||||
value: speed,
|
||||
circleShape: "pie",
|
||||
handleShape: "dot",
|
||||
startAngle: 315,
|
||||
lineCap: "round",
|
||||
sliderType: "min-range",
|
||||
showTooltip: true,
|
||||
editableTooltip: false,
|
||||
handleSize: "+18",
|
||||
max: "126",
|
||||
disabled: true,
|
||||
update: function (slider) {
|
||||
setSpeed(slider.value);
|
||||
setSpeedofControllers();
|
||||
//console.log("t 01 "+getCV()+" "+getSpeed()+" "+getDirection());
|
||||
},
|
||||
valueChange: function (slider) {
|
||||
//setSpeed(slider.value);
|
||||
//writeToStream("t 01 "+getCV()+" "+getSpeed()+" "+getDirection());
|
||||
// console.log("This event is similar to 'update' event, in addition it will trigger even the value was changed through programmatically also.");
|
||||
},
|
||||
});
|
||||
|
||||
// Allows user to change the direction of the loco and STOP.
|
||||
$(".dir-btn").on("click", function () {
|
||||
if (getCV() != 0){
|
||||
current = $(this);
|
||||
dir = current.attr("aria-label");
|
||||
$(".dir-btn").removeClass("selected");
|
||||
current.addClass("selected", 200);
|
||||
console.log(dir);
|
||||
$(".dir-toggle").removeClass("forward backward stop");
|
||||
$(".dir-toggle").addClass(dir);
|
||||
// Do direction stuff here
|
||||
switch (dir) {
|
||||
case "forward": {
|
||||
isStopped = false;
|
||||
setDirection(1);
|
||||
setSpeedofControllers();
|
||||
writeToStream("t 01 " + getCV() + " " + getSpeed() + " 1");
|
||||
break;
|
||||
}
|
||||
case "backward": {
|
||||
isStopped = false;
|
||||
setDirection(0);
|
||||
setSpeedofControllers();
|
||||
writeToStream("t 01 " + getCV() + " " + getSpeed() + " 0");
|
||||
break;
|
||||
}
|
||||
case "stop": {
|
||||
isStopped = true;
|
||||
dir = getDirection();
|
||||
setSpeed(0);
|
||||
setSpeedofControllers();
|
||||
writeToStream("t 01 " + getCV() + " 0 " + dir);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
console.log("No loco acquired");
|
||||
}
|
||||
});
|
||||
|
||||
$("#emergency-stop").on("click", function () {
|
||||
if (getCV() != 0){
|
||||
isStopped = true;
|
||||
dir = getDirection();
|
||||
setSpeed(0);
|
||||
setSpeedofControllers();
|
||||
writeToStream("t 01 " + getCV() + " -1 " + dir);
|
||||
}
|
||||
else{
|
||||
console.log("No loco acquired");
|
||||
}
|
||||
});
|
||||
|
||||
// Hide/Show the Loco, Connect server fields (on top)
|
||||
$("#button-hide").on("click", function () {
|
||||
if ($(".details-panel").is(":visible")) {
|
||||
$(".details-panel").hide();
|
||||
$(this).css("top", 0);
|
||||
$(this).html('<span class="icon-circle-down"></span>');
|
||||
} else {
|
||||
$(".details-panel").show();
|
||||
$(this).html('<span class="icon-circle-up"></span>');
|
||||
$(this).css("top", "-9px");
|
||||
}
|
||||
});
|
||||
|
||||
// PLUS button. Increases speed on Hold / Tap
|
||||
var tId = 0;
|
||||
$("#button-right")
|
||||
.on("mousedown", function () {
|
||||
event.stopImmediatePropagation();
|
||||
tId = setInterval(function () {
|
||||
var sp = getSpeed();
|
||||
if (sp <= 125 && getDirection() != -1 && getCV() != 0) {
|
||||
setSpeed(sp + speedStep);
|
||||
setSpeedofControllers();
|
||||
writeToStream(
|
||||
"t 01 " + getCV() + " " + getSpeed() + " " + getDirection()
|
||||
);
|
||||
sp = 0;
|
||||
}
|
||||
}, 100);
|
||||
})
|
||||
.on("mouseup mouseleave", function () {
|
||||
clearInterval(tId);
|
||||
})
|
||||
.on("click", function () {
|
||||
event.stopImmediatePropagation();
|
||||
var sp = getSpeed();
|
||||
if (sp <= 125 && getDirection() != -1 && getCV() != 0) {
|
||||
setSpeed(sp + speedStep);
|
||||
setSpeedofControllers();
|
||||
writeToStream(
|
||||
"t 01 " + getCV() + " " + getSpeed() + " " + getDirection()
|
||||
);
|
||||
sp = 0;
|
||||
}
|
||||
});
|
||||
|
||||
// MINUS button. Decreases speed on Hold / Tap
|
||||
var tId = 0;
|
||||
$("#button-left")
|
||||
.on("mousedown", function () {
|
||||
event.stopImmediatePropagation();
|
||||
tId = setInterval(function () {
|
||||
var sp = getSpeed(sp);
|
||||
if (sp >= 1 && getDirection() != -1 && getCV() != 0) {
|
||||
setSpeed(sp - speedStep);
|
||||
setSpeedofControllers();
|
||||
writeToStream(
|
||||
"t 01 " + getCV() + " " + getSpeed() + " " + getDirection()
|
||||
);
|
||||
sp = 0;
|
||||
}
|
||||
}, 100);
|
||||
})
|
||||
.on("mouseup mouseleave", function () {
|
||||
clearInterval(tId);
|
||||
})
|
||||
.on("click", function () {
|
||||
event.stopImmediatePropagation();
|
||||
var sp = getSpeed(sp);
|
||||
if (sp >= 1 && getDirection() != -1 && getCV() != 0) {
|
||||
setSpeed(sp - speedStep);
|
||||
setSpeedofControllers();
|
||||
writeToStream(
|
||||
"t 01 " + getCV() + " " + getSpeed() + " " + getDirection()
|
||||
);
|
||||
sp = 0;
|
||||
}
|
||||
});
|
||||
|
||||
// Functions buttons
|
||||
// Send Instructions to generate command depends the type of Button (press/toggle)
|
||||
var timer = 0;
|
||||
$(document)
|
||||
.on("mousedown", ".fn-btn", function () {
|
||||
console.log($(this).val);
|
||||
clickedBtn = $(this);
|
||||
btnType = clickedBtn.data("type");
|
||||
if (btnType == "press") {
|
||||
timer = setInterval(function () {
|
||||
// MOMENTARY HOLD ON
|
||||
clickedBtn.attr("aria-pressed", "true");
|
||||
generateFnCommand(clickedBtn);
|
||||
console.log("PRESSED HOLD ==> " + clickedBtn.attr("name"));
|
||||
}, 100);
|
||||
}
|
||||
})
|
||||
.on("mouseup mouserelease", ".fn-btn", function () {
|
||||
clearInterval(timer);
|
||||
clickedBtn = $(this);
|
||||
btnType = clickedBtn.data("type");
|
||||
btnState = clickedBtn.attr("aria-pressed");
|
||||
if (btnType == "press") {
|
||||
// MOMENTARY HOLD OFF
|
||||
clickedBtn.attr("aria-pressed", "false");
|
||||
generateFnCommand(clickedBtn);
|
||||
console.log("RELEASED HOLD ==> " + clickedBtn.attr("name"));
|
||||
} else {
|
||||
if (btnState == "false") {
|
||||
// TOGGLE ON
|
||||
clickedBtn.attr("aria-pressed", "true");
|
||||
generateFnCommand(clickedBtn);
|
||||
console.log("TOGGLE ON ==> " + clickedBtn.attr("name"));
|
||||
} else {
|
||||
// TOGGLE OFF
|
||||
clickedBtn.attr("aria-pressed", "false");
|
||||
generateFnCommand(clickedBtn);
|
||||
console.log("TOGGLE OFF ==> " + clickedBtn.attr("name"));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Hide/Show the Debug console
|
||||
$("#console-toggle").on("click", function () {
|
||||
pb = $(this).is(":checked");
|
||||
if (pb == true) {
|
||||
$("#debug-console").show();
|
||||
setPreference("dbugConsole", true);
|
||||
} else {
|
||||
$("#debug-console").hide();
|
||||
setPreference("dbugConsole", false);
|
||||
}
|
||||
});
|
||||
|
||||
// Send command written in console
|
||||
$("#button-sendCmd").on("click", function () {
|
||||
cmd = $("#cmd-direct").val();
|
||||
writeToStream(cmd);
|
||||
document.getElementById("cmd-direct").value = "";
|
||||
});
|
||||
|
||||
// Clear the console log window
|
||||
$("#button-clearLog").on("click", function () {
|
||||
$("#log-box").html("");
|
||||
});
|
||||
|
||||
// Function to toggle fullScreen viceversa
|
||||
$("#fs-toggle").on("click", function () {
|
||||
st = $(this).attr("state");
|
||||
var elem = document.documentElement;
|
||||
if (st == "ws") {
|
||||
$(this).attr("state", "fs");
|
||||
|
||||
if (elem.requestFullscreen) {
|
||||
elem.requestFullscreen();
|
||||
} else if (elem.mozRequestFullScreen) {
|
||||
/* Firefox */
|
||||
elem.mozRequestFullScreen();
|
||||
} else if (elem.webkitRequestFullscreen) {
|
||||
/* Chrome, Safari and Opera */
|
||||
elem.webkitRequestFullscreen();
|
||||
} else if (elem.msRequestFullscreen) {
|
||||
/* IE/Edge */
|
||||
elem.msRequestFullscreen();
|
||||
}
|
||||
} else {
|
||||
$(this).attr("state", "ws");
|
||||
if (document.exitFullscreen) {
|
||||
document.exitFullscreen();
|
||||
} else if (document.mozCancelFullScreen) {
|
||||
/* Firefox */
|
||||
document.mozCancelFullScreen();
|
||||
} else if (document.webkitExitFullscreen) {
|
||||
/* Chrome, Safari and Opera */
|
||||
document.webkitExitFullscreen();
|
||||
} else if (document.msExitFullscreen) {
|
||||
/* IE/Edge */
|
||||
document.msExitFullscreen();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//Handles navigation clicks
|
||||
$("#throttle-nav").on("click", function () {
|
||||
hideWindows();
|
||||
$("#throttle-window").show();
|
||||
$("#nav-close").trigger("click");
|
||||
});
|
||||
$("#loco-nav").on("click", function () {
|
||||
hideWindows();
|
||||
$("#loco-window").show();
|
||||
$("#nav-close").trigger("click");
|
||||
loadLocomotives();
|
||||
});
|
||||
$("#fn-map-nav").on("click", function () {
|
||||
hideWindows();
|
||||
$("#fn-map-window").show();
|
||||
$("#nav-close").trigger("click");
|
||||
setFunctionMaps();
|
||||
//loadMapData("Default");
|
||||
});
|
||||
$("#settings-nav").on("click", function () {
|
||||
hideWindows();
|
||||
$("#settings-window").show();
|
||||
$("#nav-close").trigger("click");
|
||||
});
|
||||
|
||||
eventListeners();
|
||||
|
||||
/*
|
||||
$("#settings-general").on('click', function(){
|
||||
hideSettings();
|
||||
$("#general-section").show();
|
||||
});
|
||||
|
||||
$("#settings-storage").on('click', function(){
|
||||
hideSettings();
|
||||
$("#storage-section").show();
|
||||
});*/
|
||||
|
||||
$("#settings-general").on("click", function () {
|
||||
/*var target = $('#general-section');
|
||||
if (target.length) {
|
||||
$('#settings-panel').animate({
|
||||
scrollTop: target.offset().top
|
||||
}, 1000);
|
||||
|
||||
}*/
|
||||
$("#general-section")[0].scrollIntoView(true);
|
||||
});
|
||||
|
||||
$("#settings-storage").on("click", function () {
|
||||
/*var target = $('#storage-section');
|
||||
if (target.length) {
|
||||
$('#settings-panel').animate({
|
||||
scrollTop: target.offset().top
|
||||
}, 1000);
|
||||
|
||||
}*/
|
||||
$("#storage-section")[0].scrollIntoView(true);
|
||||
});
|
||||
|
||||
$('#settings-app').on('click', function() {
|
||||
$("#app-section")[0].scrollIntoView(true);
|
||||
})
|
||||
|
||||
$(document).on("click", ".map-name", function () {
|
||||
loadMapData($(this).attr("map-val"));
|
||||
$("li.map-name").removeClass("active");
|
||||
$(this).addClass("active");
|
||||
});
|
||||
|
||||
// This allows user to delete currently selected Map
|
||||
$(document).on("click", "#delete-map", function () {
|
||||
selectedval = $("#cur-map-val").attr("cur-map");
|
||||
if (selectedval != "Default") {
|
||||
deleteFuncData(selectedval);
|
||||
loadmaps();
|
||||
setFunctionMaps();
|
||||
loadMapData("Default");
|
||||
$("#select-map").val("default").trigger("change");
|
||||
$("li.map-name").removeClass("active");
|
||||
$("li.map-name[map-val= 'Default']").addClass("active");
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on("click", ".edit-cur-loco", function () {
|
||||
cabdata = getStoredLocoData($(this).attr("data-loco"));
|
||||
$("#loco-form")[0].reset();
|
||||
$("#loco-form-content").css("display", "inline-block");
|
||||
$(".add-loco-form .add-loco-head").html("Edit Locomotive");
|
||||
$("#loco-submit").attr("loco-mode", "edit");
|
||||
$("#loco-submit").attr("loco-id", $(this).attr("loco-id"));
|
||||
$.each(cabdata, function (key, value) {
|
||||
$("#loco-form").children().find("#"+key).val(value);
|
||||
if(key=="map"){
|
||||
$("#function-maps").autocomplete("search", value);
|
||||
var menu = $("#function-maps").autocomplete("widget");
|
||||
$(menu[0].children[0]).click();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function setFunctionMaps() {
|
||||
const defaultMap = {
|
||||
mname: "Default",
|
||||
fnData: {},
|
||||
}
|
||||
const maps = [defaultMap, ...getMapData()];
|
||||
|
||||
$("#function-mappings").empty();
|
||||
maps.forEach(map => {
|
||||
const name = map.mname
|
||||
$("#function-mappings").append(`<li class='map-name' map-val=${name}>${name}</li>`);
|
||||
})
|
||||
}
|
||||
|
||||
function hideWindows(){
|
||||
$("#throttle-window").hide();
|
||||
$("#loco-window").hide();
|
||||
$("#fn-map-window").hide();
|
||||
$("#settings-window").hide();
|
||||
}
|
||||
|
||||
function hideSettings(){
|
||||
$("#general-section").hide();
|
||||
$("#storage-section").hide();
|
||||
}
|
||||
|
||||
function credits() {
|
||||
authors = ["Fred Decker","Mani Kumar","Matt"]
|
||||
displayLog("Credits:")
|
||||
console.log("Credits:")
|
||||
for (i=0; i<authors.length; i++) {
|
||||
displayLog(authors[i])
|
||||
console.log(authors[i])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function eventListeners(){
|
||||
var cmdDirect = document.getElementById("cmd-direct");
|
||||
var exLocoID = document.getElementById("ex-locoid");
|
||||
cmdDirect.addEventListener("keyup", function(event) {
|
||||
if (event.key === "Enter") {
|
||||
event.preventDefault();
|
||||
// Trigger the button element with a click
|
||||
$('#button-sendCmd').click();
|
||||
}
|
||||
});
|
||||
exLocoID.addEventListener("keyup", function(event) {
|
||||
if (event.key === "Enter") {
|
||||
event.preventDefault();
|
||||
// Trigger the button element with a click
|
||||
$('#button-getloco').click();
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
// This is default function definition
|
||||
// New functions are based on this
|
||||
// If no Map is loaded this will load ad default
|
||||
var fnMasterData = {
|
||||
"f0": [0, 0, "Head Light", 1], // Index => 0=state, 1=type (0-Toggle, 1-press),
|
||||
"f1": [0, 1, "Bell" , 1], // 2=Label, 3= Available
|
||||
"f2": [0, 1, "Horn", 1],
|
||||
"f3": [0, 0, "F3" , 1],
|
||||
"f4": [0, 0, "F4", 1],
|
||||
"f5": [0, 0, "F5", 1],
|
||||
"f6": [0, 0, "F6", 1],
|
||||
"f7": [0, 0, "F7", 1],
|
||||
"f8": [0, 0, "F8", 1],
|
||||
"f9": [0, 0, "F9", 1],
|
||||
"f10": [0, 0, "F10", 1],
|
||||
"f11": [0, 0, "F11", 1],
|
||||
"f12": [0, 0, "F12", 1],
|
||||
"f13": [0, 0, "F13", 1],
|
||||
"f14": [0, 0, "F14", 1],
|
||||
"f15": [0, 0, "F15", 1],
|
||||
"f16": [0, 0, "F16", 1],
|
||||
"f17": [0, 0, "F17", 1],
|
||||
"f18": [0, 0, "F18", 1],
|
||||
"f19": [0, 0, "F19", 1],
|
||||
"f20": [0, 0, "F20", 1],
|
||||
"f21": [0, 0, "F21", 1],
|
||||
"f22": [0, 0, "F22", 1],
|
||||
"f23": [0, 0, "F23", 1],
|
||||
"f24": [0, 0, "F24", 1],
|
||||
"f25": [0, 0, "F25", 1],
|
||||
"f26": [0, 0, "F26", 1],
|
||||
"f27": [0, 0, "F27", 1],
|
||||
"f28": [0, 0, "F28", 1],
|
||||
};
|
||||
@@ -0,0 +1,4 @@
|
||||
/*! jQuery v3.2.1 | (c) JS Foundation and other contributors | jquery.org/license */
|
||||
!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.2.1",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null==a?f.call(this):a<0?this[a+this.length]:this[a]},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){return r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c<b?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:h,sort:c.sort,splice:c.splice},r.extend=r.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||r.isFunction(g)||(g={}),h===i&&(g=this,h--);h<i;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(r.isPlainObject(d)||(e=Array.isArray(d)))?(e?(e=!1,f=c&&Array.isArray(c)?c:[]):f=c&&r.isPlainObject(c)?c:{},g[b]=r.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},r.extend({expando:"jQuery"+(q+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===r.type(a)},isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=r.type(a);return("number"===b||"string"===b)&&!isNaN(a-parseFloat(a))},isPlainObject:function(a){var b,c;return!(!a||"[object Object]"!==k.call(a))&&(!(b=e(a))||(c=l.call(b,"constructor")&&b.constructor,"function"==typeof c&&m.call(c)===n))},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?j[k.call(a)]||"object":typeof a},globalEval:function(a){p(a)},camelCase:function(a){return a.replace(t,"ms-").replace(u,v)},each:function(a,b){var c,d=0;if(w(a)){for(c=a.length;d<c;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(s,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(w(Object(a))?r.merge(c,"string"==typeof a?[a]:a):h.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:i.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;d<c;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;f<g;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,f=0,h=[];if(w(a))for(d=a.length;f<d;f++)e=b(a[f],f,c),null!=e&&h.push(e);else for(f in a)e=b(a[f],f,c),null!=e&&h.push(e);return g.apply([],h)},guid:1,proxy:function(a,b){var c,d,e;if("string"==typeof b&&(c=a[b],b=a,a=c),r.isFunction(a))return d=f.call(arguments,2),e=function(){return a.apply(b||this,d.concat(f.call(arguments)))},e.guid=a.guid=a.guid||r.guid++,e},now:Date.now,support:o}),"function"==typeof Symbol&&(r.fn[Symbol.iterator]=c[Symbol.iterator]),r.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){j["[object "+b+"]"]=b.toLowerCase()});function w(a){var b=!!a&&"length"in a&&a.length,c=r.type(a);return"function"!==c&&!r.isWindow(a)&&("array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a)}var x=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",M="\\["+K+"*("+L+")(?:"+K+"*([*^$|!~]?=)"+K+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+L+"))|)"+K+"*\\]",N=":("+L+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+M+")*)|.*)\\)|)",O=new RegExp(K+"+","g"),P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={IDLine truncated
|
||||
a.removeEventListener("load",S),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",S),a.addEventListener("load",S));var T=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===r.type(c)){e=!0;for(h in c)T(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,r.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(r(a),c)})),b))for(;h<i;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},U=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function V(){this.expando=r.expando+V.uid++}V.uid=1,V.prototype={cache:function(a){var b=a[this.expando];return b||(b={},U(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[r.camelCase(b)]=c;else for(d in b)e[r.camelCase(d)]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][r.camelCase(b)]},access:function(a,b,c){return void 0===b||b&&"string"==typeof b&&void 0===c?this.get(a,b):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d=a[this.expando];if(void 0!==d){if(void 0!==b){Array.isArray(b)?b=b.map(r.camelCase):(b=r.camelCase(b),b=b in d?[b]:b.match(L)||[]),c=b.length;while(c--)delete d[b[c]]}(void 0===b||r.isEmptyObject(d))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!r.isEmptyObject(b)}};var W=new V,X=new V,Y=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Z=/[A-Z]/g;function $(a){return"true"===a||"false"!==a&&("null"===a?null:a===+a+""?+a:Y.test(a)?JSON.parse(a):a)}function _(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Z,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c=$(c)}catch(e){}X.set(a,b,c)}else c=void 0;return c}r.extend({hasData:function(a){return X.hasData(a)||W.hasData(a)},data:function(a,b,c){return X.access(a,b,c)},removeData:function(a,b){X.remove(a,b)},_data:function(a,b,c){return W.access(a,b,c)},_removeData:function(a,b){W.remove(a,b)}}),r.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=X.get(f),1===f.nodeType&&!W.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=r.camelCase(d.slice(5)),_(f,d,e[d])));W.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){X.set(this,a)}):T(this,function(b){var c;if(f&&void 0===b){if(c=X.get(f,a),void 0!==c)return c;if(c=_(f,a),void 0!==c)return c}else this.each(function(){X.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){X.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=W.get(a,b),c&&(!d||Array.isArray(c)?d=W.access(a,b,r.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return W.get(a,c)||W.access(a,c,{empty:r.Callbacks("once memory").add(function(){W.remove(a,[b+"queue",c])})})}}),r.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?r.queue(this[0],a):void 0===b?this:this.each(function(){var c=r.queue(this,a,b);r._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&r.dequeue(this,a)})},dequeue:function(a){return this.each(function(){r.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=r.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=W.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var aa=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ba=new RegExp("^(?:([+-])=|)("+aa+")([a-z%]*)$","i"),ca=["Top","Right","Bottom","Left"],da=function(a,b){return a=b||a,"none"===a.style.display||""===a.style.display&&r.contains(a.ownerDocument,a)&&"none"===r.css(a,"display")},ea=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};function fa(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return r.css(a,b,"")},i=h(),j=c&&c[3]||(r.cssNumber[b]?"":"px"),k=(r.cssNumber[b]||"px"!==j&&+i)&&ba.exec(r.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,r.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var ga={};function ha(a){var b,c=a.ownerDocument,d=a.nodeName,e=ga[d];return e?e:(b=c.body.appendChild(c.createElement(d)),e=r.css(b,"display"),b.parentNode.removeChild(b),"none"===e&&(e=Line truncated
|
||||
null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!o.radioValue&&"radio"===b&&B(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d=0,e=b&&b.match(L);if(e&&1===a.nodeType)while(c=e[d++])a.removeAttribute(c)}}),lb={set:function(a,b,c){return b===!1?r.removeAttr(a,c):a.setAttribute(c,c),c}},r.each(r.expr.match.bool.source.match(/\w+/g),function(a,b){var c=mb[b]||r.find.attr;mb[b]=function(a,b,d){var e,f,g=b.toLowerCase();return d||(f=mb[g],mb[g]=e,e=null!=c(a,b,d)?g:null,mb[g]=f),e}});var nb=/^(?:input|select|textarea|button)$/i,ob=/^(?:a|area)$/i;r.fn.extend({prop:function(a,b){return T(this,r.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[r.propFix[a]||a]})}}),r.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&r.isXMLDoc(a)||(b=r.propFix[b]||b,e=r.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=r.find.attr(a,"tabindex");return b?parseInt(b,10):nb.test(a.nodeName)||ob.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),o.optSelected||(r.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),r.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){r.propFix[this.toLowerCase()]=this});function pb(a){var b=a.match(L)||[];return b.join(" ")}function qb(a){return a.getAttribute&&a.getAttribute("class")||""}r.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).addClass(a.call(this,b,qb(this)))});if("string"==typeof a&&a){b=a.match(L)||[];while(c=this[i++])if(e=qb(c),d=1===c.nodeType&&" "+pb(e)+" "){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=pb(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).removeClass(a.call(this,b,qb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(L)||[];while(c=this[i++])if(e=qb(c),d=1===c.nodeType&&" "+pb(e)+" "){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=pb(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):r.isFunction(a)?this.each(function(c){r(this).toggleClass(a.call(this,c,qb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=r(this),f=a.match(L)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=qb(this),b&&W.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":W.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+pb(qb(c))+" ").indexOf(b)>-1)return!0;return!1}});var rb=/\r/g;r.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=r.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,r(this).val()):a,null==e?e="":"number"==typeof e?e+="":Array.isArray(e)&&(e=r.map(e,function(a){return null==a?"":a+""})),b=r.valHooks[this.type]||r.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=r.valHooks[e.type]||r.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(rb,""):null==c?"":c)}}}),r.extend({valHooks:{option:{get:function(a){var b=r.find.attr(a,"value");return null!=b?b:pb(r.text(a))}},select:{get:function(a){var b,c,d,e=a.options,f=a.selectedIndex,g="select-one"===a.type,h=g?null:[],i=g?f+1:e.length;for(d=f<0?i:g?f:0;d<i;d++)if(c=e[d],(c.selected||d===f)&&!c.disabled&&(!c.parentNode.disabled||!B(c.parentNode,"optgroup"))){if(b=r(c).val(),g)return b;h.push(b)}return h},set:function(a,b){var c,d,e=a.options,f=r.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=r.inArray(r.valHooks.option.get(d),f)>-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),r.each(["radio","checkbox"],function(){r.valHooks[this]={set:function(a,b){if(Array.isArray(b))return a.checked=r.inArray(r(a).val(),b)>-1}},o.checkOn||(r.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var sb=/^(?:focusinfocus|focusoutblur)$/;r.extend(r.event,{trigger:function(b,c,e,f){var g,h,i,j,k,m,n,o=[e||d],p=l.call(b,"type")?b.type:b,q=l.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!sb.test(p+r.event.triggered)&&(p.indexOf(".")>-1&&(q=p.split("."),p=q.shift(),q.sort()),k=p.indexOf(":")<0&&"on"+p,b=b[r.expando]?bLine truncated
|
||||
@@ -0,0 +1,13 @@
|
||||
/*! jQuery UI - v1.12.1 - 2016-09-14
|
||||
* http://jqueryui.com
|
||||
* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js
|
||||
* Copyright jQuery Foundation and other contributors; Licensed MIT */
|
||||
|
||||
(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)})(function(t){function e(t){for(var e=t.css("visibility");"inherit"===e;)t=t.parent(),e=t.css("visibility");return"hidden"!==e}function i(t){for(var e,i;t.length&&t[0]!==document;){if(e=t.css("position"),("absolute"===e||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}function s(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=n(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function n(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",i,function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",i,o)}function o(){t.datepicker._isDisabledDatepicker(m.inline?m.dpDiv.parent()[0]:m.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))}function a(e,i){t.extend(e,i);for(var s in i)null==i[s]&&(e[s]=i[s]);return e}function r(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.ui=t.ui||{},t.ui.version="1.12.1";var h=0,l=Array.prototype.slice;t.cleanData=function(e){return function(i){var s,n,o;for(o=0;null!=(n=i[o]);o++)try{s=t._data(n,"events"),s&&s.remove&&t(n).triggerHandler("remove")}catch(a){}e(i)}}(t.cleanData),t.widget=function(e,i,s){var n,o,a,r={},h=e.split(".")[0];e=e.split(".")[1];var l=h+"-"+e;return s||(s=i,i=t.Widget),t.isArray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr[":"][l.toLowerCase()]=function(e){return!!t.data(e,l)},t[h]=t[h]||{},n=t[h][e],o=t[h][e]=function(t,e){return this._createWidget?(arguments.length&&this._createWidget(t,e),void 0):new o(t,e)},t.extend(o,n,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(s,function(e,s){return t.isFunction(s)?(r[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=n,e=s.apply(this,arguments),this._super=i,this._superApply=o,e}}(),void 0):(r[e]=s,void 0)}),o.prototype=t.widget.extend(a,{widgetEventPrefix:n?a.widgetEventPrefix||e:e},r,{constructor:o,namespace:h,widgetName:e,widgetFullName:l}),n?(t.each(n._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete n._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var i,s,n=l.call(arguments,1),o=0,a=n.length;a>Line truncated
|
||||
}}(t.fn.show),hide:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="hide",this.effect.call(this,n)}}(t.fn.hide),toggle:function(t){return function(s){if(i(s)||"boolean"==typeof s)return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s},cssClip:function(t){return t?this.css("clip","rect("+t.top+"px "+t.right+"px "+t.bottom+"px "+t.left+"px)"):s(this.css("clip"),this)},transfer:function(e,i){var s=t(this),n=t(e.to),o="fixed"===n.css("position"),a=t("body"),r=o?a.scrollTop():0,h=o?a.scrollLeft():0,l=n.offset(),c={top:l.top-r,left:l.left-h,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(e.className).css({top:u.top-r,left:u.left-h,height:s.innerHeight(),width:s.innerWidth(),position:o?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),t.isFunction(i)&&i()})}}),t.fx.step.clip=function(e){e.clipInit||(e.start=t(e.elem).cssClip(),"string"==typeof e.end&&(e.end=s(e.end,e.elem)),e.clipInit=!0),t(e.elem).cssClip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})}}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}();var f=t.effects;t.effects.define("blind","hide",function(e,i){var s={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},n=t(this),o=e.direction||"up",a=n.cssClip(),r={clip:t.extend({},a)},h=t.effects.createPlaceholder(n);r.clip[s[o][0]]=r.clip[s[o][1]],"show"===e.mode&&(n.cssClip(r.clip),h&&h.css(t.effects.clipToBox(r)),r.clip=a),h&&h.animate(t.effects.clipToBox(r),e.duration,e.easing),n.animate(r,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("bounce",function(e,i){var s,n,o,a=t(this),r=e.mode,h="hide"===r,l="show"===r,c=e.direction||"up",u=e.distance,d=e.times||5,p=2*d+(l||h?1:0),f=e.duration/p,g=e.easing,m="up"===c||"down"===c?"top":"left",_="up"===c||"left"===c,v=0,b=a.queue().length;for(t.effects.createPlaceholder(a),o=a.css(m),u||(u=a["top"===m?"outerHeight":"outerWidth"]()/3),l&&(n={opacity:1},n[m]=o,a.css("opacity",0).css(m,_?2*-u:2*u).animate(n,f,g)),h&&(u/=Math.pow(2,d-1)),n={},n[m]=o;d>v;v++)s={},s[m]=(_?"-=":"+=")+u,a.animate(s,f,g).animate(n,f,g),u=h?2*u:u/2;h&&(s={opacity:0},s[m]=(_?"-=":"+=")+u,a.animate(s,f,g)),a.queue(i),t.effects.unshift(a,b,p+1)}),t.effects.define("clip","hide",function(e,i){var s,n={},o=t(this),a=e.direction||"vertical",r="both"===a,h=r||"horizontal"===a,l=r||"vertical"===a;s=o.cssClip(),n.clip={top:l?(s.bottom-s.top)/2:s.top,right:h?(s.right-s.left)/2:s.right,bottom:l?(s.bottom-s.top)/2:s.bottom,left:h?(s.right-s.left)/2:s.left},t.effects.createPlaceholder(o),"show"===e.mode&&(o.cssClip(n.clip),n.clip=s),o.animate(n,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("drop","hide",function(e,i){var s,n=t(this),o=e.mode,a="show"===o,r=e.direction||"left",h="up"===r||"down"===r?"top":"left",l="up"===r||"left"===r?"-=":"+=",c="+="===l?"-=":"+=",u={opacity:0};t.effects.createPlaceholder(n),s=e.distance||n["top"===h?"outerHeight":"outerWidth"](!0)/2,u[h]=l+s,a&&(n.css(u),u[h]=c+s,u.opacity=1),n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define("explode","hide",function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),i()}var o,a,r,h,l,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=e.mode,g="show"===f,m=p.show().css("visibility","hidden").offset(),_=Math.ceil(p.outerWidth()/d),v=Math.ceil(p.outerHeight()/u),b=[];for(o=0;u>o;o++)for(h=m.top+o*v,c=o-(u-1)/2,a=0;d>a;a++)r=m.left+a*_,l=a-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-a*_,top:-o*v}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:_,height:v,left:r+(g?l*_:0),top:h+(g?c*v:0),opacity:g?0:1}).animate({left:r+(g?0:l*_),top:h+(g?0:c*v),opacLine truncated
|
||||
this.isMultiLine=o||!a&&this._isContentEditable(this.element),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,void 0;e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),void 0;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),void 0):(this._searchTimeout(t),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(t),this._change(t),void 0)}}),this._initSource(),this.menu=t("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==t.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(e,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))?(this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),void 0):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:n})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(n.value),s=i.item.attr("aria-label")||n.value,s&&t.trim(s).length&&(this.liveRegion.children().hide(),t("<div>").text(s).appendTo(this.liveRegion)),void 0)},menuselect:function(e,i){var s=i.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==t.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=s})),!1!==this._trigger("select",e,{item:s})&&this._value(s.value),this.term=this._value(),this.close(e),this.selectedItem=s}}),this.liveRegion=t("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var i=this.menu.element[0];return e.target===this.element[0]||e.target===i||t.contains(i,e.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),s=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;(!e||e&&!i&&!s)&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):void 0},_search:function(t){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return t.proxy(function(t){e===this.requestIndex&&this.__response(t),this.pendinLine truncated
|
||||
}},_updateDatepicker:function(e){this.maxRows=4,m=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var i,s=this._getNumberOfMonths(e),n=s[1],a=17,r=e.dpDiv.find("."+this._dayOverClass+" a");r.length>0&&o.apply(r.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&e.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",a*n+"em"),e.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.trigger("focus"),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),a=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-a:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+r?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+o>l&&l>o?Math.abs(o+r):0),i},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,s,n,o,a=this._curInst;!a||e&&a!==t.data(e,"datepicker")||this._datepickerShowing&&(i=this._get(a,"showAnim"),s=this._get(a,"duration"),n=function(){t.datepicker._tidyDialog(a)},t.effects&&(t.effects.effect[i]||t.effects[i])?a.dpDiv.hide(i,t.datepicker._get(a,"showOptions"),s,n):a.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,o=this._get(a,"onClose"),o&&o.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==s)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),o=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(o,i+("M"===s?this._get(o,"showCurrentAtPos"):0),s),this._updateDatepicker(o))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),o=this._getInst(n[0]);o["selected"+("M"===s?"Month":"Year")]=o["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(n)},_selectDay:function(e,i,s,n){var o,a=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||(o=this._getInst(a[0]),o.selectedDay=o.currentDay=t("a",n).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=s,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),o=this._getInst(n[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),s=this._get(o,"onSelect"),s?s.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(e){var i,s,n,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(o).val(n))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7))Line truncated
|
||||
},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options,o=this.document[0];return this.relativeContainer=null,n.containment?"window"===n.containment?(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):"document"===n.containment?(this.containment=[0,0,t(o).width()-this.helperProportions.width-this.margins.left,(t(o).height()||o.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):n.containment.constructor===Array?(this.containment=n.containment,void 0):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=t(n.containment),s=i[0],s&&(e=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i),void 0):(this.containment=null,void 0)},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s,n,o,a=this.options,r=this._isRootNode(this.scrollParent[0]),h=t.pageX,l=t.pageY;return r&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),a.grid&&(n=a.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-a.grid[1]:n+a.grid[1]:n,o=a.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,h=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-a.grid[0]:o+a.grid[0]:o),"y"===a.axis&&(h=this.originalPageX),"x"===a.axis&&(l=this.originalPageY)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i,s){var n=t.extend({},i,{item:s.element});s.sortables=[],t(s.options.connectToSortable).each(function(){var i=t(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshPositions(),i._trigger("activate",e,n))})},stop:function(e,i,s){var n=t.extend({},i,{item:s.eleLine truncated
|
||||
},disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&this._trigger("beforeClose",e)!==!1&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||t.ui.safeBlur(t.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,i){var s=!1,n=this.uiDialog.siblings(".ui-front:visible").map(function(){return+t(this).css("z-index")}).get(),o=Math.max.apply(null,n);return o>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",o+1),s=!0),s&&!i&&this._trigger("focus",e),s},open:function(){var e=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),void 0):(this._isOpen=!0,this.opener=t(t.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"),void 0)},_focusTabbable:function(){var t=this._focusedElement;t||(t=this.element.find("[autofocus]")),t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).trigger("focus")},_keepFocus:function(e){function i(){var e=t.ui.safeActiveElement(this.document[0]),i=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);i||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),this.close(e),void 0;if(e.keyCode===t.ui.keyCode.TAB&&!e.isDefaultPrevented()){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");e.target!==n[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==s[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(this._delay(function(){n.trigger("focus")}),e.preventDefault()):(this._delay(function(){s.trigger("focus")}),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=t("<button type='button'></button>").button({label:t("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(e,"ui-dialog-title"),this._title(e),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title?t.text(this.options.title):t.html(" ")},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?(this._removeClass(this.uiDialog,"ui-dialog-buttons"),void 0):(t.each(i,function(i,s){var n,o;s=t.isFunction(s)?{click:s,text:i}:s,s=t.extend({type:"button"},s),n=s.click,o={icon:s.icon,iconPosition:s.iconPosition,showLabel:s.showLabel,icons:s.icons,text:s.text},delete s.click,delete s.icon,delete s.iconPosition,delete s.showLabel,delete s.icons,"boolean"==typeof s.text&&delete s.text,t("<button></button>",s).button(o).appendTo(e.uiButtonSet).on("click",function(){n.apply(e.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),void 0)},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:functionLine truncated
|
||||
},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle"),o="<span tabindex='0'></span>",a=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)a.push(o);this.handles=n.add(t(a.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e).attr("tabIndex",0)})},_createRange:function(){var e=this.options;e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=t("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),("min"===e.range||"max"===e.range)&&this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,o,a,r,h,l,c=this,u=this.options;return u.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-c.values(e));(n>i||n===i&&(e===c._lastChangedValue||c.values(e)===u.min))&&(n=i,o=t(this),a=e)}),r=this._start(e,a),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=a,this._addClass(o,null,"ui-state-active"),o.trigger("focus"),h=o.offset(),l=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:e.pageX-h.left-o.width()/2,top:e.pageY-h.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),o=this._valueMin()+s*n,this._trimAlignValue(o)},_uiHash:function(t,e,i){var s={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(s.value=void 0!==e?e:this.values(t),s.values=i||this.values()),s},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var s,n,o=this.value(),a=this.values();this._hasMultipleValues()&&(n=this.values(e?0:1),o=this.values(e),2===this.options.values.length&&this.options.range===!0&&(i=0===e?Math.min(n,i):Math.max(n,i)),a[e]=i),i!==o&&(s=this._trigger("slide",t,this._uiHash(e,i,a)),s!==!1&&(this._hasMultipleValues()?this.values(e,i):this.value(i)))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),void 0):this._value()},values:function(e,i){var s,n,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),void 0;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this._hasMultipleValues()?this._values(e):this.value();for(s=this.options.values,n=arguments[0],o=0;s.length>o;o+=1)s[o]=this._trimAlignValue(n[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.valuLine truncated
|
||||
this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){function i(t,e,i){return function(s){i._trigger(t,s,e._uiHash(e))}}this.reverting=!1;var s,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&n.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||n.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(n.push(function(t){this._trigger("remove",t,this._uiHash())}),n.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)e||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(s=0;n.length>s;s++)n[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}}),t.widget("ui.spinner",{version:"1.12.1",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e=this._super(),i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);null!=n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t),void 0)},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var e=this.element[0]===t.ui.safeActiveElement(this.document[0]);e||(this.element.trigger("focus"),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===t.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:(this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinnLine truncated
|
||||
@@ -0,0 +1,420 @@
|
||||
/*
|
||||
Version 1.0.1
|
||||
|
||||
Copyright 2014 Red White Silver GmbH
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
(function($, window, document, undefined) {
|
||||
|
||||
var pluginName = 'rotaryswitch',
|
||||
defaults = {
|
||||
minimum: 0, // Minimal value
|
||||
maximum: 12, // Maximum value
|
||||
step: 1, // Step size
|
||||
snapInMotion: true, // Snap to steps in motion
|
||||
beginDeg: 0, // Start point in deg
|
||||
lengthDeg: 360, // Length in deg
|
||||
minimumOverMaximum: true, // Which value will used, if the the start and the end point at the same deg.
|
||||
showInput: false, // Show input element
|
||||
showMarks: false, // Show deg marks
|
||||
themeClass: 'defaultTheme' // Theme class
|
||||
};
|
||||
|
||||
function Plugin(element, options) {
|
||||
this.element = $(element);
|
||||
this.domElements = {};
|
||||
this.htmlStructure = {
|
||||
wrap: '<div class="rotaryswitchPlugin"></div>',
|
||||
switchButton: '<div class="switch"></div>',
|
||||
overlay: '<div class="overlay"></div>',
|
||||
marks: '<div class="marks"></div>',
|
||||
mark: '<div class="mark"></div>'
|
||||
};
|
||||
this.mousePosition = {x: -1, y: -1};
|
||||
this.switchDeg = 0;
|
||||
this.valueInPercent = 0;
|
||||
this.value = 0;
|
||||
this.steps = 0;
|
||||
this.totalDeg = 0;
|
||||
this.degPerStep = 0;
|
||||
this.lastTriggeredValue = -1;
|
||||
|
||||
this.options = $.extend({}, defaults, options);
|
||||
this._defaults = defaults;
|
||||
this._name = pluginName;
|
||||
|
||||
this.initialize();
|
||||
}
|
||||
|
||||
Plugin.prototype = {
|
||||
|
||||
/**
|
||||
* Initialze this plugin
|
||||
* See inline comments for more details
|
||||
*
|
||||
* @param none
|
||||
* @return none
|
||||
*/
|
||||
|
||||
initialize: function() {
|
||||
|
||||
// Save the needed jquery DOM elements
|
||||
this.domElements = {
|
||||
// Wrap the input element and save the parent as main element and add theme class:
|
||||
main: this.element.wrap(this.htmlStructure.wrap).parent().addClass(this.options.themeClass),
|
||||
switchButton: $(this.htmlStructure.switchButton),
|
||||
overlay: $(this.htmlStructure.overlay)
|
||||
};
|
||||
|
||||
// Append addional dom elements:
|
||||
this.domElements.main.append([this.domElements.switchButton, this.domElements.overlay]);
|
||||
|
||||
// Calculate the length (Maximum - minimum)
|
||||
this.steps = Math.abs(this.options.maximum - this.options.minimum);
|
||||
|
||||
// Calculate the total deg length
|
||||
this.totalDeg = this.options.lengthDeg;
|
||||
|
||||
// Calculate deg per step
|
||||
this.degPerStep = this.totalDeg / this.steps;
|
||||
|
||||
// Listen to some necessary events
|
||||
this.domElements.main.on('mousedown', $.proxy(this.onMouseDown, this));
|
||||
this.domElements.main.on('touchstart', $.proxy(this.onTouchStart, this));
|
||||
this.element.on('change', $.proxy(this.onChangeElementValue, this));
|
||||
|
||||
this.readValueFromInput(); // Get the value from the input element
|
||||
|
||||
this.rotateSwitch(); // Rotate the switch
|
||||
|
||||
// Show marks if wished
|
||||
if (this.options.showMarks === true) {
|
||||
this.renderMarks();
|
||||
}
|
||||
|
||||
// Show the input element if wished
|
||||
if (this.options.showInput === false) {
|
||||
this.element.hide();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Adds marks for each step
|
||||
*
|
||||
* @param none
|
||||
* @return none
|
||||
*/
|
||||
|
||||
renderMarks: function() {
|
||||
var i=0,
|
||||
len = this.steps / this.options.step,
|
||||
deg = this.options.beginDeg,
|
||||
degPerStep = this.degPerStep * this.options.step,
|
||||
marks = $(this.htmlStructure.marks);
|
||||
|
||||
for (; i < len; i += 1) {
|
||||
deg += degPerStep;
|
||||
var mark = $(this.htmlStructure.mark).css({'transform': 'rotate('+deg+'deg) translate(0, -'+ (this.domElements.main.width()/2 + (this.domElements.main.width()*0.1)) +'px)'});
|
||||
marks.append(mark);
|
||||
}
|
||||
|
||||
this.domElements.main.append(marks);
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* On mouse down event handler
|
||||
* Save the mouse position (x, y) to the object this.mousePosition
|
||||
* call the method this.startHandling
|
||||
*
|
||||
* @param event jquery mouse event
|
||||
* @return none
|
||||
*/
|
||||
onMouseDown: function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
this.mousePosition.x = event.pageX;
|
||||
this.mousePosition.y = event.pageY;
|
||||
|
||||
this.startHandling();
|
||||
},
|
||||
|
||||
/**
|
||||
* On mouse up event handler
|
||||
* call the method this.stopHandling
|
||||
*
|
||||
* @param event jquery mouse event
|
||||
* @return none
|
||||
*/
|
||||
onMouseUp: function(event) {
|
||||
this.stopHandling();
|
||||
},
|
||||
|
||||
/**
|
||||
* On mouse move event handler
|
||||
* Save the mouse position (x, y) to the object this.mousePosition
|
||||
* call the method this.calculateSwitchDeg
|
||||
* call the method this.calculateValueByDeg
|
||||
* call the method this.rotateSwitch
|
||||
* call the method this.setValueToInput
|
||||
*
|
||||
* @param event jquery mouse event
|
||||
* @return none
|
||||
*/
|
||||
onMousemove: function(event) {
|
||||
event.preventDefault();
|
||||
this.mousePosition.x = event.pageX;
|
||||
this.mousePosition.y = event.pageY;
|
||||
this.calculateSwitchDeg();
|
||||
this.calculateValueByDeg();
|
||||
this.rotateSwitch();
|
||||
this.setValueToInput();
|
||||
},
|
||||
|
||||
/**
|
||||
* On touch start event handler
|
||||
* Identical width this.onMouseDown
|
||||
*
|
||||
* @param event jquery touch event
|
||||
* @return none
|
||||
* @see this.onMouseDown
|
||||
*/
|
||||
onTouchStart: function(event) {
|
||||
event.preventDefault();
|
||||
this.mousePosition.x = event.originalEvent.targetTouches[0].pageX;
|
||||
this.mousePosition.y = event.originalEvent.targetTouches[0].pageY;
|
||||
this.startHandling();
|
||||
},
|
||||
|
||||
/**
|
||||
* On touch end event handler
|
||||
* Identical width this.onMouseUp
|
||||
*
|
||||
* @param event jquery touch event
|
||||
* @return none
|
||||
* @see this.onMouseUp
|
||||
*/
|
||||
onTouchEnd: function(event) {
|
||||
this.stopHandling();
|
||||
},
|
||||
|
||||
/**
|
||||
* On touch move event handler
|
||||
* Identical width this.onMousemove
|
||||
*
|
||||
* @param event jquery touch event
|
||||
* @return none
|
||||
* @see this.onMousemove
|
||||
*/
|
||||
onTouchMove: function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
this.mousePosition.x = event.originalEvent.targetTouches[0].pageX;
|
||||
this.mousePosition.y = event.originalEvent.targetTouches[0].pageY;
|
||||
|
||||
this.calculateSwitchDeg();
|
||||
this.calculateValueByDeg();
|
||||
this.rotateSwitch();
|
||||
this.setValueToInput();
|
||||
},
|
||||
|
||||
/**
|
||||
* On change input element event handler
|
||||
* If event not triggered by plugin:
|
||||
* Call the method this.readValueFromInput
|
||||
* Call the method this.rotateSwitch
|
||||
*
|
||||
* @param event jquery event
|
||||
* @return none
|
||||
*/
|
||||
onChangeElementValue: function(event) {
|
||||
if (!event.plugin || event.plugin !== this) {
|
||||
this.readValueFromInput();
|
||||
this.rotateSwitch();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Triggered by mouse or touch begin event
|
||||
* Calls some methods
|
||||
* Listen to some events
|
||||
* Add class 'active' to the main DOM element (this.domElements.main)
|
||||
*
|
||||
* @param none
|
||||
* @return none
|
||||
*/
|
||||
startHandling: function() {
|
||||
this.calculateSwitchDeg();
|
||||
this.calculateValueByDeg();
|
||||
this.rotateSwitch();
|
||||
this.setValueToInput();
|
||||
|
||||
$(document).on('mouseup', $.proxy(this.onMouseUp, this));
|
||||
$(document).on('mousemove', $.proxy(this.onMousemove, this));
|
||||
$(document).on('touchend', $.proxy(this.onTouchEnd, this));
|
||||
$(document).on('touchmove', $.proxy(this.onTouchMove, this));
|
||||
|
||||
this.domElements.main.addClass('active');
|
||||
},
|
||||
|
||||
/**
|
||||
* Triggered by mouseup or touchend event
|
||||
* Stop listen to some events
|
||||
* Call method this.rotateSwitch
|
||||
* Remove class 'active' from the main DOM element (this.domElements.main)
|
||||
*
|
||||
* @param none
|
||||
* @return none
|
||||
*/
|
||||
stopHandling: function() {
|
||||
$(document).off('mouseup', $.proxy(this.onMouseUp, this))
|
||||
.off('mousemove', $.proxy(this.onMousemove, this))
|
||||
.off('touchend', $.proxy(this.onTouchEnd, this))
|
||||
.off('touchmove', $.proxy(this.onTouchMove, this));
|
||||
|
||||
this.rotateSwitch(true);
|
||||
this.domElements.main.removeClass('active');
|
||||
},
|
||||
|
||||
/**
|
||||
* Calculate the switch deg by the element position and the mouse position
|
||||
* Stores the switch deg in this.switchDeg
|
||||
* @param none
|
||||
* @return none
|
||||
*/
|
||||
calculateSwitchDeg: function() {
|
||||
var offset = this.domElements.main.offset(),
|
||||
radians = Math.atan2(this.mousePosition.x - (offset.left + (this.domElements.main.width()/2)), this.mousePosition.y - (offset.top + (this.domElements.main.height()/2)));
|
||||
|
||||
if (this.mousePosition.x !== -1) {
|
||||
this.switchDeg = (radians * (180 / Math.PI) * -1) + 180;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Calculate the value by deg
|
||||
* Stores the in percent in this.valueInPercent
|
||||
* Stores the value in this.value
|
||||
* @param none
|
||||
* @return none
|
||||
*/
|
||||
calculateValueByDeg: function() {
|
||||
var range = this.options.maximum - this.options.minimum;
|
||||
|
||||
if (this.switchDeg - this.options.beginDeg > 0) {
|
||||
this.valueInPercent = (this.switchDeg - this.options.beginDeg) / this.totalDeg;
|
||||
} else {
|
||||
this.valueInPercent = (this.switchDeg - this.options.beginDeg + 360) / this.totalDeg;
|
||||
}
|
||||
|
||||
if (this.valueInPercent > 1) {
|
||||
if (this.valueInPercent > (((360 / this.totalDeg)-1) / 2)+1 ) {
|
||||
this.valueInPercent = 0;
|
||||
} else {
|
||||
this.valueInPercent = 1;
|
||||
}
|
||||
}
|
||||
|
||||
this.value = ~~ (((((range * this.valueInPercent) < 0) ? -0.5 : 0.5) + ((range * this.valueInPercent) / this.options.step))) * this.options.step;
|
||||
this.value += this.options.minimum;
|
||||
|
||||
if (this.options.lengthDeg === 360 && (this.value === this.options.minimum || this.value === this.options.maximum)) {
|
||||
if (this.options.minimumOverMaximum === true) {
|
||||
this.value = this.options.minimum;
|
||||
} else {
|
||||
this.value = this.options.maximum;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Rotate the switch with css transform
|
||||
* snap to the the next rounded value if the parameter snap is true
|
||||
* @param snap boolean
|
||||
* @return none
|
||||
*/
|
||||
rotateSwitch: function(snap) {
|
||||
var deg = 0,
|
||||
exactDeg = (this.valueInPercent * this.totalDeg),
|
||||
roundedDeg = ((this.value / this.steps) * this.totalDeg) - (this.options.minimum * this.degPerStep),
|
||||
difference = Math.abs(Math.abs(exactDeg) - Math.abs(roundedDeg)),
|
||||
rotateString = '';
|
||||
|
||||
if (snap === true || (this.options.snapInMotion === true && difference < this.degPerStep / 6)) {
|
||||
if (roundedDeg + this.options.beginDeg < 360) {
|
||||
deg = (roundedDeg + this.options.beginDeg);
|
||||
} else {
|
||||
deg = roundedDeg + this.options.beginDeg - 360;
|
||||
}
|
||||
} else {
|
||||
if (exactDeg + this.options.beginDeg < 360) {
|
||||
deg = (exactDeg + this.options.beginDeg);
|
||||
} else {
|
||||
deg = exactDeg + this.options.beginDeg - 360;
|
||||
}
|
||||
}
|
||||
|
||||
rotateString = ['rotate(', deg, 'deg)'].join('');
|
||||
this.domElements.switchButton.css({
|
||||
'transform': rotateString,
|
||||
'-webkit-transform': rotateString,
|
||||
'-moz-transform': rotateString,
|
||||
'-o-transform': rotateString,
|
||||
'-ms-transform': rotateString
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Read the valur from the input element
|
||||
* If no value available, this.options.minimum is used
|
||||
* @param snap boolean
|
||||
* @return none
|
||||
*/
|
||||
readValueFromInput: function() {
|
||||
var elementValue = parseInt(this.element.val(), 10);
|
||||
if (isNaN(elementValue) === true) {
|
||||
this.value = this.options.minimum;
|
||||
} else {
|
||||
this.value = Math.max(this.options.minimum, elementValue);
|
||||
this.value = Math.min(this.options.maximum, this.value);
|
||||
}
|
||||
|
||||
this.value -= this.options.minimum;
|
||||
this.valueInPercent = this.value / (this.options.maximum - this.options.minimum);
|
||||
},
|
||||
|
||||
/**
|
||||
* Set the value to the input element
|
||||
* and trigger the change event on the input element
|
||||
* @param none
|
||||
* @return none
|
||||
*/
|
||||
setValueToInput: function() {
|
||||
if (this.value !== this.lastTriggeredValue) {
|
||||
this.lastTriggeredValue = this.value;
|
||||
this.element.val(this.value).trigger({type: 'change', plugin: this});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
$.fn[pluginName] = function(options) {
|
||||
return this.each(function() {
|
||||
if (!$.data(this, 'plugin_' + pluginName)){
|
||||
$.data(this, 'plugin_' + pluginName, new Plugin(this, options));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
}(jQuery, window, document));
|
||||
@@ -0,0 +1,34 @@
|
||||
$(document).ready(function(){
|
||||
let deferredPrompt;
|
||||
const addBtn = document.querySelector('.add-button');
|
||||
const removeBtn = document.querySelector('.installed-label');
|
||||
addBtn.style.display = 'none';
|
||||
removeBtn.style.display = 'block';
|
||||
window.addEventListener('beforeinstallprompt', (e) => {
|
||||
removeBtn.style.display = 'none';
|
||||
// Prevent Chrome 67 and earlier from automatically showing the prompt
|
||||
e.preventDefault();
|
||||
// Stash the event so it can be triggered later.
|
||||
deferredPrompt = e;
|
||||
// Update UI to notify the user they can add to home screen
|
||||
addBtn.style.display = 'block';
|
||||
|
||||
addBtn.addEventListener('click', (e) => {
|
||||
// hide our user interface that shows our A2HS button
|
||||
//addBtn.style.display = 'none';
|
||||
// Show the prompt
|
||||
deferredPrompt.prompt();
|
||||
// Wait for the user to respond to the prompt
|
||||
deferredPrompt.userChoice.then((choiceResult) => {
|
||||
if (choiceResult.outcome === 'accepted') {
|
||||
console.log('User accepted the prompt, app installed');
|
||||
addBtn.style.display = 'none';
|
||||
removeBtn.style.display = 'block';
|
||||
} else {
|
||||
console.log('User dismissed the prompt');
|
||||
}
|
||||
deferredPrompt = null;
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,2 @@
|
||||
/*! roundSlider v1.6.1 | (c) 2015-2020, Soundar | MIT license | http://roundsliderui.com/licence.html */
|
||||
!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"undefined"!=typeof exports?t(require("jquery")):t(jQuery)}(function(p){"use strict";var o="roundSlider";function r(t,e){this.id=t.id,this.control=p(t),this.options=p.extend({},this.defaults,e)}p.fn[o]=function(t){return function(t,e){for(var i=0;i<this.length;i++){var s=this[i],a=p.data(s,o);if(a){if(p.isPlainObject(t))"function"==typeof a.option?a.option(t):s.id&&window[s.id]&&"function"==typeof window[s.id].option&&window[s.id].option(t);else if("string"==typeof t&&"function"==typeof a[t]){if(("option"===t||0===t.indexOf("get"))&&void 0===e[2])return a[t](e[1]);a[t](e[1],e[2])}}else{var n=new r(s,t);n._saveInstanceOnElement(),n._saveInstanceOnID(),!1!==n._raise("beforeCreate")?(n._init(),n._raise("create")):n._removeData()}}return this}.call(this,t,arguments)},r.prototype={pluginName:o,version:"1.6.1",options:{},control:null,defaults:{min:0,max:100,step:1,value:null,radius:85,width:18,handleSize:"+0",startAngle:0,endAngle:"+360",animation:!0,showTooltip:!0,editableTooltip:!0,readOnly:!1,disabled:!1,keyboardAction:!0,mouseScrollAction:!1,lineCap:"butt",sliderType:"default",circleShape:"full",handleShape:"round",startValue:null,svgMode:!1,borderWidth:1,borderColor:null,pathColor:null,rangeColor:null,tooltipColor:null,beforeCreate:null,create:null,start:null,beforeValueChange:null,drag:null,change:null,update:null,valueChange:null,stop:null,tooltipFormat:null},keys:{UP:38,DOWN:40,LEFT:37,RIGHT:39},_props:function(){return{numberType:["min","max","step","radius","width","borderWidth","startAngle","startValue"],booleanType:["animation","showTooltip","editableTooltip","readOnly","disabled","keyboardAction","mouseScrollAction","svgMode"],stringType:["sliderType","circleShape","handleShape","lineCap"]}},_init:function(){var t,e=this.options;e.svgMode&&(t=function(){},this._appendSeperator=t,this._refreshSeperator=t,this._updateSeperator=t,this._appendOverlay=t,this._checkOverlay=t,this._updateWidth=t),this.control.is("input")&&(this._isInputType=!0,this._hiddenField=this.control,this.control=this.$createElement("div"),this.control.insertAfter(this._hiddenField),e.value=this._hiddenField.val()||e.value),this._isBrowserSupported()&&this._onInit()},_onInit:function(){this._initialize(),this._update(),this._render()},_initialize:function(){var t=this.browserName=this.getBrowserName();t&&this.control.addClass("rs-"+t),this._isReadOnly=!1,this._checkDataType(),this._refreshCircleShape()},_render:function(){this.container=this.$createElement("div.rs-container"),this.innerContainer=this.$createElement("div.rs-inner-container"),this.container.append(this.innerContainer);var t="rs-control "+(this.options.svgMode?"rs-svg-mode":"rs-classic-mode");this.control.addClass(t).empty().append(this.container),this._createLayers(),this._createOtherLayers(),this._setContainerClass(),this._setRadius(),this._setProperties(),this._setValue(),this._updateTooltipPos(),this._bindControlEvents("_bind"),this._raiseValueChange("create"),this._updatePre()},_update:function(){this._validateSliderType(),this._updateStartEnd(),this._validateStartEnd(),this._handle1=this._handle2=this._handleDefaults(),this._analyzeModelValue(),this._validateModelValue()},_createLayers:function(){var t=this.options;if(t.svgMode)return this._createSVGElements(),this._setSVGAttributes(),this._setSVGStyles(),void this._moveSliderRange(!0);this.block=this.$createElement("div.rs-block rs-outer rs-border"),this.innerContainer.append(this.block);var e=t.width,i=this._start,s=this.$createElement("div.rs-path rs-transition");this._showRange?(this.block1=s.clone().addClass("rs-range-color").rsRotate(i),this.block2=s.clone().addClass("rs-range-color").css("opacity","0").rsRotate(i),this.block3=s.clone().addClass("rs-path-color").rsRotate(i),this.block4=s.addClass("rs-path-color").css({opacity:"1","z-index":"1"}).rsRotate(i-180),this.block.append(this.block1,this.block2,this.block3,this.block4).addClass("rs-split")):this.block.append(s.addClass("rs-path-color")),this.lastBlock=this.$createElement("span.rs-block").css({padding:e}),this.innerBlock=this.$createElement("div.rs-inner rs-bg-color rs-border"),this.lastBlock.append(this.innerBlock),this.block.append(this.lastBlock)},_createOtherLayers:function(){this._appendHandle(),this._appendSeperator(),this._appendOverlay(),this._appendHiddenField()},_setProperties:function(){var t=this.options;this._setHandleShape(),this._addAnimation(),this._appendTooltip(),t.showTooltip||this._removeTooltip(),t.disabled?this.disable():t.readOnly&&this._readOnly(!0),t.mouseScrollAction&&this._bindScrollEvents("_bind")},_updatePre:function(){this._prechange=this._predrag=this._pre_bvc=this._preValue=this.options.value},_backupPreValue:function(){this._pre_handle1=this._handle1,this._pre_handle2=this._handle2},_revertPreValue:function(){this._handle1=this._pre_handle1,this._handle2=this._pre_handle2,this._updateModelValue()},_setValue:function(){var t;this._rangeSlider?(thisLine truncated
|
||||
@@ -0,0 +1,586 @@
|
||||
/* This is part of the DCC++ EX Project for model railroading and more.
|
||||
For licence information, please see index.html.
|
||||
For more information, see us at dcc-ex.com.
|
||||
|
||||
storageController.js
|
||||
|
||||
Manages the setting storage capabilities
|
||||
*/
|
||||
|
||||
$(document).ready(function(){
|
||||
// This is displays message about Local storage Support of the Local browser
|
||||
if (typeof Storage !== "undefined") {
|
||||
console.log("Your browser supports Local Storage");
|
||||
} else {
|
||||
console.log("Sorry! Your browser does not supporting Local Storage");
|
||||
}
|
||||
|
||||
// Opens NEW MAP window with all fields empty
|
||||
$("#add-map").on("click", function () {
|
||||
$("#save-fn-map").attr("mode", "new");
|
||||
$(".fn-heading").html("New Mapping");
|
||||
showBtnConfig({ mname: "", fnData: fnMasterData });
|
||||
});
|
||||
|
||||
// This will Load buttons on selecting a map from the select box
|
||||
$("#select-map").change(function () {
|
||||
selectedval = $(this).val();
|
||||
if (selectedval != "default") {
|
||||
data = getStoredMapData(selectedval);
|
||||
loadButtons(data);
|
||||
} else {
|
||||
loadButtons({ mname: "default", fnData: fnMasterData });
|
||||
}
|
||||
});
|
||||
|
||||
// Opens MAP window with all fields filled from the selected map that allows editing Map
|
||||
$(document).on("click", "#edit-cur-map", function () {
|
||||
$("#save-fn-map").attr("mode", "edit");
|
||||
$(".fn-heading").html("Edit Mapping");
|
||||
selectedval = $("#cur-map-val").attr("cur-map");
|
||||
if (selectedval != "Default") {
|
||||
data = getStoredMapData(selectedval);
|
||||
showBtnConfig(data);
|
||||
} else {
|
||||
alert("Cannot edit Default mapping!");
|
||||
}
|
||||
//showBtnConfig();
|
||||
});
|
||||
|
||||
// Closes MAP window on clicking X icon
|
||||
$("#close-model").on("click", function () {
|
||||
$("#fnModal").hide();
|
||||
});
|
||||
|
||||
//This will check for Save mode (NEW MAP / EDIT MAP) and delegate the functionality
|
||||
$("#save-fn-map").on("click", function () {
|
||||
mode = $(this).attr("mode");
|
||||
// alert(mode); // debug line
|
||||
if (mode == "new") {
|
||||
addNewMap();
|
||||
} else {
|
||||
editMap();
|
||||
}
|
||||
});
|
||||
|
||||
//Allows user to download the selected map in .JSON format
|
||||
$(document).on("click", "#export-cur-map", function () {
|
||||
map = $("#cur-map-val").attr("cur-map");
|
||||
if (map != "default") {
|
||||
downloadMapData(map);
|
||||
} else {
|
||||
alert("Please select Custom map");
|
||||
}
|
||||
});
|
||||
|
||||
// This remove whole exthrottle app data but with confirmation
|
||||
$("#wipe-map").on("click", function () {
|
||||
var r = confirm("Are you sure on deletion?");
|
||||
if (r == true) {
|
||||
window.localStorage.removeItem("mapData");
|
||||
console.log("!!!!!!MAPS WIPED!!!!!!");
|
||||
loadmaps();
|
||||
}
|
||||
});
|
||||
|
||||
// This allows user to download whole exthrottle app data
|
||||
$("#export-all-maps").on("click", function () {
|
||||
exportMapData();
|
||||
});
|
||||
|
||||
// This allows user to upload previously downloaded Map (JSON format must adhere)
|
||||
$(document).on("click", "#import-map", function (e) {
|
||||
e.preventDefault();
|
||||
$("#map-upload").trigger("click");
|
||||
});
|
||||
// This part with above which is responsible for actual file upload for MAP
|
||||
$("#map-upload").on("change", function (e) {
|
||||
var file = e.target.files[0];
|
||||
var field = $(this);
|
||||
var freader = new FileReader();
|
||||
freader.onload = function (evt) {
|
||||
data = JSON.parse(evt.target.result);
|
||||
setMapData(data);
|
||||
field.val("");
|
||||
};
|
||||
freader.readAsText(file);
|
||||
});
|
||||
|
||||
// This is responsible for Cab upload
|
||||
$("#cabs-upload").on("change", function (e) {
|
||||
var file = e.target.files[0];
|
||||
var field = $(this);
|
||||
var freader = new FileReader();
|
||||
freader.onload = function (evt) {
|
||||
data = JSON.parse(evt.target.result);
|
||||
importLocoData(data);
|
||||
field.val("");
|
||||
};
|
||||
freader.readAsText(file);
|
||||
});
|
||||
|
||||
// This allows user to upload previously downloaded MAP DATA (JSON format must adhere)
|
||||
$(document).on("click", "#import-all-maps", function (e) {
|
||||
e.preventDefault();
|
||||
//$("#appdata-upload").attr("mode", "mapData");
|
||||
$("#maps-upload").trigger("click");
|
||||
});
|
||||
|
||||
// This part of above which is responsible for actual file upload for MAP DATA
|
||||
$("#maps-upload").on("change", function (e) {
|
||||
var file = e.target.files[0];
|
||||
var field = $(this);
|
||||
var freader = new FileReader();
|
||||
freader.onload = function (evt) {
|
||||
data = JSON.parse(evt.target.result);
|
||||
importMapdata(data);
|
||||
field.val("");
|
||||
};
|
||||
freader.readAsText(file);
|
||||
});
|
||||
|
||||
// Set height of throttle container according to functions panel
|
||||
$(".throttle-container").height($(".functionKeys").first().height());
|
||||
|
||||
//Temparory function Shows APP DATA in console
|
||||
$("#loco-info").on("click", function () {
|
||||
console.log(getMapData());
|
||||
});
|
||||
|
||||
//Functions for the storage page in settings
|
||||
|
||||
$("#backup-app-settings").on("click", function () {
|
||||
exportAppData();
|
||||
});
|
||||
|
||||
// This allows user to upload previously downloaded APP DATA (JSON format must adhere)
|
||||
$("#restore-app-settings").on("click", function (e) {
|
||||
e.preventDefault();
|
||||
$("#app-upload").trigger("click");
|
||||
});
|
||||
|
||||
// This part of above which is responsible for actual file upload for APP DATA
|
||||
$("#app-upload").on("change", function (e) {
|
||||
var file = e.target.files[0];
|
||||
var field = $(this);
|
||||
var freader = new FileReader();
|
||||
freader.onload = function (evt) {
|
||||
data = JSON.parse(evt.target.result);
|
||||
importAppdata(data);
|
||||
field.val("");
|
||||
};
|
||||
freader.readAsText(file);
|
||||
});
|
||||
|
||||
$("#wipe-app-settings").on("click", function () {
|
||||
var r = confirm("Are you sure on deletion?");
|
||||
if (r == true) {
|
||||
window.localStorage.removeItem("mapData");
|
||||
window.localStorage.removeItem("cabList");
|
||||
window.localStorage.removeItem("userpref");
|
||||
console.log("!!!!!DATA IS WIPED!!!!!!");
|
||||
loadmaps();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
// Load all maps to select box
|
||||
function loadmaps(){
|
||||
$("#select-map").empty();
|
||||
$("#select-map").append($("<option />").val("default").text("Default"));
|
||||
getMapData().forEach(map => {
|
||||
$("#select-map").append($("<option />").val(map.mname).text(map.mname));
|
||||
})
|
||||
}
|
||||
|
||||
// Load button layout of selected Map
|
||||
function loadButtons(data){
|
||||
$("#fn-wrapper").empty();
|
||||
$.each(data.fnData, function(key, value){
|
||||
isPressed = value[0] != 0 ? true : false;
|
||||
btnType = value[1] != 0 ? "press" : "toggle";
|
||||
if(value[3]==1){
|
||||
$("#fn-wrapper").append(
|
||||
"<div class='fn-button form-group field-button-fn'> <button class='btn-default btn fn-btn "+btnType+"' data-type='"+
|
||||
btnType+"' aria-pressed='"+isPressed+"' name='"+key+"' id='"+key+"'>"+
|
||||
value[2]+"</button>"
|
||||
+"</div>");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Show the Custom Map fields inside Custom map window while adding and editing a Map.
|
||||
function showBtnConfig(data){
|
||||
|
||||
$("#fnModal").show();
|
||||
$('#fnModal').css({"top":"7%", "left": "18%"});
|
||||
$('#fnModal').draggable();
|
||||
$("#fnModal .fn-modal-content").empty();
|
||||
$("#fnModal .fn-modal-content").append('<div class="row header-row"><div class="column-2 header-col func-title">Map Name</div> <div class="column-5 header-col"><input type="text" class="fn-input" id="map-name" value="'+data.mname+'"/></div> <div class="column-3 header-col"></div></div>');
|
||||
$("#fnModal .fn-modal-content").append('<div class="row header-row"><div class="column-1 header-col">Function</div> <div class="column-4 header-col">Label</div> <div class="column-3 header-col">Button Type</div><div class="column-2 header-col">Visibility</div></div>');
|
||||
$.each(data.fnData, function(key, value){
|
||||
isPressed = value[0] != 0 ? true : false;
|
||||
btnType = value[1] != 0 ? "press" : "toggle";
|
||||
btnpress = value[1] == 1 ? "checked" : "";
|
||||
btnToggle = value[1] == 0 ? "checked" : "";
|
||||
fvisible = value[3] == 1 ? "checked" : "";
|
||||
$("#fnModal .fn-modal-content").append('<div class="row edit-row" id="'+key+'">'+
|
||||
'<div class="column-1 func-title">'+key +'</div>'+
|
||||
'<div class="column-4"> <input class="fn-input" name="'+key+'" id="'+key+'" value="'+value[2]+'"/>'+
|
||||
'<span class="focus-border"><i></i></span>'+
|
||||
'</div>'+
|
||||
'<div class="fn-radio column-3" name="'+key+'Type" id="'+key+'Type">'+
|
||||
'<input type="radio" id="'+key+'press" name="btn'+key+'Type" value="press" '+btnpress+'/>'+
|
||||
'<label for="'+key+'press">Momentary</label> '+
|
||||
'<input type="radio" id="'+key+'toggle" name="btn'+key+'Type" value="toggle" '+btnToggle+'/>'+
|
||||
'<label for="'+key+'toggle">Latching</label>'+
|
||||
'</div>'+
|
||||
'<div class="fn-chkbox column-2" name="'+key+'Visible" id="'+key+'Type">'+
|
||||
'<input type="checkbox" id="'+key+'Visible" name="'+key+'Visible" '+fvisible+'/>'+
|
||||
'<label for="'+key+'Visible">Show</label> '+
|
||||
'</div>'+
|
||||
'</div>');
|
||||
});
|
||||
}
|
||||
|
||||
// Saves New Map data to Local storage
|
||||
function addNewMap(){
|
||||
customFnData = {};
|
||||
$(".edit-row").each(function (val) {
|
||||
key = $(this).find(".func-title").text();
|
||||
btnType = $(this).children().find("input[type='radio']:checked").val() == "press" ? 1 : 0;
|
||||
fnvisible = $(this).children().find("input[type='checkbox']").prop("checked") ? 1 : 0;
|
||||
arr = [0, btnType, $(this).children().find(".fn-input").val(), fnvisible];
|
||||
customFnData[key] = arr;
|
||||
});
|
||||
mapName = $.trim($("#map-name").val());
|
||||
if (!ifExists(mapName)) {
|
||||
if (mapName) {
|
||||
// Send data to store in Local storage
|
||||
setMapData({ mname: mapName, fnData: customFnData });
|
||||
$("#fnModal").hide();
|
||||
setFunctionMaps();
|
||||
alert("Map Saved Sucessfully");
|
||||
} else {
|
||||
alert("Name is missing!!");
|
||||
}
|
||||
} else {
|
||||
alert("Map with the Name already exists!! Please change the Map name..");
|
||||
}
|
||||
}
|
||||
|
||||
// Saves Edited Map data to local storage
|
||||
function editMap(){
|
||||
customFnData = {};
|
||||
$(".edit-row").each(function(val){
|
||||
key = $(this).find(".func-title").text();
|
||||
btnType = $(this).children().find("input[type='radio']:checked").val() == "press" ? 1 : 0;
|
||||
fnvisible = $(this).children().find("input[type='checkbox']").prop('checked') ? 1 : 0;
|
||||
arr = [ 0, btnType, $(this).children().find(".fn-input").val(), fnvisible ];
|
||||
customFnData[key] = arr;
|
||||
});
|
||||
mapName = $.trim($("#map-name").val());
|
||||
if (mapName) {
|
||||
setMapData({ mname: mapName, fnData: customFnData });
|
||||
$("#fnModal").hide();
|
||||
setFunctionMaps();
|
||||
loadMapData(mapName);
|
||||
alert("Map Saved Sucessfully");
|
||||
} else {
|
||||
alert("Name is missing!!");
|
||||
}
|
||||
}
|
||||
|
||||
//*** Saves given data into Local storage**/
|
||||
// Create new data object if one does not exist
|
||||
// Verify if the given Map data already exists and replace it
|
||||
// Or Create new map data and inserts it into local storage object
|
||||
// Finally Saves the Data into Local storage */
|
||||
function setMapData(mapdata) {
|
||||
if (typeof Storage === "undefined") {
|
||||
return;
|
||||
}
|
||||
|
||||
const smapdata = getMapData()
|
||||
|
||||
if (ifExists(mapdata.mname)) {
|
||||
smapdata.find(function (item, i) {
|
||||
if (item.mname == mapdata.mname) {
|
||||
item.fnData = mapdata.fnData;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
smapdata.push(mapdata);
|
||||
}
|
||||
window.localStorage.setItem('mapData', JSON.stringify(smapdata));
|
||||
|
||||
loadmaps();
|
||||
setFunctionMaps();
|
||||
loadMapData(mapdata.mname);
|
||||
$("#select-map").val(mapdata.mname).trigger("change");
|
||||
|
||||
}
|
||||
|
||||
//Returns the Map data of given Map name
|
||||
function getStoredMapData(name){
|
||||
const data = getMapData();
|
||||
if(data !=null){
|
||||
return data.find(function(item, i){
|
||||
if(item.mname == name){
|
||||
return item.fnData;
|
||||
}
|
||||
});
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
//Download the Map data of given Map name
|
||||
function downloadMapData(mapName){
|
||||
data = JSON.stringify(getStoredMapData(mapName));
|
||||
const a = document.createElement("a");
|
||||
const file = new Blob([data], {type: 'application/json'});
|
||||
a.href = URL.createObjectURL(file);
|
||||
a.download = mapName+".json";
|
||||
a.click();
|
||||
}
|
||||
|
||||
//Delete the Map data of given Map name
|
||||
function deleteFuncData(name){
|
||||
var r = confirm("Are you sure on deletion?");
|
||||
if (r == true) {
|
||||
if (typeof(Storage) !== "undefined") {
|
||||
curmapdata = [];
|
||||
const data = getMapData()
|
||||
if(!data){
|
||||
alert("No Data stored");
|
||||
}else{
|
||||
data.find(function(item, i){
|
||||
if(item.mname != name){
|
||||
curmapdata.push(item);
|
||||
}
|
||||
});
|
||||
window.localStorage.setItem('mapData', JSON.stringify(curmapdata));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Map data of ExWebThrottle
|
||||
* @return {[]}
|
||||
*/
|
||||
function getMapData(){
|
||||
if (typeof Storage === "undefined") {
|
||||
return [];
|
||||
}
|
||||
|
||||
const localMapData = JSON.parse(window.localStorage.getItem("mapData"));
|
||||
|
||||
return localMapData || []
|
||||
}
|
||||
|
||||
// Returns boolen if the given Map exists in local storage
|
||||
function ifExists(name) {
|
||||
const data = getMapData()
|
||||
const existingItem = data.find((item) => item.mname === name);
|
||||
return !!existingItem;
|
||||
}
|
||||
|
||||
//Download all Maps of EXthrottle
|
||||
function exportMapData() {
|
||||
const data = getMapData()
|
||||
const a = document.createElement("a");
|
||||
const file = new Blob([data], {type: 'application/json'});
|
||||
a.href = URL.createObjectURL(file);
|
||||
a.download = "ListofMaps.json";
|
||||
a.click();
|
||||
}
|
||||
|
||||
function importMapdata(data){
|
||||
if(data){
|
||||
window.localStorage.setItem('mapData', JSON.stringify(data));
|
||||
loadmaps();
|
||||
$("#select-map").val('default').trigger("change");
|
||||
setFunctionMaps();
|
||||
}
|
||||
}
|
||||
//Import the Locomotives List data
|
||||
function importLocoData(data) {
|
||||
if (data) {
|
||||
window.localStorage.setItem("cabList", JSON.stringify(data));
|
||||
loadLocomotives();
|
||||
locoList = getLocoList();
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************/
|
||||
/********** Locomotives Data functions ***********/
|
||||
/*************************************************/
|
||||
|
||||
function saveLocomotive(data){
|
||||
locodata = $(data).arrayToJSON();
|
||||
if (typeof Storage !== "undefined") {
|
||||
curCabList = [];
|
||||
cabData = JSON.parse(window.localStorage.getItem("cabList"));
|
||||
if (!cabData) {
|
||||
curCabList.push(locodata);
|
||||
window.localStorage.setItem("cabList", JSON.stringify(curCabList));
|
||||
return true;
|
||||
} else {
|
||||
cabData.push(locodata);
|
||||
window.localStorage.setItem("cabList", JSON.stringify(cabData));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function saveEditedLocomotive(data, id){
|
||||
locodata = $(data).arrayToJSON();
|
||||
if (typeof Storage !== "undefined") {
|
||||
cabData = JSON.parse(window.localStorage.getItem("cabList"));
|
||||
cabData.find(function (item, i) {
|
||||
if (i == id) {
|
||||
cabData[i] = locodata;
|
||||
}
|
||||
});
|
||||
window.localStorage.setItem("cabList", JSON.stringify(cabData));
|
||||
}
|
||||
}
|
||||
|
||||
function ifLocoExists(name) {
|
||||
data = JSON.parse(window.localStorage.getItem("cabList"));
|
||||
found = false;
|
||||
if (data != null) {
|
||||
data.find(function (item, i) {
|
||||
if (item.name == name) {
|
||||
found = true;
|
||||
}
|
||||
});
|
||||
return found;
|
||||
}
|
||||
return found;
|
||||
}
|
||||
|
||||
// Returns the AppData of ExWebThrottle
|
||||
function getLocoList(){
|
||||
if (typeof Storage !== "undefined") {
|
||||
return JSON.parse(window.localStorage.getItem("cabList"));
|
||||
}else{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
//Download the Locomotives List data
|
||||
function downloadCabData(){
|
||||
data = JSON.stringify(getLocoList());
|
||||
const a = document.createElement("a");
|
||||
const file = new Blob([data], {type: 'application/json'});
|
||||
a.href = URL.createObjectURL(file);
|
||||
a.download = "CabList.json";
|
||||
a.click();
|
||||
}
|
||||
|
||||
// Returns the LocoData of ExWebThrottle
|
||||
function getStoredLocoData(name) {
|
||||
console.log(name);
|
||||
data = JSON.parse(window.localStorage.getItem("cabList"));
|
||||
if (data != null) {
|
||||
return data.find(function (item, i) {
|
||||
if (item.name == name) {
|
||||
return item;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/********************************************/
|
||||
/************** Preferences ***************/
|
||||
/********************************************/
|
||||
|
||||
// Get a given user preference
|
||||
function getPreference(pref){
|
||||
if (window.localStorage.getItem("userpref") != null) {
|
||||
curpref = JSON.parse(window.localStorage.getItem("userpref"));
|
||||
return curpref[pref];
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// Set a given user preference
|
||||
function setPreference(pref, val){
|
||||
if (window.localStorage.getItem("userpref") != null){
|
||||
curpref = JSON.parse(window.localStorage.getItem("userpref"));
|
||||
}else{
|
||||
curpref = {};
|
||||
}
|
||||
curpref[pref] = val;
|
||||
setUserPreferences(curpref);
|
||||
}
|
||||
|
||||
// Store user preferences in local storage
|
||||
function setUserPreferences(pref){
|
||||
if (typeof(Storage) !== "undefined") {
|
||||
window.localStorage.setItem("userpref", JSON.stringify(pref));
|
||||
}
|
||||
}
|
||||
|
||||
function getUserPreferences() {
|
||||
if (typeof Storage !== "undefined") {
|
||||
return JSON.parse(window.localStorage.getItem("userpref"));
|
||||
}else{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
function importPrefData(data) {
|
||||
if (data) {
|
||||
window.localStorage.setItem("userpref", JSON.stringify(data));
|
||||
}
|
||||
}
|
||||
|
||||
function exportAppData(){
|
||||
const jsonObj = [
|
||||
{maps: getMapData()},
|
||||
{locos: getLocoList()},
|
||||
{preferences: getUserPreferences()}
|
||||
]
|
||||
const data = JSON.stringify(jsonObj);
|
||||
const a = document.createElement("a");
|
||||
const file = new Blob([data], { type: "application/json" });
|
||||
a.href = URL.createObjectURL(file);
|
||||
a.download = "AppData.json";
|
||||
a.click();
|
||||
|
||||
}
|
||||
|
||||
function importAppdata(data){
|
||||
importMapdata(data[0]["maps"]);
|
||||
importLocoData(data[1]["locos"]);
|
||||
importPrefData(data[2]["preferences"]);
|
||||
setThrottleScreenUI();
|
||||
}
|
||||
|
||||
|
||||
(function ($) {
|
||||
$.fn.arrayToJSON = function () {
|
||||
var o = {};
|
||||
$.each($(this), function () {
|
||||
if (o[this.name]) {
|
||||
if (!o[this.name].push) {
|
||||
o[this.name] = [o[this.name]];
|
||||
}
|
||||
o[this.name].push(this.value || "");
|
||||
} else {
|
||||
o[this.name] = this.value || "";
|
||||
}
|
||||
});
|
||||
return o;
|
||||
};
|
||||
}
|
||||
)(jQuery);
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"short_name": "WebThrottle-EX",
|
||||
"name": "DCC++ EX Web Throttle",
|
||||
"icons": [
|
||||
{
|
||||
"src": "images/full-logo.png",
|
||||
"type": "image/png",
|
||||
"sizes": "176x176"
|
||||
}
|
||||
],
|
||||
"start_url": "/WebThrottle-EX/",
|
||||
"background_color": "#fff",
|
||||
"display": "standalone",
|
||||
"scope": "/WebThrottle-EX/",
|
||||
"related_applications": [{
|
||||
"platform": "webapp",
|
||||
"url": "https://DCC-EX.github.io/WebThrottle-EX/manifest.json"
|
||||
}],
|
||||
"theme_color": "#fff"
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
var cacheName = 'WebThrottle-EX';
|
||||
var filesToCache = [
|
||||
'/WebThrottle-EX/',
|
||||
'index.html',
|
||||
'images/favicon.ico',
|
||||
'images/carbon_fibre.png',
|
||||
'images/cover.jpg',
|
||||
'images/darkmkBigBackground.png',
|
||||
'images/darkmkBigFront.png',
|
||||
'images/full-logo.png',
|
||||
'images/lightBigBackground.png',
|
||||
'images/lightBigBackground@2x.png',
|
||||
'images/lightBigFront.png',
|
||||
'images/lightBigFront@2x.png',
|
||||
'images/pattern.png',
|
||||
'images/WebThrottle.png',
|
||||
'css/icons.css',
|
||||
'css/jquery-ui.css',
|
||||
'css/jquery.rotaryswitch.css',
|
||||
'css/layout.css',
|
||||
'css/pwa.css',
|
||||
'css/roundslider.min.css',
|
||||
'css/settings.css',
|
||||
'css/throttle.css',
|
||||
'css/fonts/icomoon.eot',
|
||||
'css/fonts/icomoon.svg',
|
||||
'css/fonts/icomoon.ttf',
|
||||
'css/fonts/icomoon.woff',
|
||||
'css/themes/dark.css',
|
||||
'css/themes/metallic.css',
|
||||
'js/addloco.js',
|
||||
'js/commandController.js',
|
||||
'js/emulator.js',
|
||||
'js/exwebthrottle.js',
|
||||
'js/fnMaster.js',
|
||||
'js/jquery-3.2.1.min.js',
|
||||
'js/jquery-ui.min.js',
|
||||
'js/jquery.rotaryswitch.js',
|
||||
'js/pwa.js',
|
||||
'js/roundslider.min.js',
|
||||
'js/storageController.js'
|
||||
];
|
||||
|
||||
self.addEventListener('install', function(e) {
|
||||
console.log('[ServiceWorker] Install');
|
||||
e.waitUntil(
|
||||
caches.open(cacheName).then(function(cache) {
|
||||
console.log('[ServiceWorker] Caching app shell');
|
||||
return cache.addAll(filesToCache);
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
self.addEventListener('activate', event => {
|
||||
event.waitUntil(self.clients.claim());
|
||||
});
|
||||
|
||||
self.addEventListener('fetch', event => {
|
||||
event.respondWith(
|
||||
caches.match(event.request, {ignoreSearch:true}).then(response => {
|
||||
return response || fetch(event.request);
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||