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) (unidiff) | |
tree | 95b8caf354083593d7775e4dda6f4c556b44a2d9 /frontend/gamma/js/Clipperz/PM/UI/Common/Components/Button.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/Button.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/gamma/js/Clipperz/PM/UI/Common/Components/Button.js | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/Button.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/Button.js index 716d851..1010c9d 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/Button.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/Button.js | |||
@@ -63,5 +63,6 @@ Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.Button, Clipperz.PM.UI.Com | |||
63 | 63 | ||
64 | 'renderSelf': function () { | 64 | 'renderSelf': function () { |
65 | this.append(this.element(), {tag:'div', id:this.getId('wrapper'), cls:'button_wrapper', children:[ | 65 | /* |
66 | this.append(this.element(), {tag:'div', id:this.getId('button'), cls:'button_wrapper', children:[ | ||
66 | {tag:'div', id:this.getId('bodyWrapper'), cls:'button_bodyWrapper', children:[ | 67 | {tag:'div', id:this.getId('bodyWrapper'), cls:'button_bodyWrapper', children:[ |
67 | {tag:'div', id:this.getId('body'), cls:'button_body', children:[ | 68 | {tag:'div', id:this.getId('body'), cls:'button_body', children:[ |
@@ -71,34 +72,41 @@ Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.Button, Clipperz.PM.UI.Com | |||
71 | ]} | 72 | ]} |
72 | ]}); | 73 | ]}); |
74 | */ | ||
75 | /* | ||
76 | this.append(this.element(), {tag:'div', id:this.getId('button'), cls:'button', children:[ | ||
77 | {tag:'span', html:this.text()} | ||
78 | ]}); | ||
79 | */ | ||
80 | this.append(this.element(), {tag:'a', id:this.getId('button'), cls:'button', html:this.text()}); | ||
73 | 81 | ||
74 | if (this.isDefault()) { | 82 | if (this.isDefault()) { |
75 | MochiKit.DOM.addElementClass(this.getId('wrapper'), 'default'); | 83 | MochiKit.DOM.addElementClass(this.getId('button'), 'default'); |
76 | } | 84 | } |
77 | 85 | ||
78 | MochiKit.Signal.connect(this.getId('wrapper'), 'onmouseenter',this, 'handleOnMouseEnter'); | 86 | // MochiKit.Signal.connect(this.getId('button'), 'onmouseenter',this, 'handleOnMouseEnter'); |
79 | MochiKit.Signal.connect(this.getId('wrapper'), 'onmouseleave',this, 'handleOnMouseLeave'); | 87 | // MochiKit.Signal.connect(this.getId('button'), 'onmouseleave',this, 'handleOnMouseLeave'); |
80 | MochiKit.Signal.connect(this.getId('wrapper'), 'onmousedown',this, 'handleOnMouseDown'); | 88 | // MochiKit.Signal.connect(this.getId('button'), 'onmousedown',this, 'handleOnMouseDown'); |
81 | MochiKit.Signal.connect(this.getId('wrapper'), 'onclick', this, 'handleOnClick'); | 89 | MochiKit.Signal.connect(this.getId('button'), 'onclick', this, 'handleOnClick'); |
82 | }, | 90 | }, |
83 | 91 | ||
84 | //------------------------------------------------------------------------- | 92 | //------------------------------------------------------------------------- |
85 | 93 | /* | |
86 | 'handleOnMouseEnter': function (anEvent) { | 94 | 'handleOnMouseEnter': function (anEvent) { |
87 | MochiKit.DOM.addElementClass(this.getId('wrapper'), 'hover'); | 95 | MochiKit.DOM.addElementClass(this.getId('button'), 'hover'); |
88 | }, | 96 | }, |
89 | 97 | ||
90 | 'handleOnMouseLeave': function (anEvent) { | 98 | 'handleOnMouseLeave': function (anEvent) { |
91 | MochiKit.DOM.removeElementClass(this.getId('wrapper'), 'hover'); | 99 | MochiKit.DOM.removeElementClass(this.getId('button'), 'hover'); |
92 | MochiKit.DOM.removeElementClass(this.getId('wrapper'), 'clicked'); | 100 | MochiKit.DOM.removeElementClass(this.getId('button'), 'clicked'); |
93 | }, | 101 | }, |
94 | 102 | ||
95 | 'handleOnMouseDown': function (anEvent) { | 103 | 'handleOnMouseDown': function (anEvent) { |
96 | MochiKit.DOM.addElementClass(this.getId('wrapper'), 'clicked'); | 104 | MochiKit.DOM.addElementClass(this.getId('button'), 'clicked'); |
97 | }, | 105 | }, |
98 | 106 | */ | |
99 | 'handleOnClick': function (anEvent) { | 107 | 'handleOnClick': function (anEvent) { |
100 | MochiKit.Signal.signal(this, 'onclick', anEvent); | 108 | MochiKit.Signal.signal(this, 'onclick', anEvent); |
101 | }, | 109 | }, |
102 | 110 | ||
103 | //------------------------------------------------------------------------- | 111 | //------------------------------------------------------------------------- |
104 | __syntaxFix__: "syntax fix" | 112 | __syntaxFix__: "syntax fix" |