Skip to content

Commit debb587

Browse files
[5.0] Select Schedule Task css (#41871)
* [5.0] Select Schedule Task css The select task view is the same as the select module view except it uses its own css file with invalid css. This PR changes that so that it uses an scss file in exactly the same way as com_modules. This removes the invalid css and makes it more maintainable. * section * Merge remote-tracking branch 'origin/5.0-dev' into 6_com_scheduler * Revert "Merge remote-tracking branch 'origin/5.0-dev' into 6_com_scheduler" This reverts commit 3bb1df2. * Revert "Auxiliary commit to revert individual files from df98bc9" This reverts commit a9e3bedc2cc97deb806be1138fe0402e30c2e932. * assets - thanks @wilsonge * sync with #41920 * js fix * js --------- Co-authored-by: Richard Fath <[email protected]> Co-authored-by: Richard Fath <[email protected]>
1 parent 3454262 commit debb587

File tree

11 files changed

+122
-69
lines changed

11 files changed

+122
-69
lines changed

administrator/components/com_admin/script.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2173,6 +2173,9 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
21732173
'/libraries/vendor/fgrosse/phpasn1/LICENSE',
21742174
'/libraries/vendor/stella-maris/clock/LICENSE.md',
21752175
'/libraries/vendor/stella-maris/clock/src/ClockInterface.php',
2176+
'/media/com_scheduler/css/admin-view-select-task.css',
2177+
'/media/com_scheduler/css/admin-view-select-task.min.css',
2178+
'/media/com_scheduler/css/admin-view-select-task.min.css.gz',
21762179
'/media/system/css/calendar-jos.css',
21772180
'/media/system/css/calendar-jos.min.css',
21782181
'/media/system/css/calendar-jos.min.css.gz',

administrator/components/com_scheduler/tmpl/select/default.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
$app = $this->app;
2424

2525
$wa = $this->document->getWebAssetManager();
26-
$wa->useStyle('com_scheduler.admin-view-select-task-css');
2726
$wa->useScript('com_scheduler.admin-view-select-task-search');
2827

2928
?>
@@ -75,7 +74,7 @@ class="visually-hidden"><?php echo Text::_('INFO'); ?></span>
7574
aria-label="<?php echo Text::sprintf('COM_SCHEDULER_SELECT_TASK_TYPE', $name); ?>">
7675
<div class="new-task-details">
7776
<h3 class="new-task-title"><?php echo $name; ?></h3>
78-
<p class="card-body new-task-caption p-0">
77+
<p class="new-task-caption p-0">
7978
<?php echo $desc; ?>
8079
</p>
8180
</div>

administrator/language/en-GB/plg_behaviour_compat.ini

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
PLG_BEHAVIOUR_COMPAT="Behaviour - Backward Compatibility"
77
PLG_COMPAT_FIELD_CLASSES_ALIASES_LABEL="Classes Aliases"
88
PLG_COMPAT_FIELD_CLASSES_ALIASES_DESCRIPTION="Add class aliases for classes which have been renamed or moved to a namespace."
9-
PLG_COMPAT_FIELD_ES5_ASSETS_LABEL="ES5 Assets"
109
PLG_COMPAT_FIELD_ES5_ASSETS_DESCRIPTION="Activate this option if your extension requires *.es5 assets which has resulted in an exception. The assets provided are empty but prevent the exception."
10+
PLG_COMPAT_FIELD_ES5_ASSETS_LABEL="ES5 Assets"
11+
PLG_COMPAT_FIELD_REMOVED_ASSETS_DESCRIPTION="Activate this option if your extension requires removed assets which has resulted in an exception. The assets provided are empty but prevent the exception."
12+
PLG_COMPAT_FIELD_REMOVED_ASSETS_LABEL="Removed Assets"
1113
PLG_COMPAT_XML_DESCRIPTION="If you use extensions which are not using the current Joomla Coding standards then this plugin, when enabled, will provide backward compatibility to the prior major version."

build/media_source/com_scheduler/css/admin-view-select-task.css

Lines changed: 0 additions & 60 deletions
This file was deleted.

build/media_source/com_scheduler/joomla.asset.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@
3838
"type": "module"
3939
}
4040
},
41-
{
42-
"name": "com_scheduler.admin-view-select-task-css",
43-
"type": "style",
44-
"uri": "com_scheduler/admin-view-select-task.css"
45-
},
4641
{
4742
"name": "com_scheduler.admin-view-task-css",
4843
"type": "style",

build/media_source/com_scheduler/js/admin-view-select-task-search.es6.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ if (elSearch && elSearchContainer) {
6262
}
6363

6464
const cardHeader = card.querySelector('.new-task-title');
65-
const cardBody = card.querySelector('.card-body');
65+
const cardBody = card.querySelector('.new-task-caption');
6666
const title = cardHeader ? cardHeader.textContent : '';
6767
const description = cardBody ? cardBody.textContent : '';
6868

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"$schema": "https://developer.joomla.org/schemas/json-schema/web_assets.json",
3+
"name": "plg_behaviour_compat",
4+
"version": "5.0.0",
5+
"description": "Joomla CMS Removed Assets b/c entries, the entries are only placeholders without functionality.",
6+
"license": "GPL-2.0-or-later",
7+
"assets": [
8+
{
9+
"name": "com_scheduler.admin-view-select-task-css",
10+
"type": "style",
11+
"deprecated": true,
12+
"uri": ""
13+
}
14+
]
15+
}
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
.new-tasks {
2+
// We use the same colours for the new task section as we do for the quickicons.
3+
--text-color: var(--template-quickicon-color);
4+
--bg-color: hsl(var(--hue), 60%, 97%);
5+
--bg-color-hvr: var(--template-bg-dark);
6+
--icon-color: var(--template-quickicon-color);
7+
--icon-color-hvr: hsl(var(--hue), 50%, 93%);
8+
9+
.card-columns {
10+
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
11+
}
12+
}
13+
14+
@if $enable-dark-mode {
15+
@include color-mode(dark) {
16+
.new-tasks {
17+
--bg-color: var(--template-bg-dark-80);
18+
--bg-color-hvr: var(--template-bg-dark-65);
19+
--icon-color: var(--template-bg-dark-80);
20+
--icon-color-hvr: var(--template-quickicon-color);
21+
}
22+
}
23+
}
24+
25+
.new-task {
26+
display: flex;
27+
overflow: hidden;
28+
color: var(--text-color);
29+
background-color: var(--bg-color);
30+
border: 1px solid hsl(var(--hue), 50%, 93%);
31+
border-radius: $border-radius;
32+
33+
* {
34+
transition: all .25s ease;
35+
}
36+
37+
&-details {
38+
flex: 1 0;
39+
padding: 1rem;
40+
}
41+
42+
&-title {
43+
margin-bottom: .25rem;
44+
font-size: 1rem;
45+
font-weight: 700;
46+
}
47+
48+
&-caption {
49+
display: flex;
50+
margin: 0;
51+
font-size: .875rem;
52+
}
53+
54+
&-link {
55+
display: flex;
56+
align-items: flex-end;
57+
justify-content: center;
58+
width: 2.5rem;
59+
font-size: 1.2rem;
60+
background: hsl(var(--hue), 50%, 93%);
61+
62+
span {
63+
margin-bottom: 10px;
64+
color: var(--icon-color);
65+
}
66+
67+
.new-task:hover & {
68+
background: var(--bg-color-hvr);
69+
70+
span {
71+
color: var(--icon-color-hvr);
72+
}
73+
}
74+
}
75+
}

build/media_source/templates/administrator/atum/scss/template.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
@import "pages/com_modules";
7474
@import "pages/com_tags";
7575
@import "pages/com_privacy";
76+
@import "pages/com_scheduler";
7677
@import "pages/com_templates";
7778
@import "pages/com_users";
7879

plugins/behaviour/compat/compat.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,18 @@
4545
<option value="0">JNO</option>
4646
<option value="1">JYES</option>
4747
</field>
48+
<field
49+
name="removed_asset"
50+
type="radio"
51+
label="PLG_COMPAT_FIELD_REMOVED_ASSETS_LABEL"
52+
description="PLG_COMPAT_FIELD_REMOVED_ASSETS_DESCRIPTION"
53+
layout="joomla.form.field.radio.switcher"
54+
default="1"
55+
filter="integer"
56+
>
57+
<option value="0">JNO</option>
58+
<option value="1">JYES</option>
59+
</field>
4860
</fieldset>
4961
</fields>
5062
</config>

0 commit comments

Comments
 (0)