-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some tweaks to pagetree , thx to florian
- Loading branch information
Showing
2 changed files
with
80 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,46 @@ | ||
/*-- Addition for remembering expanded state of pages --*/ | ||
function writeSessionCookie (cookieName, cookieValue) { | ||
document.cookie = escape(cookieName) + "=" + escape(cookieValue) + ";"; | ||
} | ||
|
||
function toggle_viewers() { | ||
if(document.add.visibility.value == 'private') { | ||
document.getElementById('viewers').style.display = 'block'; | ||
} else if(document.add.visibility.value == 'registered') { | ||
document.getElementById('viewers').style.display = 'block'; | ||
} else { | ||
document.getElementById('viewers').style.display = 'none'; | ||
} | ||
} | ||
function toggle_visibility(id){ | ||
if(document.getElementById(id).style.display == "block") { | ||
document.getElementById(id).style.display = "none"; | ||
writeSessionCookie (id, "0");//Addition for remembering expanded state of pages | ||
} else { | ||
document.getElementById(id).style.display = "block"; | ||
writeSessionCookie (id, "1");//Addition for remembering expanded state of pages | ||
} | ||
} | ||
var plus = new Image; | ||
plus.src = "page_tree/icons/expand.png"; | ||
var minus = new Image; | ||
minus.src = "page_tree/icons/collapse.png"; | ||
function toggle_plus_minus(id) { | ||
var img_src = document.images['plus_minus_' + id].src; | ||
if(img_src == plus.src) { | ||
document.images['plus_minus_' + id].src = minus.src; | ||
} else { | ||
document.images['plus_minus_' + id].src = plus.src; | ||
} | ||
} | ||
|
||
if(typeof jQuery != 'undefined') { | ||
jQuery(document).ready(function($) { | ||
// fix for Flat Theme | ||
$('div.pages_list table td').css('padding-top',0).css('padding-bottom',0); | ||
$('table.pages_view tbody tr td').css('line-height','12px'); | ||
$('table.pages_view tbody tr td.list_menu_title').css('width','310px'); | ||
$('table.pages_view tbody tr td.list_page_id').css('width','68px'); | ||
$('td.header_list_page_id').css('width','60px').next('td').css('width','78px'); | ||
}); | ||
/*-- Addition for remembering expanded state of pages --*/ | ||
function writeSessionCookie (cookieName, cookieValue) { | ||
document.cookie = escape(cookieName) + "=" + escape(cookieValue) + ";"; | ||
} | ||
|
||
function toggle_viewers() { | ||
if(document.add.visibility.value == 'private') { | ||
document.getElementById('viewers').style.display = 'block'; | ||
} else if(document.add.visibility.value == 'registered') { | ||
document.getElementById('viewers').style.display = 'block'; | ||
} else { | ||
document.getElementById('viewers').style.display = 'none'; | ||
} | ||
} | ||
function toggle_visibility(id){ | ||
if(document.getElementById(id).style.display == "block") { | ||
document.getElementById(id).style.display = "none"; | ||
writeSessionCookie (id, "0");//Addition for remembering expanded state of pages | ||
} else { | ||
document.getElementById(id).style.display = "block"; | ||
writeSessionCookie (id, "1");//Addition for remembering expanded state of pages | ||
} | ||
} | ||
var plus = new Image; | ||
plus.src = THEME_URL+"/images/expand.png"; | ||
var minus = new Image; | ||
minus.src = THEME_URL+"/images/collapse.png"; | ||
function toggle_plus_minus(id) { | ||
var img_src = document.images['plus_minus_' + id].src; | ||
if(img_src == plus.src) { | ||
document.images['plus_minus_' + id].src = minus.src; | ||
} else { | ||
document.images['plus_minus_' + id].src = plus.src; | ||
} | ||
} | ||
|
||
if(typeof jQuery != 'undefined') { | ||
jQuery(document).ready(function($) { | ||
// fix for Flat Theme | ||
$('div.pages_list table td').css('padding-top',0).css('padding-bottom',0); | ||
$('table.pages_view tbody tr td').css('line-height','12px'); | ||
//$('table.pages_view tbody tr td.list_menu_title').css('width','300px'); | ||
//$('table.pages_view tbody tr td.list_page_id').css('width','68px'); | ||
//$('td.header_list_page_id').css('width','60px').next('td').css('width','78px'); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters