presentation, fullscreen toggle; user state; animation loading;

This commit is contained in:
life
2015-03-06 22:13:27 +08:00
parent fe29869cc8
commit a836aa5a1f
24 changed files with 904 additions and 96 deletions

27
node_modules/sync.js generated vendored
View File

@@ -88,6 +88,21 @@ var Sync = {
me._needIncrSyncAgain = false;
},
// 停止同步
_stop: false,
stop: function() {
var me = this;
me._stop = true;
},
isStop: function() {
var me = this;
if(me._stop) {
me._stop = false;
return true;
}
return false;
},
//---------------
// notebook
//---------------
@@ -108,6 +123,7 @@ var Sync = {
// 同步笔记本
_syncNotebookToLocal: function(notebooks, callback) {
var me = this;
function canCall() {
// 是最后一块, 且
me._addSyncNotebookNum();
@@ -183,6 +199,9 @@ var Sync = {
syncNotebook: function(afterUsn, callback) {
var me = this;
if(me.isStop()) {
return;
}
Api.getSyncNotebooks(afterUsn, me._notebookMaxEntry, function(notebooks) {
console.log('syncNotebook')
console.log(notebooks);
@@ -228,6 +247,7 @@ var Sync = {
// 同步笔记到本地
_syncNoteToLocal: function(notes, callback) {
var me = this;
function canCall(isEmpty) {
// 为空时来判断是最后一次了, 可以之前的还没处理完
if(isEmpty && me._totalHasSyncNoteNum < me._totalSyncNoteNum) {
@@ -313,6 +333,10 @@ var Sync = {
syncNote: function(afterUsn, callback) {
var me = this;
if(me.isStop()) {
return;
}
Api.getSyncNotes(afterUsn, me._noteMaxEntry, function(notes) {
log('syncNote')
log(notes);
@@ -423,6 +447,9 @@ var Sync = {
},
syncTag: function(afterUsn, callback) {
var me = this;
if(me.isStop()) {
return;
}
Api.getSyncTags(afterUsn, me._tagMaxEntry, function(tags) {
log('syncTags------------------------------------')
log(tags);