Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions com.woltlab.wcf/templates/__multifactorTotpSecretField.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@

<script>
(function (script) {
require(['WoltLabSuite/Core/Ui/User/Multifactor/Totp/Qr', 'Language'], (Qr, Language) => {
Language.addObject({
'wcf.user.security.multifactor.com.woltlab.wcf.multifactor.totp.link': '{jslang}wcf.user.security.multifactor.com.woltlab.wcf.multifactor.totp.link{/jslang}',
});
require(['WoltLabSuite/Core/Ui/User/Multifactor/Totp/Qr'], (Qr) => {
{jsphrase name='wcf.user.security.multifactor.com.woltlab.wcf.multifactor.totp.link'}

Qr.render(script.closest(".totpSecretContainer"));
});
Expand Down
9 changes: 3 additions & 6 deletions com.woltlab.wcf/templates/__userObjectWatchButton.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,9 @@
</div>

<script data-relocate="true">
require(['WoltLabSuite/Core/Ui/User/ObjectWatch', 'WoltLabSuite/Core/Language'], (ObjectWatch, Language) => {
Language.addObject({
'wcf.user.objectWatch.button.subscribe': '{jslang}wcf.user.objectWatch.button.subscribe{/jslang}',
'wcf.user.objectWatch.button.subscribed': '{jslang}wcf.user.objectWatch.button.subscribed{/jslang}',
})

require(['WoltLabSuite/Core/Ui/User/ObjectWatch'], (ObjectWatch) => {
{jsphrase name='wcf.user.objectWatch.button.subscribe'}
{jsphrase name='wcf.user.objectWatch.button.subscribed'}
ObjectWatch.setup();
});
</script>
Expand Down
2 changes: 1 addition & 1 deletion com.woltlab.wcf/templates/accountManagement.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
{event name='changePasswordFields'}

<script data-relocate="true">
require(['WoltLabSuite/Core/Ui/User/PasswordStrength', 'Language'], function (PasswordStrength, Language) {
require(['WoltLabSuite/Core/Ui/User/PasswordStrength'], function (PasswordStrength) {
{include file='shared_passwordStrengthLanguage'}

var relatedInputs = [];
Expand Down
30 changes: 14 additions & 16 deletions com.woltlab.wcf/templates/googleMapsJavaScript.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,20 @@
<script data-relocate="true" src="{@$__wcf->getPath()}js/3rdParty/oms.min.js?v={@LAST_UPDATE_TIME}"></script>
<script data-relocate="true">
$(function() {
WCF.Language.addObject({
'wcf.map.noLocationSuggestions': '{jslang}wcf.map.noLocationSuggestions{/jslang}',
'wcf.map.route.error.not_found': '{jslang}wcf.map.route.error.not_found{/jslang}',
'wcf.map.route.error.over_query_limit': '{jslang}wcf.map.route.error.over_query_limit{/jslang}',
'wcf.map.route.error.request_denied': '{jslang}wcf.map.route.error.request_denied{/jslang}',
'wcf.map.route.origin': '{jslang}wcf.map.route.origin{/jslang}',
'wcf.map.route.planner': '{jslang}wcf.map.route.planner{/jslang}',
'wcf.map.route.travelMode': '{jslang}wcf.map.route.travelMode{/jslang}',
'wcf.map.route.travelMode.bicycling': '{jslang}wcf.map.route.travelMode.bicycling{/jslang}',
'wcf.map.route.travelMode.driving': '{jslang}wcf.map.route.travelMode.driving{/jslang}',
'wcf.map.route.travelMode.transit': '{jslang}wcf.map.route.travelMode.transit{/jslang}',
'wcf.map.route.travelMode.walking': '{jslang}wcf.map.route.travelMode.walking{/jslang}',
'wcf.map.route.viewOnGoogleMaps': '{jslang}wcf.map.route.viewOnGoogleMaps{/jslang}',
'wcf.map.showLocationSuggestions': '{jslang}wcf.map.showLocationSuggestions{/jslang}',
'wcf.map.useLocationSuggestion': '{jslang}wcf.map.useLocationSuggestion{/jslang}'
});
{jsphrase name='wcf.map.noLocationSuggestions'}
{jsphrase name='wcf.map.route.error.not_found'}
{jsphrase name='wcf.map.route.error.over_query_limit'}
{jsphrase name='wcf.map.route.error.request_denied'}
{jsphrase name='wcf.map.route.origin'}
{jsphrase name='wcf.map.route.planner'}
{jsphrase name='wcf.map.route.travelMode'}
{jsphrase name='wcf.map.route.travelMode.bicycling'}
{jsphrase name='wcf.map.route.travelMode.driving'}
{jsphrase name='wcf.map.route.travelMode.transit'}
{jsphrase name='wcf.map.route.travelMode.walking'}
{jsphrase name='wcf.map.route.viewOnGoogleMaps'}
{jsphrase name='wcf.map.showLocationSuggestions'}
{jsphrase name='wcf.map.useLocationSuggestion'}

WCF.Location.GoogleMaps.Settings.set({
disableDoubleClickZoom: {if GOOGLE_MAPS_ENABLE_DOUBLE_CLICK_ZOOM}0{else}1{/if},
Expand Down
6 changes: 2 additions & 4 deletions com.woltlab.wcf/templates/groupedUserList.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@

<script data-relocate="true">
$(function() {
WCF.Language.addObject({
'wcf.user.button.follow': '{jslang}wcf.user.button.follow{/jslang}',
'wcf.user.button.unfollow': '{jslang}wcf.user.button.unfollow{/jslang}',
});
{jsphrase name='wcf.user.button.follow'}
{jsphrase name='wcf.user.button.unfollow'}

new WCF.User.Action.Follow($('.jsGroupedUserList > li'));
});
Expand Down
6 changes: 2 additions & 4 deletions com.woltlab.wcf/templates/groupedUserReactionList.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@

<script data-relocate="true">
$(function() {
WCF.Language.addObject({
'wcf.user.button.follow': '{jslang}wcf.user.button.follow{/jslang}',
'wcf.user.button.unfollow': '{jslang}wcf.user.button.unfollow{/jslang}',
});
{jsphrase name='wcf.user.button.follow'}
{jsphrase name='wcf.user.button.unfollow'}

new WCF.User.Action.Follow($('.jsGroupedUserList > li'));
});
Expand Down
6 changes: 2 additions & 4 deletions com.woltlab.wcf/templates/ignoredUsers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,8 @@
</footer>

<script data-relocate="true">
require(['Language', 'WoltLabSuite/Core/Ui/User/Ignore/List'], (Language, { UiUserIgnoreList }) => {
Language.addObject({
'wcf.user.button.ignore': '{jslang}wcf.user.button.ignore{/jslang}',
});
require(['WoltLabSuite/Core/Ui/User/Ignore/List'], ({ UiUserIgnoreList }) => {
{jsphrase name='wcf.user.button.ignore'}

new UiUserIgnoreList();
});
Expand Down
8 changes: 3 additions & 5 deletions com.woltlab.wcf/templates/mediaJavaScript.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@
{jsphrase name='wcf.media.upload.success'}
{jsphrase name='wcf.media.setCategory'}

require(['Language', 'Permission'], function(Language, Permission) {
Language.addObject({
'wcf.media.delete.confirmMessage': '{jslang __encode=true __literal=true}wcf.media.delete.confirmMessage{/jslang}',
'wcf.media.search.info.searchStringThreshold': '{jslang __literal=true}wcf.media.search.info.searchStringThreshold{/jslang}',
});
require(['Language', 'Permission'], function({ registerPhrase }, Permission) {
registerPhrase('wcf.media.delete.confirmMessage', '{jslang __encode=true __literal=true}wcf.media.delete.confirmMessage{/jslang}');
registerPhrase('wcf.media.search.info.searchStringThreshold', '{jslang __literal=true}wcf.media.search.info.searchStringThreshold{/jslang}');

Permission.add('admin.content.cms.canManageMedia', {if $__wcf->session->getPermission('admin.content.cms.canManageMedia')}true{else}false{/if});
});
Expand Down
10 changes: 4 additions & 6 deletions com.woltlab.wcf/templates/notificationSettings.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,10 @@
</form>

<script data-relocate="true">
require(['Language', 'WoltLabSuite/Core/Controller/User/Notification/Settings'], function(Language, ControllerUserNotificationSettings) {
Language.addObject({
'wcf.user.notification.mailNotificationType.daily': '{jslang}wcf.user.notification.mailNotificationType.daily{/jslang}',
'wcf.user.notification.mailNotificationType.instant': '{jslang}wcf.user.notification.mailNotificationType.instant{/jslang}',
'wcf.user.notification.mailNotificationType.none': '{jslang}wcf.user.notification.mailNotificationType.none{/jslang}'
});
require(['WoltLabSuite/Core/Controller/User/Notification/Settings'], function(ControllerUserNotificationSettings) {
{jsphrase name='wcf.user.notification.mailNotificationType.daily'}
{jsphrase name='wcf.user.notification.mailNotificationType.instant'}
{jsphrase name='wcf.user.notification.mailNotificationType.none'}

ControllerUserNotificationSettings.init();
});
Expand Down
8 changes: 3 additions & 5 deletions com.woltlab.wcf/templates/pageHeaderUser.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,9 @@
</a>
{if !OFFLINE || $__wcf->session->getPermission('admin.general.canViewPageDuringOfflineMode')}
<script data-relocate="true">
require(["WoltLabSuite/Core/Language", "WoltLabSuite/Core/Ui/User/Menu/Data/Notification"], (Language, { setup }) => {
Language.addObject({
"wcf.user.notification.enableDesktopNotifications": "{jslang}wcf.user.notification.enableDesktopNotifications{/jslang}",
"wcf.user.notification.enableDesktopNotifications.button": "{jslang}wcf.user.notification.enableDesktopNotifications.button{/jslang}",
});
require(["WoltLabSuite/Core/Ui/User/Menu/Data/Notification"], ({ setup }) => {
{jsphrase name='wcf.user.notification.enableDesktopNotifications'}
{jsphrase name='wcf.user.notification.enableDesktopNotifications.button'}

setup({
noItems: '{jslang}wcf.user.notification.noMoreNotifications{/jslang}',
Expand Down
2 changes: 1 addition & 1 deletion com.woltlab.wcf/templates/register.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@
}
);
});
require(['WoltLabSuite/Core/Ui/User/PasswordStrength', 'Language'], (PasswordStrength, Language) => {
require(['WoltLabSuite/Core/Ui/User/PasswordStrength'], (PasswordStrength) => {
{include file='shared_passwordStrengthLanguage'}

new PasswordStrength(document.getElementById('{unsafe:$randomFieldNames[password]|encodeJS}'), {
Expand Down
12 changes: 5 additions & 7 deletions com.woltlab.wcf/templates/shared_aclSimple.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,11 @@
</section>

<script data-relocate="true">
require(['WoltLabSuite/Core/Ui/Acl/Simple', 'Language'], function(UiAclSimple, Language) {
Language.addObject({
'wcf.acl.access.grant': '{jslang}wcf.acl.access.grant{/jslang}',
'wcf.acl.access.deny': '{jslang}wcf.acl.access.deny{/jslang}',
'wcf.acl.access.granted': '{jslang}wcf.acl.access.granted{/jslang}',
'wcf.acl.access.denied': '{jslang}wcf.acl.access.denied{/jslang}',
});
require(['WoltLabSuite/Core/Ui/Acl/Simple'], function(UiAclSimple) {
{jsphrase name='wcf.acl.access.grant'}
{jsphrase name='wcf.acl.access.deny'}
{jsphrase name='wcf.acl.access.granted'}
{jsphrase name='wcf.acl.access.denied'}

new UiAclSimple('{$__aclSimplePrefix}', '{unsafe:$__aclInputName|encodeJS}');
});
Expand Down
6 changes: 2 additions & 4 deletions com.woltlab.wcf/templates/shared_articleAddDialog.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@
</div>
</div>
<script data-relocate="true">
require(['Language', 'WoltLabSuite/Core/Acp/Ui/Article/Add'], function(Language, AcpUiArticleAdd) {
Language.addObject({
'wcf.acp.article.add': '{jslang}wcf.acp.article.add{/jslang}'
});
require(['WoltLabSuite/Core/Acp/Ui/Article/Add'], function(AcpUiArticleAdd) {
{jsphrase name='wcf.acp.article.add'}

AcpUiArticleAdd.init('{link controller='ArticleAdd' encode=false}{literal}isMultilingual={$isMultilingual}{/literal}{if $categoryID}&categoryID={$categoryID}{/if}{/link}');

Expand Down
8 changes: 3 additions & 5 deletions com.woltlab.wcf/templates/shared_codeMetaCode.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@
{/if}
</div>
<script data-relocate="true">
require(['Language', 'WoltLabSuite/Core/Bbcode/Collapsible', 'WoltLabSuite/Core/Bbcode/Code'], function (Language, BbcodeCollapsible, BbcodeCode) {
Language.addObject({
'wcf.message.bbcode.code.copy': '{jslang}wcf.message.bbcode.code.copy{/jslang}',
'wcf.message.bbcode.code.copy.success': '{jslang}wcf.message.bbcode.code.copy.success{/jslang}'
});
require(['WoltLabSuite/Core/Bbcode/Collapsible', 'WoltLabSuite/Core/Bbcode/Code'], function (BbcodeCollapsible, BbcodeCode) {
{jsphrase name='wcf.message.bbcode.code.copy'}
{jsphrase name='wcf.message.bbcode.code.copy.success'}
BbcodeCollapsible.observe();
BbcodeCode.processAll();
});
Expand Down
8 changes: 3 additions & 5 deletions com.woltlab.wcf/templates/shared_labelFormField.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@
</noscript>

<script data-relocate="true">
require(['Dom/Util', 'Language', 'WoltLabSuite/Core/Form/Builder/Field/Controller/Label'], function(DomUtil, Language, FormBuilderFieldLabel) {
Language.addObject({
'wcf.label.none': '{jslang}wcf.label.none{/jslang}',
'wcf.label.withoutSelection': '{jslang}wcf.label.withoutSelection{/jslang}'
});
require(['Dom/Util', 'WoltLabSuite/Core/Form/Builder/Field/Controller/Label'], function(DomUtil, FormBuilderFieldLabel) {
{jsphrase name='wcf.label.none'}
{jsphrase name='wcf.label.withoutSelection'}

new FormBuilderFieldLabel(
'{unsafe:$field->getPrefixedId()|encodeJS}',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@
<input type="hidden" name="values[{$option->optionName}]">

<script data-relocate="true">
require(['Language', 'WoltLabSuite/Core/Ui/ItemList/LineBreakSeparatedText'], (Language, { UiItemListLineBreakSeparatedText }) => {
Language.addObject({
'wcf.acp.option.type.lineBreakSeparatedText.placeholder': '{jslang}wcf.acp.option.type.lineBreakSeparatedText.placeholder{/jslang}',
'wcf.acp.option.type.lineBreakSeparatedText.error.duplicate': '{jslang __literal=true}wcf.acp.option.type.lineBreakSeparatedText.error.duplicate{/jslang}',
'wcf.acp.option.type.lineBreakSeparatedText.clearList.confirmMessage': '{jslang}wcf.acp.option.type.lineBreakSeparatedText.clearList.confirmMessage{/jslang}',
});
require(['Language', 'WoltLabSuite/Core/Ui/ItemList/LineBreakSeparatedText'], ({ registerPhrase }, { UiItemListLineBreakSeparatedText }) => {
{jsphrase name='wcf.acp.option.type.lineBreakSeparatedText.placeholder'}
{jsphrase name='wcf.acp.option.type.lineBreakSeparatedText.clearList.confirmMessage'}
registerPhrase('wcf.acp.option.type.lineBreakSeparatedText.error.duplicate', '{jslang __literal=true}wcf.acp.option.type.lineBreakSeparatedText.error.duplicate{/jslang}');

new UiItemListLineBreakSeparatedText(
document.getElementById("lineBreakSeparatedTextOption_{unsafe:$identifier|encodeJS}")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{if $availableLanguages|count > 1}
<script data-relocate="true">
require(['Language', 'WoltLabSuite/Core/Language/Input', 'WoltLabSuite/Core/Language/Text'], function(Language, LanguageInput, LanguageText) {
Language.addObject({
'wcf.global.button.disabledI18n': '{jslang}wcf.global.button.disabledI18n{/jslang}'
});
require(['WoltLabSuite/Core/Language/Input', 'WoltLabSuite/Core/Language/Text'], function(LanguageInput, LanguageText) {
{jsphrase name='wcf.global.button.disabledI18n'}

var availableLanguages = { {implode from=$availableLanguages key=languageID item=languageName}{$languageID}: '{$languageName}'{/implode} };
var values = { {implode from=$i18nValues[$elementIdentifier] key=languageID item=value}'{$languageID}': '{$value}'{/implode} };
Expand Down
18 changes: 8 additions & 10 deletions com.woltlab.wcf/templates/shared_multipleSelectionFormField.tpl
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
{if $field->isFilterable()}
<script data-relocate="true">
require(['Language', 'WoltLabSuite/Core/Ui/ItemList/Filter'], (Language, UiItemListFilter) => {
Language.addObject({
'wcf.global.filter.button.visibility': '{jslang}wcf.global.filter.button.visibility{/jslang}',
'wcf.global.filter.button.clear': '{jslang}wcf.global.filter.button.clear{/jslang}',
'wcf.global.filter.error.noMatches': '{jslang}wcf.global.filter.error.noMatches{/jslang}',
'wcf.global.filter.placeholder': '{jslang}wcf.global.filter.placeholder{/jslang}',
'wcf.global.filter.visibility.activeOnly': '{jslang}wcf.global.filter.visibility.activeOnly{/jslang}',
'wcf.global.filter.visibility.highlightActive': '{jslang}wcf.global.filter.visibility.highlightActive{/jslang}',
'wcf.global.filter.visibility.showAll': '{jslang}wcf.global.filter.visibility.showAll{/jslang}'
});
require(['WoltLabSuite/Core/Ui/ItemList/Filter'], (UiItemListFilter) => {
{jsphrase name='wcf.global.filter.button.visibility'}
{jsphrase name='wcf.global.filter.button.clear'}
{jsphrase name='wcf.global.filter.error.noMatches'}
{jsphrase name='wcf.global.filter.placeholder'}
{jsphrase name='wcf.global.filter.visibility.activeOnly'}
{jsphrase name='wcf.global.filter.visibility.highlightActive'}
{jsphrase name='wcf.global.filter.visibility.showAll'}

new UiItemListFilter('{unsafe:$field->getPrefixedId()|encodeJS}_list');
});
Expand Down
2 changes: 1 addition & 1 deletion com.woltlab.wcf/templates/shared_passwordFormField.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

{if $field->getStrengthMeter()}
<script data-relocate="true">
require(["WoltLabSuite/Core/Ui/User/PasswordStrength", "Language"], (PasswordStrength, Language) => {
require(["WoltLabSuite/Core/Ui/User/PasswordStrength"], (PasswordStrength) => {
{include file='shared_passwordStrengthLanguage'}

new PasswordStrength(document.getElementById('{unsafe:$field->getPrefixedId()|encodeJS}'), {
Expand Down
Loading
Loading