Skip to content

Commit

Permalink
fix display problem caused by preparations for node-red 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Hypnos3 committed Jul 1, 2019
1 parent e71e437 commit ca72b30
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 25 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
### CHANGELOG

#### 0.1.9: Maintenance Release

- fix display problem in node-red 0.2.x, caused by preparations for node-red 1.0

#### 0.1.8: Maintenance Release

- fix, added Fronleichnam to region BY
Expand Down
30 changes: 8 additions & 22 deletions german-holidays.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,6 @@
<button type="button" id="node-button-btnHolidayAdd" class="rdg-ui-btn red-ui-button red-ui-button-small" data-i18n="[title]german-holidays.placeholder.btnHolidayAdd" style="margin-top: 4px;"><i class="fa fa-plus"></i> <span data-i18n="german-holidays.label.btnHolidayAdd"></span></button> &nbsp;
<button type="button" id="node-button-btnHolidayClear" class="rdg-ui-btn red-ui-button red-ui-button-small" data-i18n="[title]german-holidays.placeholder.btnHolidayClear" style="margin-top: 4px;"><i class="fa fa-eraser"></i> <span data-i18n="german-holidays.label.btnHolidayClear"></span></button> &nbsp;
<select type="text" id="node-regionSel" class="rdg-ui-btn red-ui-button" data-i18n="[title]german-holidays.placeholder.btnHolidayAddPre" style="margin-top: 4px;width:200px">
<option value="" data-i18n="german-holidays.region.none"></option>
<option value="A" data-i18n="german-holidays.region.AUSTRIA"></option>
<option value="ALL" data-i18n="german-holidays.region.ALL"></option>
<option value="BUND" data-i18n="german-holidays.region.BUND"></option>
<option value="BW" data-i18n="german-holidays.region.BW"></option>
<option value="BY" data-i18n="german-holidays.region.BY"></option>
<option value="BE" data-i18n="german-holidays.region.BE"></option>
<option value="BB" data-i18n="german-holidays.region.BB"></option>
<option value="HB" data-i18n="german-holidays.region.HB"></option>
<option value="HH" data-i18n="german-holidays.region.HH"></option>
<option value="HE" data-i18n="german-holidays.region.HE"></option>
<option value="MV" data-i18n="german-holidays.region.MV"></option>
<option value="NI" data-i18n="german-holidays.region.NI"></option>
<option value="NW" data-i18n="german-holidays.region.NW"></option>
<option value="RP" data-i18n="german-holidays.region.RP"></option>
<option value="SL" data-i18n="german-holidays.region.SL"></option>
<option value="SN" data-i18n="german-holidays.region.SN"></option>
<option value="ST" data-i18n="german-holidays.region.ST"></option>
<option value="SH" data-i18n="german-holidays.region.SH"></option>
<option value="TH" data-i18n="german-holidays.region.TH"></option>
</select>
<button type="button" id="node-button-btnHolidayAddPre" class="rdg-ui-btn red-ui-button" data-i18n="[title]german-holidays.placeholder.btnHolidayAddPre" style="margin-top: 4px;"><i class="fa fa-plus-square"></i> <span data-i18n="german-holidays.label.btnHolidayAddPre"></span></button>
</div>
Expand Down Expand Up @@ -1500,7 +1480,13 @@ <h3>References</h3>
_addHolidays(node, $('#node-regionSel').val());
$dialog.dialog('close');
});
$('#node-regionSel').change(() => {

const $selHolidayAddPre = $('#node-regionSel');
$selHolidayAddPre.append($('<option></option>').val('').text(node._('german-holidays.region.none')));
allRegions.forEach((_val, _index) => {
$selHolidayAddPre.append($('<option></option>').val(_val).text(node._('german-holidays.region.' + _val)));
});
$selHolidayAddPre.change(() => {
const b = !$('#node-regionSel').val();
$btnHolidayAddPre.prop('disabled', b);
if (b) {
Expand All @@ -1512,7 +1498,7 @@ <h3>References</h3>
}

});
$('#node-regionSel').change();
$selHolidayAddPre.change();

const $btnSpecialdayAdd = $('#node-button-btnSpecialdayAdd');
$btnSpecialdayAdd.click(() => {
Expand Down
2 changes: 1 addition & 1 deletion locales/de/german-holidays.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
},
"region": {
"none": "<wählen um vordefinierte Hinzugefügt werden sollen>",
"AUSTRIA": "Österreich",
"A": "Österreich",
"ALL": "alle Deutsche",
"BUND": "allgemeine Deutsche",
"BW": "Baden-Württemberg",
Expand Down
2 changes: 1 addition & 1 deletion locales/en-US/german-holidays.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
},
"region": {
"none": "<select region to add to list>",
"AUSTRIA": "Austria",
"A": "Austria",
"ALL": "alle Deutsche",
"BUND": "allgemeine Deutsche",
"BW": "Baden-Württemberg",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-red-contrib-german-holidays",
"version": "0.1.8",
"version": "0.1.9",
"description": "NodeRED nodes to get german holidays",
"keywords": [
"node-red",
Expand Down

0 comments on commit ca72b30

Please sign in to comment.