mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiEditor
synced 2024-11-25 08:48:18 +00:00
7721909f9f
* Code clean up in preparation for enabling linting in the future * Update code to use latest code conventions and best practices: - Make use of jQuery.Event (e.g. no need to check both e.keyCode and e.which) - jQuery: .size() -> .length - jQuery: (where appropiate) .attr() -> .prop() Setting properties like 'checked' via attr() has been deprecated in jQuery. - Whitespace - Single quotes instead of double quotes - Use literal keys in object literals instead of strings - Pass mediaWiki to closure, use mw. locally instead of "mediaWiki" global directly. - Fix indentation - Brackets around if, else and for bodies - Strict comparison to 0, null, false, true etc. - Fix missing radix parameter in parseInt - Use local $ instead of global $ - Use `foo || bar` instead of `foo ? foo : bar` - Variable scope hoisting - Double/redundant variable declarations - ['foo'] is better written in dot notation - New line at EOF - Consistency in jQuery construction: Tag name for element creation $( '<div>' ) Valid html for html parsing $( '<div foo="bar"></div>' ) - Fix regex escape warnings per JSLint/JSHint. Do escape ][, don't escape >< - .. * Add .jshintrc / .jshintignore * Updated most files, but not all. Too much at once. Change-Id: I445639b25a9688b3cdf9e5449e3d31cbcfa9c7ae
205 lines
3.4 KiB
CSS
205 lines
3.4 KiB
CSS
/*
|
|
* CSS for WikiEditor Table of Contents jQuery plugin
|
|
*/
|
|
|
|
.wikiEditor-ui-toc {
|
|
/* height and width are set dynamically */
|
|
/*float: right;*/
|
|
padding: 0;
|
|
overflow: auto;
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
.wikiEditor-ui-toc {
|
|
border-left: solid silver 1px;
|
|
}
|
|
|
|
.wikiEditor-ui-toc ul {
|
|
padding: 0;
|
|
margin: 0;
|
|
list-style: none;
|
|
/* IE needs to be told in great detail how to act, or it misbehaves */
|
|
list-style-image: none;
|
|
list-style-position: outside;
|
|
list-style-type: none;
|
|
width: 100%;
|
|
}
|
|
|
|
.tab-toc {
|
|
/* Should match the toolbar */
|
|
/* @embed */
|
|
background-image: url(images/toolbar/base.png);
|
|
background-position: left top;
|
|
background-repeat: repeat-x;
|
|
height: 26px;
|
|
padding: 3px 0;
|
|
line-height: 26px;
|
|
padding-left: 1em;
|
|
border-bottom: solid 1px silver;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.tab-toc a {
|
|
outline: none;
|
|
}
|
|
|
|
.wikiEditor-ui-toc li {
|
|
padding: 0;
|
|
margin: 0;
|
|
}
|
|
|
|
.wikiEditor-ui-toc ul ul {
|
|
padding: 0;
|
|
margin: 0;
|
|
margin-bottom: 0 !important;
|
|
margin-top: 0 !important;
|
|
list-style: none;
|
|
background-image: none;
|
|
}
|
|
|
|
.wikiEditor-ui-toc ul li div {
|
|
display: block;
|
|
font-size: 0.9em;
|
|
cursor: pointer;
|
|
color: #0645ad;
|
|
}
|
|
|
|
.wikiEditor-ui-toc ul li div {
|
|
padding: 0.125em;
|
|
padding-left: 1em;
|
|
}
|
|
|
|
.wikiEditor-ui-toc ul ul li div {
|
|
padding-left: 2em;
|
|
}
|
|
|
|
.wikiEditor-ui-toc ul ul ul li div {
|
|
padding-left: 3em;
|
|
}
|
|
|
|
.wikiEditor-ui-toc ul ul ul ul li div {
|
|
padding-left: 4em;
|
|
}
|
|
|
|
.wikiEditor-ui-toc ul ul ul ul ul li div {
|
|
padding-left: 5em;
|
|
}
|
|
|
|
.wikiEditor-ui-toc ul ul ul ul ul ul li div {
|
|
padding-left: 6em;
|
|
}
|
|
|
|
.wikiEditor-ui-toc ul li div.current {
|
|
background-color: #FAFAFA;
|
|
color: #333333;
|
|
}
|
|
|
|
.wikiEditor-ui-toc ul li div.section-0 {
|
|
font-size: 1em;
|
|
padding-top: 0.5em;
|
|
padding-bottom: 0.5em;
|
|
border-bottom: solid 1px #DDDDDD;
|
|
}
|
|
/* Collapsing changes */
|
|
.wikiEditor-ui-toc {
|
|
overflow-y: hidden;
|
|
position: relative;
|
|
}
|
|
|
|
.wikiEditor-ui-toc ul {
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
height: 100%;
|
|
margin-bottom: 0 !important;
|
|
}
|
|
|
|
.wikiEditor-ui-toc ul ul {
|
|
float: none;
|
|
height: auto;
|
|
}
|
|
#wikiEditor-ui-toc-collapse {
|
|
height: 100%;
|
|
width: 18px;
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
}
|
|
|
|
.wikiEditor-ui-toc-collapse-open {
|
|
/* @embed */
|
|
background: #f3f3f3 url(images/toc/close.png) 4px 50% no-repeat;
|
|
border-left: 1px solid #DDDDDD;
|
|
}
|
|
|
|
.wikiEditor-ui-toc-collapse-closed {
|
|
/* @embed */
|
|
background: #f3f3f3 url(images/toc/open.png) 4px 50% no-repeat;
|
|
}
|
|
|
|
/* Resizing Changes */
|
|
.wikiEditor-ui-toc-resize-vertical,
|
|
.ui-resizable-w {
|
|
width: 4px;
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
height: 100%;
|
|
cursor: ew-resize;
|
|
}
|
|
|
|
.wikiEditor-ui .wikiEditor-ui-right {
|
|
overflow: visible;
|
|
}
|
|
|
|
.wikiEditor-ui-right .ui-resizable-w {
|
|
left: 0px !important;
|
|
z-index: 0;
|
|
}
|
|
|
|
.wikiEditor-ui-right .wikiEditor-ui-toc-resize-grip {
|
|
width: 5px;
|
|
height: 12px;
|
|
padding: 3px;
|
|
position: absolute;
|
|
top: 7px;
|
|
left: -12px !important;
|
|
cursor: ew-resize;
|
|
/* @embed */
|
|
background: url(images/toc/grip.png) 50% 50% no-repeat;
|
|
z-index: 0;
|
|
}
|
|
|
|
.wikiEditor-ui-toolbar .tab-toc {
|
|
float: right;
|
|
margin: 3px 16px 3px 3px;
|
|
line-height: 26px;
|
|
}
|
|
|
|
.wikiEditor-ui-toc-expandControl {
|
|
position: absolute;
|
|
z-index: 2;
|
|
top: 0px;
|
|
right: 10px;
|
|
height: 26px;
|
|
padding: 3px 0;
|
|
line-height: 26px;
|
|
padding-right: 1em;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.wikiEditor-ui-text textarea {
|
|
resize: none;
|
|
}
|
|
|
|
.wikiEditor-ui-text textarea:focus {
|
|
outline: none;
|
|
}
|
|
|
|
/* Self Clearing for the wikiText view */
|
|
.wikiEditor-ui-view-wikiText {
|
|
overflow: auto;
|
|
width: 100%;
|
|
}
|