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 | |||
@@ -100,6 +100,6 @@ Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.SimpleMessagePanel, Clippe | |||
100 | 'setType': function (aValue) { | 100 | 'setType': function (aValue) { |
101 | if (this.getElement('icon') != null) { | 101 | // if (this.getElement('icon') != null) { |
102 | MochiKit.DOM.removeElementClass(this.getId('icon'), this._type); | 102 | // MochiKit.DOM.removeElementClass(this.getId('icon'), this._type); |
103 | MochiKit.DOM.addElementClass(this.getId('icon'), aValue); | 103 | // MochiKit.DOM.addElementClass(this.getId('icon'), aValue); |
104 | } | 104 | // } |
105 | 105 | ||
@@ -108,2 +108,17 @@ Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.SimpleMessagePanel, Clippe | |||
108 | 108 | ||
109 | 'icon': function () { | ||
110 | var type = this.type(); | ||
111 | var result; | ||
112 | |||
113 | if (type == 'ALERT') { | ||
114 | result = '!'; | ||
115 | } else if (type == 'INFO') { | ||
116 | result = 'i'; | ||
117 | } else if (type == 'ERROR') { | ||
118 | result = '!'; | ||
119 | } | ||
120 | |||
121 | return result; | ||
122 | }, | ||
123 | |||
109 | //------------------------------------------------------------------------- | 124 | //------------------------------------------------------------------------- |
@@ -134,5 +149,6 @@ Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.SimpleMessagePanel, Clippe | |||
134 | this.append(this.element(), {tag:'div', cls:'SimpleMessagePanel', id:this.getId('panel'), children: [ | 149 | this.append(this.element(), {tag:'div', cls:'SimpleMessagePanel', id:this.getId('panel'), children: [ |
135 | {tag:'div', cls:'header', children:[]}, | 150 | // {tag:'div', cls:'header', children:[]}, |
136 | {tag:'div', cls:'body', children:[ | 151 | {tag:'div', cls:'body', children:[ |
137 | {tag:'div', id:this.getId('icon'),cls:'img ' + this.type(), children:[{tag:'div'}]}, | 152 | // {tag:'div', id:this.getId('icon'),cls:'img ' + this.type(), children:[{tag:'div'}]}, |
153 | {tag:'div', /*id:this.getId('icon'),*/cls:'img ' + this.type(), children:[{tag:'canvas', id:this.getId('icon')}]}, | ||
138 | {tag:'h3', id:this.getId('title'),html:this.title()}, | 154 | {tag:'h3', id:this.getId('title'),html:this.title()}, |
@@ -141,6 +157,8 @@ Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.SimpleMessagePanel, Clippe | |||
141 | {tag:'div', id:this.getId('buttonArea'), cls:'buttonArea', children:[]} | 157 | {tag:'div', id:this.getId('buttonArea'), cls:'buttonArea', children:[]} |
142 | ]}, | 158 | ]} |
143 | {tag:'div', cls:'footer', children:[]} | 159 | // {tag:'div', cls:'footer', children:[]} |
144 | ]}); | 160 | ]}); |
145 | 161 | ||
162 | Clipperz.PM.UI.Canvas.marks[this.icon()](this.getElement('icon'), "#ffffff"); | ||
163 | |||
146 | MochiKit.Signal.connect(this.getId('panel'), 'onkeydown', this, 'keyDownHandler'); | 164 | MochiKit.Signal.connect(this.getId('panel'), 'onkeydown', this, 'keyDownHandler'); |