Skip to content

Commit

Permalink
Rewrite filter rendering from html_writer to Mustache
Browse files Browse the repository at this point in the history
Finally.
  • Loading branch information
mudrd8mz committed Oct 19, 2020
1 parent a229090 commit 856ad30
Show file tree
Hide file tree
Showing 7 changed files with 279 additions and 529 deletions.
9 changes: 6 additions & 3 deletions lang/en/local_amos.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,9 @@
$string['filtertxt_desc'] = 'String must contain given text';
$string['filtertxtcasesensitive'] = 'case-sensitive';
$string['filtertxtregex'] = 'regex';
$string['filterver'] = 'Versions';
$string['filterver'] = 'Version';
$string['filtervernothingselected'] = 'Please select some version';
$string['filterver_desc'] = 'Show strings from these Moodle versions';
$string['filterver_desc'] = 'Show strings for this Moodle version';
$string['found'] = 'Found: {$a->found}     Missing: {$a->missing} ({$a->missingonpage})';
$string['foundinfo'] = 'Number of found strings';
$string['foundinfo_help'] = 'Shows the total number of rows in the translator table, number of missing translations and number of missing translations at the current page.';
Expand Down Expand Up @@ -460,9 +460,12 @@
* Grey - AMOS can\'t be used to translate this string. For example strings for Moodle 1.9 must be edited via the legacy CVS access only.
Language pack maintainers can see a small red symbol in the corner of the cells they are allowed to commit.';
$string['typecontrib'] = 'Non-standard plugins';
$string['typecontrib'] = 'Additional plugins';
$string['typecontribbadge'] = 'Additional';
$string['typecore'] = 'Core subsystems';
$string['typecorebadge'] = 'Core';
$string['typestandard'] = 'Standard plugins';
$string['typestandardbadge'] = 'Standard';
$string['unableenfixaddon'] = 'English fixes allowed for standard plugins only';
$string['unableenfixcountries'] = 'Country names are copied from ISO 3166-1';
$string['unableunmaintained'] = 'The language pack \'{$a}\' has no maintainer at the moment, so translation contributions cannot be accepted. Please consider volunteering to become \'{$a}\' language pack maintainer.';
Expand Down
409 changes: 0 additions & 409 deletions renderer.php

Large diffs are not rendered by default.

116 changes: 4 additions & 112 deletions scss/filter.scss
Original file line number Diff line number Diff line change
@@ -1,122 +1,14 @@
// Strings filter at the translator page
// Strings filter at the translator page.

#page-local-amos-view #region-main {
overflow-x: auto;
}

.path-local-amos {

.string-control-label .fa-mobile {
font-size: 1.7em;
}

.form-check-inline {
display: inline;
margin-right: 4px;
input[type="checkbox"] {
margin-top: 0;
}
}
.form-actions {
button {
margin-right: 4px;
}
}

input[type="radio"],
input[type="checkbox"] {
margin-top: 4px;
margin-right: 0;
}

#amosfilter_form {
.help-block {
font-size: 66%;
}
.jsactions {
display: block;
margin-top: 2px;
min-height: 20px;
input[type="radio"] {
display: none;
}
}
.col-form-label {
text-align: right;
}
}

#amosfilter_fmis .form-check,
#amosfilter_ftxt .form-check,
#amosfilter_fsid .form-check {
padding-left: 0;
}

#amosfilter_fver .unsupported label {
color: gray;
}

#amosfilter_fver label {
padding-right: 0.3em;
}

#amosfilter_submitted_icon {
display: inline-block;
min-width: 20px;
}

#amosfilter_fcmp {
border: 1px solid rgb(204,204,204);
@include border-radius(4px);
padding: 0px 5px;
height: 100px;
overflow: auto;
overflow-y: scroll;
background-color: white;
}

#amosfilter_fcmp.hiddenversions .version {
display: none;
}

.error #amosfilter_fcmp {
border-color: #b94a48;
color: #b94a48;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
-moz-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
}

.error #amosfilter_fcmp_actions_search {
border-color: inherit;
-webkit-box-shadow: inherit;
-moz-box-shadow: inherit;
box-shadow: inherit;
color: inherit;
}

#amosfilter_fcmp table tr th, #amosfilter_fcmp table tr td {
border: none;
padding: 0px 1px;
margin: 0px;
text-align: left;
vertical-align: top;
}

#amosfilter_fcmp table tr th {
font-style: italic;
font-weight: bold;
}

#amosfilter_fcmp table tr td.version span {
background-color: #ccc;
font-size: 70%;
color: white;
padding: 2px;
}

#amosfilter_fcmp table tr td.version.supported span {
background-color: theme-color("success");
label + .form-text {
margin-top: 0;
margin-bottom: 0.25rem;
}

#amosfilter_fcmp input[type=checkbox]:checked + label {
Expand Down
4 changes: 0 additions & 4 deletions scss/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@

.path-local-amos {

h1, h2 {
text-align: center;
}

// Translator specific styling

.translatorwrapper {
Expand Down
Loading

0 comments on commit 856ad30

Please sign in to comment.