mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-01-28 01:18:40 +00:00
Update spreadsheet cell
This commit is contained in:
parent
10886f0178
commit
afcc8a6646
22
Spreadsheet/Cell.js
Normal file
22
Spreadsheet/Cell.js
Normal 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 || {}));
|
||||
|
|
@ -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 || {}));
|
||||
Loading…
Reference in New Issue
Block a user