- Make note font size configurable through preferences
- Make note font configurable through extensions.zotero.note.fontFamily hidden pref (for now) - Additional CSS rules can be added through extensions.zotero.note.css hidden pref - Give TinyMCE note body #zotero-tinymce-note id for more specific external customization - Remove status bar position option from visible preferences...
This commit is contained in:
parent
c562d145ec
commit
6a28e8b040
7 changed files with 56 additions and 27 deletions
|
@ -294,6 +294,28 @@
|
|||
self._editor.focus();
|
||||
self._focus = false;
|
||||
}
|
||||
|
||||
// Add CSS rules to notes
|
||||
if (self.mode == 'note') {
|
||||
var css = "body#zotero-tinymce.mceContentBody, "
|
||||
+ "body#zotero-tinymce-note.mceContentBody p, "
|
||||
+ "body#zotero-tinymce-note.mceContentBody pre { "
|
||||
+ "font-size: "
|
||||
+ Zotero.Prefs.get('note.fontSize') + "px; "
|
||||
+ "} "
|
||||
+ "body#zotero-tinymce-note.mceContentBody, "
|
||||
+ "body#zotero-tinymce-note.mceContentBody p { "
|
||||
+ "font-family: "
|
||||
+ Zotero.Prefs.get('note.fontFamily') + "; "
|
||||
+ "}"
|
||||
+ Zotero.Prefs.get('note.css');
|
||||
|
||||
var doc = editor.contentDocument;
|
||||
var head = doc.getElementsByTagName("head")[0];
|
||||
var style = doc.createElement("style");
|
||||
style.innerHTML = css;
|
||||
head.appendChild(style);
|
||||
}
|
||||
});
|
||||
|
||||
if (self._eventHandler) {
|
||||
|
|
|
@ -44,8 +44,8 @@ To add a new preference:
|
|||
label="&zotero.preferences.prefpane.general;"
|
||||
image="chrome://zotero/skin/prefs-general.png">
|
||||
<preferences>
|
||||
<preference id="pref-zoteroPaneOnTop" name="extensions.zotero.zoteroPaneOnTop" type="bool"/>
|
||||
<preference id="pref-fontSize" name="extensions.zotero.fontSize" type="string"/>
|
||||
<preference id="pref-noteFontSize" name="extensions.zotero.note.fontSize" type="string"/>
|
||||
<preference id="pref-statusBarIcon" name="extensions.zotero.statusBarIcon" type="int"/>
|
||||
<preference id="pref-automaticScraperUpdates" name="extensions.zotero.automaticScraperUpdates" type="bool"/>
|
||||
<preference id="pref-reportTranslationFailure" name="extensions.zotero.reportTranslationFailure" type="bool"/>
|
||||
|
@ -68,19 +68,15 @@ To add a new preference:
|
|||
</columns>
|
||||
|
||||
<rows>
|
||||
<row align="center">
|
||||
<row>
|
||||
<hbox align="center">
|
||||
<label value="&zotero.preferences.position;" control="positionMenu"/>
|
||||
</hbox>
|
||||
<hbox id="position-menu-box" align="center">
|
||||
<menulist id="positionMenu" preference="pref-zoteroPaneOnTop">
|
||||
<menupopup>
|
||||
<menuitem label="&zotero.preferences.position.above;" value="true"/>
|
||||
<menuitem label="&zotero.preferences.position.below;" value="false"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
<label value="&zotero.preferences.position.browser;"/>
|
||||
<label value="&zotero.preferences.statusBarIcon;" control="statusBarIcon"/>
|
||||
</hbox>
|
||||
<radiogroup id="statusBarIcon" orient="horizontal" preference="pref-statusBarIcon">
|
||||
<radio src="chrome://zotero/skin/zotero_status_bar.png" value="2"/>
|
||||
<radio src="chrome://zotero/skin/zotero_status_bar_compact.png" value="1"/>
|
||||
<radio label="&zotero.preferences.statusBarIcon.none;" value="0"/>
|
||||
</radiogroup>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
|
@ -95,14 +91,27 @@ To add a new preference:
|
|||
</row>
|
||||
|
||||
<row>
|
||||
<!-- TODO: localize -->
|
||||
<hbox align="center">
|
||||
<label value="&zotero.preferences.statusBarIcon;" control="statusBarIcon"/>
|
||||
<label value="Note font size:" control="noteFontSize"/>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<menulist id="noteFontSize" preference="pref-noteFontSize" editable="true">
|
||||
<menupopup>
|
||||
<menuitem label="11"/>
|
||||
<menuitem label="12"/>
|
||||
<menuitem label="13"/>
|
||||
<menuitem label="14"/>
|
||||
<menuitem label="18"/>
|
||||
<menuitem label="24"/>
|
||||
<menuitem label="36"/>
|
||||
<menuitem label="48"/>
|
||||
<menuitem label="64"/>
|
||||
<menuitem label="72"/>
|
||||
<menuitem label="96"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
</hbox>
|
||||
<radiogroup id="statusBarIcon" orient="horizontal" preference="pref-statusBarIcon">
|
||||
<radio src="chrome://zotero/skin/zotero_status_bar.png" value="2"/>
|
||||
<radio src="chrome://zotero/skin/zotero_status_bar_compact.png" value="1"/>
|
||||
<radio label="&zotero.preferences.statusBarIcon.none;" value="0"/>
|
||||
</radiogroup>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<script type="text/javascript">
|
||||
tinyMCE.init({
|
||||
// General options
|
||||
body_id : "zotero-tinymce-note",
|
||||
mode : "none",
|
||||
theme : "advanced",
|
||||
content_css : "chrome://zotero/skin/tinymce/note-content.css",
|
||||
|
|
|
@ -12,6 +12,7 @@ table.mceLayout > tbody > tr.mceLast {
|
|||
<script type="text/javascript">
|
||||
tinyMCE.init({
|
||||
// General options
|
||||
body_id : "zotero-tinymce-note",
|
||||
mode : "none",
|
||||
theme : "advanced",
|
||||
content_css : "chrome://zotero/skin/tinymce/note-content.css",
|
||||
|
|
|
@ -5,10 +5,6 @@
|
|||
<!ENTITY zotero.preferences.prefpane.general "General">
|
||||
|
||||
<!ENTITY zotero.preferences.userInterface "User Interface">
|
||||
<!ENTITY zotero.preferences.position "Display Zotero">
|
||||
<!ENTITY zotero.preferences.position.above "above">
|
||||
<!ENTITY zotero.preferences.position.below "below">
|
||||
<!ENTITY zotero.preferences.position.browser "browser content">
|
||||
<!ENTITY zotero.preferences.statusBarIcon "Status bar icon:">
|
||||
<!ENTITY zotero.preferences.statusBarIcon.none "None">
|
||||
<!ENTITY zotero.preferences.fontSize "Font size:">
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
body, td, pre {
|
||||
font-size: 11px;
|
||||
font-family: Lucida Grande, Tahoma, Verdana, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
pre {
|
||||
font-family: -moz-fixed;
|
||||
}
|
||||
|
|
|
@ -67,6 +67,11 @@ pref("extensions.zotero.fulltext.textMaxLength", 500000);
|
|||
pref("extensions.zotero.fulltext.pdfMaxPages", 100);
|
||||
pref("extensions.zotero.search.useLeftBound", true);
|
||||
|
||||
// Notes
|
||||
pref("extensions.zotero.note.fontFamily", "Lucida Grande, Tahoma, Verdana, Helvetica, sans-serif");
|
||||
pref("extensions.zotero.note.fontSize", "11");
|
||||
pref("extensions.zotero.note.css", "");
|
||||
|
||||
// Reports
|
||||
pref("extensions.zotero.report.includeAllChildItems", true);
|
||||
pref("extensions.zotero.report.combineChildItems", true);
|
||||
|
|
Loading…
Add table
Reference in a new issue