Skip to content
Snippets Groups Projects
Commit 3e874f9d authored by juanf's avatar juanf
Browse files

SSDM-4713 : Enforce character size font for Sequence field

SVN: 37654
parent a859ef0e
No related branches found
No related tags found
No related merge requests found
...@@ -115,6 +115,12 @@ $.extend(DefaultProfile.prototype, { ...@@ -115,6 +115,12 @@ $.extend(DefaultProfile.prototype, {
this.isAdmin = false; this.isAdmin = false;
this.forcedDisableRTF = ["FREEFORM_TABLE_STATE","NAME", "SEQUENCE"]; this.forcedDisableRTF = ["FREEFORM_TABLE_STATE","NAME", "SEQUENCE"];
this.forceMonospaceFont = ["SEQUENCE"];
this.isForcedMonospaceFont = function(propertytype) {
return (propertytype && $.inArray(propertytype.code, this.forceMonospaceFont) !== -1);
}
this.isForcedDisableRTF = function(propertytype) { this.isForcedDisableRTF = function(propertytype) {
return (propertytype && $.inArray(propertytype.code, this.forcedDisableRTF) !== -1); return (propertytype && $.inArray(propertytype.code, this.forcedDisableRTF) !== -1);
} }
......
...@@ -772,6 +772,10 @@ var FormUtil = new function() { ...@@ -772,6 +772,10 @@ var FormUtil = new function() {
this.activateRichTextProperties = function($component, componentOnChange, propertyType) { this.activateRichTextProperties = function($component, componentOnChange, propertyType) {
if(profile.isForcedMonospaceFont(propertyType)) {
$component.css("font-family", "Consolas, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace");
}
if(profile.isForcedDisableRTF(propertyType)) { if(profile.isForcedDisableRTF(propertyType)) {
$component.change(function(event) { $component.change(function(event) {
componentOnChange(event, $(this).val()); componentOnChange(event, $(this).val());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment