Restore localized date in Styles list in Cite prefs
With the new tree, this was showing the full timestamp from the style object.
This commit is contained in:
parent
adb8aa39f8
commit
cc4225db1a
1 changed files with 10 additions and 3 deletions
|
@ -99,7 +99,7 @@ Zotero_Preferences.Cite = {
|
||||||
dataKey: "updated",
|
dataKey: "updated",
|
||||||
label: "zotero.preferences.cite.styles.styleManager.updated",
|
label: "zotero.preferences.cite.styles.styleManager.updated",
|
||||||
fixedWidth: true,
|
fixedWidth: true,
|
||||||
width: 150
|
width: 100
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
var handleKeyDown = (event) => {
|
var handleKeyDown = (event) => {
|
||||||
|
@ -108,13 +108,20 @@ Zotero_Preferences.Cite = {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
let styles = Zotero.Styles.getVisible()
|
||||||
|
.map((style) => {
|
||||||
|
return {
|
||||||
|
title: style.title,
|
||||||
|
updated: Zotero.Date.sqlToDate(style.updated, true).toLocaleDateString()
|
||||||
|
};
|
||||||
|
});
|
||||||
let elem = (
|
let elem = (
|
||||||
<IntlProvider locale={Zotero.locale} messages={Zotero.Intl.strings}>
|
<IntlProvider locale={Zotero.locale} messages={Zotero.Intl.strings}>
|
||||||
<VirtualizedTable
|
<VirtualizedTable
|
||||||
getRowCount={() => Zotero.Styles.getVisible().length}
|
getRowCount={() => styles.length}
|
||||||
id="styleManager-table"
|
id="styleManager-table"
|
||||||
ref={ref => this._tree = ref}
|
ref={ref => this._tree = ref}
|
||||||
renderItem={makeRowRenderer(index => Zotero.Styles.getVisible()[index])}
|
renderItem={makeRowRenderer(index => styles[index])}
|
||||||
showHeader={true}
|
showHeader={true}
|
||||||
multiSelect={true}
|
multiSelect={true}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue