Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function sync(){
- db.sync(remoteCouch)
- .on('complete', function (info) {
- var opts = {live: true};
- db.sync(remoteCouch, opts).on('error', function (err) {
- $('#sync-indicator').html("sync_disabled");
- $('#sync-indicator').css("color", "#bb0000");
- });
- $('#sync-indicator').html("sync");
- $('#sync-indicator').css("color", "#00bb00");
- }).on('error', function (err) {
- $('#sync-indicator').html("sync_disabled");
- $('#sync-indicator').css("color", "#bb0000");
- });
- }
- if (remoteCouch){
- sync();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement