Compare commits
2 commits
531e8697be
...
ca83e4303c
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ca83e4303c | ||
![]() |
f5af1898fd |
4 changed files with 25 additions and 16 deletions
Binary file not shown.
|
@ -606,17 +606,27 @@ FunctionEnd
|
||||||
Function CheckExistingInstall
|
Function CheckExistingInstall
|
||||||
; If there is a pending file copy from a previous upgrade don't allow
|
; If there is a pending file copy from a previous upgrade don't allow
|
||||||
; installing until after the system has rebooted.
|
; installing until after the system has rebooted.
|
||||||
IfFileExists "$INSTDIR\${FileMainEXE}.moz-upgrade" +1 +4
|
IfFileExists "$INSTDIR\${FileMainEXE}.moz-upgrade" +1 +5
|
||||||
MessageBox MB_YESNO|MB_ICONEXCLAMATION "$(WARN_RESTART_REQUIRED_UPGRADE)" IDNO +2
|
MessageBox MB_YESNOCANCEL|MB_ICONEXCLAMATION "$(WARN_RESTART_REQUIRED_UPGRADE)" IDNO +3 IDCANCEL +2
|
||||||
Reboot
|
Reboot
|
||||||
Quit
|
Quit
|
||||||
|
RMDir /r $INSTDIR
|
||||||
|
|
||||||
|
IfFileExists "$INSTDIR\${FileMainEXE}.moz-upgrade" +1 +3
|
||||||
|
MessageBox MB_OK|MB_ICONEXCLAMATION "Failed to remove the previous installation. Please delete $INSTDIR and try again."
|
||||||
|
Quit
|
||||||
|
|
||||||
; If there is a pending file deletion from a previous uninstall don't allow
|
; If there is a pending file deletion from a previous uninstall don't allow
|
||||||
; installing until after the system has rebooted.
|
; installing until after the system has rebooted.
|
||||||
IfFileExists "$INSTDIR\${FileMainEXE}.moz-delete" +1 +4
|
IfFileExists "$INSTDIR\${FileMainEXE}.moz-delete" +1 +5
|
||||||
MessageBox MB_YESNO|MB_ICONEXCLAMATION "$(WARN_RESTART_REQUIRED_UNINSTALL)" IDNO +2
|
MessageBox MB_YESNOCANCEL|MB_ICONEXCLAMATION "$(WARN_RESTART_REQUIRED_UNINSTALL)" IDNO +3 IDCANCEL +2
|
||||||
Reboot
|
Reboot
|
||||||
Quit
|
Quit
|
||||||
|
RMDir /r $INSTDIR
|
||||||
|
|
||||||
|
IfFileExists "$INSTDIR\${FileMainEXE}.moz-delete" +1 +3
|
||||||
|
MessageBox MB_OK|MB_ICONEXCLAMATION "Failed to remove the previous installation. Please delete $INSTDIR and try again."
|
||||||
|
Quit
|
||||||
|
|
||||||
${If} ${FileExists} "$INSTDIR\${FileMainEXE}"
|
${If} ${FileExists} "$INSTDIR\${FileMainEXE}"
|
||||||
; Disable the next, cancel, and back buttons
|
; Disable the next, cancel, and back buttons
|
||||||
|
|
|
@ -433,14 +433,12 @@ Zotero.ItemFields = new function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
var fieldName = this.getName(fieldName);
|
var fieldName = this.getName(fieldName);
|
||||||
if (!fieldName) {
|
if (fieldName) {
|
||||||
return 'auto';
|
let baseField = this.getBaseIDFromTypeAndField(itemTypeID, fieldName);
|
||||||
}
|
|
||||||
|
|
||||||
var baseField = this.getBaseIDFromTypeAndField(itemTypeID, fieldName);
|
|
||||||
if (baseField) {
|
if (baseField) {
|
||||||
fieldName = this.getName(baseField);
|
fieldName = this.getName(baseField);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
switch (fieldName) {
|
switch (fieldName) {
|
||||||
// Certain fields containing IDs, numbers, and data: always LTR
|
// Certain fields containing IDs, numbers, and data: always LTR
|
||||||
case 'ISBN':
|
case 'ISBN':
|
||||||
|
@ -466,7 +464,8 @@ Zotero.ItemFields = new function() {
|
||||||
case 'extra':
|
case 'extra':
|
||||||
return 'ltr';
|
return 'ltr';
|
||||||
|
|
||||||
// Everything else: guess based on the language if we have one; otherwise auto
|
// Everything else (including false): guess based on the language if we have one;
|
||||||
|
// otherwise auto
|
||||||
default:
|
default:
|
||||||
if (itemLanguage) {
|
if (itemLanguage) {
|
||||||
let languageCode = Zotero.Utilities.Item.languageToISO6391(itemLanguage);
|
let languageCode = Zotero.Utilities.Item.languageToISO6391(itemLanguage);
|
||||||
|
|
|
@ -46,12 +46,12 @@ describe("Zotero.ItemFields", function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("#getDirection()", function () {
|
describe("#getDirection()", function () {
|
||||||
it("should return 'auto' for non-field", function () {
|
|
||||||
assert.equal(Zotero.ItemFields.getDirection('book', 'creator-0-lastName', ''), 'auto');
|
|
||||||
});
|
|
||||||
|
|
||||||
it("should follow app locale for primary field", function () {
|
it("should follow app locale for primary field", function () {
|
||||||
assert.equal(Zotero.ItemFields.getDirection('book', 'dateAdded', ''), Zotero.dir)
|
assert.equal(Zotero.ItemFields.getDirection('book', 'dateAdded', ''), Zotero.dir)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("should use item language for non-field", function () {
|
||||||
|
assert.equal(Zotero.ItemFields.getDirection('book', 'creator-0-lastName', 'ar'), 'rtl');
|
||||||
|
});
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue