mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-08 16:05:05 -04:00
CSS adaptations + added 'normal' style in dropdown
This commit is contained in:
parent
332c6de873
commit
349b73977b
6 changed files with 80 additions and 32 deletions
|
@ -155,6 +155,26 @@ body.doesWrap {
|
||||||
padding-right: 1px;
|
padding-right: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h1{
|
||||||
|
font-size: 30px;
|
||||||
|
line-height: 35px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2{
|
||||||
|
font-size: 25px;
|
||||||
|
line-height: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3{
|
||||||
|
font-size: 20px;
|
||||||
|
line-height: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h4{
|
||||||
|
font-size: 15px;
|
||||||
|
line-height: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
p {
|
p {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,9 +58,18 @@ a img
|
||||||
margin-left: 2px;
|
margin-left: 2px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding: 4px 5px;
|
padding: 4px 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#editbar ul li.button
|
||||||
|
{
|
||||||
width: 18px;
|
width: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#editbar ul li.dropdown
|
||||||
|
{
|
||||||
|
padding: 2px 0 8px;
|
||||||
|
}
|
||||||
|
|
||||||
#editbar ul li a
|
#editbar ul li a
|
||||||
{
|
{
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
|
|
@ -5235,17 +5235,30 @@ function Ace2Inner(){
|
||||||
//apply the list type. If a specific level is requested, force it
|
//apply the list type. If a specific level is requested, force it
|
||||||
if(requestLevel)
|
if(requestLevel)
|
||||||
{
|
{
|
||||||
if(type+level == type+requestLevel)
|
mods.push([n, type+requestLevel]);
|
||||||
{
|
|
||||||
type = 'indent';
|
|
||||||
level = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
level = requestLevel;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
mods.push([n, allLinesAreList ? 'indent' + level : (t ? type + level : type + '1')]);
|
else
|
||||||
|
{
|
||||||
|
mods.push([n, allLinesAreList ? 'indent' + level : (t ? type + level : type + '1')]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
setLineListTypes(mods);
|
||||||
|
}
|
||||||
|
|
||||||
|
function doRevertBlockStyle(){
|
||||||
|
if (!(rep.selStart && rep.selEnd))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var firstLine, lastLine;
|
||||||
|
firstLine = rep.selStart[0];
|
||||||
|
lastLine = Math.max(firstLine, rep.selEnd[0] - ((rep.selEnd[1] === 0) ? 1 : 0));
|
||||||
|
|
||||||
|
var mods = [];
|
||||||
|
for (var n = firstLine; n <= lastLine; n++)
|
||||||
|
{
|
||||||
|
mods.push([n, '']);
|
||||||
}
|
}
|
||||||
setLineListTypes(mods);
|
setLineListTypes(mods);
|
||||||
}
|
}
|
||||||
|
@ -5268,6 +5281,7 @@ function Ace2Inner(){
|
||||||
editorInfo.ace_doInsertUnorderedList = doInsertUnorderedList;
|
editorInfo.ace_doInsertUnorderedList = doInsertUnorderedList;
|
||||||
editorInfo.ace_doInsertOrderedList = doInsertOrderedList;
|
editorInfo.ace_doInsertOrderedList = doInsertOrderedList;
|
||||||
editorInfo.ace_doInsertTitle = doInsertTitle;
|
editorInfo.ace_doInsertTitle = doInsertTitle;
|
||||||
|
editorInfo.ace_doRevertBlockStyle = doRevertBlockStyle;
|
||||||
|
|
||||||
var mozillaFakeArrows = (browser.mozilla && (function()
|
var mozillaFakeArrows = (browser.mozilla && (function()
|
||||||
{
|
{
|
||||||
|
|
|
@ -157,10 +157,14 @@ var padeditbar = (function()
|
||||||
else if (cmd == "style")
|
else if (cmd == "style")
|
||||||
{
|
{
|
||||||
var value = document.getElementById("style-select").value;
|
var value = document.getElementById("style-select").value;
|
||||||
var style = /([a-z]+)-([12345678])/.exec(value);
|
var style = value.split('-');
|
||||||
if(style[1]=="title")
|
if(style[0]=="title")
|
||||||
{
|
{
|
||||||
ace.ace_doInsertTitle(Number(style[2]));
|
ace.ace_doInsertTitle(Number(style[1]));
|
||||||
|
}
|
||||||
|
else if(style[0]=="normal")
|
||||||
|
{
|
||||||
|
ace.ace_doRevertBlockStyle();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (cmd == 'clearauthorship')
|
else if (cmd == 'clearauthorship')
|
||||||
|
|
|
@ -15,21 +15,22 @@
|
||||||
|
|
||||||
<div id="editbar">
|
<div id="editbar">
|
||||||
<ul id="menu_left">
|
<ul id="menu_left">
|
||||||
<li id="bold" onClick="window.pad&&pad.editbarClick('bold');return false">
|
<li class="button" id="bold" onClick="window.pad&&pad.editbarClick('bold');return false">
|
||||||
<a class="buttonicon buttonicon-bold" title="Bold (ctrl-B)"></a>
|
<a class="buttonicon buttonicon-bold" title="Bold (ctrl-B)"></a>
|
||||||
</li>
|
</li>
|
||||||
<li id="italic" onClick="window.pad&&pad.editbarClick('italic'); return false;">
|
<li class="button" id="italic" onClick="window.pad&&pad.editbarClick('italic'); return false;">
|
||||||
<a class="buttonicon buttonicon-italic" title="Italics (ctrl-I)"></a>
|
<a class="buttonicon buttonicon-italic" title="Italics (ctrl-I)"></a>
|
||||||
</li>
|
</li>
|
||||||
<li id="underline" onClick="window.pad&&pad.editbarClick('underline');return false;" >
|
<li class="button" id="underline" onClick="window.pad&&pad.editbarClick('underline');return false;" >
|
||||||
<a class="buttonicon buttonicon-underline" title="Underline (ctrl-U)"></a>
|
<a class="buttonicon buttonicon-underline" title="Underline (ctrl-U)"></a>
|
||||||
</li>
|
</li>
|
||||||
<li id="strikethrough" onClick="window.pad&&pad.editbarClick('strikethrough');return false;">
|
<li class="button" id="strikethrough" onClick="window.pad&&pad.editbarClick('strikethrough');return false;">
|
||||||
<a class="buttonicon buttonicon-strikethrough" title="Strikethrough"></a>
|
<a class="buttonicon buttonicon-strikethrough" title="Strikethrough"></a>
|
||||||
</li>
|
</li>
|
||||||
<li class="separator"></li>
|
<li class="separator"></li>
|
||||||
<li id="style">
|
<li class="dropdown" id="style">
|
||||||
<select id="style-select" onchange="window.pad&&pad.editbarClick('style');return false;">
|
<select id="style-select" onchange="window.pad&&pad.editbarClick('style');return false;">
|
||||||
|
<option value="normal">Normal</option>
|
||||||
<option value="title-1">First level title</option>
|
<option value="title-1">First level title</option>
|
||||||
<option value="title-2">Second level title</option>
|
<option value="title-2">Second level title</option>
|
||||||
<option value="title-3">Third level title</option>
|
<option value="title-3">Third level title</option>
|
||||||
|
@ -37,45 +38,45 @@
|
||||||
</select>
|
</select>
|
||||||
</li>
|
</li>
|
||||||
<li class="separator"></li>
|
<li class="separator"></li>
|
||||||
<li id="oderedlist" onClick="window.pad&&pad.editbarClick('insertorderedlist');return false;">
|
<li class="button" id="oderedlist" onClick="window.pad&&pad.editbarClick('insertorderedlist');return false;">
|
||||||
<a class="buttonicon buttonicon-insertorderedlist" title="Toggle Ordered List"></a>
|
<a class="buttonicon buttonicon-insertorderedlist" title="Toggle Ordered List"></a>
|
||||||
</li>
|
</li>
|
||||||
<li id="unoderedlist" onClick="window.pad&&pad.editbarClick('insertunorderedlist');return false;">
|
<li class="button" id="unoderedlist" onClick="window.pad&&pad.editbarClick('insertunorderedlist');return false;">
|
||||||
<a class="buttonicon buttonicon-insertunorderedlist" title="Toggle Bullet List"></a>
|
<a class="buttonicon buttonicon-insertunorderedlist" title="Toggle Bullet List"></a>
|
||||||
</li>
|
</li>
|
||||||
<li id="indent" onClick="window.pad&&pad.editbarClick('indent');return false;">
|
<li class="button" id="indent" onClick="window.pad&&pad.editbarClick('indent');return false;">
|
||||||
<a class="buttonicon buttonicon-indent" title="Indent"></a>
|
<a class="buttonicon buttonicon-indent" title="Indent"></a>
|
||||||
</li>
|
</li>
|
||||||
<li id="outdent" onClick="window.pad&&pad.editbarClick('outdent');return false;">
|
<li class="button" id="outdent" onClick="window.pad&&pad.editbarClick('outdent');return false;">
|
||||||
<a class="buttonicon buttonicon-outdent" title="Unindent"></a>
|
<a class="buttonicon buttonicon-outdent" title="Unindent"></a>
|
||||||
</li>
|
</li>
|
||||||
<li class="separator"></li>
|
<li class="separator"></li>
|
||||||
<li id="undo" onClick="window.pad&&pad.editbarClick('undo');return false;">
|
<li class="button" id="undo" onClick="window.pad&&pad.editbarClick('undo');return false;">
|
||||||
<a class="buttonicon buttonicon-undo" title="Undo (ctrl-Z)"></a>
|
<a class="buttonicon buttonicon-undo" title="Undo (ctrl-Z)"></a>
|
||||||
</li>
|
</li>
|
||||||
<li id="redo" onClick="window.pad&&pad.editbarClick('redo');return false;">
|
<li class="button" id="redo" onClick="window.pad&&pad.editbarClick('redo');return false;">
|
||||||
<a class="buttonicon buttonicon-redo" title="Redo (ctrl-Y)"></a>
|
<a class="buttonicon buttonicon-redo" title="Redo (ctrl-Y)"></a>
|
||||||
</li>
|
</li>
|
||||||
<li class="separator"></li>
|
<li class="separator"></li>
|
||||||
<li id="clearAuthorship" onClick="window.pad&&pad.editbarClick('clearauthorship');return false;">
|
<li class="button" id="clearAuthorship" onClick="window.pad&&pad.editbarClick('clearauthorship');return false;">
|
||||||
<a class="buttonicon buttonicon-clearauthorship" title="Clear Authorship Colors"></a>
|
<a class="buttonicon buttonicon-clearauthorship" title="Clear Authorship Colors"></a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul id="menu_right">
|
<ul id="menu_right">
|
||||||
<li id="settingslink" onClick="window.pad&&pad.editbarClick('settings');return false;">
|
<li class="button" id="settingslink" onClick="window.pad&&pad.editbarClick('settings');return false;">
|
||||||
<a class="buttonicon buttonicon-settings" id="settingslink" title="Settings of this pad"></a>
|
<a class="buttonicon buttonicon-settings" id="settingslink" title="Settings of this pad"></a>
|
||||||
</li>
|
</li>
|
||||||
<li id="importexportlink" onClick="window.pad&&pad.editbarClick('import_export');return false;">
|
<li class="button" id="importexportlink" onClick="window.pad&&pad.editbarClick('import_export');return false;">
|
||||||
<a class="buttonicon buttonicon-import_export" id="exportlink" title="Import/Export from/to different document formats"></a>
|
<a class="buttonicon buttonicon-import_export" id="exportlink" title="Import/Export from/to different document formats"></a>
|
||||||
</li>
|
</li>
|
||||||
<li id="embedlink" onClick="window.pad&&pad.editbarClick('embed');return false;" >
|
<li class="button" id="embedlink" onClick="window.pad&&pad.editbarClick('embed');return false;" >
|
||||||
<a class="buttonicon buttonicon-embed" id="embedlink" title="Share and Embed this pad"></a>
|
<a class="buttonicon buttonicon-embed" id="embedlink" title="Share and Embed this pad"></a>
|
||||||
</li>
|
</li>
|
||||||
<li class="separator"></li>
|
<li class="separator"></li>
|
||||||
<li id="timesliderlink" onClick="document.location = document.location.pathname+ '/timeslider'">
|
<li class="button" id="timesliderlink" onClick="document.location = document.location.pathname+ '/timeslider'">
|
||||||
<a class="buttonicon buttonicon-history" title="Show the history of this pad"></a>
|
<a class="buttonicon buttonicon-history" title="Show the history of this pad"></a>
|
||||||
</li>
|
</li>
|
||||||
<li id="usericon" onClick="window.pad&&pad.editbarClick('showusers');return false;" title="Show connected users">
|
<li class="button" id="usericon" onClick="window.pad&&pad.editbarClick('showusers');return false;" title="Show connected users">
|
||||||
<span class="buttonicon buttonicon-showusers" id="usericonback"></span>
|
<span class="buttonicon buttonicon-showusers" id="usericonback"></span>
|
||||||
<span id="online_count">1</span>
|
<span id="online_count">1</span>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -128,7 +128,7 @@
|
||||||
<div id="editbarright" class="editbarright">
|
<div id="editbarright" class="editbarright">
|
||||||
<!-- termporary place holder-->
|
<!-- termporary place holder-->
|
||||||
<ul>
|
<ul>
|
||||||
<li onClick="window.padeditbar.toolbarClick('import_export');return false;">
|
<li class="button" onClick="window.padeditbar.toolbarClick('import_export');return false;">
|
||||||
<a id="exportlink" title="Export to different document formats">
|
<a id="exportlink" title="Export to different document formats">
|
||||||
<div class="buttonicon buttonicon-import_export"></div>
|
<div class="buttonicon buttonicon-import_export"></div>
|
||||||
</a>
|
</a>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue