Move language initialization to the top
authorJoshua Rüsweg <josh@bastelstu.be>
Thu, 31 Jan 2019 13:58:52 +0000 (14:58 +0100)
committerJoshua Rüsweg <josh@bastelstu.be>
Thu, 31 Jan 2019 13:58:52 +0000 (14:58 +0100)
com.woltlab.wcf/templates/uploadFieldComponent.tpl
wcfsetup/install/files/acp/templates/uploadFieldComponent.tpl

index 3fa0ea00d7e600ba12892983f5e6f9ce8172a05a..90995ce7a93d07837c60332c9e8f271e54dfead4 100644 (file)
 
 <script data-relocate="true">
        require(['WoltLabSuite/Core/Ui/File/Upload', 'Language'], function(Upload, Language) {
+               Language.addObject({
+                       'wcf.upload.error.reachedRemainingLimit': '{lang}wcf.upload.error.reachedRemainingLimit{/lang}',
+                       'wcf.upload.error.noImage': '{lang}wcf.upload.error.noImage{/lang}'
+               });
+               
                new Upload("{$uploadFieldId}UploadButtonDiv", "{$uploadFieldId}uploadFileList", {
                        internalId: '{$uploadField->getInternalId()}',
                        {if $uploadField->getMaxFiles()}maxFiles: {$uploadField->getMaxFiles()},{/if}
                        imagePreview: {if !$uploadField->supportMultipleFiles() && $uploadField->isImageOnly()}true{else}false{/if}
                });
-               
-               Language.addObject({
-                       'wcf.upload.error.reachedRemainingLimit': '{lang}wcf.upload.error.reachedRemainingLimit{/lang}',
-                       'wcf.upload.error.noImage': '{lang}wcf.upload.error.noImage{/lang}'
-               });
        });
 </script>
\ No newline at end of file
index 3fa0ea00d7e600ba12892983f5e6f9ce8172a05a..90995ce7a93d07837c60332c9e8f271e54dfead4 100644 (file)
 
 <script data-relocate="true">
        require(['WoltLabSuite/Core/Ui/File/Upload', 'Language'], function(Upload, Language) {
+               Language.addObject({
+                       'wcf.upload.error.reachedRemainingLimit': '{lang}wcf.upload.error.reachedRemainingLimit{/lang}',
+                       'wcf.upload.error.noImage': '{lang}wcf.upload.error.noImage{/lang}'
+               });
+               
                new Upload("{$uploadFieldId}UploadButtonDiv", "{$uploadFieldId}uploadFileList", {
                        internalId: '{$uploadField->getInternalId()}',
                        {if $uploadField->getMaxFiles()}maxFiles: {$uploadField->getMaxFiles()},{/if}
                        imagePreview: {if !$uploadField->supportMultipleFiles() && $uploadField->isImageOnly()}true{else}false{/if}
                });
-               
-               Language.addObject({
-                       'wcf.upload.error.reachedRemainingLimit': '{lang}wcf.upload.error.reachedRemainingLimit{/lang}',
-                       'wcf.upload.error.noImage': '{lang}wcf.upload.error.noImage{/lang}'
-               });
        });
 </script>
\ No newline at end of file