| 1 |
// $Id: sheetnode.js,v 1.3 2008/11/11 07:28:52 kratib Exp $
|
| 2 |
|
| 3 |
Drupal.sheetnode = {};
|
| 4 |
|
| 5 |
Drupal.sheetnode.startUp = function() {
|
| 6 |
SocialCalc.Constants.defaultImagePrefix = Drupal.settings.sheetnode.imageprefix;
|
| 7 |
this.sheet = new SocialCalc.SpreadsheetControl();
|
| 8 |
this.sheet.tabbackground="display:none;";
|
| 9 |
this.sheet.toolbarbackground="display:none;";
|
| 10 |
this.sheet.ParseSheetSave(Drupal.settings.sheetnode.value);
|
| 11 |
this.sheet.InitializeSpreadsheetControl(Drupal.settings.sheetnode.element);
|
| 12 |
}
|
| 13 |
|
| 14 |
Drupal.sheetnode.resize = function() {
|
| 15 |
if (this.sheet.SizeSSDiv()) {
|
| 16 |
this.sheet.editor.ResizeTableEditor(this.sheet.width, this.sheet.height-
|
| 17 |
(this.sheet.spreadsheetDiv.firstChild.offsetHeight + this.sheet.formulabarDiv.offsetHeight));
|
| 18 |
}
|
| 19 |
}
|
| 20 |
|
| 21 |
$(document).ready(function() {
|
| 22 |
$('#edit-submit').click(function() {
|
| 23 |
$('#edit-save').val(Drupal.sheetnode.sheet.CreateSheetSave());
|
| 24 |
});
|
| 25 |
$(window).resize(function() {
|
| 26 |
Drupal.sheetnode.resize();
|
| 27 |
});
|
| 28 |
});
|
| 29 |
|