scinote-web/app/assets/javascripts/sitewide/constants.js.erb

13 lines
746 B
Text
Raw Normal View History

const GLOBAL_CONSTANTS = {
NAME_TRUNCATION_LENGTH: <%= Constants::NAME_TRUNCATION_LENGTH %>,
NAME_MAX_LENGTH: <%= Constants::NAME_MAX_LENGTH %>,
2019-11-11 05:36:17 +08:00
NAME_MIN_LENGTH: <%= Constants::NAME_MIN_LENGTH %>,
TEXT_MAX_LENGTH: <%= Constants::TEXT_MAX_LENGTH %>,
FILENAME_TRUNCATION_LENGTH: <%= Constants::FILENAME_TRUNCATION_LENGTH %>,
2020-02-11 22:58:17 +08:00
FILE_MAX_SIZE_MB: parseInt($('meta[name="max-file-size"]').attr('content'), 10),
IS_SAFARI: /^((?!chrome|android).)*safari/i.test(navigator.userAgent),
REPOSITORY_ROW_EDITOR_FORM_CLASS_NAME: 'repository-row-edit-form',
2019-12-11 21:49:14 +08:00
REPOSITORY_LIST_ITEMS_PER_COLUMN: <%= Constants::REPOSITORY_LIST_ITEMS_PER_COLUMN %>,
REPOSITORY_CHECKLIST_ITEMS_PER_COLUMN: <%= Constants::REPOSITORY_CHECKLIST_ITEMS_PER_COLUMN %>
};