-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2992 from infor-design/2982-patch
2982 - Fix the language from resetting [v4.21.x]
- Loading branch information
Showing
21 changed files
with
416 additions
and
45 deletions.
There are no files selected for viewing
177 changes: 177 additions & 0 deletions
177
app/views/components/calendar/test-specific-locale-lang.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,177 @@ | ||
<div class="calendar" data-init="false"> | ||
<div class="calendar-events"> | ||
<div class="accordion" data-options="{'allowOnePane': false}"> | ||
<div class="accordion-header is-expanded"> | ||
<a href="#"><span data-translate="text">Legend</span></a> | ||
</div> | ||
<div class="accordion-pane"> | ||
<div class="calendar-event-types accordion-content"> | ||
</div> | ||
</div> | ||
<div class="accordion-header is-expanded"> | ||
<a href="#"><span data-translate="text">UpComing</span></a> | ||
</div> | ||
<div class="accordion-pane"> | ||
<div class="calendar-upcoming-events accordion-content"> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="calendar-monthview"> | ||
</div> | ||
<div class="calendar-event-details accordion" data-init="false" data-options="{'allowOnePane': false}"> | ||
</div> | ||
</div> | ||
|
||
<ul id="calendar-actions-menu" class="popupmenu"> | ||
<li><a href="#" data-action="delete-event"><span data-translate="text">DeleteEvent</span></a></li> | ||
<li><a href="#" data-action="show-event"><span data-translate="text">ShowEvent</span></a></li> | ||
</ul> | ||
|
||
<script> | ||
$('body').one('initialized', function () { | ||
// Get the Event Type and Events to show in the calendar | ||
var eventTypes = []; | ||
var events = []; | ||
|
||
$.getJSON('{{basepath}}api/event-types', function(res) { | ||
eventTypes = res; | ||
|
||
$.getJSON('{{basepath}}api/events', function(res) { | ||
events = res; | ||
$('.calendar').calendar({ | ||
month: 4, | ||
year: 2019, | ||
locale: 'de-DE', | ||
language: 'es', | ||
eventTypes: eventTypes, | ||
events: events, | ||
upcomingEventDays: 0, | ||
template: 'tmpl-readonly', | ||
modalTemplate: 'tmpl-modal', | ||
menuId: 'calendar-actions-menu' | ||
}); | ||
}); | ||
}); | ||
}); | ||
</script> | ||
|
||
{{={{{ }}}=}} | ||
<script id="tmpl-readonly" type="text/html"> | ||
{{#event}} | ||
<div class="accordion-header is-expanded {{color}}"> | ||
<a href="#">{{subject}}</a> | ||
</div> | ||
<div class="accordion-pane is-expanded"> | ||
<div class="accordion-content"> | ||
{{#status}} | ||
<div class="field"> | ||
<span class="label">Status</span> | ||
<span class="data"> | ||
{{status}} | ||
{{#icon}} | ||
<svg class="icon {{icon}}" focusable="false" aria-hidden="true" role="presentation" data-status="{{status}}"><use xlink:href="#{{icon}}"></use></svg> | ||
{{/icon}} | ||
</span> | ||
</div> | ||
{{/status}} | ||
<div class="field"> | ||
<span class="label">Date</span> | ||
<span class="data"> | ||
{{startsLong}} to {{endsLong}} | ||
</span> | ||
</div> | ||
<div class="field"> | ||
<span class="label">Event Type</span> | ||
<span class="data"> | ||
{{typeLabel}} | ||
</span> | ||
</div> | ||
<div class="field"> | ||
<span class="label">Duration</span> | ||
{{#duration}} | ||
<span class="data"> | ||
{{duration}} {{durationUnits}} | ||
</span> | ||
{{/duration}} | ||
{{#durationHours}} | ||
<span class="data"> | ||
{{durationHours}} {{durationUnits}} | ||
</span> | ||
{{/durationHours}} | ||
</div> | ||
<div class="field"> | ||
<span class="label">Comments</span> | ||
<span class="data{{#noComments}} is-placeholder{{/noComments}}" > | ||
{{comments}} | ||
</span> | ||
</div> | ||
</div> | ||
</div> | ||
{{/event}} | ||
</script> | ||
|
||
<script id="tmpl-modal" type="text/html"> | ||
{{#event}} | ||
<div class="form-responsive row"> | ||
<div class="twelve columns"> | ||
<div class="field"> | ||
<label for="subject" class="label">Subject</label> | ||
<input id="subject" type="text" value="{{subject}}"> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="form-responsive row"> | ||
<div class="six columns"> | ||
<div class="field"> | ||
<label for="starts" class="label">From</label> | ||
<input id="starts" class="datepicker" name="starts" type="text" value="{{startsLocale}}"/> | ||
</div> | ||
</div> | ||
<div class="six columns"> | ||
<div class="field"> | ||
<label for="ends" class="label">To</label> | ||
<input id="ends" class="datepicker" name="ends" type="text" value="{{endsLocale}}"/> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="form-responsive row"> | ||
<div class="twelve columns"> | ||
<div class="field"> | ||
<label for="type" class="label">Type</label> | ||
<select id="type" class="dropdown" name="type"> | ||
{{#eventTypes}} | ||
<option value="{{id}}">{{label}}</option> | ||
{{/eventTypes}} | ||
</select> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="form-responsive row"> | ||
<div class="six columns"> | ||
<div class="field"> | ||
<label for="durationHours">Hours</label> | ||
<input id="durationHours" name="durationHours" type="text" class="spinbox"{{#isAllDay}}disabled="true"{{/isAllDay}} data-options="{min: 0, max: 24}" value="8"/> | ||
</div> | ||
</div> | ||
<div class="six columns"> | ||
<div class="field field-checkbox"> | ||
<input type="checkbox" class="checkbox" name="isAllDay" id="isAllDay" {{#isAllDay}}checked="true"{{/isAllDay}}> | ||
<label for="isAllDay" class="checkbox-label">All Day</label> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="form-responsive row"> | ||
<div class="twelve columns"> | ||
<div class="field"> | ||
<label for="comments" class="label">Comments</label> | ||
<textarea id="comments" type="text" value="{{comments}}"></textarea> | ||
</div> | ||
</div> | ||
</div> | ||
{{/event}} | ||
<div class="modal-buttonset"> | ||
<button id="cancel" data-cancel="submit" type="button" class="btn-modal-secondary"><span data-translate="text">Cancel</span></button> | ||
<button id="submit" data-action="submit" type="button" class="btn-modal-primary hide-focus"><span data-translate="text">Submit</span></button> | ||
</div> | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
app/views/components/monthview/test-specific-locale-lang.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<div class="row"> | ||
<div class="twelve columns"> | ||
<div class="monthview" data-init="false"> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<script> | ||
$('body').on('initialized', function () { | ||
$('.monthview').monthview({ | ||
locale: 'da-DK', | ||
language: 'de', | ||
month: 9, | ||
year: 2019 | ||
}); | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,17 @@ | ||
<div class="row"> | ||
<div class="twelve columns"> | ||
<div class="field"> | ||
<label for="timepicker-main" class="label">Timepicker (Danish Locale)</label> | ||
<input id="timepicker-main" class="timepicker" type="text" data-options = "{ locale: 'da-DK' }"/> | ||
<label for="timepicker-1" class="label">Timepicker (Danish Locale)</label> | ||
<input id="timepicker-1" class="timepicker" type="text" data-options="{ locale: 'da-DK' }"/> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="row"> | ||
<div class="twelve columns"> | ||
<div class="field"> | ||
<label for="timepicker-2" class="label">Timepicker (Swedish Language De locale)</label> | ||
<input id="timepicker-2" class="timepicker" type="text" data-options="{ locale: 'de-DE', language: 'sv' }"/> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.