Merge branch 'master' of github.com:ZoneMinder/ZoneMinder
commit
a2d4dc974b
|
@ -13,7 +13,7 @@ switch ( $_REQUEST['task'] ) {
|
|||
|
||||
$string = $_POST['message'];
|
||||
|
||||
$file = !empty($_POST['file']) ? preg_replace( '/\w+:\/\/\w+\//', '', $_POST['file'] ) : '';
|
||||
$file = !empty($_POST['file']) ? preg_replace( '/\w+:\/\/[\w.:]+\//', '', $_POST['file'] ) : '';
|
||||
if ( !empty( $_POST['line'] ) )
|
||||
$line = $_POST['line'];
|
||||
else
|
||||
|
|
|
@ -49,6 +49,7 @@ function CSPHeaders($view, $nonce) {
|
|||
}
|
||||
case 'bandwidth':
|
||||
case 'blank':
|
||||
case 'console':
|
||||
case 'controlcap':
|
||||
case 'function':
|
||||
case 'log':
|
||||
|
|
|
@ -47,7 +47,7 @@ function logReport( level, message, file, line ) {
|
|||
return;
|
||||
}
|
||||
/* eslint-disable no-caller */
|
||||
if ( arguments && arguments.callee && arguments.callee.caller && arguments.callee.caller.name ) {
|
||||
if ( arguments && arguments.callee && arguments.callee.caller && arguments.callee.caller.caller && arguments.callee.caller.caller.name ) {
|
||||
message += ' - '+arguments.callee.caller.caller.name+'()';
|
||||
}
|
||||
/* eslint-enable no-caller */
|
||||
|
@ -117,3 +117,12 @@ window.onerror =
|
|||
function( message, url, line ) {
|
||||
logReport( "ERR", message, url, line );
|
||||
};
|
||||
|
||||
window.addEventListener("securitypolicyviolation", function logCSP(evt) {
|
||||
var level = evt.disposition == "enforce" ? "ERR" : "DBG";
|
||||
var message = evt.blockedURI + " violated CSP " + evt.violatedDirective;
|
||||
if (evt.sample) {
|
||||
message += " (Sample: " + evt.sample + ")";
|
||||
}
|
||||
logReport(level, message, evt.sourceFile, evt.lineNumber);
|
||||
});
|
||||
|
|
|
@ -51,16 +51,14 @@ var Overlay = new Class({
|
|||
},
|
||||
show: function() {
|
||||
this.mask.show();
|
||||
$(window).addEvent( 'resize', this.update.bind(this) );
|
||||
$(window).addEvent( 'scroll', this.update.bind(this) );
|
||||
window.addEventListener( 'resize', this.update.bind(this) );
|
||||
window.addEventListener( 'scroll', this.update.bind(this) );
|
||||
this.element.tween( 'opacity', [0, 1.0] );
|
||||
this.element.show();
|
||||
this.element.position();
|
||||
this.mask.position();
|
||||
},
|
||||
hideComplete: function() {
|
||||
$(window).removeEvent( 'resize', this.update.bind(this) );
|
||||
$(window).removeEvent( 'scroll', this.update.bind(this) );
|
||||
this.element.hide();
|
||||
this.mask.hide();
|
||||
},
|
||||
|
@ -82,12 +80,10 @@ var Overlay = new Class({
|
|||
}
|
||||
updateOverlayLoading();
|
||||
this.loading.setStyle( 'display', 'block' );
|
||||
$(window).addEvent( 'resize', this.update.bind(this) );
|
||||
$(window).addEvent( 'scroll', this.update.bind(this) );
|
||||
window.addEventListener( 'resize', this.update.bind(this) );
|
||||
window.addEventListener( 'scroll', this.update.bind(this) );
|
||||
},
|
||||
hideAnimation: function() {
|
||||
$(window).removeEvent( 'resize', this.update.bind(this) );
|
||||
$(window).removeEvent( 'scroll', this.update.bind(this) );
|
||||
if ( this.loading ) {
|
||||
this.loading.setStyle( 'display', 'none' );
|
||||
}
|
||||
|
@ -119,4 +115,4 @@ function setupOverlays() {
|
|||
}
|
||||
}
|
||||
|
||||
window.addEvent( 'domready', setupOverlays );
|
||||
window.addEventListener( 'DOMContentLoaded', setupOverlays );
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1 +1 @@
|
|||
jquery-1.11.3.js
|
||||
jquery-2.2.4.js
|
|
@ -1 +1 @@
|
|||
http://code.jquery.com/jquery-1.11.3.js
|
||||
https://code.jquery.com/jquery-2.2.4.js
|
||||
|
|
|
@ -337,14 +337,20 @@ function submitThisForm() {
|
|||
this.form.submit();
|
||||
}
|
||||
|
||||
function toggleCheckbox( element, name ) {
|
||||
var form = element.form;
|
||||
var checked = element.checked;
|
||||
/**
|
||||
* @param {Element} headerCheckbox The select all/none checkbox that was just toggled.
|
||||
* @param {DOMString} name The name of the checkboxes to toggle.
|
||||
*/
|
||||
function updateFormCheckboxesByName( headerCheckbox ) {
|
||||
var name = headerCheckbox.getAttribute("data-checkbox-name");
|
||||
var form = headerCheckbox.form;
|
||||
var checked = headerCheckbox.checked;
|
||||
for (var i = 0; i < form.elements.length; i++) {
|
||||
if (form.elements[i].name.indexOf(name) == 0) {
|
||||
form.elements[i].checked = checked;
|
||||
}
|
||||
}
|
||||
setButtonStates(headerCheckbox);
|
||||
}
|
||||
|
||||
function configureDeleteButton( element ) {
|
||||
|
@ -378,7 +384,7 @@ if ( closePopup ) {
|
|||
closeWindow();
|
||||
}
|
||||
|
||||
window.addEvent( 'domready', checkSize );
|
||||
window.addEventListener( 'DOMContentLoaded', checkSize );
|
||||
|
||||
function convertLabelFormat(LabelFormat, monitorName) {
|
||||
//convert label format from strftime to moment's format (modified from
|
||||
|
|
|
@ -46,6 +46,8 @@ foreach ( $storage_areas as $S ) {
|
|||
$html =
|
||||
'
|
||||
<div class="controlHeader">
|
||||
<!-- Used to submit the form with the enter key -->
|
||||
<input type="submit" class="hide"/>
|
||||
<input type="hidden" name="filtering" value=""/>
|
||||
';
|
||||
|
||||
|
@ -93,7 +95,7 @@ if ( ! empty($user['MonitorIds']) ) {
|
|||
}
|
||||
|
||||
$html .= '<span class="MonitorNameFilter"><label>'.translate('Name').'</label>';
|
||||
$html .= '<input type="text" name="MonitorName" value="'.(isset($_SESSION['MonitorName'])?$_SESSION['MonitorName']:'').'" onkeydown="if(event&&event.keyCode==13){this.form.submit();}" placeholder="text or regular expression"/>';
|
||||
$html .= '<input type="text" name="MonitorName" value="'.(isset($_SESSION['MonitorName'])?$_SESSION['MonitorName']:'').'" placeholder="text or regular expression"/>';
|
||||
$html .= '</span>';
|
||||
|
||||
$Functions = array();
|
||||
|
@ -158,7 +160,7 @@ $html .= htmlSelect( 'Status[]', $status_options,
|
|||
$html .= '</span>';
|
||||
|
||||
$html .= '<span class="SourceFilter"><label>'.translate('Source').'</label>';
|
||||
$html .= '<input type="text" name="Source" value="'.(isset($_SESSION['Source'])?$_SESSION['Source']:'').'" onkeydown="if(event&&event.keyCode==13){this.form.submit();}" placeholder="text or regular expression"/>';
|
||||
$html .= '<input type="text" name="Source" value="'.(isset($_SESSION['Source'])?$_SESSION['Source']:'').'" placeholder="text or regular expression"/>';
|
||||
$html .= '</span>';
|
||||
|
||||
$sql = 'SELECT *,S.Status AS Status, S.CaptureFPS AS CaptureFPS, S.AnalysisFPS AS AnalysisFPS, S.CaptureBandwidth AS CaptureBandwidth
|
||||
|
|
|
@ -219,7 +219,7 @@ ob_start();
|
|||
?>
|
||||
<th class="colZones"><?php echo translate('Zones') ?></th>
|
||||
<?php if ( canEdit('Monitors') ) { ?>
|
||||
<th class="colMark"><input type="checkbox" name="toggleCheck" value="1" onclick="toggleCheckbox(this, 'markMids[]');setButtonStates(this);"/> <?php echo translate('All') ?></th>
|
||||
<th class="colMark"><input type="checkbox" name="toggleCheck" value="1" data-checkbox-name="markMids[]" data-on-click-this="updateFormCheckboxesByName"/> <?php echo translate('All') ?></th>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
|
@ -181,7 +181,7 @@ while ( $event_row = dbFetchNext($results) ) {
|
|||
<?php
|
||||
}
|
||||
?>
|
||||
<th class="colMark"><input type="checkbox" name="toggleCheck" value="1" onclick="toggleCheckbox(this, 'markEids');"/></th>
|
||||
<th class="colMark"><input type="checkbox" name="toggleCheck" value="1" data-checkbox-name="markEids" data-on-click-this="updateFormCheckboxesByName"/></th>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
|
|
@ -103,4 +103,4 @@ function initPage() {
|
|||
probe(url);
|
||||
}
|
||||
}
|
||||
window.addEvent( 'domready', initPage );
|
||||
window.addEventListener( 'DOMContentLoaded', initPage );
|
||||
|
|
|
@ -146,4 +146,4 @@ function applySort(event, ui) {
|
|||
ajax.send();
|
||||
} // end function applySort(event,ui)
|
||||
|
||||
window.addEvent( 'domready', initPage );
|
||||
window.addEventListener( 'DOMContentLoaded', initPage );
|
||||
|
|
|
@ -9,4 +9,4 @@ function updateLabel() {
|
|||
form.newLabel.value = '';
|
||||
}
|
||||
}
|
||||
window.addEvent('domready', updateLabel);
|
||||
window.addEventListener('DOMContentLoaded', updateLabel);
|
||||
|
|
|
@ -6,4 +6,4 @@ function initCycle() {
|
|||
nextCycleView.periodical(cycleRefreshTimeout);
|
||||
}
|
||||
|
||||
window.addEvent('domready', initCycle);
|
||||
window.addEventListener('DOMContentLoaded', initCycle);
|
||||
|
|
|
@ -35,4 +35,4 @@ function initPage() {
|
|||
}
|
||||
}
|
||||
|
||||
window.addEvent( 'domready', initPage );
|
||||
window.addEventListener( 'DOMContentLoaded', initPage );
|
||||
|
|
|
@ -1070,4 +1070,4 @@ function initPage() {
|
|||
}
|
||||
|
||||
// Kick everything off
|
||||
window.addEvent( 'domready', initPage );
|
||||
window.addEventListener( 'DOMContentLoaded', initPage );
|
||||
|
|
|
@ -5,14 +5,9 @@ function closeWindows() {
|
|||
filterWindow.close();
|
||||
}
|
||||
|
||||
function toggleCheckbox( element, name ) {
|
||||
function setButtonStates( element ) {
|
||||
var form = element.form;
|
||||
var checked = element.checked;
|
||||
for (var i = 0; i < form.elements.length; i++) {
|
||||
if (form.elements[i].name.indexOf(name) == 0) {
|
||||
form.elements[i].checked = checked;
|
||||
}
|
||||
}
|
||||
form.viewBtn.disabled = !(canViewEvents && checked);
|
||||
form.editBtn.disabled = !(canEditEvents && checked);
|
||||
form.archiveBtn.disabled = unarchivedEvents?!checked:true;
|
||||
|
|
|
@ -51,4 +51,4 @@ function initPage() {
|
|||
}
|
||||
}
|
||||
|
||||
window.addEvent( 'domready', initPage );
|
||||
window.addEventListener( 'DOMContentLoaded', initPage );
|
||||
|
|
|
@ -254,4 +254,4 @@ function init() {
|
|||
$j("#sortTable [name$='sort_field\\]']").chosen();
|
||||
}
|
||||
|
||||
window.addEvent( 'domready', init );
|
||||
window.addEventListener( 'DOMContentLoaded', init );
|
||||
|
|
|
@ -314,4 +314,4 @@ function initPage() {
|
|||
}
|
||||
|
||||
// Kick everything off
|
||||
window.addEvent( 'domready', initPage );
|
||||
window.addEventListener( 'DOMContentLoaded', initPage );
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
window.addEvent( 'domready', function() {
|
||||
window.addEventListener( 'DOMContentLoaded', function() {
|
||||
if ( failed == true ) {
|
||||
$('loginError').removeClass( 'hidden' );
|
||||
}
|
||||
|
|
|
@ -48,4 +48,4 @@ function initPage() {
|
|||
//updateMethods( $(protocolSelector) );
|
||||
}
|
||||
|
||||
window.addEvent( 'domready', initPage );
|
||||
window.addEventListener( 'DOMContentLoaded', initPage );
|
||||
|
|
|
@ -447,4 +447,4 @@ function initPage() {
|
|||
}
|
||||
}
|
||||
// Kick everything off
|
||||
window.addEvent( 'domready', initPage );
|
||||
window.addEventListener( 'DOMContentLoaded', initPage );
|
||||
|
|
|
@ -943,4 +943,4 @@ function initPage() {
|
|||
}
|
||||
window.addEventListener("resize", redrawScreen, {passive: true});
|
||||
// Kick everything off
|
||||
window.addEvent( 'domready', initPage );
|
||||
window.addEventListener( 'DOMContentLoaded', initPage );
|
||||
|
|
|
@ -19,4 +19,4 @@ function initPage() {
|
|||
return ( true );
|
||||
}
|
||||
|
||||
window.addEvent( 'domready', initPage );
|
||||
window.addEventListener( 'DOMContentLoaded', initPage );
|
||||
|
|
|
@ -56,4 +56,4 @@ function initPage() {
|
|||
});
|
||||
}
|
||||
// Kick everything off
|
||||
window.addEvent( 'domready', initPage );
|
||||
window.addEventListener( 'DOMContentLoaded', initPage );
|
||||
|
|
|
@ -775,4 +775,4 @@ function initPage() {
|
|||
}
|
||||
|
||||
// Kick everything off
|
||||
window.addEvent('domready', initPage);
|
||||
window.addEventListener('DOMContentLoaded', initPage);
|
||||
|
|
|
@ -733,4 +733,4 @@ function Polygon_calcArea( coords ) {
|
|||
return Math.round( Math.abs( float_area ) );
|
||||
}
|
||||
|
||||
window.addEvent( 'domready', initPage );
|
||||
window.addEventListener( 'DOMContentLoaded', initPage );
|
||||
|
|
Loading…
Reference in New Issue