diff --git a/chrome/content/zotfile/options.js b/chrome/content/zotfile/options.js index 758bc850..78b9d933 100644 --- a/chrome/content/zotfile/options.js +++ b/chrome/content/zotfile/options.js @@ -60,7 +60,21 @@ var updatePreferenceWindow = function (which) { if(which=="subfolder-tablet" || which=="all") disablePreference("tablet-subfolder", "tablet-subfolderFormat", revert); // storeCopyOfFile-tablet - if(which=="storeCopyOfFile" || which=="all") disablePreference("tablet-storeCopyOfFile", "tablet-storeCopyOfFile_suffix", revert); + if(which=="storeCopyOfFile" || which=="all"){ + disablePreference("tablet-storeCopyOfFile", "tablet-storeCopyOfFile_suffix", revert); + } + + // storeCopyOfFile or tablet-rename + if(which=="storeCopyOfFile" || which=="tablet-rename" || which=="all"){ + var storecopy = document.getElementById('pref-zotfile-tablet-storeCopyOfFile').value; + var rename = document.getElementById('pref-zotfile-tablet-rename').value + // the value is the status before clicking + if (which == "storeCopyOfFile") storecopy = !storecopy; + if (which == "tablet-rename") rename = !rename; + // enable keep-one-annotated option when storeCopyOfFile is on but tablet-rename is off + var enable_keep_one_annotated = storecopy && !rename; + document.getElementById('id-zotfile-tablet-keep-one-annotated').disabled = !enable_keep_one_annotated; + } // batch renaming if(which=="confirm" || which=="all") disablePreference("confirmation_batch_ask", "confirmation_batch", revert); diff --git a/chrome/content/zotfile/options.xul b/chrome/content/zotfile/options.xul index ab3f72f3..29995390 100644 --- a/chrome/content/zotfile/options.xul +++ b/chrome/content/zotfile/options.xul @@ -44,6 +44,7 @@ + @@ -165,12 +166,13 @@ - + + diff --git a/chrome/content/zotfile/overlay.xul b/chrome/content/zotfile/overlay.xul index 5d5f001c..fd8ec7d1 100644 --- a/chrome/content/zotfile/overlay.xul +++ b/chrome/content/zotfile/overlay.xul @@ -20,26 +20,27 @@ + -