diff --git a/.gitignore b/.gitignore index b639e23..d9668fb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ -__pycache__ -db.sqlite3 -idre/local_settings.py -media/ \ No newline at end of file +__pycache__/ +idre/settings_local.py +media/ + +.idea/ +.vscode/ +*.code-workspace diff --git a/Pipfile b/Pipfile new file mode 100644 index 0000000..62c9a7b --- /dev/null +++ b/Pipfile @@ -0,0 +1,14 @@ +[[source]] +name = "pypi" +url = "https://pypi.python.org/simple" +verify_ssl = true + +[packages] +django = "==1.11" +"psycopg2" = "==2.7.1" +django-cleanup = ">=1.0.1" +markdown = "*" +pillow = "*" + +[dev-packages] +pylint = "*" diff --git a/Pipfile.lock b/Pipfile.lock new file mode 100644 index 0000000..af85465 --- /dev/null +++ b/Pipfile.lock @@ -0,0 +1,221 @@ +{ + "_meta": { + "hash": { + "sha256": "86fe4bb52290c44f233f6e3c0460e5cf0427a533b682a12e0b2de505cc28acf1" + }, + "host-environment-markers": { + "implementation_name": "cpython", + "implementation_version": "3.5.3", + "os_name": "posix", + "platform_machine": "x86_64", + "platform_python_implementation": "CPython", + "platform_release": "4.9.0-6-amd64", + "platform_system": "Linux", + "platform_version": "#1 SMP Debian 4.9.82-1+deb9u3 (2018-03-02)", + "python_full_version": "3.5.3", + "python_version": "3.5", + "sys_platform": "linux" + }, + "pipfile-spec": 6, + "requires": {}, + "sources": [ + { + "name": "pypi", + "url": "https://pypi.python.org/simple", + "verify_ssl": true + } + ] + }, + "default": { + "django": { + "hashes": [ + "sha256:0120b3b60760fb0617848b58aaa9702c0bf963320ed472f0879c5c55ab75b64a", + "sha256:b6f3b864944276b4fd1d099952112696558f78b77b39188ac92b6c5e80152c30" + ], + "version": "==1.11" + }, + "django-cleanup": { + "hashes": [ + "sha256:36f04ec3901e6d9fd996b99b383c2367c0b880c77e6699142b51ca64cb659e54", + "sha256:0e91783200d75f21a64cb5f9d9dbc1bedd377a7d8de97a55ec8a0e2e28abaf5d" + ], + "version": "==2.1.0" + }, + "markdown": { + "hashes": [ + "sha256:9ba587db9daee7ec761cfc656272be6aabe2ed300fece21208e4aab2e457bc8f", + "sha256:a856869c7ff079ad84a3e19cd87a64998350c2b94e9e08e44270faef33400f81" + ], + "version": "==2.6.11" + }, + "pillow": { + "hashes": [ + "sha256:f0d4433adce6075efd24fc0285135248b0b50f5a58129c7e552030e04fe45c7f", + "sha256:81762cf5fca9a82b53b7b2d0e6b420e0f3b06167b97678c81d00470daa622d58", + "sha256:b48401752496757e95304a46213c3155bc911ac884bed2e9b275ce1c1df3e293", + "sha256:040144ba422216aecf7577484865ade90e1a475f867301c48bf9fbd7579efd76", + "sha256:b6cf18f9e653a8077522bb3aa753a776b117e3e0cc872c25811cfdf1459491c2", + "sha256:4d32c8e3623a61d6e29ccd024066cd1ba556555abfb4cd714155020e00107e3f", + "sha256:438a3faf5f702c8d0f80b9f9f9b8382cfa048ca6a0d64ef71b86b563b0ee0359", + "sha256:1cb38df69362af35c14d4a50123b63c7ff18ec9a6d4d5da629a6f19d05e16ba8", + "sha256:4d8077fd649ac40a5c4165f2c22fa2a4ad18c668e271ecb2f9d849d1017a9313", + "sha256:bb8adab1877e9213385cbb1adc297ed8337e01872c42a30cfaa66ff8c422779c", + "sha256:f1f3bd92f8e12dc22884935a73c9f94c4d9bd0d34410c456540713d6b7832b8c", + "sha256:6eca36905444c4b91fe61f1b9933a47a30480738a1dd26501ff67d94fc2bc112", + "sha256:f7634d534662bbb08976db801ba27a112aee23e597eeaf09267b4575341e45bf", + "sha256:eeb247f4f4d962942b3b555530b0c63b77473c7bfe475e51c6b75b7344b49ce3", + "sha256:ea0091cd4100519cedfeea2c659f52291f535ac6725e2368bcf59e874f270efa", + "sha256:e87cc1acbebf263f308a8494272c2d42016aa33c32bf14d209c81e1f65e11868", + "sha256:3b4560c3891b05022c464b09121bd507c477505a4e19d703e1027a3a7c68d896", + "sha256:7673e7473a13107059377c96c563aa36f73184c29d2926882e0a0210b779a1e7", + "sha256:fe6931db24716a0845bd8c8915bd096b77c2a7043e6fc59ae9ca364fe816f08b", + "sha256:f5f302db65e2e0ae96e26670818157640d3ca83a3054c290eff3631598dcf819", + "sha256:9b66e968da9c4393f5795285528bc862c7b97b91251f31a08004a3c626d18114", + "sha256:62ec7ae98357fcd46002c110bb7cad15fce532776f0cbe7ca1d44c49b837d49d", + "sha256:d0dc1313dff48af64517cbbd85e046d6b477fbe5e9d69712801f024dcb08c62b", + "sha256:00633bc2ec40313f4daf351855e506d296ec3c553f21b66720d0f1225ca84c6f", + "sha256:16246261ff22368e5e32ad74d5ef40403ab6895171a7fc6d34f6c17cfc0f1943", + "sha256:e52e8f675ba0b2b417fa98579e7286a41a8e23871f17f4793772f5aa884fea79", + "sha256:6c7cab6a05351cf61e469937c49dbf3cdf5ffb3eeac71f8d22dc9be3507598d8", + "sha256:e39142332541ed2884c257495504858b22c078a5d781059b07aba4c3a80d7551", + "sha256:8554bbeb4218d9cfb1917c69e6f2d2ad0be9b18a775d2162547edf992e1f5f1f", + "sha256:2400e122f7b21d9801798207e424cbe1f716cee7314cd0c8963fdb6fc564b5fb", + "sha256:a00edb2dec0035e98ac3ec768086f0b06dfabb4ad308592ede364ef573692f55", + "sha256:fdd374c02e8bb2d6468a85be50ea66e1c4ef9e809974c30d8576728473a6ed03", + "sha256:df5863a21f91de5ecdf7d32a32f406dd9867ebb35d41033b8bd9607a21887599", + "sha256:472a124c640bde4d5468f6991c9fa7e30b723d84ac4195a77c6ab6aea30f2b9c", + "sha256:cee9bc75bff455d317b6947081df0824a8f118de2786dc3d74a3503fd631f4ef", + "sha256:2ee6364b270b56a49e8b8a51488e847ab130adc1220c171bed6818c0d4742455", + "sha256:03514478db61b034fc5d38b9bf060f994e5916776e93f02e59732a8270069c61", + "sha256:74e2ebfd19c16c28ad43b8a28ff73b904ed382ea4875188838541751986e8c9a", + "sha256:e6dd55d5d94b9e36929325dd0c9ab85bfde84a5fc35947c334c32af1af668944", + "sha256:f42a87cbf50e905f49f053c0b1fb86c911c730624022bf44c8857244fc4cdaca", + "sha256:d5bf527ed83617edd1855a5c923eeeaf68bcb9ac0ceb28e3f19b575b3a424984", + "sha256:41374a6afb3f44794410dab54a0d7175e6209a5a02d407119c81083f1a4c1841", + "sha256:c8a4b39ba380b57a31a4b5449a9d257b1302d8bc4799767e645dcee25725efe1" + ], + "version": "==5.1.0" + }, + "psycopg2": { + "hashes": [ + "sha256:f4cc27830081147ebca6eb729329c64b7f8e92e415733aa26705dd9f03303038", + "sha256:34b7e41d1747b26df3baf5397949cc938261c547f3bce208ffc7826c3897d5ac", + "sha256:2a9c4bc78922be9d34a11fc38b75bef122d44f465eaf5f2a44021f7cbda3dfd6", + "sha256:9f9de8b5e1b0b648bf4535b721a58eaccf92f747cd8d94380171a36f18553601", + "sha256:0c68fb507415ce022402244cffe740018c9506367fe2d6323f0b47e2544b6b36", + "sha256:0147e990cef0332e239de711f165b2a5e6feb7c5f8583985d4a3dcac1680a782", + "sha256:f1f6d1b0ab40e8d43e294c7a1cc6fe6d47a88225583e581c15e8bfcff04b3863", + "sha256:18c2294c2a0a0df6bb5adfbcae50922b0e75909df8642c9286bf6b867866d181", + "sha256:bf48be2d01f6e34e5fbd8976f7b66158a83a33b92739acd13fc1934c60b71cfb", + "sha256:d2e98ff1546c632c29f740a938ba6e29d327ef55f3e816dd43c1e4e7d8cd369a", + "sha256:4004e84c2846badfa1e14ba3cf5b9d7471071c872c1dd6290013c89fa2cc63b1", + "sha256:26551d8873130b9558628c5f0288bd07b00c3f82f7dbfe0acf3cd7cd45746672", + "sha256:304304e8efce4077621f9a14cb7e53cdacb4a14ec92f5628204bc4254d4840fb", + "sha256:6b26f9ec7a0c5ca1b3528918caeb3c73bfceaced3fdea59d045c886cc2c43344", + "sha256:a14bd664f4db452612688e8031fdf74da489cb042d78d49f2bbfcfa97aae135d", + "sha256:ad0e145952e2e91aa1d80c4b9bd8ba9059f39b3538da7b1133b2ed84eb132ed3", + "sha256:905764e8d1557e536c9fac35d412a21ad87b558e794104437bf4012a83438ed2", + "sha256:f04d56f664108af9571d278c0ed942ecef0dd3e072fe21ac8c7497a51bfcdfba", + "sha256:3a11a757e61e3eb5dfa334cf0ce86f9fa1919efadbb98af833eaf3bcb90d7e58", + "sha256:ccd55766033411206d700bcd11e064081f784f256c4d4f6883dca4c3bde21ae2", + "sha256:38ff8f65deb947a7499f24ceb5b40db24540027fdf7d927f4d2aab35fbbdd6b0", + "sha256:3f64897312a08928e71343fedc2a3812a1c46f03025fe327e5d41e0a7be53ee9", + "sha256:9c9fe11f87c44e83620b2273f40338e3c25fdbfd34986dddc77e840e0acd25bc", + "sha256:32184c60b445ac9eb4a0058d54f7a5dddae6928f94dfa3683157dc5e70321212", + "sha256:b4f24faa25232073092d246fc6118c29130c8a5bcc8fd4239edeba20fb12b24a", + "sha256:74ee532d6068a1456d5eda254513656c716cdee0a7389c91c094c7ce3500a9c9", + "sha256:ba6f4786262b4999f9cca420827469c88a79e1f65dabf6bb8a300518f7e11472", + "sha256:4cae3856e9b41a4861ad32fd8a4aabc7669a0b828776bb3ce0ca29333dabf40c", + "sha256:8f57535a377c23a78d5a8bbe929ec6977adb3e137fa42500436c784c60141613", + "sha256:911af115bb526b3a5d2f50e05096afc05e3867f55f24532b4a70811e63deab57", + "sha256:86c9355f5374b008c8479bc00023b295c07d508f7c3b91dbd2e74f8925b1d9c6" + ], + "version": "==2.7.1" + }, + "pytz": { + "hashes": [ + "sha256:65ae0c8101309c45772196b21b74c46b2e5d11b6275c45d251b150d5da334555", + "sha256:c06425302f2cf668f1bba7a0a03f3c1d34d4ebeef2c72003da308b3947c7f749" + ], + "version": "==2018.4" + } + }, + "develop": { + "astroid": { + "hashes": [ + "sha256:38186e481b65877fd8b1f9acc33e922109e983eb7b6e487bd4c71002134ad331", + "sha256:35cfae47aac19c7b407b7095410e895e836f2285ccf1220336afba744cc4c5f2" + ], + "version": "==1.6.3" + }, + "isort": { + "hashes": [ + "sha256:ec9ef8f4a9bc6f71eec99e1806bfa2de401650d996c59330782b89a5555c1497", + "sha256:1153601da39a25b14ddc54955dbbacbb6b2d19135386699e2ad58517953b34af", + "sha256:b9c40e9750f3d77e6e4d441d8b0266cf555e7cdabdcff33c4fd06366ca761ef8" + ], + "version": "==4.3.4" + }, + "lazy-object-proxy": { + "hashes": [ + "sha256:209615b0fe4624d79e50220ce3310ca1a9445fd8e6d3572a896e7f9146bbf019", + "sha256:1b668120716eb7ee21d8a38815e5eb3bb8211117d9a90b0f8e21722c0758cc39", + "sha256:cb924aa3e4a3fb644d0c463cad5bc2572649a6a3f68a7f8e4fbe44aaa6d77e4c", + "sha256:2c1b21b44ac9beb0fc848d3993924147ba45c4ebc24be19825e57aabbe74a99e", + "sha256:320ffd3de9699d3892048baee45ebfbbf9388a7d65d832d7e580243ade426d2b", + "sha256:2df72ab12046a3496a92476020a1a0abf78b2a7db9ff4dc2036b8dd980203ae6", + "sha256:27ea6fd1c02dcc78172a82fc37fcc0992a94e4cecf53cb6d73f11749825bd98b", + "sha256:e5b9e8f6bda48460b7b143c3821b21b452cb3a835e6bbd5dd33aa0c8d3f5137d", + "sha256:7661d401d60d8bf15bb5da39e4dd72f5d764c5aff5a86ef52a042506e3e970ff", + "sha256:61a6cf00dcb1a7f0c773ed4acc509cb636af2d6337a08f362413c76b2b47a8dd", + "sha256:bd6292f565ca46dee4e737ebcc20742e3b5be2b01556dafe169f6c65d088875f", + "sha256:933947e8b4fbe617a51528b09851685138b49d511af0b6c0da2539115d6d4514", + "sha256:d0fc7a286feac9077ec52a927fc9fe8fe2fabab95426722be4c953c9a8bede92", + "sha256:7f3a2d740291f7f2c111d86a1c4851b70fb000a6c8883a59660d95ad57b9df35", + "sha256:5276db7ff62bb7b52f77f1f51ed58850e315154249aceb42e7f4c611f0f847ff", + "sha256:94223d7f060301b3a8c09c9b3bc3294b56b2188e7d8179c762a1cda72c979252", + "sha256:6ae6c4cb59f199d8827c5a07546b2ab7e85d262acaccaacd49b62f53f7c456f7", + "sha256:f460d1ceb0e4a5dcb2a652db0904224f367c9b3c1470d5a7683c0480e582468b", + "sha256:e81ebf6c5ee9684be8f2c87563880f93eedd56dd2b6146d8a725b50b7e5adb0f", + "sha256:81304b7d8e9c824d058087dcb89144842c8e0dea6d281c031f59f0acf66963d4", + "sha256:ddc34786490a6e4ec0a855d401034cbd1242ef186c20d79d2166d6a4bd449577", + "sha256:7bd527f36a605c914efca5d3d014170b2cb184723e423d26b1fb2fd9108e264d", + "sha256:ab3ca49afcb47058393b0122428358d2fbe0408cf99f1b58b295cfeb4ed39109", + "sha256:7cb54db3535c8686ea12e9535eb087d32421184eacc6939ef15ef50f83a5e7e2", + "sha256:0ce34342b419bd8f018e6666bfef729aec3edf62345a53b537a4dcc115746a33", + "sha256:e34b155e36fa9da7e1b7c738ed7767fc9491a62ec6af70fe9da4a057759edc2d", + "sha256:50e3b9a464d5d08cc5227413db0d1c4707b6172e4d4d915c1c70e4de0bbff1f5", + "sha256:27bf62cb2b1a2068d443ff7097ee33393f8483b570b475db8ebf7e1cba64f088", + "sha256:eb91be369f945f10d3a49f5f9be8b3d0b93a4c2be8f8a5b83b0571b8123e0a7a" + ], + "version": "==1.3.1" + }, + "mccabe": { + "hashes": [ + "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42", + "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f" + ], + "version": "==0.6.1" + }, + "pylint": { + "hashes": [ + "sha256:0b7e6b5d9f1d4e0b554b5d948f14ed7969e8cdf9a0120853e6e5af60813b18ab", + "sha256:34738a82ab33cbd3bb6cd4cef823dbcabdd2b6b48a4e3a3054a2bbbf0c712be9" + ], + "version": "==1.8.4" + }, + "six": { + "hashes": [ + "sha256:832dc0e10feb1aa2c68dcc57dbb658f1c7e65b9b61af69048abc87a2db00a0eb", + "sha256:70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9" + ], + "version": "==1.11.0" + }, + "wrapt": { + "hashes": [ + "sha256:d4d560d479f2c21e1b5443bbd15fe7ec4b37fe7e53d335d3b9b0a7b1226fe3c6" + ], + "version": "==1.10.11" + } + } +} diff --git a/idre/settings.py b/idre/settings.py index 032c4ac..c26a070 100644 --- a/idre/settings.py +++ b/idre/settings.py @@ -1,56 +1,62 @@ -""" Django settings for idre project. """ +""" Django settings for Idre project. """ import os -import idre.local_settings - # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(__file__)) -SECRET_KEY = idre.local_settings.SECRET_KEY -DEBUG = idre.local_settings.DEBUG +DEBUG = False -ALLOWED_HOSTS = ["idre.shgck.io", "idre.xyz"] +SECRET_KEY = '' -ADMINS = ( ("Shgck", "shgck@pistache.land"), ) +ALLOWED_HOSTS = ['idre.xyz'] + +ADMINS = ( ('Shgck', 'shgck@pistache.land'), ) # Application definition INSTALLED_APPS = ( - "django.contrib.admin", - "django.contrib.auth", - "django.contrib.contenttypes", - "django.contrib.sessions", - "django.contrib.messages", - "django.contrib.staticfiles", - "label", - "news" + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + + 'django_cleanup', + + 'label', + 'news' ) MIDDLEWARE_CLASSES = ( - "django.contrib.sessions.middleware.SessionMiddleware", - "django.middleware.common.CommonMiddleware", - "django.middleware.csrf.CsrfViewMiddleware", - "django.contrib.auth.middleware.AuthenticationMiddleware", - "django.contrib.auth.middleware.SessionAuthenticationMiddleware", - "django.contrib.messages.middleware.MessageMiddleware", - "django.middleware.clickjacking.XFrameOptionsMiddleware" + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware' ) -ROOT_URLCONF = "idre.urls" +ROOT_URLCONF = 'idre.urls' -WSGI_APPLICATION = "idre.wsgi.application" +WSGI_APPLICATION = 'idre.wsgi.application' # Database # https://docs.djangoproject.com/en/1.7/ref/settings/#databases DATABASES = { - "default": { - "ENGINE": "django.db.backends.sqlite3", - "NAME": os.path.join(BASE_DIR, "db.sqlite3"), + 'default': { + 'ENGINE': 'django.db.backends.postgresql_psycopg2', + 'NAME': 'idre', + 'HOST': '', + 'PORT': '5432', + 'USER': '', + 'PASSWORD': '', } } @@ -58,8 +64,8 @@ DATABASES = { # Internationalization # https://docs.djangoproject.com/en/1.7/topics/i18n/ -LANGUAGE_CODE = "fr-FR" -TIME_ZONE = "Europe/Paris" +LANGUAGE_CODE = 'en-UK' +TIME_ZONE = 'Europe/Paris' USE_I18N = True USE_L10N = True USE_TZ = True @@ -68,25 +74,26 @@ USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/1.6/howto/static-files/ -MEDIA_ROOT = os.path.join(BASE_DIR, "media") -MEDIA_URL = "/media/" +MEDIA_ROOT = os.path.join(BASE_DIR, 'media') +MEDIA_URL = '/media/' -STATICFILES_DIRS = ( os.path.join(BASE_DIR, "static"), ) -STATIC_URL = "/static/" +STATIC_ROOT = os.path.join(BASE_DIR, 'static') +STATIC_URL = '/static/' +STATICFILES_DIRS = (os.path.join(BASE_DIR, 'idre', 'static'),) TEMPLATES = [{ - "APP_DIRS": True, - "BACKEND": "django.template.backends.django.DjangoTemplates", - "DIRS": [ os.path.join(BASE_DIR, "templates") ], - "OPTIONS": { - "context_processors": [ - "django.contrib.auth.context_processors.auth", - "django.template.context_processors.debug", - "django.template.context_processors.i18n", - "django.template.context_processors.media", - "django.template.context_processors.static", - "django.template.context_processors.tz", - "django.contrib.messages.context_processors.messages" + 'APP_DIRS': True, + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [ os.path.join(BASE_DIR, 'templates') ], + 'OPTIONS': { + 'context_processors': [ + 'django.contrib.auth.context_processors.auth', + 'django.template.context_processors.debug', + 'django.template.context_processors.i18n', + 'django.template.context_processors.media', + 'django.template.context_processors.static', + 'django.template.context_processors.tz', + 'django.contrib.messages.context_processors.messages' ] } }] diff --git a/idre/settings_dev.py b/idre/settings_dev.py new file mode 100644 index 0000000..175946b --- /dev/null +++ b/idre/settings_dev.py @@ -0,0 +1,8 @@ +from .settings import * # pylint: disable=unused-wildcard-import + + +DEBUG = True + +SECRET_KEY = 'dev' + +ALLOWED_HOSTS = ['*'] diff --git a/static/admin/css/base.css b/idre/static/admin/css/base.css similarity index 50% rename from static/admin/css/base.css rename to idre/static/admin/css/base.css index 995183e..b2a40c4 100644 --- a/static/admin/css/base.css +++ b/idre/static/admin/css/base.css @@ -2,11 +2,13 @@ DJANGO Admin styles */ +@import url(fonts.css); + body { margin: 0; padding: 0; - font-size: 12px; - font-family: "Lucida Grande","DejaVu Sans","Bitstream Vera Sans",Verdana,Arial,sans-serif; + font-size: 14px; + font-family: "Roboto","Lucida Grande","DejaVu Sans","Bitstream Vera Sans",Verdana,Arial,sans-serif; color: #333; background: #fff; } @@ -14,14 +16,18 @@ body { /* LINKS */ a:link, a:visited { - color: #5b80b2; + color: #447e9b; text-decoration: none; } -a:hover { +a:focus, a:hover { color: #036; } +a:focus { + text-decoration: underline; +} + a img { border: none; } @@ -31,6 +37,10 @@ a.section:link, a.section:visited { text-decoration: none; } +a.section:focus, a.section:hover { + text-decoration: underline; +} + /* GLOBAL DEFAULTS */ p, ol, ul, dl { @@ -47,10 +57,10 @@ h1,h2,h3,h4,h5 { } h1 { - font-size: 18px; + margin: 0 0 20px; + font-weight: 300; + font-size: 20px; color: #666; - padding: 0 6px 0 0; - margin: 0 0 .2em 0; } h2 { @@ -89,21 +99,13 @@ ul li { padding: 1px 0; } -ul.plainlist { - margin-left: 0 !important; -} - -ul.plainlist li { - list-style-type: none; -} - li ul { margin-bottom: 0; } li, dt, dd { - font-size: 11px; - line-height: 14px; + font-size: 13px; + line-height: 20px; } dt { @@ -123,6 +125,8 @@ form { fieldset { margin: 0; padding: 0; + border: none; + border-top: 1px solid #eee; } blockquote { @@ -135,9 +139,8 @@ blockquote { code, pre { font-family: "Bitstream Vera Sans Mono", Monaco, "Courier New", Courier, monospace; - background: inherit; color: #666; - font-size: 11px; + font-size: 12px; } pre.literal-block { @@ -177,19 +180,23 @@ p.tiny { } .mini { - font-size: 9px; + font-size: 10px; } p.mini { margin-top: -3px; } -.help, p.help { - font-size: 10px !important; +.help, p.help, form p.help, div.help, form div.help, div.help li { + font-size: 11px; color: #999; } -img.help-tooltip { +div.help ul { + margin-bottom: 0; +} + +.help-tooltip { cursor: help; } @@ -198,12 +205,8 @@ p img, h1 img, h2 img, h3 img, h4 img, td img { } .quiet, a.quiet:link, a.quiet:visited { - color: #999 !important; - font-weight: normal !important; -} - -.quiet strong { - font-weight: bold !important; + color: #999; + font-weight: normal; } .float-right { @@ -244,55 +247,37 @@ table { } td, th { - font-size: 11px; - line-height: 13px; + font-size: 13px; + line-height: 16px; border-bottom: 1px solid #eee; vertical-align: top; - padding: 5px; - font-family: "Lucida Grande", Verdana, Arial, sans-serif; + padding: 8px; + font-family: "Roboto", "Lucida Grande", Verdana, Arial, sans-serif; } th { + font-weight: 600; text-align: left; - font-size: 12px; - font-weight: bold; } thead th, tfoot td { color: #666; - padding: 2px 5px; + padding: 5px 10px; font-size: 11px; - background: #e1e1e1 url(../img/nav-bg.gif) top left repeat-x; - border-left: 1px solid #ddd; - border-bottom: 1px solid #ddd; + background: #fff; + border: none; + border-top: 1px solid #eee; + border-bottom: 1px solid #eee; } tfoot td { border-bottom: none; - border-top: 1px solid #ddd; + border-top: 1px solid #eee; } -thead th:first-child, -tfoot td:first-child { - border-left: none !important; -} - -thead th.optional { - font-weight: normal !important; -} - -fieldset table { - border-right: 1px solid #eee; -} - -tr.row-label td { - font-size: 9px; - padding-top: 2px; - padding-bottom: 0; - border-bottom: none; - color: #666; - margin-top: -1px; +thead th.required { + color: #000; } tr.alt { @@ -300,18 +285,20 @@ tr.alt { } .row1 { - background: #EDF3FE; + background: #fff; } .row2 { - background: #fff; + background: #f9f9f9; } /* SORTABLE TABLES */ thead th { - padding: 2px 5px; + padding: 5px 10px; line-height: normal; + text-transform: uppercase; + background: #f6f6f6; } thead th a:link, thead th a:visited { @@ -319,7 +306,7 @@ thead th a:link, thead th a:visited { } thead th.sorted { - background: #c5c5c5 url(../img/nav-bg-selected.gif) top left repeat-x; + background: #eee; } thead th.sorted .text { @@ -327,18 +314,18 @@ thead th.sorted .text { } table thead th .text span { - padding: 2px 5px; - display:block; + padding: 8px 10px; + display: block; } table thead th .text a { display: block; cursor: pointer; - padding: 2px 5px; + padding: 8px 10px; } -table thead th.sortable:hover { - background: #fff url(../img/nav-bg-reverse.gif) 0 -5px repeat-x; +table thead th .text a:focus, table thead th .text a:hover { + background: #eee; } thead th.sorted a.sortremove { @@ -351,7 +338,7 @@ table thead th.sorted:hover a.sortremove { table thead th.sorted .sortoptions { display: block; - padding: 4px 5px 0 5px; + padding: 9px 5px 0 5px; float: right; text-align: right; } @@ -360,112 +347,144 @@ table thead th.sorted .sortpriority { font-size: .8em; min-width: 12px; text-align: center; - vertical-align: top; + vertical-align: 3px; + margin-left: 2px; + margin-right: 2px; } table thead th.sorted .sortoptions a { + position: relative; width: 14px; - height: 12px; + height: 14px; display: inline-block; + background: url(../img/sorting-icons.svg) 0 0 no-repeat; + background-size: 14px auto; } table thead th.sorted .sortoptions a.sortremove { - background: url(../img/sorting-icons.gif) -4px -5px no-repeat; + background-position: 0 0; } +table thead th.sorted .sortoptions a.sortremove:after { + content: '\\'; + position: absolute; + top: -6px; + left: 3px; + font-weight: 200; + font-size: 18px; + color: #999; +} + +table thead th.sorted .sortoptions a.sortremove:focus:after, +table thead th.sorted .sortoptions a.sortremove:hover:after { + color: #447e9b; +} + +table thead th.sorted .sortoptions a.sortremove:focus, table thead th.sorted .sortoptions a.sortremove:hover { - background: url(../img/sorting-icons.gif) -4px -27px no-repeat; + background-position: 0 -14px; } table thead th.sorted .sortoptions a.ascending { - background: url(../img/sorting-icons.gif) -5px -50px no-repeat; + background-position: 0 -28px; } +table thead th.sorted .sortoptions a.ascending:focus, table thead th.sorted .sortoptions a.ascending:hover { - background: url(../img/sorting-icons.gif) -5px -72px no-repeat; + background-position: 0 -42px; } table thead th.sorted .sortoptions a.descending { - background: url(../img/sorting-icons.gif) -5px -94px no-repeat; + top: 1px; + background-position: 0 -56px; } +table thead th.sorted .sortoptions a.descending:focus, table thead th.sorted .sortoptions a.descending:hover { - background: url(../img/sorting-icons.gif) -5px -115px no-repeat; -} - -/* ORDERABLE TABLES */ - -table.orderable tbody tr td:hover { - cursor: move; -} - -table.orderable tbody tr td:first-child { - padding-left: 14px; - background-image: url(../img/nav-bg-grabber.gif); - background-repeat: repeat-y; -} - -table.orderable-initalized .order-cell, body>tr>td.order-cell { - display: none; + background-position: 0 -70px; } /* FORM DEFAULTS */ -input, textarea, select, .form-row p { +input, textarea, select, .form-row p, form .button { margin: 2px 0; padding: 2px 3px; vertical-align: middle; - font-family: "Lucida Grande", Verdana, Arial, sans-serif; + font-family: "Roboto", "Lucida Grande", Verdana, Arial, sans-serif; font-weight: normal; - font-size: 11px; + font-size: 13px; +} +.form-row div.help { + padding: 2px 3px; } textarea { - vertical-align: top !important; + vertical-align: top; } -input[type=text], input[type=password], input[type=email], input[type=url], input[type=number], -textarea, select, .vTextField { +input[type=text], input[type=password], input[type=email], input[type=url], +input[type=number], textarea, select, .vTextField { border: 1px solid #ccc; + border-radius: 4px; + padding: 5px 6px; + margin-top: 0; +} + +input[type=text]:focus, input[type=password]:focus, input[type=email]:focus, +input[type=url]:focus, input[type=number]:focus, textarea:focus, select:focus, +.vTextField:focus { + border-color: #999; +} + +select { + height: 30px; +} + +select[multiple] { + min-height: 150px; } /* FORM BUTTONS */ -.button, input[type=submit], input[type=button], .submit-row input { - background: #fff url(../img/nav-bg.gif) bottom repeat-x; - padding: 3px 5px; - color: black; - border: 1px solid #bbb; - border-color: #ddd #aaa #aaa #ddd; +.button, input[type=submit], input[type=button], .submit-row input, a.button { + background: #79aec8; + padding: 10px 15px; + border: none; + border-radius: 4px; + color: #fff; + cursor: pointer; } -.button:active, input[type=submit]:active, input[type=button]:active { - background-image: url(../img/nav-bg-reverse.gif); - background-position: top; +a.button { + padding: 4px 5px; +} + +.button:active, input[type=submit]:active, input[type=button]:active, +.button:focus, input[type=submit]:focus, input[type=button]:focus, +.button:hover, input[type=submit]:hover, input[type=button]:hover { + background: #609ab6; } .button[disabled], input[type=submit][disabled], input[type=button][disabled] { - background-image: url(../img/nav-bg.gif); - background-position: bottom; opacity: 0.4; } .button.default, input[type=submit].default, .submit-row input.default { - border: 2px solid #5b80b2; - background: #7CA0C7 url(../img/default-bg.gif) bottom repeat-x; - font-weight: bold; - color: #fff; float: right; + border: none; + font-weight: 400; + background: #417690; } -.button.default:active, input[type=submit].default:active { - background-image: url(../img/default-bg-reverse.gif); - background-position: top; +.button.default:active, input[type=submit].default:active, +.button.default:focus, input[type=submit].default:focus, +.button.default:hover, input[type=submit].default:hover { + background: #205067; } -.button[disabled].default, input[type=submit][disabled].default, input[type=button][disabled].default { - background-image: url(../img/default-bg.gif); - background-position: bottom; +.button[disabled].default, +input[type=submit][disabled].default, +input[type=button][disabled].default { opacity: 0.4; } @@ -473,8 +492,8 @@ textarea, select, .vTextField { /* MODULES */ .module { - border: 1px solid #ccc; - margin-bottom: 5px; + border: none; + margin-bottom: 30px; background: #fff; } @@ -497,14 +516,21 @@ textarea, select, .vTextField { .module h2, .module caption, .inline-group h2 { margin: 0; - padding: 2px 5px 3px 5px; - font-size: 11px; + padding: 8px; + font-weight: 400; + font-size: 13px; text-align: left; - font-weight: bold; - background: #7CA0C7 url(../img/default-bg.gif) top left repeat-x; + background: #79aec8; color: #fff; } +.module caption, +.inline-group h2 { + font-size: 12px; + letter-spacing: 0.5px; + text-transform: uppercase; +} + .module table { border-collapse: collapse; } @@ -517,51 +543,50 @@ ul.messagelist { } ul.messagelist li { - font-size: 12px; - font-weight: bold; display: block; - padding: 5px 5px 4px 25px; - margin: 0 0 3px 0; - border-bottom: 1px solid #ddd; - color: #666; - background: #dfd url(../img/icon_success.gif) 5px .3em no-repeat; + font-weight: 400; + font-size: 13px; + padding: 10px 10px 10px 65px; + margin: 0 0 10px 0; + background: #dfd url(../img/icon-yes.svg) 40px 12px no-repeat; + background-size: 16px auto; + color: #333; } ul.messagelist li.warning { - background: #ffc url(../img/icon_alert.gif) 5px .3em no-repeat; + background: #ffc url(../img/icon-alert.svg) 40px 14px no-repeat; + background-size: 14px auto; } ul.messagelist li.error { - background: #ffefef url(../img/icon_error.gif) 5px .3em no-repeat; + background: #ffefef url(../img/icon-no.svg) 40px 12px no-repeat; + background-size: 16px auto; } .errornote { - font-size: 12px !important; - font-weight: bold; + font-size: 14px; + font-weight: 700; display: block; - padding: 5px 5px 4px 25px; - margin: 0 0 3px 0; - border: 1px solid #c22; - color: #c11; - background: #ffefef url(../img/icon_error.gif) 5px .38em no-repeat; -} - -.errornote, ul.errorlist { - border-radius: 1px; + padding: 10px 12px; + margin: 0 0 10px 0; + color: #ba2121; + border: 1px solid #ba2121; + border-radius: 4px; + background-color: #fff; + background-position: 5px 12px; } ul.errorlist { - margin: 0 0 4px !important; - padding: 0 !important; - color: #fff; - background: #c11; + margin: 0 0 4px; + padding: 0; + color: #ba2121; + background: #fff; } ul.errorlist li { - font-size: 12px !important; + font-size: 13px; display: block; - padding: 5px 5px 4px 7px; - margin: 3px 0 0 0; + margin-bottom: 4px; } ul.errorlist li:first-child { @@ -569,30 +594,32 @@ ul.errorlist li:first-child { } ul.errorlist li a { - color: #fff; + color: inherit; text-decoration: underline; } td ul.errorlist { - margin: 0 !important; - padding: 0 !important; + margin: 0; + padding: 0; } td ul.errorlist li { - margin: 0 !important; -} - -.errors, .form-row.errors { - background: #ffefef; + margin: 0; } .form-row.errors { - border: 1px solid #c22; - margin: -1px; + margin: 0; + border: none; + border-bottom: 1px solid #eee; + background: none; +} + +.form-row.errors ul.errorlist li { + padding-left: 0; } .errors input, .errors select, .errors textarea { - border: 1px solid #c11; + border: 1px solid #ba2121; } div.system-message { @@ -606,7 +633,7 @@ div.system-message p.system-message-title { padding: 4px 5px 4px 25px; margin: 0; color: #c11; - background: #ffefef url(../img/icon_error.gif) 5px .3em no-repeat; + background: #ffefef url(../img/icon-no.svg) 5px 5px no-repeat; } .description { @@ -617,38 +644,46 @@ div.system-message p.system-message-title { /* BREADCRUMBS */ div.breadcrumbs { - background: #fff url(../img/nav-bg-reverse.gif) 0 -10px repeat-x; - padding: 2px 8px 3px 8px; - font-size: 11px; - color: #999; - border-top: 1px solid #fff; - border-bottom: 1px solid #ddd; + background: #79aec8; + padding: 10px 40px; + border: none; + font-size: 14px; + color: #c4dce8; text-align: left; } +div.breadcrumbs a { + color: #fff; +} + +div.breadcrumbs a:focus, div.breadcrumbs a:hover { + color: #c4dce8; +} + /* ACTION ICONS */ .addlink { - padding-left: 12px; - background: url(../img/icon_addlink.gif) 0 .2em no-repeat; + padding-left: 16px; + background: url(../img/icon-addlink.svg) 0 1px no-repeat; } -.changelink { - padding-left: 12px; - background: url(../img/icon_changelink.gif) 0 .2em no-repeat; +.changelink, .inlinechangelink { + padding-left: 16px; + background: url(../img/icon-changelink.svg) 0 1px no-repeat; } .deletelink { - padding-left: 12px; - background: url(../img/icon_deletelink.gif) 0 .25em no-repeat; + padding-left: 16px; + background: url(../img/icon-deletelink.svg) 0 1px no-repeat; } a.deletelink:link, a.deletelink:visited { color: #CC3434; } -a.deletelink:hover { +a.deletelink:focus, a.deletelink:hover { color: #993333; + text-decoration: none; } /* OBJECT TOOLS */ @@ -656,12 +691,10 @@ a.deletelink:hover { .object-tools { font-size: 10px; font-weight: bold; - font-family: Arial,Helvetica,sans-serif; padding-left: 0; float: right; position: relative; - margin-top: -2.4em; - margin-bottom: -2em; + margin-top: -48px; } .form-row .object-tools { @@ -686,23 +719,35 @@ a.deletelink:hover { .object-tools a:link, .object-tools a:visited { display: block; float: left; - color: #fff; - padding: .2em 10px; + padding: 3px 12px; background: #999; + font-weight: 400; + font-size: 11px; + text-transform: uppercase; + letter-spacing: 0.5px; + color: #fff; } -.object-tools a:hover, .object-tools li:hover a { - background-color: #5b80b2; +.object-tools a:focus, .object-tools a:hover { + background-color: #417690; +} + +.object-tools a:focus{ + text-decoration: none; +} + +.object-tools a.viewsitelink, .object-tools a.golink,.object-tools a.addlink { + background-repeat: no-repeat; + background-position: right 7px center; + padding-right: 26px; } .object-tools a.viewsitelink, .object-tools a.golink { - background: #999 url(../img/tooltag-arrowright.png) 95% center no-repeat; - padding-right: 26px; + background-image: url(../img/tooltag-arrowright.svg); } .object-tools a.addlink { - background: #999 url(../img/tooltag-add.png) 95% center no-repeat; - padding-right: 26px; + background-image: url(../img/tooltag-add.svg); } /* OBJECT HISTORY */ @@ -720,12 +765,16 @@ table#change-history tbody th { #container { position: relative; width: 100%; - min-width: 760px; + min-width: 980px; padding: 0; } #content { - margin: 10px 15px; + padding: 20px 40px; +} + +.dashboard #content { + width: 600px; } #content-main { @@ -735,9 +784,9 @@ table#change-history tbody th { #content-related { float: right; - width: 18em; + width: 260px; position: relative; - margin-right: -19em; + margin-right: -300px; } #footer { @@ -748,17 +797,17 @@ table#change-history tbody th { /* COLUMN TYPES */ .colMS { - margin-right: 20em !important; + margin-right: 300px; } .colSM { - margin-left: 20em !important; + margin-left: 300px; } .colSM #content-related { float: left; margin-right: 0; - margin-left: -19em; + margin-left: -300px; } .colSM #content-main { @@ -766,24 +815,17 @@ table#change-history tbody th { } .popup .colM { - width: 95%; -} - -.subcol { - float: left; - width: 46%; - margin-right: 15px; -} - -.dashboard #content { - width: 500px; + width: auto; } /* HEADER */ #header { - width: 100%; + width: auto; + height: 40px; + padding: 10px 40px; background: #417690; + line-height: 40px; color: #ffc; overflow: hidden; } @@ -792,22 +834,24 @@ table#change-history tbody th { color: #fff; } -#header a:hover { +#header a:focus , #header a:hover { text-decoration: underline; } #branding { float: left; } + #branding h1 { - padding: 0 10px; - font-size: 18px; - margin: 8px 0; - font-weight: normal; + padding: 0; + margin: 0 20px 0 0; + font-weight: 300; + font-size: 24px; + color: #f5dd5d; } #branding h1, #branding h1 a:link, #branding h1 a:visited { - color: #f4f379; + color: #f5dd5d; } #branding h2 { @@ -824,24 +868,111 @@ table#change-history tbody th { #user-tools { float: right; - padding: 1.2em 10px; + padding: 0; + margin: 0 0 0 20px; + font-weight: 300; font-size: 11px; + letter-spacing: 0.5px; + text-transform: uppercase; text-align: right; } +#user-tools a { + border-bottom: 1px solid rgba(255, 255, 255, 0.25); +} + +#user-tools a:focus, #user-tools a:hover { + text-decoration: none; + border-bottom-color: #79aec8; + color: #79aec8; +} + /* SIDEBAR */ +#content-related { + background: #f8f8f8; +} + +#content-related .module { + background: none; +} + #content-related h3 { - font-size: 12px; + font-size: 14px; color: #666; - margin-bottom: 3px; + padding: 0 16px; + margin: 0 0 16px; } #content-related h4 { - font-size: 11px; + font-size: 13px; +} + +#content-related p { + padding-left: 16px; + padding-right: 16px; +} + +#content-related .actionlist { + padding: 0; + margin: 16px; +} + +#content-related .actionlist li { + line-height: 1.2; + margin-bottom: 10px; + padding-left: 18px; } #content-related .module h2 { - background: #eee url(../img/nav-bg.gif) bottom left repeat-x; - color: #666; + background: none; + padding: 16px; + margin-bottom: 16px; + border-bottom: 1px solid #eaeaea; + font-size: 18px; + color: #333; +} + +.delete-confirmation form input[type="submit"] { + background: #ba2121; + border-radius: 4px; + padding: 10px 15px; + color: #fff; +} + +.delete-confirmation form input[type="submit"]:active, +.delete-confirmation form input[type="submit"]:focus, +.delete-confirmation form input[type="submit"]:hover { + background: #a41515; +} + +.delete-confirmation form .cancel-link { + display: inline-block; + vertical-align: middle; + height: 15px; + line-height: 15px; + background: #ddd; + border-radius: 4px; + padding: 10px 15px; + color: #333; + margin: 0 0 0 10px; +} + +.delete-confirmation form .cancel-link:active, +.delete-confirmation form .cancel-link:focus, +.delete-confirmation form .cancel-link:hover { + background: #ccc; +} + +/* POPUP */ +.popup #content { + padding: 20px; +} + +.popup #container { + min-width: 0; +} + +.popup #header { + padding: 10px 20px; } diff --git a/static/admin/css/changelists.css b/idre/static/admin/css/changelists.css similarity index 51% rename from static/admin/css/changelists.css rename to idre/static/admin/css/changelists.css index 28021d0..17690a3 100644 --- a/static/admin/css/changelists.css +++ b/idre/static/admin/css/changelists.css @@ -12,20 +12,17 @@ .change-list .hiddenfields { display:none; } .change-list .filtered table { - border-right: 1px solid #ddd; + border-right: none; } .change-list .filtered { min-height: 400px; } -.change-list .filtered { - background: white url(../img/changelist-bg.gif) top right repeat-y !important; -} - -.change-list .filtered .results, .change-list .filtered .paginator, .filtered #toolbar, .filtered div.xfull { - margin-right: 160px !important; - width: auto !important; +.change-list .filtered .results, .change-list .filtered .paginator, +.filtered #toolbar, .filtered div.xfull { + margin-right: 280px; + width: auto; } .change-list .filtered table tbody th { @@ -37,21 +34,16 @@ } #changelist .toplinks { - border-bottom: 1px solid #ccc !important; + border-bottom: 1px solid #ddd; } #changelist .paginator { color: #666; - border-top: 1px solid #eee; border-bottom: 1px solid #eee; - background: white url(../img/nav-bg.gif) 0 180% repeat-x; + background: #fff; overflow: hidden; } -.change-list .filtered .paginator { - border-right: 1px solid #ddd; -} - /* CHANGELIST TABLES */ #changelist table thead th { @@ -65,17 +57,8 @@ text-align: center; } -#changelist table tbody td, #changelist table tbody th { - border-left: 1px solid #ddd; -} - -#changelist table tbody td:first-child, #changelist table tbody th:first-child { - border-left: 0; - border-right: 1px solid #ddd; -} - #changelist table tbody td.action-checkbox { - text-align:center; + text-align: center; } #changelist table tfoot { @@ -85,23 +68,53 @@ /* TOOLBAR */ #changelist #toolbar { - padding: 3px; - border-bottom: 1px solid #ddd; - background: #e1e1e1 url(../img/nav-bg.gif) top left repeat-x; + padding: 8px 10px; + margin-bottom: 15px; + border-top: 1px solid #eee; + border-bottom: 1px solid #eee; + background: #f8f8f8; color: #666; } #changelist #toolbar form input { - font-size: 11px; - padding: 1px 2px; + border-radius: 4px; + font-size: 14px; + padding: 5px; + color: #333; } #changelist #toolbar form #searchbar { - padding: 2px; + height: 19px; + border: 1px solid #ccc; + padding: 2px 5px; + margin: 0; + vertical-align: top; + font-size: 13px; +} + +#changelist #toolbar form #searchbar:focus { + border-color: #999; +} + +#changelist #toolbar form input[type="submit"] { + border: 1px solid #ccc; + padding: 2px 10px; + margin: 0; + vertical-align: middle; + background: #fff; + box-shadow: 0 -15px 20px -10px rgba(0, 0, 0, 0.15) inset; + cursor: pointer; + color: #333; +} + +#changelist #toolbar form input[type="submit"]:focus, +#changelist #toolbar form input[type="submit"]:hover { + border-color: #999; } #changelist #changelist-search img { vertical-align: middle; + margin-right: 4px; } /* FILTER COLUMN */ @@ -111,26 +124,37 @@ top: 0; right: 0; z-index: 1000; - width: 160px; - border-left: 1px solid #ddd; - background: #efefef; + width: 240px; + background: #f8f8f8; + border-left: none; margin: 0; } #changelist-filter h2 { - font-size: 11px; - padding: 2px 5px; - border-bottom: 1px solid #ddd; + font-size: 14px; + text-transform: uppercase; + letter-spacing: 0.5px; + padding: 5px 15px; + margin-bottom: 12px; + border-bottom: none; } #changelist-filter h3 { - font-size: 12px; - margin-bottom: 0; + font-weight: 400; + font-size: 14px; + padding: 0 15px; + margin-bottom: 10px; } #changelist-filter ul { - padding-left: 0; - margin-left: 10px; + margin: 5px 0; + padding: 0 15px 15px; + border-bottom: 1px solid #eaeaea; +} + +#changelist-filter ul:last-child { + border-bottom: none; + padding-bottom: none; } #changelist-filter li { @@ -140,32 +164,35 @@ } #changelist-filter a { + display: block; color: #999; -} - -#changelist-filter a:hover { - color: #036; + text-overflow: ellipsis; + overflow-x: hidden; } #changelist-filter li.selected { - border-left: 5px solid #ccc; - padding-left: 5px; - margin-left: -10px; + border-left: 5px solid #eaeaea; + padding-left: 10px; + margin-left: -15px; } #changelist-filter li.selected a { - color: #5b80b2 !important; + color: #5b80b2; +} + +#changelist-filter a:focus, #changelist-filter a:hover, +#changelist-filter li.selected a:focus, +#changelist-filter li.selected a:hover { + color: #036; } /* DATE DRILLDOWN */ .change-list ul.toplinks { display: block; - background: white url(../img/nav-bg-reverse.gif) 0 -10px repeat-x; - border-top: 1px solid white; float: left; - padding: 0 !important; - margin: 0 !important; + padding: 0; + margin: 0; width: 100%; } @@ -180,6 +207,7 @@ color: #999; } +.change-list ul.toplinks .date-back a:focus, .change-list ul.toplinks .date-back a:hover { color: #036; } @@ -187,7 +215,7 @@ /* PAGINATOR */ .paginator { - font-size: 11px; + font-size: 13px; padding-top: 10px; padding-bottom: 10px; line-height: 22px; @@ -197,23 +225,24 @@ .paginator a:link, .paginator a:visited { padding: 2px 6px; - border: solid 1px #ccc; - background: white; + background: #79aec8; text-decoration: none; + color: #fff; } .paginator a.showall { - padding: 0 !important; - border: none !important; + padding: 0; + border: none; + background: none; + color: #5b80b2; } -.paginator a.showall:hover { - color: #036 !important; - background: transparent !important; +.paginator a.showall:focus, .paginator a.showall:hover { + background: none; + color: #036; } .paginator .end { - border-width: 2px !important; margin-right: 6px; } @@ -224,21 +253,21 @@ vertical-align: top; } -.paginator a:hover { +.paginator a:focus, .paginator a:hover { color: white; - background: #5b80b2; - border-color: #036; + background: #036; } /* ACTIONS */ .filtered .actions { - margin-right: 160px !important; - border-right: 1px solid #ddd; + margin-right: 280px; + border-right: none; } #changelist table input { margin: 0; + vertical-align: baseline; } #changelist table tbody tr.selected { @@ -246,11 +275,12 @@ } #changelist .actions { + padding: 10px; + background: #fff; + border-top: none; + border-bottom: none; + line-height: 24px; color: #999; - padding: 3px; - border-top: 1px solid #fff; - border-bottom: 1px solid #ddd; - background: white url(../img/nav-bg-reverse.gif) 0 -10px repeat-x; } #changelist .actions.selected { @@ -263,7 +293,7 @@ #changelist .actions span.action-counter, #changelist .actions span.clear, #changelist .actions span.question { - font-size: 11px; + font-size: 13px; margin: 0 0.5em; display: none; } @@ -273,21 +303,42 @@ } #changelist .actions select { - border: 1px solid #aaa; - margin-left: 0.5em; - padding: 1px 2px; + vertical-align: top; + height: 24px; + background: none; + color: #000; + border: 1px solid #ccc; + border-radius: 4px; + font-size: 14px; + padding: 0 0 0 4px; + margin: 0; + margin-left: 10px; +} + +#changelist .actions select:focus { + border-color: #999; } #changelist .actions label { - font-size: 11px; - margin-left: 0.5em; -} - -#changelist #action-toggle { - display: none; + display: inline-block; + vertical-align: middle; + font-size: 13px; } #changelist .actions .button { - font-size: 11px; - padding: 1px 2px; + font-size: 13px; + border: 1px solid #ccc; + border-radius: 4px; + background: #fff; + box-shadow: 0 -15px 20px -10px rgba(0, 0, 0, 0.15) inset; + cursor: pointer; + height: 24px; + line-height: 1; + padding: 4px 8px; + margin: 0; + color: #333; +} + +#changelist .actions .button:focus, #changelist .actions .button:hover { + border-color: #999; } diff --git a/static/admin/css/dashboard.css b/idre/static/admin/css/dashboard.css similarity index 94% rename from static/admin/css/dashboard.css rename to idre/static/admin/css/dashboard.css index 05808bc..1560c7b 100644 --- a/static/admin/css/dashboard.css +++ b/idre/static/admin/css/dashboard.css @@ -21,9 +21,6 @@ ul.actionlist li { list-style-type: none; -} - -ul.actionlist li { overflow: hidden; text-overflow: ellipsis; -o-text-overflow: ellipsis; diff --git a/idre/static/admin/css/fonts.css b/idre/static/admin/css/fonts.css new file mode 100644 index 0000000..c837e01 --- /dev/null +++ b/idre/static/admin/css/fonts.css @@ -0,0 +1,20 @@ +@font-face { + font-family: 'Roboto'; + src: url('../fonts/Roboto-Bold-webfont.woff'); + font-weight: 700; + font-style: normal; +} + +@font-face { + font-family: 'Roboto'; + src: url('../fonts/Roboto-Regular-webfont.woff'); + font-weight: 400; + font-style: normal; +} + +@font-face { + font-family: 'Roboto'; + src: url('../fonts/Roboto-Light-webfont.woff'); + font-weight: 300; + font-style: normal; +} diff --git a/static/admin/css/forms.css b/idre/static/admin/css/forms.css similarity index 51% rename from static/admin/css/forms.css rename to idre/static/admin/css/forms.css index d088d8d..77985d5 100644 --- a/static/admin/css/forms.css +++ b/idre/static/admin/css/forms.css @@ -4,8 +4,8 @@ .form-row { overflow: hidden; - padding: 8px 12px; - font-size: 11px; + padding: 10px; + font-size: 13px; border-bottom: 1px solid #eee; } @@ -13,9 +13,13 @@ vertical-align: middle; } +.form-row label input[type="checkbox"] { + margin-top: 0; + vertical-align: 0; +} + form .form-row p { padding-left: 0; - font-size: 11px; } .hidden { @@ -24,21 +28,15 @@ form .form-row p { /* FORM LABELS */ -form h4 { - margin: 0 !important; - padding: 0 !important; - border: none !important; -} - label { - font-weight: normal !important; + font-weight: normal; color: #666; - font-size: 12px; + font-size: 13px; } .required label, label.required { - font-weight: bold !important; - color: #333 !important; + font-weight: bold; + color: #333; } /* RADIO BUTTONS */ @@ -52,6 +50,11 @@ form ul.radiolist label { display: inline; } +form ul.radiolist input[type="radio"] { + margin: -2px 4px 0 0; + padding: 0; +} + form ul.inline { margin-left: 0; padding: 0; @@ -66,10 +69,25 @@ form ul.inline li { .aligned label { display: block; - padding: 3px 10px 0 0; + padding: 4px 10px 0 0; float: left; - width: 8em; + width: 160px; word-wrap: break-word; + line-height: 1; +} + +.aligned label:not(.vCheckboxLabel):after { + content: ''; + display: inline-block; + vertical-align: middle; + height: 26px; +} + +.aligned label + p, .aligned label + div.help, .aligned label + div.readonly { + padding: 6px 0; + margin-top: 0; + margin-bottom: 0; + margin-left: 170px; } .aligned ul label { @@ -78,13 +96,57 @@ form ul.inline li { width: auto; } +.aligned .form-row input { + margin-bottom: 0; +} + .colMS .aligned .vLargeTextField, .colMS .aligned .vXMLLargeTextField { width: 350px; } -form .aligned p, form .aligned ul { - margin-left: 7em; - padding-left: 30px; +form .aligned ul { + margin-left: 160px; + padding-left: 10px; +} + +form .aligned ul.radiolist { + display: inline-block; + margin: 0; + padding: 0; +} + +form .aligned p.help, +form .aligned div.help { + clear: left; + margin-top: 0; + margin-left: 160px; + padding-left: 10px; +} + +form .aligned label + p.help, +form .aligned label + div.help { + margin-left: 0; + padding-left: 0; +} + +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 { @@ -92,23 +154,27 @@ form .aligned table p { padding-left: 0; } -form .aligned p.help { - padding-left: 38px; +.aligned .vCheckboxLabel { + float: none; + width: auto; + display: inline-block; + vertical-align: -3px; + padding: 0 0 5px 5px; } -.aligned .vCheckboxLabel { - float: none !important; - display: inline; - padding-left: 4px; +.aligned .vCheckboxLabel + p.help, +.aligned .vCheckboxLabel + div.help { + margin-top: -4px; } .colM .aligned .vLargeTextField, .colM .aligned .vXMLLargeTextField { width: 610px; } -.checkbox-row p.help { +.checkbox-row p.help, +.checkbox-row div.help { margin-left: 0; - padding-left: 0 !important; + padding-left: 0; } fieldset .field-box { @@ -119,17 +185,25 @@ fieldset .field-box { /* WIDE FIELDSETS */ .wide label { - width: 15em !important; + width: 200px; } -form .wide p { - margin-left: 15em; +form .wide p, +form .wide input + p.help, +form .wide input + div.help { + margin-left: 200px; } -form .wide p.help { +form .wide p.help, +form .wide div.help { padding-left: 38px; } +form div.help ul { + padding-left: 0; + margin-left: 0; +} + .colM fieldset.wide .vLargeTextField, .colM fieldset.wide .vXMLLargeTextField { width: 450px; } @@ -141,34 +215,45 @@ fieldset.collapsed * { } fieldset.collapsed h2, fieldset.collapsed { - display: block !important; + display: block; +} + +fieldset.collapsed { + border: 1px solid #eee; + border-radius: 4px; + overflow: hidden; } fieldset.collapsed h2 { - background-image: url(../img/nav-bg.gif); - background-position: bottom left; - color: #999; + background: #f8f8f8; + color: #666; +} + +fieldset .collapse-toggle { + color: #fff; } fieldset.collapsed .collapse-toggle { background: transparent; - display: inline !important; + display: inline; + color: #447e9b; } /* MONOSPACE TEXTAREAS */ fieldset.monospace textarea { - font-family: "Bitstream Vera Sans Mono",Monaco,"Courier New",Courier,monospace; + font-family: "Bitstream Vera Sans Mono", Monaco, "Courier New", Courier, monospace; } /* SUBMIT ROW */ .submit-row { - padding: 5px 7px; + padding: 12px 14px; + margin: 0 0 20px; + background: #f8f8f8; + border: 1px solid #eee; + border-radius: 4px; text-align: right; - background: white url(../img/nav-bg.gif) 0 100% repeat-x; - border: 1px solid #ccc; - margin: 5px 0; overflow: hidden; } @@ -177,26 +262,45 @@ body.popup .submit-row { } .submit-row input { + height: 35px; + line-height: 15px; margin: 0 0 0 5px; } +.submit-row input.default { + margin: 0 0 0 8px; + text-transform: uppercase; +} + .submit-row p { margin: 0.3em; } .submit-row p.deletelink-box { float: left; + margin: 0; } -.submit-row .deletelink { - background: url(../img/icon_deletelink.gif) 0 50% no-repeat; - padding-left: 14px; +.submit-row a.deletelink { + display: block; + background: #ba2121; + border-radius: 4px; + padding: 10px 15px; + height: 15px; + line-height: 15px; + color: #fff; +} + +.submit-row a.deletelink:focus, +.submit-row a.deletelink:hover, +.submit-row a.deletelink:active { + background: #a41515; } /* CUSTOM FORM FIELDS */ .vSelectMultipleField { - vertical-align: top !important; + vertical-align: top; } .vCheckboxField { @@ -205,6 +309,7 @@ body.popup .submit-row { .vDateField, .vTimeField { margin-right: 2px; + margin-bottom: 4px; } .vDateField { @@ -251,12 +356,15 @@ body.popup .submit-row { .inline-group { padding: 0; - border: 1px solid #ccc; - margin: 10px 0; + margin: 0 0 30px; +} + +.inline-group thead th { + padding: 8px 10px; } .inline-group .aligned label { - width: 8em; + width: 160px; } .inline-related { @@ -266,10 +374,11 @@ body.popup .submit-row { .inline-related h3 { margin: 0; color: #666; - padding: 3px 5px; - font-size: 11px; - background: #e1e1e1 url(../img/nav-bg.gif) top left repeat-x; - border-bottom: 1px solid #ddd; + padding: 5px; + font-size: 13px; + background: #f8f8f8; + border-top: 1px solid #eee; + border-bottom: 1px solid #eee; } .inline-related h3 span.delete { @@ -300,7 +409,6 @@ body.popup .submit-row { .inline-group .tabular fieldset.module { border: none; - border-bottom: 1px solid #ddd; } .inline-related.tabular fieldset.module table { @@ -330,7 +438,7 @@ body.popup .submit-row { position: absolute; left: 0; height: 1.1em; - padding: 2px 7px; + padding: 2px 9px; overflow: hidden; font-size: 9px; font-weight: bold; @@ -352,25 +460,56 @@ body.popup .submit-row { .inline-group div.add-row, .inline-group .tabular tr.add-row td { color: #666; - padding: 3px 5px; - border-bottom: 1px solid #ddd; - background: #e1e1e1 url(../img/nav-bg.gif) top left repeat-x; + background: #f8f8f8; + padding: 8px 10px; + border-bottom: 1px solid #eee; } .inline-group .tabular tr.add-row td { - padding: 4px 5px 3px; - border-bottom: none; + padding: 8px 10px; + border-bottom: 1px solid #eee; } .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.gif) 0 50% no-repeat; - padding-left: 14px; - font-size: 11px; - outline: 0; /* Remove dotted border around link */ + background: url(../img/icon-addlink.svg) 0 1px no-repeat; + padding-left: 16px; + font-size: 12px; } .empty-form { display: none; } + +/* RELATED FIELD ADD ONE / LOOKUP */ + +.add-another, .related-lookup { + margin-left: 5px; + display: inline-block; + vertical-align: middle; + background-repeat: no-repeat; + background-size: 14px; +} + +.add-another { + width: 16px; + height: 16px; + background-image: url(../img/icon-addlink.svg); +} + +.related-lookup { + width: 16px; + height: 16px; + 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; +} diff --git a/static/admin/css/login.css b/idre/static/admin/css/login.css similarity index 61% rename from static/admin/css/login.css rename to idre/static/admin/css/login.css index a91de11..cab3bbf 100644 --- a/static/admin/css/login.css +++ b/idre/static/admin/css/login.css @@ -1,31 +1,45 @@ /* LOGIN FORM */ body.login { - background: #eee; + background: #f8f8f8; +} + +.login #header { + height: auto; + padding: 5px 16px; +} + +.login #header h1 { + font-size: 18px; +} + +.login #header h1 a { + color: #fff; +} + +.login #content { + padding: 20px 20px 0; } .login #container { - background: white; - border: 1px solid #ccc; + background: #fff; + border: 1px solid #eaeaea; + border-radius: 4px; + overflow: hidden; width: 28em; min-width: 300px; - margin-left: auto; - margin-right: auto; - margin-top: 100px; + margin: 100px auto; } .login #content-main { width: 100%; } -.login form { - margin-top: 1em; -} - .login .form-row { padding: 4px 0; float: left; width: 100%; + border-bottom: none; } .login .form-row label { @@ -38,7 +52,7 @@ body.login { .login .form-row #id_username, .login .form-row #id_password { clear: both; - padding: 6px; + padding: 8px; width: 100%; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; @@ -53,6 +67,10 @@ body.login { .login .submit-row { clear: both; padding: 1em 0 0 9.4em; + margin: 0; + border: none; + background: none; + text-align: left; } .login .password-reset-link { diff --git a/static/admin/css/rtl.css b/idre/static/admin/css/rtl.css similarity index 67% rename from static/admin/css/rtl.css rename to idre/static/admin/css/rtl.css index ba9f1b5..ef39781 100644 --- a/static/admin/css/rtl.css +++ b/idre/static/admin/css/rtl.css @@ -30,16 +30,21 @@ th { text-align: right; } +.module ul, .module ol { + margin-left: 0; + margin-right: 1.5em; +} + .addlink, .changelink { - padding-left: 0px; - padding-right: 12px; - background-position: 100% 0.2em; + padding-left: 0; + padding-right: 16px; + background-position: 100% 1px; } .deletelink { - padding-left: 0px; - padding-right: 12px; - background-position: 100% 0.25em; + padding-left: 0; + padding-right: 16px; + background-position: 100% 1px; } .object-tools { @@ -48,7 +53,7 @@ th { thead th:first-child, tfoot td:first-child { - border-left: 1px solid #ddd !important; + border-left: none; } /* LAYOUT */ @@ -69,13 +74,13 @@ div.breadcrumbs { #content-related { float: left; - margin-left: -19em; + margin-left: -300px; margin-right: auto; } .colMS { - margin-left: 20em !important; - margin-right: 10px !important; + margin-left: 300px; + margin-right: 0; } /* SORTABLE TABLES */ @@ -85,59 +90,53 @@ table thead th.sorted .sortoptions { } thead th.sorted .text { - padding-right: 0; - padding-left: 42px; + padding-right: 0; + padding-left: 42px; } /* dashboard styles */ .dashboard .module table td a { padding-left: .6em; - padding-right: 12px; + padding-right: 16px; } /* changelists styles */ -.change-list .filtered { - background: white url(../img/changelist-bg_rtl.gif) top left repeat-y !important; -} - .change-list .filtered table { - border-left: 1px solid #ddd; + border-left: none; border-right: 0px none; } #changelist-filter { right: auto; left: 0; - border-left: 0px none; - border-right: 1px solid #ddd; + border-left: none; + border-right: none; } .change-list .filtered .results, .change-list .filtered .paginator, .filtered #toolbar, .filtered div.xfull { - margin-right: 0px !important; - margin-left: 160px !important; + margin-right: 0; + margin-left: 280px; } #changelist-filter li.selected { - border-left: 0px none; - padding-left: 0px; + border-left: none; + padding-left: 10px; margin-left: 0; - border-right: 5px solid #ccc; - padding-right: 5px; - margin-right: -10px; + border-right: 5px solid #eaeaea; + padding-right: 10px; + margin-right: -15px; } .filtered .actions { - border-left:1px solid #DDDDDD; - margin-left:160px !important; - border-right: 0 none; - margin-right:0 !important; + margin-left: 280px; + margin-right: 0; } #changelist table tbody td:first-child, #changelist table tbody th:first-child { - border-right: 0; - border-left: 1px solid #ddd; + border-right: none; + border-left: none; } /* FORMS */ @@ -155,15 +154,22 @@ thead th.sorted .text { float: right; } -.submit-row .deletelink { - background: url(../img/icon_deletelink.gif) 0 50% no-repeat; - padding-right: 14px; +.submit-row input.default { + margin-left: 0; } .vDateField, .vTimeField { margin-left: 2px; } +.aligned .form-row input { + margin-left: 5px; +} + +form .aligned p.help, form .aligned div.help { + clear: right; +} + form ul.inline li { float: right; padding-right: 0; @@ -181,13 +187,13 @@ fieldset .field-box { } .errorlist li { - background-position: 100% .3em; - padding: 4px 25px 4px 5px; + background-position: 100% 12px; + padding: 0; } .errornote { - background-position: 100% .3em; - padding: 4px 25px 4px 5px; + background-position: 100% 12px; + padding: 10px 12px; } /* WIDGETS */ @@ -195,13 +201,13 @@ fieldset .field-box { .calendarnav-previous { top: 0; left: auto; - right: 0; + right: 10px; } .calendarnav-next { top: 0; right: auto; - left: 0; + left: 10px; } .calendar caption, .calendarbox h2 { @@ -220,6 +226,14 @@ fieldset .field-box { float: left; } +form .form-row p.datetime { + overflow: hidden; +} + +.related-widget-wrapper { + float: right; +} + /* MISC */ .inline-related h2, .inline-group h2 { @@ -247,4 +261,4 @@ div.colM { .submit-row input { float: left; -} \ No newline at end of file +} diff --git a/static/admin/css/widgets.css b/idre/static/admin/css/widgets.css similarity index 51% rename from static/admin/css/widgets.css rename to idre/static/admin/css/widgets.css index 5681722..d3bd67a 100644 --- a/static/admin/css/widgets.css +++ b/idre/static/admin/css/widgets.css @@ -1,18 +1,18 @@ /* SELECTOR (FILTER INTERFACE) */ .selector { - width: 840px; + width: 800px; float: left; } .selector select { - width: 400px; + width: 380px; height: 17.2em; } .selector-available, .selector-chosen { float: left; - width: 400px; + width: 380px; text-align: center; margin-bottom: 5px; } @@ -23,10 +23,16 @@ .selector-available h2, .selector-chosen h2 { border: 1px solid #ccc; + border-radius: 4px 4px 0 0; +} + +.selector-chosen h2 { + background: #79aec8; + color: #fff; } .selector .selector-available h2 { - background: white url(../img/nav-bg.gif) bottom left repeat-x; + background: #f8f8f8; color: #666; } @@ -34,7 +40,7 @@ background: white; border: 1px solid #ccc; border-width: 0 1px; - padding: 3px; + padding: 8px; color: #999; font-size: 10px; margin: 0; @@ -43,12 +49,18 @@ .selector .selector-filter label, .inline-group .aligned .selector .selector-filter label { - width: 16px; - padding: 2px; + float: left; + margin: 7px 0 0; + width: 18px; + height: 18px; + padding: 0; + overflow: hidden; + line-height: 1; } .selector .selector-available input { - width: 360px; + width: 320px; + margin-left: 8px; } .selector ul.selector-chooser { @@ -67,8 +79,9 @@ } .selector select { - margin-bottom: 10px; - margin-top: 0; + padding: 0 10px; + margin: 0 0 10px; + border-radius: 0 0 4px 4px; } .selector-add, .selector-remove { @@ -77,75 +90,85 @@ display: block; text-indent: -3000px; overflow: hidden; + cursor: default; + opacity: 0.3; +} + +.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.gif) 0 -161px no-repeat; - cursor: default; - margin-bottom: 2px; + background: url(../img/selector-icons.svg) 0 -96px no-repeat; } -.active.selector-add { - background: url(../img/selector-icons.gif) 0 -187px no-repeat; - cursor: pointer; +.active.selector-add:focus, .active.selector-add:hover { + background-position: 0 -112px; } .selector-remove { - background: url(../img/selector-icons.gif) 0 -109px no-repeat; - cursor: default; + background: url(../img/selector-icons.svg) 0 -64px no-repeat; } -.active.selector-remove { - background: url(../img/selector-icons.gif) 0 -135px no-repeat; - cursor: pointer; +.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-left: auto; - margin-right: auto; + margin: 1px auto 3px; + overflow: hidden; font-weight: bold; + line-height: 16px; color: #666; + text-decoration: none; + opacity: 0.3; } -a.selector-chooseall { - padding: 3px 18px 3px 0; +a.active.selector-chooseall:focus, a.active.selector-clearall:focus, +a.active.selector-chooseall:hover, a.active.selector-clearall:hover { + color: #447e9b; } -a.selector-clearall { - padding: 3px 0 3px 18px; +a.active.selector-chooseall, a.active.selector-clearall { + opacity: 1; } a.active.selector-chooseall:hover, a.active.selector-clearall:hover { - color: #036; + cursor: pointer; } a.selector-chooseall { - background: url(../img/selector-icons.gif) right -263px no-repeat; + padding: 0 18px 0 0; + background: url(../img/selector-icons.svg) right -160px no-repeat; cursor: default; } -a.active.selector-chooseall { - background: url(../img/selector-icons.gif) right -289px no-repeat; - cursor: pointer; +a.active.selector-chooseall:focus, a.active.selector-chooseall:hover { + background-position: 100% -176px; } a.selector-clearall { - background: url(../img/selector-icons.gif) left -211px no-repeat; + padding: 0 0 0 18px; + background: url(../img/selector-icons.svg) 0 -128px no-repeat; cursor: default; } -a.active.selector-clearall { - background: url(../img/selector-icons.gif) left -237px no-repeat; - cursor: pointer; +a.active.selector-clearall:focus, a.active.selector-clearall:hover { + background-position: 0 -144px; } /* STACKED SELECTORS */ .stacked { float: left; - width: 500px; + width: 490px; } .stacked select { @@ -162,13 +185,13 @@ a.active.selector-clearall { } .stacked .selector-available input { - width: 442px; + width: 422px; } .stacked ul.selector-chooser { height: 22px; width: 50px; - margin: 0 0 3px 40%; + margin: 0 0 10px 40%; background-color: #eee; border-radius: 10px; } @@ -183,25 +206,45 @@ a.active.selector-clearall { } .stacked .selector-add { - background: url(../img/selector-icons.gif) 0 -57px no-repeat; + background: url(../img/selector-icons.svg) 0 -32px no-repeat; cursor: default; } .stacked .active.selector-add { - background: url(../img/selector-icons.gif) 0 -83px no-repeat; + background-position: 0 -48px; cursor: pointer; } .stacked .selector-remove { - background: url(../img/selector-icons.gif) 0 -5px no-repeat; + background: url(../img/selector-icons.svg) 0 0 no-repeat; cursor: default; } .stacked .active.selector-remove { - background: url(../img/selector-icons.gif) 0 -31px no-repeat; + 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: 18px; + width: 18px; +} + /* DATE AND TIME */ p.datetime { @@ -209,23 +252,61 @@ p.datetime { margin: 0; padding: 0; color: #666; - font-size: 11px; font-weight: bold; } .datetime span { + white-space: nowrap; + font-weight: normal; font-size: 11px; color: #ccc; - font-weight: normal; - white-space: nowrap; +} + +.datetime input, .form-row .datetime input.vDateField, .form-row .datetime input.vTimeField { + min-width: 0; + margin-left: 5px; + margin-bottom: 4px; } table p.datetime { - font-size: 10px; + font-size: 11px; 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: 11px; + color: #999; +} + /* URL */ p.url { @@ -252,6 +333,10 @@ p.file-upload { font-weight: bold; } +.aligned p.file-upload { + margin-left: 170px; +} + .file-upload a { font-weight: normal; } @@ -271,10 +356,14 @@ span.clearable-file-input label { .calendarbox, .clockbox { margin: 5px auto; - font-size: 11px; - width: 16em; + font-size: 12px; + width: 19em; text-align: center; background: white; + border: 1px solid #ddd; + border-radius: 4px; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15); + overflow: hidden; position: relative; } @@ -297,22 +386,27 @@ span.clearable-file-input label { .calendar caption, .calendarbox h2 { margin: 0; - font-size: 11px; text-align: center; border-top: none; + background: #f5dd5d; + font-weight: 700; + font-size: 12px; + color: #333; } .calendar th { - font-size: 10px; - color: #666; - padding: 2px 3px; - text-align: center; - background: #e1e1e1 url(../img/nav-bg.gif) 0 50% repeat-x; + padding: 8px 5px; + background: #f8f8f8; border-bottom: 1px solid #ddd; + font-weight: 400; + font-size: 12px; + text-align: center; + color: #666; } .calendar td { - font-size: 11px; + font-weight: 400; + font-size: 12px; text-align: center; padding: 0; border-top: 1px solid #eee; @@ -320,32 +414,34 @@ span.clearable-file-input label { } .calendar td.selected a { - background: #C9DBED; + background: #79aec8; + color: #fff; } .calendar td.nonday { - background: #efefef; + background: #f8f8f8; } .calendar td.today a { - background: #ffc; + font-weight: 700; } .calendar td a, .timelist a { display: block; - font-weight: bold; - padding: 4px; + font-weight: 400; + padding: 6px; text-decoration: none; color: #444; } +.calendar td a:focus, .timelist a:focus, .calendar td a:hover, .timelist a:hover { - background: #5b80b2; + background: #79aec8; color: white; } .calendar td a:active, .timelist a:active { - background: #036; + background: #417690; color: white; } @@ -357,53 +453,61 @@ span.clearable-file-input label { padding: 1px 3px; } -.calendarnav a:link, #calendarnav a:visited, #calendarnav a:hover { +.calendarnav a:link, #calendarnav a:visited, +#calendarnav a:focus, #calendarnav a:hover { color: #999; } .calendar-shortcuts { background: white; - font-size: 10px; + font-size: 11px; line-height: 11px; border-top: 1px solid #eee; - padding: 3px 0 4px; + padding: 8px 0; color: #ccc; } .calendarbox .calendarnav-previous, .calendarbox .calendarnav-next { display: block; position: absolute; - font-weight: bold; - font-size: 12px; - background: #C9DBED url(../img/default-bg.gif) bottom left repeat-x; - padding: 1px 4px 2px 4px; - color: white; -} - -.calendarnav-previous:hover, .calendarnav-next:hover { - background: #036; + top: 8px; + width: 15px; + height: 15px; + text-indent: -9999px; + padding: 0; } .calendarnav-previous { - top: 0; - left: 0; + 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 { - top: 0; - right: 0; + 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 !important; - padding: 0 !important; - font-size: 10px; - background: #e1e1e1 url(../img/nav-bg.gif) 0 50% repeat-x; + margin: 0; + padding: 4px 0; + font-size: 12px; + background: #eee; border-top: 1px solid #ddd; + color: #333; } -.calendar-cancel:hover { - background: #e1e1e1 url(../img/nav-bg-reverse.gif) 0 50% repeat-x; +.calendar-cancel:focus, .calendar-cancel:hover { + background: #ddd; } .calendar-cancel a { @@ -421,158 +525,41 @@ ul.timelist, .timelist li { padding: 2px; } -/* INLINE ORDERER */ - -ul.orderer { - position: relative; - padding: 0 !important; - margin: 0 !important; - list-style-type: none; -} - -ul.orderer li { - list-style-type: none; - display: block; - padding: 0; - margin: 0; - border: 1px solid #bbb; - border-width: 0 1px 1px 0; - white-space: nowrap; - overflow: hidden; - background: #e2e2e2 url(../img/nav-bg-grabber.gif) repeat-y; -} - -ul.orderer li:hover { - cursor: move; - background-color: #ddd; -} - -ul.orderer li a.selector { - margin-left: 12px; - overflow: hidden; - width: 83%; - font-size: 10px !important; - padding: 0.6em 0; -} - -ul.orderer li a:link, ul.orderer li a:visited { - color: #333; -} - -ul.orderer li .inline-deletelink { - position: absolute; - right: 4px; - margin-top: 0.6em; -} - -ul.orderer li.selected { - background-color: #f8f8f8; - border-right-color: #f8f8f8; -} - -ul.orderer li.deleted { - background: #bbb url(../img/deleted-overlay.gif); -} - -ul.orderer li.deleted a:link, ul.orderer li.deleted a:visited { - color: #888; -} - -ul.orderer li.deleted .inline-deletelink { - background-image: url(../img/inline-restore.png); -} - -ul.orderer li.deleted:hover, ul.orderer li.deleted a.selector:hover { - cursor: default; -} - /* EDIT INLINE */ .inline-deletelink { float: right; text-indent: -9999px; - background: transparent url(../img/inline-delete.png) no-repeat; - width: 15px; - height: 15px; + background: url(../img/inline-delete.svg) 0 0 no-repeat; + width: 16px; + height: 16px; border: 0px none; - outline: 0; /* Remove dotted border around link */ } -.inline-deletelink:hover { - background-position: -15px 0; +.inline-deletelink:focus, .inline-deletelink:hover { cursor: pointer; } -.editinline button.addlink { - border: 0px none; - color: #5b80b2; - font-size: 100%; - cursor: pointer; +/* RELATED WIDGET WRAPPER */ +.related-widget-wrapper { + float: left; /* display properly in form rows with multiple fields */ + overflow: hidden; /* clear floated contents */ } -.editinline button.addlink:hover { - color: #036; - cursor: pointer; +.related-widget-wrapper-link { + opacity: 0.3; } -.editinline table .help { - text-align: right; - float: right; - padding-left: 2em; +.related-widget-wrapper-link:link { + opacity: .8; } -.editinline tfoot .addlink { - white-space: nowrap; +.related-widget-wrapper-link:link:focus, +.related-widget-wrapper-link:link:hover { + opacity: 1; } -.editinline table thead th:last-child { - border-left: none; -} - -.editinline tr.deleted { - background: #ddd url(../img/deleted-overlay.gif); -} - -.editinline tr.deleted .inline-deletelink { - background-image: url(../img/inline-restore.png); -} - -.editinline tr.deleted td:hover { - cursor: default; -} - -.editinline tr.deleted td:first-child { - background-image: none !important; -} - -/* EDIT INLINE - STACKED */ - -.editinline-stacked { - min-width: 758px; -} - -.editinline-stacked .inline-object { - margin-left: 210px; - background: white; -} - -.editinline-stacked .inline-source { - float: left; - width: 200px; - background: #f8f8f8; -} - -.editinline-stacked .inline-splitter { - float: left; - width: 9px; - background: #f8f8f8 url(../img/inline-splitter-bg.gif) 50% 50% no-repeat; - border-right: 1px solid #ccc; -} - -.editinline-stacked .controls { - clear: both; - background: #e1e1e1 url(../img/nav-bg.gif) top left repeat-x; - padding: 3px 4px; - font-size: 11px; - border-top: 1px solid #ddd; +select + .related-widget-wrapper-link, +.related-widget-wrapper-link + .related-widget-wrapper-link { + margin-left: 7px; } diff --git a/idre/static/admin/fonts/LICENSE.txt b/idre/static/admin/fonts/LICENSE.txt new file mode 100644 index 0000000..75b5248 --- /dev/null +++ b/idre/static/admin/fonts/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/idre/static/admin/fonts/README.txt b/idre/static/admin/fonts/README.txt new file mode 100644 index 0000000..cc2135a --- /dev/null +++ b/idre/static/admin/fonts/README.txt @@ -0,0 +1,2 @@ +Roboto webfont source: https://www.google.com/fonts/specimen/Roboto +Weights used in this project: Light (300), Regular (400), Bold (700) diff --git a/idre/static/admin/fonts/Roboto-Bold-webfont.woff b/idre/static/admin/fonts/Roboto-Bold-webfont.woff new file mode 100644 index 0000000..03357ce Binary files /dev/null and b/idre/static/admin/fonts/Roboto-Bold-webfont.woff differ diff --git a/idre/static/admin/fonts/Roboto-Light-webfont.woff b/idre/static/admin/fonts/Roboto-Light-webfont.woff new file mode 100644 index 0000000..f6abd87 Binary files /dev/null and b/idre/static/admin/fonts/Roboto-Light-webfont.woff differ diff --git a/idre/static/admin/fonts/Roboto-Regular-webfont.woff b/idre/static/admin/fonts/Roboto-Regular-webfont.woff new file mode 100644 index 0000000..6ff6afd Binary files /dev/null and b/idre/static/admin/fonts/Roboto-Regular-webfont.woff differ diff --git a/idre/static/admin/img/LICENSE b/idre/static/admin/img/LICENSE new file mode 100644 index 0000000..a4faaa1 --- /dev/null +++ b/idre/static/admin/img/LICENSE @@ -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. diff --git a/idre/static/admin/img/README.txt b/idre/static/admin/img/README.txt new file mode 100644 index 0000000..43373ad --- /dev/null +++ b/idre/static/admin/img/README.txt @@ -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: +- http://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). diff --git a/idre/static/admin/img/calendar-icons.svg b/idre/static/admin/img/calendar-icons.svg new file mode 100644 index 0000000..dbf21c3 --- /dev/null +++ b/idre/static/admin/img/calendar-icons.svg @@ -0,0 +1,14 @@ + diff --git a/idre/static/admin/img/gis/move_vertex_off.svg b/idre/static/admin/img/gis/move_vertex_off.svg new file mode 100644 index 0000000..228854f --- /dev/null +++ b/idre/static/admin/img/gis/move_vertex_off.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/idre/static/admin/img/gis/move_vertex_on.svg b/idre/static/admin/img/gis/move_vertex_on.svg new file mode 100644 index 0000000..96b87fd --- /dev/null +++ b/idre/static/admin/img/gis/move_vertex_on.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/idre/static/admin/img/icon-addlink.svg b/idre/static/admin/img/icon-addlink.svg new file mode 100644 index 0000000..e004fb1 --- /dev/null +++ b/idre/static/admin/img/icon-addlink.svg @@ -0,0 +1,3 @@ + diff --git a/idre/static/admin/img/icon-alert.svg b/idre/static/admin/img/icon-alert.svg new file mode 100644 index 0000000..e51ea83 --- /dev/null +++ b/idre/static/admin/img/icon-alert.svg @@ -0,0 +1,3 @@ + diff --git a/idre/static/admin/img/icon-calendar.svg b/idre/static/admin/img/icon-calendar.svg new file mode 100644 index 0000000..97910a9 --- /dev/null +++ b/idre/static/admin/img/icon-calendar.svg @@ -0,0 +1,9 @@ + diff --git a/idre/static/admin/img/icon-changelink.svg b/idre/static/admin/img/icon-changelink.svg new file mode 100644 index 0000000..bbb137a --- /dev/null +++ b/idre/static/admin/img/icon-changelink.svg @@ -0,0 +1,3 @@ + diff --git a/idre/static/admin/img/icon-clock.svg b/idre/static/admin/img/icon-clock.svg new file mode 100644 index 0000000..bf9985d --- /dev/null +++ b/idre/static/admin/img/icon-clock.svg @@ -0,0 +1,9 @@ + diff --git a/idre/static/admin/img/icon-deletelink.svg b/idre/static/admin/img/icon-deletelink.svg new file mode 100644 index 0000000..4059b15 --- /dev/null +++ b/idre/static/admin/img/icon-deletelink.svg @@ -0,0 +1,3 @@ + diff --git a/idre/static/admin/img/icon-no.svg b/idre/static/admin/img/icon-no.svg new file mode 100644 index 0000000..2e0d383 --- /dev/null +++ b/idre/static/admin/img/icon-no.svg @@ -0,0 +1,3 @@ + diff --git a/idre/static/admin/img/icon-unknown-alt.svg b/idre/static/admin/img/icon-unknown-alt.svg new file mode 100644 index 0000000..1c6b99f --- /dev/null +++ b/idre/static/admin/img/icon-unknown-alt.svg @@ -0,0 +1,3 @@ + diff --git a/idre/static/admin/img/icon-unknown.svg b/idre/static/admin/img/icon-unknown.svg new file mode 100644 index 0000000..50b4f97 --- /dev/null +++ b/idre/static/admin/img/icon-unknown.svg @@ -0,0 +1,3 @@ + diff --git a/idre/static/admin/img/icon-yes.svg b/idre/static/admin/img/icon-yes.svg new file mode 100644 index 0000000..5883d87 --- /dev/null +++ b/idre/static/admin/img/icon-yes.svg @@ -0,0 +1,3 @@ + diff --git a/idre/static/admin/img/inline-delete.svg b/idre/static/admin/img/inline-delete.svg new file mode 100644 index 0000000..17d1ad6 --- /dev/null +++ b/idre/static/admin/img/inline-delete.svg @@ -0,0 +1,3 @@ + diff --git a/idre/static/admin/img/search.svg b/idre/static/admin/img/search.svg new file mode 100644 index 0000000..c8c69b2 --- /dev/null +++ b/idre/static/admin/img/search.svg @@ -0,0 +1,3 @@ + diff --git a/idre/static/admin/img/selector-icons.svg b/idre/static/admin/img/selector-icons.svg new file mode 100644 index 0000000..926b8e2 --- /dev/null +++ b/idre/static/admin/img/selector-icons.svg @@ -0,0 +1,34 @@ + diff --git a/idre/static/admin/img/sorting-icons.svg b/idre/static/admin/img/sorting-icons.svg new file mode 100644 index 0000000..7c31ec9 --- /dev/null +++ b/idre/static/admin/img/sorting-icons.svg @@ -0,0 +1,19 @@ + diff --git a/idre/static/admin/img/tooltag-add.svg b/idre/static/admin/img/tooltag-add.svg new file mode 100644 index 0000000..1ca64ae --- /dev/null +++ b/idre/static/admin/img/tooltag-add.svg @@ -0,0 +1,3 @@ + diff --git a/idre/static/admin/img/tooltag-arrowright.svg b/idre/static/admin/img/tooltag-arrowright.svg new file mode 100644 index 0000000..b664d61 --- /dev/null +++ b/idre/static/admin/img/tooltag-arrowright.svg @@ -0,0 +1,3 @@ + diff --git a/idre/static/admin/js/SelectBox.js b/idre/static/admin/js/SelectBox.js new file mode 100644 index 0000000..1a14959 --- /dev/null +++ b/idre/static/admin/js/SelectBox.js @@ -0,0 +1,144 @@ +(function($) { + 'use strict'; + var SelectBox = { + cache: {}, + init: function(id) { + var box = document.getElementById(id); + var node; + SelectBox.cache[id] = []; + var cache = SelectBox.cache[id]; + var boxOptions = box.options; + var boxOptionsLength = boxOptions.length; + for (var i = 0, j = boxOptionsLength; i < j; i++) { + node = boxOptions[i]; + cache.push({value: node.value, text: node.text, displayed: 1}); + } + }, + redisplay: function(id) { + // Repopulate HTML select box from cache + var box = document.getElementById(id); + var node; + $(box).empty(); // clear all options + var new_options = box.outerHTML.slice(0, -9); // grab just the opening tag + var cache = SelectBox.cache[id]; + for (var i = 0, j = cache.length; i < j; i++) { + node = cache[i]; + if (node.displayed) { + var new_option = new Option(node.text, node.value, false, false); + // Shows a tooltip when hovering over the option + new_option.setAttribute("title", node.text); + new_options += new_option.outerHTML; + } + } + new_options += ''; + box.outerHTML = new_options; + }, + filter: function(id, text) { + // Redisplay the HTML select box, displaying only the choices containing ALL + // the words in text. (It's an AND search.) + var tokens = text.toLowerCase().split(/\s+/); + var node, token; + var cache = SelectBox.cache[id]; + for (var i = 0, j = cache.length; i < j; i++) { + node = cache[i]; + node.displayed = 1; + var node_text = node.text.toLowerCase(); + var numTokens = tokens.length; + for (var k = 0; k < numTokens; k++) { + token = tokens[k]; + if (node_text.indexOf(token) === -1) { + node.displayed = 0; + break; // Once the first token isn't found we're done + } + } + } + SelectBox.redisplay(id); + }, + delete_from_cache: function(id, value) { + var node, delete_index = null; + var cache = SelectBox.cache[id]; + for (var i = 0, j = cache.length; i < j; i++) { + node = cache[i]; + 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 + var node; + var cache = SelectBox.cache[id]; + for (var i = 0, j = cache.length; i < j; i++) { + node = cache[i]; + if (node.value === value) { + return true; + } + } + return false; + }, + move: function(from, to) { + var from_box = document.getElementById(from); + var option; + var boxOptions = from_box.options; + var boxOptionsLength = boxOptions.length; + for (var i = 0, j = boxOptionsLength; i < j; i++) { + option = boxOptions[i]; + var 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) { + var from_box = document.getElementById(from); + var option; + var boxOptions = from_box.options; + var boxOptionsLength = boxOptions.length; + for (var i = 0, j = boxOptionsLength; i < j; i++) { + option = boxOptions[i]; + var 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(); + try { + if (a > b) { + return 1; + } + if (a < b) { + return -1; + } + } + catch (e) { + // silently fail on IE 'unknown' exception + } + return 0; + } ); + }, + select_all: function(id) { + var box = document.getElementById(id); + var boxOptions = box.options; + var boxOptionsLength = boxOptions.length; + for (var i = 0; i < boxOptionsLength; i++) { + boxOptions[i].selected = 'selected'; + } + } + }; + window.SelectBox = SelectBox; +})(django.jQuery); diff --git a/idre/static/admin/js/SelectFilter2.js b/idre/static/admin/js/SelectFilter2.js new file mode 100644 index 0000000..0f9a188 --- /dev/null +++ b/idre/static/admin/js/SelectFilter2.js @@ -0,0 +1,236 @@ +/*global SelectBox, addEvent, gettext, interpolate, quickElement, SelectFilter*/ +/* +SelectFilter2 - Turns a multiple-select box into a filter interface. + +Requires jQuery, core.js, and SelectBox.js. +*/ +(function($) { + 'use strict'; + function findForm(node) { + // returns the node of the form containing the given node + if (node.tagName.toLowerCase() !== 'form') { + return findForm(node.parentNode); + } + return node; + } + + window.SelectFilter = { + init: function(field_id, field_name, is_stacked) { + if (field_id.match(/__prefix__/)) { + // Don't initialize on empty forms. + return; + } + var from_box = document.getElementById(field_id); + from_box.id += '_from'; // change its ID + from_box.className = 'filtered'; + + var ps = from_box.parentNode.getElementsByTagName('p'); + for (var i = 0; i < ps.length; i++) { + if (ps[i].className.indexOf("info") !== -1) { + // Remove
, because it just gets in the way. + from_box.parentNode.removeChild(ps[i]); + } else if (ps[i].className.indexOf("help") !== -1) { + // Move help text up to the top so it isn't below the select + // boxes or wrapped off on the side to the right of the add + // button: + from_box.parentNode.insertBefore(ps[i], from_box.parentNode.firstChild); + } + } + + //