mirror of
https://github.com/owncloudarchive/contacts.git
synced 2025-01-18 07:52:21 +01:00
fix scrutinizer errors
This commit is contained in:
parent
d88bb053b8
commit
78183bebf6
@ -106,9 +106,9 @@ OC.Contacts = OC.Contacts || {};
|
|||||||
var addressbook = OC.Contacts.addressBooks;
|
var addressbook = OC.Contacts.addressBooks;
|
||||||
|
|
||||||
var error=false;
|
var error=false;
|
||||||
var errorFields = new Array();
|
var errorFields = [];
|
||||||
$('[required]').each(function() {
|
$('[required]').each(function() {
|
||||||
if ($(this).val() == '' && !$(this).attr('disabled')){
|
if ($(this).val() === '' && !$(this).attr('disabled')){
|
||||||
error = true;
|
error = true;
|
||||||
errorFields.push($(this).attr('placeholder'));
|
errorFields.push($(this).attr('placeholder'));
|
||||||
}
|
}
|
||||||
@ -172,9 +172,9 @@ OC.Contacts = OC.Contacts || {};
|
|||||||
var defer = $.Deferred();
|
var defer = $.Deferred();
|
||||||
|
|
||||||
var error=false;
|
var error=false;
|
||||||
var errorFields = new Array();
|
var errorFields = [];
|
||||||
$('[required]').each(function() {
|
$('[required]').each(function() {
|
||||||
if ($(this).val() == '' && !$(this).attr('disabled')){
|
if ($(this).val() === '' && !$(this).attr('disabled')){
|
||||||
error = true;
|
error = true;
|
||||||
errorFields.push($(this).attr('placeholder'));
|
errorFields.push($(this).attr('placeholder'));
|
||||||
}
|
}
|
||||||
@ -342,12 +342,12 @@ OC.Contacts = OC.Contacts || {};
|
|||||||
// allow backspace, tab, delete, enter, arrows, numbers and keypad numbers ONLY
|
// allow backspace, tab, delete, enter, arrows, numbers and keypad numbers ONLY
|
||||||
// home, end, period, and numpad decimal
|
// home, end, period, and numpad decimal
|
||||||
return (
|
return (
|
||||||
key == 8 ||
|
key === 8 ||
|
||||||
key == 9 ||
|
key === 9 ||
|
||||||
key == 13 ||
|
key === 13 ||
|
||||||
key == 46 ||
|
key === 46 ||
|
||||||
key == 110 ||
|
key === 110 ||
|
||||||
key == 190 ||
|
key === 190 ||
|
||||||
(key >= 35 && key <= 40) ||
|
(key >= 35 && key <= 40) ||
|
||||||
(key >= 48 && key <= 57) ||
|
(key >= 48 && key <= 57) ||
|
||||||
(key >= 96 && key <= 105));
|
(key >= 96 && key <= 105));
|
||||||
|
@ -74,6 +74,7 @@ class Dispatcher extends MainApp {
|
|||||||
return new AddressBookController($this->appName, $request, $app);
|
return new AddressBookController($this->appName, $request, $app);
|
||||||
});
|
});
|
||||||
$this->container->registerService('BackendController', function(IAppContainer $container) use($app) {
|
$this->container->registerService('BackendController', function(IAppContainer $container) use($app) {
|
||||||
|
$request = $container->query('Request');
|
||||||
return new BackendController($container, $request, $app);
|
return new BackendController($container, $request, $app);
|
||||||
});
|
});
|
||||||
$this->container->registerService('GroupController', function(IAppContainer $container) use($app) {
|
$this->container->registerService('GroupController', function(IAppContainer $container) use($app) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user