mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: homework: set default view to list view
This commit is contained in:
1 parent
340b02bbf2
commit
3b7c8c37e0
3 files changed
+4
-3
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/ui-default",
|
"name": "@hydrooj/ui-default",
|
||||||
"version": "4.38.21",
|
"version": "4.38.22",
|
||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"main": "hydro.js",
|
"main": "hydro.js",
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ const page = new NamedPage('homework_main', () => {
|
|||||||
}));
|
}));
|
||||||
const calendar = new Calendar(events);
|
const calendar = new Calendar(events);
|
||||||
calendar.getDom().appendTo('[name="calendar_entry"]');
|
calendar.getDom().appendTo('[name="calendar_entry"]');
|
||||||
|
$('[name="calendar_entry"]').hide();
|
||||||
$('[name="homework_display"]').change((ev) => {
|
$('[name="homework_display"]').change((ev) => {
|
||||||
switch (ev.currentTarget.value) {
|
switch (ev.currentTarget.value) {
|
||||||
case 'calendar':
|
case 'calendar':
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
{{ _('View') }}:
|
{{ _('View') }}:
|
||||||
<select class="inline compact select" name="homework_display">
|
<select class="inline compact select" name="homework_display">
|
||||||
<option value="calendar">{{ _('Calendar View') }}</option>
|
<option value="calendar">{{ _('Calendar View') }}</option>
|
||||||
<option value="list">{{ _('List View') }}</option>
|
<option value="list" selected>{{ _('List View') }}</option>
|
||||||
</select>
|
</select>
|
||||||
</span>
|
</span>
|
||||||
{% if handler.user.hasPerm(perm.PERM_CREATE_HOMEWORK) %}
|
{% if handler.user.hasPerm(perm.PERM_CREATE_HOMEWORK) %}
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
{% if not tdocs.length %}
|
{% if not tdocs.length %}
|
||||||
{{ nothing.render('There is no homework so far ╰(*°▽°*)╯') }}
|
{{ nothing.render('There is no homework so far ╰(*°▽°*)╯') }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<ol class="section__list homework__list hasjs--hide">
|
<ol class="section__list homework__list">
|
||||||
{%- for tdoc in tdocs -%}
|
{%- for tdoc in tdocs -%}
|
||||||
<li class="section__list__item homework__item">
|
<li class="section__list__item homework__item">
|
||||||
<div class="media">
|
<div class="media">
|
||||||
|
|||||||
Reference in new issue
Block a user