/[drupal]/contributions/modules/sheetnode/sheetnode.js
ViewVC logotype

Contents of /contributions/modules/sheetnode/sheetnode.js

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (show annotations) (download) (as text)
Tue Nov 11 21:56:34 2008 UTC (12 months, 1 week ago) by kratib
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-5
Changes since 1.3: +11 -1 lines
File MIME type: text/javascript
Added window resizing adjustment
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

  ViewVC Help
Powered by ViewVC 1.1.2