fix sync option

This commit is contained in:
kekee000 2016-04-21 22:01:17 +08:00
parent b9b10a3a38
commit f79537765b
5 changed files with 11 additions and 8 deletions

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,7 @@
border-bottom: #353D45 1px solid;
.btn {
padding-left: 12px;
padding-left: 10px;
padding-right: 12px;
}

View File

@ -40,6 +40,7 @@ exports.getProcessors = function () {
files: [
'src/fonteditor/main.js',
'dep/**/*.js',
'!dep/**/*.min.js',
]
}),

View File

@ -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);
});

View File

@ -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 () {