fix sync option
This commit is contained in:
parent
b9b10a3a38
commit
f79537765b
File diff suppressed because one or more lines are too long
@ -5,7 +5,7 @@
|
||||
border-bottom: #353D45 1px solid;
|
||||
|
||||
.btn {
|
||||
padding-left: 12px;
|
||||
padding-left: 10px;
|
||||
padding-right: 12px;
|
||||
}
|
||||
|
||||
|
@ -40,6 +40,7 @@ exports.getProcessors = function () {
|
||||
files: [
|
||||
'src/fonteditor/main.js',
|
||||
'dep/**/*.js',
|
||||
'!dep/**/*.min.js',
|
||||
]
|
||||
}),
|
||||
|
||||
|
@ -158,7 +158,12 @@ define(
|
||||
config: config
|
||||
});
|
||||
},
|
||||
|
||||
'dosync': function (projectId) {
|
||||
var syncConfig = program.project.getConfig(projectId).sync;
|
||||
if (syncConfig && syncConfig.autoSync) {
|
||||
actions.sync(projectId, program.ttfManager.get(), syncConfig);
|
||||
}
|
||||
},
|
||||
'save': function (options) {
|
||||
if (program.ttfManager.get()) {
|
||||
// 已经保存过的项目
|
||||
@ -168,10 +173,7 @@ define(
|
||||
.then(function () {
|
||||
program.ttfManager.setState('saved');
|
||||
program.loading.show(i18n.lang.msg_save_success, 400);
|
||||
var syncConfig = program.project.getConfig(projectId).sync;
|
||||
if (syncConfig && syncConfig.autoSync) {
|
||||
actions.sync(projectId, program.ttfManager.get(), syncConfig);
|
||||
}
|
||||
actions['dosync'](projectId);
|
||||
}, function () {
|
||||
program.loading.show(i18n.lang.msg_save_failed, 1000);
|
||||
});
|
||||
|
@ -531,7 +531,7 @@ define(
|
||||
program.viewer.focus();
|
||||
})
|
||||
.on('sync', function (e) {
|
||||
actions.sync(e.projectId);
|
||||
actions['dosync'](e.projectId);
|
||||
})
|
||||
.on('del', function (e) {
|
||||
program.project.remove(e.projectId).then(function () {
|
||||
|
Loading…
x
Reference in New Issue
Block a user