179 var viewPrev = gettext('view previous comment') ; |
179 var viewPrev = gettext('view previous comment') ; |
180 var viewNext = gettext('view next comment') ; |
180 var viewNext = gettext('view next comment') ; |
181 var viewFirst = gettext('view first comment') ; |
181 var viewFirst = gettext('view first comment') ; |
182 var viewLast = gettext('view last next comment') ; |
182 var viewLast = gettext('view last next comment') ; |
183 var viewAll = gettext('view all comments') ; |
183 var viewAll = gettext('view all comments') ; |
|
184 var viewScopeRemoved = gettext('view all detached comments') ; |
184 var advancedInterface = gettext('toggle advance interface') ; |
185 var advancedInterface = gettext('toggle advance interface') ; |
185 var print = gettext('print document with/without comments') ; |
186 var print = gettext('print document with/without comments') ; |
186 var exportDoc = gettext('export document with/without comments') ; |
187 var exportDoc = gettext('export document with/without comments') ; |
187 var fullscreen = gettext('toggle full screen view') ; |
188 var fullscreen = gettext('toggle full screen view') ; |
188 var feed = gettext('text feed') ; |
189 var feed = gettext('text feed') ; |
230 '</td>' + |
231 '</td>' + |
231 '<td width="20" align="left">' + |
232 '<td width="20" align="left">' + |
232 '<a href="#" id="c_browse_all"><img title="'+ viewAll +'" alt="'+ viewAll +'" src="' + sv_media_url + '/img/view_all.png"/></a>' + |
233 '<a href="#" id="c_browse_all"><img title="'+ viewAll +'" alt="'+ viewAll +'" src="' + sv_media_url + '/img/view_all.png"/></a>' + |
233 '</td>' + |
234 '</td>' + |
234 '<td width="20" align="left">' + |
235 '<td width="20" align="left">' + |
|
236 '<a href="#" id="c_browse_scope_removed"><img title="'+ viewScopeRemoved +'" alt="'+ viewScopeRemoved +'" src="' + sv_media_url + '/img/view_scope_removed2.png"/></a>' + |
|
237 '</td>' + |
|
238 '<td width="20" align="left">' + |
235 '<a href="#" id="c_advanced_btn"><img title="'+ advancedInterface +'" alt="'+ advancedInterface +'" src="' + sv_media_url + '/img/application_split.png"/></a>' + |
239 '<a href="#" id="c_advanced_btn"><img title="'+ advancedInterface +'" alt="'+ advancedInterface +'" src="' + sv_media_url + '/img/application_split.png"/></a>' + |
236 '</td>' + |
240 '</td>' + |
237 '<td width="20" align="left">' + |
241 '<td width="20" align="left">' + |
238 '<a href="#" id="c_thread_unthread"><img id="c_thread_unthread_img"/></a>' + |
242 '<a href="#" id="c_thread_unthread"><img id="c_thread_unthread_img"/></a>' + |
239 '</td>' + |
243 '</td>' + |
284 frames['text_view_comments'].gSync.showAllComments() ; |
288 frames['text_view_comments'].gSync.showAllComments() ; |
285 }) ; |
289 }) ; |
286 } |
290 } |
287 }); |
291 }); |
288 |
292 |
|
293 $("#c_browse_scope_removed").click( function() { |
|
294 if (frames['text_view_comments'].readyForAction()) { |
|
295 frames['text_view_comments'].checkForOpenedDialog(null, function() { |
|
296 frames['text_view_comments'].gSync.showScopeRemovedComments() ; |
|
297 }) ; |
|
298 } |
|
299 }); |
|
300 |
289 $("#c_print_btn").click( function() { |
301 $("#c_print_btn").click( function() { |
290 if (frames['text_view_comments'].readyForAction()) { |
302 if (frames['text_view_comments'].readyForAction()) { |
291 var ids = frames['text_view_comments'].gDb.getFilteredCommentIdsAsString() ; |
303 var ids = frames['text_view_comments'].gDb.getFilteredCommentIdsAsString() ; |
292 frames['text_view_comments'].CY.log($("#filteredIds").val(ids)) ; |
304 frames['text_view_comments'].CY.log($("#filteredIds").val(ids)) ; |
293 openPrintDialog() ; |
305 openPrintDialog() ; |
744 |
756 |
745 |
757 |
746 gInFullScreen = false; |
758 gInFullScreen = false; |
747 |
759 |
748 _setFrameSize = function() { |
760 _setFrameSize = function() { |
749 if (gInFullScreen) { |
761 if (parent != window) { // (this condition is to enable accessing "comments_frame" view from top window) TODO test under IE |
750 var headerHeight = parent.$("#header").height(); |
762 if (gInFullScreen) { |
751 var windowHeight = parent.$(parent).height(); |
763 var headerHeight = parent.$("#header").height(); |
752 var frameHeight = (windowHeight - headerHeight - 2) + 'px'; // - 2 to prevent scrollbars ? --> TODO test it without -2 |
764 var windowHeight = parent.$(parent).height(); |
753 |
765 var frameHeight = (windowHeight - headerHeight - 2) + 'px'; // - 2 to prevent scrollbars ? --> TODO test it without -2 |
754 var windowWidth = parent.$(parent).width(); |
766 |
755 var frameWidth = (windowWidth - 2) + 'px'; // - 2 to prevent scrollbars ?// --> TODO test it without -2 |
767 var windowWidth = parent.$(parent).width(); |
756 |
768 var frameWidth = (windowWidth - 2) + 'px'; // - 2 to prevent scrollbars ?// --> TODO test it without -2 |
757 // TODO we should be embeded ! shouldn't work otherwise anyway (frame security concerns) |
769 |
758 parent.$("#text_view_frame").css( { |
770 // TODO we should be embeded ! shouldn't work otherwise anyway (frame security concerns) |
759 'position' :'absolute', |
771 parent.$("#text_view_frame").css( { |
760 'left' :'0px', |
772 'position' :'absolute', |
761 'top' :headerHeight, |
773 'left' :'0px', |
762 'width' :frameWidth, |
774 'top' :headerHeight, |
763 'height' :frameHeight |
775 'width' :frameWidth, |
764 }); |
776 'height' :frameHeight |
765 } |
777 }); |
766 else { |
778 } |
767 var frameTop = Math.ceil(parent.$("#autoexpand_text_view_frame_container").position()["top"]); |
779 else { |
768 |
780 var frameTop = Math.ceil(parent.$("#autoexpand_text_view_frame_container").position()["top"]); |
769 var windowHeight = parent.$(parent).height(); |
781 |
770 var frameHeight = (windowHeight - frameTop - 2) + 'px'; // - 2 to prevent scrollbars // ? --> TODO test it without -2 |
782 var windowHeight = parent.$(parent).height(); |
771 |
783 var frameHeight = (windowHeight - frameTop - 2) + 'px'; // - 2 to prevent scrollbars // ? --> TODO test it without -2 |
772 var windowWidth = parent.$(parent).width(); |
784 |
773 var frameWidth = (windowWidth - 2) + 'px'; // - 2 to prevent scrollbars ? // --> TODO test it without -2 |
785 var windowWidth = parent.$(parent).width(); |
774 |
786 var frameWidth = (windowWidth - 2) + 'px'; // - 2 to prevent scrollbars ? // --> TODO test it without -2 |
775 // TODO test if we're embeded ! wont work otherwise anyway (frame security) |
787 |
776 parent.$("#text_view_frame").css( { |
788 // TODO test if we're embeded ! wont work otherwise anyway (frame security) |
777 'position' :'relative', |
789 parent.$("#text_view_frame").css( { |
778 'width' :'99.9%', |
790 'position' :'relative', |
779 'height' :frameHeight, |
791 'width' :'99.9%', |
780 'top' :'0px' |
792 'height' :frameHeight, |
781 }); |
793 'top' :'0px' |
|
794 }); |
|
795 } |
782 } |
796 } |
783 } |
797 } |
784 _toFullScreenSize = function() { |
798 _toFullScreenSize = function() { |
785 gInFullScreen = true; |
799 gInFullScreen = true; |
786 _setFrameSize() ; |
800 _setFrameSize() ; |