From bc30d303f7bf5974443e39631a04d999689d3566 Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Wed, 30 Dec 2020 08:01:28 -0600 Subject: [PATCH 01/32] upgrade to bootstrap-table 18.1 release --- web/css/bootstrap-table-page-jump-to.min.css | 2 +- web/css/bootstrap-table.min.css | 4 ++-- web/skins/classic/js/bootstrap-table-auto-refresh.min.js | 4 ++-- web/skins/classic/js/bootstrap-table-cookie.min.js | 4 ++-- web/skins/classic/js/bootstrap-table-export.min.js | 4 ++-- web/skins/classic/js/bootstrap-table-locale-all.min.js | 4 ++-- web/skins/classic/js/bootstrap-table-page-jump-to.min.js | 4 ++-- web/skins/classic/js/bootstrap-table-toolbar.min.js | 4 ++-- web/skins/classic/js/bootstrap-table.min.js | 4 ++-- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/web/css/bootstrap-table-page-jump-to.min.css b/web/css/bootstrap-table-page-jump-to.min.css index 0c8e7d527..62c8ad8d3 100644 --- a/web/css/bootstrap-table-page-jump-to.min.css +++ b/web/css/bootstrap-table-page-jump-to.min.css @@ -1,7 +1,7 @@ /** * bootstrap-table - An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation) * - * @version v1.17.1 + * @version v1.18.1 * @homepage https://bootstrap-table.com * @author wenzhixin (http://wenzhixin.net.cn/) * @license MIT diff --git a/web/css/bootstrap-table.min.css b/web/css/bootstrap-table.min.css index b44a03acb..e8f36ff7e 100644 --- a/web/css/bootstrap-table.min.css +++ b/web/css/bootstrap-table.min.css @@ -1,10 +1,10 @@ /** * bootstrap-table - An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation) * - * @version v1.17.1 + * @version v1.18.1 * @homepage https://bootstrap-table.com * @author wenzhixin (http://wenzhixin.net.cn/) * @license MIT */ -.bootstrap-table .fixed-table-toolbar::after{content:"";display:block;clear:both}.bootstrap-table .fixed-table-toolbar .bs-bars,.bootstrap-table .fixed-table-toolbar .columns,.bootstrap-table .fixed-table-toolbar .search{position:relative;margin-top:10px;margin-bottom:10px}.bootstrap-table .fixed-table-toolbar .columns .btn-group>.btn-group{display:inline-block;margin-left:-1px!important}.bootstrap-table .fixed-table-toolbar .columns .btn-group>.btn-group>.btn{border-radius:0}.bootstrap-table .fixed-table-toolbar .columns .btn-group>.btn-group:first-child>.btn{border-top-left-radius:4px;border-bottom-left-radius:4px}.bootstrap-table .fixed-table-toolbar .columns .btn-group>.btn-group:last-child>.btn{border-top-right-radius:4px;border-bottom-right-radius:4px}.bootstrap-table .fixed-table-toolbar .columns .dropdown-menu{text-align:left;max-height:300px;overflow:auto;-ms-overflow-style:scrollbar;z-index:1001}.bootstrap-table .fixed-table-toolbar .columns label{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.428571429}.bootstrap-table .fixed-table-toolbar .columns-left{margin-right:5px}.bootstrap-table .fixed-table-toolbar .columns-right{margin-left:5px}.bootstrap-table .fixed-table-toolbar .pull-right .dropdown-menu{right:0;left:auto}.bootstrap-table .fixed-table-container{position:relative;clear:both}.bootstrap-table .fixed-table-container .table{width:100%;margin-bottom:0!important}.bootstrap-table .fixed-table-container .table td,.bootstrap-table .fixed-table-container .table th{vertical-align:middle;box-sizing:border-box}.bootstrap-table .fixed-table-container .table thead th{vertical-align:bottom;padding:0;margin:0}.bootstrap-table .fixed-table-container .table thead th:focus{outline:0 solid transparent}.bootstrap-table .fixed-table-container .table thead th.detail{width:30px}.bootstrap-table .fixed-table-container .table thead th .th-inner{padding:.75rem;vertical-align:bottom;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bootstrap-table .fixed-table-container .table thead th .sortable{cursor:pointer;background-position:right;background-repeat:no-repeat;padding-right:30px!important}.bootstrap-table .fixed-table-container .table thead th .both{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAkElEQVQoz7X QMQ5AQBCF4dWQSJxC5wwax1Cq1e7BAdxD5SL+Tq/QCM1oNiJidwox0355mXnG/DrEtIQ6azioNZQxI0ykPhTQIwhCR+BmBYtlK7kLJYwWCcJA9M4qdrZrd8pPjZWPtOqdRQy320YSV17OatFC4euts6z39GYMKRPCTKY9UnPQ6P+GtMRfGtPnBCiqhAeJPmkqAAAAAElFTkSuQmCC")}.bootstrap-table .fixed-table-container .table thead th .asc{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZ0lEQVQ4y2NgGLKgquEuFxBPAGI2ahhWCsS/gDibUoO0gPgxEP8H4ttArEyuQYxAPBdqEAxPBImTY5gjEL9DM+wTENuQahAvEO9DMwiGdwAxOymGJQLxTyD+jgWDxCMZRsEoGAVoAADeemwtPcZI2wAAAABJRU5ErkJggg==)}.bootstrap-table .fixed-table-container .table thead th .desc{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZUlEQVQ4y2NgGAWjYBSggaqGu5FA/BOIv2PBIPFEUgxjB+IdQPwfC94HxLykus4GiD+hGfQOiB3J8SojEE9EM2wuSJzcsFMG4ttQgx4DsRalkZENxL+AuJQaMcsGxBOAmGvopk8AVz1sLZgg0bsAAAAASUVORK5CYII=)}.bootstrap-table .fixed-table-container .table tbody tr.selected td{background-color:rgba(0,0,0,.075)}.bootstrap-table .fixed-table-container .table tbody tr.no-records-found td{text-align:center}.bootstrap-table .fixed-table-container .table tbody tr .card-view{display:flex}.bootstrap-table .fixed-table-container .table tbody tr .card-view .card-view-title{font-weight:700;display:inline-block;min-width:30%;text-align:left!important}.bootstrap-table .fixed-table-container .table .bs-checkbox{text-align:center}.bootstrap-table .fixed-table-container .table .bs-checkbox label{margin-bottom:0}.bootstrap-table .fixed-table-container .table .bs-checkbox label input[type=checkbox],.bootstrap-table .fixed-table-container .table .bs-checkbox label input[type=radio]{margin:0 auto!important}.bootstrap-table .fixed-table-container .table.table-sm .th-inner{padding:.3rem}.bootstrap-table .fixed-table-container.fixed-height:not(.has-footer){border-bottom:1px solid #dee2e6}.bootstrap-table .fixed-table-container.fixed-height.has-card-view{border-top:1px solid #dee2e6;border-bottom:1px solid #dee2e6}.bootstrap-table .fixed-table-container.fixed-height .fixed-table-border{border-left:1px solid #dee2e6;border-right:1px solid #dee2e6}.bootstrap-table .fixed-table-container.fixed-height .table thead th{border-bottom:1px solid #dee2e6}.bootstrap-table .fixed-table-container.fixed-height .table-dark thead th{border-bottom:1px solid #32383e}.bootstrap-table .fixed-table-container .fixed-table-header{overflow:hidden}.bootstrap-table .fixed-table-container .fixed-table-body{overflow-x:auto;overflow-y:auto;height:100%}.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading{align-items:center;background:#fff;display:flex;justify-content:center;position:absolute;bottom:0;width:100%;z-index:1000;transition:visibility 0s,opacity .15s ease-in-out;opacity:0;visibility:hidden}.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.open{visibility:visible;opacity:1}.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap{align-items:baseline;display:flex;justify-content:center}.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .loading-text{margin-right:6px}.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-wrap{align-items:center;display:flex;justify-content:center}.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-dot,.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-wrap::after,.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-wrap::before{content:"";animation-duration:1.5s;animation-iteration-count:infinite;animation-name:LOADING;background:#212529;border-radius:50%;display:block;height:5px;margin:0 4px;opacity:0;width:5px}.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-dot{animation-delay:.3s}.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-wrap::after{animation-delay:.6s}.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.table-dark{background:#212529}.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.table-dark .animation-dot,.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.table-dark .animation-wrap::after,.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.table-dark .animation-wrap::before{background:#fff}.bootstrap-table .fixed-table-container .fixed-table-footer{overflow:hidden}.bootstrap-table .fixed-table-pagination::after{content:"";display:block;clear:both}.bootstrap-table .fixed-table-pagination>.pagination,.bootstrap-table .fixed-table-pagination>.pagination-detail{margin-top:10px;margin-bottom:10px}.bootstrap-table .fixed-table-pagination>.pagination-detail .pagination-info{line-height:34px;margin-right:5px}.bootstrap-table .fixed-table-pagination>.pagination-detail .page-list{display:inline-block}.bootstrap-table .fixed-table-pagination>.pagination-detail .page-list .btn-group{position:relative;display:inline-block;vertical-align:middle}.bootstrap-table .fixed-table-pagination>.pagination-detail .page-list .btn-group .dropdown-menu{margin-bottom:0}.bootstrap-table .fixed-table-pagination>.pagination ul.pagination{margin:0}.bootstrap-table .fixed-table-pagination>.pagination ul.pagination a{padding:6px 12px;line-height:1.428571429}.bootstrap-table .fixed-table-pagination>.pagination ul.pagination li.page-intermediate a{color:#c8c8c8}.bootstrap-table .fixed-table-pagination>.pagination ul.pagination li.page-intermediate a::before{content:'\2B05'}.bootstrap-table .fixed-table-pagination>.pagination ul.pagination li.page-intermediate a::after{content:'\27A1'}.bootstrap-table .fixed-table-pagination>.pagination ul.pagination li.disabled a{pointer-events:none;cursor:default}.bootstrap-table.fullscreen{position:fixed;top:0;left:0;z-index:1050;width:100%!important;background:#fff;height:calc(100vh);overflow-y:scroll}div.fixed-table-scroll-inner{width:100%;height:200px}div.fixed-table-scroll-outer{top:0;left:0;visibility:hidden;width:200px;height:150px;overflow:hidden}@keyframes LOADING{0%{opacity:0}50%{opacity:1}to{opacity:0}} \ No newline at end of file +.bootstrap-table .fixed-table-toolbar::after{content:"";display:block;clear:both}.bootstrap-table .fixed-table-toolbar .bs-bars,.bootstrap-table .fixed-table-toolbar .columns,.bootstrap-table .fixed-table-toolbar .search{position:relative;margin-top:10px;margin-bottom:10px}.bootstrap-table .fixed-table-toolbar .columns .btn-group>.btn-group{display:inline-block;margin-left:-1px!important}.bootstrap-table .fixed-table-toolbar .columns .btn-group>.btn-group>.btn{border-radius:0}.bootstrap-table .fixed-table-toolbar .columns .btn-group>.btn-group:first-child>.btn{border-top-left-radius:4px;border-bottom-left-radius:4px}.bootstrap-table .fixed-table-toolbar .columns .btn-group>.btn-group:last-child>.btn{border-top-right-radius:4px;border-bottom-right-radius:4px}.bootstrap-table .fixed-table-toolbar .columns .dropdown-menu{text-align:left;max-height:300px;overflow:auto;-ms-overflow-style:scrollbar;z-index:1001}.bootstrap-table .fixed-table-toolbar .columns label{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.428571429}.bootstrap-table .fixed-table-toolbar .columns-left{margin-right:5px}.bootstrap-table .fixed-table-toolbar .columns-right{margin-left:5px}.bootstrap-table .fixed-table-toolbar .pull-right .dropdown-menu{right:0;left:auto}.bootstrap-table .fixed-table-container{position:relative;clear:both}.bootstrap-table .fixed-table-container .table{width:100%;margin-bottom:0!important}.bootstrap-table .fixed-table-container .table td,.bootstrap-table .fixed-table-container .table th{vertical-align:middle;box-sizing:border-box}.bootstrap-table .fixed-table-container .table thead th{vertical-align:bottom;padding:0;margin:0}.bootstrap-table .fixed-table-container .table thead th:focus{outline:0 solid transparent}.bootstrap-table .fixed-table-container .table thead th.detail{width:30px}.bootstrap-table .fixed-table-container .table thead th .th-inner{padding:.75rem;vertical-align:bottom;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bootstrap-table .fixed-table-container .table thead th .sortable{cursor:pointer;background-position:right;background-repeat:no-repeat;padding-right:30px!important}.bootstrap-table .fixed-table-container .table thead th .both{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAQAAADYWf5HAAAAkElEQVQoz7X QMQ5AQBCF4dWQSJxC5wwax1Cq1e7BAdxD5SL+Tq/QCM1oNiJidwox0355mXnG/DrEtIQ6azioNZQxI0ykPhTQIwhCR+BmBYtlK7kLJYwWCcJA9M4qdrZrd8pPjZWPtOqdRQy320YSV17OatFC4euts6z39GYMKRPCTKY9UnPQ6P+GtMRfGtPnBCiqhAeJPmkqAAAAAElFTkSuQmCC")}.bootstrap-table .fixed-table-container .table thead th .asc{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZ0lEQVQ4y2NgGLKgquEuFxBPAGI2ahhWCsS/gDibUoO0gPgxEP8H4ttArEyuQYxAPBdqEAxPBImTY5gjEL9DM+wTENuQahAvEO9DMwiGdwAxOymGJQLxTyD+jgWDxCMZRsEoGAVoAADeemwtPcZI2wAAAABJRU5ErkJggg==)}.bootstrap-table .fixed-table-container .table thead th .desc{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAZUlEQVQ4y2NgGAWjYBSggaqGu5FA/BOIv2PBIPFEUgxjB+IdQPwfC94HxLykus4GiD+hGfQOiB3J8SojEE9EM2wuSJzcsFMG4ttQgx4DsRalkZENxL+AuJQaMcsGxBOAmGvopk8AVz1sLZgg0bsAAAAASUVORK5CYII=)}.bootstrap-table .fixed-table-container .table tbody tr.selected td{background-color:rgba(0,0,0,.075)}.bootstrap-table .fixed-table-container .table tbody tr.no-records-found td{text-align:center}.bootstrap-table .fixed-table-container .table tbody tr .card-view{display:flex}.bootstrap-table .fixed-table-container .table tbody tr .card-view .card-view-title{font-weight:700;display:inline-block;min-width:30%;text-align:left!important}.bootstrap-table .fixed-table-container .table tbody tr .card-view .card-view-value{width:100%}.bootstrap-table .fixed-table-container .table .bs-checkbox{text-align:center}.bootstrap-table .fixed-table-container .table .bs-checkbox label{margin-bottom:0}.bootstrap-table .fixed-table-container .table .bs-checkbox label input[type=checkbox],.bootstrap-table .fixed-table-container .table .bs-checkbox label input[type=radio]{margin:0 auto!important}.bootstrap-table .fixed-table-container .table.table-sm .th-inner{padding:.3rem}.bootstrap-table .fixed-table-container.fixed-height:not(.has-footer){border-bottom:1px solid #dee2e6}.bootstrap-table .fixed-table-container.fixed-height.has-card-view{border-top:1px solid #dee2e6;border-bottom:1px solid #dee2e6}.bootstrap-table .fixed-table-container.fixed-height .fixed-table-border{border-left:1px solid #dee2e6;border-right:1px solid #dee2e6}.bootstrap-table .fixed-table-container.fixed-height .table thead th{border-bottom:1px solid #dee2e6}.bootstrap-table .fixed-table-container.fixed-height .table-dark thead th{border-bottom:1px solid #32383e}.bootstrap-table .fixed-table-container .fixed-table-header{overflow:hidden}.bootstrap-table .fixed-table-container .fixed-table-body{overflow-x:auto;overflow-y:auto;height:100%}.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading{align-items:center;background:#fff;display:flex;justify-content:center;position:absolute;bottom:0;width:100%;z-index:1000;transition:visibility 0s,opacity .15s ease-in-out;opacity:0;visibility:hidden}.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.open{visibility:visible;opacity:1}.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap{align-items:baseline;display:flex;justify-content:center}.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .loading-text{margin-right:6px}.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-wrap{align-items:center;display:flex;justify-content:center}.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-dot,.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-wrap::after,.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-wrap::before{content:"";animation-duration:1.5s;animation-iteration-count:infinite;animation-name:LOADING;background:#212529;border-radius:50%;display:block;height:5px;margin:0 4px;opacity:0;width:5px}.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-dot{animation-delay:.3s}.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading .loading-wrap .animation-wrap::after{animation-delay:.6s}.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.table-dark{background:#212529}.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.table-dark .animation-dot,.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.table-dark .animation-wrap::after,.bootstrap-table .fixed-table-container .fixed-table-body .fixed-table-loading.table-dark .animation-wrap::before{background:#fff}.bootstrap-table .fixed-table-container .fixed-table-footer{overflow:hidden}.bootstrap-table .fixed-table-pagination::after{content:"";display:block;clear:both}.bootstrap-table .fixed-table-pagination>.pagination,.bootstrap-table .fixed-table-pagination>.pagination-detail{margin-top:10px;margin-bottom:10px}.bootstrap-table .fixed-table-pagination>.pagination-detail .pagination-info{line-height:34px;margin-right:5px}.bootstrap-table .fixed-table-pagination>.pagination-detail .page-list{display:inline-block}.bootstrap-table .fixed-table-pagination>.pagination-detail .page-list .btn-group{position:relative;display:inline-block;vertical-align:middle}.bootstrap-table .fixed-table-pagination>.pagination-detail .page-list .btn-group .dropdown-menu{margin-bottom:0}.bootstrap-table .fixed-table-pagination>.pagination ul.pagination{margin:0}.bootstrap-table .fixed-table-pagination>.pagination ul.pagination li.page-intermediate a{color:#c8c8c8}.bootstrap-table .fixed-table-pagination>.pagination ul.pagination li.page-intermediate a::before{content:'\2B05'}.bootstrap-table .fixed-table-pagination>.pagination ul.pagination li.page-intermediate a::after{content:'\27A1'}.bootstrap-table .fixed-table-pagination>.pagination ul.pagination li.disabled a{pointer-events:none;cursor:default}.bootstrap-table.fullscreen{position:fixed;top:0;left:0;z-index:1050;width:100%!important;background:#fff;height:calc(100vh);overflow-y:scroll}.bootstrap-table.bootstrap4 .pagination-lg .page-link,.bootstrap-table.bootstrap5 .pagination-lg .page-link{padding:.5rem 1rem}div.fixed-table-scroll-inner{width:100%;height:200px}div.fixed-table-scroll-outer{top:0;left:0;visibility:hidden;width:200px;height:150px;overflow:hidden}@keyframes LOADING{0%{opacity:0}50%{opacity:1}to{opacity:0}} \ No newline at end of file diff --git a/web/skins/classic/js/bootstrap-table-auto-refresh.min.js b/web/skins/classic/js/bootstrap-table-auto-refresh.min.js index 096bc0ed9..62d74ac7a 100644 --- a/web/skins/classic/js/bootstrap-table-auto-refresh.min.js +++ b/web/skins/classic/js/bootstrap-table-auto-refresh.min.js @@ -1,10 +1,10 @@ /** * bootstrap-table - An extended table to integration with some of the most widely used CSS frameworks. (Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation) * - * @version v1.17.1 + * @version v1.18.1 * @homepage https://bootstrap-table.com * @author wenzhixin (http://wenzhixin.net.cn/) * @license MIT */ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).jQuery)}(this,(function(t){"use strict";function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=e(t),r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(t,e){return t(e={exports:{}},e.exports),e.exports}var i=function(t){return t&&t.Math==Math&&t},u=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof r&&r)||Function("return this")(),c=function(t){try{return!!t()}catch(t){return!0}},f=!c((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),a={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,l={f:s&&!a.call({1:2},1)?function(t){var e=s(this,t);return!!e&&e.enumerable}:a},p=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},h={}.toString,y=function(t){return h.call(t).slice(8,-1)},d="".split,b=c((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==y(t)?d.call(t,""):Object(t)}:Object,v=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},g=function(t){return b(v(t))},m=function(t){return"object"==typeof t?null!==t:"function"==typeof t},w=function(t,e){if(!m(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!m(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!m(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!m(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},O={}.hasOwnProperty,S=function(t,e){return O.call(t,e)},j=u.document,R=m(j)&&m(j.createElement),T=function(t){return R?j.createElement(t):{}},A=!f&&!c((function(){return 7!=Object.defineProperty(T("div"),"a",{get:function(){return 7}}).a})),P=Object.getOwnPropertyDescriptor,E={f:f?P:function(t,e){if(t=g(t),e=w(e,!0),A)try{return P(t,e)}catch(t){}if(S(t,e))return p(!l.f.call(t,e),t[e])}},x=function(t){if(!m(t))throw TypeError(String(t)+" is not an object");return t},_=Object.defineProperty,I={f:f?_:function(t,e,n){if(x(t),e=w(e,!0),x(n),A)try{return _(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},k=f?function(t,e,n){return I.f(t,e,p(1,n))}:function(t,e,n){return t[e]=n,t},C=function(t,e){try{k(u,t,e)}catch(n){u[t]=e}return e},F="__core-js_shared__",M=u[F]||C(F,{}),D=Function.toString;"function"!=typeof M.inspectSource&&(M.inspectSource=function(t){return D.call(t)});var B,L,N,q=M.inspectSource,z=u.WeakMap,W="function"==typeof z&&/native code/.test(q(z)),$=o((function(t){(t.exports=function(t,e){return M[t]||(M[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),G=0,K=Math.random(),Q=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++G+K).toString(36)},V=$("keys"),X=function(t){return V[t]||(V[t]=Q(t))},Y={},H=u.WeakMap;if(W){var J=new H,U=J.get,Z=J.has,tt=J.set;B=function(t,e){return tt.call(J,t,e),e},L=function(t){return U.call(J,t)||{}},N=function(t){return Z.call(J,t)}}else{var et=X("state");Y[et]=!0,B=function(t,e){return k(t,et,e),e},L=function(t){return S(t,et)?t[et]:{}},N=function(t){return S(t,et)}}var nt,rt,ot={set:B,get:L,has:N,enforce:function(t){return N(t)?L(t):B(t,{})},getterFor:function(t){return function(e){var n;if(!m(e)||(n=L(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}},it=o((function(t){var e=ot.get,n=ot.enforce,r=String(String).split("String");(t.exports=function(t,e,o,i){var c=!!i&&!!i.unsafe,f=!!i&&!!i.enumerable,a=!!i&&!!i.noTargetGet;"function"==typeof o&&("string"!=typeof e||S(o,"name")||k(o,"name",e),n(o).source=r.join("string"==typeof e?e:"")),t!==u?(c?!a&&t[e]&&(f=!0):delete t[e],f?t[e]=o:k(t,e,o)):f?t[e]=o:C(e,o)})(Function.prototype,"toString",(function(){return"function"==typeof this&&e(this).source||q(this)}))})),ut=u,ct=function(t){return"function"==typeof t?t:void 0},ft=function(t,e){return arguments.length<2?ct(ut[t])||ct(u[t]):ut[t]&&ut[t][e]||u[t]&&u[t][e]},at=Math.ceil,st=Math.floor,lt=function(t){return isNaN(t=+t)?0:(t>0?st:at)(t)},pt=Math.min,ht=function(t){return t>0?pt(lt(t),9007199254740991):0},yt=Math.max,dt=Math.min,bt=function(t){return function(e,n,r){var o,i=g(e),u=ht(i.length),c=function(t,e){var n=lt(t);return n<0?yt(n+e,0):dt(n,e)}(r,u);if(t&&n!=n){for(;u>c;)if((o=i[c++])!=o)return!0}else for(;u>c;c++)if((t||c in i)&&i[c]===n)return t||c||0;return!t&&-1}},vt={includes:bt(!0),indexOf:bt(!1)}.indexOf,gt=function(t,e){var n,r=g(t),o=0,i=[];for(n in r)!S(Y,n)&&S(r,n)&&i.push(n);for(;e.length>o;)S(r,n=e[o++])&&(~vt(i,n)||i.push(n));return i},mt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],wt=mt.concat("length","prototype"),Ot={f:Object.getOwnPropertyNames||function(t){return gt(t,wt)}},St={f:Object.getOwnPropertySymbols},jt=ft("Reflect","ownKeys")||function(t){var e=Ot.f(x(t)),n=St.f;return n?e.concat(n(t)):e},Rt=function(t,e){for(var n=jt(e),r=I.f,o=E.f,i=0;i=74)&&(nt=Kt.match(/Chrome\/(\d+)/))&&(rt=nt[1]);var Yt,Ht=rt&&+rt,Jt=Wt("species"),Ut=Wt("isConcatSpreadable"),Zt=9007199254740991,te="Maximum allowed index exceeded",ee=Ht>=51||!c((function(){var t=[];return t[Ut]=!1,t.concat()[0]!==t})),ne=(Yt="concat",Ht>=51||!c((function(){var t=[];return(t.constructor={})[Jt]=function(){return{foo:1}},1!==t[Yt](Boolean).foo}))),re=function(t){if(!m(t))return!1;var e=t[Ut];return void 0!==e?!!e:Ft(t)};Ct({target:"Array",proto:!0,forced:!ee||!ne},{concat:function(t){var e,n,r,o,i,u=Mt(this),c=Gt(u,0),f=0;for(e=-1,r=arguments.length;eZt)throw TypeError(te);for(n=0;n=Zt)throw TypeError(te);Dt(c,f++,i)}return c.length=f,c}});var oe,ie=function(t,e,n){if(function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function")}(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}},ue=[].push,ce=function(t){var e=1==t,n=2==t,r=3==t,o=4==t,i=6==t,u=5==t||i;return function(c,f,a,s){for(var l,p,h=Mt(c),y=b(h),d=ie(f,a,3),v=ht(y.length),g=0,m=s||Gt,w=e?m(c,v):n?m(c,0):void 0;v>g;g++)if((u||g in y)&&(p=d(l=y[g],g,h),t))if(e)w[g]=p;else if(p)switch(t){case 3:return!0;case 5:return l;case 6:return g;case 2:ue.call(w,l)}else if(o)return!1;return i?-1:r||o?o:w}},fe={forEach:ce(0),map:ce(1),filter:ce(2),some:ce(3),every:ce(4),find:ce(5),findIndex:ce(6)},ae=Object.keys||function(t){return gt(t,mt)},se=f?Object.defineProperties:function(t,e){x(t);for(var n,r=ae(e),o=r.length,i=0;o>i;)I.f(t,n=r[i++],e[n]);return t},le=ft("document","documentElement"),pe=X("IE_PROTO"),he=function(){},ye=function(t){return" - - From bd18904bf435abbfe2ff120d385899b07c50c10b Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Mon, 4 Jan 2021 15:33:26 -0600 Subject: [PATCH 26/32] remove js files that define popupSizes --- web/skins/classic/includes/functions.php | 10 ---- web/skins/classic/js/base.js | 76 ------------------------ web/skins/classic/js/classic.js | 76 ------------------------ 3 files changed, 162 deletions(-) delete mode 100644 web/skins/classic/js/base.js delete mode 100644 web/skins/classic/js/classic.js diff --git a/web/skins/classic/includes/functions.php b/web/skins/classic/includes/functions.php index 268db4824..49c40373d 100644 --- a/web/skins/classic/includes/functions.php +++ b/web/skins/classic/includes/functions.php @@ -861,7 +861,6 @@ function xhtmlFooter() { global $skin; global $basename; $skinJsPhpFile = getSkinFile('js/skin.js.php'); - $cssJsFile = getSkinFile('js/'.$css.'.js'); $viewJsFile = getSkinFile('views/js/'.$basename.'.js'); $viewJsPhpFile = getSkinFile('views/js/'.$basename.'.js.php'); ?> @@ -912,15 +911,6 @@ function xhtmlFooter() { ?> - - - - diff --git a/web/skins/classic/js/base.js b/web/skins/classic/js/base.js deleted file mode 100644 index a3a99f773..000000000 --- a/web/skins/classic/js/base.js +++ /dev/null @@ -1,76 +0,0 @@ -// -// ZoneMinder base static javascript file, $Date$, $Revision$ -// Copyright (C) 2001-2008 Philip Coombes -// -// 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 2 -// 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, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -// - -// -// This file should only contain static JavaScript and no php. -// Use skin.js.php for JavaScript that need pre-processing -// - -// Javascript window sizes -/* eslint-disable key-spacing */ -var popupSizes = { - 'bandwidth': {'width': 300, 'height': 200}, - 'console': {'width': 750, 'height': 312}, - 'control': {'width': 480, 'height': 480}, - 'controlcaps': {'width': 780, 'height': 320}, - 'controlcap': {'width': 600, 'height': 500}, - 'cycle': {'addWidth': 32, 'minWidth': 384, 'addHeight': 62}, - 'device': {'width': 260, 'height': 150}, - 'devices': {'width': 400, 'height': 240}, - 'donate': {'width': 500, 'height': 480}, - 'download': {'width': 350, 'height': 315}, - 'event': {'addWidth': 108, 'minWidth': 496, 'addHeight': 230, 'minHeight': 540}, - 'eventdetail': {'width': 600, 'height': 420}, - 'events': {'width': 1220, 'height': 780}, - 'export': {'width': 500, 'height': 640}, - 'filter': {'width': 900, 'height': 700}, - 'frame': {'addWidth': 32, 'minWidth': 384, 'addHeight': 200}, - 'frames': {'addWidth': 800, 'addHeight': 600}, - 'function': {'width': 350, 'height': 260}, - 'group': {'width': 760, 'height': 600}, - 'groups': {'width': 540, 'height': 420}, - 'image': {'addWidth': 48, 'addHeight': 80}, - 'log': {'width': 1180, 'height': 720}, - 'login': {'width': 720, 'height': 480}, - 'logout': {'width': 260, 'height': 150}, - 'monitor': {'width': 800, 'height': 780}, - 'monitorpreset':{'width': 440, 'height': 210}, - 'monitorprobe': {'width': 500, 'height': 275}, - 'monitorselect':{'width': 160, 'height': 200}, - 'montage': {'width': -1, 'height': -1}, - 'onvifprobe': {'width': 700, 'height': 550}, - 'optionhelp': {'width': 400, 'height': 400}, - 'options': {'width': 1000, 'height': 660}, - 'preset': {'width': 300, 'height': 220}, - 'server': {'width': 600, 'height': 405}, - 'settings': {'width': 250, 'height': 335}, - 'shutdown': {'width': 400, 'height': 400}, - 'state': {'width': 400, 'height': 170}, - 'stats': {'width': 840, 'height': 200}, - 'storage': {'width': 600, 'height': 425}, - 'timeline': {'width': 760, 'height': 540}, - 'user': {'width': 460, 'height': 720}, - 'version': {'width': 360, 'height': 210}, - 'video': {'width': 420, 'height': 360}, - 'videoview': {'addWidth': 48, 'addHeight': 80}, - 'watch': {'addWidth': 96, 'minWidth': 420, 'addHeight': 384}, - 'zone': {'addWidth': 520, 'addHeight': 260, 'minHeight': 600}, - 'zones': {'addWidth': 72, 'addHeight': 232} -}; -/* eslint-enable key-spacing */ diff --git a/web/skins/classic/js/classic.js b/web/skins/classic/js/classic.js deleted file mode 100644 index 447f31aae..000000000 --- a/web/skins/classic/js/classic.js +++ /dev/null @@ -1,76 +0,0 @@ -// -// ZoneMinder base static javascript file, $Date$, $Revision$ -// Copyright (C) 2001-2008 Philip Coombes -// -// 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 2 -// 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, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -// - -// -// This file should only contain static JavaScript and no php. -// Use skin.js.php for JavaScript that need pre-processing -// - -// Javascript window sizes -/* eslint-disable key-spacing */ -var popupSizes = { - 'bandwidth': {'width': 300, 'height': 220}, - 'console': {'width': 750, 'height': 312}, - 'control': {'width': 380, 'height': 480}, - 'controlcaps': {'width': 780, 'height': 320}, - 'controlcap': {'width': 600, 'height': 400}, - 'cycle': {'addWidth': 32, 'minWidth': 384, 'addHeight': 62}, - 'device': {'width': 260, 'height': 150}, - 'devices': {'width': 400, 'height': 240}, - 'donate': {'width': 500, 'height': 480}, - 'download': {'width': 350, 'height': 215}, - 'event': {'addWidth': 108, 'minWidth': 496, 'addHeight': 230, 'minHeight': 540}, - 'eventdetail': {'width': 600, 'height': 420}, - 'events': {'width': 1020, 'height': 780}, - 'export': {'width': 400, 'height': 340}, - 'filter': {'width': 820, 'height': 700}, - 'frame': {'addWidth': 32, 'minWidth': 384, 'addHeight': 200}, - 'frames': {'width': 600, 'height': 700}, - 'function': {'width': 400, 'height': 250}, - 'group': {'width': 660, 'height': 520}, - 'groups': {'width': 440, 'height': 220}, - 'image': {'addWidth': 48, 'addHeight': 80}, - 'log': {'width': 1080, 'height': 720}, - 'login': {'width': 720, 'height': 480}, - 'logout': {'width': 460, 'height': 300}, - 'monitor': {'width': 700, 'height': 680}, - 'monitorpreset':{'width': 440, 'height': 200}, - 'monitorprobe': {'width': 500, 'height': 240}, - 'monitorselect':{'width': 160, 'height': 200}, - 'monitors': {'width': 300, 'height': 640}, - 'montage': {'width': -1, 'height': -1}, - 'onvifprobe': {'width': 700, 'height': 550}, - 'optionhelp': {'width': 400, 'height': 320}, - 'options': {'width': 1000, 'height': 660}, - 'preset': {'width': 300, 'height': 120}, - 'server': {'width': 600, 'height': 405}, - 'settings': {'width': 220, 'height': 225}, - 'state': {'width': 370, 'height': 134}, - 'stats': {'width': 840, 'height': 200}, - 'storage': {'width': 600, 'height': 425}, - 'timeline': {'width': 760, 'height': 540}, - 'user': {'width': 360, 'height': 720}, - 'version': {'width': 360, 'height': 140}, - 'video': {'width': 420, 'height': 360}, - 'videoview': {'addWidth': 48, 'addHeight': 80}, - 'watch': {'addWidth': 96, 'minWidth': 420, 'addHeight': 384}, - 'zone': {'addWidth': 450, 'addHeight': 200, 'minHeight': 450}, - 'zones': {'addWidth': 72, 'addHeight': 232} -}; -/* eslint-enable key-spacing */ From ebbd2888f02d8e94c6033ae4323da65490cfa4d5 Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Mon, 4 Jan 2021 15:40:53 -0600 Subject: [PATCH 27/32] tableExport plugin is no longer used --- web/skins/classic/includes/functions.php | 1 - web/skins/classic/js/tableExport.min.js | 93 ------------------------ 2 files changed, 94 deletions(-) delete mode 100644 web/skins/classic/js/tableExport.min.js diff --git a/web/skins/classic/includes/functions.php b/web/skins/classic/includes/functions.php index 49c40373d..e468a0e10 100644 --- a/web/skins/classic/includes/functions.php +++ b/web/skins/classic/includes/functions.php @@ -875,7 +875,6 @@ function xhtmlFooter() { e&&"undefined"!==typeof T[e]&&-1!==c.inArray(T[e],a.ignoreColumn))&&(p=!0):p=!0;return p}function B(b,d,e,p,f){if("function"===typeof f){var l=!1;"function"===typeof a.onIgnoreRow&&(l=a.onIgnoreRow(c(b),e));if(!1===l&&(0===a.ignoreRow.length||-1===c.inArray(e,a.ignoreRow)&&-1===c.inArray(e-p,a.ignoreRow))&&I(c(b))){var q=A(c(b),d),h=0;q.each(function(b){var a=c(this),d,l=O(this),p=U(this);c.each(G, -function(){if(e>=this.s.r&&e<=this.e.r&&h>=this.s.c&&h<=this.e.c)for(d=0;d<=this.e.c-this.s.c;++d)f(null,e,h++)});if(!1===sa(a,q.length,b)){if(p||l)l=l||1,G.push({s:{r:e,c:h},e:{r:e+(p||1)-1,c:h+l-1}});f(this,e,h++)}if(l)for(d=0;d=this.s.r&&e<=this.e.r&&h>=this.s.c&&h<=this.e.c)for(da=0;da<=this.e.c-this.s.c;++da)f(null,e,h++)})}}}function ta(b,a,e,c){if("undefined"!==typeof c.images&&(e=c.images[e],"undefined"!==typeof e)){a=a.getBoundingClientRect(); -var d=b.width/b.height,l=a.width/a.height,p=b.width,h=b.height,z=19.049976/25.4,g=0;l<=d?(h=Math.min(b.height,a.height),p=a.width*h/a.height):l>d&&(p=Math.min(b.width,a.width),h=a.height*p/a.width);p*=z;h*=z;hb.textPos.x&&p+g>b.textPos.x+b.width&&(0<=".,!%*;:=-".indexOf(z.charAt(0))&&(k=z.charAt(0),g=e.doc.getStringUnitWidth(k)*e.doc.internal.getFontSize(),p+g<=b.textPos.x+b.width&&(e.doc.autoTableText(k,p,f,l),z=z.substring(1,z.length)),g=e.doc.getStringUnitWidth(z)*e.doc.internal.getFontSize()),p=b.textPos.x,f+=e.doc.internal.getFontSize());if("visible"!==b.styles.overflow)for(;z.length&&p+g>b.textPos.x+b.width;)z=z.substring(0,z.length-1),g=e.doc.getStringUnitWidth(z)*e.doc.internal.getFontSize(); -e.doc.autoTableText(z,p,f,l);p+=g}if(q||h)c(d).is("b")?q=!1:c(d).is("i")&&(h=!1),e.doc.setFontType(q||h?q?"bold":"italic":"normal");d=d.nextSibling}b.textPos.x=p;b.textPos.y=f}else e.doc.autoTableText(b.text,b.textPos.x,b.textPos.y,l)}}function W(b,a,e){return null==b?"":b.toString().replace(new RegExp(null==a?"":a.toString().replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1"),"g"),e)}function ka(b){return null==b?"":b.toString().replace(/^\s+/,"")}function la(b){return null==b?"":b.toString().replace(/\s+$/, -"")}function La(b){if(0===a.date.html.length)return!1;a.date.pattern.lastIndex=0;var d=a.date.pattern.exec(b);if(null==d)return!1;b=+d[a.date.match_y];if(0>b||8099]*)>)/gi,"\u2060"),n=c("
").html(m).contents();b=!1;m="";c.each(n.text().split("\u2028"),function(b,d){0b?1:0)).split(".");1===n.length&&(n[1]="");var t=3b?"-":"")+(a.numbers.output.thousandsSeparator?(t?n[0].substr(0,t)+a.numbers.output.thousandsSeparator:"")+n[0].substr(t).replace(/(\d{3})(?=\d)/g,"$1"+a.numbers.output.thousandsSeparator):n[0])+(n[1].length?a.numbers.output.decimalMark+n[1]:"")}}else f=h;!0===a.escape&&(f=escape(f));"function"===typeof a.onCellData&&(f=a.onCellData(q,d,e,f,l),q.data("teUserDefText",1))}void 0!== -p&&(p.type=l);return f}function Aa(b){return 0l?f+=String.fromCharCode(l):(127l?f+=String.fromCharCode(l>>6|192):(f+=String.fromCharCode(l>>12|224),f+=String.fromCharCode(l>>6&63|128)),f+=String.fromCharCode(l& -63|128))}a=f}for(;p>2;q=(q&3)<<4|f>>4;var h=(f&15)<<2|b>>6;var g=b&63;isNaN(f)?h=g=64:isNaN(b)&&(g=64);c=c+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(l)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(q)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g)}return c} -var a={csvEnclosure:'"',csvSeparator:",",csvUseBOM:!0,date:{html:"dd/mm/yyyy"},displayTableName:!1,escape:!1,exportHiddenCells:!1,fileName:"tableExport",htmlContent:!1,htmlHyperlink:"content",ignoreColumn:[],ignoreRow:[],jsonScope:"all",jspdf:{orientation:"p",unit:"pt",format:"a4",margins:{left:20,right:10,top:10,bottom:10},onDocCreated:null,autotable:{styles:{cellPadding:2,rowHeight:12,fontSize:8,fillColor:255,textColor:50,fontStyle:"normal",overflow:"ellipsize",halign:"inherit",valign:"middle"}, -headerStyles:{fillColor:[52,73,94],textColor:255,fontStyle:"bold",halign:"inherit",valign:"middle"},alternateRowStyles:{fillColor:245},tableExport:{doc:null,onAfterAutotable:null,onBeforeAutotable:null,onAutotableText:null,onTable:null,outputImages:!0}}},mso:{fileFormat:"xlshtml",onMsoNumberFormat:null,pageFormat:"a4",pageOrientation:"portrait",rtl:!1,styles:[],worksheetName:"",xslx:{formatId:{date:14,numbers:2}}},numbers:{html:{decimalMark:".",thousandsSeparator:","},output:{decimalMark:".",thousandsSeparator:","}}, -onAfterSaveToFile:null,onBeforeSaveToFile:null,onCellData:null,onCellHtmlData:null,onCellHtmlHyperlink:null,onIgnoreRow:null,onTableExportBegin:null,onTableExportEnd:null,outputMode:"file",pdfmake:{enabled:!1,docDefinition:{pageOrientation:"portrait",defaultStyle:{font:"Roboto"}},fonts:{}},preserve:{leadingWS:!1,trailingWS:!1},preventInjection:!0,sql:{tableEnclosure:"`",columnEnclosure:"`"},tbodySelector:"tr",tfootSelector:"tr",theadSelector:"tr",tableName:"Table",type:"csv"},N={a0:[2383.94,3370.39], -a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13, -918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]},C=this,ha=null,u=[],w=[],n=0,t="",T=[],G=[],Da,J=[],V=!1;c.extend(!0,a,k);"xlsx"===a.type&&(a.mso.fileFormat=a.type,a.type="excel");"undefined"!==typeof a.excelFileFormat&&"undefined"===a.mso.fileFormat&&(a.mso.fileFormat= -a.excelFileFormat);"undefined"!==typeof a.excelPageFormat&&"undefined"===a.mso.pageFormat&&(a.mso.pageFormat=a.excelPageFormat);"undefined"!==typeof a.excelPageOrientation&&"undefined"===a.mso.pageOrientation&&(a.mso.pageOrientation=a.excelPageOrientation);"undefined"!==typeof a.excelRTL&&"undefined"===a.mso.rtl&&(a.mso.rtl=a.excelRTL);"undefined"!==typeof a.excelstyles&&"undefined"===a.mso.styles&&(a.mso.styles=a.excelstyles);"undefined"!==typeof a.onMsoNumberFormat&&"undefined"===a.mso.onMsoNumberFormat&& -(a.mso.onMsoNumberFormat=a.onMsoNumberFormat);"undefined"!==typeof a.worksheetName&&"undefined"===a.mso.worksheetName&&(a.mso.worksheetName=a.worksheetName);a.mso.pageOrientation="l"===a.mso.pageOrientation.substr(0,1)?"landscape":"portrait";a.date.html=a.date.html||"";if(a.date.html.length){k=[];k.dd="(3[01]|[12][0-9]|0?[1-9])";k.mm="(1[012]|0?[1-9])";k.yyyy="((?:1[6-9]|2[0-2])\\d{2})";k.yy="(\\d{2})";var r=a.date.html.match(/[^a-zA-Z0-9]/)[0];r=a.date.html.toLowerCase().split(r);a.date.regex="^\\s*"; -a.date.regex+=k[r[0]];a.date.regex+="(.)";a.date.regex+=k[r[1]];a.date.regex+="\\2";a.date.regex+=k[r[2]];a.date.regex+="\\s*$";a.date.pattern=new RegExp(a.date.regex,"g");k=r.indexOf("dd")+1;a.date.match_d=k+(1"+E(a,c,e)+""});n++});Q+="";var Ea=1;w=v(c(C));c(w).each(function(){var a=1;t="";B(this,"td,th",n,u.length+w.length,function(b,c,g){t+=""+E(b,c,g)+"";a++});0"!==t&&(Q+=''+t+"",Ea++);n++}); -Q+="";if("string"===a.outputMode)return Q;if("base64"===a.outputMode)return K(Q);M(Q,a.fileName+".xml","application/xml","utf-8","base64",!1)}else if("excel"===a.type&&"xmlss"===a.mso.fileFormat){var ra=[],F=[];c(C).filter(function(){return I(c(this))}).each(function(){function b(a,b,d){var f=[];c(a).each(function(){var b=0,e=0;t="";B(this,"td,th",n,d+a.length,function(a,d,l){if(null!==a){var h="";d=E(a,d,l);l="String";if(!1!==jQuery.isNumeric(d))l="Number";else{var g=Ma(d);!1!== -g&&(d=g,l="Number",h+=' ss:StyleID="pct1"')}"Number"!==l&&(d=d.replace(/\n/g,"
"));g=O(a);a=U(a);c.each(f,function(){if(n>=this.s.r&&n<=this.e.r&&e>=this.s.c&&e<=this.e.c)for(var a=0;a<=this.e.c-this.s.c;++a)e++,b++});if(a||g)a=a||1,g=g||1,f.push({s:{r:n,c:e},e:{r:n+a-1,c:e+g-1}});1'+c("
").text(d).html()+"\r"; -e++}});0\r'+t+"\r");n++});return a.length}var d=c(this),e="";"string"===typeof a.mso.worksheetName&&a.mso.worksheetName.length?e=a.mso.worksheetName+" "+(F.length+1):"undefined"!==typeof a.mso.worksheetName[F.length]&&(e=a.mso.worksheetName[F.length]);e.length||(e=d.find("caption").text()||"");e.length||(e="Table "+(F.length+1));e=c.trim(e.replace(/[\\\/[\]*:?'"]/g,"").substring(0,31));F.push(c("
").text(e).html());!1===a.exportHiddenCells&&(J= -d.find("tr, th, td").filter(":hidden"),V=0\r";e=b(y(d),"th,td",0);b(v(d),"td,th",e);H+="\r";ra.push(H)});k={};r={};for(var m,R,Y=0,da=F.length;Y\r\r\r\r '+ -(new Date).toISOString()+'\r\r\r \r\r\r 9000\r 13860\r 0\r 0\r False\r False\r\r\r \r \r \r\r'; -for(r=0;r\r'+ra[r],k=a.mso.rtl?k+'\r\r\r':k+'\r',k+="\r";k+="\r";if("string"===a.outputMode)return k;if("base64"===a.outputMode)return K(k);M(k,a.fileName+".xml","application/xml","utf-8","base64",!1)}else if("excel"=== -a.type&&"xlsx"===a.mso.fileFormat){var aa=[],Fa=XLSX.utils.book_new();c(C).filter(function(){return I(c(this))}).each(function(){for(var b=c(this),d={},e=this.getElementsByTagName("tr"),g={s:{r:0,c:0},e:{r:0,c:0}},f=[],l,q=[],h=0,k=0,m,n,t,u,r,w=XLSX.SSF.get_table();hk;++h)if(m=e[h],n=!1,"function"===typeof a.onIgnoreRow&&(n=a.onIgnoreRow(c(m),h)),!0!==n&&(0===a.ignoreRow.length||-1===c.inArray(h,a.ignoreRow)&&-1===c.inArray(h-e.length,a.ignoreRow))&&!1!==I(c(m))){var y=m.children, -C=0;for(m=0;mx||36x||48===x)B="n";else if("date"===D.type||13x||44x||56===x)B="d"}else B="s";if(null!=l)if(0===l.length)v.t="z";else if(0!==l.trim().length&&"s"!==B)if("function"===D.type)v={f:l};else if("TRUE"===l)v={t:"b",v:!0};else if("FALSE"===l)v={t:"b",v:!1};else if(""===B&&c(r).find("a").length)l= -"href"!==a.htmlHyperlink?l:"",v={f:'=HYPERLINK("'+c(r).find("a").attr("href")+(l.length?'","'+l:"")+'")'};else if("n"===B||isFinite(Ca(l,a.numbers.output))){if(r=Ca(l,a.numbers.output),0===x&&"function"!==typeof a.mso.xslx.formatId.numbers&&(x=a.mso.xslx.formatId.numbers),isFinite(r)||isFinite(l))v={t:"n",v:isFinite(r)?r:l,z:"string"===typeof x?x:x in w?w[x]:"0.00"}}else if(!1!==(r=La(l))||"d"===B)0===x&&"function"!==typeof a.mso.xslx.formatId.date&&(x=a.mso.xslx.formatId.date),v={t:"d",v:!1!==r? -r:l,z:"string"===typeof x?x:x in w?w[x]:"m/d/yy"};d[na({c:n,r:k})]=v;g.e.c";u=y(b);c(u).each(function(){var b=c(this);t="";B(this,"th,td",n,u.length,function(c,d,f){if(null!==c){var e="";t+=""}});0"+t+"");n++});H+="";w=v(b);c(w).each(function(){var b=c(this);t="";B(this,"td,th",n,u.length+ -w.length,function(d,g,f){if(null!==d){var e=E(d,g,f),q="",h=c(d).attr("data-tableexport-msonumberformat");"undefined"===typeof h&&"function"===typeof a.mso.onMsoNumberFormat&&(h=a.mso.onMsoNumberFormat(d,g,f));"undefined"!==typeof h&&""!==h&&(q="style=\"mso-number-format:'"+h+"'");if(a.mso.styles.length){g=document.defaultView.getComputedStyle(d,null);f=document.defaultView.getComputedStyle(b[0],null);for(var k in a.mso.styles)h=g[a.mso.styles[k]],""===h&&(h=f[a.mso.styles[k]]),""!==h&&"0px none rgb(0, 0, 0)"!== -h&&"rgba(0, 0, 0, 0)"!==h&&(q+=""===q?'style="':";",q+=a.mso.styles[k]+":"+h)}t+=""));t+=">"+e+""}});0"+t+"");n++});a.displayTableName&&(H+=""+E(c("

"+a.tableName+"

"))+"");H+=""});m=''+('');m+="";"excel"===k&&(m+="\x3c!--[if gte mso 9]>",m+="",m+="",m+="",m+="",m+="",m+=ba,m+="",m+="",m+="",a.mso.rtl&&(m+=""),m+="",m+="",m+="",m+="", -m+="",m+="";m+="@page { size:"+a.mso.pageOrientation+"; mso-page-orientation:"+a.mso.pageOrientation+"; }";m+="@page Section1 {size:"+N[a.mso.pageFormat][0]+"pt "+N[a.mso.pageFormat][1]+"pt";m+="; margin:1.0in 1.25in 1.0in 1.25in;mso-header-margin:.5in;mso-footer-margin:.5in;mso-paper-source:0;}";m+="div.Section1 {page:Section1;}";m+="@page Section2 {size:"+N[a.mso.pageFormat][1]+"pt "+N[a.mso.pageFormat][0]+"pt";m+=";mso-page-orientation:"+a.mso.pageOrientation+ -";margin:1.25in 1.0in 1.25in 1.0in;mso-header-margin:.5in;mso-footer-margin:.5in;mso-paper-source:0;}";m+="div.Section2 {page:Section2;}";m+="br {mso-data-placement:same-cell;}";m+="";m+="";m+="";m+='
';m+=H;m+="
";m+="";m+="";if("string"===a.outputMode)return m;if("base64"===a.outputMode)return K(m);M(m,a.fileName+"."+r,"application/vnd.ms-"+k,"","base64",!1)}else if("png"===a.type)html2canvas(c(C)[0]).then(function(b){b= -b.toDataURL();for(var c=atob(b.substring(22)),e=new ArrayBuffer(c.length),g=new Uint8Array(e),f=0;fIa){a>N.a0[0]&&(ia="a0",ca="l");for(var d in N)N.hasOwnProperty(d)&& -N[d][1]>a&&(ia=d,ca="l",N[d][0]>a&&(ca="p"));Ia=a}}});a.jspdf.format=""===ia?"a4":ia;a.jspdf.orientation=""===ca?"w":ca}if(null==g.doc&&(g.doc=new jsPDF(a.jspdf.orientation,a.jspdf.unit,a.jspdf.format),g.wScaleFactor=1,g.hScaleFactor=1,"function"===typeof a.jspdf.onDocCreated))a.jspdf.onDocCreated(g.doc);!0===g.outputImages&&(g.images={});"undefined"!==typeof g.images&&(c(C).filter(function(){return I(c(this))}).each(function(){var b=0;G=[];!1===a.exportHiddenCells&&(J=c(this).find("tr, th, td").filter(":hidden"), -V=0a.styles.rowHeight&&(a.styles.rowHeight=f)}a.styles.halign= -"inherit"===d.headerStyles.halign?"center":d.headerStyles.halign;a.styles.valign=d.headerStyles.valign;"undefined"!==typeof e.style&&!0!==e.style.hidden&&("inherit"===d.headerStyles.halign&&(a.styles.halign=e.style.align),"inherit"===d.styles.fillColor&&(a.styles.fillColor=e.style.bcolor),"inherit"===d.styles.textColor&&(a.styles.textColor=e.style.color),"inherit"===d.styles.fontStyle&&(a.styles.fontStyle=e.style.fstyle))}});"function"!==typeof d.createdCell&&(d.createdCell=function(a,b){b=g.teCells[b.row.index+ -":"+b.column.dataKey];a.styles.halign="inherit"===d.styles.halign?"center":d.styles.halign;a.styles.valign=d.styles.valign;"undefined"!==typeof b&&"undefined"!==typeof b.style&&!0!==b.style.hidden&&("inherit"===d.styles.halign&&(a.styles.halign=b.style.align),"inherit"===d.styles.fillColor&&(a.styles.fillColor=b.style.bcolor),"inherit"===d.styles.textColor&&(a.styles.textColor=b.style.color),"inherit"===d.styles.fontStyle&&(a.styles.fontStyle=b.style.fstyle))});"function"!==typeof d.drawHeaderCell&& -(d.drawHeaderCell=function(a,b){var c=g.columns[b.column.dataKey];return(!0!==c.style.hasOwnProperty("hidden")||!0!==c.style.hidden)&&0<=c.rowIndex?va(a,b,c):!1});"function"!==typeof d.drawCell&&(d.drawCell=function(a,b){var d=g.teCells[b.row.index+":"+b.column.dataKey];if(!0!==("undefined"!==typeof d&&d.isCanvas))va(a,b,d)&&(g.doc.rect(a.x,a.y,a.width,a.height,a.styles.fillStyle),"undefined"===typeof d||"undefined"!==typeof d.hasUserDefText&&!0===d.hasUserDefText||"undefined"===typeof d.elements|| -!d.elements.length?za(a,{},g):(b=a.height/d.rect.height,b>g.hScaleFactor&&(g.hScaleFactor=b),g.wScaleFactor=a.width/d.rect.width,b=a.textPos.y,ya(a,d.elements,g),a.textPos.y=b,za(a,d.elements,g)));else{d=d.elements[0];var e=c(d).attr("data-tableexport-canvas"),f=d.getBoundingClientRect();a.width=f.width*g.wScaleFactor;a.height=f.height*g.hScaleFactor;b.row.height=a.height;ta(a,d,e,g)}return!1});g.headerrows=[];u=y(c(this));c(u).each(function(){b=0;g.headerrows[n]=[];B(this,"th,td",n,u.length,function(a, -c,d){var e=Ba(a);e.title=E(a,c,d);e.key=b++;e.rowIndex=n;g.headerrows[n].push(e)});n++});if(0 Date: Tue, 5 Jan 2021 10:16:51 -0600 Subject: [PATCH 28/32] modernize monitors view --- web/includes/actions/monitors.php | 3 +-- web/skins/classic/views/monitors.php | 15 +++++++-------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/web/includes/actions/monitors.php b/web/includes/actions/monitors.php index 8f56b0e3d..55c2d282e 100644 --- a/web/includes/actions/monitors.php +++ b/web/includes/actions/monitors.php @@ -44,8 +44,7 @@ if ( $action == 'save' ) { } } } // end foreach mid - $refreshParent = true; - $view = 'none'; + $view = 'console'; } else { ZM\Warning("Unknown action $action in Monitor"); } // end if action == Delete diff --git a/web/skins/classic/views/monitors.php b/web/skins/classic/views/monitors.php index fe1130dfe..db02d92d5 100644 --- a/web/skins/classic/views/monitors.php +++ b/web/skins/classic/views/monitors.php @@ -1,6 +1,6 @@ -
- +

The following monitors will have these settings update when you click Save:

', array_map(function($m){return $m->Id().' ' .$m->Name();}, $monitors)); ?> @@ -88,10 +88,9 @@ The following monitors will have these settings update when you click Save:

- +
- - + From 3eef7531833d82ea59e697b65a1f70804343e410 Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Tue, 5 Jan 2021 13:44:43 -0600 Subject: [PATCH 29/32] Debian builds have been moved to dedicated build host --- .travis.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 954224dd3..c370e9318 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,11 +33,7 @@ install: env: - SMPFLAGS=-j4 OS=eslint DIST=eslint - - SMPFLAGS=-j4 OS=ubuntu DIST=xenial DOCKER_REPO=iconzm/packpack - SMPFLAGS=-j4 OS=ubuntu DIST=bionic DOCKER_REPO=iconzm/packpack - - SMPFLAGS=-j4 OS=ubuntu DIST=focal DOCKER_REPO=iconzm/packpack - - SMPFLAGS=-j4 OS=debian DIST=stretch DOCKER_REPO=iconzm/packpack - - SMPFLAGS=-j4 OS=debian DIST=buster DOCKER_REPO=iconzm/packpack compiler: - gcc From 9d7f738f61d01a0e4b07d8d428c6da9399dfbf9c Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Wed, 6 Jan 2021 14:19:25 -0600 Subject: [PATCH 30/32] replace mootools in MonitorStream --- web/js/MonitorStream.js | 141 +++++++++----------------- web/skins/classic/views/js/montage.js | 4 - web/skins/classic/views/js/zone.js | 5 - web/skins/classic/views/js/zones.js | 5 - 4 files changed, 46 insertions(+), 109 deletions(-) diff --git a/web/js/MonitorStream.js b/web/js/MonitorStream.js index e0c3e24de..96161d0d9 100644 --- a/web/js/MonitorStream.js +++ b/web/js/MonitorStream.js @@ -8,13 +8,16 @@ function MonitorStream(monitorData) { this.status = null; this.alarmState = STATE_IDLE; this.lastAlarmState = STATE_IDLE; - this.streamCmdParms = 'view=request&request=stream&connkey='+this.connKey; + this.streamCmdParms = { + view: 'request', + request: 'stream', + connkey: this.connKey + }; if ( auth_hash ) { - this.streamCmdParms += '&auth='+auth_hash; + this.streamCmdParms.auth = auth_hash; } else if ( auth_relay ) { - this.streamCmdParms += '&'+auth_relay; + this.streamCmdParms.auth_relay = ''; } - this.streamCmdTimer = null; this.type = monitorData.type; this.refresh = monitorData.refresh; this.start = function(delay) { @@ -33,15 +36,7 @@ function MonitorStream(monitorData) { stream.src = ''; stream.src = src; } - - if ( this.streamCmdQuery ) { - this.streamCmdTimer = this.streamCmdQuery.delay(delay, this); - } else { - console.log("No streamCmdQuery"); - } - - console.log("queueing for " + this.id + " " + this.connKey + " timeout is: " + AJAX_TIMEOUT); - requestQueue.addRequest("cmdReq"+this.id, this.streamCmdReq); + this.streamCmdQuery.delay(delay, this); }; this.stop = function() { if ( 0 ) { @@ -57,13 +52,16 @@ function MonitorStream(monitorData) { stream.src = src; } } - this.streamCmdReq.send(this.streamCmdParms+"&command="+CMD_STOP); + this.streamCmdParms.command = CMD_STOP; + this.streamCmdReq(this.streamCmdParms); }; this.pause = function() { - this.streamCmdReq.send(this.streamCmdParms+"&command="+CMD_PAUSE); + this.streamCmdParms.command = CMD_PAUSE; + this.streamCmdReq(this.streamCmdParms); }; this.play = function() { - this.streamCmdReq.send(this.streamCmdParms+"&command="+CMD_PLAY); + this.streamCmdParms.command = CMD_PLAY; + this.streamCmdReq(this.streamCmdParms); }; this.eventHandler = function(event) { @@ -86,55 +84,28 @@ function MonitorStream(monitorData) { document.getElementById('imageFeed'+this.id).removeEventListener('click', this.onclick ); }; - this.setStateClass = function(element, stateClass) { - if ( !element ) { + this.setStateClass = function(jobj, stateClass) { + if ( !jobj ) { return; } - if ( !element.hasClass( stateClass ) ) { - if ( stateClass != 'alarm' ) { - element.removeClass('alarm'); - } - if ( stateClass != 'alert' ) { - element.removeClass('alert'); - } - if ( stateClass != 'idle' ) { - element.removeClass('idle'); - } - element.addClass(stateClass); + if ( !jobj.hasClass( stateClass ) ) { + if ( stateClass != 'alarm' ) jobj.removeClass('alarm'); + if ( stateClass != 'alert' ) jobj.removeClass('alert'); + if ( stateClass != 'idle' ) jobj.removeClass('idle'); + + jobj.addClass(stateClass); } }; - this.onError = function(text, error) { - console.log('onerror: ' + text + ' error:'+error); - // Requeue, but want to wait a while. - var streamCmdTimeout = 10*statusRefreshTimeout; - this.streamCmdTimer = this.streamCmdQuery.delay(streamCmdTimeout, this); - }; - this.onFailure = function(xhr) { - console.log('onFailure: ' + this.connKey); - console.log(xhr); - if ( ! requestQueue.hasNext('cmdReq'+this.id) ) { - console.log('Not requeuing because there is one already'); - requestQueue.addRequest('cmdReq'+this.id, this.streamCmdReq); - } - if ( 0 ) { - // Requeue, but want to wait a while. - if ( this.streamCmdTimer ) { - this.streamCmdTimer = clearTimeout( this.streamCmdTimer ); - } - var streamCmdTimeout = 1000*statusRefreshTimeout; - this.streamCmdTimer = this.streamCmdQuery.delay(streamCmdTimeout, this, true); - requestQueue.resume(); - } - console.log('done failure'); + this.onFailure = function(jqxhr, textStatus, error) { + this.streamCmdQuery.delay(1000*statusRefreshTimeout, this); + logAjaxFail(jqxhr, textStatus, error); }; this.getStreamCmdResponse = function(respObj, respText) { - if ( this.streamCmdTimer ) { - this.streamCmdTimer = clearTimeout(this.streamCmdTimer); - } var stream = $j('#liveStream'+this.id)[0]; + if ( ! stream ) { console.log('No live stream'); return; @@ -159,22 +130,16 @@ function MonitorStream(monitorData) { !COMPACT_MONTAGE) && (this.type != 'WebSite') ) { - fpsValue = $('fpsValue'+this.id); - if ( fpsValue ) { - fpsValue.set('text', this.status.fps); - } - stateValue = $('stateValue'+this.id); - if ( stateValue ) { - stateValue.set('text', stateStrings[this.alarmState]); - } - - monitorState = $('monitorState'+this.id); - if ( monitorState ) { - this.setStateClass(monitorState, stateClass); - } + var fpsValue = $j('#fpsValue'+this.id); + var stateValue = $j('#stateValue'+this.id); + var monitorState = $j('#monitorState'+this.id); + + if ( fpsValue.length ) fpsValue.text(this.status.fps); + if ( stateValue.length ) stateValue.text(stateStrings[this.alarmState]); + if ( monitorState.length ) this.setStateClass(monitorState, stateClass); } - this.setStateClass($('monitor'+this.id), stateClass); + this.setStateClass($j('#monitor'+this.id), stateClass); /*Stream could be an applet so can't use moo tools*/ //stream.parentNode().className = stateClass; @@ -188,7 +153,7 @@ function MonitorStream(monitorData) { if ( newAlarm ) { if ( false && SOUND_ON_ALARM ) { // Enable the alarm sound - $('alarmSound').removeClass('hidden'); + $j('#alarmSound').removeClass('hidden'); } if ( (typeof POPUP_ON_ALARM !== 'undefined') && POPUP_ON_ALARM ) { windowToFront(); @@ -197,7 +162,7 @@ function MonitorStream(monitorData) { if ( false && SOUND_ON_ALARM ) { if ( oldAlarm ) { // Disable alarm sound - $('alarmSound').addClass('hidden'); + $j('#alarmSound').addClass('hidden'); } } if ( this.status.auth ) { @@ -230,38 +195,24 @@ function MonitorStream(monitorData) { } } // end if Ok or not - var streamCmdTimeout = statusRefreshTimeout; - // The idea here is if we are alarmed, do updates faster. - // However, there is a timeout in the php side which isn't getting modified, - // so this may cause a problem. Also the server may only be able to update so fast. - //if ( this.alarmState == STATE_ALARM || this.alarmState == STATE_ALERT ) { - //streamCmdTimeout = streamCmdTimeout/5; - //} - this.streamCmdTimer = this.streamCmdQuery.delay(streamCmdTimeout, this); - this.lastAlarmState = this.alarmState; + this.lastAlarmState = this.alarmState; + this.streamCmdQuery.delay(statusRefreshTimeout, this); }; this.streamCmdQuery = function(resent) { - if ( resent ) { - console.log(this.connKey+': timeout: Resending'); - this.streamCmdReq.cancel(); - } //console.log("Starting CmdQuery for " + this.connKey ); if ( this.type != 'WebSite' ) { - this.streamCmdReq.send(this.streamCmdParms+'&command='+CMD_QUERY); + this.streamCmdParms.command = CMD_QUERY; + this.streamCmdReq(this.streamCmdParms); } }; if ( this.type != 'WebSite' ) { - this.streamCmdReq = new Request.JSON( { - url: this.url, - method: 'get', - timeout: AJAX_TIMEOUT, - onSuccess: this.getStreamCmdResponse.bind(this), - onTimeout: this.streamCmdQuery.bind(this, true), - onError: this.onError.bind(this), - onFailure: this.onFailure.bind(this), - link: 'cancel' - } ); + this.streamCmdReq = function(streamCmdParms) { + $j.ajaxSetup({timeout: AJAX_TIMEOUT}); + $j.getJSON(this.url, streamCmdParms) + .done(this.getStreamCmdResponse.bind(this)) + .fail(this.onFailure.bind(this)); + }; } } // end function MonitorStream diff --git a/web/skins/classic/views/js/montage.js b/web/skins/classic/views/js/montage.js index 988aa99f9..572c9691d 100644 --- a/web/skins/classic/views/js/montage.js +++ b/web/skins/classic/views/js/montage.js @@ -1,7 +1,3 @@ -var requestQueue = new Request.Queue({ - concurrent: monitorData.length, - stopOnFailure: false -}); /** * called when the layoutControl select element is changed, or the page * is rendered diff --git a/web/skins/classic/views/js/zone.js b/web/skins/classic/views/js/zone.js index 4f63951e2..3b8c08d3a 100644 --- a/web/skins/classic/views/js/zone.js +++ b/web/skins/classic/views/js/zone.js @@ -1,8 +1,3 @@ -var requestQueue = new Request.Queue({ - concurrent: monitorData.length, - stopOnFailure: false -}); - var pauseBtn = $j('#pauseBtn'); var playBtn = $j('#playBtn'); var saveBtn = $j('#saveBtn'); diff --git a/web/skins/classic/views/js/zones.js b/web/skins/classic/views/js/zones.js index a0eec294e..08acd8206 100644 --- a/web/skins/classic/views/js/zones.js +++ b/web/skins/classic/views/js/zones.js @@ -1,8 +1,3 @@ - -var requestQueue = new Request.Queue({ - concurrent: monitorData.length, - stopOnFailure: false -}); function streamCmdQuit( ) { if ( action ) { streamCmdReq.send( streamCmdParms+"&command="+CMD_QUIT ); From 4756a03b161d27325e41674c7e9aaf46506d83db Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Wed, 6 Jan 2021 14:27:06 -0600 Subject: [PATCH 31/32] show alarm state and fps on zones view --- web/skins/classic/views/zones.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/skins/classic/views/zones.php b/web/skins/classic/views/zones.php index dee405023..f457ad2fc 100644 --- a/web/skins/classic/views/zones.php +++ b/web/skins/classic/views/zones.php @@ -92,6 +92,9 @@ xhtmlHeaders(__FILE__, translate('Zones')); ?> Sorry, your browser does not support inline SVG +
+  -  fps +
From a431f08133a9c45ff6a85acde6bb8e1d24ddaf48 Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Wed, 6 Jan 2021 15:57:30 -0600 Subject: [PATCH 32/32] eslint --- web/js/MonitorStream.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/web/js/MonitorStream.js b/web/js/MonitorStream.js index 96161d0d9..c108c35f5 100644 --- a/web/js/MonitorStream.js +++ b/web/js/MonitorStream.js @@ -8,7 +8,7 @@ function MonitorStream(monitorData) { this.status = null; this.alarmState = STATE_IDLE; this.lastAlarmState = STATE_IDLE; - this.streamCmdParms = { + this.streamCmdParms = { view: 'request', request: 'stream', connkey: this.connKey @@ -36,7 +36,7 @@ function MonitorStream(monitorData) { stream.src = ''; stream.src = src; } - this.streamCmdQuery.delay(delay, this); + this.streamCmdQuery.delay(delay, this); }; this.stop = function() { if ( 0 ) { @@ -103,7 +103,6 @@ function MonitorStream(monitorData) { }; this.getStreamCmdResponse = function(respObj, respText) { - var stream = $j('#liveStream'+this.id)[0]; if ( ! stream ) { @@ -133,7 +132,7 @@ function MonitorStream(monitorData) { var fpsValue = $j('#fpsValue'+this.id); var stateValue = $j('#stateValue'+this.id); var monitorState = $j('#monitorState'+this.id); - + if ( fpsValue.length ) fpsValue.text(this.status.fps); if ( stateValue.length ) stateValue.text(stateStrings[this.alarmState]); if ( monitorState.length ) this.setStateClass(monitorState, stateClass); @@ -195,7 +194,7 @@ function MonitorStream(monitorData) { } } // end if Ok or not - this.lastAlarmState = this.alarmState; + this.lastAlarmState = this.alarmState; this.streamCmdQuery.delay(statusRefreshTimeout, this); };