├── .gitignore ├── images ├── info.png ├── sync.png ├── type.png ├── close.png ├── delete.png ├── photo.png ├── share.png ├── sortby.png ├── close@2x.png ├── delete@2x.png ├── expunge.png ├── info@2x.png ├── photo@2x.png ├── restore.png ├── settings.png ├── share@2x.png ├── sortby@2x.png ├── sync@2x.png ├── type@2x.png ├── attachment.png ├── empty_list.png ├── empty_trash.png ├── expunge@2x.png ├── restore@2x.png ├── search_big.png ├── settings@2x.png ├── Icon_Notes@1.5.png ├── Icon_Notes@1.png ├── Icon_Notes@2.png ├── attachment@2x.png ├── empty_list@2x.png ├── empty_trash@2x.png ├── evernote-logo.png ├── iconaction_new.png ├── image_missing.png ├── search_big@2x.png ├── search_small.png ├── Icon_Notes@2.25.png ├── Icon_Notes@3.375.png ├── div_line_lg_gray.png ├── evernote-logo@2x.png ├── header_bg_green.png ├── search_small@2x.png ├── separator_green.png ├── iconaction_new@2x.png └── header_negative_green.png ├── redirect.html ├── style ├── images │ └── ui │ │ ├── pattern.png │ │ └── gradient.png └── dialog.css ├── shared ├── style │ ├── buttons │ │ └── images │ │ │ ├── next.png │ │ │ ├── next@2x.png │ │ │ ├── next@1.5x.png │ │ │ └── next@2.25x.png │ ├── headers │ │ └── images │ │ │ └── icons │ │ │ ├── up.png │ │ │ ├── add.png │ │ │ ├── back.png │ │ │ ├── down.png │ │ │ ├── edit.png │ │ │ ├── menu.png │ │ │ ├── send.png │ │ │ ├── user.png │ │ │ ├── add@2x.png │ │ │ ├── back@2x.png │ │ │ ├── close.png │ │ │ ├── compose.png │ │ │ ├── down@2x.png │ │ │ ├── edit@2x.png │ │ │ ├── menu@2x.png │ │ │ ├── options.png │ │ │ ├── reply.png │ │ │ ├── send@2x.png │ │ │ ├── up@1.5x.png │ │ │ ├── up@2x.png │ │ │ ├── user@2x.png │ │ │ ├── add@1.5x.png │ │ │ ├── add@2.25x.png │ │ │ ├── back@1.5x.png │ │ │ ├── close@2x.png │ │ │ ├── down@1.5x.png │ │ │ ├── edit@1.5x.png │ │ │ ├── menu@1.5x.png │ │ │ ├── reply@2x.png │ │ │ ├── reply_all.png │ │ │ ├── send@1.5x.png │ │ │ ├── up@2.25x.png │ │ │ ├── user@1.5x.png │ │ │ ├── back@2.25x.png │ │ │ ├── close@1.5x.png │ │ │ ├── close@2.25x.png │ │ │ ├── compose@1.5x.png │ │ │ ├── compose@2x.png │ │ │ ├── down@2.25x.png │ │ │ ├── edit@2.25x.png │ │ │ ├── menu@2.25x.png │ │ │ ├── options@1.5x.png │ │ │ ├── options@2x.png │ │ │ ├── organic │ │ │ ├── add.png │ │ │ ├── back.png │ │ │ ├── edit.png │ │ │ ├── add@2x.png │ │ │ ├── close.png │ │ │ ├── add@1.5x.png │ │ │ ├── add@2.25x.png │ │ │ ├── back@1.5x.png │ │ │ ├── back@2x.png │ │ │ ├── close@2x.png │ │ │ ├── edit@1.5x.png │ │ │ ├── edit@2x.png │ │ │ ├── back@2.25x.png │ │ │ ├── close@1.5x.png │ │ │ ├── close@2.25x.png │ │ │ └── edit@2.25x.png │ │ │ ├── reply@1.5x.png │ │ │ ├── reply@2.25x.png │ │ │ ├── reply_all@2x.png │ │ │ ├── send@2.25x.png │ │ │ ├── user@2.25x.png │ │ │ ├── compose@2.25x.png │ │ │ ├── options@2.25x.png │ │ │ ├── reply_all@1.5x.png │ │ │ └── reply_all@2.25x.png │ ├── progress_activity │ │ ├── images │ │ │ └── ui │ │ │ │ ├── light.png │ │ │ │ ├── default.png │ │ │ │ ├── activity.png │ │ │ │ ├── default@2x.png │ │ │ │ ├── light@1.5x.png │ │ │ │ ├── light@2x.png │ │ │ │ ├── activity@2x.png │ │ │ │ ├── default@1.5x.png │ │ │ │ ├── light@2.25x.png │ │ │ │ ├── activity@1.5x.png │ │ │ │ ├── activity@2.25x.png │ │ │ │ └── default@2.25x.png │ │ └── index.html │ ├── progress_activity.css │ ├── buttons.css │ └── headers.css ├── style_unstable │ ├── drawer │ │ ├── images │ │ │ ├── icons │ │ │ │ ├── menu.png │ │ │ │ ├── menu@1.5x.png │ │ │ │ └── menu@2x.png │ │ │ └── ui │ │ │ │ ├── header.png │ │ │ │ ├── pattern.png │ │ │ │ ├── shadow.png │ │ │ │ ├── negative.png │ │ │ │ ├── separator.png │ │ │ │ ├── shadow@2x.png │ │ │ │ ├── shadow@1.5x.png │ │ │ │ ├── header │ │ │ │ ├── header.png │ │ │ │ ├── shadow.png │ │ │ │ ├── shadow@2x.png │ │ │ │ └── shadow@1.5x.png │ │ │ │ ├── shadow_header.png │ │ │ │ ├── pattern_subheader.png │ │ │ │ ├── separator_large.png │ │ │ │ ├── shadow_header@2x.png │ │ │ │ └── shadow_header@1.5x.png │ │ └── index.html │ └── drawer.css └── js │ ├── lazy_loader.js │ └── font_size_utils.js ├── README.md ├── .gitmodules ├── locales ├── locales.ini ├── notes.en-US.properties ├── notes.uk.properties ├── notes.pl.properties ├── notes.bn-BD.properties ├── notes.pt-BR.properties ├── notes.ca.properties ├── notes.es.properties ├── notes.fy-NL.properties ├── notes.fr.properties ├── notes.nl.properties └── notes.de.properties ├── js ├── redirector.js ├── Console.js ├── dialog.js ├── Searcher.js ├── Cards.js ├── lib │ └── oauth │ │ └── sha1.js ├── db.js └── models.js ├── Makefile ├── manifest.appcache ├── manifest.webapp └── index.html /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .htaccess 3 | /test 4 | notes.zip 5 | -------------------------------------------------------------------------------- /images/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/info.png -------------------------------------------------------------------------------- /images/sync.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/sync.png -------------------------------------------------------------------------------- /images/type.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/type.png -------------------------------------------------------------------------------- /images/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/close.png -------------------------------------------------------------------------------- /images/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/delete.png -------------------------------------------------------------------------------- /images/photo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/photo.png -------------------------------------------------------------------------------- /images/share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/share.png -------------------------------------------------------------------------------- /images/sortby.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/sortby.png -------------------------------------------------------------------------------- /images/close@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/close@2x.png -------------------------------------------------------------------------------- /images/delete@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/delete@2x.png -------------------------------------------------------------------------------- /images/expunge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/expunge.png -------------------------------------------------------------------------------- /images/info@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/info@2x.png -------------------------------------------------------------------------------- /images/photo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/photo@2x.png -------------------------------------------------------------------------------- /images/restore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/restore.png -------------------------------------------------------------------------------- /images/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/settings.png -------------------------------------------------------------------------------- /images/share@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/share@2x.png -------------------------------------------------------------------------------- /images/sortby@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/sortby@2x.png -------------------------------------------------------------------------------- /images/sync@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/sync@2x.png -------------------------------------------------------------------------------- /images/type@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/type@2x.png -------------------------------------------------------------------------------- /images/attachment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/attachment.png -------------------------------------------------------------------------------- /images/empty_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/empty_list.png -------------------------------------------------------------------------------- /images/empty_trash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/empty_trash.png -------------------------------------------------------------------------------- /images/expunge@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/expunge@2x.png -------------------------------------------------------------------------------- /images/restore@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/restore@2x.png -------------------------------------------------------------------------------- /images/search_big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/search_big.png -------------------------------------------------------------------------------- /images/settings@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/settings@2x.png -------------------------------------------------------------------------------- /images/Icon_Notes@1.5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/Icon_Notes@1.5.png -------------------------------------------------------------------------------- /images/Icon_Notes@1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/Icon_Notes@1.png -------------------------------------------------------------------------------- /images/Icon_Notes@2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/Icon_Notes@2.png -------------------------------------------------------------------------------- /images/attachment@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/attachment@2x.png -------------------------------------------------------------------------------- /images/empty_list@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/empty_list@2x.png -------------------------------------------------------------------------------- /images/empty_trash@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/empty_trash@2x.png -------------------------------------------------------------------------------- /images/evernote-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/evernote-logo.png -------------------------------------------------------------------------------- /images/iconaction_new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/iconaction_new.png -------------------------------------------------------------------------------- /images/image_missing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/image_missing.png -------------------------------------------------------------------------------- /images/search_big@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/search_big@2x.png -------------------------------------------------------------------------------- /images/search_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/search_small.png -------------------------------------------------------------------------------- /images/Icon_Notes@2.25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/Icon_Notes@2.25.png -------------------------------------------------------------------------------- /images/Icon_Notes@3.375.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/Icon_Notes@3.375.png -------------------------------------------------------------------------------- /images/div_line_lg_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/div_line_lg_gray.png -------------------------------------------------------------------------------- /images/evernote-logo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/evernote-logo@2x.png -------------------------------------------------------------------------------- /images/header_bg_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/header_bg_green.png -------------------------------------------------------------------------------- /images/search_small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/search_small@2x.png -------------------------------------------------------------------------------- /images/separator_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/separator_green.png -------------------------------------------------------------------------------- /redirect.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /style/images/ui/pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/style/images/ui/pattern.png -------------------------------------------------------------------------------- /images/iconaction_new@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/iconaction_new@2x.png -------------------------------------------------------------------------------- /style/images/ui/gradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/style/images/ui/gradient.png -------------------------------------------------------------------------------- /images/header_negative_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/images/header_negative_green.png -------------------------------------------------------------------------------- /shared/style/buttons/images/next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/buttons/images/next.png -------------------------------------------------------------------------------- /shared/style/buttons/images/next@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/buttons/images/next@2x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/up.png -------------------------------------------------------------------------------- /shared/style/buttons/images/next@1.5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/buttons/images/next@1.5x.png -------------------------------------------------------------------------------- /shared/style/buttons/images/next@2.25x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/buttons/images/next@2.25x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/add.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/back.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/down.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/edit.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/menu.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/send.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/send.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/user.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/add@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/add@2x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/back@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/back@2x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/close.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/compose.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/compose.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/down@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/down@2x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/edit@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/edit@2x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/menu@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/menu@2x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/options.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/reply.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/reply.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/send@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/send@2x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/up@1.5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/up@1.5x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/up@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/up@2x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/user@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/user@2x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/add@1.5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/add@1.5x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/add@2.25x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/add@2.25x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/back@1.5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/back@1.5x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/close@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/close@2x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/down@1.5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/down@1.5x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/edit@1.5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/edit@1.5x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/menu@1.5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/menu@1.5x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/reply@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/reply@2x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/reply_all.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/reply_all.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/send@1.5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/send@1.5x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/up@2.25x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/up@2.25x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/user@1.5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/user@1.5x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/back@2.25x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/back@2.25x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/close@1.5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/close@1.5x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/close@2.25x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/close@2.25x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/compose@1.5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/compose@1.5x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/compose@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/compose@2x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/down@2.25x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/down@2.25x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/edit@2.25x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/edit@2.25x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/menu@2.25x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/menu@2.25x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/options@1.5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/options@1.5x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/options@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/options@2x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/organic/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/organic/add.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/organic/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/organic/back.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/organic/edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/organic/edit.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/reply@1.5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/reply@1.5x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/reply@2.25x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/reply@2.25x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/reply_all@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/reply_all@2x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/send@2.25x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/send@2.25x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/user@2.25x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/user@2.25x.png -------------------------------------------------------------------------------- /shared/style/progress_activity/images/ui/light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/progress_activity/images/ui/light.png -------------------------------------------------------------------------------- /shared/style_unstable/drawer/images/icons/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style_unstable/drawer/images/icons/menu.png -------------------------------------------------------------------------------- /shared/style_unstable/drawer/images/ui/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style_unstable/drawer/images/ui/header.png -------------------------------------------------------------------------------- /shared/style_unstable/drawer/images/ui/pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style_unstable/drawer/images/ui/pattern.png -------------------------------------------------------------------------------- /shared/style_unstable/drawer/images/ui/shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style_unstable/drawer/images/ui/shadow.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/compose@2.25x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/compose@2.25x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/options@2.25x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/options@2.25x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/organic/add@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/organic/add@2x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/organic/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/organic/close.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/reply_all@1.5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/reply_all@1.5x.png -------------------------------------------------------------------------------- /shared/style/progress_activity/images/ui/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/progress_activity/images/ui/default.png -------------------------------------------------------------------------------- /shared/style_unstable/drawer/images/ui/negative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style_unstable/drawer/images/ui/negative.png -------------------------------------------------------------------------------- /shared/style_unstable/drawer/images/ui/separator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style_unstable/drawer/images/ui/separator.png -------------------------------------------------------------------------------- /shared/style_unstable/drawer/images/ui/shadow@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style_unstable/drawer/images/ui/shadow@2x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/organic/add@1.5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/organic/add@1.5x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/organic/add@2.25x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/organic/add@2.25x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/organic/back@1.5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/organic/back@1.5x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/organic/back@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/organic/back@2x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/organic/close@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/organic/close@2x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/organic/edit@1.5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/organic/edit@1.5x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/organic/edit@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/organic/edit@2x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/reply_all@2.25x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/reply_all@2.25x.png -------------------------------------------------------------------------------- /shared/style/progress_activity/images/ui/activity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/progress_activity/images/ui/activity.png -------------------------------------------------------------------------------- /shared/style/progress_activity/images/ui/default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/progress_activity/images/ui/default@2x.png -------------------------------------------------------------------------------- /shared/style/progress_activity/images/ui/light@1.5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/progress_activity/images/ui/light@1.5x.png -------------------------------------------------------------------------------- /shared/style/progress_activity/images/ui/light@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/progress_activity/images/ui/light@2x.png -------------------------------------------------------------------------------- /shared/style_unstable/drawer/images/icons/menu@1.5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style_unstable/drawer/images/icons/menu@1.5x.png -------------------------------------------------------------------------------- /shared/style_unstable/drawer/images/icons/menu@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style_unstable/drawer/images/icons/menu@2x.png -------------------------------------------------------------------------------- /shared/style_unstable/drawer/images/ui/shadow@1.5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style_unstable/drawer/images/ui/shadow@1.5x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/organic/back@2.25x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/organic/back@2.25x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/organic/close@1.5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/organic/close@1.5x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/organic/close@2.25x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/organic/close@2.25x.png -------------------------------------------------------------------------------- /shared/style/headers/images/icons/organic/edit@2.25x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/headers/images/icons/organic/edit@2.25x.png -------------------------------------------------------------------------------- /shared/style/progress_activity/images/ui/activity@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/progress_activity/images/ui/activity@2x.png -------------------------------------------------------------------------------- /shared/style/progress_activity/images/ui/default@1.5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/progress_activity/images/ui/default@1.5x.png -------------------------------------------------------------------------------- /shared/style/progress_activity/images/ui/light@2.25x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/progress_activity/images/ui/light@2.25x.png -------------------------------------------------------------------------------- /shared/style_unstable/drawer/images/ui/header/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style_unstable/drawer/images/ui/header/header.png -------------------------------------------------------------------------------- /shared/style_unstable/drawer/images/ui/header/shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style_unstable/drawer/images/ui/header/shadow.png -------------------------------------------------------------------------------- /shared/style_unstable/drawer/images/ui/shadow_header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style_unstable/drawer/images/ui/shadow_header.png -------------------------------------------------------------------------------- /shared/style/progress_activity/images/ui/activity@1.5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/progress_activity/images/ui/activity@1.5x.png -------------------------------------------------------------------------------- /shared/style/progress_activity/images/ui/activity@2.25x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/progress_activity/images/ui/activity@2.25x.png -------------------------------------------------------------------------------- /shared/style/progress_activity/images/ui/default@2.25x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style/progress_activity/images/ui/default@2.25x.png -------------------------------------------------------------------------------- /shared/style_unstable/drawer/images/ui/header/shadow@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style_unstable/drawer/images/ui/header/shadow@2x.png -------------------------------------------------------------------------------- /shared/style_unstable/drawer/images/ui/pattern_subheader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style_unstable/drawer/images/ui/pattern_subheader.png -------------------------------------------------------------------------------- /shared/style_unstable/drawer/images/ui/separator_large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style_unstable/drawer/images/ui/separator_large.png -------------------------------------------------------------------------------- /shared/style_unstable/drawer/images/ui/shadow_header@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style_unstable/drawer/images/ui/shadow_header@2x.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Note: This repository uses git submodules. In order to get a working Notes+ 2 | app, one must run: 3 | 4 | $ git submodule init 5 | $ git submodule update 6 | -------------------------------------------------------------------------------- /shared/style_unstable/drawer/images/ui/header/shadow@1.5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style_unstable/drawer/images/ui/header/shadow@1.5x.png -------------------------------------------------------------------------------- /shared/style_unstable/drawer/images/ui/shadow_header@1.5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mozilla-b2g/notes/HEAD/shared/style_unstable/drawer/images/ui/shadow_header@1.5x.png -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "js/lib/enml-js"] 2 | path = js/lib/enml-js 3 | url = https://github.com/EverythingMe/enml-js.git 4 | [submodule "js/lib/md5"] 5 | path = js/lib/md5 6 | url = https://github.com/blueimp/JavaScript-MD5.git 7 | [submodule "js/lib/sparkmd5"] 8 | path = js/lib/sparkmd5 9 | url = https://github.com/satazor/SparkMD5.git 10 | [submodule "js/lib/evn"] 11 | path = js/lib/evn 12 | url = https://github.com/EverythingMe/evernote-sdk-js.git 13 | -------------------------------------------------------------------------------- /locales/locales.ini: -------------------------------------------------------------------------------- 1 | @import url(notes.en-US.properties) 2 | 3 | [es] 4 | @import url(notes.es.properties) 5 | 6 | [fr] 7 | @import url(notes.fr.properties) 8 | 9 | [pl] 10 | @import url(notes.pl.properties) 11 | 12 | [pt-BR] 13 | @import url(notes.pt-BR.properties) 14 | 15 | [de] 16 | @import url(notes.de.properties) 17 | 18 | [bn-BD] 19 | @import url(notes.bn-BD.properties) 20 | 21 | [nl] 22 | @import url(notes.nl.properties) 23 | 24 | [uk] 25 | @import url(notes.uk.properties) 26 | 27 | [ca] 28 | @import url(notes.ca.properties) 29 | 30 | [fy-NL] 31 | @import url(notes.fy-NL.properties) 32 | -------------------------------------------------------------------------------- /js/redirector.js: -------------------------------------------------------------------------------- 1 | var params = document.location.search.substring(1).split('&'); 2 | 3 | if (params.length == 1 && params[0] == '') { 4 | params = document.location.hash.substring(1).split('&'); 5 | } 6 | 7 | var result = {}; 8 | for (var i = 0; i < params.length; i++) { 9 | var param = params[i].split('='); 10 | if (!param || param.length !=2) { 11 | continue; 12 | } 13 | result[param[0]] = param[1]; 14 | } 15 | 16 | if (window.opener) { 17 | window.opener.postMessage(result, '*'); 18 | console.log('Sending message to openner : ' + JSON.stringify(result)); 19 | } else { 20 | console.log('Nothing to do here .... ' + JSON.stringify(result)); 21 | } -------------------------------------------------------------------------------- /js/Console.js: -------------------------------------------------------------------------------- 1 | var Console = new function() { 2 | var _this = this, 3 | namespace = "", DEBUG = false, 4 | methods = ["log", "info", "warn", "error", "group", "groupEnd"]; 5 | 6 | this.init = function(ns) { 7 | namespace = ns; 8 | DEBUG = true; 9 | }; 10 | 11 | function c(method, args) { 12 | if (!DEBUG) return; 13 | Array.prototype.splice.call(args, 0, 0, namespace + ": "); 14 | console[method].apply(console, args); 15 | } 16 | 17 | for (var i=0; i' + options[i] + ''; 11 | } 12 | optionsHTML += '
  • '; 13 | 14 | var html = '' + 15 | '

    ' + title + '

    ' + 16 | '
      ' + optionsHTML + '
    ' + 17 | '
    '; 18 | 19 | var el = document.createElement("section"); 20 | el.id = "_system_dialog"; 21 | el.setAttribute("role", "dialog"); 22 | el.innerHTML = html; 23 | el.addEventListener("click", onClick); 24 | 25 | removeCurrent(); 26 | document.body.appendChild(el); 27 | 28 | function removeCurrent() { 29 | var el = document.getElementById("_system_dialog"); 30 | if (el) { 31 | el.removeEventListener("click", onClick); 32 | el.parentNode.removeChild(el); 33 | } 34 | } 35 | 36 | function onClick(e) { 37 | var elClicked = e.target; 38 | if (elClicked.nodeName !== "BUTTON") return; 39 | 40 | el.removeEventListener("click", onClick); 41 | el.parentNode.removeChild(el); 42 | 43 | if (elClicked.dataset.index != -1) { 44 | callback(elClicked.dataset.index); 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /manifest.appcache: -------------------------------------------------------------------------------- 1 | CACHE MANIFEST 2 | # ver 2.52 3 | 4 | index.html 5 | images/iconaction_new.png 6 | images/attachment.png 7 | images/search_big.png 8 | images/sortby.png 9 | images/search_small.png 10 | images/empty_list.png 11 | images/empty_trash.png 12 | images/type.png 13 | images/photo.png 14 | images/info.png 15 | images/share.png 16 | images/restore.png 17 | images/expunge.png 18 | images/close.png 19 | images/delete.png 20 | images/header_bg_green.png 21 | images/header_negative_green.png 22 | images/evernote-logo.png 23 | images/settings.png 24 | images/div_line_lg_gray.png 25 | style/dialog.css 26 | style/common.css 27 | style/images/ui/pattern.png 28 | style/images/ui/gradient.png 29 | shared/style/headers.css 30 | shared/style/buttons.css 31 | shared/style/responsive.css 32 | shared/style_unstable/progress_activity.css 33 | js/dialog.js 34 | js/db.js 35 | js/models.js 36 | js/Console.js 37 | js/Searcher.js 38 | js/Cards.js 39 | js/evernote.js 40 | js/common.js 41 | js/lib/evn/evernote-sdk-js/thrift/lib/thrift.js 42 | js/lib/evn/evernote-sdk-js/thrift/lib/thrift-binary.js 43 | js/lib/evn/evernote-sdk-js/generated/Errors_types.js 44 | js/lib/evn/evernote-sdk-js/generated/Limits_types.js 45 | js/lib/evn/evernote-sdk-js/generated/Types_types.js 46 | js/lib/evn/evernote-sdk-js/generated/NoteStore_types.js 47 | js/lib/evn/evernote-sdk-js/generated/UserStore_types.js 48 | js/lib/evn/evernote-sdk-js/generated/NoteStore.js 49 | js/lib/evn/evernote-sdk-js/generated/UserStore.js 50 | js/lib/oauth/oauth.js 51 | js/lib/oauth/sha1.js 52 | js/lib/enml-js/lib/xml-parser.js 53 | js/lib/enml-js/lib/xml-writer.js 54 | js/lib/enml-js/enml.js 55 | js/lib/md5/js/md5.min.js 56 | js/lib/sparkmd5/spark-md5.min.js 57 | shared/js/l10n.js 58 | 59 | NETWORK: 60 | * -------------------------------------------------------------------------------- /shared/style/progress_activity.css: -------------------------------------------------------------------------------- 1 | /* ---------------------------------- 2 | * Progress + activities 3 | * ---------------------------------- */ 4 | 5 | /* Spinner */ 6 | progress:not([value]) { 7 | background: url(progress_activity/images/ui/default.png) no-repeat center center / 100% auto; 8 | animation: 0.9s rotate infinite steps(30); 9 | width: 2.9rem; 10 | height: 2.9rem; 11 | border: none; 12 | display: inline-block; 13 | vertical-align: middle; 14 | } 15 | 16 | progress:not([value]).light { 17 | background-image: url(progress_activity/images/ui/light.png); 18 | } 19 | 20 | progress:not([value])::-moz-progress-bar { 21 | background: none; 22 | } 23 | 24 | /* Progress bar */ 25 | progress[value] { 26 | width: 100%; 27 | background: #333; 28 | border: none; 29 | border-radius: 0.3rem; 30 | height: 0.3rem; 31 | display: block; 32 | } 33 | 34 | progress[value]::-moz-progress-bar { 35 | background: #01c5ed; 36 | border-radius: 0; 37 | } 38 | 39 | /* Progress bar */ 40 | progress[value].pack-activity { 41 | background-image: url(progress_activity/images/ui/activity.png); 42 | background-repeat: repeat; 43 | background-size: 1rem auto; 44 | animation: 0.5s move infinite steps(15); 45 | } 46 | 47 | /* Labels */ 48 | p[role="status"] { 49 | padding: 0.5rem; 50 | font-weight: 300; 51 | font-size: 2.25rem; 52 | line-height: 1.4em; 53 | color: #fff; 54 | } 55 | 56 | p[role="status"] progress:not([value]) { 57 | margin-right: 0.5rem; 58 | } 59 | 60 | p[role="status"] progress:not([value]) + span { 61 | margin-bottom: 0; 62 | } 63 | 64 | p[role="status"] span { 65 | display: inline-block; 66 | vertical-align: middle; 67 | margin-bottom: 0.5rem; 68 | } 69 | 70 | /* Light Activity bar */ 71 | progress[value].pack-activity.light { 72 | background-color: #f4f4f4; 73 | } 74 | 75 | /* Progress steps */ 76 | .bb-steps { 77 | position: relative; 78 | height: 0.3rem; 79 | } 80 | 81 | .bb-steps:before { 82 | position: absolute; 83 | content: ""; 84 | height: 0; 85 | left: 0; 86 | top: 0.1rem; 87 | right: 0; 88 | border-top: 0.1rem solid #b7b7b7; 89 | border-bottom: 0.1rem solid #fff; 90 | } 91 | 92 | .bb-steps progress[value] { 93 | position: absolute; 94 | height: 0.3rem; 95 | left: 0; 96 | top: 0; 97 | background: #858585; 98 | transition: transform 0.35s cubic-bezier(0, 1, 0.5, 1.1); 99 | } 100 | 101 | .bb-steps progress[value]::-moz-progress-bar { 102 | background: none; 103 | } 104 | 105 | /* Animations */ 106 | @keyframes rotate { 107 | from { transform: rotate(1deg); } 108 | to { transform: rotate(360deg); } 109 | } 110 | 111 | @keyframes move { 112 | from { background-position: 0 0; } 113 | to { background-position: 1rem 0; } 114 | } 115 | -------------------------------------------------------------------------------- /js/Searcher.js: -------------------------------------------------------------------------------- 1 | var Searcher = new function() { 2 | var _this = this, 3 | elInput = null, 4 | searchNotes = [], searchFields = [], lastValueSearched = "", 5 | onSearch = null, onInputBlur = null, onInputFocus = null; 6 | 7 | this.init = function(options) { 8 | elInput = options.input; 9 | onSearch = options.onSearch; 10 | onInputFocus = options.onInputFocus; 11 | onInputBlur = options.onInputBlur; 12 | 13 | _this.setData(options.data, options.fields); 14 | 15 | elInput.addEventListener("focus", onFocus); 16 | elInput.addEventListener("keyup", onKeyUp); 17 | elInput.addEventListener("blur", onBlur); 18 | }; 19 | 20 | this.setData = function(_notes, _fields) { 21 | _notes && (searchNotes = _notes); 22 | _fields && (searchFields = _fields); 23 | 24 | if (!(searchFields instanceof Array)) { 25 | searchFields = [searchFields]; 26 | } 27 | if (!(searchNotes instanceof Array)) { 28 | searchNotes = [searchNotes]; 29 | } 30 | }; 31 | 32 | this.search = function(keyword) { 33 | var results = [], 34 | regexMatch = new RegExp("(" + keyword + ")", "ig"); 35 | 36 | if (!keyword) { 37 | return results; 38 | } 39 | 40 | var htmlTagRegex = /(<([^>]+)>)/ig; 41 | for (var id in searchNotes) { 42 | var item = searchNotes[id], 43 | match = 0; 44 | 45 | for (var j=0,jl=searchFields.length; j b._matches? -1 : a._matches < b._matches? 1 : 0; 62 | }); 63 | 64 | return results; 65 | }; 66 | 67 | this.value = function() { 68 | return lastValueSearched; 69 | }; 70 | 71 | this.focus = function() { 72 | elInput.focus(); 73 | }; 74 | 75 | function onFocus(e) { 76 | onInputFocus && onInputFocus(e); 77 | } 78 | 79 | function onBlur(e) { 80 | onInputBlur && onInputBlur(e); 81 | } 82 | 83 | function onKeyUp(e) { 84 | if (e.keyCode == 13) { 85 | e.preventDefault(); 86 | e.stopPropagation(); 87 | } 88 | 89 | if (lastValueSearched == this.value) { 90 | return; 91 | } 92 | 93 | lastValueSearched = this.value; 94 | 95 | var items = _this.search(lastValueSearched); 96 | onSearch && onSearch(items, lastValueSearched, searchFields); 97 | } 98 | }; 99 | -------------------------------------------------------------------------------- /locales/notes.en-US.properties: -------------------------------------------------------------------------------- 1 | # General note/notebook operations 2 | notebooks=Notebooks 3 | tap-anywhere-to-start=Tap anywhere to start 4 | note-info=Note Info 5 | add-to-contacts=Add to Contacts 6 | new-notebook=Create Notebook 7 | notebook-all=All Notes 8 | notebook-trash=Trash 9 | notebook-action-title=Edit Notebook 10 | notebook-action-rename=Rename 11 | notebook-action-delete=Delete 12 | prompt-rename-notebook=Rename Notebook: 13 | prompt-delete-notebook=Tap OK to delete this notebook.\n\nNOTE: All its notes will be moved to the Trash. 14 | note-restored=Restored to {{notebook}} 15 | new-note=New Note 16 | empty-trash=Your trash is empty! 17 | first-notebook-name=My Notebook 18 | empty-notebook-name=Notes 19 | note-cancel-changes=You have made changes to the note, do you wish to save it? 20 | confirm-trash-note=Tap OK to move this note to the Trash 21 | confirm-delete-note=Are you sure you want to permanently delete this note? 22 | add-image-title=Attach a photo to your note: 23 | image-not-supported=This feature is not supported on your device 24 | image-label=Photo 25 | date-updated=Date updated 26 | date-created=Date created 27 | title=Title 28 | notebook=Notebook 29 | created-on=Created on 30 | modified-on=Modified on 31 | done=Done 32 | search-results=Search results 33 | empty-notebook=No notes recorded
    Start writing now 34 | 35 | # Evernote integration 36 | connect-with=Connect with 37 | connected-to-evernote=Connected to Evernote 38 | settings=Settings 39 | signed-in-as=Signed in as 40 | account-type=Account type 41 | go-premium=Go Premium 42 | sign-out=Sign Out 43 | evernote-email-address=Evernote Email Address 44 | current-monthly-usage=Current Monthly Usage 45 | upload-left=Upload left 46 | days-left=Days left 47 | 48 | # relative elapsed times for indicating age of note 49 | minutes-ago = {[ plural(t) ]} 50 | minutes-ago[zero]=Just now 51 | minutes-ago[one]=1 minute ago 52 | minutes-ago[two]={{t}} minutes ago 53 | minutes-ago[few]={{t}} minutes ago 54 | minutes-ago[many]={{t}} minutes ago 55 | minutes-ago[other]={{t}} minutes ago 56 | 57 | hours-ago = {[ plural(t) ]} 58 | hours-ago[zero]={{t}} hours ago 59 | hours-ago[one]=1 hour ago 60 | hours-ago[two]={{t}} hours ago 61 | hours-ago[few]={{t}} hours ago 62 | hours-ago[many]={{t}} hours ago 63 | hours-ago[other]={{t}} hours ago 64 | 65 | days-ago = {[ plural(t) ]} 66 | days-ago[zero]={{t}} days ago 67 | days-ago[one]=Yesterday 68 | days-ago[two]={{t}} days ago 69 | days-ago[few]={{t}} days ago 70 | days-ago[many]={{t}} days ago 71 | days-ago[other]={{t}} days ago 72 | 73 | # Error messages 74 | notebook-name-already-exists=There is already a Notebook by that name. Please choose another. 75 | not-reached-evernote=Could not reach Evernote server. Make sure you are connected to the internet. 76 | notebook-delete-conflict=Local notebook has been deleted. Would you like to restore it from the server?, 77 | generic-conflict=The {{object}} {{name}} has a different version on Evernote from {{date}}. Would you like to keep your local changes? 78 | note-unsaveable=This note cannot be edited because part of the note could not be downloaded. 79 | sync-failed=The last Evernote download did not complete. Would you like to try again? 80 | warning=(Some large images or attachments cannot be downloaded. Note is read only.) 81 | -------------------------------------------------------------------------------- /locales/notes.uk.properties: -------------------------------------------------------------------------------- 1 | # General note/notebook operations 2 | notebooks=Записники 3 | tap-anywhere-to-start=Торкніться десь щоб почати 4 | note-info=Інформація нотатки 5 | add-to-contacts=Додати до контактів 6 | new-notebook=Створити записник 7 | notebook-all=Всі нотатки 8 | notebook-trash=Смітник 9 | notebook-action-title=Змінити записник 10 | notebook-action-rename=Перейменувати 11 | notebook-action-delete=Видалити 12 | prompt-rename-notebook=Перейменувати записник: 13 | prompt-delete-notebook=Торкніться OK для видалення цього записника.\n\nПРИМІТКА: Всі його нотатки будуть переміщені в смітник. 14 | note-restored=Відновлено до {{notebook}} 15 | new-note=Нова нотатка 16 | empty-trash=Смітник порожній! 17 | first-notebook-name=Мій записник 18 | empty-notebook-name=Нотатки 19 | note-cancel-changes=Ви внесли зміни в нотатку, бажаєте її зберегти? 20 | confirm-trash-note=Торкніться OK щоб перемістити цю нотатку в смітник 21 | confirm-delete-note=Ви дійсно хочете остаточно видалити цю нотатку? 22 | add-image-title=Прикріпіть фото до своєї нотатки: 23 | image-not-supported=Ця функція не підтримується на вашому пристрої 24 | image-label=Фото 25 | date-updated=Дата оновлення 26 | date-created=Дата створення 27 | title=Назва 28 | notebook=Записник 29 | created-on=Створено 30 | modified-on=Змінено 31 | done=Готово 32 | search-results=Результати пошуку 33 | empty-notebook=Немає записаних нотаток
    Почніть зараз 34 | 35 | # Evernote integration 36 | connect-with=З’єднатися з 37 | connected-to-evernote=З’єднано з Evernote 38 | settings=Налаштування 39 | signed-in-as=Вхід виконано 40 | account-type=Тип облікового запису 41 | go-premium=Перейти на Premium 42 | sign-out=Вихід 43 | evernote-email-address=Адреса е-пошти Evernote 44 | current-monthly-usage=Поточне місячне використання 45 | upload-left=Вивантажень залишилось 46 | days-left=Днів залишилось 47 | 48 | # relative elapsed times for indicating age of note 49 | minutes-ago = {[ plural(t) ]} 50 | minutes-ago[zero]=Щойно 51 | minutes-ago[one]=1 хвилину тому 52 | minutes-ago[two]={{t}} хвилини тому 53 | minutes-ago[few]={{t}} хвилини тому 54 | minutes-ago[many]={{t}} хвилин тому 55 | minutes-ago[other]={{t}} хвилин тому 56 | 57 | hours-ago = {[ plural(t) ]} 58 | hours-ago[zero]={{t}} годин тому 59 | hours-ago[one]=1 годину тому 60 | hours-ago[two]={{t}} години тому 61 | hours-ago[few]={{t}} години тому 62 | hours-ago[many]={{t}} годин тому 63 | hours-ago[other]={{t}} годин тому 64 | 65 | days-ago = {[ plural(t) ]} 66 | days-ago[zero]={{t}} днів тому 67 | days-ago[one]=Вчора 68 | days-ago[two]={{t}} дні тому 69 | days-ago[few]={{t}} дні тому 70 | days-ago[many]={{t}} днів тому 71 | days-ago[other]={{t}} днів тому 72 | 73 | # Error messages 74 | notebook-name-already-exists=Вже є записник з такою назвою. Виберіть будь ласка іншу. 75 | not-reached-evernote=Не вдалося з’єднатися з сервером Evernote. Переконайтеся, що ви з’єднані з Інтернетом. 76 | notebook-delete-conflict=Локальний записник було видалено. Бажаєте відновити його з сервера? 77 | generic-conflict={{object}} {{name}} має іншу версію на Evernote від {{date}}. Бажаєте зберегти ваші локальні зміни? 78 | note-unsaveable=Цю нотатку неможливо редагувати, тому що її частину не вдалося завантажити. 79 | sync-failed=Останнє завантаження Evernote не завершено. Бажаєте спробувати знову? 80 | warning=(Деякі великі зображення чи вкладення не можуть бути завантажені. Нотатка лише для читання.) 81 | -------------------------------------------------------------------------------- /locales/notes.pl.properties: -------------------------------------------------------------------------------- 1 | # General note/notebook operations 2 | notebooks=Notatniki 3 | tap-anywhere-to-start=dotknij ekranu żeby zacząć 4 | note-info=Informacje 5 | add-to-contacts=Dodaj do kontaktów 6 | new-notebook=Nowy notatnik 7 | notebook-all=Wszystkie notatki 8 | notebook-trash=Kosz 9 | notebook-action-title=Edycja notatnika 10 | notebook-action-rename=Zmiana nazwy 11 | notebook-action-delete=Skasuj 12 | prompt-rename-notebook=Zmień nazwę notatnika: 13 | prompt-delete-notebook=Wybierz OK żeby usunąć ten notatnik. \n\nUWAGA: Wszystkie notatki z tego notatnika znajdą się w Koszu. 14 | note-restored=przywróć do {{notebook}} 15 | new-note=Nowa notatka 16 | empty-trash=kosz jest pusty! 17 | first-notebook-name=Mój notatnik 18 | empty-notebook-name=Notatki 19 | note-cancel-changes=Wprowadziłeś zmiany do notatki, chcesz je zapisać? 20 | confirm-trash-note=Wybierz OK żeby przenieść tę notatkę do Kosza 21 | confirm-delete-note=Czy na pewno chcesz na stałe usunąć tę notatkę? 22 | add-image-title=Dodaj zdjęcie do notatki: 23 | image-not-supported=Funkcja nie jest dostępna na twoim telefonie 24 | image-label=Zdjęcie 25 | date-updated=Data aktualizacji 26 | date-created=Data utworzenia 27 | title=Tytuł 28 | notebook=Notatnik 29 | created-on=Utworzony 30 | modified-on=Zmodyfikowany 31 | done=Wykonano 32 | search-results=Wyniki wyszukiwania 33 | empty-notebook=notatka jest pusta
    możesz zacząć notować 34 | 35 | # Evernote integration 36 | connect-with=Połącz z 37 | connected-to-evernote=Połączone z Evernote 38 | settings=Ustawienia 39 | signed-in-as=Zaloguj się jako 40 | account-type=Typ konta 41 | go-premium=Konto premium 42 | sign-out=Wyloguj się 43 | evernote-email-address=Adres e-mail z Evernote 44 | current-monthly-usage=Transfer danych w tym miesiącu 45 | upload-left=Transfer danych do wykorzystania 46 | days-left=Pozostało dni 47 | 48 | # relative elapsed times for indicating age of note 49 | minutes-ago = {[ plural(t) ]} 50 | minutes-ago[zero]=Teraz 51 | minutes-ago[one]=1 minutę temu 52 | minutes-ago[two]={{t}} minut(y) temu 53 | minutes-ago[few]={{t}} minut(y) temu 54 | minutes-ago[many]={{t}} minut(y) temu 55 | minutes-ago[other]={{t}} minut(y) temu 56 | 57 | hours-ago = {[ plural(t) ]} 58 | hours-ago[zero]={{t}} godz. temu 59 | hours-ago[one]=1 godzinę temu 60 | hours-ago[two]={{t}} godz. temu 61 | hours-ago[few]={{t}} godz. temu 62 | hours-ago[many]={{t}} godz. temu 63 | hours-ago[other]={{t}} godz. temu 64 | 65 | days-ago = {[ plural(t) ]} 66 | days-ago[zero]={{t}} dni temu 67 | days-ago[one]=Wczoraj 68 | days-ago[two]={{t}} dni temu 69 | days-ago[few]={{t}} dni temu 70 | days-ago[many]={{t}} dni temu 71 | days-ago[other]={{t}} dni temu 72 | 73 | # Error messages 74 | notebook-name-already-exists=Notatnik o tej nazwie już istnieje. Proszę wybierz inną nazwę. 75 | not-reached-evernote=Nie udało się połączyć z Evernote. Sprawdź czy masz dostęp do internetu. 76 | notebook-delete-conflict=Notatka została usunięta z telefonu. Czy chcesz przywrócić ją z serwera? 77 | generic-conflict={{object}} {{name}} ma wersję z {{date}} w serwisie Evernote. Czy zachować zmiany dokonane na telefonie? 78 | note-unsaveable=Ta notatka nie może być edytowana ponieważ jej fragment nie mógł zostać pobrany. 79 | sync-failed=Ostatnie pobieranie z Evernote nie powiodło się. Czy chcesz spróbować ponownie? 80 | warning=(Niektóre duże obrazki lub załączniki nie mogą zostać pobrane. Notatka jest w trybie tylko do odczytu.) 81 | -------------------------------------------------------------------------------- /locales/notes.bn-BD.properties: -------------------------------------------------------------------------------- 1 | # General note/notebook operations 2 | notebooks=নোটবুক 3 | tap-anywhere-to-start=আরম্ভ করতে স্পর্শ করুন 4 | note-info=নোটের তথ্য 5 | add-to-contacts=ঠিকানা যুক্ত করুন 6 | new-notebook=নোটবুক তৈরী করুন 7 | notebook-all=সব নোটসমূহ 8 | notebook-trash=আবর্জনা 9 | notebook-action-title=নোটবুক সম্পাদনা করুন 10 | notebook-action-rename=নতুন নাম 11 | notebook-action-delete=মুছে ফেলুন 12 | prompt-rename-notebook=নোটবুক নতুন নাম: 13 | prompt-delete-notebook=ওকে তে চাপ দিন এই নোটবুক মুছে ফেলতে। \n\nNOTE: এর সকল নোট আবর্জনায় চলে যাবে। 14 | note-restored={{notebook}} এ পুনরুদ্ধার করা হয়েছে 15 | new-note=নতুন নোট 16 | empty-trash=আপনার আবর্জনা পরিষ্কার করা হয়েছে! 17 | first-notebook-name=আমার নোট বুক 18 | empty-notebook-name=নোটসমূহ 19 | note-cancel-changes=নোটে আপনি পরিবর্তন করেছেন, আপনি কি এটি সংরক্ষণ করতে চান? 20 | confirm-trash-note=এই নোট আবর্জনায় ফেলতে ওকে চাপ দিন 21 | confirm-delete-note=আপনি কি নিশ্চিতরূপেই এই নোট টি স্থায়ীভাবে মুছে ফেলতে চান? 22 | add-image-title=নোটে একটি ছবি সংযুক্ত করুন: 23 | image-not-supported=আপনার ডিভাইসে এই সুবিধা সমর্থণ করে না 24 | image-label=ছবি 25 | date-updated=তারিখ হালনাগাদ করা হয়েছে 26 | date-created=তারিখ তৈরী করা হয়েছে 27 | title=শিরোনাম 28 | notebook=নোটবুক 29 | created-on=তৈরী করা হয়েছে 30 | modified-on=পরিবর্তন করা হয়েছে 31 | done=সম্পন্ন 32 | search-results=অনুসন্ধানের ফলাফল 33 | empty-notebook=কোন নোট রেকর্ড করা হয়নি
    এখনই লেখা আরম্ভ করুন 34 | # do not translate
    tag ^^^ 35 | 36 | # Evernote integration 37 | connect-with=এর সঙ্গে সংযোগ 38 | connected-to-evernote=এভারনোটের সাথে সংযুক্ত 39 | settings=সেটিংস 40 | signed-in-as=সাইনইন এভাবে 41 | account-type=একাউন্টের ধরণ 42 | go-premium=প্রিমিয়াম-হউন 43 | sign-out=সাইন আউট 44 | evernote-email-address=এভারনোট ইমেইল ঠিকানা 45 | current-monthly-usage=বর্তমান মাসিক ব্যবহার 46 | upload-left=বামে আপলোড 47 | days-left=দিন বাকি রয়েছে 48 | 49 | # relative elapsed times for indicating age of note 50 | minutes-ago = {[ plural(t) ]} 51 | minutes-ago[zero]=এই মাত্র 52 | minutes-ago[one]=১ মিনিট পূর্বে 53 | minutes-ago[two]={{t}} মিনিট পূর্বে 54 | minutes-ago[few]={{t}} মিনিট পূর্বে 55 | minutes-ago[many]={{t}} মিনিট পূর্বে 56 | minutes-ago[other]={{t}} মিনিট পূর্বে 57 | 58 | hours-ago = {[ plural(t) ]} 59 | hours-ago[zero]={{t}} ঘন্টা পূর্বে 60 | hours-ago[one]=১ ঘন্টা পূর্বে 61 | hours-ago[two]={{t}} ঘন্টা পূর্বে 62 | hours-ago[few]={{t}} ঘন্টা পূর্বে 63 | hours-ago[many]={{t}} ঘন্টা পূর্বে 64 | hours-ago[other]={{t}} ঘন্টা পূর্বে 65 | 66 | days-ago = {[ plural(t) ]} 67 | days-ago[zero]={{t}} দিন পূর্বে 68 | days-ago[one]=গতকাল 69 | days-ago[two]={{t}} দিন পূর্বে 70 | days-ago[few]={{t}} দিন পূর্বে 71 | days-ago[many]={{t}} দিন পূর্বে 72 | days-ago[other]={{t}} দিন পূর্বে 73 | 74 | # Error messages 75 | notebook-name-already-exists=এই নামে একটি নোটবুক রয়েছে। অনুগ্রহ করে ভিন্ন নাম পছন্দ করুন। 76 | not-reached-evernote=এভারনোট সার্ভারে পৌঁছানো যায়নি। নিশ্চিত করুন আপনি ইন্টারনেটে সংযুক্ত আছেন। 77 | notebook-delete-conflict=স্থানীয় নোটবুক মুছে ফেলা হয়েছে। আপনি সার্ভার থেকে এটি পুনরুদ্ধার করতে চান?, 78 | generic-conflict={{object}} {{name}} এর এভারনোটে {{date}} তারিখের একটি ভিন্ন সংস্করণ রয়েছে. আপনার স্থানীয় পরিবর্তন রাখতে চাচ্ছেন? 79 | note-unsaveable=এই নোট সম্পাদনা করা সম্ভব নয় কারণ নোটটির কিছু অংশ ডাউনলোড করা যায়নি। 80 | sync-failed=সর্বশেষ এভারনোট ডাউনলোড সম্পন্ন হয়নি। আপনি কি আরেকবার চেষ্টা করতে চান? 81 | warning=(কিছু বড় চিত্র অথবা সংযুক্তি ডাউনলোড করা যাচ্ছে না। এই নোট শুধু পঠন যোগ্য।) 82 | -------------------------------------------------------------------------------- /shared/js/lazy_loader.js: -------------------------------------------------------------------------------- 1 | /* exported LazyLoader */ 2 | /* globals HtmlImports*/ 3 | 'use strict'; 4 | 5 | /** 6 | * This contains a simple LazyLoader implementation 7 | * To use: 8 | * 9 | * LazyLoader.load( 10 | * ['/path/to/file.js', '/path/to/file.css', 'domNode'], callback 11 | * ); 12 | */ 13 | var LazyLoader = (function() { 14 | 15 | function LazyLoader() { 16 | this._loaded = {}; 17 | this._isLoading = {}; 18 | } 19 | 20 | LazyLoader.prototype = { 21 | 22 | _js: function(file, callback) { 23 | var script = document.createElement('script'); 24 | script.src = file; 25 | // until bug 916255 lands async is the default so 26 | // we must disable it so scripts load in the order they where 27 | // required. 28 | script.async = false; 29 | script.addEventListener('load', callback); 30 | document.head.appendChild(script); 31 | this._isLoading[file] = script; 32 | }, 33 | 34 | _css: function(file, callback) { 35 | var style = document.createElement('link'); 36 | style.type = 'text/css'; 37 | style.rel = 'stylesheet'; 38 | style.href = file; 39 | document.head.appendChild(style); 40 | callback(); 41 | }, 42 | 43 | _html: function(domNode, callback) { 44 | 45 | // The next few lines are for loading html imports in DEBUG mode 46 | if (domNode.getAttribute('is')) { 47 | this.load(['/shared/js/html_imports.js'], function() { 48 | HtmlImports.populate(callback); 49 | }.bind(this)); 50 | return; 51 | } 52 | 53 | for (var i = 0; i < domNode.childNodes.length; i++) { 54 | if (domNode.childNodes[i].nodeType == document.COMMENT_NODE) { 55 | domNode.innerHTML = domNode.childNodes[i].nodeValue; 56 | break; 57 | } 58 | } 59 | 60 | window.dispatchEvent(new CustomEvent('lazyload', { 61 | detail: domNode 62 | })); 63 | 64 | callback(); 65 | }, 66 | 67 | load: function(files, callback) { 68 | if (!Array.isArray(files)) { 69 | files = [files]; 70 | } 71 | 72 | var loadsRemaining = files.length, self = this; 73 | function perFileCallback(file) { 74 | if (self._isLoading[file]) { 75 | delete self._isLoading[file]; 76 | } 77 | self._loaded[file] = true; 78 | 79 | if (--loadsRemaining === 0) { 80 | if (callback) { 81 | callback(); 82 | } 83 | } 84 | } 85 | 86 | for (var i = 0; i < files.length; i++) { 87 | var file = files[i]; 88 | 89 | if (this._loaded[file.id || file]) { 90 | perFileCallback(file); 91 | } else if (this._isLoading[file]) { 92 | this._isLoading[file].addEventListener( 93 | 'load', perFileCallback.bind(null, file)); 94 | } else { 95 | var method, idx; 96 | if (typeof file === 'string') { 97 | method = file.match(/\.([^.]+)$/)[1]; 98 | idx = file; 99 | } else { 100 | method = 'html'; 101 | idx = file.id; 102 | } 103 | 104 | this['_' + method](file, perFileCallback.bind(null, idx)); 105 | } 106 | } 107 | } 108 | }; 109 | 110 | return new LazyLoader(); 111 | }()); 112 | -------------------------------------------------------------------------------- /locales/notes.pt-BR.properties: -------------------------------------------------------------------------------- 1 | # General note/notebook operations 2 | notebooks=Blocos de notas 3 | tap-anywhere-to-start=Clique em qualquer lugar para começar 4 | note-info=Informação da Nota 5 | add-to-contacts=Adicionar a contatos 6 | new-notebook=Criar bloco de notas 7 | notebook-all=Todas as notas 8 | notebook-trash=Lixo 9 | notebook-action-title=Editar Bloco de notas 10 | notebook-action-rename=Renomear 11 | notebook-action-delete=Excluir 12 | prompt-rename-notebook=Renomear bloco de notas 13 | prompt-delete-notebook=Clique em OK para excluir o Bloco de Notas.\n\nATENÇÃO: Todas as notas serão movidas para o Lixo 14 | note-restored=Recuperado em {{notebook}} 15 | new-note=Nova nota 16 | empty-trash=Seu lixo está vazio! 17 | first-notebook-name=Criar bloco de notas 18 | empty-notebook-name=Notas 19 | note-cancel-changes=As alterações foram feitas na nota. Você quer salvar? 20 | confirm-trash-note=Pressione OK para mover esta nota para o Lixo 21 | confirm-delete-note=Tem certeza de que deseja excluir permanentemente esta nota? 22 | add-image-title=Anexar uma foto à sua nota: 23 | image-not-supported=Esse recurso não é suportado em seu dispositivo 24 | image-label=Foto 25 | date-updated=Data de atualização 26 | date-created=Data de criação 27 | title=Título 28 | notebook=Bloco de notas 29 | created-on=Criado em 30 | modified-on=Modificado em 31 | done=Pronto 32 | search-results=Search results 33 | empty-notebook=Não há notas guardadas
    começar a escrever agora 34 | 35 | # Evernote integration 36 | connect-with=Conectar com 37 | connected-to-evernote=Conectado ao Evernote 38 | settings=Configurações 39 | signed-in-as=Registrado como 40 | account-type=Tipo de Conta 41 | go-premium=Ir a Premium 42 | sign-out=Sair 43 | evernote-email-address=Endereço de E-mail evernote 44 | current-monthly-usage=Uso mensal atual 45 | upload-left=Envio restante 46 | days-left=Dias restantes 47 | 48 | # relative elapsed times for indicating age of note 49 | minutes-ago = {[ plural(t) ]} 50 | minutes-ago[zero]=Agora 51 | minutes-ago[one]=Há 1 minuto 52 | minutes-ago[two]=Há {{t}} minutos 53 | minutes-ago[few]=Há {{t}} minutos 54 | minutes-ago[many]=Há {{t}} minutos 55 | minutes-ago[other]=Há {{t}} minutos 56 | 57 | hours-ago = {[ plural(t) ]} 58 | hours-ago[zero]=Há {{t}} horas 59 | hours-ago[one]=Há 1 hora 60 | hours-ago[two]=Há {{t}} horas 61 | hours-ago[few]=Há {{t}} horas 62 | hours-ago[many]=Há {{t}} horas 63 | hours-ago[other]=Há {{t}} horas 64 | 65 | days-ago = {[ plural(t) ]} 66 | days-ago[zero]={{t}} dias atrás 67 | days-ago[one]=Ontem 68 | days-ago[two]={{t}} dias atrás 69 | days-ago[few]={{t}} dias atrás 70 | days-ago[many]={{t}} dias atrás 71 | days-ago[other]={{t}} dias atrás 72 | 73 | # Error messages 74 | notebook-name-already-exists=Já existe um bloco de notas com o mesmo nome. Por favor, escolha outro. 75 | not-reached-evernote=Não foi possível conectar ao servidor do Evernote. Verifique se você está conectado à Internet. 76 | notebook-delete-conflict=O Bloco de Notas local foi apagado. Você deseja recuperar do servidor? 77 | generic-conflict=Há uma versão diferente do {{object}} {{name}} em Evernote datado {{date}}. Quer preservar as alterações locais? 78 | note-unsaveable=Essa nota não pode ser editada pois parte dela não pode ser recebida. 79 | sync-failed=A última transferência do Evernote não foi concluída. Gostaria de tentar novamente? 80 | warning=(Algumas imagens ou anexos grandes não podem ser baixados. Nota não pode ser editada.) 81 | -------------------------------------------------------------------------------- /locales/notes.ca.properties: -------------------------------------------------------------------------------- 1 | # General note/notebook operations 2 | notebooks=Blocs de Notes 3 | tap-anywhere-to-start=Premeu a qualsevol lloc per iniciar 4 | note-info=Informacio de la nota 5 | add-to-contacts=Afegir a Contactes 6 | new-notebook=Crear Bloc de Notes 7 | notebook-all=Totes les notes 8 | notebook-trash=Paperera 9 | notebook-action-title=Editar Bloc de notes 10 | notebook-action-rename=Canviar el nom 11 | notebook-action-delete=Eliminar 12 | prompt-rename-notebook=Canviar el nom del Bloc de notes: 13 | prompt-delete-notebook=Premeu OK per eliminar aquest Bloc de notes. \n\nObservació: totes les vostres notes seran enviades a la paperera. 14 | note-restored=Recuperat a {{notebook}} 15 | new-note=Nova nota 16 | empty-trash=La paperera és buida! 17 | first-notebook-name=El meu Bloc de notes 18 | empty-notebook-name=Notes 19 | note-cancel-changes=S'han realitzat canvis a la nota, voleu desar els canvis? 20 | confirm-trash-note=Premeu OK per moure aquesta nota a la Paperera 21 | confirm-delete-note=Esteu segurs de que voleu eliminar definitivament aquesta nota? 22 | add-image-title=Annexar una foto a la nota: 23 | image-not-supported=Aquesta característica no està suportada en aquest terminal 24 | image-label=Foto 25 | date-updated=Data d'actualització 26 | date-created=Data de creació 27 | title=Títol 28 | notebook=Bloc de notes 29 | created-on=Creat 30 | modified-on=Modificat 31 | done=Fet 32 | search-results=Resultats de la cerca 33 | empty-notebook=No hi ha notes guardades
    Començar a escriure ara 34 | 35 | # Evernote integration 36 | connect-with=Connectar amb 37 | connected-to-evernote=Connectant amb Evernote 38 | settings=Paràmetres 39 | signed-in-as=Registrat com 40 | account-type=Tipus de compte 41 | go-premium=Anar a Premium 42 | sign-out=Sortir 43 | evernote-email-address=Adreça de correu a Evernote 44 | current-monthly-usage=Ús mensual actual 45 | upload-left=Resta per pujar 46 | days-left=Dies que resten 47 | 48 | # relative elapsed times for indicating age of note 49 | minutes-ago = {[ plural(t) ]} 50 | minutes-ago[zero]=Ara mateix 51 | minutes-ago[one]=Fa 1 minut 52 | minutes-ago[two]=Fa {{t}} minuts 53 | minutes-ago[few]=Fa {{t}} minuts 54 | minutes-ago[many]=Fa {{t}} minuts 55 | minutes-ago[other]=Fa {{t}} minuts 56 | 57 | hours-ago = {[ plural(t) ]} 58 | hours-ago[zero]=Fa {{t}} hores 59 | hours-ago[one]=Fa una hora 60 | hours-ago[two]=Fa {{t}} hores 61 | hours-ago[few]=Fa {{t}} hores 62 | hours-ago[many]=Fa {{t}} hores 63 | hours-ago[other]=Fa {{t}} hores 64 | 65 | days-ago = {[ plural(t) ]} 66 | days-ago[zero]=Fa {{t}} dies 67 | days-ago[one]=Ahir 68 | days-ago[two]=Fa {{t}} dies 69 | days-ago[few]=Fa {{t}} dies 70 | days-ago[many]=Fa {{t}} dies 71 | days-ago[other]=Fa {{t}} dies 72 | 73 | # Error messages 74 | notebook-name-already-exists=Ja existeix un Bloc de notes amb aquest nom. Escolliu un altre. 75 | not-reached-evernote=No ha estat possible connectar amb el servidor d'Evernote. Comproveu la connexió a internet del vostre dispositiu. 76 | notebook-delete-conflict=S'ha eliminat el Bloc de notes local. Voleu recuperar-lo del servidor? 77 | generic-conflict=A Evernote hi ha una versió diferent de la {{object}} {{name}} amb data {{date}}. Voleu conservar els canvis locals? 78 | note-unsaveable=No es pot editar aquesta nota perquè no s'ha baixat completament. 79 | sync-failed=No s'ha completat la darrera baixada Evernote. Voleu provar un altre cop? 80 | warning=(Algunes imatges o adjunts pesats no poden ser baixats. La nota és només de lectura.) 81 | -------------------------------------------------------------------------------- /locales/notes.es.properties: -------------------------------------------------------------------------------- 1 | # General note/notebook operations 2 | notebooks=Blocs de Notas 3 | tap-anywhere-to-start=Pulse en cualquier lugar para iniciar 4 | note-info=Información de la Nota 5 | add-to-contacts=Añadir a Contactos 6 | new-notebook=Crear Bloc de Notas 7 | notebook-all=Todas las notas 8 | notebook-trash=Papelera 9 | notebook-action-title=Editar Bloc de Notas 10 | notebook-action-rename=Renombrar 11 | notebook-action-delete=Borrar 12 | prompt-rename-notebook=Renombrar Bloc de Notas: 13 | prompt-delete-notebook=Pulse OK para eliminar este Block de Notas. \n\nOBSERVACIÓN: Todas sus notas serán movidas a la Papelera 14 | note-restored=Recuperado en {{notebook}} 15 | new-note=Nueva nota 16 | empty-trash=¡Tu papelera está vacía! 17 | first-notebook-name=Mi Bloc de Notas 18 | empty-notebook-name=Notas 19 | note-cancel-changes=Se han realizado cambios en la nota. ¿Desea guardarlos? 20 | confirm-trash-note=Pulse OK para mover esta nota a la Papelera 21 | confirm-delete-note=¿Esta seguro de querer eliminar definitivamente esta nota? 22 | add-image-title=Anexar una foto a tu nota: 23 | image-not-supported=Esta característica no esta soportada en este terminal 24 | image-label=Foto 25 | date-updated=Fecha de actualización 26 | date-created=Fecha de creación 27 | title=Título 28 | notebook=Bloc de notas 29 | created-on=Creado en 30 | modified-on=Modificado en 31 | done=Listo 32 | search-results=Search results 33 | empty-notebook=No hay notas guardadas
    Empezar a escribir ahora 34 | 35 | # Evernote integration 36 | connect-with=Conectar con 37 | connected-to-evernote=Conectado a Evernote 38 | settings=Ajustes 39 | signed-in-as=Registrado como 40 | account-type=Tipo de Cuenta 41 | go-premium=Ir a Premium 42 | sign-out=Salir 43 | evernote-email-address=Dirección de correo Evernote 44 | current-monthly-usage=Uso mensual actual 45 | upload-left=Subir a la izquierda 46 | days-left=Días restantes 47 | 48 | # relative elapsed times for indicating age of note 49 | minutes-ago = {[ plural(t) ]} 50 | minutes-ago[zero]=En este momento 51 | minutes-ago[one]=Hace 1 minuto 52 | minutes-ago[two]=Hace {{t}} minutos 53 | minutes-ago[few]=Hace {{t}} minutos 54 | minutes-ago[many]=Hace {{t}} minutos 55 | minutes-ago[other]=Hace {{t}} minutos 56 | 57 | hours-ago = {[ plural(t) ]} 58 | hours-ago[zero]=Hace {{t}} horas 59 | hours-ago[one]=Hace una hora 60 | hours-ago[two]=Hace {{t}} horas 61 | hours-ago[few]=Hace {{t}} horas 62 | hours-ago[many]=Hace {{t}} horas 63 | hours-ago[other]=Hace {{t}} horas 64 | 65 | days-ago = {[ plural(t) ]} 66 | days-ago[zero]=Hace {{t}} dias 67 | days-ago[one]=Ayer 68 | days-ago[two]=Hace {{t}} dias 69 | days-ago[few]=Hace {{t}} dias 70 | days-ago[many]=Hace {{t}} dias 71 | days-ago[other]=Hace {{t}} dias 72 | 73 | # Error messages 74 | notebook-name-already-exists=Ya hay un Bloc de Notas con ese nombre. Por favor, escoja otro. 75 | not-reached-evernote=No se pudo conectar con el servidor de Evernote. Asegúrese de que está conectado a Internet. 76 | notebook-delete-conflict=El Bloc de Notas local ha sido eliminado. ¿Desea recuperarlo del servidor? 77 | generic-conflict=Hay una versión diferente del {{object}} {{name}} en Evernote con fecha {{date}}. ¿Desea conservar los cambios locales? 78 | note-unsaveable=No se puede editar la presente nota porque no se pudo descargarla completamente. 79 | sync-failed=La última descarga Evernote no se ha completado. ¿Quieres intentarlo de nuevo? 80 | warning=(No se pueden descargar algunas imágenes o archivos adjuntos de gran tamaño. Note es de sólo lectura.) 81 | -------------------------------------------------------------------------------- /locales/notes.fy-NL.properties: -------------------------------------------------------------------------------- 1 | # General note/notebook operations 2 | notebooks=Notysjeblokken 3 | tap-anywhere-to-start=Oanreitsje om te begjinnen 4 | note-info=Notysje-ynformaasje 5 | add-to-contacts=Tafoegje oan kontaktpersoanen 6 | new-notebook=Notysjeblok meitsje 7 | notebook-all=Alle notysjes 8 | notebook-trash=Jiskefet 9 | notebook-action-title=Notysjeblok bewurkje 10 | notebook-action-rename=Omneame 11 | notebook-action-delete=Fuortsmite 12 | prompt-rename-notebook=Notysjeblok omneame: 13 | prompt-delete-notebook=Klik op OK om dit notysjeblok fuort te smiten.\n\nLet op: alle notysjes yn dit blok sille ferpleatst wurde nei it jiskefet. 14 | note-restored=Wersteld nei {{notebook}} 15 | new-note=Nije notysje 16 | empty-trash=Jo jiskefet is leech! 17 | first-notebook-name=Myn notysjeblok 18 | empty-notebook-name=Notysjes 19 | note-cancel-changes=Jo hawwe wizigingen oanbrocht oan de notysje, wolle jo dizze bewarje? 20 | confirm-trash-note=Klik op OK om dizze notysje te ferpleatsen nei it jiskefet 21 | confirm-delete-note=Binne jo wis dat jo dizze notysje permanint fuortsmite wolle? 22 | add-image-title=In foto oan jo notysje tafoegje: 23 | image-not-supported=Dizze funksje wurdt net stipe op jo apparaat 24 | image-label=Foto 25 | date-updated=Lêst bywurke 26 | date-created=Oanmakke 27 | title=Titel 28 | notebook=Notysjeblok 29 | created-on=Oanmakke op 30 | modified-on=Bewurke op 31 | done=Dien 32 | search-results=Sykresultaten 33 | empty-notebook=Gjin notysjes opnommen
    Begjin no mei skriuwen 34 | # do not translate
    tag ^^^ 35 | 36 | # Evernote integration 37 | connect-with=Ferbine mei 38 | connected-to-evernote=Ferbûn mei Evernote 39 | settings=Ynstellingen 40 | signed-in-as=Ynlogd as 41 | account-type=Accounttype 42 | go-premium=Premium-abonnemint ôfnimme 43 | sign-out=Utlogge 44 | evernote-email-address=Evernote-e-mailadres 45 | current-monthly-usage=Aktueel moanliks gebrûk 46 | upload-left=Oplaad beskikber 47 | days-left=Dagen beskikber 48 | 49 | # relative elapsed times for indicating age of note 50 | minutes-ago = {[ plural(t) ]} 51 | minutes-ago[zero]=Op dit stuit 52 | minutes-ago[one]=1 minút lyn 53 | minutes-ago[two]={{t}} minuten lyn 54 | minutes-ago[few]={{t}} minuten lyn 55 | minutes-ago[many]={{t}} minuten lyn 56 | minutes-ago[other]={{t}} minuten lyn 57 | 58 | hours-ago = {[ plural(t) ]} 59 | hours-ago[zero]={{t}} oeren lyn 60 | hours-ago[one]=1 oer lyn 61 | hours-ago[two]={{t}} oeren lyn 62 | hours-ago[few]={{t}} oeren lyn 63 | hours-ago[many]={{t}} oeren lyn 64 | hours-ago[other]={{t}} oeren lyn 65 | 66 | days-ago = {[ plural(t) ]} 67 | days-ago[zero]={{t}} dagen lyn 68 | days-ago[one]=Juster 69 | days-ago[two]={{t}} dagen lyn 70 | days-ago[few]={{t}} dagen lyn 71 | days-ago[many]={{t}} dagen lyn 72 | days-ago[other]={{t}} dagen lyn 73 | 74 | # Error messages 75 | notebook-name-already-exists=Der bestiet al in notysjeboek mei dy namme. Kies in oare namme. 76 | not-reached-evernote=Koe de Evernote-server net berikke. Soargje derfoar dat jo ferbûn binne mei it ynternet. 77 | notebook-delete-conflict=Lokaal notysjeboek is fuortsmiten. Wolle jo it werstelle fanôf de server?, 78 | generic-conflict=It {{object}} {{name}} hat in oare ferzje op Evernote fan {{date}}. Wolle jo de lokale wizigingen behâlde? 79 | note-unsaveable=Dizze notysje kin net bewurke wurde, omdat in part fan de notysje net download wurde koe. 80 | sync-failed=De lêste Evernote-download is net foltôge. Wolle jo it opnij probearje? 81 | warning=(Inkele grutte ôfbyldingen of bylagen kinne net download wurde. Notysje is allinnich-lêze.) 82 | -------------------------------------------------------------------------------- /locales/notes.fr.properties: -------------------------------------------------------------------------------- 1 | # General note/notebook operations 2 | notebooks=Carnets 3 | tap-anywhere-to-start=Appuyez n’importe où pour commencer 4 | note-info=Détails de la note 5 | add-to-contacts=Ajouter aux contacts 6 | new-notebook=Créer un carnet de notes 7 | notebook-all=Toutes les notes 8 | notebook-trash=Corbeille 9 | notebook-action-title=Modifier le carnet 10 | notebook-action-rename=Renommer 11 | notebook-action-delete=Supprimer 12 | prompt-rename-notebook=Renommer le carnet : 13 | prompt-delete-notebook=Appuyez sur OK pour supprimer ce carnet.\n\nATTENTION : toutes ses notes seront déplacées dans la corbeille. 14 | note-restored=Restaurée dans {{notebook}} 15 | new-note=Nouvelle note 16 | empty-trash=Votre corbeille est vide 17 | first-notebook-name=Mon carnet 18 | empty-notebook-name=Notes 19 | note-cancel-changes=Vous avez modifié la note, souhaitez-vous l’enregistrer ? 20 | confirm-trash-note=Appuyez sur OK pour déplacer cette note dans la corbeille 21 | confirm-delete-note=Voulez-vous vraiment supprimer définitivement cette note ? 22 | add-image-title=Joindre une photo à votre note : 23 | image-not-supported=Cette fonctionnalité n’est pas prise en charge par votre appareil 24 | image-label=Photo 25 | date-updated=Date de mise à jour 26 | date-created=Date de création 27 | title=Titre 28 | notebook=Carnet 29 | created-on=Créé le 30 | modified-on=Modifié le 31 | done=Terminé 32 | search-results=Résultats de recherche 33 | empty-notebook=Aucune note enregistrée
    Vous pouvez commencer à en rédiger 34 | 35 | # Evernote integration 36 | connect-with=Se connecter à 37 | connected-to-evernote=Connecté à Evernote 38 | settings=Paramètres 39 | signed-in-as=Connecté en tant que 40 | account-type=Type de compte 41 | go-premium=Compte premium 42 | sign-out=Déconnexion 43 | evernote-email-address=Adresse électronique Evernote 44 | current-monthly-usage=Utilisation mensuelle 45 | upload-left=Quota de téléch. restant 46 | days-left=Jours restants 47 | 48 | # relative elapsed times for indicating age of note 49 | minutes-ago = {[ plural(t) ]} 50 | minutes-ago[zero]=À l’instant 51 | minutes-ago[one]=Il y a 1 minute 52 | minutes-ago[two]=Il y a {{t}} minutes 53 | minutes-ago[few]=Il y a {{t}} minutes 54 | minutes-ago[many]=Il y a {{t}} minutes 55 | minutes-ago[other]=Il y a {{t}} minutes 56 | 57 | hours-ago = {[ plural(t) ]} 58 | hours-ago[zero]=Il y a {{t}} heures 59 | hours-ago[one]=Il y a 1 heure 60 | hours-ago[two]=Il y a {{t}} heures 61 | hours-ago[few]=Il y a {{t}} heures 62 | hours-ago[many]=Il y a {{t}} heures 63 | hours-ago[other]=Il y a {{t}} heures 64 | 65 | days-ago = {[ plural(t) ]} 66 | days-ago[zero]=Il y a {{t}} jours 67 | days-ago[one]=Hier 68 | days-ago[two]=Il y a {{t}} jours 69 | days-ago[few]=Il y a {{t}} jours 70 | days-ago[many]=Il y a {{t}} jours 71 | days-ago[other]=Il y a {{t}} jours 72 | 73 | # Error messages 74 | notebook-name-already-exists=Un carnet comportant ce nom existe déjà. Veuillez en choisir un autre. 75 | not-reached-evernote=Le serveur Evernote est injoignable. Veuillez vous assurer d’être connecté à Internet. 76 | notebook-delete-conflict=Le carnet local a été supprimé. Souhaitez-vous le restaurer depuis le serveur ? 77 | generic-conflict=Une version différente de {{object}} {{name}}, datée du {{date}} existe sur Evernote. Souhaitez-vous conserver vos modifications locales ? 78 | note-unsaveable=Cette note ne peut pas être modifiée, car une partie n’a pas pu être téléchargée. 79 | sync-failed=Le dernier téléchargement depuis Evernote ne s’est pas terminé correctement. Souhaitez-vous réessayer ? 80 | warning=(Certaines images ou pièces jointes volumineuses n’ont pas pu être téléchargées. La note est en lecture seule.) 81 | -------------------------------------------------------------------------------- /locales/notes.nl.properties: -------------------------------------------------------------------------------- 1 | # General note/notebook operations 2 | notebooks=Notitieblokken 3 | tap-anywhere-to-start=Aanraken om te beginnen 4 | note-info=Notitie-informatie 5 | add-to-contacts=Toevoegen aan contactpersonen 6 | new-notebook=Notitieblok creëeren 7 | notebook-all=Alle notities 8 | notebook-trash=Prullenbak 9 | notebook-action-title=Notitieblok bewerken 10 | notebook-action-rename=Hernoemen 11 | notebook-action-delete=Verwijderen 12 | prompt-rename-notebook=Notitieblok hernoemen: 13 | prompt-delete-notebook=Klik op OK om dit notitieblok te verwijderen.\n\nLet op: alle notities in dit blok zullen verplaatst worden naar de prullenbak. 14 | note-restored=Hersteld naar {{notebook}} 15 | new-note=Nieuwe notitie 16 | empty-trash=Uw prullenbak is leeg! 17 | first-notebook-name=Mijn notitieblok 18 | empty-notebook-name=Notities 19 | note-cancel-changes=U heeft wijzigingen aangebracht aan de notitie, wilt u deze opslaan? 20 | confirm-trash-note=Klik op OK om deze notitie te verplaatsen naar de prullenbak 21 | confirm-delete-note=Weet u zeker dat u deze notitie permanent wilt verwijderen? 22 | add-image-title=Een foto aan uw notitie bijvoegen: 23 | image-not-supported=Deze functie wordt niet ondersteund op uw apparaat 24 | image-label=Foto 25 | date-updated=Laatst bijgewerkt 26 | date-created=Aangemaakt 27 | title=Titel 28 | notebook=Notitieblo 29 | created-on=Aangemaakt op 30 | modified-on=Bewerkt o 31 | done=Klaar 32 | search-results=Zoekresultaten 33 | empty-notebook=Geen notities opgenomen
    Begin nu met schrijven 34 | # do not translate
    tag ^^^ 35 | 36 | # Evernote integration 37 | connect-with=Verbinden met 38 | connected-to-evernote=Verbonden met Evernote 39 | settings=Instellingen 40 | signed-in-as=Ingelogd als 41 | account-type=Accounttype 42 | go-premium=Premium-abonnement afnemen 43 | sign-out=Uitloggen 44 | evernote-email-address=Evernote-e-mailadres 45 | current-monthly-usage=Huidig maandelijks verbruik 46 | upload-left=Upload beschikbaar 47 | days-left=Dagen beschikbaar 48 | 49 | # relative elapsed times for indicating age of note 50 | minutes-ago = {[ plural(t) ]} 51 | minutes-ago[zero]=Op dit moment 52 | minutes-ago[one]=1 minuut geleden 53 | minutes-ago[two]={{t}} minuten geleden 54 | minutes-ago[few]={{t}} minuten geleden 55 | minutes-ago[many]={{t}} minuten geleden 56 | minutes-ago[other]={{t}} minuten geleden 57 | 58 | hours-ago = {[ plural(t) ]} 59 | hours-ago[zero]={{t}} uren geleden 60 | hours-ago[one]=1 uur geleden 61 | hours-ago[two]={{t}} uren geleden 62 | hours-ago[few]={{t}} uren geleden 63 | hours-ago[many]={{t}} uren geleden 64 | hours-ago[other]={{t}} uren geleden 65 | 66 | days-ago = {[ plural(t) ]} 67 | days-ago[zero]={{t}} dagen geleden 68 | days-ago[one]=Gisteren 69 | days-ago[two]={{t}} dagen geleden 70 | days-ago[few]={{t}} dagen geleden 71 | days-ago[many]={{t}} dagen geleden 72 | days-ago[other]={{t}} dagen geleden 73 | 74 | # Error messages 75 | notebook-name-already-exists=Er bestaat al een notitieboek met die naam. Kies alstublieft een andere naam. 76 | not-reached-evernote=Kon de Evernote-server niet bereiken. Zorg ervoor dat u verbonden met het internet. 77 | notebook-delete-conflict=Lokaal notitieboek is verwijderd. Wilt u het herstellen vanaf de server?, 78 | generic-conflict=Het {{object}} {{name}} heeft een andere versie op Evernote van {{date}}. Wilt u de lokale wijzigingen behouden? 79 | note-unsaveable=Deze notitie kan niet worden bewerkt omdat een deel van de notitie niet kon worden gedownload. 80 | sync-failed=De laatste Evernote-download was niet voltooid. Wilt u het opnieuw proberen? 81 | warning=(Enkele grote afbeeldingen of bijlages kunnen niet worden gedownload. Notitie is alleen-lezen.) 82 | -------------------------------------------------------------------------------- /locales/notes.de.properties: -------------------------------------------------------------------------------- 1 | # General note/notebook operations 2 | notebooks=Notizbuch 3 | tap-anywhere-to-start=Tippen Sie auf dem Bildschirm um Anzufangen 4 | note-info=Notizinfo 5 | add-to-contacts=Zu Kontakten hinzufügen 6 | new-notebook=Notizbuch Erstellen 7 | notebook-all=Alle Notizen 8 | notebook-trash=Papierkorb 9 | notebook-action-title=Notizbuch Bearbeiten 10 | notebook-action-rename=Umbenennen 11 | notebook-action-delete=Löschen 12 | prompt-rename-notebook=Notizbuch Umbenennen 13 | prompt-delete-notebook=Klicken Sie OK um das Notizbuchen zu löschen.\n\nHinweis: Alle seine Notizen werden in den Papierkorb verschoben. 14 | note-restored=Wiederhergestellt in {{notebook}} 15 | new-note=Neue Notiz 16 | empty-trash=Ihr Papierkorb ist leer! 17 | first-notebook-name=Mein Notizbuch 18 | empty-notebook-name=Notizen 19 | note-cancel-changes=Sie haben die Notiz bearbeitet, wollen Sie die Änderungen speichern? 20 | confirm-trash-note=Klicken Sie OK um die Notiz in den Papierkorb zu schieben. 21 | confirm-delete-note=Sind Sie sicher, dass Sie die Notiz dauerhaft löschen wollen? 22 | add-image-title=Fügen Sie ein Foto zu Ihrer Notiz hinzu: 23 | image-not-supported=Diese Funktion wird auf Ihrem Gerät nicht unterstützt. 24 | image-label=Foto 25 | date-updated=Änderungsdatum 26 | date-created=Erstellungsdatum 27 | title=Betreff 28 | notebook=Notizbuch 29 | created-on=Erstellt am 30 | modified-on=Geändert am 31 | done=Fertig 32 | search-results=Suchergebnis 33 | empty-notebook=Bisher keine Notizen eingetragen
    Erstellen Sie ihre erste Notiz 34 | # do not translate
    tag ^^^ 35 | 36 | # Evernote integration 37 | connect-with=Verbinde mit 38 | connected-to-evernote=Verbunden mit Evernote 39 | settings=Einstellungen 40 | signed-in-as=Eingeloggt als 41 | account-type=Kontotyp 42 | go-premium=Premium Anfangen 43 | sign-out=Abmelden 44 | evernote-email-address=Evernote Email-Adresse 45 | current-monthly-usage=Derzeitige Monatliche Nutzung 46 | upload-left=Verbleibendes Upload-Limit 47 | days-left=Verbleibende Tage 48 | 49 | # relative elapsed times for indicating age of note 50 | minutes-ago = {[ plural(t) ]} 51 | minutes-ago[zero]=Gerade jetzt 52 | minutes-ago[one]=Vor 1 Minute 53 | minutes-ago[two]=Vor {{t}} Minuten 54 | minutes-ago[few]=Vor {{t}} Minuten 55 | minutes-ago[many]=Vor {{t}} Minuten 56 | minutes-ago[other]=Vor {{t}} Minuten 57 | 58 | hours-ago = {[ plural(t) ]} 59 | hours-ago[zero]=Vor {{t}} Stunden 60 | hours-ago[one]=Vor 1 Stunde 61 | hours-ago[two]=Vor {{t}} Stunden 62 | hours-ago[few]=Vor {{t}} Stunden 63 | hours-ago[many]=Vor {{t}} Stunden 64 | hours-ago[other]=Vor {{t}} Stunden 65 | 66 | days-ago = {[ plural(t) ]} 67 | days-ago[zero]=Vor {{t}} Tagen 68 | days-ago[one]=Gestern 69 | days-ago[two]=Vor {{t}} Tagen 70 | days-ago[few]=Vor {{t}} Tagen 71 | days-ago[many]=Vor {{t}} Tagen 72 | days-ago[other]=Vor {{t}} Tagen 73 | 74 | # Error messages 75 | notebook-name-already-exists=Ein Notizbuch mit dem Namen existiert bereits. Bitte wählen Sie einen anderen Namen. 76 | not-reached-evernote=Der Evernote Server ist nicht erreichbar. Stellen Sie sicher, dass sie mit dem Internet verbunden sind. 77 | notebook-delete-conflict=Das lokale Notizbuch wurde gelöscht. Möchten Sie es vom Server wiederherstellen? 78 | generic-conflict={{object}} {{name}} hat eine andere Version von {{date}} auf Evernote. Möchten Sie ihre lokalen Änderungen behalten? 79 | note-unsaveable=Diese Notiz kann nicht bearbeitet werden weil sie nicht komplett heruntergeladen wurde. 80 | sync-failed=Der letzte Evernote Download wurde nicht fertiggestellt. Möchten Sie es noch einmal probieren? 81 | warning=(Einige große Bilder oder Anhänge konnten nicht runtergeladen werden. Notiz ist schreibgeschützt.) 82 | -------------------------------------------------------------------------------- /shared/style_unstable/drawer/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Drawer 7 | 8 | 9 | 10 | 11 | 12 | 15 | 56 | 57 | 58 | 59 | 60 | 61 |
    62 |
    63 | 64 | add 65 | 66 |

    Title (9)

    67 |
    68 |
    69 |
      70 |
    • label
    • 71 |
    • label
    • 72 |
    • label
    • 73 |
    • label
    • 74 |
    75 |

    Subtitle

    76 |
      77 |
    • label
    • 78 |
    • label
    • 79 |
    • label larger label than the
    • 80 |
    • label
    • 81 |
    82 |
    83 |
    84 | 85 |
    86 |
    87 | hide sidebar 88 | show sidebar 89 |

    Inbox

    90 |
    91 |
    92 |
    93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /style/dialog.css: -------------------------------------------------------------------------------- 1 | /* ---------------------------------- 2 | * ACTION MENU 3 | * ---------------------------------- */ 4 | 5 | /* MAIN DIALOG SETUP */ 6 | section[role="dialog"] { 7 | background: url(images/ui/pattern.png) repeat left top, url(images/ui/gradient.png) no-repeat left top; 8 | background-size: auto auto, 100% 100%; 9 | overflow: hidden; 10 | position: absolute; 11 | z-index: 100; 12 | top: 0; 13 | left: 0; 14 | right: 0; 15 | bottom: 0; 16 | white-space: nowrap; 17 | padding: 1.5rem 0 7rem; 18 | font-family: "Open Sans", Sans-serif; 19 | color: #fff; 20 | } 21 | 22 | section[role="dialog"]:before { 23 | content: ""; 24 | display: inline-block; 25 | vertical-align: middle; 26 | width: 1px; 27 | height: 100%; 28 | } 29 | 30 | section[role="dialog"] > div { 31 | padding: 0 2.5rem 0 2rem; 32 | -moz-box-sizing: padding-box; 33 | width: 100%; 34 | display: inline-block; 35 | vertical-align: middle; 36 | white-space: normal; 37 | } 38 | 39 | section[role="dialog"] h3 { 40 | font-family: 'Open Sans', Sans-serif; 41 | font-weight: normal; 42 | font-size: 1.6rem; 43 | line-height: 1em; 44 | color: #fff; 45 | border-bottom: 0.1rem solid #686868; 46 | margin: 0 0 1rem; 47 | padding-bottom: 1rem; 48 | } 49 | 50 | /* SPECIFIC COMPONENT CODE */ 51 | section[role="dialog"] menu.actions { 52 | margin: 0; 53 | padding: 0; 54 | border: none; 55 | background: none; 56 | display: block; 57 | overflow: hidden; 58 | position: absolute; 59 | left: 0; 60 | right: 0; 61 | bottom: 0; 62 | } 63 | 64 | section[role="dialog"] menu.actions h3 { 65 | display: block; 66 | margin: 0 1.5rem; 67 | } 68 | 69 | section[role="dialog"] menu.actions > ul { 70 | list-style: none; 71 | padding: 0; 72 | margin: 0.5rem 0 0 0; 73 | display: block; 74 | overflow: hidden; 75 | } 76 | 77 | section[role="dialog"] menu.actions > ul > li { 78 | padding: 1rem 1.5rem 0 1.5rem; 79 | margin: 0; 80 | display: block; 81 | overflow: hidden; 82 | border: none; 83 | height: auto; 84 | line-height: normal; 85 | } 86 | 87 | section[role="dialog"] menu.actions > ul > li:last-child { 88 | border-top: solid 1px rgba(255, 255, 255, 0.1); 89 | background: #2d2d2d url(images/ui/pattern.png) repeat left top; 90 | margin-top: 1.5rem; 91 | padding: 1.5rem; 92 | } 93 | 94 | section[role="dialog"] menu.actions > ul > li > button, 95 | section[role="dialog"] menu.actions > ul > li > a[role="button"] { 96 | width: 100%; 97 | height: 3.8rem; 98 | -moz-box-sizing: border-box; 99 | display: inline-block; 100 | vertical-align: middle; 101 | text-overflow: ellipsis; 102 | white-space: nowrap; 103 | overflow: hidden; 104 | font-family: 'Open Sans', Sans-serif; 105 | font-weight: 600; 106 | line-height: 3.8rem; 107 | outline: none; 108 | font-size: 1.4rem; 109 | color: #fff; 110 | text-shadow: none; 111 | text-align: left; 112 | padding: 0 1rem; 113 | margin: 0; 114 | background: #4E4E4E padding-box; 115 | border-radius: 0.3rem; 116 | border: solid 1px rgba(0, 0, 0, 0.25); 117 | } 118 | 119 | /* Press state */ 120 | section[role="dialog"] menu.actions > ul > li:not(:last-child) > button:active, 121 | section[role="dialog"] menu.actions > ul > li:not(:last-child) > a[role="button"]:active { 122 | background-color: #006f86; 123 | color: #333; 124 | text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25); 125 | } 126 | 127 | section[role="dialog"] menu.actions > ul > li:last-child > button, 128 | section[role="dialog"] menu.actions > ul > li:last-child > a[role="button"] { 129 | background: #fafafa url(images/ui/cancel.png) repeat-x left bottom; 130 | border: 1px solid #9f9f9f; 131 | font-size: 1.6rem; 132 | color: #333; 133 | text-align: center; 134 | text-shadow: 1px 1px 0 rgba(255,255,255,0.3); 135 | } 136 | 137 | /* Press state */ 138 | section[role="dialog"] menu.actions > ul > li:last-child > button:active, 139 | section[role="dialog"] menu.actions > ul > li:last-child > a[role="button"]:active { 140 | border-color: #008aaa; 141 | background: #008aaa; 142 | color: #333; 143 | } -------------------------------------------------------------------------------- /manifest.webapp: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Notes", 3 | "description": "Notes app", 4 | "version": "2.3.0", 5 | "launch_path": "/index.html", 6 | "type": "privileged", 7 | "redirects": [ 8 | { 9 | "from": "http://ffos-notes.local/redirect.html", 10 | "to": "/redirect.html" 11 | } 12 | ], 13 | "permissions": { 14 | "systemXHR": { 15 | "description": "Access Evernote API" 16 | } 17 | }, 18 | "developer": { 19 | "name": "Mozilla Apps", 20 | "url": "http://www.mozilla.org/firefox/os/" 21 | }, 22 | "orientation": "portrait", 23 | "icons": { 24 | "84": "/images/Icon_Notes@1.png", 25 | "126": "/images/Icon_Notes@1.5.png", 26 | "142": "/images/Icon_Notes@2.png", 27 | "189": "/images/Icon_Notes@2.25.png", 28 | "284": "/images/Icon_Notes@3.375.png" 29 | }, 30 | "locales": { 31 | "en-US": { 32 | "name": "Notes", 33 | "description": "Notes is the official Firefox OS app. Notes is designed to help save all those ideas, reminders and moments of inspiration — keeping track of it all right there on your everyday device. With everything totally searchable you'll be able to stay fully organised with minimal effort." 34 | }, 35 | "es": { 36 | "name": "Notas", 37 | "description": "Notas es la aplicación oficial de Firefox OS. Notas está diseñada para ayudar a conservar todas esas ideas, recordatorios y momentos de inspiración, y mantener un registro de todo en tu dispositivo cotidiano. Con todo completamente localizable, podrás estar plenamente organizado con un mínimo esfuerzo." 38 | }, 39 | "pt-BR": { 40 | "name": "Notas", 41 | "description": "Notas é o aplicativo oficial do Firefox OS. Notas é projetado para ajudar a manter todas essas idéias, lembretes e momentos de inspiração, e manter o controle de tudo em seu aparelho todos os dias. Com totalmente pesquisável, pode ser totalmente organizado com o mínimo esforço." 42 | }, 43 | "pl": { 44 | "name": "Notatki", 45 | "description": "Notatki to oficjalna aplikacja dla systemu Firefox OS. Korzystanie z niej jest darmowe. Powstała po to, żeby ułatwić zapisywanie pomysłów, inspiracji czy spraw do załatwienia wprost na Twoim telefonie. Mając dostęp do swoich notatek w łatwy sposób zorganizujesz swój czas." 46 | }, 47 | "de": { 48 | "name": "Notizen", 49 | "description": "Notizen ist die offizielle App von Firefox OS. Notizen wurde entworfen, um all diese Ideen , Erinnerungen und Momente der Inspiration zu speichern und sichert alles in Ihr Gerät jeden Tag. Weil alles vollständig durchsuchbar ist , organisiert man alles mit minimalem Aufwand." 50 | }, 51 | "el": { 52 | "name": "Σημειώσεις", 53 | "description": "Σημειώσεις είναι η επίσημη εφαρμογή του Firefox OS. Οι Σημειώσεις είναι μια εφαρμογή σχεδιασμένη για να σας βοηθήσει να αποθηκεύστε όλες εκείνες τις ιδέες, υπενθυμίσεις και στιγμές έμπνευσης, έχοντας την δυνατότητα να τα παρακολουθείτε στην καθημερινή σας συσκευή. Με τα πάντα πλήρως αναζητήσιμα θα μπορείτε να είστε πάντοτε πλήρως οργανωμένοι καταβάλλοντας την ελάχιστη προσπάθεια." 54 | }, 55 | "bn-BD": { 56 | "name": "নোটসমূহ", 57 | "description": "আপনার সব আইডিয়া এবং অনু-স্মারক বাঁচাতে, সহায়তা নোট ব্যবহার করুন." 58 | }, 59 | "nl": { 60 | "name": "Notities", 61 | "description": "Notities is de officiële Firefox OS-app. Notities is ontworpen om u te helpen om alle ideëen, herinneringen en momenten van inspiratie op te slaan - met het gemak dit bij te houden gewoon op uw dagelijkse apparaat. Met de mogelijkheid in alles te zoeken kunt u volledig georganiseerd blijven met minimale inspanning." 62 | }, 63 | "hu": { 64 | "name": "Jegyzetek", 65 | "description": "A Jegyzetek egy hivatalos Firefox OS applikáció. A Jegyzetek segítségével lejegyezheted és elmentheted ötleteidet, emlékeztetőidet, a pillanat adta inspirációkat, amik mindíg elérhetőek lesznek a telefonodon. Automatikusan rendszerezi az elmentett dokumentumokat így minimális erőfeszítéssel rendben tarthatod jegyzeteidet és rájuk is kereshetsz telefonodon." 66 | }, 67 | "uk": { 68 | "name": "Нотатки", 69 | "description": "Нотатки - це офіційна програма Firefox OS. Нотатки створено, щоб допомогти зберегти всі ідеї, нагадування та моменти натхнення, тримаючи їх всі на пристрої, яким ви користуєтесь щодня. Маючи доступ до своїх нотаток, ви зможете організувати свій час з найменшими зусиллями." 70 | }, 71 | "fy-NL": { 72 | "name": "Notysjes", 73 | "description": "Notysjes is de offisjele Firefox OS-app. Notysjes is makke om jo te helpen om alle ideeën, omtinken en mominten fan ynspiraasje te bewarjen - mei it gemak dit by te hâlden gewoanwei op jo daaglikse apparaat. Mei de mooglikheid yn alles te sykjen kinne jo folslein organisearre bliuwe mei minimale ynspanning." 74 | }, 75 | "ca": { 76 | "name": "Notes", 77 | "description": "Notes és l'aplicació oficial de Firefox OS. Notes ha estat dissenyada per ajudar a preservar totes aquelles idees, recordatoris i moments d'inspiració, tot mantenint un registre ben accessible justament al vostre dispositiu d'ús diari. Equipat amb un cercador amb el que podreu trobar-ho tot i amb la possibilitat d'agrupar les vostres notes en blocs diferents, podeu organitzar-vos amb el mínim esforç." 78 | } 79 | }, 80 | "default_locale": "en-US" 81 | } 82 | -------------------------------------------------------------------------------- /js/Cards.js: -------------------------------------------------------------------------------- 1 | 2 | var Cards = function(_options) { 3 | var _this = this, 4 | elContainer = null, cardElements = [], drawerWidth = 0, cardWidth = 0, currentIndex = -1, 5 | hasDrawer = false, transitionDuration = 0, transitionEasing = "", 6 | onMove = null, 7 | onTransitionEnd = null; 8 | 9 | var CLASS_WHEN_ACTIVE = "active", 10 | CLASS_DRAWER = "drawer", 11 | DEFAULT_TRANSITION_DURATION = 400, 12 | DEFAULT_TRANSITION_EASING = "ease"; 13 | 14 | this.CARDS = {}; 15 | 16 | this.init = function(options) { 17 | !options && (options = {}); 18 | 19 | onMove = options.onMove; 20 | onTransitionEnd = options.onTransitionEnd; 21 | elContainer = options.container || document.querySelector(".cards"); 22 | 23 | elContainer.style.cssText += '; position: relative; overflow: hidden; min-height: 100%;'; 24 | 25 | cardWidth = drawerWidth = elContainer.offsetWidth; 26 | cardElements = elContainer.getElementsByClassName("card"); 27 | 28 | transitionDuration = options.transitionDuration || DEFAULT_TRANSITION_DURATION; 29 | transitionEasing = options.transitionEasing || DEFAULT_TRANSITION_EASING; 30 | 31 | initCards(); 32 | }; 33 | 34 | this.goTo = function(index) { 35 | if (typeof index == "string") { 36 | index = getIndexById(index); 37 | } 38 | 39 | if (index < 0 || index >= cardElements.length) { 40 | return _this; 41 | } 42 | 43 | for (var i=0, l=cardElements.length; i index) { 51 | pos = (i-index)*cardWidth; 52 | } else { 53 | pos = 0; 54 | zIndex = 100; 55 | } 56 | 57 | if (hasDrawer) { 58 | if (index == 0 && i == 1) { 59 | pos = pos - cardWidth + drawerWidth; 60 | } 61 | } 62 | 63 | el.style.cssText += "; z-index: " + zIndex + ";" + 64 | "transform: translateX(" + pos + "px); "; 65 | } 66 | 67 | Console.log('GOTO', index, pos); 68 | 69 | cardElements[currentIndex].classList.remove(CLASS_WHEN_ACTIVE); 70 | document.body.classList.remove("card-" + cardElements[currentIndex].id); 71 | currentIndex = index; 72 | cardElements[currentIndex].classList.add(CLASS_WHEN_ACTIVE); 73 | document.body.classList.add("card-" + cardElements[currentIndex].id); 74 | 75 | onMove && onMove(currentIndex); 76 | 77 | return _this; 78 | }; 79 | 80 | function initCards() { 81 | var defaultIndex = 0; 82 | 83 | for (var i=0, l=cardElements.length; i header:first-child { 21 | margin-left: -1.6rem; 22 | } 23 | 24 | section[role="region"] > header:first-child > a { 25 | width: 6rem; 26 | } 27 | 28 | section[role="region"] > header:first-child > a .icon.icon-menu { 29 | background-position: center center; 30 | width: 4rem; 31 | } 32 | 33 | section[role="region"] > header:first-child > a .icon:after { 34 | width: 4rem; 35 | } 36 | 37 | section[role="region"] > header:first-child > a { 38 | background-position: 4rem center; 39 | } 40 | 41 | section[role="region"] > header:first-child h1 { 42 | margin-left: 5rem; 43 | } 44 | 45 | /* Hide anchor to change target */ 46 | section[role="region"] > header:first-child > a:last-of-type { 47 | visibility: visible; 48 | } 49 | section[role="region"]:target > header:first-child > a:last-of-type { 50 | visibility: hidden; 51 | } 52 | 53 | 54 | /* Sidebar */ 55 | section[data-type="sidebar"] { 56 | position: absolute; 57 | width: 80%; 58 | background: url(drawer/images/ui/pattern.png) repeat; 59 | height: 100%; 60 | top: 0; 61 | left: 0; 62 | overflow: hidden; 63 | } 64 | 65 | /* Sidebar header */ 66 | section[data-type="sidebar"] > header { 67 | position: relative; 68 | z-index: 10; 69 | height: 5rem; 70 | color: #fff; 71 | background: url(drawer/images/ui/header.png) repeat-x left bottom / 100% auto; 72 | } 73 | 74 | section[data-type="sidebar"] > header:after { 75 | content: ""; 76 | height: 0.3rem; 77 | position: absolute; 78 | top: 100%; 79 | left: 0; 80 | right: 0; 81 | background: url(drawer/images/ui/shadow_header.png) repeat-x left top; 82 | background-size: auto 100%; 83 | } 84 | 85 | section[data-type="sidebar"] > header h1 { 86 | font-size: 2.2rem; 87 | line-height: 4.8rem; 88 | text-align: left; 89 | white-space: nowrap; 90 | text-overflow: ellipsis; 91 | display: block; 92 | overflow: hidden; 93 | margin: 0 0 0 3rem; 94 | height: 100% 95 | } 96 | 97 | section[data-type="sidebar"] > header h1 em { 98 | font-weight: bold; 99 | font-size: 1.5rem; 100 | line-height: 1em; 101 | } 102 | 103 | /* Generic set of actions in toolbar */ 104 | section[data-type="sidebar"] > header menu[type="toolbar"] { 105 | height: 100%; 106 | float: right; 107 | } 108 | 109 | section[data-type="sidebar"] > header menu[type="toolbar"] a, 110 | section[data-type="sidebar"] > header menu[type="toolbar"] button { 111 | height: 4.9rem; 112 | line-height: 4.9rem; 113 | float: left; 114 | background: none; 115 | padding: 0 1.75rem; 116 | -moz-box-sizing: border-box; 117 | min-width: 5rem; 118 | text-align: center; 119 | } 120 | 121 | section[data-type="sidebar"] > header menu[type="toolbar"] a:last-child, 122 | section[data-type="sidebar"] > header menu[type="toolbar"] button:last-child { 123 | background: url(drawer/images/ui/separator.png) no-repeat left center / auto 3.1rem; 124 | } 125 | 126 | section[data-type="sidebar"] > header menu[type="toolbar"] { 127 | padding: 0; 128 | margin: 0; 129 | } 130 | 131 | section[data-type="sidebar"] > header a, 132 | section[data-type="sidebar"] > header button { 133 | border: none; 134 | background: none; 135 | padding: 0; 136 | overflow: hidden; 137 | font-weight: 600; 138 | font-size: 1.4rem; 139 | line-height: 1.1em; 140 | color: #fff; 141 | } 142 | 143 | section[data-type="sidebar"] > header a:first-letter, 144 | section[data-type="sidebar"] > header button:first-letter { 145 | text-transform: uppercase; 146 | } 147 | 148 | /* Icon definitions */ 149 | section[data-type="sidebar"] > header .icon { 150 | display: inline-block; 151 | width: 3rem; 152 | height: 3rem; 153 | margin: 0 -1rem; 154 | background: transparent no-repeat center center / 100% auto; 155 | font-size: 0; 156 | overflow: hidden; 157 | position: relative; 158 | height: 4.9rem; 159 | } 160 | 161 | section[data-type="sidebar"]:after { 162 | content: ""; 163 | width: 1rem; 164 | background: url(drawer/images/ui/shadow.png) right top repeat-y; 165 | height: 100%; 166 | position: absolute; 167 | top: 0; 168 | right: 0; 169 | z-index: 5; 170 | } 171 | 172 | section[data-type="sidebar"] > nav { 173 | overflow-y: auto; 174 | max-height: 100%; 175 | margin-right: -0.8rem; 176 | } 177 | 178 | section[data-type="sidebar"] > nav > h2 { 179 | font-weight: bold; 180 | font-size: 1.4rem; 181 | line-height: 3.3rem; 182 | text-indent: 3rem; 183 | color: #fff; 184 | background: url(drawer/images/ui/pattern_subheader.png) repeat left top; 185 | border-bottom: 0.1rem solid #596068; 186 | margin: 0; 187 | padding-right: 0.8rem; 188 | } 189 | 190 | section[data-type="sidebar"] [role="toolbar"] { 191 | position: absolute; 192 | } 193 | 194 | section[data-type="sidebar"] > nav > ul { 195 | width: 100%; 196 | margin: 0; 197 | padding: 0; 198 | } 199 | 200 | section[data-type="sidebar"] > nav > ul > li { 201 | color: #fff; 202 | list-style: none; 203 | transition: background 0.2s ease; 204 | } 205 | 206 | section[data-type="sidebar"] > nav > ul > li:active { 207 | background: #00ABCC; 208 | } 209 | 210 | section[data-type="sidebar"] > nav > ul > li > a { 211 | text-decoration: none; 212 | color: #fff; 213 | font-size: 1.6rem; 214 | line-height: 4.35rem; 215 | border-bottom: 0.1rem solid #596068; 216 | text-indent: 3rem; 217 | padding-right: 0.8rem; 218 | width: 100%; 219 | -moz-box-sizing: border-box; 220 | display: block; 221 | text-overflow: ellipsis; 222 | white-space: nowrap; 223 | overflow: hidden; 224 | } 225 | -------------------------------------------------------------------------------- /js/lib/oauth/sha1.js: -------------------------------------------------------------------------------- 1 | /* 2 | * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined 3 | * in FIPS PUB 180-1 4 | * Version 2.1a Copyright Paul Johnston 2000 - 2002. 5 | * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet 6 | * Distributed under the BSD License 7 | * See http://pajhome.org.uk/crypt/md5 for details. 8 | */ 9 | 10 | /* 11 | * Configurable variables. You may need to tweak these to be compatible with 12 | * the server-side, but the defaults work in most cases. 13 | */ 14 | var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */ 15 | var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */ 16 | var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */ 17 | 18 | /* 19 | * These are the functions you'll usually want to call 20 | * They take string arguments and return either hex or base-64 encoded strings 21 | */ 22 | function hex_sha1(s){return binb2hex(core_sha1(str2binb(s),s.length * chrsz));} 23 | function b64_sha1(s){return binb2b64(core_sha1(str2binb(s),s.length * chrsz));} 24 | function str_sha1(s){return binb2str(core_sha1(str2binb(s),s.length * chrsz));} 25 | function hex_hmac_sha1(key, data){ return binb2hex(core_hmac_sha1(key, data));} 26 | function b64_hmac_sha1(key, data){ return binb2b64(core_hmac_sha1(key, data));} 27 | function str_hmac_sha1(key, data){ return binb2str(core_hmac_sha1(key, data));} 28 | 29 | /* 30 | * Perform a simple self-test to see if the VM is working 31 | */ 32 | function sha1_vm_test() 33 | { 34 | return hex_sha1("abc") == "a9993e364706816aba3e25717850c26c9cd0d89d"; 35 | } 36 | 37 | /* 38 | * Calculate the SHA-1 of an array of big-endian words, and a bit length 39 | */ 40 | function core_sha1(x, len) 41 | { 42 | /* append padding */ 43 | x[len >> 5] |= 0x80 << (24 - len % 32); 44 | x[((len + 64 >> 9) << 4) + 15] = len; 45 | 46 | var w = Array(80); 47 | var a = 1732584193; 48 | var b = -271733879; 49 | var c = -1732584194; 50 | var d = 271733878; 51 | var e = -1009589776; 52 | 53 | for(var i = 0; i < x.length; i += 16) 54 | { 55 | var olda = a; 56 | var oldb = b; 57 | var oldc = c; 58 | var oldd = d; 59 | var olde = e; 60 | 61 | for(var j = 0; j < 80; j++) 62 | { 63 | if(j < 16) w[j] = x[i + j]; 64 | else w[j] = rol(w[j-3] ^ w[j-8] ^ w[j-14] ^ w[j-16], 1); 65 | var t = safe_add(safe_add(rol(a, 5), sha1_ft(j, b, c, d)), 66 | safe_add(safe_add(e, w[j]), sha1_kt(j))); 67 | e = d; 68 | d = c; 69 | c = rol(b, 30); 70 | b = a; 71 | a = t; 72 | } 73 | 74 | a = safe_add(a, olda); 75 | b = safe_add(b, oldb); 76 | c = safe_add(c, oldc); 77 | d = safe_add(d, oldd); 78 | e = safe_add(e, olde); 79 | } 80 | return Array(a, b, c, d, e); 81 | 82 | } 83 | 84 | /* 85 | * Perform the appropriate triplet combination function for the current 86 | * iteration 87 | */ 88 | function sha1_ft(t, b, c, d) 89 | { 90 | if(t < 20) return (b & c) | ((~b) & d); 91 | if(t < 40) return b ^ c ^ d; 92 | if(t < 60) return (b & c) | (b & d) | (c & d); 93 | return b ^ c ^ d; 94 | } 95 | 96 | /* 97 | * Determine the appropriate additive constant for the current iteration 98 | */ 99 | function sha1_kt(t) 100 | { 101 | return (t < 20) ? 1518500249 : (t < 40) ? 1859775393 : 102 | (t < 60) ? -1894007588 : -899497514; 103 | } 104 | 105 | /* 106 | * Calculate the HMAC-SHA1 of a key and some data 107 | */ 108 | function core_hmac_sha1(key, data) 109 | { 110 | var bkey = str2binb(key); 111 | if(bkey.length > 16) bkey = core_sha1(bkey, key.length * chrsz); 112 | 113 | var ipad = Array(16), opad = Array(16); 114 | for(var i = 0; i < 16; i++) 115 | { 116 | ipad[i] = bkey[i] ^ 0x36363636; 117 | opad[i] = bkey[i] ^ 0x5C5C5C5C; 118 | } 119 | 120 | var hash = core_sha1(ipad.concat(str2binb(data)), 512 + data.length * chrsz); 121 | return core_sha1(opad.concat(hash), 512 + 160); 122 | } 123 | 124 | /* 125 | * Add integers, wrapping at 2^32. This uses 16-bit operations internally 126 | * to work around bugs in some JS interpreters. 127 | */ 128 | function safe_add(x, y) 129 | { 130 | var lsw = (x & 0xFFFF) + (y & 0xFFFF); 131 | var msw = (x >> 16) + (y >> 16) + (lsw >> 16); 132 | return (msw << 16) | (lsw & 0xFFFF); 133 | } 134 | 135 | /* 136 | * Bitwise rotate a 32-bit number to the left. 137 | */ 138 | function rol(num, cnt) 139 | { 140 | return (num << cnt) | (num >>> (32 - cnt)); 141 | } 142 | 143 | /* 144 | * Convert an 8-bit or 16-bit string to an array of big-endian words 145 | * In 8-bit function, characters >255 have their hi-byte silently ignored. 146 | */ 147 | function str2binb(str) 148 | { 149 | var bin = Array(); 150 | var mask = (1 << chrsz) - 1; 151 | for(var i = 0; i < str.length * chrsz; i += chrsz) 152 | bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (32 - chrsz - i%32); 153 | return bin; 154 | } 155 | 156 | /* 157 | * Convert an array of big-endian words to a string 158 | */ 159 | function binb2str(bin) 160 | { 161 | var str = ""; 162 | var mask = (1 << chrsz) - 1; 163 | for(var i = 0; i < bin.length * 32; i += chrsz) 164 | str += String.fromCharCode((bin[i>>5] >>> (32 - chrsz - i%32)) & mask); 165 | return str; 166 | } 167 | 168 | /* 169 | * Convert an array of big-endian words to a hex string. 170 | */ 171 | function binb2hex(binarray) 172 | { 173 | var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; 174 | var str = ""; 175 | for(var i = 0; i < binarray.length * 4; i++) 176 | { 177 | str += hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8+4)) & 0xF) + 178 | hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8 )) & 0xF); 179 | } 180 | return str; 181 | } 182 | 183 | /* 184 | * Convert an array of big-endian words to a base-64 string 185 | */ 186 | function binb2b64(binarray) 187 | { 188 | var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; 189 | var str = ""; 190 | for(var i = 0; i < binarray.length * 4; i += 3) 191 | { 192 | var triplet = (((binarray[i >> 2] >> 8 * (3 - i %4)) & 0xFF) << 16) 193 | | (((binarray[i+1 >> 2] >> 8 * (3 - (i+1)%4)) & 0xFF) << 8 ) 194 | | ((binarray[i+2 >> 2] >> 8 * (3 - (i+2)%4)) & 0xFF); 195 | for(var j = 0; j < 4; j++) 196 | { 197 | if(i * 8 + j * 6 > binarray.length * 32) str += b64pad; 198 | else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F); 199 | } 200 | } 201 | return str; 202 | } 203 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Notes 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 |
    55 |
    56 |

    Notebooks

    57 | 58 |
      59 |
      60 | 61 | 62 | 63 | 64 |
      65 |
      66 |
      67 |
      68 | menu 69 | 70 | 71 | 72 |

      73 |

      74 | 75 |
      76 |
      77 |
      78 | 79 |
      80 | 81 |
        82 |
        83 |

        84 |
        85 |
        86 |
        87 | Sync 88 | Search 89 | Sort By 90 |
        91 |
        92 | 93 |
        94 |
        95 | 96 | 97 | 98 | 99 |

        100 | 101 |
        102 |
          103 |
        • Type
        • 104 |
        • Attach Photo
        • 105 |
        • Settings
        • 106 |
        • Share
        • 107 |
        • Delete
        • 108 |
        109 |
        110 |

        (Some large images or attachments cannot be downloaded. Note is read only.)

        111 |
        112 |
        113 |
        114 |
          115 |
          116 |

          tap anywhere to start

          117 |
          118 |
          119 |
          120 | Restore 121 | Delete 122 |
          123 |
          124 |
          125 |
          126 | Close 127 | 128 | Delete 129 |
          130 |
          131 |
          132 | 133 |
          134 |
          135 | 136 |

          Note Info

          137 |
          138 |
          139 |
            140 |
            141 |
            142 | 143 |
            144 |
            145 | 146 |

            Settings

            147 |
            148 |
            149 |

            Connected to Evernote

            150 |
            151 |
              152 |
            • Signed in as

            • 153 |
            • Account type

            • 154 |
            • Upload left

            • 155 |
            • Days left

            • 156 |
            • 157 |

              158 | 159 |

              160 |
            • 161 |
            162 | 171 |
            172 |

            Current Monthly Usage

            173 |
            174 |
            175 |
            176 | 177 | -------------------------------------------------------------------------------- /js/db.js: -------------------------------------------------------------------------------- 1 | var DB = new function() { 2 | var self = this, 3 | 4 | indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB, 5 | IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction || window.mozIDBTransaction, 6 | 7 | db = null, 8 | DB_NAME = "EVME_Notes", 9 | DB_VERSION = 5, 10 | 11 | schema = { 12 | "notes": { 13 | "objectName": "Note", 14 | "indexes": ["notebook_id", "name", "guid", "notebookGuid"] 15 | }, 16 | "noteResource": { 17 | "objectName": "NoteResource", 18 | "indexes": ["note_id"] 19 | }, 20 | "notebooks": { 21 | "objectName": "Notebook", 22 | "indexes": ["user_id", "guid", "name"] 23 | }, 24 | "users": { 25 | "objectName": "User" 26 | }, 27 | "queues": { 28 | "objectName": "Queue", 29 | "indexes": ["rel_id"] 30 | } 31 | }; 32 | 33 | this.init = function(onSuccess) { 34 | self.open(onSuccess); 35 | 36 | /* automaticaly create helper methods (like getNotes, or removeNotebook) */ 37 | for (var table in schema) { 38 | var obj = schema[table].objectName; 39 | 40 | (function(tableName, objName) { 41 | self['get' + objName + "s"] = function(filters, c, e) { self.get(tableName, filters, c, e); }; 42 | self['get' + objName + "ByKey"] = function(key, c, e) { self.getByKey(tableName, key, c, e); }; 43 | self['get' + objName + "ByIndex"] = function(index, key, c, e) { self.getByIndex(tableName, index, key, c, e); }; 44 | self['add' + objName] = function(obj, c, e) { self.add(tableName, obj, c, e); }; 45 | self['update' + objName] = function(obj, c, e) { self.update(tableName, obj, c, e); }; 46 | self['remove' + objName] = function(obj, c, e) { self.remove(tableName, obj.getId(), c, e); }; 47 | })(table, obj); 48 | } 49 | }; 50 | 51 | // update multiple objects (update @table set data=@data where filters=@filters) 52 | this.updateMultiple = function(table, filters, data, c, e) { 53 | self.get(table, filters, function(items) { 54 | for (var i=0; i header:first-child { 7 | position: relative; 8 | display: block; 9 | z-index: 10; 10 | padding: 0; 11 | height: 5rem; 12 | border: none; 13 | } 14 | 15 | section[role="region"] > header:first-child h1 { 16 | font-size: 2.3rem; 17 | line-height: 5rem; 18 | white-space: nowrap; 19 | text-overflow: ellipsis; 20 | display: block; 21 | overflow: hidden; 22 | margin: 0; 23 | padding: 0 1rem; 24 | height: 100%; 25 | font-weight: 300; 26 | font-style: italic; 27 | text-align: center; 28 | } 29 | 30 | section[role="region"] > header:first-child h1 em { 31 | font-weight: 400; 32 | font-size: 1.5rem; 33 | line-height: 1em; 34 | font-style: normal; 35 | } 36 | 37 | section[role="region"] > header:first-child menu { 38 | height: 100%; 39 | float: right; 40 | padding: 0; 41 | margin: 0; 42 | } 43 | 44 | /* ---------------------------------- 45 | Buttons 46 | ---------------------------------- */ 47 | 48 | section[role="region"] > header:first-child a, 49 | section[role="region"] > header:first-child button { 50 | box-sizing: border-box; 51 | position: relative; 52 | display: block; 53 | overflow: hidden; 54 | float: left; 55 | min-width: 5rem; 56 | width: auto; 57 | height: 5rem; 58 | border: none; 59 | background: none; 60 | padding: 0 1rem; 61 | margin: 0; 62 | font-weight: 400; 63 | font-size: 1.5rem; 64 | line-height: 5rem; 65 | border-radius: 0; 66 | text-decoration: none; 67 | text-align: center; 68 | text-shadow: none; 69 | font-style: italic; 70 | } 71 | 72 | /* Pressed state */ 73 | section[role="region"] > header:first-child a:focus { 74 | outline: none; 75 | } 76 | 77 | section[role="region"] > header:first-child button::-moz-focus-inner { 78 | outline: none; 79 | border: none; 80 | margin-top: -0.2rem; /* To fix line-height bug (697451) */ 81 | padding: 0; 82 | } 83 | 84 | /* Disabled state */ 85 | section[role="region"] > header:first-child a[aria-disabled="true"], 86 | section[role="region"] > header:first-child button[disabled] { 87 | opacity: 0.3; 88 | pointer-events: none; 89 | } 90 | 91 | /* ---------------------------------- 92 | Icons 93 | ---------------------------------- */ 94 | 95 | section[role="region"] > header:first-child .icon { 96 | display: block; 97 | width: 3rem; 98 | height: 5rem; 99 | background: transparent no-repeat center / 3rem auto; 100 | font-size: 0; 101 | } 102 | 103 | /* ---------------------------------- 104 | Subheader 105 | ---------------------------------- */ 106 | 107 | section[role="region"] > header { 108 | z-index: 0; 109 | height: auto; 110 | } 111 | 112 | section[role="region"] header h2 { 113 | margin: 0; 114 | padding: 0.8rem 3rem; 115 | font-weight: 400; 116 | font-size: 1.5rem; 117 | line-height: 1.8rem; 118 | } 119 | 120 | /* ---------------------------------- 121 | right-to-left 122 | ---------------------------------- */ 123 | 124 | html[dir="rtl"] section[role="region"] > header:first-child menu { 125 | float: left; 126 | } 127 | 128 | html[dir="rtl"] section[role="region"] > header:first-child button, 129 | html[dir="rtl"] section[role="region"] > header:first-child a { 130 | float: right; 131 | } 132 | 133 | html[dir="rtl"] section[role="region"] > header:first-child .icon-back { 134 | transform: rotate(180deg); 135 | } 136 | 137 | /* ----------------------------------------------------------------- 138 | HEADER SKIN: default 139 | Default values in case we are not overriding them using 140 | class="skin-*" 141 | ----------------------------------------------------------------- */ 142 | 143 | section[role="region"] > header:first-child { 144 | color: #fff; 145 | background-color: #f97c17; 146 | } 147 | 148 | section[role="region"] > header:first-child h1 { 149 | color: #fff; 150 | } 151 | 152 | section[role="region"] > header:first-child a, 153 | section[role="region"] > header:first-child button { 154 | color: rgba(0,0,0,0.6); 155 | } 156 | 157 | section[role="region"] > header:first-child a:active, 158 | section[role="region"] > header:first-child button:active, 159 | section[role="region"] > header:first-child a:hover, 160 | section[role="region"] > header:first-child button:hover { 161 | background-color: rgba(0,0,0,0.07); 162 | } 163 | 164 | section[role="region"] > header:first-child a:focus, 165 | section[role="region"] > header:first-child button:focus { 166 | background-color: transparent; 167 | } 168 | 169 | /* ---------------------------------- 170 | Icons 171 | ---------------------------------- */ 172 | 173 | section[role="region"] > header:first-child .icon-add { 174 | background-image: url(headers/images/icons/add.png); 175 | } 176 | 177 | section[role="region"] > header:first-child .icon-compose { 178 | background-image: url(headers/images/icons/compose.png); 179 | } 180 | 181 | section[role="region"] > header:first-child .icon-edit { 182 | background-image: url(headers/images/icons/edit.png); 183 | } 184 | 185 | section[role="region"] > header:first-child .icon-send { 186 | background-image: url(headers/images/icons/send.png); 187 | } 188 | 189 | section[role="region"] > header:first-child .icon-close { 190 | background-image: url(headers/images/icons/close.png); 191 | } 192 | 193 | section[role="region"] > header:first-child .icon-back { 194 | background-image: url(headers/images/icons/back.png); 195 | } 196 | 197 | section[role="region"] > header:first-child .icon-menu { 198 | background-image: url(headers/images/icons/menu.png); 199 | } 200 | 201 | section[role="region"] > header:first-child .icon-user { 202 | background-image: url(headers/images/icons/user.png); 203 | } 204 | 205 | section[role="region"] > header:first-child .icon-up { 206 | background-image: url(headers/images/icons/up.png); 207 | } 208 | 209 | section[role="region"] > header:first-child .icon-down { 210 | background-image: url(headers/images/icons/down.png); 211 | } 212 | 213 | section[role="region"] > header:first-child .icon-options { 214 | background-image: url(headers/images/icons/options.png); 215 | } 216 | 217 | /* ---------------------------------- 218 | Subheader 219 | ---------------------------------- */ 220 | 221 | section[role="region"] header h2 { 222 | color: #424242; 223 | border-bottom: solid 0.1rem #e6e6e6; 224 | } 225 | 226 | /* ----------------------------------------------------------------- 227 | HEADER SKIN: comms 228 | .skin-comms will override default values 229 | ----------------------------------------------------------------- */ 230 | 231 | .skin-comms section[role="region"] > header:first-child, 232 | section[role="region"].skin-comms > header:first-child { 233 | background-color: #00adad; 234 | } 235 | 236 | .skin-comms section[role="region"] > header:first-child a, 237 | .skin-comms section[role="region"] > header:first-child button, 238 | section[role="region"].skin-comms > header:first-child a, 239 | section[role="region"].skin-comms > header:first-child button { 240 | color: rgba(0,0,0,0.5); 241 | } 242 | 243 | .skin-comms section[role="region"] > header:first-child a:active, 244 | .skin-comms section[role="region"] > header:first-child button:active, 245 | .skin-comms section[role="region"] > header:first-child a:hover, 246 | .skin-comms section[role="region"] > header:first-child button:hover, 247 | section[role="region"].skin-comms > header:first-child a:active, 248 | section[role="region"].skin-comms > header:first-child button:active, 249 | section[role="region"].skin-comms > header:first-child a:hover, 250 | section[role="region"].skin-comms > header:first-child button:hover { 251 | background-color: rgba(0,0,0,0.1); 252 | } 253 | 254 | .skin-comms section[role="region"] > header:first-child a:focus, 255 | .skin-comms section[role="region"] > header:first-child button:focus, 256 | section[role="region"].skin-comms > header:first-child a:focus, 257 | section[role="region"].skin-comms > header:first-child button:focus { 258 | background-color: transparent; 259 | } 260 | 261 | /* ----------------------------------------------------------------- 262 | HEADER SKIN: dark 263 | .skin-dark will override default values 264 | ----------------------------------------------------------------- */ 265 | 266 | section[role="region"].skin-dark > header:first-child, 267 | .skin-dark > section[role="region"] > header:first-child { 268 | background-color: #242d33; 269 | } 270 | 271 | .skin-dark section[role="region"] > header:first-child a, 272 | .skin-dark section[role="region"] > header:first-child button, 273 | section[role="region"].skin-dark > header:first-child a, 274 | section[role="region"].skin-dark > header:first-child button { 275 | color: #00aac5; 276 | } 277 | 278 | .skin-dark section[role="region"] > header:first-child a:active, 279 | .skin-dark section[role="region"] > header:first-child button:active, 280 | .skin-dark section[role="region"] > header:first-child a:hover, 281 | .skin-dark section[role="region"] > header:first-child button:hover, 282 | section[role="region"].skin-dark > header:first-child a:active, 283 | section[role="region"].skin-dark > header:first-child button:active, 284 | section[role="region"].skin-dark > header:first-child a:hover, 285 | section[role="region"].skin-dark > header:first-child button:hover { 286 | background-color: rgba(0,0,0,0.4); 287 | } 288 | 289 | .skin-dark section[role="region"] > header:first-child a:focus, 290 | .skin-dark section[role="region"] > header:first-child button:focus, 291 | section[role="region"].skin-dark > header:first-child a:focus, 292 | section[role="region"].skin-dark > header:first-child button:focus { 293 | background-color: transparent; 294 | } 295 | 296 | section[role="region"].skin-dark header h2, 297 | .skin-dark > section[role="region"] header h2 { 298 | background-color: #2c353b; 299 | color: #fff; 300 | border: none; 301 | } 302 | 303 | /* ----------------------------------------------------------------- 304 | HEADER SKIN: organic 305 | .skin-organic will override default values 306 | ----------------------------------------------------------------- */ 307 | 308 | section[role="region"].skin-organic > header:first-child, 309 | .skin-organic section[role="region"] > header:first-child { 310 | color: #868692; 311 | background-color: #f4f4f4; 312 | } 313 | 314 | section[role="region"].skin-organic > header:first-child h1, 315 | .skin-organic section[role="region"] > header:first-child h1 { 316 | color: #868692; 317 | } 318 | 319 | section[role="region"].skin-organic > header:first-child a, 320 | section[role="region"].skin-organic > header:first-child button, 321 | .skin-organic section[role="region"] > header:first-child a, 322 | .skin-organic section[role="region"] > header:first-child button { 323 | color: #00aac5; 324 | } 325 | 326 | section[role="region"].skin-organic > header:first-child a:focus, 327 | section[role="region"].skin-organic > header:first-child button:focus, 328 | .skin-organic section[role="region"] > header:first-child a:focus, 329 | .skin-organic section[role="region"] > header:first-child button:focus { 330 | background-color: transparent; 331 | } 332 | 333 | /* ---------------------------------- 334 | Icons 335 | ---------------------------------- */ 336 | 337 | section[role="region"].skin-organic > header:first-child .icon-back, 338 | .skin-organic section[role="region"] > header:first-child .icon-back { 339 | background-image: url(headers/images/icons/organic/back.png); 340 | } 341 | 342 | section[role="region"].skin-organic > header:first-child .icon-close, 343 | .skin-organic section[role="region"] > header:first-child .icon-close { 344 | background-image: url(headers/images/icons/organic/close.png); 345 | } 346 | 347 | section[role="region"].skin-organic > header:first-child .icon-add, 348 | .skin-organic section[role="region"] > header:first-child .icon-add { 349 | background-image: url(headers/images/icons/organic/add.png); 350 | } 351 | 352 | section[role="region"].skin-organic > header:first-child .icon-edit, 353 | .skin-organic section[role="region"] > header:first-child .icon-edit { 354 | background-image: url(headers/images/icons/organic/edit.png); 355 | } 356 | 357 | /* ---------------------------------- 358 | Subheader 359 | ---------------------------------- */ 360 | 361 | section[role="region"].skin-organic header h2, 362 | .skin-organic section[role="region"] header h2 { 363 | background-color: #e7e7e7; 364 | color: #4d4d4d; 365 | border: none; 366 | } 367 | -------------------------------------------------------------------------------- /shared/js/font_size_utils.js: -------------------------------------------------------------------------------- 1 | /* jshint -W083 */ 2 | 3 | (function(exports) { 4 | 'use strict'; 5 | 6 | /** 7 | * Allowable font sizes for header elements. 8 | */ 9 | const HEADER_SIZES = [ 10 | 16, 17, 18, 19, 20, 21, 22, 23 11 | ]; 12 | 13 | /** 14 | * Utility functions for measuring and manipulating font sizes 15 | */ 16 | var FontSizeUtils = { 17 | 18 | /** 19 | * Keep a cache of canvas contexts with a given font. 20 | * We do this because it is faster to create new canvases 21 | * than to re-set the font on existing contexts repeatedly. 22 | */ 23 | _cachedContexts: {}, 24 | 25 | /** 26 | * Grab or create a cached canvas context for a given fontSize/family pair. 27 | * @todo Add font-weight as a new dimension for caching. 28 | * 29 | * @param {Integer} fontSize The font size of the canvas we want. 30 | * @param {String} fontFamily The font family of the canvas we want. 31 | * @param {String} fontStyle The style of the font (default to italic). 32 | * @return {CanvasRenderingContext2D} A context with the specified font. 33 | */ 34 | _getCachedContext: function(fontSize, fontFamily, fontStyle) { 35 | // Default to italic style since this code is only ever used 36 | // by headers right now and header text is always italic. 37 | fontStyle = fontStyle || 'italic'; 38 | 39 | var cache = this._cachedContexts; 40 | var ctx = cache[fontSize] && cache[fontSize][fontFamily] ? 41 | cache[fontSize][fontFamily][fontStyle] : null; 42 | 43 | if (!ctx) { 44 | var canvas = document.createElement('canvas'); 45 | canvas.setAttribute('moz-opaque', 'true'); 46 | canvas.setAttribute('width', '1'); 47 | canvas.setAttribute('height', '1'); 48 | 49 | ctx = canvas.getContext('2d', { willReadFrequently: true }); 50 | ctx.font = fontStyle + ' ' + fontSize + 'px ' + fontFamily; 51 | 52 | // Populate the contexts cache. 53 | if (!cache[fontSize]) { 54 | cache[fontSize] = {}; 55 | } 56 | if (!cache[fontSize][fontFamily]) { 57 | cache[fontSize][fontFamily] = {}; 58 | } 59 | cache[fontSize][fontFamily][fontStyle] = ctx; 60 | } 61 | 62 | return ctx; 63 | }, 64 | 65 | /** 66 | * Clear any current canvas contexts from the cache. 67 | */ 68 | resetCache: function() { 69 | this._cachedContexts = {}; 70 | }, 71 | 72 | /** 73 | * Use a single observer for all text changes we are interested in. 74 | */ 75 | _textChangeObserver: null, 76 | 77 | /** 78 | * Auto resize all text changes. 79 | * @param {Array} mutations A MutationRecord list. 80 | */ 81 | _handleTextChanges: function(mutations) { 82 | for (var i = 0; i < mutations.length; i++) { 83 | this._reformatHeaderText(mutations[i].target); 84 | } 85 | }, 86 | 87 | /** 88 | * Singleton-like interface for getting our text change observer. 89 | * By reusing the observer, we make sure we only ever attach a 90 | * single observer to any given element we are interested in. 91 | */ 92 | _getTextChangeObserver: function() { 93 | if (!this._textChangeObserver) { 94 | this._textChangeObserver = new MutationObserver( 95 | this._handleTextChanges.bind(this)); 96 | } 97 | return this._textChangeObserver; 98 | }, 99 | 100 | /** 101 | * Perform auto-resize when textContent changes on element. 102 | * 103 | * @param {HTMLElement} element The element to observer for changes 104 | */ 105 | _observeHeaderChanges: function(element) { 106 | var observer = this._getTextChangeObserver(); 107 | // Listen for any changes in the child nodes of the header. 108 | observer.observe(element, { childList: true }); 109 | }, 110 | 111 | /** 112 | * Resize and reposition the header text based on string length and 113 | * container position. 114 | * 115 | * @param {HTMLElement} header h1 text inside header to reformat. 116 | */ 117 | _reformatHeaderText: function(header) { 118 | // Skip resize logic if header has no content, ie before localization. 119 | if (header.textContent.trim() === '') { 120 | return; 121 | } 122 | 123 | // Reset our centering styles. 124 | this.resetCentering(header); 125 | 126 | // Cache the element style properites to avoid reflows. 127 | var style = this.getStyleProperties(header); 128 | 129 | // Perform auto-resize and center. 130 | style.textWidth = this.autoResizeElement(header, style); 131 | this.centerTextToScreen(header, style); 132 | }, 133 | 134 | /** 135 | * Reformat all the headers located inside a DOM node, and add mutation 136 | * observer to reformat when any changes are made. 137 | * 138 | * @param {HTMLElement} domNode 139 | */ 140 | _registerHeadersInSubtree: function(domNode) { 141 | if (!domNode) { 142 | return; 143 | } 144 | 145 | var headers = domNode.querySelectorAll('header > h1'); 146 | for (var i = 0; i < headers.length; i++) { 147 | // On some apps wrapping inside a requestAnimationFrame reduces the 148 | // number of calls to _reformatHeaderText(). 149 | window.requestAnimationFrame(function(header) { 150 | this._reformatHeaderText(header); 151 | this._observeHeaderChanges(header); 152 | }.bind(this, headers[i])); 153 | } 154 | }, 155 | 156 | /** 157 | * Get the width of a string in pixels, given its fontSize and fontFamily. 158 | * 159 | * @param {String} string The string we are measuring. 160 | * @param {Integer} fontSize The size of the font to measure against. 161 | * @param {String} fontFamily The font family to measure against. 162 | * @param {String} fontStyle The style of the font (default to italic). 163 | * @return {Integer} The pixel width of the string with the given font. 164 | */ 165 | getFontWidth: function(string, fontSize, fontFamily, fontStyle) { 166 | var ctx = this._getCachedContext(fontSize, fontFamily, fontStyle); 167 | return ctx.measureText(string).width; 168 | }, 169 | 170 | /** 171 | * Get the maximum allowable fontSize for a string such that it will 172 | * not overflow past a maximum width. 173 | * 174 | * @param {String} string The string for which to check max font size. 175 | * @param {Array} allowedSizes A list of fontSizes allowed. 176 | * @param {String} fontFamily The font family of the string we're measuring. 177 | * @param {Integer} maxWidth The maximum number of pixels before overflow. 178 | * @return {Object} Dict containing fontSize, overflow and textWidth. 179 | */ 180 | getMaxFontSizeInfo: function(string, allowedSizes, fontFamily, maxWidth) { 181 | var fontSize; 182 | var resultWidth; 183 | var i = allowedSizes.length - 1; 184 | 185 | do { 186 | fontSize = allowedSizes[i]; 187 | resultWidth = this.getFontWidth(string, fontSize, fontFamily); 188 | i--; 189 | } while (resultWidth > maxWidth && i >= 0); 190 | 191 | return { 192 | fontSize: fontSize, 193 | overflow: resultWidth > maxWidth, 194 | textWidth: resultWidth 195 | }; 196 | }, 197 | 198 | /** 199 | * Get the amount of characters truncated from overflow ellipses. 200 | * 201 | * @param {String} string The string for which to check max font size. 202 | * @param {Integer} fontSize The font size of the string we are measuring. 203 | * @param {String} fontFamily The font family of the string we're measuring. 204 | * @param {Integer} maxWidth The maximum number of pixels before overflow. 205 | */ 206 | getOverflowCount: function(string, fontSize, fontFamily, maxWidth) { 207 | var substring; 208 | var resultWidth; 209 | var overflowCount = -1; 210 | 211 | do { 212 | overflowCount++; 213 | substring = string.substr(0, string.length - overflowCount); 214 | resultWidth = this.getFontWidth(substring, fontSize, fontFamily); 215 | } while (substring.length > 0 && resultWidth > maxWidth); 216 | 217 | return overflowCount; 218 | }, 219 | 220 | /** 221 | * Get an array of allowed font sizes for an element 222 | * 223 | * @param {HTMLElement} element The element to get allowed sizes for. 224 | * @return {Array} An array containing pizels values of allowed sizes. 225 | */ 226 | getAllowedSizes: function(element) { 227 | if (element.tagName === 'H1' && element.parentNode.tagName === 'HEADER') { 228 | return HEADER_SIZES; 229 | } 230 | // No allowed sizes for this element, so return empty array. 231 | return []; 232 | }, 233 | 234 | /** 235 | * Get an element's content width disregarding its box model sizing. 236 | * 237 | * @param {HTMLElement|Object} HTML element, or style object. 238 | * @returns {Number} width in pixels of elements content. 239 | */ 240 | getContentWidth: function(style) { 241 | var width = parseInt(style.width, 10); 242 | if (style.boxSizing === 'border-box') { 243 | width -= (parseInt(style.paddingRight, 10) + 244 | parseInt(style.paddingLeft, 10)); 245 | } 246 | return width; 247 | }, 248 | 249 | /** 250 | * Get an element's style properies. 251 | * 252 | * @param {HTMLElement} element The element from which to fetch style. 253 | * @return {Object} A dictionary containing element's style properties. 254 | */ 255 | getStyleProperties: function(element) { 256 | var style = window.getComputedStyle(element); 257 | var contentWidth = this.getContentWidth(style); 258 | if (isNaN(contentWidth)) { 259 | contentWidth = 0; 260 | } 261 | 262 | return { 263 | fontFamily: style.fontFamily, 264 | contentWidth: contentWidth, 265 | paddingRight: parseInt(style.paddingRight, 10), 266 | paddingLeft: parseInt(style.paddingLeft, 10), 267 | offsetLeft: element.offsetLeft 268 | }; 269 | }, 270 | 271 | /** 272 | * Auto resize element's font to fit its content width. 273 | * 274 | * @param {HTMLElement} element The element to perform auto-resize on. 275 | * @param {Object} styleOptions Dictionary containing cached style props, 276 | * to avoid reflows caused by grabbing style properties. 277 | * @return {Integer} The pixel width of the resized text. 278 | */ 279 | autoResizeElement: function(element, styleOptions) { 280 | var allowedSizes = this.getAllowedSizes(element); 281 | if (allowedSizes.length === 0) { 282 | return 0; 283 | } 284 | 285 | var contentWidth = styleOptions.contentWidth || 286 | this.getContentWidth(element); 287 | 288 | var fontFamily = styleOptions.fontFamily || 289 | getComputedStyle(element).fontFamily; 290 | 291 | var info = this.getMaxFontSizeInfo( 292 | element.textContent, 293 | allowedSizes, 294 | fontFamily, 295 | contentWidth 296 | ); 297 | 298 | element.style.fontSize = info.fontSize + 'px'; 299 | 300 | return info.textWidth; 301 | }, 302 | 303 | /** 304 | * Reset the auto-centering styling on an element. 305 | * 306 | * @param {HTMLElement} element The element to reset. 307 | */ 308 | resetCentering: function(element) { 309 | // We need to set the lateral margins to 0 to be able to measure the 310 | // element width properly. All previously set values are ignored. 311 | element.style.marginLeft = element.style.marginRight = '0'; 312 | }, 313 | 314 | /** 315 | * Center an elements text based on screen position rather than container. 316 | * 317 | * @param {HTMLElement} element The element whose text we want to center. 318 | * @param {Object} styleOptions Dictionary containing cached style props, 319 | * avoids reflows caused by caching style properties. 320 | */ 321 | centerTextToScreen: function(element, styleOptions) { 322 | // Calculate the minimum amount of space needed for the header text 323 | // to be displayed without overflowing its content box. 324 | var minHeaderWidth = styleOptions.textWidth + styleOptions.paddingRight + 325 | styleOptions.paddingLeft; 326 | 327 | // Get the amount of space on each side of the header text element. 328 | var sideSpaceLeft = styleOptions.offsetLeft; 329 | var sideSpaceRight = this.getWindowWidth() - sideSpaceLeft - 330 | styleOptions.contentWidth - styleOptions.paddingRight - 331 | styleOptions.paddingLeft; 332 | 333 | // If both margins have the same width, the header is already centered. 334 | if (sideSpaceLeft === sideSpaceRight) { 335 | return; 336 | } 337 | 338 | // To center, we need to make sure the space to the left of the header 339 | // is the same as the space to the right, so take the largest of the two. 340 | var margin = Math.max(sideSpaceLeft, sideSpaceRight); 341 | 342 | // If the minimum amount of space our header needs plus the max margins 343 | // fits inside the width of the window, we can center this header. 344 | // We subtract 1 pixels to wrap text like Gecko. 345 | // See https://bugzil.la/1026955 346 | if (minHeaderWidth + (margin * 2) < this.getWindowWidth() - 1) { 347 | element.style.marginLeft = element.style.marginRight = margin + 'px'; 348 | } 349 | }, 350 | 351 | _initHeaderFormatting: function() { 352 | if (navigator.mozL10n) { 353 | // When l10n is ready, register all displayed headers for formatting. 354 | navigator.mozL10n.once(function() { 355 | this._registerHeadersInSubtree(document.body); 356 | }.bind(this)); 357 | } else { 358 | this._registerHeadersInSubtree(document.body); 359 | } 360 | }, 361 | 362 | /** 363 | * Initialize the FontSizeUtils, add overflow handler and perform 364 | * auto resize once strings have been localized. 365 | */ 366 | init: function() { 367 | // Listen for lazy loaded DOM to register new headers. 368 | window.addEventListener('lazyload', function(evt) { 369 | this._registerHeadersInSubtree(evt.detail); 370 | }.bind(this)); 371 | 372 | // Once document is ready, format any headers already in the DOM. 373 | if (document.readyState === 'loading') { 374 | window.addEventListener('DOMContentLoaded', function() { 375 | this._initHeaderFormatting(); 376 | }.bind(this)); 377 | } else { 378 | this._initHeaderFormatting(); 379 | } 380 | }, 381 | 382 | /** 383 | * Cache and return the width of the inner window. 384 | * 385 | * @return {Integer} The width of the inner window in pixels. 386 | */ 387 | getWindowWidth: function() { 388 | return window.innerWidth; 389 | } 390 | }; 391 | 392 | FontSizeUtils.init(); 393 | alert("sss"); 394 | 395 | exports.FontSizeUtils = FontSizeUtils; 396 | }(this)); 397 | -------------------------------------------------------------------------------- /shared/style/progress_activity/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Progress & Activity Indicators 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 60 | 61 | 62 | 63 | 64 |
            65 |

            Spinner

            66 | 67 | 68 |

            Activity bar

            69 | 70 | 71 |

            Progress steps

            72 |

            73 | 74 |

            75 | 76 |

            Progress bar

            77 | 78 | 79 |

            Progress + activity bar

            80 | 81 |
            82 | 83 |

            Progress bar + Confirm BB

            84 |
            85 |
            86 |

            Name of the action

            87 |

            88 | 89 |

            90 |
            91 | 92 | 93 | 94 |
            95 | 96 |
            97 | 98 |
            99 |
            100 |

            Name of the action

            101 |

            102 | 80% 103 | 104 |

            105 |
            106 | 107 | 108 | 109 |
            110 | 111 | 112 |

            Progress bar in Headers

            113 |
            114 |
            115 | back 116 |

            Song title

            117 |
            118 | 119 |
            120 |

            Subheader text

            121 |
            122 |
            123 | 124 |
            125 |
            126 | back 127 |

            Song title

            128 |
            129 | 130 |
            131 |

            Subheader text

            132 |
            133 |
            134 | 135 |

            Activity bar in Headers

            136 |
            137 | 138 | 139 | 140 | -------------------------------------------------------------------------------- /js/models.js: -------------------------------------------------------------------------------- 1 | var Models = new function() { 2 | this.User = function(initOptions) { 3 | var self = this; 4 | 5 | this.data_id = ""; 6 | this.data_username = ""; 7 | this.data_name = ""; 8 | this.data_date_created = ""; 9 | this.data_metadata = {}; 10 | this.data_last_update_count = 0; 11 | this.data_last_sync_time = 0; 12 | this.data_oauth_token = ""; 13 | this.data_note_store_url = ""; 14 | this.data_shard_url = ""; 15 | this.data_expires = 0; 16 | this.data_sync_try_count = 0; 17 | this.data_migration_complete = false; 18 | 19 | function init(options) { 20 | updateObject(self, options); 21 | validate(); 22 | } 23 | 24 | this.set = function(options, cbSuccess, cbError) { 25 | updateObject(self, options); 26 | validate(); 27 | 28 | DB.updateUser(self, cbSuccess, cbError); 29 | 30 | return self; 31 | }; 32 | 33 | this.newNotebook = function(options, cbSuccess, cbError) { 34 | options.user_id = self.getId(); 35 | 36 | var notebook = new Models.Notebook(options); 37 | DB.addNotebook(notebook, function(){ 38 | cbSuccess && cbSuccess(notebook); 39 | }); 40 | }; 41 | 42 | this.getNotebooks = function(cbSuccess, cbError) { 43 | DB.getNotebooks({"user_id": self.data_id, "trashed": false}, cbSuccess, cbError); 44 | }; 45 | 46 | this.getTrashedNotes = function(cbSuccess, cbError) { 47 | DB.getNotes({"trashed": true}, cbSuccess, cbError); 48 | }; 49 | 50 | this.getNotes = function(filters, cbSuccess, cbError) { 51 | DB.getNotes(filters, cbSuccess, cbError); 52 | }; 53 | 54 | this.isValidEvernoteUser = function() { 55 | return (self.data_migration_complete && self.getOauthToken() && self.getNoteStoreUrl() && self.getExpires() > new Date().getTime()); 56 | }; 57 | 58 | this.getId = function() { return self.data_id; }; 59 | this.getUsername = function() { return self.data_username; }; 60 | this.getPrivilege = function() { return self.data_privilege; }; 61 | this.getEmail = function() { return self.data_email; }; 62 | this.getDateCreated = function() { return self.data_date_created; }; 63 | this.getOauthToken = function() { return self.data_oauth_token; }; 64 | this.getNoteStoreUrl = function() { return self.data_note_store_url; }; 65 | this.getShardUrl = function() { return self.data_shard_url; }; 66 | this.getExpires = function() { return self.data_expires; }; 67 | this.getLastUpdateCount = function() { return self.data_last_update_count; }; 68 | this.getLastSyncTime = function() { return self.data_last_sync_time; }; 69 | this.getAccounting = function() { return self.data_accounting; }; 70 | this.getSyncTryCount = function() { return self.data_sync_try_count; }; 71 | 72 | this.export = function() { 73 | return exportModel(self); 74 | }; 75 | 76 | function validate() { 77 | if (!self.data_id) { 78 | self.data_id = "user_" + Math.round(Math.random()*100000); 79 | } 80 | 81 | if (!self.data_date_created) { 82 | self.data_date_created = new Date().getTime(); 83 | } 84 | } 85 | 86 | init(initOptions); 87 | }; 88 | 89 | this.Notebook = function(initOptions) { 90 | var self = this; 91 | 92 | this.data_id = ""; 93 | this.data_name = ""; 94 | this.data_user_id = ""; 95 | this.data_date_created = ""; 96 | this.data_date_updated = ""; 97 | this.data_metadata = {}; 98 | this.data_trashed = false; 99 | this.data_numberOfNotes = 0; 100 | this.data_numberOfTrashedNotes = 0; 101 | 102 | function init(options) { 103 | updateObject(self, options); 104 | validate(); 105 | } 106 | 107 | this.set = function(options, cbSuccess, cbError) { 108 | updateObject(self, options); 109 | validate(); 110 | 111 | DB.updateNotebook(self, cbSuccess, cbError); 112 | 113 | return self; 114 | }; 115 | 116 | this.newNote = function(options, cbSuccess, cbError) { 117 | if (!options) { 118 | options = {}; 119 | } 120 | 121 | options.notebook_id = self.getId(); 122 | 123 | var note = new Models.Note(options); 124 | DB.addNote(note, function onSuccess(){ 125 | self.updateNotesCount(1, 0, function onSuccess() { 126 | cbSuccess && cbSuccess(note); 127 | }, cbError); 128 | }, cbError); 129 | }; 130 | 131 | this.getNotes = function(bIncludeTrashed, cbSuccess, cbError) { 132 | var filters = { 133 | "notebook_id": self.getId() 134 | }; 135 | if (!bIncludeTrashed) { 136 | filters.trashed = false; 137 | } 138 | 139 | DB.getNotes(filters, cbSuccess, cbError); 140 | 141 | return self; 142 | }; 143 | this.getTrashedNotes = function(cbSuccess, cbError) { 144 | var filters = { 145 | "notebook_id": self.getId(), 146 | "trashed": true 147 | }; 148 | 149 | DB.getNotes(filters, cbSuccess, cbError); 150 | 151 | return self; 152 | }; 153 | 154 | this.remove = function(cbSuccess, cbError) { 155 | DB.removeNotebook(self, cbSuccess, cbError); 156 | }; 157 | 158 | this.updateNotesCount = function(delta, trashedDelta, cbSuccess, cbError, options) { 159 | if (!options) { 160 | options = {}; 161 | } 162 | 163 | options.numberOfNotes = self.data_numberOfNotes + delta; 164 | options.numberOfTrashedNotes = self.data_numberOfTrashedNotes + trashedDelta; 165 | self.set(options, cbSuccess, cbError); 166 | 167 | /* self.getNotes(true, function(notes) { 168 | options.numberOfNotes = 0; 169 | options.numberOfTrashedNotes = 0; 170 | 171 | for (var i=0; i') == -1) { 239 | options.content = Evernote.html2enml(options.content); 240 | } 241 | html_content = ""; 242 | } 243 | 244 | updateObject(self, options); 245 | validate(); 246 | 247 | if (options["data_date_updated"] == null && options["date_updated"] == null) { 248 | self.data_date_updated = new Date().getTime(); 249 | } 250 | 251 | DB.updateNote(self, cbSuccess, cbError); 252 | 253 | return self; 254 | }; 255 | 256 | this.trash = function(cbSuccess, cbError) { 257 | if (self.data_trashed) return; 258 | 259 | self.set({ 260 | "trashed": true, 261 | "active": false 262 | }, function onSuccess() { 263 | self.updateNotebookNotesCount(-1, 1, cbSuccess, cbError); 264 | }, cbError); 265 | }; 266 | 267 | this.restore = function(cbSuccess, cbError) { 268 | if (!self.data_trashed) return; 269 | 270 | var args = [ 271 | { 272 | "trashed": false, 273 | "active": true 274 | }, 275 | function onSuccess() { 276 | self.updateNotebookNotesCount(1, -1, cbSuccess, cbError, {"trashed": false}); 277 | }, 278 | cbError 279 | ]; 280 | 281 | if (!self.getNotebookId()) { 282 | DB.getNotebooks({}, function(notebooks){ 283 | args[0].notebook_id = notebooks[0].getId(); 284 | self.set.apply(self, args); 285 | }); 286 | } else { 287 | self.set.apply(self, args); 288 | } 289 | }; 290 | 291 | this.remove = function(cbSuccess, cbError) { 292 | DB.removeNote(self, function() { 293 | if (self.data_trashed) { 294 | self.updateNotebookNotesCount(0, -1, cbSuccess, cbError); 295 | } else { 296 | self.updateNotebookNotesCount(-1, 0, cbSuccess, cbError); 297 | } 298 | }, cbError); 299 | }; 300 | 301 | this.getNotebook = function(cbSuccess, cbError) { 302 | DB.getNotebookByKey(self.getNotebookId(), function(notebook){ 303 | cbSuccess && cbSuccess(notebook); 304 | }, cbError); 305 | }; 306 | 307 | this.updateNotebookNotesCount = function(delta, trashedDelta, cbSuccess, cbError, additionalOptions) { 308 | self.getNotebook(function(notebook){ 309 | notebook.updateNotesCount(delta, trashedDelta, cbSuccess, cbError, additionalOptions); 310 | }, cbError); 311 | }; 312 | 313 | 314 | this.getResources = function() { 315 | return self.data_resources; 316 | }; 317 | 318 | this.newResource = function(options, cbSuccess, cbError) { 319 | if (!self.data_resources) { 320 | self.data_resources = []; 321 | } 322 | self.data_resources.push(new Resource({ 323 | noteGuid : self.getGuid(), 324 | mime : options.mime, 325 | data : new Data({ 326 | body : options.buffer, 327 | bodyHash : options.hash, 328 | size : options.size 329 | }), 330 | attributes : new ResourceAttributes({ 331 | fileName : options.name 332 | }) 333 | })); 334 | 335 | self.set({ 336 | resources : self.getResources() 337 | }, cbSuccess, cbError); 338 | }; 339 | 340 | this.updateResourceData = function(guid, data, cbSuccess, cbError) { 341 | if (!self.data_resources) { 342 | return; 343 | } 344 | for (var i = 0, l = self.data_resources.length; i < l; i++) { 345 | if (self.data_resources[i].guid === guid) { 346 | self.data_resources[i].data.body = data; 347 | } 348 | } 349 | self.set({ 350 | resources : self.getResources() 351 | }, cbSuccess, cbError); 352 | }; 353 | 354 | this.updateContent = function(data, cbSuccess, cbError) { 355 | self.set({ 356 | content : data 357 | }, cbSuccess, cbError) 358 | }; 359 | 360 | this.isMissingResourceData = function() { 361 | if (!self.data_resources) { 362 | return false; 363 | } 364 | for (var i = 0, l = self.data_resources.length; i < l; i++) { 365 | if (self.data_resources[i].data.body == null) { 366 | return true; 367 | } 368 | } 369 | return false; 370 | }; 371 | 372 | this.getContent = function(html, loadResources) { 373 | if (html) { 374 | if (html_content.length == 0) { 375 | html_content = Evernote.enml2html(self, loadResources); 376 | } 377 | return html_content; 378 | } 379 | return self.data_content; 380 | }; 381 | 382 | this.getId = function() { return self.data_id; }; 383 | this.getGuid = function() { return self.data_guid; }; 384 | this.getName = function() { return self.data_title; }; 385 | this.getDateCreated = function() { return self.data_date_created; }; 386 | this.getDateUpdated = function() { return self.data_date_updated; }; 387 | this.getNotebookId = function() { return self.data_notebook_id; }; 388 | this.getNotebookGuid = function() { return self.data_notebookGuid; }; 389 | this.isTrashed = function() { return self.data_trashed; }; 390 | this.isActive = function() { return self.data_active; }; 391 | 392 | this.export = function() { 393 | return exportModel(self); 394 | }; 395 | 396 | function validate() { 397 | if (!self.data_id) { 398 | self.data_id = "note_" + new Date().getTime() + "_" + Math.round(Math.random()*100000); 399 | } 400 | 401 | if (!self.data_date_created) { 402 | self.data_date_created = new Date().getTime(); 403 | } 404 | 405 | if (!self.data_date_updated) { 406 | self.data_date_updated = new Date().getTime(); 407 | } 408 | } 409 | 410 | init(initOptions); 411 | }; 412 | 413 | this.Queue = function(initOptions) { 414 | var self = this; 415 | 416 | this.data_id = ""; 417 | this.data_rel = ""; 418 | this.data_rel_id = ""; 419 | this.data_rel_guid = ""; 420 | this.data_expunge = false; 421 | 422 | function init(options) { 423 | updateObject(self, options); 424 | validate(); 425 | 426 | return self; 427 | } 428 | 429 | this.set = function(cbSuccess, cbError) { 430 | DB.getQueues({ 431 | rel_id: self.getRelId(), 432 | rel: self.getRel() 433 | }, function(results){ 434 | if (results.length == 0) { 435 | DB.addQueue(self, cbSuccess, cbError); 436 | } else { 437 | self.setId(results[0].getId()); 438 | DB.updateQueue(self, cbSuccess, cbError); 439 | } 440 | }); 441 | 442 | return self; 443 | }; 444 | 445 | this.remove = function(cbSuccess, cbError) { 446 | DB.removeQueue(self, cbSuccess, cbError); 447 | 448 | return self; 449 | }; 450 | 451 | this.getId = function() { return self.data_id; }; 452 | this.getRel = function() { return self.data_rel; }; 453 | this.getRelId = function() { return self.data_rel_id; }; 454 | this.getRelGuid = function() { return self.data_rel_guid; }; 455 | this.getExpunge = function() { return self.data_expunge; }; 456 | 457 | this.setId = function(id) { self.data_id = id; }; 458 | 459 | this.export = function() { 460 | return exportModel(self); 461 | }; 462 | 463 | function validate() { 464 | if (!self.data_id) { 465 | self.data_id = "queue_" + new Date().getTime() + "_" + Math.round(Math.random()*100000); 466 | } 467 | } 468 | 469 | init(initOptions); 470 | }; 471 | 472 | this.NoteResource = function(initOptions) { 473 | var self = this; 474 | 475 | this.data_id = ''; 476 | this.data_name = ''; 477 | this.data_src = ''; 478 | this.data_size = -1; 479 | this.data_type = ''; 480 | this.data_noteId = ''; 481 | this.data_metadata = {}; 482 | 483 | function init(options) { 484 | updateObject(self, options); 485 | } 486 | 487 | this.getId = function() { return self.data_id; }; 488 | this.getName = function() { return self.data_name; }; 489 | this.getSrc = function() { return self.data_src; }; 490 | this.getSize = function() { return self.data_size; }; 491 | this.getType = function() { return self.data_type; }; 492 | this.getNoteId = function() { return self.data_noteId; }; 493 | 494 | init(initOptions); 495 | }; 496 | }; 497 | 498 | var ResourceTypes = { 499 | "IMAGE": "image" 500 | }; 501 | 502 | function updateObject(obj, options) { 503 | if (!options) return; 504 | if (options["created"]) { 505 | options["date_created"] = options["created"]; 506 | } 507 | if (options["updated"]) { 508 | options["date_updated"] = options["updated"]; 509 | } 510 | for (var k in options) { 511 | if (k.indexOf('data_') !== -1) { 512 | key = k; 513 | } else { 514 | key = 'data_' + k; 515 | } 516 | obj[key] = options[k]; 517 | } 518 | } 519 | 520 | function exportModel(obj) { 521 | var expObj = {}; 522 | for (var key in obj) { 523 | if (typeof obj[key] !== "function" && typeof obj[key] !== "undefined") { 524 | expObj[key.replace('data_', '')] = obj[key]; 525 | } 526 | } 527 | return expObj; 528 | } --------------------------------------------------------------------------------