Update spreadsheet cell

This commit is contained in:
Dennis Eichhorn 2016-08-02 15:34:57 +02:00
parent 10886f0178
commit afcc8a6646
2 changed files with 52 additions and 2 deletions

22
Spreadsheet/Cell.js Normal file
View File

@ -0,0 +1,22 @@
/**
* Cell.
*
* @author OMS Development Team <dev@oms.com>
* @author Dennis Eichhorn <d.eichhorn@oms.com>
* @copyright 2013 Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0 * @since 1.0.0
*/
(function (jsOMS)
{
"use strict";
/** @namespace jsOMS.Spreadsheet */
jsOMS.Autoloader.defineNamespace('jsOMS.Spreadsheet');
jsOMS.Spreadsheet.Cell = function(id, raw)
{
this.id = id;
this.raw = raw;
this.formatting = raw.formatting;
};
}(window.jsOMS = window.jsOMS || {}));

View File

@ -1,5 +1,5 @@
/**
* Form view.
* Spreadsheet view.
*
* @author OMS Development Team <dev@oms.com>
* @author Dennis Eichhorn <d.eichhorn@oms.com>
@ -13,11 +13,39 @@
/** @namespace jsOMS.Spreadsheet */
jsOMS.Autoloader.defineNamespace('jsOMS.Spreadsheet');
jsOMS.Spreadsheet.Spreadsheet = function(id, options)
jsOMS.Spreadsheet.Spreadsheet = function(id, dataset, options)
{
this.spreadsheet = document.getElementById(id);
this.title = '';
this.sheets = [];
this.columns = true;
this.rows = true;
this.dataset = [];
this.compiledData = [];
this.scroll = {h: false, v: false};
};
jsOMS.SpreadSheet.prototype.draw = function()
{
let col = 0,
row = 0,
cRows = this.dataset.length(),
cCols = 0;
j = 0,
this.compiledData = this.dataset;
for(let i = 0; i < cRows; i++) {
cCols = this.compiledData[i].length();
for(j = 0; j < cCols; j++) {
this.compiledData[i][j] = Functions.evaluate(this.compiledData[i][j], compiledData);
this.drawCell(this.compiledData[i][j]);
}
}
};
jsOMS.SpreadSheet.prototype.drawCell = function()
{
};
}(window.jsOMS = window.jsOMS || {}));