23 var editComment = gettext("edit comment") ; |
23 var editComment = gettext("edit comment") ; |
24 var deleteComment = gettext("delete comment") ; |
24 var deleteComment = gettext("delete comment") ; |
25 var edit = gettext("edit") ; |
25 var edit = gettext("edit") ; |
26 var del = gettext("delete") ; |
26 var del = gettext("delete") ; |
27 var close = gettext("close") ; |
27 var close = gettext("close") ; |
|
28 var showScope = gettext("show scope") ; |
28 |
29 |
29 // no header, no body yet |
30 // no header, no body yet |
30 this.overlay = new CY.Overlay( { |
31 this.overlay = new CY.Overlay( { |
31 zIndex :3, |
32 zIndex :3, |
32 shim :false, /* until we really need it, no shim */ |
33 shim :false, /* until we really need it, no shim */ |
44 '<a class="c-state-pending c-action" title="' + changeToPending + '" alt="' + changeToPending + '">'+ pending +'</a>' + " " + |
45 '<a class="c-state-pending c-action" title="' + changeToPending + '" alt="' + changeToPending + '">'+ pending +'</a>' + " " + |
45 '<a class="c-state-approved c-action" title="' + changeToApprove + '" alt="' + changeToApprove + '">'+ approved +'</a>' + " " + |
46 '<a class="c-state-approved c-action" title="' + changeToApprove + '" alt="' + changeToApprove + '">'+ approved +'</a>' + " " + |
46 '<a class="c-state-unapproved c-action" title="' + changeToUnapprove + '" alt="' + changeToUnapprove + '">'+ unapproved +'</a>' + " " + |
47 '<a class="c-state-unapproved c-action" title="' + changeToUnapprove + '" alt="' + changeToUnapprove + '">'+ unapproved +'</a>' + " " + |
47 '<a class="c-state-cancel c-action" title="' + cancelChange + '" alt="' + cancelChange + '">' + cancel +'</a>' + " " + |
48 '<a class="c-state-cancel c-action" title="' + cancelChange + '" alt="' + cancelChange + '">' + cancel +'</a>' + " " + |
48 '</div>' + |
49 '</div>' + |
|
50 '<a class="c-show-scope c-show-iscope c-action" title="'+ showScope + '" alt="' + showScope + '"><em>-</em></a>' + |
49 '<a class="c-close c-iclose c-action" title="'+ close + '" alt="' + close + '"><em>X</em></a>' + |
51 '<a class="c-close c-iclose c-action" title="'+ close + '" alt="' + close + '"><em>X</em></a>' + |
50 '</div>', |
52 '</div>', |
51 bodyContent : '<div class="icomment-body">' + |
53 bodyContent : '<div class="icomment-body">' + |
52 '<span class="c-content"></span>' + |
54 '<span class="c-content"></span>' + |
53 '<span class="c-ireplyactions">' + |
55 '<span class="c-ireplyactions">' + |
210 // debug !! |
212 // debug !! |
211 // CY.log('activate' + this.commentId) ; |
213 // CY.log('activate' + this.commentId) ; |
212 this.overlay.get('boundingBox').addClass('c-focus-comment') ; |
214 this.overlay.get('boundingBox').addClass('c-focus-comment') ; |
213 this.overlay.get('contentBox').query(".c-close").addClass('c-iclose-focus') ; |
215 this.overlay.get('contentBox').query(".c-close").addClass('c-iclose-focus') ; |
214 this.overlay.get('contentBox').query(".c-close").removeClass('c-iclose') ; |
216 this.overlay.get('contentBox').query(".c-close").removeClass('c-iclose') ; |
|
217 this.overlay.get('contentBox').query(".c-show-scope").addClass('c-show-iscope-focus') ; |
|
218 this.overlay.get('contentBox').query(".c-show-scope").removeClass('c-show-iscope') ; |
215 |
219 |
216 }, |
220 }, |
217 |
221 |
218 deactivate:function() { |
222 deactivate:function() { |
219 // debug !! |
223 // debug !! |
220 // CY.log('deactivate' + this.commentId) ; |
224 // CY.log('deactivate' + this.commentId) ; |
221 this.overlay.get('boundingBox').removeClass('c-focus-comment') ; |
225 this.overlay.get('boundingBox').removeClass('c-focus-comment') ; |
222 this.overlay.get('contentBox').query(".c-close").addClass('c-iclose') ; |
226 this.overlay.get('contentBox').query(".c-close").addClass('c-iclose') ; |
223 this.overlay.get('contentBox').query(".c-close").removeClass('c-iclose-focus') ; |
227 this.overlay.get('contentBox').query(".c-close").removeClass('c-iclose-focus') ; |
|
228 this.overlay.get('contentBox').query(".c-show-scope").addClass('c-show-iscope') ; |
|
229 this.overlay.get('contentBox').query(".c-show-scope").removeClass('c-show-iscope-focus') ; |
224 |
230 |
225 }, |
231 }, |
226 hide:function() { |
232 hide:function() { |
227 // is IComment the top active one ? |
233 // is IComment the top active one ? |
228 if (gIComments.isTopActive(this.commentId)) { // then try to activate next in displayed list |
234 if (gIComments.isTopActive(this.commentId)) { // then try to activate next in displayed list |