$('.codeBox:not(.jsCodeViewer)').each($.proxy(function(index, codeBox) {
var $codeBox = $(codeBox).addClass('jsCodeViewer');
- $('<span class="icon icon16 fa-files-o pointer jsTooltip" title="' + WCF.Language.get('wcf.message.bbcode.code.copy') + '" />').appendTo($codeBox.find('div > h3')).click($.proxy(this._click, this));
+ $('<span class="codeBoxPlainSource icon icon16 fa-files-o pointer jsTooltip" title="' + WCF.Language.get('wcf.message.bbcode.code.copy') + '" />').appendTo($codeBox.find('.codeBoxHeader')).click($.proxy(this._click, this));
}, this));
},
});
if (this._dialog === null) {
- this._dialog = $('<div><textarea cols="60" rows="12" readonly="readonly" /></div>').hide().appendTo(document.body);
+ this._dialog = $('<div><textarea cols="60" rows="12" readonly></textarea></div>').hide().appendTo(document.body);
this._dialog.children('textarea').val($content);
this._dialog.wcfDialog({
title: WCF.Language.get('wcf.message.bbcode.code.copy')
box-shadow: 0 0 3px rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .24);
border-radius: 2px;
margin-top: 1em;
+ overflow: hidden;
padding: 10px;
+ position: relative;
+
+ &.collapsed {
+ max-height: 200px;
+
+ > .toggleButton {
+ bottom: 0;
+ box-shadow: 0 -10px 50px 10px opacify($wcfContentBackground, .9);
+ left: 0;
+ padding-bottom: 10px;
+ position: absolute;
+ right: 0;
+ }
+ }
> div {
+ > .codeBoxHeader {
+ align-items: center;
+ display: flex;
+
+ > .codeBoxHeadline {
+ flex: 1 1 auto;
+ padding: 0 10px;
+
+ @include wcfFontHeadline;
+ }
+
+ > .codeBoxPlainSource {
+ flex: 0 0 auto;
+ margin-left: 10px;
+ }
+ }
+
> ol {
- margin-left: 3.4em !important;
+ margin: 20px 0 0 3.4em !important;
position: relative;
&::before {
border-right: 1px solid $wcfContentBorderInner;
bottom: 0;
content: "";
+ left: -5px;
position: absolute;
top: 0;
}
> li {
+ font-family: Consolas, 'Courier New', monospace;
padding-left: 5px;
+ position: relative;
+ white-space: pre-wrap;
+ word-break: break-all;
+ word-wrap: break-word;
+
+ .lineAnchor {
+ bottom: 0;
+ left: -3.4em;
+ position: absolute;
+ top: 0;
+ width: 3.4em;
+ }
}
}
}
+
+ > .toggleButton {
+ background-color: opacify($wcfContentBackground, .9);
+ cursor: pointer;
+ display: block;
+ padding: 10px 20px 0 10px;
+ text-align: center;
+
+ @include wcfFontSmall;
+ }
}
/* ############## Code Styles ############## */
</category>
<category name="wcf.bbcode">
+ <item name="wcf.bbcode.button.collapse"><![CDATA[Weniger anzeigen]]></item>
+ <item name="wcf.bbcode.button.showAll"><![CDATA[Alles anzeigen]]></item>
<item name="wcf.bbcode.code"><![CDATA[Code]]></item>
<item name="wcf.bbcode.code.bash.title"><![CDATA[Shell-Script]]></item>
<item name="wcf.bbcode.code.c.title"><![CDATA[C]]></item>
</category>
<category name="wcf.bbcode">
+ <item name="wcf.bbcode.button.collapse"><![CDATA[Display Less]]></item>
+ <item name="wcf.bbcode.button.showAll"><![CDATA[Display More]]></item>
<item name="wcf.bbcode.code"><![CDATA[Code]]></item>
<item name="wcf.bbcode.code.bash.title"><![CDATA[Shell-Script]]></item>
<item name="wcf.bbcode.code.c.title"><![CDATA[C]]></item>