From 9affbcd1329491b108ac454406238b0b0965ff97 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 7 Oct 2016 16:38:48 +0200 Subject: Cleaning of chimere_example_project --- chimere/fixtures/first_data.json | 853 +++++++++++++++++++++ chimere/static/chimere/css/form-compat.css | 69 ++ chimere/static/chimere/img/logo.jpg | Bin 0 -> 25981 bytes chimere/static/chimere/js/interface.js | 73 ++ .../static/fonts/glyphicons-halflings-regular.eot | Bin 0 -> 20335 bytes .../static/fonts/glyphicons-halflings-regular.svg | 229 ++++++ .../static/fonts/glyphicons-halflings-regular.ttf | Bin 0 -> 41280 bytes .../static/fonts/glyphicons-halflings-regular.woff | Bin 0 -> 23320 bytes 8 files changed, 1224 insertions(+) create mode 100644 chimere/fixtures/first_data.json create mode 100644 chimere/static/chimere/css/form-compat.css create mode 100644 chimere/static/chimere/img/logo.jpg create mode 100644 chimere/static/chimere/js/interface.js create mode 100644 chimere/static/fonts/glyphicons-halflings-regular.eot create mode 100644 chimere/static/fonts/glyphicons-halflings-regular.svg create mode 100644 chimere/static/fonts/glyphicons-halflings-regular.ttf create mode 100644 chimere/static/fonts/glyphicons-halflings-regular.woff (limited to 'chimere') diff --git a/chimere/fixtures/first_data.json b/chimere/fixtures/first_data.json new file mode 100644 index 0000000..814e8e0 --- /dev/null +++ b/chimere/fixtures/first_data.json @@ -0,0 +1,853 @@ +[ + { + "pk": 20, + "model": "contenttypes.contenttype", + "fields": { + "model": "area", + "name": "Area", + "app_label": "chimere" + } + }, + { + "pk": 14, + "model": "contenttypes.contenttype", + "fields": { + "model": "category", + "name": "Category", + "app_label": "chimere" + } + }, + { + "pk": 13, + "model": "contenttypes.contenttype", + "fields": { + "model": "color", + "name": "Color", + "app_label": "chimere" + } + }, + { + "pk": 12, + "model": "contenttypes.contenttype", + "fields": { + "model": "colortheme", + "name": "Color theme", + "app_label": "chimere" + } + }, + { + "pk": 6, + "model": "contenttypes.contenttype", + "fields": { + "model": "contenttype", + "name": "content type", + "app_label": "contenttypes" + } + }, + { + "pk": 2, + "model": "contenttypes.contenttype", + "fields": { + "model": "group", + "name": "group", + "app_label": "auth" + } + }, + { + "pk": 15, + "model": "contenttypes.contenttype", + "fields": { + "model": "icon", + "name": "Icon", + "app_label": "chimere" + } + }, + { + "pk": 5, + "model": "contenttypes.contenttype", + "fields": { + "model": "logentry", + "name": "log entry", + "app_label": "admin" + } + }, + { + "pk": 4, + "model": "contenttypes.contenttype", + "fields": { + "model": "message", + "name": "message", + "app_label": "auth" + } + }, + { + "pk": 9, + "model": "contenttypes.contenttype", + "fields": { + "model": "migrationhistory", + "name": "migration history", + "app_label": "south" + } + }, + { + "pk": 10, + "model": "contenttypes.contenttype", + "fields": { + "model": "news", + "name": "News", + "app_label": "chimere" + } + }, + { + "pk": 1, + "model": "contenttypes.contenttype", + "fields": { + "model": "permission", + "name": "permission", + "app_label": "auth" + } + }, + { + "pk": 17, + "model": "contenttypes.contenttype", + "fields": { + "model": "marker", + "name": "Point of interest", + "app_label": "chimere" + } + }, + { + "pk": 22, + "model": "contenttypes.contenttype", + "fields": { + "model": "property", + "name": "Property", + "app_label": "chimere" + } + }, + { + "pk": 21, + "model": "contenttypes.contenttype", + "fields": { + "model": "propertymodel", + "name": "Property model", + "app_label": "chimere" + } + }, + { + "pk": 19, + "model": "contenttypes.contenttype", + "fields": { + "model": "route", + "name": "Route", + "app_label": "chimere" + } + }, + { + "pk": 18, + "model": "contenttypes.contenttype", + "fields": { + "model": "routefile", + "name": "Route file", + "app_label": "chimere" + } + }, + { + "pk": 7, + "model": "contenttypes.contenttype", + "fields": { + "model": "session", + "name": "session", + "app_label": "sessions" + } + }, + { + "pk": 8, + "model": "contenttypes.contenttype", + "fields": { + "model": "site", + "name": "site", + "app_label": "sites" + } + }, + { + "pk": 16, + "model": "contenttypes.contenttype", + "fields": { + "model": "subcategory", + "name": "Subcategory", + "app_label": "chimere" + } + }, + { + "pk": 11, + "model": "contenttypes.contenttype", + "fields": { + "model": "tinyurl", + "name": "TinyUrl", + "app_label": "chimere" + } + }, + { + "pk": 3, + "model": "contenttypes.contenttype", + "fields": { + "model": "user", + "name": "user", + "app_label": "auth" + } + }, + { + "pk": 1, + "model": "sites.site", + "fields": { + "domain": "example.com", + "name": "example.com" + } + }, + { + "pk": 13, + "model": "auth.permission", + "fields": { + "codename": "add_logentry", + "name": "Can add log entry", + "content_type": 5 + } + }, + { + "pk": 14, + "model": "auth.permission", + "fields": { + "codename": "change_logentry", + "name": "Can change log entry", + "content_type": 5 + } + }, + { + "pk": 15, + "model": "auth.permission", + "fields": { + "codename": "delete_logentry", + "name": "Can delete log entry", + "content_type": 5 + } + }, + { + "pk": 4, + "model": "auth.permission", + "fields": { + "codename": "add_group", + "name": "Can add group", + "content_type": 2 + } + }, + { + "pk": 5, + "model": "auth.permission", + "fields": { + "codename": "change_group", + "name": "Can change group", + "content_type": 2 + } + }, + { + "pk": 6, + "model": "auth.permission", + "fields": { + "codename": "delete_group", + "name": "Can delete group", + "content_type": 2 + } + }, + { + "pk": 10, + "model": "auth.permission", + "fields": { + "codename": "add_message", + "name": "Can add message", + "content_type": 4 + } + }, + { + "pk": 11, + "model": "auth.permission", + "fields": { + "codename": "change_message", + "name": "Can change message", + "content_type": 4 + } + }, + { + "pk": 12, + "model": "auth.permission", + "fields": { + "codename": "delete_message", + "name": "Can delete message", + "content_type": 4 + } + }, + { + "pk": 1, + "model": "auth.permission", + "fields": { + "codename": "add_permission", + "name": "Can add permission", + "content_type": 1 + } + }, + { + "pk": 2, + "model": "auth.permission", + "fields": { + "codename": "change_permission", + "name": "Can change permission", + "content_type": 1 + } + }, + { + "pk": 3, + "model": "auth.permission", + "fields": { + "codename": "delete_permission", + "name": "Can delete permission", + "content_type": 1 + } + }, + { + "pk": 7, + "model": "auth.permission", + "fields": { + "codename": "add_user", + "name": "Can add user", + "content_type": 3 + } + }, + { + "pk": 8, + "model": "auth.permission", + "fields": { + "codename": "change_user", + "name": "Can change user", + "content_type": 3 + } + }, + { + "pk": 9, + "model": "auth.permission", + "fields": { + "codename": "delete_user", + "name": "Can delete user", + "content_type": 3 + } + }, + { + "pk": 58, + "model": "auth.permission", + "fields": { + "codename": "add_area", + "name": "Can add Area", + "content_type": 20 + } + }, + { + "pk": 59, + "model": "auth.permission", + "fields": { + "codename": "change_area", + "name": "Can change Area", + "content_type": 20 + } + }, + { + "pk": 60, + "model": "auth.permission", + "fields": { + "codename": "delete_area", + "name": "Can delete Area", + "content_type": 20 + } + }, + { + "pk": 40, + "model": "auth.permission", + "fields": { + "codename": "add_route", + "name": "Can add Route", + "content_type": 14 + } + }, + { + "pk": 41, + "model": "auth.permission", + "fields": { + "codename": "change_route", + "name": "Can change Route", + "content_type": 14 + } + }, + { + "pk": 42, + "model": "auth.permission", + "fields": { + "codename": "delete_route", + "name": "Can delete Route", + "content_type": 14 + } + }, + { + "pk": 37, + "model": "auth.permission", + "fields": { + "codename": "add_marker", + "name": "Can add Point of interest", + "content_type": 13 + } + }, + { + "pk": 38, + "model": "auth.permission", + "fields": { + "codename": "change_marker", + "name": "Can change Point of interest", + "content_type": 13 + } + }, + { + "pk": 39, + "model": "auth.permission", + "fields": { + "codename": "delete_marker", + "name": "Can delete Point of interest", + "content_type": 13 + } + }, + { + "pk": 34, + "model": "auth.permission", + "fields": { + "codename": "add_subcategory", + "name": "Can add Subcategory", + "content_type": 12 + } + }, + { + "pk": 35, + "model": "auth.permission", + "fields": { + "codename": "change_subcategory", + "name": "Can change Subcategory", + "content_type": 12 + } + }, + { + "pk": 36, + "model": "auth.permission", + "fields": { + "codename": "delete_subcategory", + "name": "Can delete Subcategory", + "content_type": 12 + } + }, + { + "pk": 43, + "model": "auth.permission", + "fields": { + "codename": "add_area", + "name": "Can add Area", + "content_type": 15 + } + }, + { + "pk": 44, + "model": "auth.permission", + "fields": { + "codename": "change_area", + "name": "Can change Area", + "content_type": 15 + } + }, + { + "pk": 45, + "model": "auth.permission", + "fields": { + "codename": "delete_area", + "name": "Can delete Area", + "content_type": 15 + } + }, + { + "pk": 49, + "model": "auth.permission", + "fields": { + "codename": "add_property", + "name": "Can add Property", + "content_type": 17 + } + }, + { + "pk": 50, + "model": "auth.permission", + "fields": { + "codename": "change_property", + "name": "Can change Property", + "content_type": 17 + } + }, + { + "pk": 51, + "model": "auth.permission", + "fields": { + "codename": "delete_property", + "name": "Can delete Property", + "content_type": 17 + } + }, + { + "pk": 28, + "model": "auth.permission", + "fields": { + "codename": "add_category", + "name": "Can add Category", + "content_type": 10 + } + }, + { + "pk": 29, + "model": "auth.permission", + "fields": { + "codename": "change_category", + "name": "Can change Category", + "content_type": 10 + } + }, + { + "pk": 30, + "model": "auth.permission", + "fields": { + "codename": "delete_category", + "name": "Can delete Category", + "content_type": 10 + } + }, + { + "pk": 64, + "model": "auth.permission", + "fields": { + "codename": "add_property", + "name": "Can add Property", + "content_type": 22 + } + }, + { + "pk": 65, + "model": "auth.permission", + "fields": { + "codename": "change_property", + "name": "Can change Property", + "content_type": 22 + } + }, + { + "pk": 66, + "model": "auth.permission", + "fields": { + "codename": "delete_property", + "name": "Can delete Property", + "content_type": 22 + } + }, + { + "pk": 61, + "model": "auth.permission", + "fields": { + "codename": "add_propertymodel", + "name": "Can add Property model", + "content_type": 21 + } + }, + { + "pk": 62, + "model": "auth.permission", + "fields": { + "codename": "change_propertymodel", + "name": "Can change Property model", + "content_type": 21 + } + }, + { + "pk": 63, + "model": "auth.permission", + "fields": { + "codename": "delete_propertymodel", + "name": "Can delete Property model", + "content_type": 21 + } + }, + { + "pk": 55, + "model": "auth.permission", + "fields": { + "codename": "add_route", + "name": "Can add Route", + "content_type": 19 + } + }, + { + "pk": 56, + "model": "auth.permission", + "fields": { + "codename": "change_route", + "name": "Can change Route", + "content_type": 19 + } + }, + { + "pk": 57, + "model": "auth.permission", + "fields": { + "codename": "delete_route", + "name": "Can delete Route", + "content_type": 19 + } + }, + { + "pk": 52, + "model": "auth.permission", + "fields": { + "codename": "add_routefile", + "name": "Can add Route file", + "content_type": 18 + } + }, + { + "pk": 53, + "model": "auth.permission", + "fields": { + "codename": "change_routefile", + "name": "Can change Route file", + "content_type": 18 + } + }, + { + "pk": 54, + "model": "auth.permission", + "fields": { + "codename": "delete_routefile", + "name": "Can delete Route file", + "content_type": 18 + } + }, + { + "pk": 46, + "model": "auth.permission", + "fields": { + "codename": "add_propertymodel", + "name": "Can add Property model", + "content_type": 16 + } + }, + { + "pk": 47, + "model": "auth.permission", + "fields": { + "codename": "change_propertymodel", + "name": "Can change Property model", + "content_type": 16 + } + }, + { + "pk": 48, + "model": "auth.permission", + "fields": { + "codename": "delete_propertymodel", + "name": "Can delete Property model", + "content_type": 16 + } + }, + { + "pk": 31, + "model": "auth.permission", + "fields": { + "codename": "add_icon", + "name": "Can add Icon", + "content_type": 11 + } + }, + { + "pk": 32, + "model": "auth.permission", + "fields": { + "codename": "change_icon", + "name": "Can change Icon", + "content_type": 11 + } + }, + { + "pk": 33, + "model": "auth.permission", + "fields": { + "codename": "delete_icon", + "name": "Can delete Icon", + "content_type": 11 + } + }, + { + "pk": 16, + "model": "auth.permission", + "fields": { + "codename": "add_contenttype", + "name": "Can add content type", + "content_type": 6 + } + }, + { + "pk": 17, + "model": "auth.permission", + "fields": { + "codename": "change_contenttype", + "name": "Can change content type", + "content_type": 6 + } + }, + { + "pk": 18, + "model": "auth.permission", + "fields": { + "codename": "delete_contenttype", + "name": "Can delete content type", + "content_type": 6 + } + }, + { + "pk": 19, + "model": "auth.permission", + "fields": { + "codename": "add_session", + "name": "Can add session", + "content_type": 7 + } + }, + { + "pk": 20, + "model": "auth.permission", + "fields": { + "codename": "change_session", + "name": "Can change session", + "content_type": 7 + } + }, + { + "pk": 21, + "model": "auth.permission", + "fields": { + "codename": "delete_session", + "name": "Can delete session", + "content_type": 7 + } + }, + { + "pk": 22, + "model": "auth.permission", + "fields": { + "codename": "add_site", + "name": "Can add site", + "content_type": 8 + } + }, + { + "pk": 23, + "model": "auth.permission", + "fields": { + "codename": "change_site", + "name": "Can change site", + "content_type": 8 + } + }, + { + "pk": 24, + "model": "auth.permission", + "fields": { + "codename": "delete_site", + "name": "Can delete site", + "content_type": 8 + } + }, + { + "pk": 25, + "model": "auth.permission", + "fields": { + "codename": "add_news", + "name": "Can add News", + "content_type": 9 + } + }, + { + "pk": 26, + "model": "auth.permission", + "fields": { + "codename": "change_news", + "name": "Can change News", + "content_type": 9 + } + }, + { + "pk": 27, + "model": "auth.permission", + "fields": { + "codename": "delete_news", + "name": "Can delete News", + "content_type": 9 + } + }, + { + "pk": 1, + "model": "auth.group", + "fields": { + "name": "Moderator", + "permissions": [ + 40, + 41, + 42, + 37, + 38, + 39, + 49, + 50, + 51 + ] + } + }, + { + "pk": 2, + "model": "auth.group", + "fields": { + "name": "Application administrator", + "permissions": [ + 40, + 41, + 42, + 37, + 38, + 39, + 34, + 35, + 36, + 43, + 44, + 45, + 49, + 50, + 51, + 28, + 29, + 30, + 31, + 32, + 33, + 25, + 26, + 27 + ] + } + } +] diff --git a/chimere/static/chimere/css/form-compat.css b/chimere/static/chimere/css/form-compat.css new file mode 100644 index 0000000..f83672f --- /dev/null +++ b/chimere/static/chimere/css/form-compat.css @@ -0,0 +1,69 @@ +input:-moz-placeholder { + color: #999999; +} + +input::-moz-placeholder { + color: #999999; +} + +input:-ms-input-placeholder { + color: #999999; +} + +input::-webkit-input-placeholder { + color: #999999; +} + +textarea, +input { + display: block; + font-size: 14px; + line-height: 1.428571429; + color: #555555; + vertical-align: middle; + background-color: #ffffff; + border: 1px solid #cccccc; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; + transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; +} + +input{ + padding: 6px 12px; +} + +textarea:focus, +input:focus { + border-color: #81cf57; + outline: 0; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6); +} + +input[disabled], +input[readonly], +fieldset[disabled] input { + cursor: not-allowed; + background-color: #eeeeee; +} + +input[type="checkbox"], +input[type="radio"] { + display: inline; +} + +.alert-error { + color: #b94a48; + background-color: #f2dede; + border-color: #eed3d7; +} + +.alert-error hr { + border-top-color: #e6c1c7; +} + +.alert-error .alert-link { + color: #953b39; +} diff --git a/chimere/static/chimere/img/logo.jpg b/chimere/static/chimere/img/logo.jpg new file mode 100644 index 0000000..cc2ff36 Binary files /dev/null and b/chimere/static/chimere/img/logo.jpg differ diff --git a/chimere/static/chimere/js/interface.js b/chimere/static/chimere/js/interface.js new file mode 100644 index 0000000..c0c00bf --- /dev/null +++ b/chimere/static/chimere/js/interface.js @@ -0,0 +1,73 @@ +$(function(){ + + if (has_search){ + $('a[href=#categories]').click(function(){ + show_panel(display_categories); + }); + $('a[href=#search-box]').click(function(){ + show_panel(display_search); + }); + $('a[href=#search-box]').click(); + } else { + $("#categories").fadeIn(); + } + highlight_selected_categories(); + $('.subcategory label').click(highlight_selected_categories); + $('#categories-lnk, #search-lnk').click(function(){ + if($('.navbar-toggle').css('display') !='none'){ + $(".navbar-toggle").click(); + } + }); + $('#hide-panel').click(hide_panel); + $('#show-panel').click(show_panel); + $('#close-detail').click(function(){ + $('#detail').fadeOut(); + }); +}); + +function display_categories(){ + $('a[href=#categories]').parent().parent().children().removeClass('active'); + $('a[href=#categories]').parent().addClass('active'); + $("#search-box").fadeOut(400, + function(){ $("#categories").fadeIn(); }); +} + +function display_search(){ + $('a[href=#search-box]').parent().parent().children().removeClass('active'); + $('a[href=#search-box]').parent().addClass('active'); + $("#categories").fadeOut(400, + function(){ $("#search-box").fadeIn(); $('#id_q').focus(); }); +} + +function show_panel(fct){ + if(!fct) fct = function(){}; + if($('#panel').css('display') == 'none'){ + $('#show-panel').fadeOut(200, function(){ + $('#hide-panel').fadeIn(500); + $("#panel").fadeIn(500); + $("#panel").fadeIn(500, fct); + }); + } else { + fct(); + } +} + +function hide_panel(){ + if($('#panel').css('display') != 'none'){ + $('#hide-panel').fadeOut(500); + $("#panel").fadeOut(500, function(){ + $('#show-panel').fadeIn(); + }); + } +} + +function highlight_selected_categories(){ + $('.subcategory input').each(function(){ + var lbl = $(this).parent(); + if($(this).is(':checked')){ + lbl.addClass('selected'); + }else{ + lbl.removeClass('selected'); + } + }); +} diff --git a/chimere/static/fonts/glyphicons-halflings-regular.eot b/chimere/static/fonts/glyphicons-halflings-regular.eot new file mode 100644 index 0000000..4a4ca86 Binary files /dev/null and b/chimere/static/fonts/glyphicons-halflings-regular.eot differ diff --git a/chimere/static/fonts/glyphicons-halflings-regular.svg b/chimere/static/fonts/glyphicons-halflings-regular.svg new file mode 100644 index 0000000..89d2909 --- /dev/null +++ b/chimere/static/fonts/glyphicons-halflings-regular.svg @@ -0,0 +1,229 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/chimere/static/fonts/glyphicons-halflings-regular.ttf b/chimere/static/fonts/glyphicons-halflings-regular.ttf new file mode 100644 index 0000000..67fa00b Binary files /dev/null and b/chimere/static/fonts/glyphicons-halflings-regular.ttf differ diff --git a/chimere/static/fonts/glyphicons-halflings-regular.woff b/chimere/static/fonts/glyphicons-halflings-regular.woff new file mode 100644 index 0000000..8c54182 Binary files /dev/null and b/chimere/static/fonts/glyphicons-halflings-regular.woff differ -- cgit v1.2.3