Give maximum width for add_comment form and toc.
--- a/src/cm/media/js/client/c_addcomment_form.js Tue Nov 05 18:29:29 2013 +0100
+++ b/src/cm/media/js/client/c_addcomment_form.js Wed Nov 06 19:05:09 2013 +0100
@@ -31,6 +31,7 @@
var overlayHtml = getHtml(gICommentForm) ;
var width = gLayout.getTopICommentsWidth() ;
+ width += gLayout.iCommentsRequiredThreadPadding (); // SID: use max available space as there is no indentation on that box
var overlay = new CY.Overlay( {
zIndex :3,
--- a/src/cm/media/js/client/c_layout.js Tue Nov 05 18:29:29 2013 +0100
+++ b/src/cm/media/js/client/c_layout.js Wed Nov 06 19:05:09 2013 +0100
@@ -43,9 +43,13 @@
getTopICommentsWidth : function() {
return this.getTopICommentsWidthFromWidth(this.sliderValToPx(gPrefs.get('layout','comments_col_width'))) ;
},
-
+
+ iCommentsRequiredThreadPadding : function () {
+ return 2 * gConf['iCommentThreadPadding']; // PhA said : a threaded discussion with a depth of 2 still shoudn't hide the text 20100317
+ },
+
getTopICommentsWidthFromWidth : function(val) {
- var ret = val - ( 2 * gConf['iCommentThreadPadding']) ; // PhA said : a threaded discussion with a depth of 2 still shoudn't hide the text 20100317
+ var ret = val - this.iCommentsRequiredThreadPadding ();
return ret - 7;
},
--- a/src/cm/media/js/client/c_toc.js Tue Nov 05 18:29:29 2013 +0100
+++ b/src/cm/media/js/client/c_toc.js Wed Nov 06 19:05:09 2013 +0100
@@ -31,7 +31,8 @@
}
overlayHtml['bodyContent'] = content.innerHTML;
- var width = gLayout.getTopICommentsWidth() ;
+ var width = gLayout.getTopICommentsWidth();
+ width += gLayout.iCommentsRequiredThreadPadding (); // SID: use max available space as there is no indentation on that box
var overlay = new CY.Overlay( {
zIndex :3,
--- a/src/cm/media/js/site/c_text_view_comments_to_frame.js Tue Nov 05 18:29:29 2013 +0100
+++ b/src/cm/media/js/site/c_text_view_comments_to_frame.js Wed Nov 06 19:05:09 2013 +0100
@@ -42,6 +42,8 @@
// icomments
gIComments.setWidth(iCommentWidth) ;
+ iCommentWidth += gLayout.iCommentsRequiredThreadPadding (); // SID: use max available space as there is no indentation on that box
+
//forms
gICommentForm['overlay'].get('boundingBox').setStyle('width', iCommentWidth + 'px') ;
changeFormFieldsWidth(gICommentForm['formId'], iCommentWidth) ;