diff -r 9e2b9e568e42 -r 053551f213fb src/cm/media/js/site/c_text_view_comments_to_frame.js --- a/src/cm/media/js/site/c_text_view_comments_to_frame.js Mon Nov 29 15:05:21 2010 +0100 +++ b/src/cm/media/js/site/c_text_view_comments_to_frame.js Tue Nov 30 09:53:35 2010 +0100 @@ -2,52 +2,52 @@ c_persistPreference = function(key1, key2, val) { - gPrefs.persist(key1, key2, val) ; + gPrefs.persist(key1, key2, val) ; } c_readDefaultPreference = function(key1, key2) { - return gConf['defaultPrefs'][key1][key2] ; + return gConf['defaultPrefs'][key1][key2] ; } c_readPreference = function(key1, key2) { - return gPrefs.get(key1,key2) ; + return gPrefs.get(key1,key2) ; } c_resetPreferences = function(entries) { - gPrefs.reset(entries) ; + gPrefs.reset(entries) ; } c_applyTextStyle = function(val) { - CY.use(val) ; + CY.use(val) ; } sliderValToPx = function (val) { - var winWidth = CY.DOM.winWidth() ; - if (gLayout.isInFrame()) - winWidth = parent.$(parent).width() ; - var theta = val / 100 ; - theta = Math.min(theta, gConf['sliderFixedMin']) ; - theta = Math.max(theta, gConf['sliderFixedMax']) ; - var colWidth = theta * winWidth ; - return Math.floor(colWidth) ; + var winWidth = CY.DOM.winWidth() ; + if (gLayout.isInFrame()) + winWidth = parent.$(parent).width() ; + var theta = val / 100 ; + theta = Math.min(theta, gConf['sliderFixedMin']) ; + theta = Math.max(theta, gConf['sliderFixedMax']) ; + var colWidth = theta * winWidth ; + return Math.floor(colWidth) ; } c_setCommentsColWidth = function(val) { - var colWidth = sliderValToPx(val) ; - gLayout.setLeftColumnWidth(colWidth) ; + var colWidth = sliderValToPx(val) ; + gLayout.setLeftColumnWidth(colWidth) ; - var iCommentWidth = gLayout.getTopICommentsWidthFromWidth(colWidth) ; + var iCommentWidth = gLayout.getTopICommentsWidthFromWidth(colWidth) ; - // icomments - gIComments.setWidth(iCommentWidth) ; + // icomments + gIComments.setWidth(iCommentWidth) ; - //forms - gICommentForm['overlay'].get('boundingBox').setStyle('width', iCommentWidth + 'px') ; - changeFormFieldsWidth(gICommentForm['formId'], iCommentWidth) ; - - if (gNewReply) - changeFormFieldsWidth(gNewReply['ids']['formId'], iCommentWidth) ; - if (gEdit) - changeFormFieldsWidth(gEdit['ids']['formId'], iCommentWidth) ; + //forms + gICommentForm['overlay'].get('boundingBox').setStyle('width', iCommentWidth + 'px') ; + changeFormFieldsWidth(gICommentForm['formId'], iCommentWidth) ; + + if (gNewReply) + changeFormFieldsWidth(gNewReply['ids']['formId'], iCommentWidth) ; + if (gEdit) + changeFormFieldsWidth(gEdit['ids']['formId'], iCommentWidth) ; }