Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Confluence: <div id="splitter"> missed.

Ivan Jancik
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 10, 2019

Our company upgraded Confluence version to 6.12.2.
Up to now I used short javascript to hide the confluence-page-tree-menu on the left during monitoring in my script.
In new version element <div id="splitter"> on confluence-web-page missed.
Because of the abovementioned I need to refactor the javascript.

// ------------------------------------------------------------------------------------------
// Script: R_PanelFullWidth.js
// Script sets L-panel width to 0 and R-panel width to full width of current window
// for Atlassian Confluence web-page:
// ------------------------------------------------------------------------------------------
// ss_width - splitter-sidebar
// vs_left - vsplitter
// sc_left - splitter-content
// sc_width - splitter-content
// READ all current values
var ss_width=document.getElementById("splitter-sidebar").style.width; // by ID
var vs_left=document.getElementsByClassName("vsplitbar").item(0).style.left; // ! by className !
var sc_left=document.getElementById("splitter-content").style.left;
var sc_width=document.getElementById("splitter-content").style.width;
// parameter sc_width is connected with parameter sc_left - complementary pair
var offset = "5px";
var diff_left = parseInt( sc_left, 10 ) - parseInt( offset, 10 ) + "px"; // - offset
var sc_width2 = parseInt( sc_width, 10 ) + parseInt( diff_left, 10 ) + "px"; // + diff_left
// SET all 4 values !
document.getElementById("splitter-sidebar").style.width="0px";
document.getElementsByClassName("vsplitbar").item(0).style.left="0px";
document.getElementById("splitter-content").style.left="5px";
document.getElementById("splitter-content").style.width=sc_width2;
// ------------------------------------------------------------------------------------------

Have any hint or any link with quick solution of this feature with new elements
<div class="ia-splitter">
<div class="ia-splitter-left"> ... ?

Thank you.

Ivan

1 answer

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 10, 2019

Jira only goes up to version 7.something, and Confluence 6.something.  Could you give us the actual version you are on now?   (Also, Jira doesn't have a page tree, so I assume this is just for Confluence)

Ivan Jancik
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 10, 2019

Nowadays, our company upgraded more SW. So I made mistake with version number. Confluence version was corrected, Sorry.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events