Commit af1cea260edd87920963c990ae238c083c1b959e

  • avatar
  • Jonne Itkonen <jonne.itkonen @j…u.fi> (Committer)
  • Wed Aug 28 16:59:47 EEST 2013
  • avatar
  • Jonne Itkonen <jonne.itkonen @j…u.fi> (Author)
  • Wed Aug 28 16:59:47 EEST 2013
luo_div -> new Element
taulukko.js
(5 / 2)
  
8989var Solu = new Class({
9090 initialize: function (taulukko, indeksi, arvo, draggable) {
9191 this.divid = 'solu'+indeksi;
92 this.div = luo_div(this.divid, {'className':'solu', 'draggable':(draggable||false)});
92 this.div = new Element('div', {'id': this.divid, 'class': 'solu', 'draggable': (draggable||false)});
9393 this.taulukko = taulukko;
9494 this.indeksi = indeksi;
9595 this.div.olio = this;
9696 this.arvo(arvo||0);
9797 },
98 toElement: function () {
99 return this.div;
100 },
98101 arvo: function (x) {
99102 if (x) {
100103 this.taulukko[this.indeksi] = x;
101 this.div.innerHTML = x.toString();
104 this.div.set('html', x.toString());
102105 }
103106 return this.taulukko[this.indeksi];
104107 }