Owen Leonard
698efcc0aa
This patch adds CodeMirror syntax highlighting by default to JS and CSS system preferences. HTML preferences will use CodeMirror editors if UseWYSIWYGinSystemPreferences is disabled. Three new CodeMirror files are added to support three new syntax highlighting modes: XML (for HTML), CSS, and JS. A new option is added to *.pref file configurations for textareas which are intended for HTML, JS, or CSS: syntax. This option is passed to the CodeMirror configuration to control syntax highlighting mode. Textareas without a syntax option specified will not have CodeMirror enabled. To test, apply the patch and go to Administration -> System preferences. Test the behavior of several preferences which use <textarea> as their input. For example: - OPACUserJS (JS) - IntranetUserCSS (CSS) - OpacHeader (HTML) - BibtexExportAdditionalFields (no highlighting) Text entry in each of these should have the correct syntax highlighting applied to them. All data should be saved correctly. Test with UseWYSIWYGinSystemPreferences both on and off. Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
137 lines
No EOL
2.2 KiB
CSS
137 lines
No EOL
2.2 KiB
CSS
.preference-url, .preference-multi, .preference-long, .preference-file {
|
|
width: 20em;
|
|
}
|
|
|
|
.preference-short, .preference-email {
|
|
width: 10em;
|
|
}
|
|
|
|
.preference-integer, .preference-percent, .preference-date, .preference-currency {
|
|
width: 5em;
|
|
}
|
|
|
|
textarea.preference {
|
|
width: 35em;
|
|
height: 20em;
|
|
display: block;
|
|
}
|
|
|
|
textarea.preference-code, .preference-file {
|
|
font-family: monospace;
|
|
}
|
|
|
|
a.expand-textarea {
|
|
display: block;
|
|
}
|
|
dl {
|
|
margin-left : 1em;
|
|
}
|
|
dt {
|
|
padding : .1em;
|
|
}
|
|
h1 {
|
|
font-size : 149%;
|
|
}
|
|
h2 {
|
|
font-size : 134%;
|
|
}
|
|
|
|
table {
|
|
width : 100%;
|
|
}
|
|
|
|
caption {
|
|
color : #003399;
|
|
}
|
|
|
|
h3 {
|
|
color : #003366;
|
|
margin : .4em 0;
|
|
width : 40%;
|
|
}
|
|
|
|
h3.expanded {
|
|
background: transparent url("../img/collapse.gif") 0 6px no-repeat;
|
|
cursor : pointer;
|
|
padding-left : 12px;
|
|
}
|
|
|
|
h3.collapsed {
|
|
background: transparent url("../img/expand.gif") 0 6px no-repeat;
|
|
cursor : pointer;
|
|
padding-left : 12px;
|
|
}
|
|
|
|
.humanMsg strong {
|
|
display: block;
|
|
font-weight: normal;
|
|
}
|
|
|
|
#yui-main {
|
|
margin-bottom:2em;
|
|
}
|
|
#toolbar.floating {
|
|
box-shadow: 0 3px 2px 0 rgba(0, 0, 0, 0.5);
|
|
border-radius: 0;
|
|
}
|
|
|
|
.loading {
|
|
display: inline-block;
|
|
height : 16px;
|
|
width: 16px;
|
|
background: transparent url("../img/spinner-small.gif") top left no-repeat;
|
|
padding : 0 4px;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
span.overridden {
|
|
font-style: italic;
|
|
font-weight: bold;
|
|
color: red;
|
|
}
|
|
|
|
.sortable {
|
|
margin-left: 0;
|
|
max-width: 20em;
|
|
padding: .5em 0;
|
|
}
|
|
|
|
.sortable label {
|
|
font-weight: bold;
|
|
}
|
|
|
|
.sortable li {
|
|
background: #FCFCFC url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAMAQMAAABoTh6ZAAAABlBMVEVMaXHExMQ/ZYtiAAAAAXRSTlMAQObYZgAAABNJREFUeNpjYGBgMDYAIQjAxgYAKfECU0ml038AAAAASUVORK5CYII=") repeat-y;
|
|
border: 1px solid #EEE;
|
|
cursor: move;
|
|
font-weight: bold;
|
|
list-style-type: none;
|
|
margin: .5em 0;
|
|
padding: .1em .5em;
|
|
padding-left: 20px;
|
|
}
|
|
|
|
.sortable li:hover {
|
|
background-color: #FFC;
|
|
}
|
|
|
|
.sortable li li {
|
|
background: transparent none;
|
|
border: 0;
|
|
font-weight: normal;
|
|
padding-left: 0;
|
|
}
|
|
|
|
.sortable li li label {
|
|
font-weight: normal;
|
|
}
|
|
|
|
.sortable li.ui-sortable-helper {
|
|
background-color: #FFC;
|
|
}
|
|
|
|
.CodeMirror {
|
|
border: 1px solid #EEE;
|
|
margin: 1em 1em 1em 0;
|
|
resize: vertical;
|
|
} |