Skip to content

Commit

Permalink
Merge branch 'hotfix-1.12.31'
Browse files Browse the repository at this point in the history
* hotfix-1.12.31:
  Update version info.
  Fix typos in old release notes
  capture: don't prompt for invalid url
  tree: fix Firefox >= 48 cannot drag move tree items
  lang: fix error localizations
  prefs: customizable page limit for fulltext cache of sites
  capture: use ScrapBook style fulltext cache for sites
  coding style: only 1 space before "="
  coding style: remove spaces before ":"
  coding style: use LF instead of CRLF
  • Loading branch information
danny0838 committed Jun 16, 2016
2 parents 8797f9e + 3b6d90f commit cc835ca
Show file tree
Hide file tree
Showing 56 changed files with 1,443 additions and 1,404 deletions.
13 changes: 11 additions & 2 deletions RELEASE.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
Scrapbook X 1.12.31
----------------

- FIXED: Moving items by dragging does not work in Firefox >= 48.
- FIXED: Several wrong or bad localizations.
- UPDATE: Use old ScrapBook style fulltext caching mechanism for sites (deep-captured items) to prevent several performance issues for those with very much pages. This could prevent some information from being cached, though.
- UPDATE: Adjusted internal coding style.


Scrapbook X 1.12.30
----------------
- FIXED: Adjusted the internal script of "Output HTML tree" page to prevent a potential compatibility issue in certain browsers.
Expand Down Expand Up @@ -522,10 +531,10 @@ Scrapbook X 1.12.0a20
Scrapbook X 1.12.0a19
----------------

- UPDATE: Note page template can now use <%DATA_DIR%> to insert the relative path of the main data directory respectively on creating.
- UPDATE: Note page template can now use <%DATA_DIR%> to insert the relative path of the main data directory respectively on creating.
- UPDATE: The container tag fields of insert source of HTML editor can now be selected and copied.
- UPDATE: Slightly improved the output of Output Tree.
- FIXED: &lt;%SCRAPBOOK_DIR%> of note page template inserts a wrong path on creation of a sub-page.
- FIXED: <%SCRAPBOOK_DIR%> of note page template inserts a wrong path on creation of a sub-page.
- FIXED: Insert source of HTML editor causes an HTML tag to miss if the selection is exactly the full contents of it.
- FIXED: Insert source of HTML editor sometimes extends to an inappropriate HTML tag (such as TR), causing an abnormal result.

Expand Down
52 changes: 26 additions & 26 deletions chrome/content/scrapbook/calculate.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ var sbCalcService = {
get STATUS() { return document.getElementById("sbCalcMessage"); },
get PROGRESS() { return document.getElementById("sbCalcProgress"); },

dirEnum : null,
treeItems : [],
count : 0,
total : 0,
grandSum : 0,
invalidCount : 0,

exec : function() {
dirEnum: null,
treeItems: [],
count: 0,
total: 0,
grandSum: 0,
invalidCount: 0,

exec: function() {
var resEnum = sbDataSource.data.GetAllResources();
while ( resEnum.hasMoreElements() ) {
var res = resEnum.getNext();
Expand Down Expand Up @@ -43,7 +43,7 @@ var sbCalcService = {
this.processAsync();
},

processAsync : function() {
processAsync: function() {
if ( !this.dirEnum.hasMoreElements() ) {
this.finish();
return;
Expand All @@ -55,13 +55,13 @@ var sbCalcService = {
var index = dir.clone(); index.append("index.html");
var bytes = sbPropService.getTotalFileSize(id)[0];
this.grandSum += bytes;
var res = sbCommonUtils.RDF.GetResource("urn:scrapbook:item" + id);
var res = sbCommonUtils.RDF.GetResource("urn:scrapbook:item" + id);
var type = sbDataSource.getProperty(res, "type");
var valid = sbDataSource.exists(res)
&& !sbDataSource.isolated(res)
&& ["folder", "separator", "bookmark"].indexOf(type) == -1
&& index.exists() && index.isFile();
var icon = sbDataSource.getProperty(res, "icon");
var icon = sbDataSource.getProperty(res, "icon");
if ( !icon ) icon = sbCommonUtils.getDefaultIcon(type);
this.treeItems.push([
id,
Expand All @@ -73,13 +73,13 @@ var sbCalcService = {
valid,
]);
if ( !valid ) this.invalidCount++;
this.STATUS.label = sbCommonUtils.lang("property", "CALCULATING", [this.count, this.total]);
this.STATUS.label = sbCommonUtils.lang("property", "CALCULATING", [this.count, this.total]);
this.PROGRESS.value = Math.round(this.count / this.total * 100);
}
setTimeout(function() { sbCalcService.processAsync(); }, 0);
},

finish : function() {
finish: function() {
sbCustomTreeUtil.sortArrayByIndex(this.treeItems, 4);
this.treeItems.reverse();
this.initTree();
Expand All @@ -90,7 +90,7 @@ var sbCalcService = {
this.checkDoubleEntries();
},

initTree : function() {
initTree: function() {
var colIDs = [
"sbTreeColTitle",
"sbTreeColSize",
Expand All @@ -99,9 +99,9 @@ var sbCalcService = {
var treeView = new sbCustomTreeView(colIDs, this.treeItems);
treeView.getCellText = function(row, col) {
switch ( col.index ) {
case 0 : return this._items[row][2]; break;
case 1 : return this._items[row][5]; break;
case 2 : return this._items[row][6] ? "" : sbCommonUtils.lang("property", "INVALID"); break;
case 0: return this._items[row][2]; break;
case 1: return this._items[row][5]; break;
case 2: return this._items[row][6] ? "" : sbCommonUtils.lang("property", "INVALID"); break;
}
};
treeView.getImageSrc = function(row, col) {
Expand All @@ -123,7 +123,7 @@ var sbCalcService = {
this.TREE.view = treeView;
},

checkDoubleEntries : function() {
checkDoubleEntries: function() {
var hashTable = {};
var resList = sbDataSource.flattenResources(sbCommonUtils.RDF.GetResource("urn:scrapbook:root"), 0, true);
for ( var i = 0; i < resList.length; i++ ) {
Expand All @@ -147,18 +147,18 @@ var sbCalcController = {
return sbCalcService.treeItems[sbCalcService.TREE.currentIndex];
},

createPopupMenu : function(aEvent) {},
createPopupMenu: function(aEvent) {},

onDblClick : function(aEvent) {
onDblClick: function(aEvent) {
if ( aEvent.button == 0 && aEvent.originalTarget.localName == "treechildren" ) this.open(false);
},

open : function(tabbed) {
open: function(tabbed) {
var res = sbCommonUtils.RDF.GetResource("urn:scrapbook:item" + this.CURRENT_TREEITEM[0]);
sbCommonUtils.loadURL(sbDataSource.getURL(res), tabbed);
},

remove : function() {
remove: function() {
var id = this.CURRENT_TREEITEM[0];
if (this.CURRENT_TREEITEM[6]) {
if (!sbController.confirmRemovingPrompt()) return;
Expand All @@ -181,12 +181,12 @@ var sbCalcController = {
} catch(ex) {}
},

forward : function(aCommand) {
forward: function(aCommand) {
var id = this.CURRENT_TREEITEM[0];
switch ( aCommand ) {
case "P" : window.openDialog("chrome://scrapbook/content/property.xul", "", "modal,centerscreen,chrome" ,id); break;
case "L" : sbController.launch(sbCommonUtils.getContentDir(id, true, true));
default : break;
case "P": window.openDialog("chrome://scrapbook/content/property.xul", "", "modal,centerscreen,chrome" ,id); break;
case "L": sbController.launch(sbCommonUtils.getContentDir(id, true, true));
default: break;
}
},

Expand Down
Loading

0 comments on commit cc835ca

Please sign in to comment.