Skip to content
Snippets Groups Projects
Commit 0e33b327 authored by Kevin von Spiczak's avatar Kevin von Spiczak
Browse files

[TASK] add reset filter button, add labels

parent c58ee806
No related branches found
No related tags found
1 merge request!27[FEATURE] save filters in session
This commit is part of merge request !27. Comments created here will be created in the context of that merge request.
......@@ -2,6 +2,7 @@
{namespace sg=SGalinski\SgJobs\ViewHelpers}
<f:be.container
includeCssFiles="{0: '{f:uri.resource(path: \'StyleSheets/backend.css\')}'}"
includeRequireJsModules="{
0: 'TYPO3/CMS/Backend/ContextMenu',
1: 'TYPO3/CMS/Backend/Tooltip',
......
......@@ -23,13 +23,21 @@
<div class="col-xs-6">
<div class="form-group">
<label for="filter-search"><f:translate key="backend.filters.search" /></label>
<f:form.textfield class="form-control" property="search" id="filter-search" />
<f:form.textfield class="reset-me form-control" property="search" id="filter-search" />
</div>
<div class="form-inline">
<f:form.button class="btn btn-success form-group pull-right" type="submit" additionalAttributes="{style: 'min-width: 150px;'}">
</div>
<div class="form-group">
<div class="col-md-12 col-xs-12">
<f:form.button class="filter-btn btn btn-success form-group col-xs-12 col-md-12" type="submit">
<f:translate key="backend.filter" />
</f:form.button>
<f:form.button id="filter-reset-btn"
class="filter-btn btn btn-danger form-group col-xs-12 col-md-12"
type="reset">
<f:translate key="backend.reset_filter" />
</f:form.button>
</div>
</div>
</div>
</f:form>
......@@ -91,7 +91,11 @@
</trans-unit>
<trans-unit id="backend.filter" approved="yes">
<source><![CDATA[Filter]]></source>
<target><![CDATA[Filter]]></target>
<target><![CDATA[Filter anwenden]]></target>
</trans-unit>
<trans-unit id="backend.reset_filter" approved="yes">
<source><![CDATA[Reset filter]]></source>
<target><![CDATA[Filter zurücksetzen]]></target>
</trans-unit>
<trans-unit id="backend.filters.editLocation" approved="yes">
<source><![CDATA[Edit selected location]]></source>
......
......@@ -72,6 +72,9 @@
<trans-unit id="backend.filter">
<source><![CDATA[Filter]]></source>
</trans-unit>
<trans-unit id="backend.reset_filter" approved="yes">
<source><![CDATA[Reset filter]]></source>
</trans-unit>
<trans-unit id="backend.filters.editLocation">
<source><![CDATA[Edit selected location]]></source>
</trans-unit>
......
......@@ -30,10 +30,24 @@ define([
], function ($, ModuleMenu, Viewport) {
var SgJobs = {
init: function() {
$('.sg-jobs_pageswitch').on('click', function(event) {
event.preventDefault();
SgJobs.goTo('web_SgJobsBackend', event.target.dataset.page);
$(document).ready(function() {
$('.sg-jobs_pageswitch').on('click', function(event) {
event.preventDefault();
SgJobs.goTo('web_SgJobsBackend', event.target.dataset.page);
});
$('#filter-reset-btn').on('click', function(event) {
event.preventDefault();
this.form.reset();
$(this).closest('form').find('option:selected').each(function() {
$(this).removeAttr('selected');
});
$('.reset-me').val('');
this.form.submit();
});
});
},
/**
* Switch the page and select it in the pagetree
......
.module-docheader-bar-column-right {
/*margin: 12px;*/
}
.btn-save-backend {
margin-top: 10px;
}
.btn-sm {
margin-left: 5px;
}
.editor-description {
padding: 10px;
}
.email-input {
padding: 5px 6px;
vertical-align: top;
width: 300px;
}
.f3-widget-paginator {
display: inline-block;
border-radius: 4px;
margin: 20px 0;
padding-left: 0;
background-color: red;
}
.f3-widget-paginator > li {
display: inline;
}
.f3-widget-paginator > li > a,
.f3-widget-paginator > li.current {
position: relative;
float: left;
padding: 6px 12px;
margin-left: -1px;
text-decoration: none;
border: 1px solid #DDD;
background-color: #FFF;
color: #FF8700;
}
.f3-widget-paginator > li.current,
.f3-widget-paginator > li > a:hover,
.f3-widget-paginator > li > a:focus {
text-decoration: underline;
background-color: #EEE;
}
.f3-widget-paginator > li:first-child > a,
.f3-widget-paginator > li.current:first-child {
margin-left: 0;
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
}
.f3-widget-paginator > li:last-child > a,
.f3-widget-paginator > li.current:last-child {
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
}
.template-col:nth-of-type(even) {
/*background-color: #DCDCDC;*/
/*background-clip: content-box;*/
}
.template-col:nth-of-type(odd) {
/*background-color: #AAA;*/
/*background-clip: content-box;*/
}
.recordlist hr {
margin: 5px 0;
border-top: 1px solid #EAEAEA;
}
.recordlist-mail-unsent {
background-color: #CCC !important;
}
.filter-btn {
width: auto;
min-width: 100px;
margin-right: 10px;
}
.language-selector {
display: inline-block;
margin-left: 9px;
}
.markers-card {
border: none;
margin-bottom: 0;
box-shadow: none;
}
a.accordion-header-toggle .fa-caret-down {
display: none;
}
a.accordion-header-toggle.collapsed .fa-caret-down {
display: inline-block;
}
a.accordion-header-toggle.collapsed .fa-caret-up {
display: none;
}
.form-actions {
margin-bottom: 5px;
clear: both;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment