Name

sn_cd.cd_CommonConstants

Description

File to house the Content Publishing Constants

Script

var cd_CommonConstants = Class.create();
cd_CommonConstants.prototype = {
  initialize: function() {
  },
  type: 'cd_CommonConstants'
};

cd_CommonConstants.NOTIFICATIONS_TYPE_PUSH = "push";
cd_CommonConstants.NOTIFICATIONS_TYPE_EMAIL = "email";
cd_CommonConstants.NOTIFICATIONS_TYPE_TEAMS = "microsoft-teams";
cd_CommonConstants.TEAMS_EVENT_NAME = "sn_cd.notification.content_teams";

// Content type IDs
cd_CommonConstants.CONTENT_TYPE_EMAIL = "02dccfc33b630300d901655593efc4df";
cd_CommonConstants.CONTENT_TYPE_CALENDAR = "a342197a0b4303008cd6e7ae37673a19";
cd_CommonConstants.CONTENT_TYPE_BANNER = "a673597a0b4303008cd6e7ae37673a6f";
cd_CommonConstants.CONTENT_TYPE_MOBILE_BANNER = "ff192345b7633300264c2575de11a9b3";
cd_CommonConstants.CONTENT_TYPE_BUTTON_COMPLETE = "d356d006eb721300a9e7e26ac106fe20";
cd_CommonConstants.CONTENT_TYPE_COMMUNITY_BLOG = "308afcd9535213001fb2ddeeff7b12f1";
cd_CommonConstants.CONTENT_TYPE_RICH_CONTENT = "181d586d77741110a10440483f5a9933";

// Property SysId
cd_CommonConstants.PORTAL_URL_SUFFIX_PROPERTY_ID = "914c99f2b4830110fa9bd275bb133cb9";

// Properties
cd_CommonConstants.PROPERTY_LF_INTEGRATION = "sn_cd.enable_localization_framework_integration";
cd_CommonConstants.PORTAL_URL_SUFFIX_PROPERTY = "sn_cd.preview.portal_url_suffix";
cd_CommonConstants.SWITCH_LANGUAGE_PROPERTY = "sn_cd.enable_language_switching";
cd_CommonConstants.SYSTEM_LANGUAGE_PROPERTY = "glide.sys.language";

// Supported AJAX properties
cd_CommonConstants.SUPPORTED_AJAX_PROPERTIES = [
  cd_CommonConstants.PROPERTY_LF_INTEGRATION,
  cd_CommonConstants.PORTAL_URL_SUFFIX_PROPERTY,
  cd_CommonConstants.SWITCH_LANGUAGE_PROPERTY,
  cd_CommonConstants.SYSTEM_LANGUAGE_PROPERTY
];

// Table Names
cd_CommonConstants.CONTENT_TABLE_BASE = "sn_cd_content_base";
cd_CommonConstants.CONTENT_TABLE_PORTAL = "sn_cd_content_portal";
cd_CommonConstants.CONTENT_TABLE_NOTIFICATION = "sn_cd_content_notification";
cd_CommonConstants.CONTENT_TABLE_MOBILE = "sn_cd_content_mobile";
cd_CommonConstants.CONTENT_TABLE_TODO = "sn_cd_content_todo";
cd_CommonConstants.CONTENT_TABLE_PULSE = "sn_lp_cd_pulse_survey_content";
cd_CommonConstants.CONTENT_TABLE_FACEBOOK = "sn_fb_wp_campaigns_content";
cd_CommonConstants.CONTENT_TABLE_COMMUNITY = "sn_cd_content_community";
cd_CommonConstants.CONTENT_TABLE_BLOCK = "sn_cd_block";
cd_CommonConstants.CONTENT_TABLE_CONTENT_VISIBILITY = "sn_cd_content_visibility";

// Translatable fields by content type
cd_CommonConstants.PORTAL_TRANSLATABLE_FIELDS = {
  "event" : ["title", "rich_text"],
  "styled-content" : ["title", "heading_text", "body_text", "button_text", "link_text"],
  "rich_text" : ["title", "rich_text"],
  "calendar" : ["title"],
  "banner" : ["title", "heading_text", "body_text", "button_text", "rich_text"],
  "image_based_link" : ["title"],
  "url" : ["title"],
  "video" : ["title"],
  "rich_content" : ["title", "rich_text"]
};

cd_CommonConstants.BLOCK_TRANSLATABLE_FIELDS = ["name", "rich_text", "rich_text_user_specific"];

cd_CommonConstants.TODO_TRANSLATABLE_FIELDS = {
  "play_video" : ["title", "rich_text"],
  "button_complete" : ["title", "rich_text", "button_text"],
  "view_link" : ["title", "rich_text"]
};

cd_CommonConstants.NOTIFICATION_TRANSLATABLE_FIELDS = {
  "email" : ["title", "subject", "rich_text_plain_html"],
  "push" : ["title", "description"]
};

// Content Categories
cd_CommonConstants.CATEGORY_PORTAL_CONTENT = "portal_content";
cd_CommonConstants.CATEGORY_NOTIFICATION_CONTENT = "notification_content";
cd_CommonConstants.CATEGORY_TODO_CONTENT = "todo_content";
cd_CommonConstants.CATEGORY_MOBILE_CONTENT = "mobile_content";
cd_CommonConstants.CATEGORY_COMMUNITY_CONTENT = "community_content";

// Default content types by category
cd_CommonConstants.DEFAULT_CONTENT_TYPES_BY_CATEGORY = {};
cd_CommonConstants.DEFAULT_CONTENT_TYPES_BY_CATEGORY[cd_CommonConstants.CATEGORY_PORTAL_CONTENT] = cd_CommonConstants.CONTENT_TYPE_BANNER;
cd_CommonConstants.DEFAULT_CONTENT_TYPES_BY_CATEGORY[cd_CommonConstants.CATEGORY_NOTIFICATION_CONTENT] = cd_CommonConstants.CONTENT_TYPE_EMAIL;
cd_CommonConstants.DEFAULT_CONTENT_TYPES_BY_CATEGORY[cd_CommonConstants.CATEGORY_TODO_CONTENT] = cd_CommonConstants.CONTENT_TYPE_BUTTON_COMPLETE;
cd_CommonConstants.DEFAULT_CONTENT_TYPES_BY_CATEGORY[cd_CommonConstants.CATEGORY_MOBILE_CONTENT] = cd_CommonConstants.CONTENT_TYPE_MOBILE_BANNER;
cd_CommonConstants.DEFAULT_CONTENT_TYPES_BY_CATEGORY[cd_CommonConstants.CATEGORY_COMMUNITY_CONTENT] = cd_CommonConstants.CONTENT_TYPE_COMMUNITY_BLOG;

// Content Table to Content Category
cd_CommonConstants.CONTENT_CATEGORY_BY_TABLE = {};
cd_CommonConstants.CONTENT_CATEGORY_BY_TABLE[cd_CommonConstants.CONTENT_TABLE_PORTAL] = cd_CommonConstants.CATEGORY_PORTAL_CONTENT;
cd_CommonConstants.CONTENT_CATEGORY_BY_TABLE[cd_CommonConstants.CONTENT_TABLE_NOTIFICATION] = cd_CommonConstants.CATEGORY_NOTIFICATION_CONTENT;
cd_CommonConstants.CONTENT_CATEGORY_BY_TABLE[cd_CommonConstants.CONTENT_TABLE_TODO] = cd_CommonConstants.CATEGORY_TODO_CONTENT;
cd_CommonConstants.CONTENT_CATEGORY_BY_TABLE[cd_CommonConstants.CONTENT_TABLE_MOBILE] = cd_CommonConstants.CATEGORY_MOBILE_CONTENT;
cd_CommonConstants.CONTENT_CATEGORY_BY_TABLE[cd_CommonConstants.CONTENT_TABLE_COMMUNITY] = cd_CommonConstants.CATEGORY_COMMUNITY_CONTENT;

Sys ID

0541192473a230106d1f57903bf6a7aa

Offical Documentation

Official Docs: