Permalink
Browse files

Moved sum button into socialcalcspreadsheetcontrol.js, made OLPC vers…

…ion's graphing more modular, fixed bug in sort settings save, added SocialCalc.Callbacks.NormalizeSheetName to socialcalc-3.js and formula1.js.
  • Loading branch information...
1 parent aa0f53f commit 80d48522e78531709901322a2ea39d9b6567bc20 @DanBricklin committed Jun 2, 2009
Showing with 908 additions and 11 deletions.
  1. +11 −0 Changes.txt
  2. +21 −4 formula1.js
  3. BIN images/sc-sumdialog.gif
  4. +5 −1 socialcalc-3.js
  5. +813 −0 socialcalc2demo-0-8-1.html
  6. +4 −3 socialcalcserver.pl
  7. +54 −3 socialcalcspreadsheetcontrol.js
View
@@ -534,6 +534,17 @@ Changed ctrl-v to paste in upper left if has range.
2009-05-22:
Changed dragging vertical thumb to display part of each proposed new top row. New constants, etc.
+2009-05-28:
+Wrote ConvertCSV routine in Perl in socialcalcserverX.pl.
+
+2009-05-31:
+Moved sum button into socialcalcspreadsheetcontrol.js as additional formula bar button.
+
+2009-06-01:
+Made OLPC version's graphing more modular, and save.
+Fixed bug in sort settings save.
+Added SocialCalc.Callbacks.NormalizeSheetName to socialcalc-3.js and formula1.js.
+
TO DO:
View
@@ -4448,19 +4448,22 @@ SocialCalc.Formula.FindInSheetCache = function(sheetname) {
var str;
var sfsc = SocialCalc.Formula.SheetCache;
- if (sfsc.sheets[sheetname]) { // a sheet by that name is in the cache already
- return sfsc.sheets[sheetname].sheet; // return it
+ var nsheetname = SocialCalc.Formula.NormalizeSheetName(sheetname); // normalize different versions
+
+ if (sfsc.sheets[nsheetname]) { // a sheet by that name is in the cache already
+ return sfsc.sheets[nsheetname].sheet; // return it
}
if (sfsc.waitingForLoading) { // waiting already - only queue up one
return null; // return not found
}
if (sfsc.loadsheet) { // Deprecated old format synchronous callback
- return SocialCalc.Formula.AddSheetToCache(sheetname, sfsc.loadsheet(sheetname));
+alert("Using SocialCalc.Formula.SheetCache.loadsheet - deprecated");
+ return SocialCalc.Formula.AddSheetToCache(nsheetname, sfsc.loadsheet(nsheetname));
}
- sfsc.waitingForLoading = sheetname; // let recalc loop know that we have a sheet to load
+ sfsc.waitingForLoading = nsheetname; // let recalc loop know that we have a sheet to load
return null; // return not found
@@ -4493,6 +4496,20 @@ SocialCalc.Formula.AddSheetToCache = function(sheetname, str) {
}
//
+// nsheet = SocialCalc.Formula.NormalizeSheetName(sheetname)
+//
+
+SocialCalc.Formula.NormalizeSheetName = function(sheetname) {
+
+ if (SocialCalc.Callbacks.NormalizeSheetName) {
+ return SocialCalc.Callbacks.NormalizeSheetName(sheetname);
+ }
+ else {
+ return sheetname.toLowerCase();
+ }
+ }
+
+//
// REMOTE FUNCTION INFO
//
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -120,7 +120,11 @@ SocialCalc.Callbacks = {
// MakePageLink is used to create the href for a link to another "page"
// The form is: MakePageLink(pagename, workspacename, linktyle, valueformat), returns string
- MakePageLink: null
+ MakePageLink: null,
+
+ // NormalizeSheetName is used to make different variations of sheetnames use the same cache slot
+
+ NormalizeSheetName: null // use default - lowercase
};
Oops, something went wrong.

0 comments on commit 80d4852

Please sign in to comment.