author | Clipperz <info@clipperz.com> | 2013-01-08 15:21:04 (UTC) |
---|---|---|
committer | Clipperz <info@clipperz.com> | 2013-01-08 15:21:04 (UTC) |
commit | 816fc35420a434b1d54ae5833d617608f7456048 (patch) (side-by-side diff) | |
tree | 95b8caf354083593d7775e4dda6f4c556b44a2d9 /frontend/gamma/js/Clipperz/PM/UI/Common/Components/SimpleMessagePanel.js | |
parent | 267603e3aa3cf0029411e67ae14018b52344c296 (diff) | |
download | clipperz-816fc35420a434b1d54ae5833d617608f7456048.zip clipperz-816fc35420a434b1d54ae5833d617608f7456048.tar.gz clipperz-816fc35420a434b1d54ae5833d617608f7456048.tar.bz2 |
Updated version of /gamma
Tons of changes, included a new draft of the mobile version (still VERY rough)
Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/UI/Common/Components/SimpleMessagePanel.js') (more/less context) (show whitespace changes)
-rw-r--r-- | frontend/gamma/js/Clipperz/PM/UI/Common/Components/SimpleMessagePanel.js | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/SimpleMessagePanel.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/SimpleMessagePanel.js index 1992154..1d816a9 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/SimpleMessagePanel.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/SimpleMessagePanel.js @@ -95,20 +95,35 @@ Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.SimpleMessagePanel, Clippe 'type': function () { return this._type; }, 'setType': function (aValue) { - if (this.getElement('icon') != null) { - MochiKit.DOM.removeElementClass(this.getId('icon'), this._type); - MochiKit.DOM.addElementClass(this.getId('icon'), aValue); - } +// if (this.getElement('icon') != null) { +// MochiKit.DOM.removeElementClass(this.getId('icon'), this._type); +// MochiKit.DOM.addElementClass(this.getId('icon'), aValue); +// } this._type = aValue; }, + 'icon': function () { + var type = this.type(); + var result; + + if (type == 'ALERT') { + result = '!'; + } else if (type == 'INFO') { + result = 'i'; + } else if (type == 'ERROR') { + result = '!'; + } + + return result; + }, + //------------------------------------------------------------------------- 'buttons': function () { return this._buttons; }, @@ -129,23 +144,26 @@ Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.SimpleMessagePanel, Clippe }, //------------------------------------------------------------------------- 'renderSelf': function() { this.append(this.element(), {tag:'div', cls:'SimpleMessagePanel', id:this.getId('panel'), children: [ - {tag:'div', cls:'header', children:[]}, +// {tag:'div', cls:'header', children:[]}, {tag:'div', cls:'body', children:[ - {tag:'div', id:this.getId('icon'), cls:'img ' + this.type(), children:[{tag:'div'}]}, +// {tag:'div', id:this.getId('icon'), cls:'img ' + this.type(), children:[{tag:'div'}]}, + {tag:'div', /*id:this.getId('icon'),*/ cls:'img ' + this.type(), children:[{tag:'canvas', id:this.getId('icon')}]}, {tag:'h3', id:this.getId('title'), html:this.title()}, {tag:'p', id:this.getId('text'), html:this.text()}, {tag:'div', id:this.getId('container')}, {tag:'div', id:this.getId('buttonArea'), cls:'buttonArea', children:[]} - ]}, - {tag:'div', cls:'footer', children:[]} + ]} +// {tag:'div', cls:'footer', children:[]} ]}); + Clipperz.PM.UI.Canvas.marks[this.icon()](this.getElement('icon'), "#ffffff"); + MochiKit.Signal.connect(this.getId('panel'), 'onkeydown', this, 'keyDownHandler'); this.renderButtons(); }, //------------------------------------------------------------------------- |