описание
No files matched your search
@@ -0,0 +1,8 @@
|
||||
env/
|
||||
/__pycache__/
|
||||
/*/__pycache__/
|
||||
/*/migrations/
|
||||
/portal/
|
||||
/front/node_modules/
|
||||
*.sqlite3
|
||||
/media/
|
||||
@@ -0,0 +1,15 @@
|
||||
from django.contrib import admin
|
||||
from .models import *
|
||||
# Register your models here.
|
||||
|
||||
class UserAdmin(admin.ModelAdmin):
|
||||
save_on_top = True
|
||||
list_display=('username','names', 'is_active', 'is_staff')
|
||||
search_fields = ('username',)
|
||||
ordering=('username',)
|
||||
|
||||
# fields=(('user', 'username'), 'is_active', 'is_staff', 'updated_at',)
|
||||
|
||||
|
||||
|
||||
admin.site.register(User, UserAdmin)
|
||||
@@ -0,0 +1,7 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class AccountsConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'accounts'
|
||||
verbose_name='Аккаунты Портала'
|
||||
@@ -0,0 +1,101 @@
|
||||
import jwt
|
||||
import requests
|
||||
import json
|
||||
from django.conf import settings
|
||||
from portal.settings import myDEBUG
|
||||
from django.forms.models import model_to_dict
|
||||
from rest_framework import authentication, exceptions
|
||||
from datetime import datetime
|
||||
from .models import User
|
||||
from userauth.models import *
|
||||
from rest_framework_simplejwt.serializers import TokenObtainPairSerializer
|
||||
from rest_framework_simplejwt.views import TokenObtainPairView
|
||||
from django.contrib.auth import get_user_model
|
||||
User = get_user_model()
|
||||
|
||||
|
||||
# class Authexception(Exception):
|
||||
# def __init__(self, *args):
|
||||
# self.message = args[0] if args else "None"
|
||||
|
||||
class MyTokenObtainPairSerializer(TokenObtainPairSerializer):
|
||||
@classmethod
|
||||
def get_token(cls, user):
|
||||
try:
|
||||
token = super().get_token(user.userinfo)
|
||||
|
||||
# TODO В зависимости от базы Алексея, добавить поля или нет - надо подумать
|
||||
|
||||
|
||||
token['user']=model_to_dict(user.userinfo)
|
||||
token['user']['is_active']=user.is_active
|
||||
token['user']['is_staff']=user.is_staff
|
||||
# !ТУТ СДЕЛАТь ФОТО НАВЕРНОЕ
|
||||
# token['user']['last_login']= user.last_login
|
||||
# print(token)
|
||||
return token
|
||||
except Exception as e:
|
||||
print("ERRRORRRRRRRR")
|
||||
print (e)
|
||||
|
||||
|
||||
|
||||
from django.contrib.auth.backends import ModelBackend
|
||||
# from django.contrib.auth.models import User
|
||||
from django.utils import timezone
|
||||
|
||||
class CustomAuth(ModelBackend):
|
||||
|
||||
def authenticate(self, request, **kwargs):
|
||||
username = kwargs['username']
|
||||
password = kwargs['password']
|
||||
status_code=0
|
||||
|
||||
# !ТУт стучим в AD, потом к Алексею
|
||||
if myDEBUG!=True:
|
||||
|
||||
resp= requests.post('http://10.252.44.13:8005/getAD', json.dumps({'user': username, 'password':password, 'usercheck': username}))
|
||||
|
||||
# if True:
|
||||
status_code=resp.status_code
|
||||
else:
|
||||
|
||||
status_code=200
|
||||
# status_code=403
|
||||
|
||||
|
||||
if status_code==200:
|
||||
# try:
|
||||
|
||||
user = DictEmployee.objects.get(login=username)
|
||||
# print(user)
|
||||
|
||||
if user.deleted!=1:
|
||||
homeuser, created = User.objects.get_or_create(username=username)
|
||||
if created:
|
||||
homeuser.set_unusable_password()
|
||||
|
||||
homeuser.last_login= timezone.now()
|
||||
homeuser.user=user
|
||||
user.is_active=homeuser.is_active
|
||||
user.is_staff=homeuser.is_staff
|
||||
user.last_login=homeuser.last_login.strftime('%Y-%d-%m %H:%M:%S')
|
||||
homeuser.save()
|
||||
if user.birthdate is not None:
|
||||
homeuser.birthdate = user.birthdate.strftime('%Y-%d-%m %H:%M:%S')
|
||||
else:
|
||||
homeuser.birthdate = None
|
||||
user.birthdate=homeuser.birthdate
|
||||
homeuser.last_login=user.last_login
|
||||
user.id=homeuser.id
|
||||
homeuser.userinfo = user
|
||||
|
||||
return homeuser
|
||||
|
||||
# except Exception as e:
|
||||
# print (e)
|
||||
# elif status_code==403:
|
||||
# print('loh')
|
||||
# return None
|
||||
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
|
||||
from datetime import datetime
|
||||
from django.db import models
|
||||
from django.contrib.auth.models import AbstractUser
|
||||
from django.contrib.auth.models import UserManager
|
||||
from django.contrib.auth.base_user import (AbstractBaseUser, BaseUserManager)
|
||||
import jwt
|
||||
from django.contrib.auth.models import PermissionsMixin
|
||||
from django.conf import settings
|
||||
# from django.utils.translation import ugettext_lazy as _
|
||||
from django.core.exceptions import ObjectDoesNotExist
|
||||
from rest_framework.serializers import ValidationError
|
||||
# from orgmanagment.models import *
|
||||
from datetime import datetime, timedelta
|
||||
import requests
|
||||
from django.contrib.auth import authenticate
|
||||
import json
|
||||
from django.forms.models import model_to_dict
|
||||
from userauth.models import DictEmployee
|
||||
|
||||
# all_fk: dict = {
|
||||
# "otdel": Otdel,
|
||||
# "department": Department,
|
||||
# "organization":Organization,
|
||||
# "position": Position,
|
||||
# "rank": Rank
|
||||
# }
|
||||
|
||||
# class Position(models.Model):
|
||||
# name= models.CharField(verbose_name='Название', max_length=150, blank=True)
|
||||
# class Meta:
|
||||
# verbose_name = "Должность"
|
||||
# verbose_name_plural = "Должности"
|
||||
# def __str__(self):
|
||||
# return str(self.name)
|
||||
|
||||
class UserManager(BaseUserManager):
|
||||
|
||||
def create_superuser(self, username, password):
|
||||
""" Создает и возввращет пользователя с привилегиями суперадмина. """
|
||||
if password is None:
|
||||
raise TypeError('Superusers must have a password.')
|
||||
|
||||
user = self.create_user(username, password)
|
||||
user.is_superuser = True
|
||||
user.is_staff = True
|
||||
user.set_password(password)
|
||||
user.save()
|
||||
|
||||
return user
|
||||
|
||||
|
||||
|
||||
class User(AbstractBaseUser, PermissionsMixin):
|
||||
user = models.ForeignKey(DictEmployee, on_delete=models.PROTECT, null=True, blank=True, verbose_name='Сотрудник')
|
||||
password = models.CharField(max_length=128, null=True,blank=True,verbose_name='Пароль')
|
||||
username = models.CharField(db_index=True, max_length=255, unique=True, verbose_name='Логин')
|
||||
# username2 = models.CharField(db_index=True, null=True, max_length=255, unique=True)
|
||||
is_active = models.BooleanField(default=True, verbose_name='Активность')
|
||||
is_staff = models.BooleanField(default=False, verbose_name='Доступ в Админку')
|
||||
created_at = models.DateTimeField(auto_now_add=True)
|
||||
updated_at = models.DateTimeField(auto_now=True)
|
||||
# last_login = models.DateTimeField(auto_now=True, null=True)
|
||||
# external=models.ForeignKey(DictEmployee,db_constraint=False, null=True, on_delete=models.PROTECT)
|
||||
objects = UserManager()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class Meta:
|
||||
|
||||
verbose_name = "Зарегистрированный участник"
|
||||
verbose_name_plural = "Зарегистрированные участники"
|
||||
|
||||
USERNAME_FIELD = 'username'
|
||||
|
||||
# REQUIRED_FIELDS = ['username']
|
||||
def __str__(self):
|
||||
return str(self.username)
|
||||
|
||||
def fio(self):
|
||||
|
||||
return self.user.login
|
||||
# return ShortUserSerializer(DictEmployee.objects.get(login=self.username)).data
|
||||
# return DictEmployee.objects.using('user_directory').get(login=self.username).fio
|
||||
|
||||
def names(self):
|
||||
return DictEmployee.objects.get(login=self.username)
|
||||
|
||||
names.short_description="ФИО"
|
||||
@@ -0,0 +1,22 @@
|
||||
import json
|
||||
|
||||
from rest_framework.renderers import JSONRenderer
|
||||
|
||||
|
||||
class UserJSONRenderer(JSONRenderer):
|
||||
charset = 'utf-8'
|
||||
|
||||
def render(self, data, media_type=None, renderer_context=None):
|
||||
# Если мы получим ключ token как часть ответа, это будет байтовый
|
||||
# объект. Байтовые объекты плохо сериализуются, поэтому нам нужно
|
||||
# декодировать их перед рендерингом объекта User.
|
||||
token = data.get('token', None)
|
||||
|
||||
if token is not None and isinstance(token, bytes):
|
||||
# Как говорится выше, декодирует token если он имеет тип bytes.
|
||||
data['token'] = token.decode('utf-8')
|
||||
# Наконец, мы можем отобразить наши данные в простанстве имен 'user'.
|
||||
return json.dumps({
|
||||
'user': data,
|
||||
|
||||
})
|
||||
@@ -0,0 +1,3 @@
|
||||
from rest_framework import serializers
|
||||
from django.contrib.auth import authenticate
|
||||
from .models import User
|
||||
@@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
@@ -0,0 +1,20 @@
|
||||
from django.urls import include, path
|
||||
from rest_framework.routers import DefaultRouter
|
||||
|
||||
from .views import *
|
||||
|
||||
from rest_framework_simplejwt.views import (
|
||||
TokenObtainPairView,
|
||||
TokenRefreshView,TokenVerifyView
|
||||
)
|
||||
|
||||
urlpatterns = [
|
||||
|
||||
path('token/', TokenObtainPairView.as_view(), name='token_obtain_pair'),
|
||||
path('token/refresh/', TokenRefreshView.as_view(), name='token_refresh'),
|
||||
path('token/verify/', TokenVerifyView.as_view(), name='token_access'),
|
||||
path('getuser/', getuserAPIView.as_view(), name='getuserAPIView', ),
|
||||
path('test/', testView.as_view(), name='test')
|
||||
|
||||
|
||||
]
|
||||
@@ -0,0 +1,87 @@
|
||||
from rest_framework import status
|
||||
from rest_framework.permissions import AllowAny, IsAuthenticated
|
||||
from rest_framework.response import Response
|
||||
from rest_framework.views import APIView
|
||||
from .renderers import UserJSONRenderer
|
||||
from userauth.models import *
|
||||
from navigation.models import *
|
||||
from navigation.serializers import *
|
||||
from userauth.serializers import *
|
||||
from .models import *
|
||||
from .serializers import *
|
||||
import pandas as pd
|
||||
|
||||
|
||||
class testView(APIView):
|
||||
|
||||
def get(self, request):
|
||||
"""Пример"""
|
||||
|
||||
|
||||
newsqueryset = News.objects.all().order_by('cdate')
|
||||
|
||||
|
||||
|
||||
for x in newsqueryset:
|
||||
a=model_to_dict(x)
|
||||
# a['link']= str(x.link.url)
|
||||
# a['show'] = False
|
||||
# a['showComment'] = False
|
||||
# a['author'] = model_to_dict(DictEmployee.objects.using('user_directory').get(login=x.author.username))
|
||||
a['scores'] = [{"score":y.score, "user":y.author.username} for y in x.get_news.all()]
|
||||
a['comment'] = [{"author":model_to_dict(k.author.user),
|
||||
"cdate":k.cdate,
|
||||
"text":k.text,
|
||||
"id": k.pk
|
||||
} for k in x.get_comment_news.all()
|
||||
]
|
||||
|
||||
return Response(NewsSerializer(newsqueryset, many=True).data)
|
||||
# from .serializers import RegistrationSerializer
|
||||
|
||||
# class RegistrationAPIView(APIView):
|
||||
# """
|
||||
# Разрешить всем пользователям (аутентифицированным и нет) доступ к данному эндпоинту.
|
||||
# """
|
||||
# permission_classes = (AllowAny,)
|
||||
# serializer_class = RegistrationSerializer
|
||||
# renderer_classes = (UserJSONRenderer,)
|
||||
|
||||
# def post(self, request):
|
||||
# user = request.data.get("user",{})
|
||||
# # Паттерн создания сериализатора, валидации и сохранения - довольно
|
||||
# # стандартный, и его можно часто увидеть в реальных проектах.
|
||||
|
||||
# serializer = self.serializer_class(data=user)
|
||||
# serializer.is_valid(raise_exception=True)
|
||||
# serializer.save()
|
||||
|
||||
# return Response(serializer.data, status=status.HTTP_201_CREATED)
|
||||
|
||||
class UserAPIView(APIView):
|
||||
permission_classes = (IsAuthenticated,)
|
||||
# serializer_class = RegistrationSerializer
|
||||
def get(self, request):
|
||||
# serializer = self.serializer_class(data=request.user)
|
||||
# serializer.is_valid(raise_exception=True)
|
||||
return Response('user')
|
||||
|
||||
class getuserAPIView(APIView):
|
||||
permission_classes = (AllowAny,)
|
||||
|
||||
|
||||
|
||||
|
||||
def get(self, request):
|
||||
"""
|
||||
Параметр: userlogin
|
||||
Пример: GET /api/accounts/getuser/?userlogin=9966-00-107
|
||||
Результат: Выдает все данные о пользователе
|
||||
"""
|
||||
dt=datetime.now()
|
||||
queryset = DictEmployee.objects.get(login=request.query_params.get('userlogin'))
|
||||
r=CardUserSerializer(queryset).data
|
||||
|
||||
|
||||
return Response(CardUserSerializer(queryset).data)
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
@@ -0,0 +1,7 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class CalendarOfEventsConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'calendar_of_events'
|
||||
verbose_name = 'Календарь событий'
|
||||
@@ -0,0 +1,3 @@
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
@@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
@@ -0,0 +1,8 @@
|
||||
from django.urls import path
|
||||
from rest_framework.routers import DefaultRouter
|
||||
|
||||
from .views import *
|
||||
|
||||
urlpatterns = [
|
||||
|
||||
]
|
||||
@@ -0,0 +1,3 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
||||
@@ -0,0 +1,69 @@
|
||||
from django.contrib import admin
|
||||
from .models import *
|
||||
from django.db.models import Avg
|
||||
|
||||
class BaseCriteriaAdmin(admin.ModelAdmin):
|
||||
list_display=('name', 'rating')
|
||||
|
||||
|
||||
|
||||
class RatingStatusInline(admin.TabularInline):
|
||||
model = RatingStatus
|
||||
fields = ( 'crit', 'rating')
|
||||
readonly_fields=( 'crit', 'rating')
|
||||
can_delete = False
|
||||
show_change_link = False
|
||||
extra = 0
|
||||
|
||||
class UserCommentAdmin(admin.ModelAdmin):
|
||||
fields = ( 'comment', ('get_rat', 'names', 'time_create'))
|
||||
list_display=('names', 'comment', 'get_rat', 'utility')
|
||||
readonly_fields=('names', 'time_create', 'comment', 'get_rat')
|
||||
list_filter=('time_create', 'utility')
|
||||
list_editable=('utility', )
|
||||
|
||||
|
||||
def get_rat(self, obj):
|
||||
ratavg = obj.get_rating.aggregate(res=Avg('rating'))
|
||||
|
||||
return int(ratavg['res']) if float(ratavg['res']).is_integer() else round(ratavg['res'], 1)
|
||||
|
||||
|
||||
|
||||
get_rat.short_description="Средняя оценка"
|
||||
|
||||
inlines = [RatingStatusInline]
|
||||
|
||||
|
||||
|
||||
|
||||
# class RatingStatusAdmin(admin.ModelAdmin):
|
||||
# # inlines = [RatingStatusInline]
|
||||
# fields = ('get_name','get_login', ('crit', 'rating'), 'usercom', 'get_time')
|
||||
# list_display=('get_name','get_login', 'crit', 'rating', 'usercom', 'get_time')
|
||||
|
||||
# readonly_fields=('get_name','get_login', 'crit', 'rating', 'usercom', 'get_time')
|
||||
# list_filter=('crit',)
|
||||
|
||||
# def get_time(self, obj):
|
||||
# return obj.usercom.time_create
|
||||
|
||||
# def get_name(self, obj):
|
||||
# return obj.usercom.user.fio()
|
||||
|
||||
# def get_login(self, obj):
|
||||
# return obj.usercom.user
|
||||
|
||||
# get_time.short_description="Дата создания"
|
||||
# get_name.short_description="ФИО"
|
||||
# get_login.short_description="Логин"
|
||||
|
||||
admin.site.site_header = "Админ-панель сайта Портал"
|
||||
admin.site.site_title = "Панель администрирования"
|
||||
admin.site.index_title = "Добро пожаловать в админку"
|
||||
|
||||
admin.site.register(BaseCriteria, BaseCriteriaAdmin)
|
||||
admin.site.register(UserComment, UserCommentAdmin)
|
||||
# admin.site.register(RatingStatus, RatingStatusAdmin)
|
||||
|
||||
# Register your models here.
|
||||
@@ -0,0 +1,7 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class FeedbackConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'feedback'
|
||||
verbose_name = "Обратная связь"
|
||||
@@ -0,0 +1,51 @@
|
||||
from django.db import models
|
||||
from django.conf import settings
|
||||
from userauth.models import DictEmployee
|
||||
|
||||
class BaseCriteria(models.Model):
|
||||
name = models.CharField(verbose_name='Название', max_length=150, blank=True, db_index=True)
|
||||
ico = models.CharField(verbose_name='Иконка', max_length=150, null=True, blank=True)
|
||||
rating = models.IntegerField(verbose_name='Рейтинг', default=5, blank=True)
|
||||
color = models.CharField(verbose_name='Цвет иконки', max_length=150, null=True, blank=True)
|
||||
class Meta:
|
||||
|
||||
verbose_name = "Справочник - Критерии оценки"
|
||||
verbose_name_plural = "Справочник - Критерии оценки"
|
||||
def __str__(self):
|
||||
return str(self.name)
|
||||
|
||||
# Первичная модель
|
||||
class UserComment(models.Model):
|
||||
user = models.ForeignKey(settings.AUTH_USER_MODEL, editable=False, on_delete=models.PROTECT, related_name='get_userauth', verbose_name='Пользователь')
|
||||
time_create = models.DateTimeField(auto_now_add = True, verbose_name='Время создания')
|
||||
comment = models.TextField(null=True, verbose_name='Комментарий')
|
||||
utility = models.BooleanField(default=True, verbose_name='Полезность')
|
||||
|
||||
class Meta:
|
||||
|
||||
verbose_name = "Комментарий пользователя"
|
||||
verbose_name_plural = "Комментарии пользователя"
|
||||
|
||||
def __str__(self):
|
||||
return str(self.user.fio())
|
||||
|
||||
def names(self):
|
||||
return DictEmployee.objects.get(login=self.user)
|
||||
|
||||
names.short_description="ФИО"
|
||||
|
||||
# Дочерняя модель
|
||||
class RatingStatus(models.Model):
|
||||
crit = models.ForeignKey(BaseCriteria, on_delete=models.PROTECT, related_name='get_criteria', verbose_name='Критерий')
|
||||
rating = models.FloatField(verbose_name='Рейтинг')
|
||||
usercom = models.ForeignKey(UserComment, on_delete=models.PROTECT, related_name='get_rating', verbose_name='Комментарий')
|
||||
|
||||
class Meta:
|
||||
|
||||
verbose_name = "Рейтинг"
|
||||
verbose_name_plural = "Рейтинги"
|
||||
|
||||
def __str__(self):
|
||||
return str(self.crit)
|
||||
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
from rest_framework import serializers
|
||||
from .models import *
|
||||
from userauth.serializers import *
|
||||
|
||||
class BaseCriteriaAllSerializer(serializers.ModelSerializer):
|
||||
|
||||
|
||||
class Meta:
|
||||
model = BaseCriteria
|
||||
fields = '__all__'
|
||||
|
||||
|
||||
|
||||
class RatingStatusSerializer(serializers.ModelSerializer):
|
||||
|
||||
class Meta:
|
||||
model = RatingStatus
|
||||
fields ='__all__'
|
||||
|
||||
class RatingStatusStatSerializer(serializers.ModelSerializer):
|
||||
author = serializers.SerializerMethodField('get_user')
|
||||
time_create = serializers.DateTimeField(source='usercom.time_create')
|
||||
# comment = serializers.CharField(source='usercom.comment')
|
||||
# utility = serializers.CharField(source='usercom.utility')
|
||||
namecrit = serializers.CharField(source='crit.name')
|
||||
ico = serializers.CharField(source='crit.ico')
|
||||
color = serializers.CharField(source='crit.color')
|
||||
|
||||
class Meta:
|
||||
model = RatingStatus
|
||||
fields ='__all__'
|
||||
|
||||
def get_user(self, obj):
|
||||
|
||||
# obj.user
|
||||
return ShortUserSerializer(DictEmployee.objects.get(login=obj.usercom)).data
|
||||
|
||||
|
||||
class BaseCriteriaSerializer(serializers.ModelSerializer):
|
||||
|
||||
|
||||
class Meta:
|
||||
model = BaseCriteria
|
||||
fields = ['id', 'name', 'ico', 'rating', 'color']
|
||||
|
||||
|
||||
|
||||
# return super().to_representation(instance)
|
||||
|
||||
class UserCommentSerializer(serializers.ModelSerializer):
|
||||
author = serializers.SerializerMethodField('get_user')
|
||||
class Meta:
|
||||
model = UserComment
|
||||
fields = '__all__'
|
||||
|
||||
def get_user(self, obj):
|
||||
|
||||
# obj.user
|
||||
return ShortUserSerializer(DictEmployee.objects.get(login=obj.user)).data
|
||||
|
||||
class UserCommerializer(serializers.ModelSerializer):
|
||||
|
||||
class Meta:
|
||||
model = UserComment
|
||||
fields = '__all__'
|
||||
|
||||
class UserGetSerializer(serializers.ModelSerializer):
|
||||
|
||||
get_rating = RatingStatusSerializer(many=True)
|
||||
|
||||
class Meta:
|
||||
fields = ['id', 'user', 'time_create', 'comment', 'get_rating']
|
||||
model = UserComment
|
||||
@@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
@@ -0,0 +1,9 @@
|
||||
from django.urls import path
|
||||
from .views import *
|
||||
|
||||
|
||||
urlpatterns = [
|
||||
path('feedbackdata/', FeedbackAPIView.as_view(), name='feedbackdata'),
|
||||
|
||||
|
||||
]
|
||||
@@ -0,0 +1,51 @@
|
||||
from rest_framework.response import Response
|
||||
import datetime
|
||||
from .serializers import *
|
||||
from .models import *
|
||||
|
||||
from rest_framework.views import APIView
|
||||
|
||||
|
||||
class FeedbackAPIView(APIView):
|
||||
def get(self, request):
|
||||
# Получаем набор всех записей из таблицы Capital
|
||||
nowrating = RatingStatus.objects.filter(usercom__user_id=self.request.user.id, usercom__time_create__contains=datetime.date.today()).order_by("crit_id")
|
||||
nowcomment = UserComment.objects.filter(user_id=self.request.user.id, time_create__contains=datetime.date.today())
|
||||
basecrit = BaseCriteria.objects.all()
|
||||
|
||||
# Сериализуем извлечённый набор записей
|
||||
serializer_for_basecrit = BaseCriteriaAllSerializer(
|
||||
instance=basecrit, # Передаём набор записей
|
||||
many=True # Указываем, что на вход подаётся именно набор записей
|
||||
)
|
||||
|
||||
serializer_for_nowcomment = UserCommerializer(
|
||||
instance=nowcomment, # Передаём набор записей
|
||||
many=True # Указываем, что на вход подаётся именно набор записей
|
||||
)
|
||||
|
||||
serializer_for_nowrating = RatingStatusSerializer(
|
||||
instance=nowrating, # Передаём набор записей , "rat":serializer_for_queryset2.data
|
||||
many=True # Указываем, что на вход подаётся именно набор записей
|
||||
)
|
||||
|
||||
return Response({"basecrit":serializer_for_basecrit.data,
|
||||
"nowrating":serializer_for_nowrating.data,
|
||||
"nowcomment": serializer_for_nowcomment.data[0] if len(nowcomment)>0 else None
|
||||
})
|
||||
|
||||
def post(self, request):
|
||||
comment, created = UserComment.objects.update_or_create(id=request.data['nowcomment']['id'],user_id=self.request.user.id, defaults={'comment':request.data['nowcomment']['comment'], 'time_create':datetime.datetime.now()})
|
||||
for x in request.data['nowrating']:
|
||||
RatingStatus.objects.update_or_create(id=x['id'], defaults={'rating':x['rating'], 'crit_id':x['crit'], 'usercom_id':comment.id})
|
||||
return Response({})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
from django.contrib import admin
|
||||
from .models import *
|
||||
# Register your models here.
|
||||
|
||||
# class MultiDBModelAdmin(admin.ModelAdmin):
|
||||
# # A handy constant for the name of the alternate database.
|
||||
# using = "add_base"
|
||||
# list_display=('title', 'order')
|
||||
# list_editable=('order', )
|
||||
|
||||
# def save_model(self, request, obj, form, change):
|
||||
# # Tell Django to save objects to the 'other' database.
|
||||
# obj.save(using=self.using)
|
||||
|
||||
# def delete_model(self, request, obj):
|
||||
# # Tell Django to delete objects from the 'other' database
|
||||
# obj.delete(using=self.using)
|
||||
|
||||
# def get_queryset(self, request):
|
||||
# # Tell Django to look for objects on the 'other' database.
|
||||
# return super().get_queryset(request).using(self.using)
|
||||
|
||||
# def formfield_for_foreignkey(self, db_field, request, **kwargs):
|
||||
# # Tell Django to populate ForeignKey widgets using a query
|
||||
# # on the 'other' database.
|
||||
# return super().formfield_for_foreignkey(
|
||||
# db_field, request, using=self.using, **kwargs
|
||||
# )
|
||||
|
||||
# def formfield_for_manytomany(self, db_field, request, **kwargs):
|
||||
# # Tell Django to populate ManyToMany widgets using a query
|
||||
# # on the 'other' database.
|
||||
# return super().formfield_for_manytomany(
|
||||
# db_field, request, using=self.using, **kwargs
|
||||
# )
|
||||
|
||||
# admin.site.register(Carousels, MultiDBModelAdmin)
|
||||
@@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class GarbageConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'garbage'
|
||||
@@ -0,0 +1,24 @@
|
||||
# This is an auto-generated Django model module.
|
||||
# You'll have to do the following manually to clean this up:
|
||||
# * Rearrange models' order
|
||||
# * Make sure each model has one field with primary_key=True
|
||||
# * Make sure each ForeignKey and OneToOneField has `on_delete` set to the desired behavior
|
||||
# * Remove `managed = False` lines if you wish to allow Django to create, modify, and delete the table
|
||||
# Feel free to rename the models, but don't rename db_table values or field names.
|
||||
from django.db import models
|
||||
|
||||
|
||||
|
||||
|
||||
class Carousels(models.Model):
|
||||
title = models.CharField(max_length=255)
|
||||
text = models.TextField(blank=True, null=True)
|
||||
link = models.ImageField(upload_to='fns/%Y/%m/%d', default="newsimage/default.jpg", null=True, verbose_name='Картинка')
|
||||
order = models.IntegerField(blank=True, null=True)
|
||||
link2 = models.ImageField(upload_to='fns/%Y/%m/%d', null=True, verbose_name='Картинка2')
|
||||
class Meta:
|
||||
managed = False
|
||||
db_table = 'carousels'
|
||||
|
||||
def __str__(self):
|
||||
return str(self.title)
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
from rest_framework import serializers
|
||||
from .models import *
|
||||
|
||||
|
||||
|
||||
class CarouselsSerializer(serializers.ModelSerializer):
|
||||
class Meta:
|
||||
|
||||
model = Carousels
|
||||
fields = '__all__'
|
||||
@@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
@@ -0,0 +1,16 @@
|
||||
from django.urls import include, path
|
||||
from rest_framework.routers import DefaultRouter
|
||||
|
||||
from .views import *
|
||||
|
||||
from rest_framework_simplejwt.views import (
|
||||
TokenObtainPairView,
|
||||
TokenRefreshView,TokenVerifyView
|
||||
)
|
||||
|
||||
urlpatterns = [
|
||||
|
||||
path('links/', CaorusAPIView.as_view(), name='CaorusAPIView'),
|
||||
|
||||
|
||||
]
|
||||
@@ -0,0 +1,10 @@
|
||||
from django.shortcuts import render
|
||||
from rest_framework.generics import ListAPIView
|
||||
from .models import *
|
||||
from rest_framework.response import Response
|
||||
from .serializers import *
|
||||
|
||||
class CaorusAPIView(ListAPIView):
|
||||
def get(self, request):
|
||||
queryset = Carousels.objects.using('add_base').all().order_by('order')
|
||||
return Response(CarouselsSerializer(queryset, many=True).data)
|
||||
@@ -0,0 +1,23 @@
|
||||
from django.contrib import admin
|
||||
from .models import *
|
||||
|
||||
class GeneralVacationAdmin(admin.ModelAdmin):
|
||||
fields = ('login', 'planned_date', 'count_days', 'type_of_vacation', 'start_work_period', 'end_work_period')
|
||||
list_display=('get_name', 'login', 'planned_date', 'count_days', 'type_of_vacation', 'start_work_period', 'end_work_period')
|
||||
readonly_fields=('get_name',)
|
||||
def get_name(self, obj):
|
||||
|
||||
return obj.user.fio()
|
||||
|
||||
class PlanCalendarAdmin(admin.ModelAdmin):
|
||||
list_display = ('name', 'start_work_period', 'end_work_period')
|
||||
list_filter = ('start_work_period', 'end_work_period')
|
||||
fields = ('name', 'start_work_period', 'end_work_period')
|
||||
|
||||
class BasePositionAmin(admin.ModelAdmin):
|
||||
list_display = ('id', 'name', 'order')
|
||||
list_editable = ('order', 'name')
|
||||
|
||||
# admin.site.register(GeneralVacation, GeneralVacationAdmin),
|
||||
admin.site.register(PlanCalendar, PlanCalendarAdmin)
|
||||
admin.site.register(BasePosition, BasePositionAmin)
|
||||
@@ -0,0 +1,8 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class GeneralVacationConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'general_vacation'
|
||||
verbose_name = "Общий график отпусков"
|
||||
|
||||
@@ -0,0 +1,241 @@
|
||||
import pandas as pd
|
||||
from pandas.io.excel import ExcelWriter
|
||||
import openpyxl as oxl
|
||||
from openpyxl import Workbook
|
||||
from openpyxl.styles import Font, Alignment, Side, Border, PatternFill
|
||||
from openpyxl.worksheet.formula import ArrayFormula
|
||||
from pandas.api.types import CategoricalDtype
|
||||
import urllib.request
|
||||
from datetime import date
|
||||
from .models import *
|
||||
from datetime import datetime
|
||||
from django.db.models import Count
|
||||
|
||||
class roundExcel():
|
||||
def __init__(self, us):
|
||||
self.df = pd.DataFrame.from_records(us)
|
||||
self.wb = Workbook()
|
||||
|
||||
pass
|
||||
|
||||
def excround(self):
|
||||
|
||||
self.df['tabel'] = self.df['login'].str.split('-', expand = True)[1]+self.df['login'].str.split('-', expand = True)[2]
|
||||
file_path = 'media/DailyRoundUp.xlsx'
|
||||
thins = Side(border_style="thin")
|
||||
ws = self.wb.active
|
||||
filters = ws.auto_filter
|
||||
filters.ref = "A6:N15"
|
||||
ws.title = "Список"
|
||||
ws['B2'] = 'Список сотрудников'
|
||||
ws['B3'] = 'МИ ФНС России по ЦОД № 2'
|
||||
ws['B4'] = 'по подразделениям'
|
||||
|
||||
ws['B6'] = 'Таб.'
|
||||
ws['C6'] = 'Фамилия'
|
||||
ws['D6'] = 'Имя'
|
||||
ws['E6'] = 'Очество'
|
||||
|
||||
for col in ws.iter_cols(min_row=6, max_row=6, min_col=2, max_col=5):
|
||||
for cell in col:
|
||||
cell.font = Font(name='Times New Roman', size=11, bold=True)
|
||||
cell.border = Border(top=thins, bottom=thins, left=thins, right=thins)
|
||||
|
||||
ws['G6'] = 'Отпуск'
|
||||
ws['I6'] = 'Болен'
|
||||
ws['K6'] = 'Удаленка'
|
||||
ws['M6'] = 'Командировка'
|
||||
|
||||
|
||||
|
||||
|
||||
heads =['G6', 'I6', 'K6', 'M6']
|
||||
for x in heads:
|
||||
|
||||
ws[x].fill = PatternFill(fgColor="00FFFF00", fill_type = "solid")
|
||||
ws[x].font = Font(name='Times New Roman', size=10, bold=True)
|
||||
ws[x].border = Border(top=thins, bottom=thins, left=thins, right=thins)
|
||||
ws[x].alignment = Alignment(horizontal='center')
|
||||
|
||||
|
||||
ws['I1'] = 'На '+ date.today().strftime("%d.%m.%Y")
|
||||
|
||||
numb = 1
|
||||
|
||||
column_widths = [29, 53, 96, 96, 112, 28, 222, 29, 148, 28, 145, 33, 148, 28]
|
||||
for i, width in enumerate(column_widths):
|
||||
column_letter = oxl.utils.get_column_letter(i+1)
|
||||
ws.column_dimensions[column_letter].width = self.convert_width(width)
|
||||
|
||||
|
||||
|
||||
for col in ws.iter_cols(min_row=2, max_row=5, min_col=2, max_col=5):
|
||||
for cell in col:
|
||||
cell.font = Font(name='Times New Roman', size=12, bold=True)
|
||||
cell.alignment = Alignment(horizontal='center')
|
||||
|
||||
ws['I1'].font = Font(name='Times New Roman', size=14, bold=True)
|
||||
ws['I1'].alignment = Alignment(horizontal='left')
|
||||
|
||||
|
||||
for x in range(3):
|
||||
ws.merge_cells(start_row=2+x, start_column=2, end_row=2+x, end_column=6)
|
||||
|
||||
|
||||
k=7
|
||||
|
||||
|
||||
for i in self.df['department'].unique():
|
||||
|
||||
ws.cell(row = k, column = 2).value = i
|
||||
|
||||
ws.cell(row = k, column = 2).font = Font(name='Times New Roman', size=10, bold=True)
|
||||
ws.merge_cells(start_row=k, start_column=2, end_row=k, end_column=12)
|
||||
|
||||
l = pd.DataFrame(self.df[(self.df.department==i)][['tabel', 'familyname', 'name', 'parentname']])
|
||||
|
||||
|
||||
|
||||
zap = [7, 9, 11, 13]
|
||||
for x in range(len(l)):
|
||||
k=k+1
|
||||
|
||||
ws.cell(row = k, column = 1).value = numb
|
||||
ws.cell(row = k, column = 1).font = Font(name='Times New Roman', size=10, bold=True)
|
||||
|
||||
ws.cell(row = k, column = 2).value = l.iloc[x]['tabel']
|
||||
ws.cell(row = k, column = 3).value = l.iloc[x]['familyname']
|
||||
ws.cell(row = k, column = 4).value = l.iloc[x]['name']
|
||||
ws.cell(row = k, column = 5).value = l.iloc[x]['parentname']
|
||||
ws.cell(row = k, column = 6).value = '=If(OR(H'+str(k)+'=1, J'+str(k)+'=1, L'+str(k)+'=1, N'+str(k)+'=1),"",1)'
|
||||
|
||||
for h in zap:
|
||||
ws.cell(row = k, column = h).border = Border(top=thins, bottom=thins, left=thins, right=thins)
|
||||
ws.cell(row = k, column = h).font = Font(name='Times New Roman', size=10)
|
||||
ws.cell(row = k, column = h).alignment = Alignment(horizontal='center')
|
||||
|
||||
|
||||
for v in range(4):
|
||||
ws.cell(row = k, column = 2+v).font = Font(name='Times New Roman', size=10)
|
||||
ws.cell(row = k, column = 2+v).border = Border(top=thins, bottom=thins, left=thins, right=thins)
|
||||
|
||||
|
||||
numb=numb+1
|
||||
|
||||
k=k+1
|
||||
|
||||
col=6
|
||||
ws.cell(row = k+1, column=col).value = len(self.df)
|
||||
ws.cell(row = k+1, column=col).fill = PatternFill(fgColor="00FFFF00", fill_type = "solid")
|
||||
ws.cell(row = k+1, column=col).font = Font(name='Times New Roman', size=13, bold=True)
|
||||
|
||||
col+=1
|
||||
ws.cell(row = k+1, column=col).value = "ВСЕГО отпуск="
|
||||
ws.cell(row = k+1, column=col).fill = PatternFill(fgColor="00FFFF00", fill_type = "solid")
|
||||
ws.cell(row = k+1, column=col).font = Font(name='Times New Roman', size=10, bold=True)
|
||||
|
||||
col+=1
|
||||
ws.cell(row = k+1, column=col).value = "=SUM(H6:H"+str(k-1)+")"
|
||||
ws.cell(row = k+1, column=col).fill = PatternFill(fgColor="00FFFF00", fill_type = "solid")
|
||||
ws.cell(row = k+1, column=col).font = Font(name='Times New Roman', size=10, bold=True)
|
||||
|
||||
val = ["Всего больных=", "=SUM(J6:J"+str(k-1)+")", "Всего удаленка=", "=SUM(L6:L"+str(k-1)+")", "Всего в командировке=", "=SUM(N6:N"+str(k-1)+")"]
|
||||
for x in val:
|
||||
col+=1
|
||||
self.resultpos(ws, x, k, col)
|
||||
|
||||
self.wb.save(file_path)
|
||||
return file_path
|
||||
|
||||
def convert_width(self, width):
|
||||
"""
|
||||
Конвертируем ширину столбца Excel в ширину столбца openpyxl
|
||||
"""
|
||||
PIXELS_PER_CHAR = 7
|
||||
return (width) / PIXELS_PER_CHAR
|
||||
|
||||
def resultpos(self, ws, value, k, col):
|
||||
# Строка 88 подведение итогов
|
||||
ws.cell(row = k+1, column=col).value = value
|
||||
ws.cell(row = k+1, column=col).fill = PatternFill(fgColor="8EA9DB", fill_type = "solid")
|
||||
ws.cell(row = k+1, column=col).font = Font(name='Times New Roman', size=10, bold=True)
|
||||
|
||||
def excelvacation(self):
|
||||
|
||||
print('helooooooooooooooooooooooooooooooooooooo')
|
||||
|
||||
|
||||
class loadExcel():
|
||||
def __init__(self, us, files):
|
||||
self.file = files
|
||||
self.dfuser = pd.DataFrame.from_records(us)
|
||||
|
||||
|
||||
|
||||
def roundfilse(self):
|
||||
ed = pd.read_excel(self.file)
|
||||
df = pd.DataFrame(ed)
|
||||
datas = df.columns[8].split(" ")[1]
|
||||
|
||||
df.columns = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n"]
|
||||
df=df.iloc[6:]
|
||||
df= df[df.b.notna()]
|
||||
df= df[df.a.notna()]
|
||||
df['b']=df['b'].str[-3:]
|
||||
df=df[['b', 'f', 'h', 'j','l', 'n']]
|
||||
|
||||
df['b'] = df['b'].astype(int)
|
||||
|
||||
types = ['f', 'h', 'j','l', 'n']
|
||||
for n in types:
|
||||
df[n] = df[n].fillna(0)
|
||||
df[n] = df[n].astype(int)
|
||||
|
||||
df3 = pd.merge(df, self.dfuser, left_on= 'b', right_on="id")
|
||||
df3=df3[['login', 'f', 'h', 'j','l','n']]
|
||||
|
||||
for ind in df3.index:
|
||||
|
||||
keys = ''
|
||||
if df3['h'][ind] == 1:
|
||||
keys = 4 # В отпуске
|
||||
elif df3['j'][ind] == 1:
|
||||
keys = 5 # Болен
|
||||
elif df3['f'][ind] == 1:
|
||||
keys = 1 # На работе
|
||||
elif df3['l'][ind] == 1:
|
||||
keys = 2 # Удаленка
|
||||
elif df3['n'][ind] == 1:
|
||||
keys = 3 # Командировка
|
||||
else:
|
||||
keys = 6
|
||||
base=BasePosition.objects.get(pk=keys)
|
||||
DailyRoundUp.objects.update_or_create(todaysDate=datetime.strptime(datas, '%d.%m.%Y').strftime('%Y-%m-%d'),
|
||||
user=df3['login'][ind], defaults={'position':base})
|
||||
|
||||
# pos = DailyRoundUp.objects.values('position__name', 'position').filter(position=6,todaysDate=date.today()).annotate(Count('user'))
|
||||
|
||||
|
||||
|
||||
return ''
|
||||
|
||||
def vacationsExcel(self):
|
||||
ed = pd.read_excel(self.file, sheet_name='Запланированные отпуска')
|
||||
df = pd.DataFrame(ed)
|
||||
df.columns = ["a", "b", "c", "d", "e", "f", "g"]
|
||||
df=df[['b', 'c', 'd', 'e','f']]
|
||||
df3 = pd.merge(df, self.dfuser, left_on= 'b', right_on="fio")
|
||||
df3=df3[['login', 'c', 'd', 'e','f']]
|
||||
df3.loc[(df3['e'] == 'Осн'), 'e'] = 'os'
|
||||
df3.loc[(df3['e'] == 'Доп н/д'), 'e'] = 'nd'
|
||||
df3.loc[(df3['e'] == 'Доп в/л'), 'e'] = 'vl'
|
||||
df3['d'] = df3['d'].astype(int)
|
||||
|
||||
for ind in df3.index:
|
||||
# print(df3['login'][ind])
|
||||
#
|
||||
GeneralVacation.objects.create(login=df3['login'][ind], planned_date=df3['c'][ind], count_days=df3['d'][ind], type_of_vacation=df3['e'][ind], start_work_period=df3['f'][ind])
|
||||
# DailyRoundUp.objects.update_or_create(todaysDate=datetime.strptime(datas, '%d.%m.%Y').strftime('%Y-%m-%d'),
|
||||
# user=df3['login'][ind], defaults={'position':base})
|
||||
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
from django.db import models
|
||||
from django.conf import settings
|
||||
from userauth.models import DictEmployee
|
||||
|
||||
class BasePosition(models.Model):
|
||||
name = models.CharField(verbose_name='Название', max_length=150, blank=True, db_index=True)
|
||||
order = models.IntegerField(blank=True, null=True, verbose_name='Сортировка')
|
||||
|
||||
class Meta:
|
||||
# ЕО - ежедневный обход
|
||||
|
||||
verbose_name = "Справочник - Статус сотрудников"
|
||||
verbose_name_plural = "Справочник - Статус сотрудников"
|
||||
|
||||
def __str__(self):
|
||||
return str(self.name)
|
||||
|
||||
class DailyRoundUp(models.Model):
|
||||
todaysDate = models.DateField(verbose_name='Начало рабочего периода')
|
||||
user = models.CharField(max_length=100, verbose_name='Логин')
|
||||
position = models.ForeignKey(BasePosition, on_delete=models.PROTECT, related_name="get_position", verbose_name='Позиция')
|
||||
|
||||
class Meta:
|
||||
|
||||
verbose_name = "Ежедневный обход"
|
||||
verbose_name_plural = "Ежедневный обход"
|
||||
|
||||
def __str__(self):
|
||||
return str(self.position)
|
||||
|
||||
class GeneralVacation(models.Model):
|
||||
CHOICES = (
|
||||
('os', 'Осн'),
|
||||
('nd', 'Доп н/д'),
|
||||
('vl', 'Доп в/л'),
|
||||
)
|
||||
|
||||
login = models.CharField(max_length=100, blank=True, null=True, verbose_name='Логин')
|
||||
planned_date = models.DateField(verbose_name='Запланированная дата')
|
||||
count_days = models.IntegerField(verbose_name='Кол-во дней', default=0, blank=True)
|
||||
type_of_vacation = models.CharField(max_length=300, choices = CHOICES, verbose_name='Тип отпуска')
|
||||
start_work_period = models.DateField(verbose_name='Начало рабочего периода')
|
||||
end_work_period = models.DateField(verbose_name='Конец рабочего периода', blank=True, null=True)
|
||||
|
||||
class Meta:
|
||||
|
||||
verbose_name = "График отпусков"
|
||||
verbose_name_plural = "График отпусков"
|
||||
|
||||
def __str__(self):
|
||||
return str(self.login)
|
||||
|
||||
# def department(self):
|
||||
# return DictEmployee.objects.using('user_directory').get(login=self.username).department
|
||||
|
||||
class PlanCalendar(models.Model):
|
||||
name = models.CharField(verbose_name='Название', max_length=500, blank=True, db_index=True)
|
||||
start_work_period = models.DateField(verbose_name='Начало рабочего периода')
|
||||
end_work_period = models.DateField(verbose_name='Конец рабочего периода', blank=True, null=True)
|
||||
|
||||
class Meta:
|
||||
|
||||
verbose_name = "План-график"
|
||||
verbose_name_plural = "План-график"
|
||||
|
||||
def __str__(self):
|
||||
return str(self.name)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
from rest_framework import serializers
|
||||
from .models import *
|
||||
|
||||
class GeneralVacationSerializer(serializers.ModelSerializer):
|
||||
|
||||
class Meta:
|
||||
model = GeneralVacation
|
||||
fields ='__all__'
|
||||
|
||||
class PlanCalendarSerializer(serializers.ModelSerializer):
|
||||
|
||||
class Meta:
|
||||
model = PlanCalendar
|
||||
fields ='__all__'
|
||||
|
||||
class DailyRoundUpSerializer(serializers.ModelSerializer):
|
||||
|
||||
class Meta:
|
||||
model = DailyRoundUp
|
||||
fields ='__all__'
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
@@ -0,0 +1,10 @@
|
||||
from django.urls import path
|
||||
from .views import *
|
||||
|
||||
|
||||
urlpatterns = [
|
||||
path('generalvacation/', GeneralVacationAPIView.as_view(), name='generalvacation'),
|
||||
path('dailyroundup/', DailyRoundUpAPIView.as_view(), name='dailyroundup'),
|
||||
path('dailyload/', DailyloadAPIView.as_view(), name='dailyload'),
|
||||
path('searchuser/', SearchUserAPIView.as_view(), name='searchuser'),
|
||||
]
|
||||
@@ -0,0 +1,134 @@
|
||||
from datetime import datetime
|
||||
from .excel import roundExcel, loadExcel
|
||||
import os
|
||||
from django.forms import model_to_dict
|
||||
from openpyxl import load_workbook
|
||||
import openpyxl
|
||||
from rest_framework.response import Response
|
||||
from datetime import date
|
||||
from .serializers import *
|
||||
from .models import *
|
||||
import pandas as pd
|
||||
from rest_framework.views import APIView
|
||||
from userauth.models import *
|
||||
from django.shortcuts import render
|
||||
from pandas.io.excel import ExcelWriter
|
||||
import openpyxl as oxl
|
||||
from openpyxl import Workbook
|
||||
from openpyxl.styles import Font, Alignment, Side, Border, PatternFill
|
||||
from openpyxl.worksheet.formula import ArrayFormula
|
||||
from pandas.api.types import CategoricalDtype
|
||||
import urllib.request
|
||||
from django.db.models import Count
|
||||
|
||||
class GeneralVacationAPIView(APIView):
|
||||
def get(self, request):
|
||||
general = GeneralVacation.objects.all()
|
||||
plan = PlanCalendar.objects.all()
|
||||
|
||||
# Сериализуем извлечённый набор записей
|
||||
serializer_for_basecrit = GeneralVacationSerializer(
|
||||
instance=general, # Передаём набор записей
|
||||
many=True # Указываем, что на вход подаётся именно набор записей
|
||||
)
|
||||
|
||||
serializer_for_plan = PlanCalendarSerializer(
|
||||
instance=plan, # Передаём набор записей
|
||||
many=True # Указываем, что на вход подаётся именно набор записей
|
||||
)
|
||||
return Response({"Отпуск": serializer_for_basecrit.data, "План-график": serializer_for_plan.data})
|
||||
|
||||
class DailyRoundUpAPIView(APIView):
|
||||
|
||||
def get(self, request):
|
||||
|
||||
user = DictEmployee.objects.filter(deleted=0).values('login', 'department', 'familyname', 'name', 'parentname').order_by('id_dict_department__order_department')
|
||||
|
||||
|
||||
re = roundExcel(user)
|
||||
file_path = getattr(re, request.GET.get("excel"))()
|
||||
# if request.GET.get("excel") == 'round':
|
||||
# file_path = re.excround()
|
||||
# if request.GET.get("excel") == 'vacation':
|
||||
# file_path = re.excelvacation()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return Response({'path':file_path})
|
||||
|
||||
|
||||
|
||||
def post(self, request):
|
||||
user = DictEmployee.objects.filter(deleted=0).values('login', 'id', 'fio')
|
||||
re = loadExcel(user, request.data['dailyfiles'])
|
||||
pos=''
|
||||
mess = 'Файл не найден'
|
||||
try:
|
||||
getattr(re, request.GET.get("excel"))()
|
||||
mess = 'Файл загружен'
|
||||
except Exception as e:
|
||||
|
||||
pass
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return Response({"mess": mess, "pos": pos})
|
||||
|
||||
|
||||
class DailyloadAPIView(APIView):
|
||||
"""Читает загружаемый файл эксель, записывает данные в бд - информация о пользоватаеле и его местонахождение"""
|
||||
def get(self, request):
|
||||
try:
|
||||
user = DictEmployee.objects.filter(deleted=0).values('login', 'department', 'fio', 'post').order_by('id_dict_department__order_department', 'id_dict_position__order_position', 'fio')
|
||||
|
||||
dailyr = DailyRoundUp.objects.filter(todaysDate=date.today()).values_list('user', 'position__name', 'position')
|
||||
df_user = pd.DataFrame.from_records(user)
|
||||
df_daily = pd.DataFrame.from_records(dailyr)
|
||||
df_daily.columns = ["login", "pos", "idpos"]
|
||||
|
||||
df = pd.merge(df_user, df_daily, left_on= 'login', right_on="login")
|
||||
|
||||
result={}
|
||||
|
||||
|
||||
|
||||
if request.GET.__contains__('id'):
|
||||
df=df.loc[df['idpos']==int(request.GET.get("id"))]
|
||||
pos=df['pos'].unique()[0]
|
||||
if request.GET.__contains__('searchname'):
|
||||
|
||||
df = df.loc[df["fio"].str.contains(request.GET.get("searchname"))]
|
||||
|
||||
|
||||
|
||||
for index, row in df.iterrows ():
|
||||
if row['department'] in result.keys():
|
||||
result[row['department']].append({'login':row['login'],'fio':row['fio'], 'post':row['post'], 'pos':row['pos']})
|
||||
else:
|
||||
result[row['department']]=[{'login':row['login'],'fio':row['fio'], 'post':row['post'], 'pos':row['pos']}]
|
||||
|
||||
daily = result
|
||||
|
||||
|
||||
|
||||
else:
|
||||
pos=''
|
||||
daily = DailyRoundUp.objects.values('position__name', 'position').filter(todaysDate=date.today()).annotate(Count('user')).order_by('position__order')
|
||||
except Exception as e:
|
||||
pos=''
|
||||
daily=""
|
||||
return Response({'daily':daily, 'position':pos})
|
||||
|
||||
class SearchUserAPIView(APIView):
|
||||
def post(self, request):
|
||||
f= DictEmployee.objects.values('familyname').filter(fio__icontains=request.data['searchname'])
|
||||
|
||||
return Response('')
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env python
|
||||
"""Django's command-line utility for administrative tasks."""
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
def main():
|
||||
"""Run administrative tasks."""
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'portal.settings')
|
||||
try:
|
||||
from django.core.management import execute_from_command_line
|
||||
except ImportError as exc:
|
||||
raise ImportError(
|
||||
"Couldn't import Django. Are you sure it's installed and "
|
||||
"available on your PYTHONPATH environment variable? Did you "
|
||||
"forget to activate a virtual environment?"
|
||||
) from exc
|
||||
execute_from_command_line(sys.argv)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -0,0 +1,135 @@
|
||||
from django.contrib import admin
|
||||
from django.utils.safestring import mark_safe
|
||||
|
||||
from .models import *
|
||||
|
||||
class GalleryInline(admin.TabularInline):
|
||||
save_on_top = True
|
||||
model = Gallery
|
||||
fields = ( 'img', 'get_html_photo')
|
||||
readonly_fields=('get_html_photo',)
|
||||
show_change_link = False
|
||||
extra = 1
|
||||
|
||||
def get_html_photo(self, object):
|
||||
if object.img:
|
||||
return mark_safe(f"<img src='{object.img.url}' width=50>")
|
||||
|
||||
get_html_photo.short_description="Превью изображения"
|
||||
|
||||
class NewsAdmin(admin.ModelAdmin):
|
||||
save_on_top = True
|
||||
list_display = ('title', 'get_html_photo', 'link', 'names', 'cdate')
|
||||
readonly_fields=('get_html_photo',)
|
||||
fields=('title', 'text', 'cdate', ('get_html_photo', 'link',))
|
||||
list_editable = ('link', 'cdate')
|
||||
list_filter = ('cdate',)
|
||||
ordering=('-cdate',)
|
||||
|
||||
def save_model(self, request, obj, form, change):
|
||||
if (request.user.username != 'admin') :
|
||||
obj.author = request.user
|
||||
else :
|
||||
obj.author = User.objects.get(id=15)
|
||||
super().save_model(request, obj, form, change)
|
||||
|
||||
def get_html_photo(self, object):
|
||||
if object.link:
|
||||
return mark_safe(f"<img src='{object.link.url}' width=50>")
|
||||
|
||||
get_html_photo.short_description="Превью изображения"
|
||||
|
||||
inlines = [GalleryInline]
|
||||
|
||||
|
||||
|
||||
class CarouselsAdmin(admin.ModelAdmin):
|
||||
list_display=('title', 'get_html_photo', 'link', 'cdate', 'enddate', 'published', 'sender', 'order')
|
||||
readonly_fields=('get_html_photo',)
|
||||
list_editable=('link','published', 'cdate', 'enddate', 'sender', 'order')
|
||||
list_filter=('cdate', 'enddate','published')
|
||||
fields=(('title', 'sender'), 'published', 'text', ('cdate', 'enddate'), ('link','get_html_photo'))
|
||||
|
||||
def save_model(self, request, obj, form, change):
|
||||
|
||||
if (request.user.username != 'admin') :
|
||||
obj.author = request.user
|
||||
else :
|
||||
obj.author = User.objects.get(id=15)
|
||||
super().save_model(request, obj, form, change)
|
||||
|
||||
def get_html_photo(self, object):
|
||||
if object.link:
|
||||
return mark_safe(f"<img src='{object.link.url}' width=50>")
|
||||
|
||||
get_html_photo.short_description="Изображение"
|
||||
|
||||
class BaseSenderAdmin(admin.ModelAdmin):
|
||||
list_display=('name', 'get_html_photo', 'img', 'order')
|
||||
list_editable=('img', 'order')
|
||||
fields=('name', ('img', 'get_html_photo'))
|
||||
readonly_fields=('get_html_photo',)
|
||||
|
||||
def get_html_photo(self, object):
|
||||
if object.img:
|
||||
return mark_safe(f"<img src='{object.img.url}' width=50>")
|
||||
|
||||
get_html_photo.short_description="Изображение"
|
||||
|
||||
class ScoreNewsAdmin(admin.ModelAdmin):
|
||||
list_display = ('names', 'news', 'cdate', 'score')
|
||||
readonly_fields=('names', 'news', 'cdate', 'score')
|
||||
list_filter = ('author', 'cdate', 'score')
|
||||
|
||||
|
||||
class CommentNewsAdmin(admin.ModelAdmin):
|
||||
list_display = ('names','author', 'news', 'text', 'cdate')
|
||||
readonly_fields=('names','author', 'news', 'cdate')
|
||||
list_filter = ('author','cdate',)
|
||||
|
||||
class LinksAdmin(admin.ModelAdmin):
|
||||
list_display = ('name', 'link')
|
||||
list_display_links = ('link',)
|
||||
|
||||
class BirthdayImageAdmin(admin.ModelAdmin):
|
||||
list_display = ('get_html_photo', 'img')
|
||||
readonly_fields=('get_html_photo',)
|
||||
list_editable=('img',)
|
||||
fields=(('get_html_photo', 'img'),)
|
||||
|
||||
def get_html_photo(self, object):
|
||||
if object.img:
|
||||
return mark_safe(f"<img src='{object.img.url}' width=50>")
|
||||
|
||||
get_html_photo.short_description="Превью изображения"
|
||||
|
||||
class BirthdayTextAdmin(admin.ModelAdmin):
|
||||
list_display = ('text',)
|
||||
|
||||
class ScreensaverAdmin(admin.ModelAdmin):
|
||||
list_display = ('get_html_photo', 'img', 'cdate', 'enddate')
|
||||
list_editable=('img', 'cdate', 'enddate')
|
||||
fields=(('get_html_photo', 'img'), ('cdate', 'enddate'))
|
||||
readonly_fields=('get_html_photo',)
|
||||
|
||||
def get_html_photo(self, object):
|
||||
if object.img:
|
||||
return mark_safe(f"<img src='{object.img.url}' width=50>")
|
||||
|
||||
get_html_photo.short_description="Превью изображения"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
admin.site.register(Links, LinksAdmin)
|
||||
admin.site.register(News, NewsAdmin)
|
||||
admin.site.register(Carousels, CarouselsAdmin)
|
||||
admin.site.register(BaseSender, BaseSenderAdmin)
|
||||
admin.site.register(ScoreNews, ScoreNewsAdmin)
|
||||
admin.site.register(CommentNews, CommentNewsAdmin)
|
||||
admin.site.register(BirthdayImage, BirthdayImageAdmin)
|
||||
admin.site.register(BirthdayText, BirthdayTextAdmin)
|
||||
admin.site.register(Screensaver, ScreensaverAdmin)
|
||||
@@ -0,0 +1,9 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class NavigationConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'navigation'
|
||||
verbose_name = "Навигация"
|
||||
|
||||
|
||||
@@ -0,0 +1,182 @@
|
||||
from django.db import models
|
||||
from accounts.models import *
|
||||
# Create your models here.
|
||||
from django.conf import settings
|
||||
from ckeditor.fields import RichTextField
|
||||
from ckeditor_uploader.fields import RichTextUploadingField
|
||||
from datetime import date
|
||||
|
||||
class BaseSender(models.Model):
|
||||
name = models.CharField(verbose_name='Название', max_length=150, blank=True, db_index=True)
|
||||
img = models.ImageField(verbose_name='Картинка', null=True, blank=True, upload_to='senderimage')
|
||||
order = models.IntegerField(verbose_name='Порядок сортировки', null=True, blank=True)
|
||||
|
||||
class Meta:
|
||||
|
||||
verbose_name = "Карусель. Справочник - Статус новости"
|
||||
verbose_name_plural = "Карусель. Справочник - Статусы новостей"
|
||||
|
||||
def __str__(self):
|
||||
return str(self.name)
|
||||
|
||||
class Links(models.Model):
|
||||
name = models.CharField(db_index=True, max_length=255, verbose_name='Заголовок')
|
||||
link = models.CharField(db_index=True, max_length=255, verbose_name='Ссылка')
|
||||
imagecode = models.CharField(db_index=True, max_length=25, verbose_name='Иконка')
|
||||
order = models.IntegerField(verbose_name='Порядок сортировки')
|
||||
|
||||
class Meta:
|
||||
|
||||
verbose_name = "Ссылка. Внешний ресурс"
|
||||
verbose_name_plural = "Ссылки. Внешние ресурсы"
|
||||
|
||||
def __str__(self):
|
||||
return str(self.name)
|
||||
|
||||
class News(models.Model):
|
||||
title=models.CharField(max_length=255, verbose_name='Заголовок')
|
||||
text= RichTextUploadingField(null=True, blank= True, verbose_name='Текст новости')
|
||||
cdate =models.DateTimeField(default=datetime.now, verbose_name='Дата создания')
|
||||
author = models.ForeignKey(settings.AUTH_USER_MODEL, editable=False, on_delete=models.PROTECT, verbose_name='Автор')
|
||||
link = models.ImageField(upload_to='newsimage/%Y/%m/%d', null=True, default="newsimage/default.jpg", verbose_name='Изображение')
|
||||
|
||||
class Meta:
|
||||
|
||||
verbose_name = "Новости"
|
||||
verbose_name_plural = "Новости"
|
||||
|
||||
def __str__(self):
|
||||
return str(self.title)
|
||||
|
||||
def names(self):
|
||||
return DictEmployee.objects.get(login=self.author)
|
||||
|
||||
names.short_description="ФИО"
|
||||
|
||||
|
||||
|
||||
class ScoreNews(models.Model):
|
||||
author = models.ForeignKey(settings.AUTH_USER_MODEL, editable=False, on_delete=models.PROTECT, verbose_name='Автор')
|
||||
score = models.BooleanField(default=None, null=True, verbose_name='Оценка лайк/дизлайк')
|
||||
# text= models.TextField(null=True, verbose_name='Сообщение')
|
||||
cdate =models.DateTimeField(auto_now_add=True, verbose_name='Дата создания')
|
||||
news = models.ForeignKey(News, on_delete=models.PROTECT, related_name='get_news', verbose_name='Новость')
|
||||
|
||||
class Meta:
|
||||
|
||||
verbose_name = "Новости. Лайк"
|
||||
verbose_name_plural = "Новости. Лайки"
|
||||
|
||||
def __str__(self):
|
||||
return str(self.author)
|
||||
|
||||
def names(self):
|
||||
return DictEmployee.objects.get(login=self.author)
|
||||
|
||||
names.short_description="ФИО"
|
||||
|
||||
class Gallery(models.Model):
|
||||
img = models.ImageField(upload_to='newsgallery/%Y/%m/%d', null=True, verbose_name='Изображение')
|
||||
news = models.ForeignKey(News, editable=False, on_delete=models.PROTECT, related_name='get_gallery_news', verbose_name='Новость')
|
||||
cdate =models.DateTimeField(auto_now_add=True, null=True, verbose_name='Дата создания')
|
||||
|
||||
|
||||
class Meta:
|
||||
|
||||
verbose_name = "Новости. Изображения"
|
||||
verbose_name_plural = "Новости. Изображения"
|
||||
|
||||
def __str__(self):
|
||||
return str(self.news)
|
||||
|
||||
|
||||
|
||||
class ScoreGallery(models.Model):
|
||||
author = models.ForeignKey(settings.AUTH_USER_MODEL, editable=False, on_delete=models.PROTECT, verbose_name='Автор')
|
||||
like = models.IntegerField(verbose_name='Лайк', default=0, blank=True)
|
||||
cdate =models.DateTimeField(auto_now_add=True, verbose_name='Дата создания')
|
||||
gallery = models.ForeignKey(Gallery, on_delete=models.PROTECT, related_name='get_gallery', verbose_name='Новость')
|
||||
|
||||
class Meta:
|
||||
|
||||
verbose_name = "Галерея. Лайк"
|
||||
verbose_name_plural = "Галерея. Лайки"
|
||||
|
||||
def __str__(self):
|
||||
return str(self.author)
|
||||
|
||||
class CommentNews(models.Model):
|
||||
text= models.TextField(null=True, verbose_name='Сообщение')
|
||||
cdate = models.DateTimeField(auto_now_add=True, verbose_name='Дата создания')
|
||||
author = models.ForeignKey(settings.AUTH_USER_MODEL,related_name='get_user', editable=False, on_delete=models.PROTECT, verbose_name='Автор')
|
||||
news = models.ForeignKey(News, on_delete=models.PROTECT, related_name='get_comment_news', verbose_name='Новость')
|
||||
|
||||
|
||||
class Meta:
|
||||
|
||||
verbose_name = "Новости. Комментарий пользователя"
|
||||
verbose_name_plural = "Новости. Комментарии пользователей"
|
||||
|
||||
def __str__(self):
|
||||
return str(self.author)
|
||||
|
||||
def names(self):
|
||||
return DictEmployee.objects.get(login=self.author)
|
||||
|
||||
names.short_description="ФИО"
|
||||
|
||||
class Carousels(models.Model):
|
||||
title=models.CharField(max_length=255, blank=True, null=True, verbose_name='Заголовок')
|
||||
text= models.TextField(max_length=260, blank=True, null=True, verbose_name='Сообщение')
|
||||
cdate =models.DateTimeField(default=datetime.now, verbose_name='Дата создания')
|
||||
author = models.ForeignKey(settings.AUTH_USER_MODEL, editable=False, on_delete=models.PROTECT, verbose_name='Автор новости')
|
||||
link = models.ImageField(upload_to='newsimage/%Y/%m/%d', null=True, default="newsimage/default.jpg", verbose_name='Картинка')
|
||||
published = models.BooleanField(default=True, verbose_name='Опубликован')
|
||||
enddate = models.DateTimeField(default=datetime.now().replace(hour=23,minute=0,second=0,microsecond=0) + timedelta(days=7), verbose_name='Дата снятия с публикации')
|
||||
sender = models.ForeignKey(BaseSender, on_delete=models.PROTECT, related_name='get_base_sender', verbose_name='Тематика')
|
||||
order = models.IntegerField(verbose_name='Порядок сортировки', null=True, blank=True)
|
||||
|
||||
class Meta:
|
||||
|
||||
verbose_name = "Карусель"
|
||||
verbose_name_plural = "Карусель"
|
||||
|
||||
def __str__(self):
|
||||
return str(self.title)
|
||||
|
||||
class BirthdayImage(models.Model):
|
||||
img = models.ImageField(verbose_name='Картинка', null=True, blank=True, upload_to='birthdayimage')
|
||||
|
||||
class Meta:
|
||||
|
||||
verbose_name = "Открытка. Изображение"
|
||||
verbose_name_plural = "Открытки. Изображения"
|
||||
|
||||
def __str__(self):
|
||||
return str(self.pk)
|
||||
|
||||
class BirthdayText(models.Model):
|
||||
text= models.TextField(max_length=260, null=True, verbose_name='Текст поздравления')
|
||||
|
||||
class Meta:
|
||||
|
||||
verbose_name = "Открытка. Текст поздравления"
|
||||
verbose_name_plural = "Открытки. Тексты поздравлений"
|
||||
|
||||
def __str__(self):
|
||||
return str(self.pk)
|
||||
|
||||
|
||||
class Screensaver(models.Model):
|
||||
img = models.ImageField(upload_to='screengallery/%Y/%m/%d', null=True, verbose_name='Изображение')
|
||||
cdate =models.DateField(default=date.today().replace(year=1992), null=True, verbose_name='Дата начала периода')
|
||||
enddate = models.DateField(default= date.today().replace(year=1992), verbose_name='Дата окончания периода', null=True)
|
||||
|
||||
class Meta:
|
||||
|
||||
verbose_name = "Вход. Изображение"
|
||||
verbose_name_plural = "Вход. Изображения"
|
||||
|
||||
def __str__(self):
|
||||
return str(self.img)
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
|
||||
from rest_framework import serializers
|
||||
from .models import *
|
||||
from userauth.serializers import *
|
||||
|
||||
|
||||
class LinkSerializer(serializers.ModelSerializer):
|
||||
class Meta:
|
||||
model = Links
|
||||
fields = '__all__'
|
||||
|
||||
class ScoreGalleryAllSerializer(serializers.ModelSerializer):
|
||||
|
||||
class Meta:
|
||||
model = ScoreGallery
|
||||
fields = '__all__'
|
||||
|
||||
class ScoreGallerySerializer(serializers.ModelSerializer):
|
||||
user = serializers.CharField(source='author.username')
|
||||
class Meta:
|
||||
model = ScoreGallery
|
||||
fields = ['like', 'user']
|
||||
|
||||
class GallerySerializer(serializers.ModelSerializer):
|
||||
likes= serializers.SerializerMethodField('get_gallery')
|
||||
|
||||
class Meta:
|
||||
model = Gallery
|
||||
fields = '__all__'
|
||||
|
||||
def get_gallery(self, obj):
|
||||
return ScoreGallerySerializer(obj.get_gallery.all(), many=True).data
|
||||
|
||||
|
||||
class ScoreNewsSerializer(serializers.ModelSerializer):
|
||||
user = serializers.CharField(source='author.username')
|
||||
class Meta:
|
||||
model = ScoreNews
|
||||
fields = ['score', 'user']
|
||||
|
||||
|
||||
class CommentNewsSerializer(serializers.ModelSerializer):
|
||||
author = serializers.SerializerMethodField('get_user')
|
||||
|
||||
|
||||
class Meta:
|
||||
model = CommentNews
|
||||
fields = '__all__'
|
||||
|
||||
def get_user(self, obj):
|
||||
return ShortUserSerializer(DictEmployee.objects.get(login=obj.author.username)).data
|
||||
|
||||
|
||||
class NewsSerializer(serializers.ModelSerializer):
|
||||
|
||||
show = serializers.SerializerMethodField('get_show')
|
||||
showComment = serializers.SerializerMethodField('get_show')
|
||||
author = serializers.SerializerMethodField('get_user')
|
||||
scores= serializers.SerializerMethodField('get_score')
|
||||
comment = serializers.SerializerMethodField('get_comment')
|
||||
gallery = serializers.SerializerMethodField('get_gallery')
|
||||
|
||||
class Meta:
|
||||
model = News
|
||||
fields = '__all__'
|
||||
|
||||
def get_show(self,obj):
|
||||
return False
|
||||
|
||||
def get_user(self, obj):
|
||||
return ShortUserSerializer(DictEmployee.objects.get(login=obj.author.username)).data
|
||||
|
||||
def get_score(self, obj):
|
||||
return ScoreNewsSerializer(obj.get_news.all(), many=True).data
|
||||
|
||||
def get_comment(self, obj):
|
||||
return CommentNewsSerializer(obj.get_comment_news.all(), many=True).data
|
||||
|
||||
def get_gallery(self, obj):
|
||||
# return 'gal'
|
||||
return GallerySerializer(obj.get_gallery_news.all(), many=True).data
|
||||
|
||||
class BaseSenderSerializer(serializers.ModelSerializer):
|
||||
|
||||
class Meta:
|
||||
model = BaseSender
|
||||
fields = '__all__'
|
||||
|
||||
class CarouselsSerializer(serializers.ModelSerializer):
|
||||
senders = serializers.CharField(source='sender.img')
|
||||
|
||||
class Meta:
|
||||
model = Carousels
|
||||
fields = ['title', 'text', 'link', 'senders']
|
||||
|
||||
|
||||
|
||||
class ScreensaverSerializer(serializers.ModelSerializer):
|
||||
|
||||
class Meta:
|
||||
model = Screensaver
|
||||
fields = '__all__'
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
@@ -0,0 +1,19 @@
|
||||
from django.urls import include, path
|
||||
from rest_framework.routers import DefaultRouter
|
||||
|
||||
from .views import *
|
||||
|
||||
urlpatterns = [
|
||||
|
||||
path('links/', LinkAPIView.as_view(), name='LinkAPIView'),
|
||||
|
||||
path('gallery/', GalleryAPIView.as_view(), name='GalleryAPIView'),
|
||||
path('carousels/', CarouselsAPIView.as_view(), name='CarouselsAPIView'),
|
||||
path('screensaver/', ScreensaverAPIView.as_view(), name='ScreensaverAPIView'),
|
||||
path('ckeditor/', include('ckeditor_uploader.urls')),
|
||||
|
||||
path('newscrossroad/', NewsCrossroadAPIView.as_view(), name='NewsCrossroadAPIView')
|
||||
|
||||
|
||||
|
||||
]
|
||||
@@ -0,0 +1,215 @@
|
||||
from django.shortcuts import render
|
||||
from rest_framework.generics import ListAPIView
|
||||
# Create your views here.
|
||||
from .models import *
|
||||
from rest_framework.permissions import AllowAny, IsAuthenticated
|
||||
from rest_framework.response import Response
|
||||
from .serializers import *
|
||||
from userauth.models import *
|
||||
from general_vacation.models import *
|
||||
from django.db.models import Q, Count
|
||||
from userauth.models import *
|
||||
from userauth.serializers import *
|
||||
from datetime import date
|
||||
|
||||
class LinkAPIView(ListAPIView):
|
||||
"""[
|
||||
Выстраивает список в меню, ссылки на внешние ресурсы и сортируетпо заданному приоритету
|
||||
{
|
||||
"id": 1,
|
||||
"name": "mdi",
|
||||
"link": "https://materialdesignicons.com/cdn/1.6.50-dev/",
|
||||
"imagecode": "mdi-panda",
|
||||
"order": 1
|
||||
}
|
||||
]
|
||||
"""
|
||||
permission_classes = (AllowAny,)
|
||||
serializer_class = LinkSerializer
|
||||
|
||||
|
||||
def get(self, request):
|
||||
|
||||
queryset = Links.objects.all().order_by('order')
|
||||
serializer = self.serializer_class(queryset, many=True)
|
||||
return Response(serializer.data)
|
||||
|
||||
|
||||
class GalleryAPIView(ListAPIView):
|
||||
|
||||
|
||||
|
||||
def get(self, request):
|
||||
""" Метод гет не используется"""
|
||||
return Response('result')
|
||||
|
||||
def post(self, request):
|
||||
"""
|
||||
Представление позволяет получить информацию: author: об авторе новости, scores: количестве поставленных лайков и кем были поставлены, comment: хранит комментарии к посту, gallery: Прикрепленные изображения к новости
|
||||
|
||||
{
|
||||
"id": 9,
|
||||
"show": false,
|
||||
"showComment": false,
|
||||
"author": {
|
||||
"familyname": "Гришина",
|
||||
"name": "Ирина",
|
||||
"parentname": "Сергеевна",
|
||||
"id": 107,
|
||||
"login": "9966-00-107",
|
||||
"post": "Старший специалист 1 разряда",
|
||||
"department": "Отдел контроля технологических процессов"
|
||||
},
|
||||
"scores": [
|
||||
{
|
||||
"score": false,
|
||||
"user": "9966-00-107"
|
||||
}
|
||||
],
|
||||
"comment": [],
|
||||
"gallery": [],
|
||||
"title": "А что это",
|
||||
"text": "",
|
||||
"cdate": "2023-12-12T13:50:53+03:00",
|
||||
"link": "/media/newsimage/2023/12/12/glaza_cr.jpg"
|
||||
}
|
||||
"""
|
||||
gal = ScoreGallery.objects.filter(author=self.request.user, gallery=request.data['image'])
|
||||
if gal.exists():
|
||||
gal.delete()
|
||||
else: {
|
||||
ScoreGallery.objects.create(author=self.request.user, like=1, gallery=Gallery.objects.get(id=request.data['image']))
|
||||
}
|
||||
result = ScoreGallerySerializer(ScoreGallery.objects.filter(gallery=request.data['image']), many=True).data
|
||||
|
||||
return Response(result)
|
||||
|
||||
|
||||
|
||||
class NewsCrossroadAPIView(ListAPIView):
|
||||
|
||||
def get(self, request):
|
||||
"""Получает список новостей для отображения на главной странице в разрезе 10 последних записей, и на странице новостей с пагинацией"""
|
||||
if request.GET.__contains__('id'):
|
||||
|
||||
newsqueryset = News.objects.filter(pk=int(request.GET.get('id')))
|
||||
countpage= 0
|
||||
else:
|
||||
|
||||
newsqueryset = News.objects.all().order_by('-cdate')
|
||||
countpage = newsqueryset.count()
|
||||
if request.GET.get("name") == "/":
|
||||
|
||||
newsqueryset = newsqueryset[:10]
|
||||
else:
|
||||
|
||||
|
||||
pagesel = int(request.GET.get("page"))*int(request.GET.get("countpage"))
|
||||
|
||||
newsqueryset =newsqueryset[pagesel:pagesel+int(request.GET.get("countpage"))]
|
||||
|
||||
|
||||
result = NewsSerializer(newsqueryset, many=True).data
|
||||
|
||||
return Response({"result":result, "countpage": countpage})
|
||||
|
||||
def post(self, request):
|
||||
"""Производит запись или обновление информации по поставленному лайку в новости, либо создает коментарий к посту, либо удаляет запись комментария"""
|
||||
if 'scores' in request.data:
|
||||
upd, created = ScoreNews.objects.get_or_create(news_id=request.data['news'], author=self.request.user)
|
||||
|
||||
if created or (upd.score != request.data['scores']):
|
||||
upd.score = request.data['scores']
|
||||
else:
|
||||
upd.score = None
|
||||
|
||||
upd.cdate=datetime.now()
|
||||
upd.save()
|
||||
|
||||
back = [{"score":y.score, "user":y.author.username} for y in ScoreNews.objects.filter(news_id=request.data['news'])]
|
||||
|
||||
if 'text' in request.data:
|
||||
CommentNews.objects.create(news_id=request.data['news'], author=self.request.user, text=request.data['text'])
|
||||
back = {'news': request.data['news'], 'comment': ({"text":y.text, "cdate":y.cdate, "id": y.pk,
|
||||
"author":model_to_dict(y.author.user)
|
||||
} for y in CommentNews.objects.filter(news_id=request.data['news']))}
|
||||
if 'delid' in request.data:
|
||||
CommentNews.objects.filter(pk=request.data['delid']).delete()
|
||||
|
||||
back = {'news': request.data['news'], 'comment': ({"text":y.text, "cdate":y.cdate, "id": y.pk,
|
||||
"author":model_to_dict(y.author.user)
|
||||
} for y in CommentNews.objects.filter(news_id=request.data['news']))}
|
||||
|
||||
return Response(back)
|
||||
|
||||
class CarouselsAPIView(ListAPIView):
|
||||
|
||||
"""
|
||||
Выбирает Данные из модели Carousels, у которых стоит параметр публикации, дата начала публикации меньше
|
||||
или равна сегодняшнему дню и дата окончания больше или равна сегодняшнему дню, с сортировкой по приоритету,
|
||||
с добавлением информации по дням рождениям, которые будут в текущем месяце, но не меньше сегодняшнего дня.
|
||||
К дням рождения прибавлется рандомная картинка и рандомный текст
|
||||
{
|
||||
"title": "Новость прочее",
|
||||
"text": "",
|
||||
"link": "/media/newsimage/default.jpg",
|
||||
"senders": "senderimage/dr.jpg"
|
||||
}
|
||||
"""
|
||||
permission_classes = (AllowAny,)
|
||||
|
||||
|
||||
|
||||
def get(self, request):
|
||||
|
||||
queryset = Carousels.objects.filter(published=True, cdate__lte=datetime.now(), enddate__gte=datetime.now()).order_by('sender__order')
|
||||
|
||||
result = CarouselsSerializer(queryset, many= True).data
|
||||
|
||||
manbrd = DictEmployee.objects.filter(birthdate__month=date.today().month, birthdate__day__gte=date.today().day).order_by('birthdate__day')
|
||||
if len(manbrd) > 0 :
|
||||
nowday= manbrd.filter(birthdate__day=date.today().day)
|
||||
|
||||
brdimage = BirthdayImage.objects.order_by("?")[:len(nowday)+1]
|
||||
|
||||
allbirthday = {
|
||||
"title":'Дни рождения',
|
||||
"text": "В этом месяце:\n"+"\n".join([f"{x.birthdate.strftime('%d')} - {x.fio}" for x in manbrd]),
|
||||
"link": "/media/"+str(brdimage[0].img),
|
||||
"published": 'true',
|
||||
|
||||
"sender": "/media/default/dr.png",
|
||||
}
|
||||
|
||||
|
||||
if len(nowday) > 0 :
|
||||
|
||||
|
||||
brdtext = BirthdayText.objects.order_by("?")[:len(nowday)]
|
||||
|
||||
|
||||
for k in nowday:
|
||||
|
||||
result.append({
|
||||
"title":'Поздравляем:',
|
||||
"text": f"{k.fio}!"+"\n"+ f"{brdtext[0].text}",
|
||||
"link": "/media/"+str(brdimage[0].img),
|
||||
"published": 'true',
|
||||
"sender": "/media/default/dr.png",
|
||||
})
|
||||
|
||||
|
||||
result.append(allbirthday)
|
||||
|
||||
|
||||
return Response(result)
|
||||
|
||||
class ScreensaverAPIView(ListAPIView):
|
||||
"""Получаем ссылку на картинку для экрана перед входом на сайт. Выбирает все записи с месяца и дня меньше и равного текущему и окончание больше или равному текущему дню и месяцу. Год не учитывается. Выбирается одна рандомная запись"""
|
||||
def get(self, request):
|
||||
|
||||
queryset = Screensaver.objects.filter(cdate__month__lte = date.today().month, cdate__day__lte = date.today().day,
|
||||
enddate__month__gte=date.today().month, enddate__day__gte=date.today().day).order_by('-cdate')
|
||||
queryset = queryset.filter(cdate=queryset[0].cdate).order_by("?")[:1]
|
||||
|
||||
return Response(ScreensaverSerializer(queryset, many= True).data)
|
||||
@@ -0,0 +1,13 @@
|
||||
from django.contrib import admin
|
||||
|
||||
from .models import SafetyFile
|
||||
# Register your models here.
|
||||
|
||||
|
||||
class SafetyFileAdmin(admin.ModelAdmin):
|
||||
list_display = ('name', 'chapter_id', 'category_id', 'sign_date')
|
||||
list_editable = ('sign_date', 'category_id')
|
||||
list_filter = ('name', 'sign_date', 'category_id',)
|
||||
fields = ('name', 'url', 'chapter_id', 'category_id', 'sign_date')
|
||||
|
||||
admin.site.register(SafetyFile, SafetyFileAdmin)
|
||||
@@ -0,0 +1,7 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class SafetyConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'safety'
|
||||
verbose_name = 'Раздел Безопасность'
|
||||
@@ -0,0 +1,50 @@
|
||||
from django.db import models
|
||||
from enum import Enum
|
||||
|
||||
# Create your models here.
|
||||
|
||||
class EnumChoice(Enum):
|
||||
@classmethod
|
||||
def get_choices(cls):
|
||||
return [(enum_.name, enum_.value) for enum_ in cls]
|
||||
|
||||
class SafetyChapter(EnumChoice):
|
||||
fire_safety = "Пожарная безопасность"
|
||||
information_safety = "Информационная безопасность"
|
||||
occupational_safety = "Охрана труда"
|
||||
access_mode = "Пропускной и внутриобъектовый режим"
|
||||
civil_defense = "Гражданская оборона"
|
||||
state_secrets = "Защита гостайны"
|
||||
military_registration = "Мобилизационная подготовка и воинский учет"
|
||||
|
||||
class SafetyDocumentCategory(EnumChoice):
|
||||
regulations = "Нормативные документы"
|
||||
instructions = "Инструкции"
|
||||
orders = "Приказы"
|
||||
provisions = "Положения"
|
||||
educational_materials = "Учебные материалы"
|
||||
laws = "Законы"
|
||||
decrees = "Указы"
|
||||
resolutions = "Постановления"
|
||||
thematic_materials = "Тематические материалы"
|
||||
methodological_materials = "Методологические материалы"
|
||||
evacuation_plan = 'План эвакуации'
|
||||
|
||||
|
||||
# Общая модель для раздела "Безопасность"
|
||||
class SafetyFile(models.Model):
|
||||
name = models.CharField(verbose_name='Имя документа', max_length=255)
|
||||
url = models.FileField(verbose_name='Путь до файла',upload_to='safety')
|
||||
chapter_id = models.CharField(verbose_name='Раздел', max_length=255, blank=False, db_index=True, choices=SafetyChapter.get_choices())
|
||||
category_id = models.CharField(verbose_name='Категория документа', max_length=255, blank=False, db_index=True, choices=SafetyDocumentCategory.get_choices())
|
||||
sign_date = models.DateField(verbose_name='Дата документа')
|
||||
created_at = models.DateTimeField(verbose_name='Дата загрузки файла', auto_now_add=True)
|
||||
update_at = models.DateTimeField(verbose_name='Дата обновления файла', auto_now=True)
|
||||
|
||||
class Meta:
|
||||
|
||||
verbose_name = 'Документы раздела безопасности'
|
||||
verbose_name_plural = 'Документы раздела безопасности'
|
||||
|
||||
def __str__(self):
|
||||
return str(self.name)
|
||||
@@ -0,0 +1,10 @@
|
||||
from rest_framework import serializers
|
||||
from .models import *
|
||||
|
||||
class SafetyFileSerializer(serializers.ModelSerializer):
|
||||
chapter_name = serializers.CharField(source='get_chapter_id_display')
|
||||
category_name = serializers.CharField(source='get_category_id_display')
|
||||
|
||||
class Meta:
|
||||
model = SafetyFile
|
||||
fields = '__all__'
|
||||
@@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
@@ -0,0 +1,10 @@
|
||||
from django.urls import path
|
||||
from rest_framework.routers import DefaultRouter
|
||||
|
||||
from .views import *
|
||||
|
||||
urlpatterns = [
|
||||
path('files/', SafetyFileAPIView.as_view(), name='safety_files'),
|
||||
path('responsibility/', SafetyResponsebilityAPIView.as_view(), name='responsibility'),
|
||||
path('committee_files/', CommitteeFilesAPIView.as_view(), name='committee_files')
|
||||
]
|
||||
@@ -0,0 +1,53 @@
|
||||
from itertools import groupby
|
||||
|
||||
from django.shortcuts import render
|
||||
from rest_framework.views import APIView
|
||||
from rest_framework.response import Response
|
||||
from .serializers import *
|
||||
from .models import *
|
||||
from userauth.serializers import *
|
||||
from userauth.models import *
|
||||
# Create your views here.
|
||||
|
||||
class SafetyFileAPIView(APIView):
|
||||
def get(self, request):
|
||||
|
||||
chapters = self.request.query_params.get('chapter_id', 1)
|
||||
all_file = SafetyFile.objects.filter(chapter_id=chapters).order_by('chapter_id', 'category_id').all()
|
||||
serializer_for_file = SafetyFileSerializer(instance=all_file, many=True)
|
||||
|
||||
data = []
|
||||
|
||||
for (chapter_id, chapter_name), row in groupby(serializer_for_file.data, lambda x: (x['chapter_id'], x['chapter_name'])):
|
||||
chapter = {
|
||||
'id': chapter_id,
|
||||
'name': chapter_name,
|
||||
'categories': []
|
||||
}
|
||||
data.append(chapter)
|
||||
for (category_id, category_name), files in groupby(row, lambda x: (x['category_id'], x['category_name'])):
|
||||
chapter['categories'].append({
|
||||
'id': category_id,
|
||||
'name': category_name,
|
||||
'files': [file for file in files]
|
||||
})
|
||||
|
||||
return Response(data)
|
||||
|
||||
class SafetyResponsebilityAPIView(APIView):
|
||||
|
||||
def get(self, request):
|
||||
|
||||
fireuser = OrderResponsibility.objects.get(id=54)
|
||||
responsobility_users = OrderResponsibilitySerializer(fireuser)
|
||||
|
||||
return Response(responsobility_users.data)
|
||||
|
||||
class CommitteeFilesAPIView(APIView):
|
||||
|
||||
def get(self, request):
|
||||
|
||||
committee_files = Committee1.objects.get(id=106)
|
||||
files = Committee1Serializer(committee_files)
|
||||
|
||||
return Response(files.data)
|
||||
@@ -0,0 +1,275 @@
|
||||
select.admin-autocomplete {
|
||||
width: 20em;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete.select2-container {
|
||||
min-height: 30px;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-selection--single,
|
||||
.select2-container--admin-autocomplete .select2-selection--multiple {
|
||||
min-height: 30px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete.select2-container--focus .select2-selection,
|
||||
.select2-container--admin-autocomplete.select2-container--open .select2-selection {
|
||||
border-color: var(--body-quiet-color);
|
||||
min-height: 30px;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete.select2-container--focus .select2-selection.select2-selection--single,
|
||||
.select2-container--admin-autocomplete.select2-container--open .select2-selection.select2-selection--single {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete.select2-container--focus .select2-selection.select2-selection--multiple,
|
||||
.select2-container--admin-autocomplete.select2-container--open .select2-selection.select2-selection--multiple {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-selection--single {
|
||||
background-color: var(--body-bg);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-selection--single .select2-selection__rendered {
|
||||
color: var(--body-fg);
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-selection--single .select2-selection__clear {
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-selection--single .select2-selection__placeholder {
|
||||
color: var(--body-quiet-color);
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-selection--single .select2-selection__arrow {
|
||||
height: 26px;
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
right: 1px;
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-selection--single .select2-selection__arrow b {
|
||||
border-color: #888 transparent transparent transparent;
|
||||
border-style: solid;
|
||||
border-width: 5px 4px 0 4px;
|
||||
height: 0;
|
||||
left: 50%;
|
||||
margin-left: -4px;
|
||||
margin-top: -2px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete[dir="rtl"] .select2-selection--single .select2-selection__clear {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete[dir="rtl"] .select2-selection--single .select2-selection__arrow {
|
||||
left: 1px;
|
||||
right: auto;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete.select2-container--disabled .select2-selection--single {
|
||||
background-color: var(--darkened-bg);
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete.select2-container--disabled .select2-selection--single .select2-selection__clear {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete.select2-container--open .select2-selection--single .select2-selection__arrow b {
|
||||
border-color: transparent transparent #888 transparent;
|
||||
border-width: 0 4px 5px 4px;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-selection--multiple {
|
||||
background-color: var(--body-bg);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 4px;
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__rendered {
|
||||
box-sizing: border-box;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0 10px 5px 5px;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__rendered li {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__placeholder {
|
||||
color: var(--body-quiet-color);
|
||||
margin-top: 5px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__clear {
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
font-weight: bold;
|
||||
margin: 5px;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__choice {
|
||||
background-color: var(--darkened-bg);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 4px;
|
||||
cursor: default;
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
margin-top: 5px;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__choice__remove {
|
||||
color: var(--body-quiet-color);
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-selection--multiple .select2-selection__choice__remove:hover {
|
||||
color: var(--body-fg);
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--admin-autocomplete[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder, .select2-container--admin-autocomplete[dir="rtl"] .select2-selection--multiple .select2-search--inline {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
||||
margin-left: 5px;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
|
||||
margin-left: 2px;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete.select2-container--focus .select2-selection--multiple {
|
||||
border: solid var(--body-quiet-color) 1px;
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete.select2-container--disabled .select2-selection--multiple {
|
||||
background-color: var(--darkened-bg);
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete.select2-container--disabled .select2-selection__choice__remove {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete.select2-container--open.select2-container--above .select2-selection--single, .select2-container--admin-autocomplete.select2-container--open.select2-container--above .select2-selection--multiple {
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete.select2-container--open.select2-container--below .select2-selection--single, .select2-container--admin-autocomplete.select2-container--open.select2-container--below .select2-selection--multiple {
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-search--dropdown {
|
||||
background: var(--darkened-bg);
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-search--dropdown .select2-search__field {
|
||||
background: var(--body-bg);
|
||||
color: var(--body-fg);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-search--inline .select2-search__field {
|
||||
background: transparent;
|
||||
color: var(--body-fg);
|
||||
border: none;
|
||||
outline: 0;
|
||||
box-shadow: none;
|
||||
-webkit-appearance: textfield;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-results > .select2-results__options {
|
||||
max-height: 200px;
|
||||
overflow-y: auto;
|
||||
color: var(--body-fg);
|
||||
background: var(--body-bg);
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-results__option[role=group] {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-results__option[aria-disabled=true] {
|
||||
color: var(--body-quiet-color);
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-results__option[aria-selected=true] {
|
||||
background-color: var(--selected-bg);
|
||||
color: var(--body-fg);
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-results__option .select2-results__option {
|
||||
padding-left: 1em;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-results__option .select2-results__option .select2-results__group {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -1em;
|
||||
padding-left: 2em;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -2em;
|
||||
padding-left: 3em;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -3em;
|
||||
padding-left: 4em;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -4em;
|
||||
padding-left: 5em;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -5em;
|
||||
padding-left: 6em;
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-results__option--highlighted[aria-selected] {
|
||||
background-color: var(--primary);
|
||||
color: var(--primary-fg);
|
||||
}
|
||||
|
||||
.select2-container--admin-autocomplete .select2-results__group {
|
||||
cursor: default;
|
||||
display: block;
|
||||
padding: 6px;
|
||||
}
|
||||
@@ -0,0 +1,328 @@
|
||||
/* CHANGELISTS */
|
||||
|
||||
#changelist {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
#changelist .changelist-form-container {
|
||||
flex: 1 1 auto;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
#changelist table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.change-list .hiddenfields { display:none; }
|
||||
|
||||
.change-list .filtered table {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
.change-list .filtered {
|
||||
min-height: 400px;
|
||||
}
|
||||
|
||||
.change-list .filtered .results, .change-list .filtered .paginator,
|
||||
.filtered #toolbar, .filtered div.xfull {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.change-list .filtered table tbody th {
|
||||
padding-right: 1em;
|
||||
}
|
||||
|
||||
#changelist-form .results {
|
||||
overflow-x: auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#changelist .toplinks {
|
||||
border-bottom: 1px solid var(--hairline-color);
|
||||
}
|
||||
|
||||
#changelist .paginator {
|
||||
color: var(--body-quiet-color);
|
||||
border-bottom: 1px solid var(--hairline-color);
|
||||
background: var(--body-bg);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* CHANGELIST TABLES */
|
||||
|
||||
#changelist table thead th {
|
||||
padding: 0;
|
||||
white-space: nowrap;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#changelist table thead th.action-checkbox-column {
|
||||
width: 1.5em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#changelist table tbody td.action-checkbox {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#changelist table tfoot {
|
||||
color: var(--body-quiet-color);
|
||||
}
|
||||
|
||||
/* TOOLBAR */
|
||||
|
||||
#toolbar {
|
||||
padding: 8px 10px;
|
||||
margin-bottom: 15px;
|
||||
border-top: 1px solid var(--hairline-color);
|
||||
border-bottom: 1px solid var(--hairline-color);
|
||||
background: var(--darkened-bg);
|
||||
color: var(--body-quiet-color);
|
||||
}
|
||||
|
||||
#toolbar form input {
|
||||
border-radius: 4px;
|
||||
font-size: 0.875rem;
|
||||
padding: 5px;
|
||||
color: var(--body-fg);
|
||||
}
|
||||
|
||||
#toolbar #searchbar {
|
||||
height: 1.1875rem;
|
||||
border: 1px solid var(--border-color);
|
||||
padding: 2px 5px;
|
||||
margin: 0;
|
||||
vertical-align: top;
|
||||
font-size: 0.8125rem;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
#toolbar #searchbar:focus {
|
||||
border-color: var(--body-quiet-color);
|
||||
}
|
||||
|
||||
#toolbar form input[type="submit"] {
|
||||
border: 1px solid var(--border-color);
|
||||
font-size: 0.8125rem;
|
||||
padding: 4px 8px;
|
||||
margin: 0;
|
||||
vertical-align: middle;
|
||||
background: var(--body-bg);
|
||||
box-shadow: 0 -15px 20px -10px rgba(0, 0, 0, 0.15) inset;
|
||||
cursor: pointer;
|
||||
color: var(--body-fg);
|
||||
}
|
||||
|
||||
#toolbar form input[type="submit"]:focus,
|
||||
#toolbar form input[type="submit"]:hover {
|
||||
border-color: var(--body-quiet-color);
|
||||
}
|
||||
|
||||
#changelist-search img {
|
||||
vertical-align: middle;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
#changelist-search .help {
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
/* FILTER COLUMN */
|
||||
|
||||
#changelist-filter {
|
||||
flex: 0 0 240px;
|
||||
order: 1;
|
||||
background: var(--darkened-bg);
|
||||
border-left: none;
|
||||
margin: 0 0 0 30px;
|
||||
}
|
||||
|
||||
#changelist-filter h2 {
|
||||
font-size: 0.875rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
padding: 5px 15px;
|
||||
margin-bottom: 12px;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
#changelist-filter h3,
|
||||
#changelist-filter details summary {
|
||||
font-weight: 400;
|
||||
padding: 0 15px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
#changelist-filter details summary > * {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
#changelist-filter details > summary {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
#changelist-filter details > summary::-webkit-details-marker {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#changelist-filter details > summary::before {
|
||||
content: '→';
|
||||
font-weight: bold;
|
||||
color: var(--link-hover-color);
|
||||
}
|
||||
|
||||
#changelist-filter details[open] > summary::before {
|
||||
content: '↓';
|
||||
}
|
||||
|
||||
#changelist-filter ul {
|
||||
margin: 5px 0;
|
||||
padding: 0 15px 15px;
|
||||
border-bottom: 1px solid var(--hairline-color);
|
||||
}
|
||||
|
||||
#changelist-filter ul:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
#changelist-filter li {
|
||||
list-style-type: none;
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
#changelist-filter a {
|
||||
display: block;
|
||||
color: var(--body-quiet-color);
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
#changelist-filter li.selected {
|
||||
border-left: 5px solid var(--hairline-color);
|
||||
padding-left: 10px;
|
||||
margin-left: -15px;
|
||||
}
|
||||
|
||||
#changelist-filter li.selected a {
|
||||
color: var(--link-selected-fg);
|
||||
}
|
||||
|
||||
#changelist-filter a:focus, #changelist-filter a:hover,
|
||||
#changelist-filter li.selected a:focus,
|
||||
#changelist-filter li.selected a:hover {
|
||||
color: var(--link-hover-color);
|
||||
}
|
||||
|
||||
#changelist-filter #changelist-filter-clear a {
|
||||
font-size: 0.8125rem;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid var(--hairline-color);
|
||||
}
|
||||
|
||||
/* DATE DRILLDOWN */
|
||||
|
||||
.change-list .toplinks {
|
||||
display: flex;
|
||||
padding-bottom: 5px;
|
||||
flex-wrap: wrap;
|
||||
gap: 3px 17px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.change-list .toplinks a {
|
||||
font-size: 0.8125rem;
|
||||
}
|
||||
|
||||
.change-list .toplinks .date-back {
|
||||
color: var(--body-quiet-color);
|
||||
}
|
||||
|
||||
.change-list .toplinks .date-back:focus,
|
||||
.change-list .toplinks .date-back:hover {
|
||||
color: var(--link-hover-color);
|
||||
}
|
||||
|
||||
/* ACTIONS */
|
||||
|
||||
.filtered .actions {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
#changelist table input {
|
||||
margin: 0;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
/* Once the :has() pseudo-class is supported by all browsers, the tr.selected
|
||||
selector and the JS adding the class can be removed. */
|
||||
#changelist tbody tr.selected {
|
||||
background-color: var(--selected-row);
|
||||
}
|
||||
|
||||
#changelist tbody tr:has(.action-select:checked) {
|
||||
background-color: var(--selected-row);
|
||||
}
|
||||
|
||||
#changelist .actions {
|
||||
padding: 10px;
|
||||
background: var(--body-bg);
|
||||
border-top: none;
|
||||
border-bottom: none;
|
||||
line-height: 1.5rem;
|
||||
color: var(--body-quiet-color);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#changelist .actions span.all,
|
||||
#changelist .actions span.action-counter,
|
||||
#changelist .actions span.clear,
|
||||
#changelist .actions span.question {
|
||||
font-size: 0.8125rem;
|
||||
margin: 0 0.5em;
|
||||
}
|
||||
|
||||
#changelist .actions:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
#changelist .actions select {
|
||||
vertical-align: top;
|
||||
height: 1.5rem;
|
||||
color: var(--body-fg);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 4px;
|
||||
font-size: 0.875rem;
|
||||
padding: 0 0 0 4px;
|
||||
margin: 0;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
#changelist .actions select:focus {
|
||||
border-color: var(--body-quiet-color);
|
||||
}
|
||||
|
||||
#changelist .actions label {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
font-size: 0.8125rem;
|
||||
}
|
||||
|
||||
#changelist .actions .button {
|
||||
font-size: 0.8125rem;
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 4px;
|
||||
background: var(--body-bg);
|
||||
box-shadow: 0 -15px 20px -10px rgba(0, 0, 0, 0.15) inset;
|
||||
cursor: pointer;
|
||||
height: 1.5rem;
|
||||
line-height: 1;
|
||||
padding: 4px 8px;
|
||||
margin: 0;
|
||||
color: var(--body-fg);
|
||||
}
|
||||
|
||||
#changelist .actions .button:focus, #changelist .actions .button:hover {
|
||||
border-color: var(--body-quiet-color);
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--primary: #264b5d;
|
||||
--primary-fg: #f7f7f7;
|
||||
|
||||
--body-fg: #eeeeee;
|
||||
--body-bg: #121212;
|
||||
--body-quiet-color: #e0e0e0;
|
||||
--body-loud-color: #ffffff;
|
||||
|
||||
--breadcrumbs-link-fg: #e0e0e0;
|
||||
--breadcrumbs-bg: var(--primary);
|
||||
|
||||
--link-fg: #81d4fa;
|
||||
--link-hover-color: #4ac1f7;
|
||||
--link-selected-fg: #6f94c6;
|
||||
|
||||
--hairline-color: #272727;
|
||||
--border-color: #353535;
|
||||
|
||||
--error-fg: #e35f5f;
|
||||
--message-success-bg: #006b1b;
|
||||
--message-warning-bg: #583305;
|
||||
--message-error-bg: #570808;
|
||||
|
||||
--darkened-bg: #212121;
|
||||
--selected-bg: #1b1b1b;
|
||||
--selected-row: #00363a;
|
||||
|
||||
--close-button-bg: #333333;
|
||||
--close-button-hover-bg: #666666;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
html[data-theme="dark"] {
|
||||
--primary: #264b5d;
|
||||
--primary-fg: #f7f7f7;
|
||||
|
||||
--body-fg: #eeeeee;
|
||||
--body-bg: #121212;
|
||||
--body-quiet-color: #e0e0e0;
|
||||
--body-loud-color: #ffffff;
|
||||
|
||||
--breadcrumbs-link-fg: #e0e0e0;
|
||||
--breadcrumbs-bg: var(--primary);
|
||||
|
||||
--link-fg: #81d4fa;
|
||||
--link-hover-color: #4ac1f7;
|
||||
--link-selected-fg: #6f94c6;
|
||||
|
||||
--hairline-color: #272727;
|
||||
--border-color: #353535;
|
||||
|
||||
--error-fg: #e35f5f;
|
||||
--message-success-bg: #006b1b;
|
||||
--message-warning-bg: #583305;
|
||||
--message-error-bg: #570808;
|
||||
|
||||
--darkened-bg: #212121;
|
||||
--selected-bg: #1b1b1b;
|
||||
--selected-row: #00363a;
|
||||
|
||||
--close-button-bg: #333333;
|
||||
--close-button-hover-bg: #666666;
|
||||
}
|
||||
|
||||
/* THEME SWITCH */
|
||||
.theme-toggle {
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
vertical-align: middle;
|
||||
margin-inline-start: 5px;
|
||||
margin-top: -1px;
|
||||
}
|
||||
|
||||
.theme-toggle svg {
|
||||
vertical-align: middle;
|
||||
height: 1rem;
|
||||
width: 1rem;
|
||||
display: none;
|
||||
}
|
||||
|
||||
/*
|
||||
Fully hide screen reader text so we only show the one matching the current
|
||||
theme.
|
||||
*/
|
||||
.theme-toggle .visually-hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
html[data-theme="auto"] .theme-toggle .theme-label-when-auto {
|
||||
display: block;
|
||||
}
|
||||
|
||||
html[data-theme="dark"] .theme-toggle .theme-label-when-dark {
|
||||
display: block;
|
||||
}
|
||||
|
||||
html[data-theme="light"] .theme-toggle .theme-label-when-light {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* ICONS */
|
||||
.theme-toggle svg.theme-icon-when-auto,
|
||||
.theme-toggle svg.theme-icon-when-dark,
|
||||
.theme-toggle svg.theme-icon-when-light {
|
||||
fill: var(--header-link-color);
|
||||
color: var(--header-bg);
|
||||
}
|
||||
|
||||
html[data-theme="auto"] .theme-toggle svg.theme-icon-when-auto {
|
||||
display: block;
|
||||
}
|
||||
|
||||
html[data-theme="dark"] .theme-toggle svg.theme-icon-when-dark {
|
||||
display: block;
|
||||
}
|
||||
|
||||
html[data-theme="light"] .theme-toggle svg.theme-icon-when-light {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.visually-hidden {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
clip: rect(0,0,0,0);
|
||||
white-space: nowrap;
|
||||
border: 0;
|
||||
color: var(--body-fg);
|
||||
background-color: var(--body-bg);
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
/* DASHBOARD */
|
||||
.dashboard td, .dashboard th {
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.dashboard .module table th {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.dashboard .module table td {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.dashboard .module table td a {
|
||||
display: block;
|
||||
padding-right: .6em;
|
||||
}
|
||||
|
||||
/* RECENT ACTIONS MODULE */
|
||||
|
||||
.module ul.actionlist {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
ul.actionlist li {
|
||||
list-style-type: none;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
@@ -0,0 +1,530 @@
|
||||
@import url('widgets.css');
|
||||
|
||||
/* FORM ROWS */
|
||||
|
||||
.form-row {
|
||||
overflow: hidden;
|
||||
padding: 10px;
|
||||
font-size: 0.8125rem;
|
||||
border-bottom: 1px solid var(--hairline-color);
|
||||
}
|
||||
|
||||
.form-row img, .form-row input {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.form-row label input[type="checkbox"] {
|
||||
margin-top: 0;
|
||||
vertical-align: 0;
|
||||
}
|
||||
|
||||
form .form-row p {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.flex-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.form-multiline > div {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
/* FORM LABELS */
|
||||
|
||||
label {
|
||||
font-weight: normal;
|
||||
color: var(--body-quiet-color);
|
||||
font-size: 0.8125rem;
|
||||
}
|
||||
|
||||
.required label, label.required {
|
||||
font-weight: bold;
|
||||
color: var(--body-fg);
|
||||
}
|
||||
|
||||
/* RADIO BUTTONS */
|
||||
|
||||
form div.radiolist div {
|
||||
padding-right: 7px;
|
||||
}
|
||||
|
||||
form div.radiolist.inline div {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
form div.radiolist label {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
form div.radiolist input[type="radio"] {
|
||||
margin: -2px 4px 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
form ul.inline {
|
||||
margin-left: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
form ul.inline li {
|
||||
float: left;
|
||||
padding-right: 7px;
|
||||
}
|
||||
|
||||
/* ALIGNED FIELDSETS */
|
||||
|
||||
.aligned label {
|
||||
display: block;
|
||||
padding: 4px 10px 0 0;
|
||||
width: 160px;
|
||||
word-wrap: break-word;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.aligned label:not(.vCheckboxLabel):after {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
height: 1.625rem;
|
||||
}
|
||||
|
||||
.aligned label + p, .aligned .checkbox-row + div.help, .aligned label + div.readonly {
|
||||
padding: 6px 0;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
margin-left: 0;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
.aligned ul label {
|
||||
display: inline;
|
||||
float: none;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.aligned .form-row input {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.colMS .aligned .vLargeTextField, .colMS .aligned .vXMLLargeTextField {
|
||||
width: 350px;
|
||||
}
|
||||
|
||||
form .aligned ul {
|
||||
margin-left: 160px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
form .aligned div.radiolist {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
form .aligned p.help,
|
||||
form .aligned div.help {
|
||||
margin-top: 0;
|
||||
margin-left: 160px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
form .aligned p.date div.help.timezonewarning,
|
||||
form .aligned p.datetime div.help.timezonewarning,
|
||||
form .aligned p.time div.help.timezonewarning {
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
form .aligned p.help:last-child,
|
||||
form .aligned div.help:last-child {
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
form .aligned input + p.help,
|
||||
form .aligned textarea + p.help,
|
||||
form .aligned select + p.help,
|
||||
form .aligned input + div.help,
|
||||
form .aligned textarea + div.help,
|
||||
form .aligned select + div.help {
|
||||
margin-left: 160px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
form .aligned ul li {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
form .aligned table p {
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.aligned .vCheckboxLabel {
|
||||
float: none;
|
||||
width: auto;
|
||||
display: inline-block;
|
||||
vertical-align: -3px;
|
||||
padding: 0 0 5px 5px;
|
||||
}
|
||||
|
||||
.aligned .vCheckboxLabel + p.help,
|
||||
.aligned .vCheckboxLabel + div.help {
|
||||
margin-top: -4px;
|
||||
}
|
||||
|
||||
.colM .aligned .vLargeTextField, .colM .aligned .vXMLLargeTextField {
|
||||
width: 610px;
|
||||
}
|
||||
|
||||
fieldset .fieldBox {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
/* WIDE FIELDSETS */
|
||||
|
||||
.wide label {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
form .wide p,
|
||||
form .wide ul.errorlist,
|
||||
form .wide input + p.help,
|
||||
form .wide input + div.help {
|
||||
margin-left: 200px;
|
||||
}
|
||||
|
||||
form .wide p.help,
|
||||
form .wide div.help {
|
||||
padding-left: 50px;
|
||||
}
|
||||
|
||||
form div.help ul {
|
||||
padding-left: 0;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.colM fieldset.wide .vLargeTextField, .colM fieldset.wide .vXMLLargeTextField {
|
||||
width: 450px;
|
||||
}
|
||||
|
||||
/* COLLAPSED FIELDSETS */
|
||||
|
||||
fieldset.collapsed * {
|
||||
display: none;
|
||||
}
|
||||
|
||||
fieldset.collapsed h2, fieldset.collapsed {
|
||||
display: block;
|
||||
}
|
||||
|
||||
fieldset.collapsed {
|
||||
border: 1px solid var(--hairline-color);
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
fieldset.collapsed h2 {
|
||||
background: var(--darkened-bg);
|
||||
color: var(--body-quiet-color);
|
||||
}
|
||||
|
||||
fieldset .collapse-toggle {
|
||||
color: var(--header-link-color);
|
||||
}
|
||||
|
||||
fieldset.collapsed .collapse-toggle {
|
||||
background: transparent;
|
||||
display: inline;
|
||||
color: var(--link-fg);
|
||||
}
|
||||
|
||||
/* MONOSPACE TEXTAREAS */
|
||||
|
||||
fieldset.monospace textarea {
|
||||
font-family: var(--font-family-monospace);
|
||||
}
|
||||
|
||||
/* SUBMIT ROW */
|
||||
|
||||
.submit-row {
|
||||
padding: 12px 14px 12px;
|
||||
margin: 0 0 20px;
|
||||
background: var(--darkened-bg);
|
||||
border: 1px solid var(--hairline-color);
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
body.popup .submit-row {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.submit-row input {
|
||||
height: 2.1875rem;
|
||||
line-height: 0.9375rem;
|
||||
}
|
||||
|
||||
.submit-row input, .submit-row a {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.submit-row input.default {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.submit-row a.deletelink {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.submit-row a.deletelink {
|
||||
display: block;
|
||||
background: var(--delete-button-bg);
|
||||
border-radius: 4px;
|
||||
padding: 0.625rem 0.9375rem;
|
||||
height: 0.9375rem;
|
||||
line-height: 0.9375rem;
|
||||
color: var(--button-fg);
|
||||
}
|
||||
|
||||
.submit-row a.closelink {
|
||||
display: inline-block;
|
||||
background: var(--close-button-bg);
|
||||
border-radius: 4px;
|
||||
padding: 10px 15px;
|
||||
height: 0.9375rem;
|
||||
line-height: 0.9375rem;
|
||||
color: var(--button-fg);
|
||||
}
|
||||
|
||||
.submit-row a.deletelink:focus,
|
||||
.submit-row a.deletelink:hover,
|
||||
.submit-row a.deletelink:active {
|
||||
background: var(--delete-button-hover-bg);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.submit-row a.closelink:focus,
|
||||
.submit-row a.closelink:hover,
|
||||
.submit-row a.closelink:active {
|
||||
background: var(--close-button-hover-bg);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* CUSTOM FORM FIELDS */
|
||||
|
||||
.vSelectMultipleField {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.vCheckboxField {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.vDateField, .vTimeField {
|
||||
margin-right: 2px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.vDateField {
|
||||
min-width: 6.85em;
|
||||
}
|
||||
|
||||
.vTimeField {
|
||||
min-width: 4.7em;
|
||||
}
|
||||
|
||||
.vURLField {
|
||||
width: 30em;
|
||||
}
|
||||
|
||||
.vLargeTextField, .vXMLLargeTextField {
|
||||
width: 48em;
|
||||
}
|
||||
|
||||
.flatpages-flatpage #id_content {
|
||||
height: 40.2em;
|
||||
}
|
||||
|
||||
.module table .vPositiveSmallIntegerField {
|
||||
width: 2.2em;
|
||||
}
|
||||
|
||||
.vIntegerField {
|
||||
width: 5em;
|
||||
}
|
||||
|
||||
.vBigIntegerField {
|
||||
width: 10em;
|
||||
}
|
||||
|
||||
.vForeignKeyRawIdAdminField {
|
||||
width: 5em;
|
||||
}
|
||||
|
||||
.vTextField, .vUUIDField {
|
||||
width: 20em;
|
||||
}
|
||||
|
||||
/* INLINES */
|
||||
|
||||
.inline-group {
|
||||
padding: 0;
|
||||
margin: 0 0 30px;
|
||||
}
|
||||
|
||||
.inline-group thead th {
|
||||
padding: 8px 10px;
|
||||
}
|
||||
|
||||
.inline-group .aligned label {
|
||||
width: 160px;
|
||||
}
|
||||
|
||||
.inline-related {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.inline-related h3 {
|
||||
margin: 0;
|
||||
color: var(--body-quiet-color);
|
||||
padding: 5px;
|
||||
font-size: 0.8125rem;
|
||||
background: var(--darkened-bg);
|
||||
border-top: 1px solid var(--hairline-color);
|
||||
border-bottom: 1px solid var(--hairline-color);
|
||||
}
|
||||
|
||||
.inline-related h3 span.delete {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.inline-related h3 span.delete label {
|
||||
margin-left: 2px;
|
||||
font-size: 0.6875rem;
|
||||
}
|
||||
|
||||
.inline-related fieldset {
|
||||
margin: 0;
|
||||
background: var(--body-bg);
|
||||
border: none;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.inline-related fieldset.module h3 {
|
||||
margin: 0;
|
||||
padding: 2px 5px 3px 5px;
|
||||
font-size: 0.6875rem;
|
||||
text-align: left;
|
||||
font-weight: bold;
|
||||
background: #bcd;
|
||||
color: var(--body-bg);
|
||||
}
|
||||
|
||||
.inline-group .tabular fieldset.module {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.inline-related.tabular fieldset.module table {
|
||||
width: 100%;
|
||||
overflow-x: scroll;
|
||||
}
|
||||
|
||||
.last-related fieldset {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.inline-group .tabular tr.has_original td {
|
||||
padding-top: 2em;
|
||||
}
|
||||
|
||||
.inline-group .tabular tr td.original {
|
||||
padding: 2px 0 0 0;
|
||||
width: 0;
|
||||
_position: relative;
|
||||
}
|
||||
|
||||
.inline-group .tabular th.original {
|
||||
width: 0px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.inline-group .tabular td.original p {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
height: 1.1em;
|
||||
padding: 2px 9px;
|
||||
overflow: hidden;
|
||||
font-size: 0.5625rem;
|
||||
font-weight: bold;
|
||||
color: var(--body-quiet-color);
|
||||
_width: 700px;
|
||||
}
|
||||
|
||||
.inline-group ul.tools {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.inline-group ul.tools li {
|
||||
display: inline;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
.inline-group div.add-row,
|
||||
.inline-group .tabular tr.add-row td {
|
||||
color: var(--body-quiet-color);
|
||||
background: var(--darkened-bg);
|
||||
padding: 8px 10px;
|
||||
border-bottom: 1px solid var(--hairline-color);
|
||||
}
|
||||
|
||||
.inline-group .tabular tr.add-row td {
|
||||
padding: 8px 10px;
|
||||
border-bottom: 1px solid var(--hairline-color);
|
||||
}
|
||||
|
||||
.inline-group ul.tools a.add,
|
||||
.inline-group div.add-row a,
|
||||
.inline-group .tabular tr.add-row td a {
|
||||
background: url(../img/icon-addlink.svg) 0 1px no-repeat;
|
||||
padding-left: 16px;
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
.empty-form {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* RELATED FIELD ADD ONE / LOOKUP */
|
||||
|
||||
.related-lookup {
|
||||
margin-left: 5px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 14px;
|
||||
}
|
||||
|
||||
.related-lookup {
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
background-image: url(../img/search.svg);
|
||||
}
|
||||
|
||||
form .related-widget-wrapper ul {
|
||||
display: inline-block;
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.clearable-file-input input {
|
||||
margin-top: 0;
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
/* LOGIN FORM */
|
||||
|
||||
.login {
|
||||
background: var(--darkened-bg);
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.login #header {
|
||||
height: auto;
|
||||
padding: 15px 16px;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.login #header h1 {
|
||||
font-size: 1.125rem;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.login #header h1 a {
|
||||
color: var(--header-link-color);
|
||||
}
|
||||
|
||||
.login #content {
|
||||
padding: 20px 20px 0;
|
||||
}
|
||||
|
||||
.login #container {
|
||||
background: var(--body-bg);
|
||||
border: 1px solid var(--hairline-color);
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
width: 28em;
|
||||
min-width: 300px;
|
||||
margin: 100px auto;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.login .form-row {
|
||||
padding: 4px 0;
|
||||
}
|
||||
|
||||
.login .form-row label {
|
||||
display: block;
|
||||
line-height: 2em;
|
||||
}
|
||||
|
||||
.login .form-row #id_username, .login .form-row #id_password {
|
||||
padding: 8px;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.login .submit-row {
|
||||
padding: 1em 0 0 0;
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.login .password-reset-link {
|
||||
text-align: center;
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
.sticky {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
max-height: 100vh;
|
||||
}
|
||||
|
||||
.toggle-nav-sidebar {
|
||||
z-index: 20;
|
||||
left: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex: 0 0 23px;
|
||||
width: 23px;
|
||||
border: 0;
|
||||
border-right: 1px solid var(--hairline-color);
|
||||
background-color: var(--body-bg);
|
||||
cursor: pointer;
|
||||
font-size: 1.25rem;
|
||||
color: var(--link-fg);
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
[dir="rtl"] .toggle-nav-sidebar {
|
||||
border-left: 1px solid var(--hairline-color);
|
||||
border-right: 0;
|
||||
}
|
||||
|
||||
.toggle-nav-sidebar:hover,
|
||||
.toggle-nav-sidebar:focus {
|
||||
background-color: var(--darkened-bg);
|
||||
}
|
||||
|
||||
#nav-sidebar {
|
||||
z-index: 15;
|
||||
flex: 0 0 275px;
|
||||
left: -276px;
|
||||
margin-left: -276px;
|
||||
border-top: 1px solid transparent;
|
||||
border-right: 1px solid var(--hairline-color);
|
||||
background-color: var(--body-bg);
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
[dir="rtl"] #nav-sidebar {
|
||||
border-left: 1px solid var(--hairline-color);
|
||||
border-right: 0;
|
||||
left: 0;
|
||||
margin-left: 0;
|
||||
right: -276px;
|
||||
margin-right: -276px;
|
||||
}
|
||||
|
||||
.toggle-nav-sidebar::before {
|
||||
content: '\00BB';
|
||||
}
|
||||
|
||||
.main.shifted .toggle-nav-sidebar::before {
|
||||
content: '\00AB';
|
||||
}
|
||||
|
||||
.main > #nav-sidebar {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.main.shifted > #nav-sidebar {
|
||||
margin-left: 0;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
[dir="rtl"] .main.shifted > #nav-sidebar {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
#nav-sidebar .module th {
|
||||
width: 100%;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
#nav-sidebar .module th,
|
||||
#nav-sidebar .module caption {
|
||||
padding-left: 16px;
|
||||
}
|
||||
|
||||
#nav-sidebar .module td {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
[dir="rtl"] #nav-sidebar .module th,
|
||||
[dir="rtl"] #nav-sidebar .module caption {
|
||||
padding-left: 8px;
|
||||
padding-right: 16px;
|
||||
}
|
||||
|
||||
#nav-sidebar .current-app .section:link,
|
||||
#nav-sidebar .current-app .section:visited {
|
||||
color: var(--header-color);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#nav-sidebar .current-model {
|
||||
background: var(--selected-row);
|
||||
}
|
||||
|
||||
.main > #nav-sidebar + .content {
|
||||
max-width: calc(100% - 23px);
|
||||
}
|
||||
|
||||
.main.shifted > #nav-sidebar + .content {
|
||||
max-width: calc(100% - 299px);
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
#nav-sidebar, #toggle-nav-sidebar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.main > #nav-sidebar + .content,
|
||||
.main.shifted > #nav-sidebar + .content {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
#nav-filter {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 2px 5px;
|
||||
margin: 5px 0;
|
||||
border: 1px solid var(--border-color);
|
||||
background-color: var(--darkened-bg);
|
||||
color: var(--body-fg);
|
||||
}
|
||||
|
||||
#nav-filter:focus {
|
||||
border-color: var(--body-quiet-color);
|
||||
}
|
||||
|
||||
#nav-filter.no-results {
|
||||
background: var(--message-error-bg);
|
||||
}
|
||||
|
||||
#nav-sidebar table {
|
||||
width: 100%;
|
||||
}
|
||||
@@ -0,0 +1,998 @@
|
||||
/* Tablets */
|
||||
|
||||
input[type="submit"], button {
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
/* Basic */
|
||||
|
||||
html {
|
||||
-webkit-text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
td, th {
|
||||
padding: 10px;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.small {
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
/* Layout */
|
||||
|
||||
#container {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
#content {
|
||||
padding: 15px 20px 20px;
|
||||
}
|
||||
|
||||
div.breadcrumbs {
|
||||
padding: 10px 30px;
|
||||
}
|
||||
|
||||
/* Header */
|
||||
|
||||
#header {
|
||||
flex-direction: column;
|
||||
padding: 15px 30px;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
#branding h1 {
|
||||
margin: 0 0 8px;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
#user-tools {
|
||||
margin: 0;
|
||||
font-weight: 400;
|
||||
line-height: 1.85;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#user-tools a {
|
||||
display: inline-block;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
/* Dashboard */
|
||||
|
||||
.dashboard #content {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
#content-related {
|
||||
margin-right: -290px;
|
||||
}
|
||||
|
||||
.colSM #content-related {
|
||||
margin-left: -290px;
|
||||
}
|
||||
|
||||
.colMS {
|
||||
margin-right: 290px;
|
||||
}
|
||||
|
||||
.colSM {
|
||||
margin-left: 290px;
|
||||
}
|
||||
|
||||
.dashboard .module table td a {
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
td .changelink, td .addlink {
|
||||
font-size: 0.8125rem;
|
||||
}
|
||||
|
||||
/* Changelist */
|
||||
|
||||
#toolbar {
|
||||
border: none;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
#changelist-search > div {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
max-width: 480px;
|
||||
}
|
||||
|
||||
#changelist-search label {
|
||||
line-height: 1.375rem;
|
||||
}
|
||||
|
||||
#toolbar form #searchbar {
|
||||
flex: 1 0 auto;
|
||||
width: 0;
|
||||
height: 1.375rem;
|
||||
margin: 0 10px 0 6px;
|
||||
}
|
||||
|
||||
#toolbar form input[type=submit] {
|
||||
flex: 0 1 auto;
|
||||
}
|
||||
|
||||
#changelist-search .quiet {
|
||||
width: 0;
|
||||
flex: 1 0 auto;
|
||||
margin: 5px 0 0 25px;
|
||||
}
|
||||
|
||||
#changelist .actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 15px 0;
|
||||
}
|
||||
|
||||
#changelist .actions label {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
#changelist .actions select {
|
||||
background: var(--body-bg);
|
||||
}
|
||||
|
||||
#changelist .actions .button {
|
||||
min-width: 48px;
|
||||
margin: 0 10px;
|
||||
}
|
||||
|
||||
#changelist .actions span.all,
|
||||
#changelist .actions span.clear,
|
||||
#changelist .actions span.question,
|
||||
#changelist .actions span.action-counter {
|
||||
font-size: 0.6875rem;
|
||||
margin: 0 10px 0 0;
|
||||
}
|
||||
|
||||
#changelist-filter {
|
||||
flex-basis: 200px;
|
||||
}
|
||||
|
||||
.change-list .filtered .results,
|
||||
.change-list .filtered .paginator,
|
||||
.filtered #toolbar,
|
||||
.filtered .actions,
|
||||
|
||||
#changelist .paginator {
|
||||
border-top-color: var(--hairline-color); /* XXX Is this used at all? */
|
||||
}
|
||||
|
||||
#changelist .results + .paginator {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
/* Forms */
|
||||
|
||||
label {
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.form-row input[type=text],
|
||||
.form-row input[type=password],
|
||||
.form-row input[type=email],
|
||||
.form-row input[type=url],
|
||||
.form-row input[type=tel],
|
||||
.form-row input[type=number],
|
||||
.form-row textarea,
|
||||
.form-row select,
|
||||
.form-row .vTextField {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 6px 8px;
|
||||
min-height: 2.25rem;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.form-row select {
|
||||
height: 2.25rem;
|
||||
}
|
||||
|
||||
.form-row select[multiple] {
|
||||
height: auto;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
fieldset .fieldBox + .fieldBox {
|
||||
margin-top: 10px;
|
||||
padding-top: 10px;
|
||||
border-top: 1px solid var(--hairline-color);
|
||||
}
|
||||
|
||||
textarea {
|
||||
max-width: 100%;
|
||||
max-height: 120px;
|
||||
}
|
||||
|
||||
.aligned label {
|
||||
padding-top: 6px;
|
||||
}
|
||||
|
||||
.aligned .related-lookup,
|
||||
.aligned .datetimeshortcuts,
|
||||
.aligned .related-lookup + strong {
|
||||
align-self: center;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
form .aligned div.radiolist {
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
.submit-row {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.submit-row a.deletelink {
|
||||
padding: 10px 7px;
|
||||
}
|
||||
|
||||
.button, input[type=submit], input[type=button], .submit-row input, a.button {
|
||||
padding: 7px;
|
||||
}
|
||||
|
||||
/* Related widget */
|
||||
|
||||
.related-widget-wrapper {
|
||||
float: none;
|
||||
}
|
||||
|
||||
.related-widget-wrapper-link + .selector {
|
||||
max-width: calc(100% - 30px);
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
select + .related-widget-wrapper-link,
|
||||
.related-widget-wrapper-link + .related-widget-wrapper-link {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
/* Selector */
|
||||
|
||||
.selector {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.selector .selector-filter {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.selector .selector-filter label {
|
||||
margin: 0 8px 0 0;
|
||||
}
|
||||
|
||||
.selector .selector-filter input {
|
||||
width: auto;
|
||||
min-height: 0;
|
||||
flex: 1 1;
|
||||
}
|
||||
|
||||
.selector-available, .selector-chosen {
|
||||
width: auto;
|
||||
flex: 1 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.selector select {
|
||||
width: 100%;
|
||||
flex: 1 0 auto;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.selector ul.selector-chooser {
|
||||
width: 26px;
|
||||
height: 52px;
|
||||
padding: 2px 0;
|
||||
margin: auto 15px;
|
||||
border-radius: 20px;
|
||||
transform: translateY(-10px);
|
||||
}
|
||||
|
||||
.selector-add, .selector-remove {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background-size: 20px auto;
|
||||
}
|
||||
|
||||
.selector-add {
|
||||
background-position: 0 -120px;
|
||||
}
|
||||
|
||||
.selector-remove {
|
||||
background-position: 0 -80px;
|
||||
}
|
||||
|
||||
a.selector-chooseall, a.selector-clearall {
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.stacked {
|
||||
flex-direction: column;
|
||||
max-width: 480px;
|
||||
}
|
||||
|
||||
.stacked > * {
|
||||
flex: 0 1 auto;
|
||||
}
|
||||
|
||||
.stacked select {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.stacked .selector-available, .stacked .selector-chosen {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.stacked ul.selector-chooser {
|
||||
width: 52px;
|
||||
height: 26px;
|
||||
padding: 0 2px;
|
||||
margin: 15px auto;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.stacked .selector-chooser li {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.stacked .selector-add, .stacked .selector-remove {
|
||||
background-size: 20px auto;
|
||||
}
|
||||
|
||||
.stacked .selector-add {
|
||||
background-position: 0 -40px;
|
||||
}
|
||||
|
||||
.stacked .active.selector-add {
|
||||
background-position: 0 -40px;
|
||||
}
|
||||
|
||||
.active.selector-add:focus, .active.selector-add:hover {
|
||||
background-position: 0 -140px;
|
||||
}
|
||||
|
||||
.stacked .active.selector-add:focus, .stacked .active.selector-add:hover {
|
||||
background-position: 0 -60px;
|
||||
}
|
||||
|
||||
.stacked .selector-remove {
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
.stacked .active.selector-remove {
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
.active.selector-remove:focus, .active.selector-remove:hover {
|
||||
background-position: 0 -100px;
|
||||
}
|
||||
|
||||
.stacked .active.selector-remove:focus, .stacked .active.selector-remove:hover {
|
||||
background-position: 0 -20px;
|
||||
}
|
||||
|
||||
.help-tooltip, .selector .help-icon {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.datetime input {
|
||||
width: 50%;
|
||||
max-width: 120px;
|
||||
}
|
||||
|
||||
.datetime span {
|
||||
font-size: 0.8125rem;
|
||||
}
|
||||
|
||||
.datetime .timezonewarning {
|
||||
display: block;
|
||||
font-size: 0.6875rem;
|
||||
color: var(--body-quiet-color);
|
||||
}
|
||||
|
||||
.datetimeshortcuts {
|
||||
color: var(--border-color); /* XXX Redundant, .datetime span also sets #ccc */
|
||||
}
|
||||
|
||||
.form-row .datetime input.vDateField, .form-row .datetime input.vTimeField {
|
||||
width: 75%;
|
||||
}
|
||||
|
||||
.inline-group {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/* Messages */
|
||||
|
||||
ul.messagelist li {
|
||||
padding-left: 55px;
|
||||
background-position: 30px 12px;
|
||||
}
|
||||
|
||||
ul.messagelist li.error {
|
||||
background-position: 30px 12px;
|
||||
}
|
||||
|
||||
ul.messagelist li.warning {
|
||||
background-position: 30px 14px;
|
||||
}
|
||||
|
||||
/* Login */
|
||||
|
||||
.login #header {
|
||||
padding: 15px 20px;
|
||||
}
|
||||
|
||||
.login #branding h1 {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* GIS */
|
||||
|
||||
div.olMap {
|
||||
max-width: calc(100vw - 30px);
|
||||
max-height: 300px;
|
||||
}
|
||||
|
||||
.olMap + .clear_features {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
/* Docs */
|
||||
|
||||
.module table.xfull {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
pre.literal-block {
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
|
||||
/* Mobile */
|
||||
|
||||
@media (max-width: 767px) {
|
||||
/* Layout */
|
||||
|
||||
#header, #content, #footer {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
#footer:empty {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
div.breadcrumbs {
|
||||
padding: 10px 15px;
|
||||
}
|
||||
|
||||
/* Dashboard */
|
||||
|
||||
.colMS, .colSM {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#content-related, .colSM #content-related {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#content-related .module {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
#content-related .module h2 {
|
||||
padding: 10px 15px;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
/* Changelist */
|
||||
|
||||
#changelist {
|
||||
align-items: stretch;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
#toolbar {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
#changelist-filter {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
#changelist .actions label {
|
||||
flex: 1 1;
|
||||
}
|
||||
|
||||
#changelist .actions select {
|
||||
flex: 1 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#changelist .actions span {
|
||||
flex: 1 0 100%;
|
||||
}
|
||||
|
||||
#changelist-filter {
|
||||
position: static;
|
||||
width: auto;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.object-tools {
|
||||
float: none;
|
||||
margin: 0 0 15px;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.object-tools li {
|
||||
height: auto;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.object-tools li + li {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
/* Forms */
|
||||
|
||||
.form-row {
|
||||
padding: 15px 0;
|
||||
}
|
||||
|
||||
.aligned .form-row,
|
||||
.aligned .form-row > div {
|
||||
max-width: 100vw;
|
||||
}
|
||||
|
||||
.aligned .form-row > div {
|
||||
width: calc(100vw - 30px);
|
||||
}
|
||||
|
||||
.flex-container {
|
||||
flex-flow: column;
|
||||
}
|
||||
|
||||
textarea {
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
.vURLField {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
fieldset .fieldBox + .fieldBox {
|
||||
margin-top: 15px;
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
fieldset.collapsed .form-row {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.aligned label {
|
||||
width: 100%;
|
||||
padding: 0 0 10px;
|
||||
}
|
||||
|
||||
.aligned label:after {
|
||||
max-height: 0;
|
||||
}
|
||||
|
||||
.aligned .form-row input,
|
||||
.aligned .form-row select,
|
||||
.aligned .form-row textarea {
|
||||
flex: 1 1 auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.aligned .checkbox-row {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.aligned .checkbox-row input {
|
||||
flex: 0 1 auto;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.aligned .vCheckboxLabel {
|
||||
flex: 1 0;
|
||||
padding: 1px 0 0 5px;
|
||||
}
|
||||
|
||||
.aligned label + p,
|
||||
.aligned label + div.help,
|
||||
.aligned label + div.readonly {
|
||||
padding: 0;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.aligned p.file-upload {
|
||||
font-size: 0.8125rem;
|
||||
}
|
||||
|
||||
span.clearable-file-input {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
span.clearable-file-input label {
|
||||
font-size: 0.8125rem;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.aligned .timezonewarning {
|
||||
flex: 1 0 100%;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
form .aligned .form-row div.help {
|
||||
width: 100%;
|
||||
margin: 5px 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
form .aligned ul,
|
||||
form .aligned ul.errorlist {
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
form .aligned div.radiolist {
|
||||
margin-top: 5px;
|
||||
margin-right: 15px;
|
||||
margin-bottom: -3px;
|
||||
}
|
||||
|
||||
form .aligned div.radiolist:not(.inline) div + div {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
/* Related widget */
|
||||
|
||||
.related-widget-wrapper {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.related-widget-wrapper .selector {
|
||||
order: 1;
|
||||
}
|
||||
|
||||
.related-widget-wrapper > a {
|
||||
order: 2;
|
||||
}
|
||||
|
||||
.related-widget-wrapper .radiolist ~ a {
|
||||
align-self: flex-end;
|
||||
}
|
||||
|
||||
.related-widget-wrapper > select ~ a {
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
select + .related-widget-wrapper-link,
|
||||
.related-widget-wrapper-link + .related-widget-wrapper-link {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
/* Selector */
|
||||
|
||||
.selector {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.selector > * {
|
||||
float: none;
|
||||
}
|
||||
|
||||
.selector-available, .selector-chosen {
|
||||
margin-bottom: 0;
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
.selector select {
|
||||
max-height: 96px;
|
||||
}
|
||||
|
||||
.selector ul.selector-chooser {
|
||||
display: block;
|
||||
float: none;
|
||||
width: 52px;
|
||||
height: 26px;
|
||||
padding: 0 2px;
|
||||
margin: 15px auto 20px;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.selector ul.selector-chooser li {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.selector-remove {
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
.active.selector-remove:focus, .active.selector-remove:hover {
|
||||
background-position: 0 -20px;
|
||||
}
|
||||
|
||||
.selector-add {
|
||||
background-position: 0 -40px;
|
||||
}
|
||||
|
||||
.active.selector-add:focus, .active.selector-add:hover {
|
||||
background-position: 0 -60px;
|
||||
}
|
||||
|
||||
/* Inlines */
|
||||
|
||||
.inline-group[data-inline-type="stacked"] .inline-related {
|
||||
border: 1px solid var(--hairline-color);
|
||||
border-radius: 4px;
|
||||
margin-top: 15px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.inline-group[data-inline-type="stacked"] .inline-related > * {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.inline-group[data-inline-type="stacked"] .inline-related .module {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.inline-group[data-inline-type="stacked"] .inline-related .module .form-row {
|
||||
border-top: 1px solid var(--hairline-color);
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.inline-group[data-inline-type="stacked"] .inline-related .module .form-row:first-child {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.inline-group[data-inline-type="stacked"] .inline-related h3 {
|
||||
padding: 10px;
|
||||
border-top-width: 0;
|
||||
border-bottom-width: 2px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.inline-group[data-inline-type="stacked"] .inline-related h3 .inline_label {
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.inline-group[data-inline-type="stacked"] .inline-related h3 span.delete {
|
||||
float: none;
|
||||
flex: 1 1 100%;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.inline-group[data-inline-type="stacked"] .aligned .form-row > div:not([class]) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.inline-group[data-inline-type="stacked"] .aligned label {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.inline-group[data-inline-type="stacked"] div.add-row {
|
||||
margin-top: 15px;
|
||||
border: 1px solid var(--hairline-color);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.inline-group div.add-row,
|
||||
.inline-group .tabular tr.add-row td {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.inline-group div.add-row a,
|
||||
.inline-group .tabular tr.add-row td a {
|
||||
display: block;
|
||||
padding: 8px 10px 8px 26px;
|
||||
background-position: 8px 9px;
|
||||
}
|
||||
|
||||
/* Submit row */
|
||||
|
||||
.submit-row {
|
||||
padding: 10px;
|
||||
margin: 0 0 15px;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.submit-row input, .submit-row input.default, .submit-row a {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.submit-row a.closelink {
|
||||
padding: 10px 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.submit-row a.deletelink {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Messages */
|
||||
|
||||
ul.messagelist li {
|
||||
padding-left: 40px;
|
||||
background-position: 15px 12px;
|
||||
}
|
||||
|
||||
ul.messagelist li.error {
|
||||
background-position: 15px 12px;
|
||||
}
|
||||
|
||||
ul.messagelist li.warning {
|
||||
background-position: 15px 14px;
|
||||
}
|
||||
|
||||
/* Paginator */
|
||||
|
||||
.paginator .this-page, .paginator a:link, .paginator a:visited {
|
||||
padding: 4px 10px;
|
||||
}
|
||||
|
||||
/* Login */
|
||||
|
||||
body.login {
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
.login #container {
|
||||
width: auto;
|
||||
max-width: 480px;
|
||||
margin: 50px auto;
|
||||
}
|
||||
|
||||
.login #header,
|
||||
.login #content {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.login #content-main {
|
||||
float: none;
|
||||
}
|
||||
|
||||
.login .form-row {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.login .form-row + .form-row {
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
.login .form-row label {
|
||||
margin: 0 0 5px;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.login .submit-row {
|
||||
padding: 15px 0 0;
|
||||
}
|
||||
|
||||
.login br {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.login .submit-row input {
|
||||
margin: 0;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.errornote {
|
||||
margin: 0 0 20px;
|
||||
padding: 8px 12px;
|
||||
font-size: 0.8125rem;
|
||||
}
|
||||
|
||||
/* Calendar and clock */
|
||||
|
||||
.calendarbox, .clockbox {
|
||||
position: fixed !important;
|
||||
top: 50% !important;
|
||||
left: 50% !important;
|
||||
transform: translate(-50%, -50%);
|
||||
margin: 0;
|
||||
border: none;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.calendarbox:before, .clockbox:before {
|
||||
content: '';
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background: rgba(0, 0, 0, 0.75);
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.calendarbox > *, .clockbox > * {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.calendarbox > div:first-child {
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.calendarbox .calendar, .clockbox h2 {
|
||||
border-radius: 4px 4px 0 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.calendarbox .calendar-cancel, .clockbox .calendar-cancel {
|
||||
border-radius: 0 0 4px 4px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.calendar-shortcuts {
|
||||
padding: 10px 0;
|
||||
font-size: 0.75rem;
|
||||
line-height: 0.75rem;
|
||||
}
|
||||
|
||||
.calendar-shortcuts a {
|
||||
margin: 0 4px;
|
||||
}
|
||||
|
||||
.timelist a {
|
||||
background: var(--body-bg);
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.calendar-cancel {
|
||||
padding: 8px 10px;
|
||||
}
|
||||
|
||||
.clockbox h2 {
|
||||
padding: 8px 15px;
|
||||
}
|
||||
|
||||
.calendar caption {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.calendarbox .calendarnav-previous, .calendarbox .calendarnav-next {
|
||||
z-index: 1;
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
/* History */
|
||||
|
||||
table#change-history tbody th, table#change-history tbody td {
|
||||
font-size: 0.8125rem;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
table#change-history tbody th {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
/* Docs */
|
||||
|
||||
table.model tbody th, table.model tbody td {
|
||||
font-size: 0.8125rem;
|
||||
word-break: break-word;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
/* TABLETS */
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
[dir="rtl"] .colMS {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
[dir="rtl"] #user-tools {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
[dir="rtl"] #changelist .actions label {
|
||||
padding-left: 10px;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
[dir="rtl"] #changelist .actions select {
|
||||
margin-left: 0;
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
[dir="rtl"] .change-list .filtered .results,
|
||||
[dir="rtl"] .change-list .filtered .paginator,
|
||||
[dir="rtl"] .filtered #toolbar,
|
||||
[dir="rtl"] .filtered div.xfull,
|
||||
[dir="rtl"] .filtered .actions,
|
||||
[dir="rtl"] #changelist-filter {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
[dir="rtl"] .inline-group ul.tools a.add,
|
||||
[dir="rtl"] .inline-group div.add-row a,
|
||||
[dir="rtl"] .inline-group .tabular tr.add-row td a {
|
||||
padding: 8px 26px 8px 10px;
|
||||
background-position: calc(100% - 8px) 9px;
|
||||
}
|
||||
|
||||
[dir="rtl"] .related-widget-wrapper-link + .selector {
|
||||
margin-right: 0;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
[dir="rtl"] .selector .selector-filter label {
|
||||
margin-right: 0;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
[dir="rtl"] .object-tools li {
|
||||
float: right;
|
||||
}
|
||||
|
||||
[dir="rtl"] .object-tools li + li {
|
||||
margin-left: 0;
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
[dir="rtl"] .dashboard .module table td a {
|
||||
padding-left: 0;
|
||||
padding-right: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
/* MOBILE */
|
||||
|
||||
@media (max-width: 767px) {
|
||||
[dir="rtl"] .aligned .related-lookup,
|
||||
[dir="rtl"] .aligned .datetimeshortcuts {
|
||||
margin-left: 0;
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
[dir="rtl"] .aligned ul,
|
||||
[dir="rtl"] form .aligned ul.errorlist {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
[dir="rtl"] #changelist-filter {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,288 @@
|
||||
/* GLOBAL */
|
||||
|
||||
th {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.module h2, .module caption {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.module ul, .module ol {
|
||||
margin-left: 0;
|
||||
margin-right: 1.5em;
|
||||
}
|
||||
|
||||
.viewlink, .addlink, .changelink {
|
||||
padding-left: 0;
|
||||
padding-right: 16px;
|
||||
background-position: 100% 1px;
|
||||
}
|
||||
|
||||
.deletelink {
|
||||
padding-left: 0;
|
||||
padding-right: 16px;
|
||||
background-position: 100% 1px;
|
||||
}
|
||||
|
||||
.object-tools {
|
||||
float: left;
|
||||
}
|
||||
|
||||
thead th:first-child,
|
||||
tfoot td:first-child {
|
||||
border-left: none;
|
||||
}
|
||||
|
||||
/* LAYOUT */
|
||||
|
||||
#user-tools {
|
||||
right: auto;
|
||||
left: 0;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
div.breadcrumbs {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#content-main {
|
||||
float: right;
|
||||
}
|
||||
|
||||
#content-related {
|
||||
float: left;
|
||||
margin-left: -300px;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.colMS {
|
||||
margin-left: 300px;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
/* SORTABLE TABLES */
|
||||
|
||||
table thead th.sorted .sortoptions {
|
||||
float: left;
|
||||
}
|
||||
|
||||
thead th.sorted .text {
|
||||
padding-right: 0;
|
||||
padding-left: 42px;
|
||||
}
|
||||
|
||||
/* dashboard styles */
|
||||
|
||||
.dashboard .module table td a {
|
||||
padding-left: .6em;
|
||||
padding-right: 16px;
|
||||
}
|
||||
|
||||
/* changelists styles */
|
||||
|
||||
.change-list .filtered table {
|
||||
border-left: none;
|
||||
border-right: 0px none;
|
||||
}
|
||||
|
||||
#changelist-filter {
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
margin-left: 0;
|
||||
margin-right: 30px;
|
||||
}
|
||||
|
||||
#changelist-filter li.selected {
|
||||
border-left: none;
|
||||
padding-left: 10px;
|
||||
margin-left: 0;
|
||||
border-right: 5px solid var(--hairline-color);
|
||||
padding-right: 10px;
|
||||
margin-right: -15px;
|
||||
}
|
||||
|
||||
#changelist table tbody td:first-child, #changelist table tbody th:first-child {
|
||||
border-right: none;
|
||||
border-left: none;
|
||||
}
|
||||
|
||||
/* FORMS */
|
||||
|
||||
.aligned label {
|
||||
padding: 0 0 3px 1em;
|
||||
}
|
||||
|
||||
.submit-row a.deletelink {
|
||||
margin-left: 0;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.vDateField, .vTimeField {
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
.aligned .form-row input {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
form .aligned ul {
|
||||
margin-right: 163px;
|
||||
padding-right: 10px;
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
form ul.inline li {
|
||||
float: right;
|
||||
padding-right: 0;
|
||||
padding-left: 7px;
|
||||
}
|
||||
|
||||
form .aligned p.help,
|
||||
form .aligned div.help {
|
||||
margin-right: 160px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
form div.help ul,
|
||||
form .aligned .checkbox-row + .help,
|
||||
form .aligned p.date div.help.timezonewarning,
|
||||
form .aligned p.datetime div.help.timezonewarning,
|
||||
form .aligned p.time div.help.timezonewarning {
|
||||
margin-right: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
form .wide p.help, form .wide div.help {
|
||||
padding-left: 0;
|
||||
padding-right: 50px;
|
||||
}
|
||||
|
||||
form .wide p,
|
||||
form .wide ul.errorlist,
|
||||
form .wide input + p.help,
|
||||
form .wide input + div.help {
|
||||
margin-right: 200px;
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
.submit-row {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
fieldset .fieldBox {
|
||||
margin-left: 20px;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.errorlist li {
|
||||
background-position: 100% 12px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.errornote {
|
||||
background-position: 100% 12px;
|
||||
padding: 10px 12px;
|
||||
}
|
||||
|
||||
/* WIDGETS */
|
||||
|
||||
.calendarnav-previous {
|
||||
top: 0;
|
||||
left: auto;
|
||||
right: 10px;
|
||||
background: url(../img/calendar-icons.svg) 0 -30px no-repeat;
|
||||
}
|
||||
|
||||
.calendarbox .calendarnav-previous:focus,
|
||||
.calendarbox .calendarnav-previous:hover {
|
||||
background-position: 0 -45px;
|
||||
}
|
||||
|
||||
.calendarnav-next {
|
||||
top: 0;
|
||||
right: auto;
|
||||
left: 10px;
|
||||
background: url(../img/calendar-icons.svg) 0 0 no-repeat;
|
||||
}
|
||||
|
||||
.calendarbox .calendarnav-next:focus,
|
||||
.calendarbox .calendarnav-next:hover {
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
|
||||
.calendar caption, .calendarbox h2 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.selector {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.selector .selector-filter {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.selector-add {
|
||||
background: url(../img/selector-icons.svg) 0 -64px no-repeat;
|
||||
}
|
||||
|
||||
.active.selector-add:focus, .active.selector-add:hover {
|
||||
background-position: 0 -80px;
|
||||
}
|
||||
|
||||
.selector-remove {
|
||||
background: url(../img/selector-icons.svg) 0 -96px no-repeat;
|
||||
}
|
||||
|
||||
.active.selector-remove:focus, .active.selector-remove:hover {
|
||||
background-position: 0 -112px;
|
||||
}
|
||||
|
||||
a.selector-chooseall {
|
||||
background: url(../img/selector-icons.svg) right -128px no-repeat;
|
||||
}
|
||||
|
||||
a.active.selector-chooseall:focus, a.active.selector-chooseall:hover {
|
||||
background-position: 100% -144px;
|
||||
}
|
||||
|
||||
a.selector-clearall {
|
||||
background: url(../img/selector-icons.svg) 0 -160px no-repeat;
|
||||
}
|
||||
|
||||
a.active.selector-clearall:focus, a.active.selector-clearall:hover {
|
||||
background-position: 0 -176px;
|
||||
}
|
||||
|
||||
.inline-deletelink {
|
||||
float: left;
|
||||
}
|
||||
|
||||
form .form-row p.datetime {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.related-widget-wrapper {
|
||||
float: right;
|
||||
}
|
||||
|
||||
/* MISC */
|
||||
|
||||
.inline-related h2, .inline-group h2 {
|
||||
text-align: right
|
||||
}
|
||||
|
||||
.inline-related h3 span.delete {
|
||||
padding-right: 20px;
|
||||
padding-left: inherit;
|
||||
left: 10px;
|
||||
right: inherit;
|
||||
float:left;
|
||||
}
|
||||
|
||||
.inline-related h3 span.delete label {
|
||||
margin-left: inherit;
|
||||
margin-right: 2px;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2012-2017 Kevin Brown, Igor Vaynberg, and Select2 contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
@@ -0,0 +1,481 @@
|
||||
.select2-container {
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
position: relative;
|
||||
vertical-align: middle; }
|
||||
.select2-container .select2-selection--single {
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
height: 28px;
|
||||
user-select: none;
|
||||
-webkit-user-select: none; }
|
||||
.select2-container .select2-selection--single .select2-selection__rendered {
|
||||
display: block;
|
||||
padding-left: 8px;
|
||||
padding-right: 20px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap; }
|
||||
.select2-container .select2-selection--single .select2-selection__clear {
|
||||
position: relative; }
|
||||
.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
|
||||
padding-right: 8px;
|
||||
padding-left: 20px; }
|
||||
.select2-container .select2-selection--multiple {
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
min-height: 32px;
|
||||
user-select: none;
|
||||
-webkit-user-select: none; }
|
||||
.select2-container .select2-selection--multiple .select2-selection__rendered {
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
padding-left: 8px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap; }
|
||||
.select2-container .select2-search--inline {
|
||||
float: left; }
|
||||
.select2-container .select2-search--inline .select2-search__field {
|
||||
box-sizing: border-box;
|
||||
border: none;
|
||||
font-size: 100%;
|
||||
margin-top: 5px;
|
||||
padding: 0; }
|
||||
.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button {
|
||||
-webkit-appearance: none; }
|
||||
|
||||
.select2-dropdown {
|
||||
background-color: white;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: -100000px;
|
||||
width: 100%;
|
||||
z-index: 1051; }
|
||||
|
||||
.select2-results {
|
||||
display: block; }
|
||||
|
||||
.select2-results__options {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0; }
|
||||
|
||||
.select2-results__option {
|
||||
padding: 6px;
|
||||
user-select: none;
|
||||
-webkit-user-select: none; }
|
||||
.select2-results__option[aria-selected] {
|
||||
cursor: pointer; }
|
||||
|
||||
.select2-container--open .select2-dropdown {
|
||||
left: 0; }
|
||||
|
||||
.select2-container--open .select2-dropdown--above {
|
||||
border-bottom: none;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0; }
|
||||
|
||||
.select2-container--open .select2-dropdown--below {
|
||||
border-top: none;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0; }
|
||||
|
||||
.select2-search--dropdown {
|
||||
display: block;
|
||||
padding: 4px; }
|
||||
.select2-search--dropdown .select2-search__field {
|
||||
padding: 4px;
|
||||
width: 100%;
|
||||
box-sizing: border-box; }
|
||||
.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button {
|
||||
-webkit-appearance: none; }
|
||||
.select2-search--dropdown.select2-search--hide {
|
||||
display: none; }
|
||||
|
||||
.select2-close-mask {
|
||||
border: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: block;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
min-height: 100%;
|
||||
min-width: 100%;
|
||||
height: auto;
|
||||
width: auto;
|
||||
opacity: 0;
|
||||
z-index: 99;
|
||||
background-color: #fff;
|
||||
filter: alpha(opacity=0); }
|
||||
|
||||
.select2-hidden-accessible {
|
||||
border: 0 !important;
|
||||
clip: rect(0 0 0 0) !important;
|
||||
-webkit-clip-path: inset(50%) !important;
|
||||
clip-path: inset(50%) !important;
|
||||
height: 1px !important;
|
||||
overflow: hidden !important;
|
||||
padding: 0 !important;
|
||||
position: absolute !important;
|
||||
width: 1px !important;
|
||||
white-space: nowrap !important; }
|
||||
|
||||
.select2-container--default .select2-selection--single {
|
||||
background-color: #fff;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px; }
|
||||
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
||||
color: #444;
|
||||
line-height: 28px; }
|
||||
.select2-container--default .select2-selection--single .select2-selection__clear {
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
font-weight: bold; }
|
||||
.select2-container--default .select2-selection--single .select2-selection__placeholder {
|
||||
color: #999; }
|
||||
.select2-container--default .select2-selection--single .select2-selection__arrow {
|
||||
height: 26px;
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
right: 1px;
|
||||
width: 20px; }
|
||||
.select2-container--default .select2-selection--single .select2-selection__arrow b {
|
||||
border-color: #888 transparent transparent transparent;
|
||||
border-style: solid;
|
||||
border-width: 5px 4px 0 4px;
|
||||
height: 0;
|
||||
left: 50%;
|
||||
margin-left: -4px;
|
||||
margin-top: -2px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 0; }
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear {
|
||||
float: left; }
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow {
|
||||
left: 1px;
|
||||
right: auto; }
|
||||
|
||||
.select2-container--default.select2-container--disabled .select2-selection--single {
|
||||
background-color: #eee;
|
||||
cursor: default; }
|
||||
.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear {
|
||||
display: none; }
|
||||
|
||||
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
|
||||
border-color: transparent transparent #888 transparent;
|
||||
border-width: 0 4px 5px 4px; }
|
||||
|
||||
.select2-container--default .select2-selection--multiple {
|
||||
background-color: white;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
cursor: text; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
|
||||
box-sizing: border-box;
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0 5px;
|
||||
width: 100%; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__rendered li {
|
||||
list-style: none; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__clear {
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
font-weight: bold;
|
||||
margin-top: 5px;
|
||||
margin-right: 10px;
|
||||
padding: 1px; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
||||
background-color: #e4e4e4;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
cursor: default;
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
margin-top: 5px;
|
||||
padding: 0 5px; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
|
||||
color: #999;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
margin-right: 2px; }
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
|
||||
color: #333; }
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice, .select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline {
|
||||
float: right; }
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
||||
margin-left: 5px;
|
||||
margin-right: auto; }
|
||||
|
||||
.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
|
||||
margin-left: 2px;
|
||||
margin-right: auto; }
|
||||
|
||||
.select2-container--default.select2-container--focus .select2-selection--multiple {
|
||||
border: solid black 1px;
|
||||
outline: 0; }
|
||||
|
||||
.select2-container--default.select2-container--disabled .select2-selection--multiple {
|
||||
background-color: #eee;
|
||||
cursor: default; }
|
||||
|
||||
.select2-container--default.select2-container--disabled .select2-selection__choice__remove {
|
||||
display: none; }
|
||||
|
||||
.select2-container--default.select2-container--open.select2-container--above .select2-selection--single, .select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple {
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0; }
|
||||
|
||||
.select2-container--default.select2-container--open.select2-container--below .select2-selection--single, .select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0; }
|
||||
|
||||
.select2-container--default .select2-search--dropdown .select2-search__field {
|
||||
border: 1px solid #aaa; }
|
||||
|
||||
.select2-container--default .select2-search--inline .select2-search__field {
|
||||
background: transparent;
|
||||
border: none;
|
||||
outline: 0;
|
||||
box-shadow: none;
|
||||
-webkit-appearance: textfield; }
|
||||
|
||||
.select2-container--default .select2-results > .select2-results__options {
|
||||
max-height: 200px;
|
||||
overflow-y: auto; }
|
||||
|
||||
.select2-container--default .select2-results__option[role=group] {
|
||||
padding: 0; }
|
||||
|
||||
.select2-container--default .select2-results__option[aria-disabled=true] {
|
||||
color: #999; }
|
||||
|
||||
.select2-container--default .select2-results__option[aria-selected=true] {
|
||||
background-color: #ddd; }
|
||||
|
||||
.select2-container--default .select2-results__option .select2-results__option {
|
||||
padding-left: 1em; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__group {
|
||||
padding-left: 0; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -1em;
|
||||
padding-left: 2em; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -2em;
|
||||
padding-left: 3em; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -3em;
|
||||
padding-left: 4em; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -4em;
|
||||
padding-left: 5em; }
|
||||
.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option {
|
||||
margin-left: -5em;
|
||||
padding-left: 6em; }
|
||||
|
||||
.select2-container--default .select2-results__option--highlighted[aria-selected] {
|
||||
background-color: #5897fb;
|
||||
color: white; }
|
||||
|
||||
.select2-container--default .select2-results__group {
|
||||
cursor: default;
|
||||
display: block;
|
||||
padding: 6px; }
|
||||
|
||||
.select2-container--classic .select2-selection--single {
|
||||
background-color: #f7f7f7;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
outline: 0;
|
||||
background-image: -webkit-linear-gradient(top, white 50%, #eeeeee 100%);
|
||||
background-image: -o-linear-gradient(top, white 50%, #eeeeee 100%);
|
||||
background-image: linear-gradient(to bottom, white 50%, #eeeeee 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
|
||||
.select2-container--classic .select2-selection--single:focus {
|
||||
border: 1px solid #5897fb; }
|
||||
.select2-container--classic .select2-selection--single .select2-selection__rendered {
|
||||
color: #444;
|
||||
line-height: 28px; }
|
||||
.select2-container--classic .select2-selection--single .select2-selection__clear {
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
font-weight: bold;
|
||||
margin-right: 10px; }
|
||||
.select2-container--classic .select2-selection--single .select2-selection__placeholder {
|
||||
color: #999; }
|
||||
.select2-container--classic .select2-selection--single .select2-selection__arrow {
|
||||
background-color: #ddd;
|
||||
border: none;
|
||||
border-left: 1px solid #aaa;
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
height: 26px;
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
right: 1px;
|
||||
width: 20px;
|
||||
background-image: -webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
|
||||
background-image: -o-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
|
||||
background-image: linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0); }
|
||||
.select2-container--classic .select2-selection--single .select2-selection__arrow b {
|
||||
border-color: #888 transparent transparent transparent;
|
||||
border-style: solid;
|
||||
border-width: 5px 4px 0 4px;
|
||||
height: 0;
|
||||
left: 50%;
|
||||
margin-left: -4px;
|
||||
margin-top: -2px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 0; }
|
||||
|
||||
.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear {
|
||||
float: left; }
|
||||
|
||||
.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow {
|
||||
border: none;
|
||||
border-right: 1px solid #aaa;
|
||||
border-radius: 0;
|
||||
border-top-left-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
left: 1px;
|
||||
right: auto; }
|
||||
|
||||
.select2-container--classic.select2-container--open .select2-selection--single {
|
||||
border: 1px solid #5897fb; }
|
||||
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow {
|
||||
background: transparent;
|
||||
border: none; }
|
||||
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b {
|
||||
border-color: transparent transparent #888 transparent;
|
||||
border-width: 0 4px 5px 4px; }
|
||||
|
||||
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single {
|
||||
border-top: none;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
background-image: -webkit-linear-gradient(top, white 0%, #eeeeee 50%);
|
||||
background-image: -o-linear-gradient(top, white 0%, #eeeeee 50%);
|
||||
background-image: linear-gradient(to bottom, white 0%, #eeeeee 50%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
|
||||
|
||||
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single {
|
||||
border-bottom: none;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
background-image: -webkit-linear-gradient(top, #eeeeee 50%, white 100%);
|
||||
background-image: -o-linear-gradient(top, #eeeeee 50%, white 100%);
|
||||
background-image: linear-gradient(to bottom, #eeeeee 50%, white 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0); }
|
||||
|
||||
.select2-container--classic .select2-selection--multiple {
|
||||
background-color: white;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
cursor: text;
|
||||
outline: 0; }
|
||||
.select2-container--classic .select2-selection--multiple:focus {
|
||||
border: 1px solid #5897fb; }
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__rendered {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0 5px; }
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__clear {
|
||||
display: none; }
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__choice {
|
||||
background-color: #e4e4e4;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 4px;
|
||||
cursor: default;
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
margin-top: 5px;
|
||||
padding: 0 5px; }
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove {
|
||||
color: #888;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
margin-right: 2px; }
|
||||
.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover {
|
||||
color: #555; }
|
||||
|
||||
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice {
|
||||
float: right;
|
||||
margin-left: 5px;
|
||||
margin-right: auto; }
|
||||
|
||||
.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove {
|
||||
margin-left: 2px;
|
||||
margin-right: auto; }
|
||||
|
||||
.select2-container--classic.select2-container--open .select2-selection--multiple {
|
||||
border: 1px solid #5897fb; }
|
||||
|
||||
.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple {
|
||||
border-top: none;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0; }
|
||||
|
||||
.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple {
|
||||
border-bottom: none;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0; }
|
||||
|
||||
.select2-container--classic .select2-search--dropdown .select2-search__field {
|
||||
border: 1px solid #aaa;
|
||||
outline: 0; }
|
||||
|
||||
.select2-container--classic .select2-search--inline .select2-search__field {
|
||||
outline: 0;
|
||||
box-shadow: none; }
|
||||
|
||||
.select2-container--classic .select2-dropdown {
|
||||
background-color: white;
|
||||
border: 1px solid transparent; }
|
||||
|
||||
.select2-container--classic .select2-dropdown--above {
|
||||
border-bottom: none; }
|
||||
|
||||
.select2-container--classic .select2-dropdown--below {
|
||||
border-top: none; }
|
||||
|
||||
.select2-container--classic .select2-results > .select2-results__options {
|
||||
max-height: 200px;
|
||||
overflow-y: auto; }
|
||||
|
||||
.select2-container--classic .select2-results__option[role=group] {
|
||||
padding: 0; }
|
||||
|
||||
.select2-container--classic .select2-results__option[aria-disabled=true] {
|
||||
color: grey; }
|
||||
|
||||
.select2-container--classic .select2-results__option--highlighted[aria-selected] {
|
||||
background-color: #3875d7;
|
||||
color: white; }
|
||||
|
||||
.select2-container--classic .select2-results__group {
|
||||
cursor: default;
|
||||
display: block;
|
||||
padding: 6px; }
|
||||
|
||||
.select2-container--classic.select2-container--open .select2-dropdown {
|
||||
border-color: #5897fb; }
|
||||
@@ -0,0 +1 @@
|
||||
.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px;padding:1px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;bordeLine truncated
|
||||
@@ -0,0 +1,603 @@
|
||||
/* SELECTOR (FILTER INTERFACE) */
|
||||
|
||||
.selector {
|
||||
width: 800px;
|
||||
float: left;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.selector select {
|
||||
width: 380px;
|
||||
height: 17.2em;
|
||||
flex: 1 0 auto;
|
||||
}
|
||||
|
||||
.selector-available, .selector-chosen {
|
||||
width: 380px;
|
||||
text-align: center;
|
||||
margin-bottom: 5px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.selector-available h2, .selector-chosen h2 {
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 4px 4px 0 0;
|
||||
}
|
||||
|
||||
.selector-chosen .list-footer-display {
|
||||
border: 1px solid var(--border-color);
|
||||
border-top: none;
|
||||
border-radius: 0 0 4px 4px;
|
||||
margin: 0 0 10px;
|
||||
padding: 8px;
|
||||
text-align: center;
|
||||
background: var(--primary);
|
||||
color: var(--header-link-color);
|
||||
cursor: pointer;
|
||||
}
|
||||
.selector-chosen .list-footer-display__clear {
|
||||
color: var(--breadcrumbs-fg);
|
||||
}
|
||||
|
||||
.selector-chosen h2 {
|
||||
background: var(--primary);
|
||||
color: var(--header-link-color);
|
||||
}
|
||||
|
||||
.selector .selector-available h2 {
|
||||
background: var(--darkened-bg);
|
||||
color: var(--body-quiet-color);
|
||||
}
|
||||
|
||||
.selector .selector-filter {
|
||||
border: 1px solid var(--border-color);
|
||||
border-width: 0 1px;
|
||||
padding: 8px;
|
||||
color: var(--body-quiet-color);
|
||||
font-size: 0.625rem;
|
||||
margin: 0;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.selector .selector-filter label,
|
||||
.inline-group .aligned .selector .selector-filter label {
|
||||
float: left;
|
||||
margin: 7px 0 0;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.selector .selector-available input,
|
||||
.selector .selector-chosen input {
|
||||
width: 320px;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.selector ul.selector-chooser {
|
||||
align-self: center;
|
||||
width: 22px;
|
||||
background-color: var(--selected-bg);
|
||||
border-radius: 10px;
|
||||
margin: 0 5px;
|
||||
padding: 0;
|
||||
transform: translateY(-17px);
|
||||
}
|
||||
|
||||
.selector-chooser li {
|
||||
margin: 0;
|
||||
padding: 3px;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.selector select {
|
||||
padding: 0 10px;
|
||||
margin: 0 0 10px;
|
||||
border-radius: 0 0 4px 4px;
|
||||
}
|
||||
.selector .selector-chosen--with-filtered select {
|
||||
margin: 0;
|
||||
border-radius: 0;
|
||||
height: 14em;
|
||||
}
|
||||
|
||||
.selector .selector-chosen:not(.selector-chosen--with-filtered) .list-footer-display {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.selector-add, .selector-remove {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
display: block;
|
||||
text-indent: -3000px;
|
||||
overflow: hidden;
|
||||
cursor: default;
|
||||
opacity: 0.55;
|
||||
}
|
||||
|
||||
.active.selector-add, .active.selector-remove {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.active.selector-add:hover, .active.selector-remove:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.selector-add {
|
||||
background: url(../img/selector-icons.svg) 0 -96px no-repeat;
|
||||
}
|
||||
|
||||
.active.selector-add:focus, .active.selector-add:hover {
|
||||
background-position: 0 -112px;
|
||||
}
|
||||
|
||||
.selector-remove {
|
||||
background: url(../img/selector-icons.svg) 0 -64px no-repeat;
|
||||
}
|
||||
|
||||
.active.selector-remove:focus, .active.selector-remove:hover {
|
||||
background-position: 0 -80px;
|
||||
}
|
||||
|
||||
a.selector-chooseall, a.selector-clearall {
|
||||
display: inline-block;
|
||||
height: 16px;
|
||||
text-align: left;
|
||||
margin: 1px auto 3px;
|
||||
overflow: hidden;
|
||||
font-weight: bold;
|
||||
line-height: 16px;
|
||||
color: var(--body-quiet-color);
|
||||
text-decoration: none;
|
||||
opacity: 0.55;
|
||||
}
|
||||
|
||||
a.active.selector-chooseall:focus, a.active.selector-clearall:focus,
|
||||
a.active.selector-chooseall:hover, a.active.selector-clearall:hover {
|
||||
color: var(--link-fg);
|
||||
}
|
||||
|
||||
a.active.selector-chooseall, a.active.selector-clearall {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
a.active.selector-chooseall:hover, a.active.selector-clearall:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
a.selector-chooseall {
|
||||
padding: 0 18px 0 0;
|
||||
background: url(../img/selector-icons.svg) right -160px no-repeat;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
a.active.selector-chooseall:focus, a.active.selector-chooseall:hover {
|
||||
background-position: 100% -176px;
|
||||
}
|
||||
|
||||
a.selector-clearall {
|
||||
padding: 0 0 0 18px;
|
||||
background: url(../img/selector-icons.svg) 0 -128px no-repeat;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
a.active.selector-clearall:focus, a.active.selector-clearall:hover {
|
||||
background-position: 0 -144px;
|
||||
}
|
||||
|
||||
/* STACKED SELECTORS */
|
||||
|
||||
.stacked {
|
||||
float: left;
|
||||
width: 490px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.stacked select {
|
||||
width: 480px;
|
||||
height: 10.1em;
|
||||
}
|
||||
|
||||
.stacked .selector-available, .stacked .selector-chosen {
|
||||
width: 480px;
|
||||
}
|
||||
|
||||
.stacked .selector-available {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.stacked .selector-available input {
|
||||
width: 422px;
|
||||
}
|
||||
|
||||
.stacked ul.selector-chooser {
|
||||
height: 22px;
|
||||
width: 50px;
|
||||
margin: 0 0 10px 40%;
|
||||
background-color: #eee;
|
||||
border-radius: 10px;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.stacked .selector-chooser li {
|
||||
float: left;
|
||||
padding: 3px 3px 3px 5px;
|
||||
}
|
||||
|
||||
.stacked .selector-chooseall, .stacked .selector-clearall {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.stacked .selector-add {
|
||||
background: url(../img/selector-icons.svg) 0 -32px no-repeat;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.stacked .active.selector-add {
|
||||
background-position: 0 -32px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.stacked .active.selector-add:focus, .stacked .active.selector-add:hover {
|
||||
background-position: 0 -48px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.stacked .selector-remove {
|
||||
background: url(../img/selector-icons.svg) 0 0 no-repeat;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.stacked .active.selector-remove {
|
||||
background-position: 0 0px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.stacked .active.selector-remove:focus, .stacked .active.selector-remove:hover {
|
||||
background-position: 0 -16px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.selector .help-icon {
|
||||
background: url(../img/icon-unknown.svg) 0 0 no-repeat;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin: -2px 0 0 2px;
|
||||
width: 13px;
|
||||
height: 13px;
|
||||
}
|
||||
|
||||
.selector .selector-chosen .help-icon {
|
||||
background: url(../img/icon-unknown-alt.svg) 0 0 no-repeat;
|
||||
}
|
||||
|
||||
.selector .search-label-icon {
|
||||
background: url(../img/search.svg) 0 0 no-repeat;
|
||||
display: inline-block;
|
||||
height: 1.125rem;
|
||||
width: 1.125rem;
|
||||
}
|
||||
|
||||
/* DATE AND TIME */
|
||||
|
||||
p.datetime {
|
||||
line-height: 20px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
color: var(--body-quiet-color);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.datetime span {
|
||||
white-space: nowrap;
|
||||
font-weight: normal;
|
||||
font-size: 0.6875rem;
|
||||
color: var(--body-quiet-color);
|
||||
}
|
||||
|
||||
.datetime input, .form-row .datetime input.vDateField, .form-row .datetime input.vTimeField {
|
||||
margin-left: 5px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
table p.datetime {
|
||||
font-size: 0.6875rem;
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.datetimeshortcuts .clock-icon, .datetimeshortcuts .date-icon {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.datetimeshortcuts .clock-icon {
|
||||
background: url(../img/icon-clock.svg) 0 0 no-repeat;
|
||||
}
|
||||
|
||||
.datetimeshortcuts a:focus .clock-icon,
|
||||
.datetimeshortcuts a:hover .clock-icon {
|
||||
background-position: 0 -16px;
|
||||
}
|
||||
|
||||
.datetimeshortcuts .date-icon {
|
||||
background: url(../img/icon-calendar.svg) 0 0 no-repeat;
|
||||
top: -1px;
|
||||
}
|
||||
|
||||
.datetimeshortcuts a:focus .date-icon,
|
||||
.datetimeshortcuts a:hover .date-icon {
|
||||
background-position: 0 -16px;
|
||||
}
|
||||
|
||||
.timezonewarning {
|
||||
font-size: 0.6875rem;
|
||||
color: var(--body-quiet-color);
|
||||
}
|
||||
|
||||
/* URL */
|
||||
|
||||
p.url {
|
||||
line-height: 20px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
color: var(--body-quiet-color);
|
||||
font-size: 0.6875rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.url a {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* FILE UPLOADS */
|
||||
|
||||
p.file-upload {
|
||||
line-height: 20px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
color: var(--body-quiet-color);
|
||||
font-size: 0.6875rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.file-upload a {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.file-upload .deletelink {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
span.clearable-file-input label {
|
||||
color: var(--body-fg);
|
||||
font-size: 0.6875rem;
|
||||
display: inline;
|
||||
float: none;
|
||||
}
|
||||
|
||||
/* CALENDARS & CLOCKS */
|
||||
|
||||
.calendarbox, .clockbox {
|
||||
margin: 5px auto;
|
||||
font-size: 0.75rem;
|
||||
width: 19em;
|
||||
text-align: center;
|
||||
background: var(--body-bg);
|
||||
color: var(--body-fg);
|
||||
border: 1px solid var(--hairline-color);
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.clockbox {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.calendar {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.calendar table {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border-collapse: collapse;
|
||||
background: white;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.calendar caption, .calendarbox h2 {
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
border-top: none;
|
||||
font-weight: 700;
|
||||
font-size: 0.75rem;
|
||||
color: #333;
|
||||
background: var(--accent);
|
||||
}
|
||||
|
||||
.calendar th {
|
||||
padding: 8px 5px;
|
||||
background: var(--darkened-bg);
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
font-weight: 400;
|
||||
font-size: 0.75rem;
|
||||
text-align: center;
|
||||
color: var(--body-quiet-color);
|
||||
}
|
||||
|
||||
.calendar td {
|
||||
font-weight: 400;
|
||||
font-size: 0.75rem;
|
||||
text-align: center;
|
||||
padding: 0;
|
||||
border-top: 1px solid var(--hairline-color);
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.calendar td.selected a {
|
||||
background: var(--primary);
|
||||
color: var(--button-fg);
|
||||
}
|
||||
|
||||
.calendar td.nonday {
|
||||
background: var(--darkened-bg);
|
||||
}
|
||||
|
||||
.calendar td.today a {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.calendar td a, .timelist a {
|
||||
display: block;
|
||||
font-weight: 400;
|
||||
padding: 6px;
|
||||
text-decoration: none;
|
||||
color: var(--body-quiet-color);
|
||||
}
|
||||
|
||||
.calendar td a:focus, .timelist a:focus,
|
||||
.calendar td a:hover, .timelist a:hover {
|
||||
background: var(--primary);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.calendar td a:active, .timelist a:active {
|
||||
background: var(--header-bg);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.calendarnav {
|
||||
font-size: 0.625rem;
|
||||
text-align: center;
|
||||
color: #ccc;
|
||||
margin: 0;
|
||||
padding: 1px 3px;
|
||||
}
|
||||
|
||||
.calendarnav a:link, #calendarnav a:visited,
|
||||
#calendarnav a:focus, #calendarnav a:hover {
|
||||
color: var(--body-quiet-color);
|
||||
}
|
||||
|
||||
.calendar-shortcuts {
|
||||
background: var(--body-bg);
|
||||
color: var(--body-quiet-color);
|
||||
font-size: 0.6875rem;
|
||||
line-height: 0.6875rem;
|
||||
border-top: 1px solid var(--hairline-color);
|
||||
padding: 8px 0;
|
||||
}
|
||||
|
||||
.calendarbox .calendarnav-previous, .calendarbox .calendarnav-next {
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
text-indent: -9999px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.calendarnav-previous {
|
||||
left: 10px;
|
||||
background: url(../img/calendar-icons.svg) 0 0 no-repeat;
|
||||
}
|
||||
|
||||
.calendarbox .calendarnav-previous:focus,
|
||||
.calendarbox .calendarnav-previous:hover {
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
|
||||
.calendarnav-next {
|
||||
right: 10px;
|
||||
background: url(../img/calendar-icons.svg) 0 -30px no-repeat;
|
||||
}
|
||||
|
||||
.calendarbox .calendarnav-next:focus,
|
||||
.calendarbox .calendarnav-next:hover {
|
||||
background-position: 0 -45px;
|
||||
}
|
||||
|
||||
.calendar-cancel {
|
||||
margin: 0;
|
||||
padding: 4px 0;
|
||||
font-size: 0.75rem;
|
||||
background: #eee;
|
||||
border-top: 1px solid var(--border-color);
|
||||
color: var(--body-fg);
|
||||
}
|
||||
|
||||
.calendar-cancel:focus, .calendar-cancel:hover {
|
||||
background: #ddd;
|
||||
}
|
||||
|
||||
.calendar-cancel a {
|
||||
color: black;
|
||||
display: block;
|
||||
}
|
||||
|
||||
ul.timelist, .timelist li {
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.timelist a {
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
/* EDIT INLINE */
|
||||
|
||||
.inline-deletelink {
|
||||
float: right;
|
||||
text-indent: -9999px;
|
||||
background: url(../img/inline-delete.svg) 0 0 no-repeat;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border: 0px none;
|
||||
}
|
||||
|
||||
.inline-deletelink:focus, .inline-deletelink:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* RELATED WIDGET WRAPPER */
|
||||
.related-widget-wrapper {
|
||||
float: left; /* display properly in form rows with multiple fields */
|
||||
overflow: hidden; /* clear floated contents */
|
||||
}
|
||||
|
||||
.related-widget-wrapper-link {
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
.related-widget-wrapper-link:link {
|
||||
opacity: .8;
|
||||
}
|
||||
|
||||
.related-widget-wrapper-link:link:focus,
|
||||
.related-widget-wrapper-link:link:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
select + .related-widget-wrapper-link,
|
||||
.related-widget-wrapper-link + .related-widget-wrapper-link {
|
||||
margin-left: 7px;
|
||||
}
|
||||
|
||||
/* GIS MAPS */
|
||||
.dj_map {
|
||||
width: 600px;
|
||||
height: 400px;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Code Charm Ltd
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -0,0 +1,7 @@
|
||||
All icons are taken from Font Awesome (http://fontawesome.io/) project.
|
||||
The Font Awesome font is licensed under the SIL OFL 1.1:
|
||||
- https://scripts.sil.org/OFL
|
||||
|
||||
SVG icons source: https://github.com/encharm/Font-Awesome-SVG-PNG
|
||||
Font-Awesome-SVG-PNG is licensed under the MIT license (see file license
|
||||
in current folder).
|
||||
@@ -0,0 +1,14 @@
|
||||
<svg width="15" height="60" viewBox="0 0 1792 7168" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<defs>
|
||||
<g id="previous">
|
||||
<path d="M1037 1395l102-102q19-19 19-45t-19-45l-307-307 307-307q19-19 19-45t-19-45l-102-102q-19-19-45-19t-45 19l-454 454q-19 19-19 45t19 45l454 454q19 19 45 19t45-19zm627-499q0 209-103 385.5t-279.5 279.5-385.5 103-385.5-103-279.5-279.5-103-385.5 103-385.5 279.5-279.5 385.5-103 385.5 103 279.5 279.5 103 385.5z"/>
|
||||
</g>
|
||||
<g id="next">
|
||||
<path d="M845 1395l454-454q19-19 19-45t-19-45l-454-454q-19-19-45-19t-45 19l-102 102q-19 19-19 45t19 45l307 307-307 307q-19 19-19 45t19 45l102 102q19 19 45 19t45-19zm819-499q0 209-103 385.5t-279.5 279.5-385.5 103-385.5-103-279.5-279.5-103-385.5 103-385.5 279.5-279.5 385.5-103 385.5 103 279.5 279.5 103 385.5z"/>
|
||||
</g>
|
||||
</defs>
|
||||
<use xlink:href="#previous" x="0" y="0" fill="#333333" />
|
||||
<use xlink:href="#previous" x="0" y="1792" fill="#000000" />
|
||||
<use xlink:href="#next" x="0" y="3584" fill="#333333" />
|
||||
<use xlink:href="#next" x="0" y="5376" fill="#000000" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1 @@
|
||||
<svg width="24" height="22" viewBox="0 0 847 779" xmlns="http://www.w3.org/2000/svg"><g><path fill="#EBECE6" d="M120 1h607c66 0 120 54 120 120v536c0 66-54 120-120 120h-607c-66 0-120-54-120-120v-536c0-66 54-120 120-120z"/><path fill="#9E9E93" d="M120 1h607c66 0 120 54 120 120v536c0 66-54 120-120 120h-607c-66 0-120-54-120-120v-536c0-66 54-120 120-120zm607 25h-607c-26 0-50 11-67 28-17 18-28 41-28 67v536c0 27 11 50 28 68 17 17 41 27 67 27h607c26 0 49-10 67-27 17-18 28-41 28-68v-536c0-26-11-49-28-67-18-17-41-28-67-28z"/><path stroke="#A9A8A4" stroke-width="20" d="M706 295l-68 281"/><path stroke="#E47474" stroke-width="20" d="M316 648l390-353M141 435l175 213"/><path stroke="#C9C9C9" stroke-width="20" d="M319 151l-178 284M706 295l-387-144"/><g fill="#040405"><path d="M319 111c22 0 40 18 40 40s-18 40-40 40-40-18-40-40 18-40 40-40zM141 395c22 0 40 18 40 40s-18 40-40 40c-23 0-41-18-41-40s18-40 41-40zM316 608c22 0 40 18 40 40 0 23-18 41-40 41s-40-18-40-41c0-22 18-40 40-40zM706 254c22 0 40 18 40 41 0 22-18 40-40 40s-40-18-40-40c0-23 18-41 40-41zM638 536c22 0 40 18 40 40s-18 40-40 40-40-18-40-40 18-40 40-40z"/></g></g></svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1 @@
|
||||
<svg width="24" height="22" viewBox="0 0 847 779" xmlns="http://www.w3.org/2000/svg"><g><path fill="#F1C02A" d="M120 1h607c66 0 120 54 120 120v536c0 66-54 120-120 120h-607c-66 0-120-54-120-120v-536c0-66 54-120 120-120z"/><path fill="#9E9E93" d="M120 1h607c66 0 120 54 120 120v536c0 66-54 120-120 120h-607c-66 0-120-54-120-120v-536c0-66 54-120 120-120zm607 25h-607c-26 0-50 11-67 28-17 18-28 41-28 67v536c0 27 11 50 28 68 17 17 41 27 67 27h607c26 0 49-10 67-27 17-18 28-41 28-68v-536c0-26-11-49-28-67-18-17-41-28-67-28z"/><path stroke="#A9A8A4" stroke-width="20" d="M706 295l-68 281"/><path stroke="#E47474" stroke-width="20" d="M316 648l390-353M141 435l175 213"/><path stroke="#C9A741" stroke-width="20" d="M319 151l-178 284M706 295l-387-144"/><g fill="#040405"><path d="M319 111c22 0 40 18 40 40s-18 40-40 40-40-18-40-40 18-40 40-40zM141 395c22 0 40 18 40 40s-18 40-40 40c-23 0-41-18-41-40s18-40 41-40zM316 608c22 0 40 18 40 40 0 23-18 41-40 41s-40-18-40-41c0-22 18-40 40-40zM706 254c22 0 40 18 40 41 0 22-18 40-40 40s-40-18-40-40c0-23 18-41 40-41zM638 536c22 0 40 18 40 40s-18 40-40 40-40-18-40-40 18-40 40-40z"/></g></g></svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,3 @@
|
||||
<svg width="13" height="13" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill="#70bf2b" d="M1600 796v192q0 40-28 68t-68 28h-416v416q0 40-28 68t-68 28h-192q-40 0-68-28t-28-68v-416h-416q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h416v-416q0-40 28-68t68-28h192q40 0 68 28t28 68v416h416q40 0 68 28t28 68z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 331 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="14" height="14" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill="#efb80b" d="M1024 1375v-190q0-14-9.5-23.5t-22.5-9.5h-192q-13 0-22.5 9.5t-9.5 23.5v190q0 14 9.5 23.5t22.5 9.5h192q13 0 22.5-9.5t9.5-23.5zm-2-374l18-459q0-12-10-19-13-11-24-11h-220q-11 0-24 11-10 7-10 21l17 457q0 10 10 16.5t24 6.5h185q14 0 23.5-6.5t10.5-16.5zm-14-934l768 1408q35 63-2 126-17 29-46.5 46t-63.5 17h-1536q-34 0-63.5-17t-46.5-46q-37-63-2-126l768-1408q17-31 47-49t65-18 65 18 47 49z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 504 B |
@@ -0,0 +1,9 @@
|
||||
<svg width="16" height="32" viewBox="0 0 1792 3584" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<defs>
|
||||
<g id="icon">
|
||||
<path d="M192 1664h288v-288h-288v288zm352 0h320v-288h-320v288zm-352-352h288v-320h-288v320zm352 0h320v-320h-320v320zm-352-384h288v-288h-288v288zm736 736h320v-288h-320v288zm-384-736h320v-288h-320v288zm768 736h288v-288h-288v288zm-384-352h320v-320h-320v320zm-352-864v-288q0-13-9.5-22.5t-22.5-9.5h-64q-13 0-22.5 9.5t-9.5 22.5v288q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5-9.5t9.5-22.5zm736 864h288v-320h-288v320zm-384-384h320v-288h-320v288zm384 0h288v-288h-288v288zm32-480v-288q0-13-9.5-22.5t-22.5-9.5h-64q-13 0-22.5 9.5t-9.5 22.5v288q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5-9.5t9.5-22.5zm384-64v1280q0 52-38 90t-90 38h-1408q-52 0-90-38t-38-90v-1280q0-52 38-90t90-38h128v-96q0-66 47-113t113-47h64q66 0 113 47t47 113v96h384v-96q0-66 47-113t113-47h64q66 0 113 47t47 113v96h128q52 0 90 38t38 90z"/>
|
||||
</g>
|
||||
</defs>
|
||||
<use xlink:href="#icon" x="0" y="0" fill="#447e9b" />
|
||||
<use xlink:href="#icon" x="0" y="1792" fill="#003366" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,3 @@
|
||||
<svg width="13" height="13" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill="#efb80b" d="M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 380 B |
@@ -0,0 +1,9 @@
|
||||
<svg width="16" height="32" viewBox="0 0 1792 3584" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<defs>
|
||||
<g id="icon">
|
||||
<path d="M1024 544v448q0 14-9 23t-23 9h-320q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h224v-352q0-14 9-23t23-9h64q14 0 23 9t9 23zm416 352q0-148-73-273t-198-198-273-73-273 73-198 198-73 273 73 273 198 198 273 73 273-73 198-198 73-273zm224 0q0 209-103 385.5t-279.5 279.5-385.5 103-385.5-103-279.5-279.5-103-385.5 103-385.5 279.5-279.5 385.5-103 385.5 103 279.5 279.5 103 385.5z"/>
|
||||
</g>
|
||||
</defs>
|
||||
<use xlink:href="#icon" x="0" y="0" fill="#447e9b" />
|
||||
<use xlink:href="#icon" x="0" y="1792" fill="#003366" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 677 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="14" height="14" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill="#dd4646" d="M1490 1322q0 40-28 68l-136 136q-28 28-68 28t-68-28l-294-294-294 294q-28 28-68 28t-68-28l-136-136q-28-28-28-68t28-68l294-294-294-294q-28-28-28-68t28-68l136-136q28-28 68-28t68 28l294 294 294-294q28-28 68-28t68 28l136 136q28 28 28 68t-28 68l-294 294 294 294q28 28 28 68z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 392 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="13" height="13" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill="#dd4646" d="M1277 1122q0-26-19-45l-181-181 181-181q19-19 19-45 0-27-19-46l-90-90q-19-19-46-19-26 0-45 19l-181 181-181-181q-19-19-45-19-27 0-46 19l-90 90q-19 19-19 46 0 26 19 45l181 181-181 181q-19 19-19 45 0 27 19 46l90 90q19 19 46 19 26 0 45-19l181-181 181 181q19 19 45 19 27 0 46-19l90-90q19-19 19-46zm387-226q0 209-103 385.5t-279.5 279.5-385.5 103-385.5-103-279.5-279.5-103-385.5 103-385.5 279.5-279.5 385.5-103 385.5 103 279.5 279.5 103 385.5z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 560 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="13" height="13" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill="#ffffff" d="M1024 1376v-192q0-14-9-23t-23-9h-192q-14 0-23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23-9t9-23zm256-672q0-88-55.5-163t-138.5-116-170-41q-243 0-371 213-15 24 8 42l132 100q7 6 19 6 16 0 25-12 53-68 86-92 34-24 86-24 48 0 85.5 26t37.5 59q0 38-20 61t-68 45q-63 28-115.5 86.5t-52.5 125.5v36q0 14 9 23t23 9h192q14 0 23-9t9-23q0-19 21.5-49.5t54.5-49.5q32-18 49-28.5t46-35 44.5-48 28-60.5 12.5-81zm384 192q0 209-103 385.5t-279.5 279.5-385.5 103-385.5-103-279.5-279.5-103-385.5 103-385.5 279.5-279.5 385.5-103 385.5 103 279.5 279.5 103 385.5z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 655 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="13" height="13" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill="#666666" d="M1024 1376v-192q0-14-9-23t-23-9h-192q-14 0-23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23-9t9-23zm256-672q0-88-55.5-163t-138.5-116-170-41q-243 0-371 213-15 24 8 42l132 100q7 6 19 6 16 0 25-12 53-68 86-92 34-24 86-24 48 0 85.5 26t37.5 59q0 38-20 61t-68 45q-63 28-115.5 86.5t-52.5 125.5v36q0 14 9 23t23 9h192q14 0 23-9t9-23q0-19 21.5-49.5t54.5-49.5q32-18 49-28.5t46-35 44.5-48 28-60.5 12.5-81zm384 192q0 209-103 385.5t-279.5 279.5-385.5 103-385.5-103-279.5-279.5-103-385.5 103-385.5 279.5-279.5 385.5-103 385.5 103 279.5 279.5 103 385.5z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 655 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="13" height="13" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill="#2b70bf" d="M1664 960q-152-236-381-353 61 104 61 225 0 185-131.5 316.5t-316.5 131.5-316.5-131.5-131.5-316.5q0-121 61-225-229 117-381 353 133 205 333.5 326.5t434.5 121.5 434.5-121.5 333.5-326.5zm-720-384q0-20-14-34t-34-14q-125 0-214.5 89.5t-89.5 214.5q0 20 14 34t34 14 34-14 14-34q0-86 61-147t147-61q20 0 34-14t14-34zm848 384q0 34-20 69-140 230-376.5 368.5t-499.5 138.5-499.5-139-376.5-368q-20-35-20-69t20-69q140-229 376.5-368t499.5-139 499.5 139 376.5 368q20 35 20 69z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 581 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="13" height="13" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill="#70bf2b" d="M1412 734q0-28-18-46l-91-90q-19-19-45-19t-45 19l-408 407-226-226q-19-19-45-19t-45 19l-91 90q-18 18-18 46 0 27 18 45l362 362q19 19 45 19 27 0 46-19l543-543q18-18 18-45zm252 162q0 209-103 385.5t-279.5 279.5-385.5 103-385.5-103-279.5-279.5-103-385.5 103-385.5 279.5-279.5 385.5-103 385.5 103 279.5 279.5 103 385.5z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 436 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill="#999999" d="M1277 1122q0-26-19-45l-181-181 181-181q19-19 19-45 0-27-19-46l-90-90q-19-19-46-19-26 0-45 19l-181 181-181-181q-19-19-45-19-27 0-46 19l-90 90q-19 19-19 46 0 26 19 45l181 181-181 181q-19 19-19 45 0 27 19 46l90 90q19 19 46 19 26 0 45-19l181-181 181 181q19 19 45 19 27 0 46-19l90-90q19-19 19-46zm387-226q0 209-103 385.5t-279.5 279.5-385.5 103-385.5-103-279.5-279.5-103-385.5 103-385.5 279.5-279.5 385.5-103 385.5 103 279.5 279.5 103 385.5z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 560 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="15" height="15" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill="#555555" d="M1216 832q0-185-131.5-316.5t-316.5-131.5-316.5 131.5-131.5 316.5 131.5 316.5 316.5 131.5 316.5-131.5 131.5-316.5zm512 832q0 52-38 90t-90 38q-54 0-90-38l-343-342q-179 124-399 124-143 0-273.5-55.5t-225-150-150-225-55.5-273.5 55.5-273.5 150-225 225-150 273.5-55.5 273.5 55.5 225 150 150 225 55.5 273.5q0 220-124 399l343 343q37 37 37 90z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 458 B |
@@ -0,0 +1,34 @@
|
||||
<svg width="16" height="192" viewBox="0 0 1792 21504" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<defs>
|
||||
<g id="up">
|
||||
<path d="M1412 895q0-27-18-45l-362-362-91-91q-18-18-45-18t-45 18l-91 91-362 362q-18 18-18 45t18 45l91 91q18 18 45 18t45-18l189-189v502q0 26 19 45t45 19h128q26 0 45-19t19-45v-502l189 189q19 19 45 19t45-19l91-91q18-18 18-45zm252 1q0 209-103 385.5t-279.5 279.5-385.5 103-385.5-103-279.5-279.5-103-385.5 103-385.5 279.5-279.5 385.5-103 385.5 103 279.5 279.5 103 385.5z"/>
|
||||
</g>
|
||||
<g id="down">
|
||||
<path d="M1412 897q0-27-18-45l-91-91q-18-18-45-18t-45 18l-189 189v-502q0-26-19-45t-45-19h-128q-26 0-45 19t-19 45v502l-189-189q-19-19-45-19t-45 19l-91 91q-18 18-18 45t18 45l362 362 91 91q18 18 45 18t45-18l91-91 362-362q18-18 18-45zm252-1q0 209-103 385.5t-279.5 279.5-385.5 103-385.5-103-279.5-279.5-103-385.5 103-385.5 279.5-279.5 385.5-103 385.5 103 279.5 279.5 103 385.5z"/>
|
||||
</g>
|
||||
<g id="left">
|
||||
<path d="M1408 960v-128q0-26-19-45t-45-19h-502l189-189q19-19 19-45t-19-45l-91-91q-18-18-45-18t-45 18l-362 362-91 91q-18 18-18 45t18 45l91 91 362 362q18 18 45 18t45-18l91-91q18-18 18-45t-18-45l-189-189h502q26 0 45-19t19-45zm256-64q0 209-103 385.5t-279.5 279.5-385.5 103-385.5-103-279.5-279.5-103-385.5 103-385.5 279.5-279.5 385.5-103 385.5 103 279.5 279.5 103 385.5z"/>
|
||||
</g>
|
||||
<g id="right">
|
||||
<path d="M1413 896q0-27-18-45l-91-91-362-362q-18-18-45-18t-45 18l-91 91q-18 18-18 45t18 45l189 189h-502q-26 0-45 19t-19 45v128q0 26 19 45t45 19h502l-189 189q-19 19-19 45t19 45l91 91q18 18 45 18t45-18l362-362 91-91q18-18 18-45zm251 0q0 209-103 385.5t-279.5 279.5-385.5 103-385.5-103-279.5-279.5-103-385.5 103-385.5 279.5-279.5 385.5-103 385.5 103 279.5 279.5 103 385.5z"/>
|
||||
</g>
|
||||
<g id="clearall">
|
||||
<path transform="translate(336, 336) scale(0.75)" d="M1037 1395l102-102q19-19 19-45t-19-45l-307-307 307-307q19-19 19-45t-19-45l-102-102q-19-19-45-19t-45 19l-454 454q-19 19-19 45t19 45l454 454q19 19 45 19t45-19zm627-499q0 209-103 385.5t-279.5 279.5-385.5 103-385.5-103-279.5-279.5-103-385.5 103-385.5 279.5-279.5 385.5-103 385.5 103 279.5 279.5 103 385.5z"/>
|
||||
</g>
|
||||
<g id="chooseall">
|
||||
<path transform="translate(336, 336) scale(0.75)" d="M845 1395l454-454q19-19 19-45t-19-45l-454-454q-19-19-45-19t-45 19l-102 102q-19 19-19 45t19 45l307 307-307 307q-19 19-19 45t19 45l102 102q19 19 45 19t45-19zm819-499q0 209-103 385.5t-279.5 279.5-385.5 103-385.5-103-279.5-279.5-103-385.5 103-385.5 279.5-279.5 385.5-103 385.5 103 279.5 279.5 103 385.5z"/>
|
||||
</g>
|
||||
</defs>
|
||||
<use xlink:href="#up" x="0" y="0" fill="#666666" />
|
||||
<use xlink:href="#up" x="0" y="1792" fill="#447e9b" />
|
||||
<use xlink:href="#down" x="0" y="3584" fill="#666666" />
|
||||
<use xlink:href="#down" x="0" y="5376" fill="#447e9b" />
|
||||
<use xlink:href="#left" x="0" y="7168" fill="#666666" />
|
||||
<use xlink:href="#left" x="0" y="8960" fill="#447e9b" />
|
||||
<use xlink:href="#right" x="0" y="10752" fill="#666666" />
|
||||
<use xlink:href="#right" x="0" y="12544" fill="#447e9b" />
|
||||
<use xlink:href="#clearall" x="0" y="14336" fill="#666666" />
|
||||
<use xlink:href="#clearall" x="0" y="16128" fill="#447e9b" />
|
||||
<use xlink:href="#chooseall" x="0" y="17920" fill="#666666" />
|
||||
<use xlink:href="#chooseall" x="0" y="19712" fill="#447e9b" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.2 KiB |
@@ -0,0 +1,19 @@
|
||||
<svg width="14" height="84" viewBox="0 0 1792 10752" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<defs>
|
||||
<g id="sort">
|
||||
<path d="M1408 1088q0 26-19 45l-448 448q-19 19-45 19t-45-19l-448-448q-19-19-19-45t19-45 45-19h896q26 0 45 19t19 45zm0-384q0 26-19 45t-45 19h-896q-26 0-45-19t-19-45 19-45l448-448q19-19 45-19t45 19l448 448q19 19 19 45z"/>
|
||||
</g>
|
||||
<g id="ascending">
|
||||
<path d="M1408 1216q0 26-19 45t-45 19h-896q-26 0-45-19t-19-45 19-45l448-448q19-19 45-19t45 19l448 448q19 19 19 45z"/>
|
||||
</g>
|
||||
<g id="descending">
|
||||
<path d="M1408 704q0 26-19 45l-448 448q-19 19-45 19t-45-19l-448-448q-19-19-19-45t19-45 45-19h896q26 0 45 19t19 45z"/>
|
||||
</g>
|
||||
</defs>
|
||||
<use xlink:href="#sort" x="0" y="0" fill="#999999" />
|
||||
<use xlink:href="#sort" x="0" y="1792" fill="#447e9b" />
|
||||
<use xlink:href="#ascending" x="0" y="3584" fill="#999999" />
|
||||
<use xlink:href="#ascending" x="0" y="5376" fill="#447e9b" />
|
||||
<use xlink:href="#descending" x="0" y="7168" fill="#999999" />
|
||||
<use xlink:href="#descending" x="0" y="8960" fill="#447e9b" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,3 @@
|
||||
<svg width="13" height="13" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill="#ffffff" d="M1600 736v192q0 40-28 68t-68 28h-416v416q0 40-28 68t-68 28h-192q-40 0-68-28t-28-68v-416h-416q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h416v-416q0-40 28-68t68-28h192q40 0 68 28t28 68v416h416q40 0 68 28t28 68z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 331 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="13" height="13" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill="#ffffff" d="M1363 877l-742 742q-19 19-45 19t-45-19l-166-166q-19-19-19-45t19-45l531-531-531-531q-19-19-19-45t19-45l166-166q19-19 45-19t45 19l742 742q19 19 19 45t-19 45z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 280 B |
@@ -0,0 +1,116 @@
|
||||
'use strict';
|
||||
{
|
||||
const SelectBox = {
|
||||
cache: {},
|
||||
init: function(id) {
|
||||
const box = document.getElementById(id);
|
||||
SelectBox.cache[id] = [];
|
||||
const cache = SelectBox.cache[id];
|
||||
for (const node of box.options) {
|
||||
cache.push({value: node.value, text: node.text, displayed: 1});
|
||||
}
|
||||
},
|
||||
redisplay: function(id) {
|
||||
// Repopulate HTML select box from cache
|
||||
const box = document.getElementById(id);
|
||||
const scroll_value_from_top = box.scrollTop;
|
||||
box.innerHTML = '';
|
||||
for (const node of SelectBox.cache[id]) {
|
||||
if (node.displayed) {
|
||||
const new_option = new Option(node.text, node.value, false, false);
|
||||
// Shows a tooltip when hovering over the option
|
||||
new_option.title = node.text;
|
||||
box.appendChild(new_option);
|
||||
}
|
||||
}
|
||||
box.scrollTop = scroll_value_from_top;
|
||||
},
|
||||
filter: function(id, text) {
|
||||
// Redisplay the HTML select box, displaying only the choices containing ALL
|
||||
// the words in text. (It's an AND search.)
|
||||
const tokens = text.toLowerCase().split(/\s+/);
|
||||
for (const node of SelectBox.cache[id]) {
|
||||
node.displayed = 1;
|
||||
const node_text = node.text.toLowerCase();
|
||||
for (const token of tokens) {
|
||||
if (!node_text.includes(token)) {
|
||||
node.displayed = 0;
|
||||
break; // Once the first token isn't found we're done
|
||||
}
|
||||
}
|
||||
}
|
||||
SelectBox.redisplay(id);
|
||||
},
|
||||
get_hidden_node_count(id) {
|
||||
const cache = SelectBox.cache[id] || [];
|
||||
return cache.filter(node => node.displayed === 0).length;
|
||||
},
|
||||
delete_from_cache: function(id, value) {
|
||||
let delete_index = null;
|
||||
const cache = SelectBox.cache[id];
|
||||
for (const [i, node] of cache.entries()) {
|
||||
if (node.value === value) {
|
||||
delete_index = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
cache.splice(delete_index, 1);
|
||||
},
|
||||
add_to_cache: function(id, option) {
|
||||
SelectBox.cache[id].push({value: option.value, text: option.text, displayed: 1});
|
||||
},
|
||||
cache_contains: function(id, value) {
|
||||
// Check if an item is contained in the cache
|
||||
for (const node of SelectBox.cache[id]) {
|
||||
if (node.value === value) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
move: function(from, to) {
|
||||
const from_box = document.getElementById(from);
|
||||
for (const option of from_box.options) {
|
||||
const option_value = option.value;
|
||||
if (option.selected && SelectBox.cache_contains(from, option_value)) {
|
||||
SelectBox.add_to_cache(to, {value: option_value, text: option.text, displayed: 1});
|
||||
SelectBox.delete_from_cache(from, option_value);
|
||||
}
|
||||
}
|
||||
SelectBox.redisplay(from);
|
||||
SelectBox.redisplay(to);
|
||||
},
|
||||
move_all: function(from, to) {
|
||||
const from_box = document.getElementById(from);
|
||||
for (const option of from_box.options) {
|
||||
const option_value = option.value;
|
||||
if (SelectBox.cache_contains(from, option_value)) {
|
||||
SelectBox.add_to_cache(to, {value: option_value, text: option.text, displayed: 1});
|
||||
SelectBox.delete_from_cache(from, option_value);
|
||||
}
|
||||
}
|
||||
SelectBox.redisplay(from);
|
||||
SelectBox.redisplay(to);
|
||||
},
|
||||
sort: function(id) {
|
||||
SelectBox.cache[id].sort(function(a, b) {
|
||||
a = a.text.toLowerCase();
|
||||
b = b.text.toLowerCase();
|
||||
if (a > b) {
|
||||
return 1;
|
||||
}
|
||||
if (a < b) {
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
} );
|
||||
},
|
||||
select_all: function(id) {
|
||||
const box = document.getElementById(id);
|
||||
for (const option of box.options) {
|
||||
option.selected = true;
|
||||
}
|
||||
}
|
||||
};
|
||||
window.SelectBox = SelectBox;
|
||||
}
|
||||