Skip to content
This repository has been archived by the owner on Dec 12, 2017. It is now read-only.

Commit

Permalink
Merge pull request #330 from kosssi/master
Browse files Browse the repository at this point in the history
Some bug fix
  • Loading branch information
kosssi authored Oct 21, 2016
2 parents c4b57cf + beda4fc commit 7001ffc
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/app/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,6 @@
"config_loading_calendars": "Lade Kalender.",
"config_loading_contacts": "Lade Kontakte.",
"config_log_send": "Protokoll senden",
"config_log_share": "Share logs",
"config_log_share": "Protokoll freigeben",
"Unexpected token <": "Prüfe, ob dein Cozy richtig funktioniert."
}
2 changes: 1 addition & 1 deletion src/app/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,6 @@
"config_loading_calendars": "カレンダーのロード中。",
"config_loading_contacts": "連絡先のロード中。",
"config_log_send": "ログを送信",
"config_log_share": "Share logs",
"config_log_share": "ログを共有",
"Unexpected token <": "Cozy が正しく動作しているか確認してください。"
}
14 changes: 7 additions & 7 deletions src/app/replicator/fromDevice/contact_importer.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ continueOnError = require('../../lib/utils').continueOnError log
###
module.exports = class ContactImporter

constructor: (@db) ->
@db ?= app.init.database.replicateDb
constructor: (@replicateDb) ->
@replicateDb ?= app.init.database.replicateDb
@transformer = new CozyToAndroidContact()
@permission = new Permission()

Expand Down Expand Up @@ -59,7 +59,7 @@ module.exports = class ContactImporter
_update: (phoneContact, callback) ->
async.parallel
fromPouch: (cb) =>
@db.get phoneContact.sourceId, attachments: true, cb
@replicateDb.get phoneContact.sourceId, attachments: true, cb

fromPhone: (cb) =>
@transformer.reverseTransform phoneContact, cb
Expand All @@ -73,14 +73,14 @@ module.exports = class ContactImporter
picture = contact._attachments.picture

if res.fromPouch._attachments?.picture?
oldPicture = res.fromPouch._attachments?.picture?
oldPicture = res.fromPouch._attachments?.picture
if oldPicture.data is picture.data
picture.revpos = oldPicture.revpos
else
picture.revpos = 1 + \
parseInt contact._rev.split('-')[0]

@db.put contact, (err, idNrev) =>
@replicateDb.put contact, (err, idNrev) =>
return callback err if err
@_undirty phoneContact, idNrev, callback

Expand All @@ -98,7 +98,7 @@ module.exports = class ContactImporter
if contact._attachments?.picture?
contact._attachments.picture.revpos = 1

@db.post contact, (err, idNrev) =>
@replicateDb.post contact, (err, idNrev) =>
return callback err if err
@_undirty phoneContact, idNrev, callback

Expand All @@ -113,7 +113,7 @@ module.exports = class ContactImporter
_rev: phoneContact.sync2
_deleted: true

@db.put toDelete, (err, res) ->
@replicateDb.put toDelete, (err, res) ->
return callback err if err
phoneContact.remove (-> callback()), callback, \
callerIsSyncAdapter: true
Expand Down
2 changes: 1 addition & 1 deletion src/app/router.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,5 @@ module.exports = class Router extends Backbone.Router


config: ->
@layout.updateHeader title: 'config', displaySearch: false
@layout.updateHeader title: t('config'), displaySearch: false
@layout.display new ConfigView()
2 changes: 1 addition & 1 deletion src/app/templates/layout/header.jade
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
i.material-icons search

if title
a.brand-logo.center(href='#')= t(title)
a.brand-logo.center(href='#')= title

ul.left.file
li
Expand Down
11 changes: 9 additions & 2 deletions src/app/views/config.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,12 @@ module.exports = class ConfigView extends BaseView
# confirm, launch initial replication, navigate to first sync UI.
synchroBtn: ->
if confirm t 'confirm message'
app.init.replicator.stopRealtime()
app.init.toState 'fFirstSyncView'
@replicator.stopRealtime()
@config.set 'firstSyncFiles', false
@config.set 'firstSyncContacts', false
@config.set 'firstSyncCalendars', false
@firstReplication.addTask 'files', =>
@replicator.updateIndex ->
setTimeout =>
@render()
, 200
2 changes: 1 addition & 1 deletion src/app/views/layout/header.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module.exports = class Header extends BaseView
if options.path
@parentPath = pathHelper.getDirName options.path
@title = pathHelper.getFileName options.path
@title = 'files' if @parentPath is '' and @title is ''
@title = t('files') if @parentPath is '' and @title is ''
@path = options.path
@title = options.title if options.title

Expand Down
4 changes: 2 additions & 2 deletions src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
"postrelease:android": "PACKAGE_VERSION=$(node -p -e \"require('./package.json').version\"); mv -f ../build/android/CozyMobile.apk ../build/android/CozyMobile_$PACKAGE_VERSION.apk; md5 ../build/android/CozyMobile_$PACKAGE_VERSION.apk; shasum ../build/android/CozyMobile_$PACKAGE_VERSION.apk"
},
"dependencies": {
"animate.css": "^3.5.2",
"animate.css": "3.5.2",
"async": "2.1.2",
"backbone": "1.3.3",
"backbone.statemachine": "0.2.7",
"hammerjs": "2.0.8",
"jquery": "1.9.1",
"material-design-icons": "3.0.1",
"materialize-css": "https://github.com/Dogfalo/materialize.git",
"materialize-css": "https://github.com/cozy/materialize.git",
"moment": "2.15.1",
"moment-timezone": "0.5.6",
"node-polyglot": "2.0.0",
Expand Down

0 comments on commit 7001ffc

Please sign in to comment.