Merge branch 'master' of https://github.com/Pita/etherpad-lite
This commit is contained in:
commit
d4e677cc00
|
@ -1035,6 +1035,59 @@ background-repeat: no-repeat;
|
|||
margin-left: 1px;
|
||||
margin-top: 1px;
|
||||
}
|
||||
.buttonicon-bold {
|
||||
background-position: 0px -116px;
|
||||
}
|
||||
.buttonicon-italic {
|
||||
background-position: 0px 0px;
|
||||
}
|
||||
.buttonicon-underline {
|
||||
background-position: 0px -236px;
|
||||
}
|
||||
.buttonicon-strikethrough {
|
||||
background-position: 0px -200px;
|
||||
}
|
||||
.buttonicon-insertorderedlist {
|
||||
background-position: 0px -477px
|
||||
}
|
||||
.buttonicon-insertunorderedlist {
|
||||
background-position: 0px -34px;
|
||||
}
|
||||
.buttonicon-indent {
|
||||
background-position: 0px -52px;
|
||||
}
|
||||
.buttonicon-outdent {
|
||||
background-position: 0px -134px;
|
||||
}
|
||||
.buttonicon-undo {
|
||||
background-position: 0px -255px;
|
||||
}
|
||||
.buttonicon-redo {
|
||||
background-position :0px -166px;
|
||||
}
|
||||
.buttonicon-clearauthorship {
|
||||
background-position: 0px -86px;
|
||||
}
|
||||
.buttonicon-settings {
|
||||
background-position: 0px -436px;
|
||||
}
|
||||
.buttonicon-import_export {
|
||||
background-position: 0px -68px;
|
||||
}
|
||||
.buttonicon-embed {
|
||||
background-position: 0px -18px;
|
||||
}
|
||||
.buttonicon-history {
|
||||
background-position: 0px -218px;
|
||||
}
|
||||
.buttonicon-chat {
|
||||
background-position: 0px -102px;
|
||||
display: inline-block;
|
||||
}
|
||||
.buttonicon-showusers {
|
||||
background-position: 0px -183px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
#usericon
|
||||
{
|
||||
|
@ -1179,7 +1232,7 @@ label {
|
|||
|
||||
.popup {
|
||||
font-size: 14px;
|
||||
width: 400px;
|
||||
width: 450px;
|
||||
z-index: 500;
|
||||
padding: 10px;
|
||||
border-radius: 6px;
|
||||
|
@ -1221,6 +1274,8 @@ label {
|
|||
|
||||
.right_popup {
|
||||
float: left;
|
||||
width: 50%;
|
||||
box-sizing: border-box;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
|
@ -1231,10 +1286,6 @@ label {
|
|||
display: none;
|
||||
}
|
||||
|
||||
#settingsmenu .right_popup {
|
||||
float:none;
|
||||
}
|
||||
|
||||
.note {
|
||||
color: #ddd;
|
||||
font-size: 11px;
|
||||
|
|
|
@ -236,12 +236,19 @@ function OUTER(gscope)
|
|||
{
|
||||
bgcolor = fadeColor(bgcolor, info.fade);
|
||||
}
|
||||
|
||||
dynamicCSS.selectorStyle(getAuthorColorClassSelector(
|
||||
getAuthorClassName(author))).backgroundColor = bgcolor;
|
||||
|
||||
dynamicCSSTop.selectorStyle(getAuthorColorClassSelector(
|
||||
getAuthorClassName(author))).backgroundColor = bgcolor;
|
||||
// Text color
|
||||
var txtcolor = (colorutils.luminosity(colorutils.css2triple(bgcolor)) < 0.45) ? '#ffffff' : '#000000';
|
||||
|
||||
var authorStyle = dynamicCSS.selectorStyle(getAuthorColorClassSelector(
|
||||
getAuthorClassName(author)));
|
||||
authorStyle.backgroundColor = bgcolor;
|
||||
authorStyle.color = txtcolor;
|
||||
|
||||
var authorStyleTop = dynamicCSSTop.selectorStyle(getAuthorColorClassSelector(
|
||||
getAuthorClassName(author)));
|
||||
authorStyleTop.backgroundColor = bgcolor;
|
||||
authorStyleTop.color = txtcolor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3138,11 +3145,12 @@ function OUTER(gscope)
|
|||
// Such a div is what IE 6 creates naturally when you make a blank line
|
||||
// in a document of divs. However, when copy-and-pasted the div will
|
||||
// contain a space, so we note its emptiness with a property.
|
||||
lineElem.innerHTML = "";
|
||||
lineElem.innerHTML = " "; // Frist we set a value that isnt blank
|
||||
// a primitive-valued property survives copy-and-paste
|
||||
setAssoc(lineElem, "shouldBeEmpty", true);
|
||||
// an object property doesn't
|
||||
setAssoc(lineElem, "unpasted", {});
|
||||
lineElem.innerHTML = ""; // Then we make it blank.. New line and no space = Awesome :)
|
||||
};
|
||||
var lineClass = 'ace-line';
|
||||
result.appendSpan = function(txt, cls)
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
var padutils = require('/pad_utils').padutils;
|
||||
var browser = require('/ace2_common').browser;
|
||||
var padcookie = require('/pad_cookie').padcookie;
|
||||
|
||||
var chat = (function()
|
||||
{
|
||||
|
@ -69,16 +70,17 @@ var chat = (function()
|
|||
chatMentions = 0;
|
||||
document.title = title;
|
||||
},
|
||||
stickToScreen: function() // Make chat stick to right hand side of screen
|
||||
stickToScreen: function(fromInitialCall) // Make chat stick to right hand side of screen
|
||||
{
|
||||
console.log(isStuck);
|
||||
chat.show();
|
||||
if(!isStuck) { // Stick it to
|
||||
if(!isStuck || fromInitialCall) { // Stick it to
|
||||
padcookie.setPref("chatAlwaysVisible", true);
|
||||
$('#chatbox').css({"right":"0px", "top":"36px", "border-radius":"0px", "height":"auto", "border-right":"none", "border-left":"1px solid #ccc", "border-top":"none", "background-color":"#f1f1f1", "width":"185px"});
|
||||
$('#chattext').css({"top":"0px"});
|
||||
$('#editorcontainer').css({"right":"192px", "width":"auto"});
|
||||
isStuck = true;
|
||||
} else { // Unstick it
|
||||
padcookie.setPref("chatAlwaysVisible", false);
|
||||
$('#chatbox').css({"right":"20px", "top":"auto", "border-top-left-radius":"5px", "border-top-right-radius":"5px", "border-right":"1px solid #999", "height":"200px", "border-top":"1px solid #999", "background-color":"#f7f7f7"});
|
||||
$('#chattext').css({"top":"25px"});
|
||||
$('#editorcontainer').css({"right":"0px", "width":"100%"});
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -23,88 +23,88 @@
|
|||
<ul id="menu_left">
|
||||
<li onClick="window.pad&&pad.editbarClick('bold');return false" >
|
||||
<a title="Bold (ctrl-B)">
|
||||
<div class="buttonicon" style="background-position:0px -116px"></div>
|
||||
<div class="buttonicon buttonicon-bold"></div>
|
||||
</a>
|
||||
</li>
|
||||
<li onClick="window.pad&&pad.editbarClick('italic'); return false;" >
|
||||
<a title="Italics (ctrl-I)">
|
||||
<div class="buttonicon" style="background-position:0px 0px"></div>
|
||||
<div class="buttonicon buttonicon-italic"></div>
|
||||
</a>
|
||||
</li>
|
||||
<li onClick="window.pad&&pad.editbarClick('underline');return false;" >
|
||||
<a title="Underline (ctrl-U)">
|
||||
<div class="buttonicon" style="background-position:0px -236px;margin-top:1px;"></div>
|
||||
<div class="buttonicon buttonicon-underline"></div>
|
||||
</a>
|
||||
</li>
|
||||
<li onClick="window.pad&&pad.editbarClick('strikethrough');return false;" >
|
||||
<a title="Strikethrough">
|
||||
<div class="buttonicon" style="background-position:0px -200px"></div>
|
||||
<div class="buttonicon buttonicon-strikethrough"></div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="separator"></li>
|
||||
<li onClick="window.pad&&pad.editbarClick('insertorderedlist');return false;" >
|
||||
<a title="Toggle Ordered List">
|
||||
<div class="buttonicon" style="background-position:0px -477px"></div>
|
||||
<div class="buttonicon buttonicon-insertorderedlist"></div>
|
||||
</a>
|
||||
</li>
|
||||
<li onClick="window.pad&&pad.editbarClick('insertunorderedlist');return false;" >
|
||||
<a title="Toggle Bullet List">
|
||||
<div class="buttonicon" style="background-position:0px -34px"></div>
|
||||
<div class="buttonicon buttonicon-insertunorderedlist"></div>
|
||||
</a>
|
||||
</li>
|
||||
<li onClick="window.pad&&pad.editbarClick('indent');return false;" >
|
||||
<a title="Indent">
|
||||
<div class="buttonicon" style="background-position:0px -52px"></div>
|
||||
<div class="buttonicon buttonicon-indent"></div>
|
||||
</a>
|
||||
</li>
|
||||
<li onClick="window.pad&&pad.editbarClick('outdent');return false;" >
|
||||
<a title="Unindent">
|
||||
<div class="buttonicon" style="background-position:0px -134px"></div>
|
||||
<div class="buttonicon buttonicon-outdent"></div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="separator"></li>
|
||||
<li onClick="window.pad&&pad.editbarClick('undo');return false;" >
|
||||
<a title="Undo (ctrl-Z)">
|
||||
<div class="buttonicon" style="background-position:0px -255px"></div>
|
||||
<div class="buttonicon buttonicon-undo"></div>
|
||||
</a>
|
||||
</li>
|
||||
<li onClick="window.pad&&pad.editbarClick('redo');return false;" >
|
||||
<a title="Redo (ctrl-Y)">
|
||||
<div class="buttonicon" style="background-position:0px -166px"></div>
|
||||
<div class="buttonicon buttonicon-redo"></div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="separator"></li>
|
||||
<li id="clearAuthorship" onClick="window.pad&&pad.editbarClick('clearauthorship');return false;" >
|
||||
<a title="Clear Authorship Colors">
|
||||
<div class="buttonicon" style="background-position:0px -86px"></div>
|
||||
<div class="buttonicon buttonicon-clearauthorship"></div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul id="menu_right">
|
||||
<li onClick="window.pad&&pad.editbarClick('settings');return false;">
|
||||
<a id="settingslink" title="Settings of this pad">
|
||||
<div class="buttonicon" style="background-position:0px -436px"></div>
|
||||
<div class="buttonicon buttonicon-settings"></div>
|
||||
</a>
|
||||
</li>
|
||||
<li onClick="window.pad&&pad.editbarClick('import_export');return false;">
|
||||
<a id="exportlink" title="Import/Export from/to different document formats">
|
||||
<div class="buttonicon" style="background-position:0px -68px"></div>
|
||||
<div class="buttonicon buttonicon-import_export"></div>
|
||||
</a>
|
||||
</li>
|
||||
<li onClick="window.pad&&pad.editbarClick('embed');return false;" >
|
||||
<a id="embedlink" title="Share and Embed this pad">
|
||||
<div class="buttonicon" style="background-position:0px -18px"></div>
|
||||
<div class="buttonicon buttonicon-embed"></div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="separator"></li>
|
||||
<li id="timesliderlink" onClick="document.location = document.location.pathname+ '/timeslider'">
|
||||
<a title="Show the history of this pad">
|
||||
<div class="buttonicon" style="background-position:0px -218px"></div>
|
||||
<div class="buttonicon buttonicon-history"></div>
|
||||
</a>
|
||||
</li>
|
||||
<li id="usericon" onClick="window.pad&&pad.editbarClick('showusers');return false;" >
|
||||
<a title="Show connected users">
|
||||
<div class="buttonicon" id="usericonback" style="background-position:0px -183px;display:inline-block;"></div>
|
||||
<div class="buttonicon buttonicon-showusers" id="usericonback"></div>
|
||||
<span id="online_count">1</span>
|
||||
</a>
|
||||
</li>
|
||||
|
@ -228,7 +228,7 @@
|
|||
<div id="chaticon">
|
||||
<a onClick="chat.show();return false;" title="Open the chat for this pad">
|
||||
<span id="chatlabel">Chat</span>
|
||||
<div class="buttonicon" style="background-position:0px -102px;display:inline-block;"></div>
|
||||
<div class="buttonicon buttonicon-chat"></div>
|
||||
</a>
|
||||
<span id="chatcounter">0</span>
|
||||
</div>
|
||||
|
|
|
@ -293,7 +293,7 @@
|
|||
<ul>
|
||||
<li onClick="window.padeditbar.toolbarClick('import_export');return false;">
|
||||
<a id="exportlink" title="Export to different document formats">
|
||||
<div class="buttonicon" style="background-position:0px -68px"></div>
|
||||
<div class="buttonicon buttonicon-import_export"></div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
Loading…
Reference in New Issue