diff --git a/.scss-lint.yml b/.scss-lint.yml index a8223adddc..a384daa189 100644 --- a/.scss-lint.yml +++ b/.scss-lint.yml @@ -60,6 +60,8 @@ linters: IdSelector: enabled: true + exclude: + - '**/choose_parent_page.scss' ImportantRule: enabled: false @@ -99,6 +101,7 @@ linters: - '**/_streamfield.scss' - '**/page-editor.scss' - '**/_datetimepicker.scss' + - '**/choose_parent_page.scss' PlaceholderInExtend: enabled: false @@ -167,5 +170,3 @@ linters: ZeroUnit: enabled: true - - diff --git a/gulpfile.js/config.js b/gulpfile.js/config.js index e1b7dd635d..d53a20dc23 100644 --- a/gulpfile.js/config.js +++ b/gulpfile.js/config.js @@ -14,7 +14,7 @@ App.prototype.scssIncludePaths = function() { return [this.sourceFiles]; }; App.prototype.scssSources = function() { - // Assume that any scss we care about is always within the expected + // Assume that any scss we care about is always within the expected // "appname/static_url/appname/scss/" folder. // NB: this requires the user to adhere to sass's underscore prefixing // to tell the compiler what files are includes. @@ -34,11 +34,7 @@ var apps = [ 'appName': 'wagtailsettings', }), new App('wagtail/contrib/modeladmin', { - 'scss': [ - 'modeladmin/scss/index.scss', - 'modeladmin/scss/choose_parent_page.scss', - - ], + 'appName': 'wagtailmodeladmin', }), ]; diff --git a/wagtail/contrib/modeladmin/static_src/modeladmin/scss/index.scss b/wagtail/contrib/modeladmin/static_src/modeladmin/scss/index.scss deleted file mode 100644 index 25c0cb4a94..0000000000 --- a/wagtail/contrib/modeladmin/static_src/modeladmin/scss/index.scss +++ /dev/null @@ -1,147 +0,0 @@ -.content header { margin-bottom: 0; } -#result_list { - padding: 0 15px; -} -#result_list table { margin-bottom:0; } -#result_list tbody th { - background-color: transparent; - text-align: left; - padding: 1.2em 1em; -} -#result_list tbody tr:hover ul.actions { - visibility: visible; -} -#result_list tbody td, #result_list tbody th { - vertical-align: top; -} - -#changelist-filter { - padding: 0 15px; -} - -#changelist-filter h2 { - background-color: #fafafa; - font-size: 13px; - line-height: 31px; - margin-top: 0; - padding-left: 8px; - border-bottom: 1px solid #E6E6E6; -} - -#changelist-filter h3 { - font-size: 12px; - margin-bottom: 0; -} - -#changelist-filter ul { - padding-left: 0; - margin-bottom: 25px; -} - -#changelist-filter li { - list-style-type: none; - margin: 0 0 4px; - padding-left: 0; -} - -#changelist-filter a { - font-family: Open Sans,Arial,sans-serif; - border-radius: 3px; - width: auto; - line-height: 1.2em; - padding: 8px 12px; - font-size: 0.9em; - font-weight: normal; - vertical-align: middle; - display: block; - background-color: white; - border: 1px solid #43b1b0; - color: #43b1b0; - text-decoration: none; - text-transform: uppercase; - position: relative; - overflow: hidden; - outline: none; - box-sizing: border-box; - -webkit-font-smoothing: auto; - -moz-appearance: none; - -moz-box-sizing: border-box; -} - -#changelist-filter a:hover { - background-color: #358c8b; - border-color: #358c8b; - color: white; - -} - -#changelist-filter li.selected a { - color: white !important; - border-color: #43b1b0 !important; - background-color: #43b1b0; -} - -.no-search-results { - margin-top: 30px; -} - -.no-search-results h2 { - padding-top: 0.3em; - margin-bottom: 0.3em; -} - -.no-search-results img { - float: left; - margin: 0 15px 15px 0; - width: 50px; -} - -div.pagination { - margin-top: 3em; - border-top: 1px dashed #d9d9d9; - padding: 2em 1em 0; -} -div.pagination ul { - margin-top: -1.25em -} -p.no-results { - margin: 30px 1em 0; -} - -@media screen and (min-width: 50em) { - #changelist-filter { - float: right; - padding: 0 1.5%; - } - #result_list { - padding: 0 1.5% 0 0; - } - #result_list tbody th:first-child { - padding-left: 50px; - } - #result_list.col12 tbody td:last-child { - padding-right: 50px; - } - div.pagination { - padding-left: 50px; - padding-right: 50px; - } - div.pagination.col9 { - width: 73.5%; - } - p.no-results { - margin: 30px 50px 0; - } -} - -@media screen and (min-width: 1200px) { - #result_list.col9 { - width: 79%; - } - #changelist-filter { - width: 21%; - } - div.pagination.col9 { - width: 77.5%; - } -} diff --git a/wagtail/contrib/modeladmin/static_src/modeladmin/scss/choose_parent_page.scss b/wagtail/contrib/modeladmin/static_src/wagtailmodeladmin/scss/choose_parent_page.scss similarity index 57% rename from wagtail/contrib/modeladmin/static_src/modeladmin/scss/choose_parent_page.scss rename to wagtail/contrib/modeladmin/static_src/wagtailmodeladmin/scss/choose_parent_page.scss index dc018a91e7..a412e176ec 100644 --- a/wagtail/contrib/modeladmin/static_src/modeladmin/scss/choose_parent_page.scss +++ b/wagtail/contrib/modeladmin/static_src/wagtailmodeladmin/scss/choose_parent_page.scss @@ -1,6 +1,7 @@ #id_parent_page li { - margin: 15px 0; + margin: 15px 0; } + #id_parent_page li label { - float: none; + float: none; } diff --git a/wagtail/contrib/modeladmin/static_src/wagtailmodeladmin/scss/index.scss b/wagtail/contrib/modeladmin/static_src/wagtailmodeladmin/scss/index.scss new file mode 100644 index 0000000000..5f2dd82a99 --- /dev/null +++ b/wagtail/contrib/modeladmin/static_src/wagtailmodeladmin/scss/index.scss @@ -0,0 +1,173 @@ +.content header { + margin-bottom: 0; +} + + +.result-list { + padding: 0 15px; + + table { + margin-bottom: 0; + } + + body th { + background-color: transparent; + text-align: left; + padding: 1.2em 1em; + } + + tbody tr:hover ul.actions { + visibility: visible; + } + + tbody td, + tbody th { + vertical-align: top; + } +} + + +.changelist-filter { + padding: 0 15px; + + h2 { + background-color: #fafafa; + font-size: 13px; + line-height: 31px; + margin-top: 0; + padding-left: 8px; + border-bottom: 1px solid #e6e6e6; + } + + h3 { + font-size: 12px; + margin-bottom: 0; + } + + ul { + padding-left: 0; + margin-bottom: 25px; + } + + li { + list-style-type: none; + margin: 0 0 4px; + padding-left: 0; + } + + a { + font-family: Open Sans,Arial,sans-serif; + border-radius: 3px; + width: auto; + line-height: 1.2em; + padding: 8px 12px; + font-size: 0.9em; + font-weight: normal; + vertical-align: middle; + display: block; + background-color: #fff; + border: 1px solid #43b1b0; + color: #43b1b0; + text-decoration: none; + text-transform: uppercase; + position: relative; + overflow: hidden; + outline: none; + box-sizing: border-box; + -webkit-font-smoothing: auto; + -moz-appearance: none; + -moz-box-sizing: border-box; + + &:hover { + background-color: #358c8b; + border-color: #358c8b; + color: #fff; + } + } + + li.selected a { + color: #fff !important; + border-color: #43b1b0 !important; + background-color: #43b1b0; + } +} + + +.no-search-results { + margin-top: 30px; + + h2 { + padding-top: 0.3em; + margin-bottom: 0.3em; + } + + img { + float: left; + margin: 0 15px 15px 0; + width: 50px; + } +} + + +div.pagination { + margin-top: 3em; + border-top: 1px dashed #d9d9d9; + padding: 2em 1em 0; + + ul { + margin-top: -1.25em; + } +} + + +p.no-results { + margin: 30px 1em 0; +} + + +@media screen and (min-width: 50em) { + .changelist-filter { + float: right; + padding: 0 1.5%; + } + + .result-list { + padding: 0 1.5% 0 0; + } + + .result-list tbody th:first-child { + padding-left: 50px; + } + + .result-list.col12 tbody td:last-child { + padding-right: 50px; + } + + div.pagination { + padding-left: 50px; + padding-right: 50px; + } + + div.pagination.col9 { + width: 73.5%; + } + + p.no-results { + margin: 30px 50px 0; + } +} + + +@media screen and (min-width: 1200px) { + .result-list.col9 { + width: 79%; + } + + .changelist-filter { + width: 21%; + } + + div.pagination.col9 { + width: 77.5%; + } +} diff --git a/wagtail/contrib/modeladmin/templates/modeladmin/choose_parent.html b/wagtail/contrib/modeladmin/templates/modeladmin/choose_parent.html index b67e62fc62..ff68dcc094 100644 --- a/wagtail/contrib/modeladmin/templates/modeladmin/choose_parent.html +++ b/wagtail/contrib/modeladmin/templates/modeladmin/choose_parent.html @@ -14,7 +14,7 @@ {% block content %} -
+
{% block header %} {% include "modeladmin/includes/breadcrumb.html" %} @@ -39,5 +39,3 @@
{% endblock %} - - diff --git a/wagtail/contrib/modeladmin/templates/modeladmin/index.html b/wagtail/contrib/modeladmin/templates/modeladmin/index.html index bd8bacc9b5..dedae3c831 100644 --- a/wagtail/contrib/modeladmin/templates/modeladmin/index.html +++ b/wagtail/contrib/modeladmin/templates/modeladmin/index.html @@ -36,20 +36,20 @@ {% endblock %} {% block content_main %} -
-
+
+
{% block content_cols %} {% block filters %} {% if view.has_filters and all_count %} -
+

{% trans 'Filter' %}

{% for spec in view.filter_specs %}{% admin_list_filter view spec %}{% endfor %}
{% endif %} {% endblock %} -
+
{% block result_list %} {% if not all_count %}
@@ -62,7 +62,7 @@

{% blocktrans with view.verbose_name_plural as name %}No {{ name }} have been created yet.{% endblocktrans %} {% if user_can_create %} {% blocktrans with view.create_url as url %} - Why not add one? + Why not add one? {% endblocktrans %} {% endif %}

{% endif %} diff --git a/wagtail/contrib/modeladmin/templates/modeladmin/inspect.html b/wagtail/contrib/modeladmin/templates/modeladmin/inspect.html index 80540409e7..e42ae16840 100644 --- a/wagtail/contrib/modeladmin/templates/modeladmin/inspect.html +++ b/wagtail/contrib/modeladmin/templates/modeladmin/inspect.html @@ -12,7 +12,7 @@ {% endblock %} {% block content %} -
+
{% block header %} {% include "modeladmin/includes/breadcrumb.html" %} @@ -51,5 +51,3 @@ {% endif %} {% endblock %} {% endblock %} - -