ace字体添加yahei

This commit is contained in:
life
2015-11-25 18:03:42 +08:00
parent bbd0233466
commit cd58a3617a
5 changed files with 22 additions and 11 deletions

View File

@@ -17,6 +17,17 @@ var Api = {
userService: UserService, userService: UserService,
dbService: db, dbService: db,
// 打开本地目录
// mac和windows下不同
openLocalDir: function (dir) {
if (isMac()) {
gui.Shell.showItemInFolder(dir);
}
else {
gui.Shell.openItem(dir);
}
},
// 得到当前版本 // 得到当前版本
getCurVersion: function (callback) { getCurVersion: function (callback) {
var me = this; var me = this;

View File

@@ -48,7 +48,7 @@
/** lifelife */ /** lifelife */
/* Pretty printing styles. Used with prettify.js. */ /* Pretty printing styles. Used with prettify.js. */
pre.prettyprint * { pre.prettyprint * {
font-family: Monaco, Menlo, Consolas, "Courier New", monospace; font-family: Monaco, Menlo, Consolas, "Courier New", monospace, microsoft yahei;
} }
pre.prettyprint { pre.prettyprint {
white-space: pre-wrap; white-space: pre-wrap;

View File

@@ -8,7 +8,7 @@
var async; var async;
define(function() { define(function() {
var setLang = { var accounts = {
langs: { langs: {
'en-us': { 'en-us': {
'Accounts': 'Accounts', 'Accounts': 'Accounts',
@@ -166,14 +166,14 @@ define(function() {
Api.gui.dialog.showErrorBox(me.getMsg("Error"), me.getMsg("No such account")); Api.gui.dialog.showErrorBox(me.getMsg("Error"), me.getMsg("No such account"));
return; return;
} }
Api.gui.Shell.showItemInFolder(path); Api.openLocalDir(path);
}); });
}, },
'open-attach-dir': function (userId) { 'open-attach-dir': function (userId) {
Api.gui.Shell.showItemInFolder(Api.userService.getUserAttachsPath(userId)); Api.openLocalDir(Api.userService.getUserAttachsPath(userId));
}, },
'open-image-dir': function (userId) { 'open-image-dir': function (userId) {
Api.gui.Shell.showItemInFolder(Api.userService.getUserImagesPath(userId)); Api.openLocalDir(Api.userService.getUserImagesPath(userId));
}, },
'delete': function (userId, $targetBtn) { 'delete': function (userId, $targetBtn) {
me.deleteUser(userId, function (ok) { me.deleteUser(userId, function (ok) {
@@ -521,6 +521,6 @@ define(function() {
} }
}; };
return setLang; return accounts;
}); });

View File

@@ -1184,7 +1184,7 @@ h1, h2, h3 {
// ace 重置css, 必须 // ace 重置css, 必须
.ace_editor, .ace_editor * { .ace_editor, .ace_editor * {
// font: 14px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace; // font: 14px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro'; font-family: @aceFontFamily !important; // 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro';
} }
/* leanote nav */ /* leanote nav */
@@ -1314,7 +1314,7 @@ h1, h2, h3 {
text-decoration: underline; text-decoration: underline;
} }
pre { pre {
font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace; font: 12px/normal @aceFontFamily; // 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
// background-color: #FFFFFF; // background-color: #FFFFFF;
color: #4D4D4C; color: #4D4D4C;
// padding: 5px; // padding: 5px;

View File

@@ -1296,7 +1296,7 @@ h3 {
} }
.ace_editor, .ace_editor,
.ace_editor * { .ace_editor * {
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro'; font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', "Microsoft YaHei", "微软雅黑" !important;
} }
/* leanote nav */ /* leanote nav */
.leanoteNav { .leanoteNav {
@@ -1399,7 +1399,7 @@ h3 {
text-decoration: underline; text-decoration: underline;
} }
#editorContent pre { #editorContent pre {
font: 12px / normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace; font: 12px / normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', "Microsoft YaHei", "微软雅黑";
color: #4D4D4C; color: #4D4D4C;
} }
#editorContent .ace-tomorrow { #editorContent .ace-tomorrow {