Commit graph

725 commits

Author SHA1 Message Date
Dan Stillman
1bf13aaa1a Part of auto-sync support 2008-06-30 01:01:53 +00:00
Dan Stillman
96a388137f Basic auto-sync support -- timer reset to 15 seconds after each data operation 2008-06-30 00:56:31 +00:00
Dan Stillman
fd0a5a7972 Closes #1038, Migrate Quick Start Guide item ID 2008-06-26 18:34:16 +00:00
Dan Stillman
0aa7379fb3 Fix upgrade problem with attachment dirs beginning with numbers 2008-06-26 16:38:22 +00:00
Dan Stillman
75682596df Fix a few potential attachment errors 2008-06-26 04:14:02 +00:00
Dan Stillman
012229552e Closes #1036, Migrate storage directory folders to secondary keys
Also moves orphaned directories into orphaned-files folder in data dir

Safety first: Keeps track of moved files, moving them back if there's an error before the end of the upgrade process (since the keys are generated randomly and would be different if recreated), and creates a zotero.moved-files.36.bak file with a list of id/key pairs
2008-06-25 22:27:35 +00:00
Dan Stillman
08279f3ff2 Add REGEXP SQLite UDF
SQLite automatically uses this function for the "foo REGEX '/[a-z]+/'" syntax
2008-06-25 22:22:52 +00:00
Dan Stillman
9f441140f6 Drop fulltextWords index after checking for duplicates from corruption 2008-06-25 04:14:17 +00:00
Dan Stillman
8e9b5e6d36 Reverting r2903, since it's not necessary, and, unless we decide to cast automatically in all the ZU functions, we should stay consistent 2008-06-25 01:18:10 +00:00
Dan Stillman
d61914f8c7 Closes #1048, Convert all values to strings in serialize() 2008-06-25 01:11:22 +00:00
Dan Stillman
3d725141b6 Don't put quotes around numbers in varDump() (used in debug()) 2008-06-25 01:07:35 +00:00
Dan Stillman
33de40ad95 Adds sync support for related items
Might fix (or break) other stuff, but who remembers?
2008-06-25 00:26:55 +00:00
Dan Stillman
19b08a604a Drop redundant index on fulltextWords 2008-06-25 00:22:25 +00:00
Dan Stillman
245954b876 Add extensions.zotero.dbLockExclusive pref to control SQLite exclusive locking (default true)
Set to false to allow external access while Firefox is running
2008-06-25 00:21:37 +00:00
Dan Stillman
9c0d6069f1 Speed up Ben's levenshtein() by factor of 3 by caching length properties (didn't look at algorithm itself) 2008-06-25 00:19:41 +00:00
Dan Stillman
47137121c1 Move levenshtein() and min3() into Zotero.Utilities 2008-06-23 20:33:57 +00:00
Dan Stillman
cf34397d9e Implements levenshtein as SQLite UDF
Function from Ben
2008-06-23 20:28:42 +00:00
Dan Stillman
35318a070e Add a comment pointing to Bugzilla before first use of "with ({});" 2008-06-23 16:53:04 +00:00
Dan Stillman
6f960f3e91 Fix typo 2008-06-23 16:47:41 +00:00
Simon Kornblith
0c2c8000e3 Remove globally scoped namespace declaration from cite.js (oops) 2008-06-23 16:37:08 +00:00
Simon Kornblith
ef2ff0a884 closes #1043, store EndNote® styles as binary blobs
closes #1046, Provide some indicator of whether style is originally from EndNote
will require that you re-import previously imported styles
2008-06-22 17:16:43 +00:00
Dan Stillman
4525afddc5 Addresses #1047, Timeline items not displaying for collections 2008-06-20 18:27:30 +00:00
Dan Stillman
461225ac15 Addreses #1047, Timeline items not displaying
Sean, can you verify that this fixes the problem?
2008-06-20 17:48:46 +00:00
Simon Kornblith
d8868cd9cb fixes #1030, CSL broken on trunk due to XML namespace change
closes #704, EndNote to Zotero style converter (won't actually convert styles due to copyright concerns, but will load them into the DB)
also adds CSL style manager
2008-06-20 06:40:05 +00:00
Dan Stillman
d65e75fbc9 Keep track of manually set ids (via a Notifier observer watching for 'add' events or manual Zotero.ID.skip() calls) so that subsequent calls to Zotero.ID.get() don't return them
This should fix hard-to-reproduce 'constraint failed' errors during syncing.
2008-06-19 07:46:08 +00:00
Dan Stillman
a610595b84 Fix deletion of items without tags 2008-06-18 08:58:38 +00:00
Dan Stillman
2df1e34dc2 Reverting r2892 -- not necessary 2008-06-18 08:57:46 +00:00
Dan Stillman
dd776bbb70 Use SQLite text data type for integers longer than 15 characters 2008-06-18 08:49:44 +00:00
Dan Stillman
d5eacdcbc6 Fix sync URL 2008-06-18 08:47:38 +00:00
Dan Stillman
0efeb1f26c Merged revisions 2845-2848,2850-2852,2855-2857,2860-2863,2872,2874,2879-2880 from 1.0 branch via svnmerge 2008-06-17 20:50:44 +00:00
Dan Stillman
42fa6f091f Move sync URL to ZOTERO_CONFIG array 2008-06-17 20:41:31 +00:00
Dan Stillman
35e9f3b3b7 Fix export from saved search content menu on trunk, changing ZoteroItemPane.getSortedItems() to return Item objects unless asIDs is passed (like getSelectedItems()) 2008-06-17 20:39:26 +00:00
Dan Stillman
d5756c1168 Fix tag pane refresh after adding tag to item 2008-06-17 07:08:13 +00:00
Dan Stillman
413670b09d Restore tag rename and delete
Tag comparisons are now case-insensitive, and old tags with case differences are migrated to the most-used tag or the tag linked to the oldest item
2008-06-16 20:07:17 +00:00
Dan Stillman
72b53e1b3f Don't drop all tags on DB upgrade 2008-06-16 14:55:09 +00:00
Dan Stillman
9bcdf021dd - Fixes tag editing
- Adds tag syncing
- Fixes a few other things

No tag CR yet
Requires new 1.0 DB upgrade
2008-06-16 05:46:10 +00:00
Dan Stillman
f00e5501e9 Addresses #1037, Remove Firefox 2–specific code 2008-06-11 08:57:41 +00:00
Dan Stillman
97f214c9dc Merged revisions 2710-2712,2714-2716,2718-2728,2730-2731,2734,2736-2738,2740-2750,2752-2753,2755,2758-2768,2770-2779,2782,2789-2790,2794,2797-2802,2804,2808-2810,2812,2814-2824,2826-2832,2834-2835 via svnmerge from 1.0 branch 2008-06-11 08:55:59 +00:00
Dan Stillman
24e578dd84 Addresses #378, Button's tooltip displayed for dropdown list menu items 2008-06-11 07:57:24 +00:00
Dan Stillman
00c2b14d6c Adds rudimentary Zeroconf support to Zotero (a.k.a. "Z(ot)eroconf")
- Inspired by Dan Chudnov's Python/MODS-based Zeroconf demo at THATcamp
- Enabled by extensions.zotero.zeroconf.enabled (off by default)
- Currently supports only OS X (tested on Leopard, not sure about earlier versions)
- Uses Apple's dns-sd and mDNS command-client clients, but should be able to be extended to other clients, though a native library would be far superior
- Discovery is on-demand for now via Actions menu ("Search for Shared Libraries")
- Includes rudimentary web server (code copied from integration.js) that serves items as sync XML -- no authentication yet!
- Only supports top-level items
- Remote libraries show up in left pane (under remote computer name, for now)
- Items can be dragged into collections (but not the library yet, for some reason)
- On first run, might cause a long pause and the "This file was downloaded from the Internet" message on Leopard -- can't manage to get around the quarantine for the script file that we need to access stdout from Firefox
- Needs a lot of work, and without a real JS (or otherwise Mozilla-native) Zeroconf library we can't do proper discovery without intermittent polling
- But it works, at least for me

Also includes some data/sync-layer changes that I needed along the way (and that we'll need for shared collections of any type)
2008-06-03 05:26:30 +00:00
Dan Stillman
4d03dd8d43 Moving default XML namespace declaration inside CSL objects -- this breaks CSL generation, as far as I can tell, but having the default namespace in the global scope makes dealing with E4X elsewhere very annoying
Creating a follow-up ticket to fix CSL generation
2008-06-02 21:30:01 +00:00
Dan Stillman
392c968315 Point trunk build to sync.zotero.org 2008-06-02 18:01:33 +00:00
Dan Stillman
77133f465c - Saved search syncing, with automatic latest-wins conflict resolution
- Last sync time displayed in sync button tooltip
- Various and sundry bug fixes

DB must be re-upgraded from 1.0
2008-06-02 09:15:43 +00:00
Simon Kornblith
6d9427981e closes #973, citation editor broken in FF3
(fixes a message asking the user if s/he wants to regenerate a citation when the editor has never been shown and a parameter is changed)
2008-05-31 02:51:08 +00:00
Dan Stillman
6408762b12 Merged revisions 2640-2647,2651,2653-2654,2656-2658,2660-2667,2670-2672,2674-2677,2680,2683-2684,2687-2704,2707 to trunk via svnmerge from 1.0 branch 2008-05-16 09:14:11 +00:00
Dan Stillman
3d889d31e1 Zotero.ID fixes -- don't give same id twice in a session (which could happen if the set of available ids was used up before a database commit)
This might fix some sync issues.
2008-05-07 21:48:33 +00:00
Dan Stillman
416f023384 Merged revisions 2190-2192,2194,2196-2199,2202-2205,2209,2212,2214-2215,2227-2228,2230,2232-2243,2245,2247-2256,2263-2272,2276,2278-2279,2281,2284-2286,2292,2296-2297,2299-2302,2304-2305,2309-2310,2314,2317-2323,2325-2329,2331-2337,2339,2341-2342,2344,2347-2366,2370-2371,2373-2377,2379-2391,2393-2402,2405-2410,2413,2415-2416,2418,2420-2421,2423,2427-2429,2431-2433,2437,2440-2441,2443-2450,2453,2455-2459,2461-2467,2471,2475-2480,2482-2490,2493,2495-2499,2501-2506,2511,2513-2519,2521,2525-2536,2540,2543-2553,2555-2559,2561-2576,2578,2580-2603,2606-2609,2611-2616,2618-2620,2624-2630,2632-2633 to trunk via svnmerge from 1.0 branch 2008-05-05 07:19:34 +00:00
Dan Stillman
2cc94e07c9 Fixes #997, Zotero pane cropped (I suspect)
Missing file in my last commit, which I think is also why I wasn't seeing this problem before

Reopen if still happening in next build
2008-05-04 08:52:43 +00:00
Dan Stillman
3de1789f26 Initial Zotero 1.5 Megacommit
Apologies for the massive (and, due to data_access.js splitting, difficult-to-follow) commit. Please note that external code that accesses the data layer may need to be tweaked for compatibility. Here's a comprehensive-as-possible changelog:

- Added server sync functionality (incomplete)
- Overhaul of data layer
  - Split data_access.js into separate files (item.js, items.js, creator.js, etc.)
  - Made creators and collections first-class objects, similar to items
  - Constructors now take id as first parameter, e.g. new Zotero.Item(1234, 'book'), to allow explicit id setting and id changing
  - Made various data layer operations (including attachment fields) require a save() rather than making direct DB changes
  - Better handling of unsaved objects
    - Item.setCreator() now takes creator objects instead of creator ids, and Item.save() will auto-save unsaved creators
    - clone() now works on unsaved objects
  - Newly created object instances are now disabled after save() to force refetch of globally accessible instance using Zotero.(Items|Creators|etc.).get()
  - Added secondary lookup key to data objects
  - Deprecated getID() and getItemType() methods in favor of .id and .itemTypeID properties
  - toArray() deprecated in favor of serialize(), which has a somewhat modified format
  - Added support for multiple creators with identical data -- currently unimplemented in interface and most of data layer
  - Added Item.diff() for comparing item metadata
- Database changes
  - Added SQLite triggers to enforce foreign key constraints
  - Added Zotero.DB.transactionVacuum flag to run a VACUUM after a transaction
  - Added Zotero.DB.transactionDate, .transactionDateTime, and transactionTimestamp to retrieve consistent timestamps for entire transaction
  - Properly store 64-bit integers
  - Set PRAGMA locking_mode=EXCLUSIVE on database
  - Set SQLite page size to 4096 on new databases
  - Set SQLite page cache to 8MB
  - Do some database cleanup and integrity checking on migration from 1.0 branch
  - Removed IF NOT EXISTS from userdata.sql CREATE statements -- userdata.sql is now processed only on DB initialization
  - Removed itemNoteTitles table and moved titles into itemNotes
- Abstracted metadata edit box and note box into flexible XBL bindings with various modes, including read-only states
- Massive speed-up of item tree view
- Several fixes from 1.0 branch for Fx3 compatibility
- Added Notifier observer to log delete events for syncing
- Zotero.Utilities changes
  - New methods getSQLDataType() and md5()
  - Removed onError from Zotero.Utilities.HTTP.doGet()
  - Don't display more than 1024 characters in doPost() debug output
  - Don't display passwords in doPost() debug output
- Added Zotero.Notifier.untrigger() -- currently unused
- Added Zotero.reloadDataObjects() to reset all in-memory objects
- Added |chars| parameter to Zotero.randomString(len, chars)
- Added Zotero.Date.getUnixTimestamp() and Date.toUnixTimestamp(JSDate)
- Adjusted zotero-service.js to simplify file inclusion

Various things (such as tags) are temporarily broken.
2008-05-04 08:32:48 +00:00
Simon Kornblith
28d91b1309 closes #969, Export not working under FF3 2008-03-25 15:35:54 +00:00