mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
Comment out some of the sidebar code that is no longer used and add a cookie set and get for sticky chat view
This commit is contained in:
parent
3ca5a0877b
commit
e68643b67e
2 changed files with 24 additions and 8 deletions
|
@ -358,7 +358,6 @@ function handshake()
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Bind the colorpicker
|
||||
var fb = $('#colorpicker').farbtastic({ callback: '#mycolorpickerpreview', width: 220});
|
||||
}
|
||||
|
@ -450,7 +449,7 @@ var pad = {
|
|||
padcookie.init(clientVars.cookiePrefsToSet);
|
||||
|
||||
$("#widthprefcheck").click(pad.toggleWidthPref);
|
||||
$("#sidebarcheck").click(pad.toggleSidebar);
|
||||
// $("#sidebarcheck").click(pad.togglewSidebar);
|
||||
|
||||
pad.myUserInfo = {
|
||||
userId: clientVars.userId,
|
||||
|
@ -775,15 +774,17 @@ var pad = {
|
|||
|
||||
padsavedrevs.handleIsFullyConnected(isConnected);
|
||||
|
||||
pad.determineSidebarVisibility(isConnected && !isInitialConnect);
|
||||
// pad.determineSidebarVisibility(isConnected && !isInitialConnect);
|
||||
pad.determineChatVisibility(isConnected && !isInitialConnect);
|
||||
|
||||
},
|
||||
determineSidebarVisibility: function(asNowConnectedFeedback)
|
||||
/* determineSidebarVisibility: function(asNowConnectedFeedback)
|
||||
{
|
||||
if (pad.isFullyConnected())
|
||||
{
|
||||
var setSidebarVisibility = padutils.getCancellableAction("set-sidebar-visibility", function()
|
||||
{
|
||||
$("body").toggleClass('hidesidebar', !! padcookie.getPref('hideSidebar'));
|
||||
// $("body").toggleClass('hidesidebar', !! padcookie.getPref('hideSidebar'));
|
||||
});
|
||||
window.setTimeout(setSidebarVisibility, asNowConnectedFeedback ? 3000 : 0);
|
||||
}
|
||||
|
@ -793,6 +794,17 @@ var pad = {
|
|||
$("body").removeClass('hidesidebar');
|
||||
}
|
||||
},
|
||||
*/
|
||||
determineChatVisibility: function(asNowConnectedFeedback){
|
||||
var chatVisCookie = padcookie.getPref('chatAlwaysVisible');
|
||||
if(chatVisCookie){ // if the cookie is set for chat always visible
|
||||
chat.stickToScreen(true); // stick it to the screen
|
||||
$('#options-stickychat').prop("checked", true); // set the checkbox to on
|
||||
}
|
||||
else{
|
||||
$('#options-stickychat').prop("checked", false); // set the checkbox for off
|
||||
}
|
||||
},
|
||||
handleCollabAction: function(action)
|
||||
{
|
||||
if (action == "commitPerformed")
|
||||
|
@ -841,6 +853,7 @@ var pad = {
|
|||
$("#widthprefcheck").toggleClass('widthprefchecked', !! newValue).toggleClass('widthprefunchecked', !newValue);
|
||||
pad.handleWidthChange();
|
||||
},
|
||||
/*
|
||||
toggleSidebar: function()
|
||||
{
|
||||
var newValue = !padcookie.getPref('hideSidebar');
|
||||
|
@ -848,6 +861,7 @@ var pad = {
|
|||
$("#sidebarcheck").toggleClass('sidebarchecked', !newValue).toggleClass('sidebarunchecked', !! newValue);
|
||||
pad.determineSidebarVisibility();
|
||||
},
|
||||
*/
|
||||
handleWidthChange: function()
|
||||
{
|
||||
var isFullWidth = padcookie.getPref('fullWidth');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue