Fixing admin table colors & some PEPify

This commit is contained in:
Adolfo Gómez García 2014-11-09 00:24:46 +01:00
parent 727f455e99
commit 8ccf48564a
2 changed files with 27 additions and 25 deletions

View File

@ -105,10 +105,10 @@ div.dataTables_scrollFoot table {
color: white;
}
.table-striped > tbody > tr:nth-child(2n+1) > td { background-color: #d9edf7; }
.table-striped > tbody > tr:nth-child(2n) > td { background-color: white; }
.table-striped > tbody > tr:nth-child(2n+1) > td { background-color: #606060; color: #F0F0F0; }
.table-striped > tbody > tr:nth-child(2n) > td { background-color: white; color: #000000;}
.table-striped > tbody > tr:nth-child(2n+1) > td.sorting_1 { background-color: #b3dbef; }
.table-striped > tbody > tr:nth-child(2n+1) > td.sorting_1 { background-color: #505050; color: #FFFFFF; }
.table-striped > tbody > tr:nth-child(2n) > td.sorting_1 { background-color: #F5F5F5; }

View File

@ -4,27 +4,27 @@
# Copyright (c) 2012 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@ -32,32 +32,34 @@ Transport modules for UDS are contained inside this package.
To create a new transport module, you will need to follow this steps:
1.- Create the transport module, probably based on an existing one
2.- Insert the module package as child of this package
3.- Import the class of your transport module at __init__. For example::
from Transport import SimpleTransport
3.- Import the class of your transport module at __init__. For example::
from Transport import SimpleTransport
4.- Done. At Server restart, the module will be recognized, loaded and treated
The registration of modules is done locating subclases of :py:class:`uds.core.auths.Authentication`
.. moduleauthor:: Adolfo Gómez, dkmaster at dkmon dot com
'''
def __init__():
'''
This imports all packages that are descendant of this package, and, after that,
it register all subclases of service provider as
it register all subclases of service provider as
'''
import os.path, pkgutil
import os.path
import pkgutil
import sys
from uds.core import transports
# Dinamycally import children of this package. The __init__.py files must import classes
pkgpath = os.path.dirname(sys.modules[__name__].__file__)
for _, name, _ in pkgutil.iter_modules([pkgpath]):
__import__(name, globals(), locals(), [], -1)
p = transports.Transport
# This is marked as error in IDE, but it's not (__subclasses__)
for cls in p.__subclasses__():
transports.factory().insert(cls)
__init__()