* Provides a specialized tab menu used for message options, integrates better into the editor.
*/
$.widget('wcf.messageTabMenu', {
+ /**
+ * pointer span
+ * @var jQuery
+ */
+ _span: null,
+
/**
* list of existing tabs and their containers
* @var array<object>
* Creates the message tab menu.
*/
_create: function() {
- var $tabs = this.element.find('> nav > ul > li:not(.jsFlexibleMenuDropdown)');
+ var $nav = this.element.find('> nav');
+ var $tabs = $nav.find('> ul > li:not(.jsFlexibleMenuDropdown)');
var $tabContainers = this.element.find('> div, > fieldset');
if ($tabs.length != $tabContainers.length) {
return;
}
+ // pointer span
+ this._span = $('<span />').appendTo($nav);
+
var $preselect = this.element.data('preselect');
this._tabs = [ ];
this._tabsByName = { };
});
}
+ this._span.css({
+ transform: 'translateX(' + $target.tab[0].offsetLeft + 'px)',
+ width: $target.tab[0].clientWidth + 'px'
+ });
+
$(window).trigger('resize');
},
this._containers = new Dictionary();
this._isLegacy = null;
this._tabs = new Dictionary();
- };
+ }
TabMenuSimple.prototype = {
/**
// get children
var tabs = elByTag('li', nav);
- if (tabs.length === null) {
+ if (tabs.length === 0) {
return false;
}
.redactor-box {
- border: 1px solid $wcfContentBorder;
- font-size: 0;
position: relative;
& + .messageTabMenu {
border: 1px solid $wcfContentBorderInner;
border-width: 1px 0 0 1px;
bottom: 0;
- font-size: 1rem;
opacity: 0;
padding: $wcfGapSmall;
position: absolute;
}
.redactor-editor {
+ border: 1px solid $wcfContentBorderInner;
+ border-top-width: 0;
max-height: 500px;
- min-height: 200px;
padding: 10px;
position: relative;
outline: none;
& + textarea {
border-width: 0;
box-shadow: none;
- font-size: 1rem;
outline: none;
padding: 10px;
resize: vertical;
table {
border-collapse: collapse;
- font-size: 14px;
+ //font-size: 14px; TODO
line-height: 1.6em;
td {
&::after {
content: $fa-var-pencil;
font-family: FontAwesome;
- font-size: $wcfFontSizeHeadline;
+ font-size: $wcfFontSizeHeadline; // TODO
position: absolute;
right: 10px;
top: 10px;
> div {
cursor: pointer;
- font-size: 1.4rem;
left: 50%;
padding: 1em 3em;
position: absolute;
}
}
-@media all and (min-width: 801px) {
- .redactor-editor {
- font-size: 1rem;
- }
-}
-
/* disable auto zoom in mobile safari */
@media only screen and (max-width: 800px) {
.redactor-editor + textarea {
}
.redactor-toolbar {
- background: repeating-linear-gradient(0deg, $wcfContentBorderInner 0px, $wcfContentBorderInner 3%, $wcfContentBackground 3%, $wcfContentBackground 100%);
- background-size: 100% 31px;
+ background-color: $wcfHeaderBackground;
display: flex;
flex-wrap: wrap;
+ padding: 7px 10px;
> li {
flex: 0 0 auto;
margin-bottom: 1px;
- &:last-of-type,
- &.separator {
- border-right: 1px solid $wcfContentBorderInner;
+ &:not(:last-child) {
+ margin-right: 10px;
}
> a {
- color: $wcfButtonText;
+ background-color: $wcfHeaderMenuBackground;
+ color: $wcfHeaderMenuLink;
display: block;
- font-size: 14px;
- height: 30px;
outline: none;
padding: 5px 8px;
text-align: center;
text-decoration: none;
+ @extend .wcfFontSmall;
+
&.redactor-button-disabled,
&.redactor-button-disabled:before,
&.redactor-button-disabled > i:before {
&:hover,
&.redactor-act,
&.dropact {
- background-color: $wcfButtonBackgroundActive;
- color: $wcfButtonTextActive;
+ background-color: $wcfHeaderMenuBackgroundActive;
+ color: $wcfHeaderMenuLinkActive;
}
}
}
border: 2px solid rgba(255, 255, 255, 1);
border-bottom-width: 0;
display: inline-block;
- font-size: 0;
+ font-size: 0; // TODO
height: 20px;
padding: 0;
margin: 0;
background-color: rgba(255, 255, 204, 1);
border: 5px dashed rgba(255, 204, 0);
box-sizing: border-box;
- font-size: 1.4rem;
+ font-size: 1.4rem; // TODO
position: absolute;
text-align: center;
vertical-align: middle;
// TODO: color: $wcfTooltipColor;
}
}
+
+.redactor-voice-label {
+ display: none;
+}
.messageTabMenu {
- // TODO: border: 1px solid $wcfContentBorder;
- border-top-width: 0;
- border-radius: 0 0 3px 3px;
-
> div,
- > fieldset{
- background-color: $wcfContentBackground;
- border-width: 0;
- border-radius: 0;
- // TODO: border-top: 1px solid $wcfContentBorder;
+ > fieldset,
+ > section {
display: none;
- padding: 15px 10px;
- position: static;
&.active {
display: block;
> div {
> nav {
- background-color: $wcfContentBackground;
- // TODO: border-bottom: 1px solid $wcfContentBorder;
- margin: -14px -21px 14px -21px;
- padding: $wcfGapTiny $wcfGapSmall;
-
ul {
- display: inline-block;
- font-size: 0;
white-space: nowrap;
li {
- display: inline-block;
outline: 0;
- vertical-align: baseline;
&.active a,
&.active a:hover {
- color: $wcfButtonTextActive;
- cursor: default;
+ color: $wcfContentLinkActive;
}
a {
- color: $wcfButtonText;
+ color: $wcfContentLinkActive;
display: block;
outline: 0;
- padding: 0 $wcfGapSmall;
@extend .userSelectNone;
@extend .wcfFontSmall;
&:hover {
- color: $wcfButtonTextActive;
- text-decoration: none;
+ color: $wcfContentLinkActive;
}
}
-
- &:not(:last-child) {
- padding-right: $wcfGapTiny;
- }
-
- &.dropdown > a {
- font-size: 1.0rem;
- padding: 4px 7px 2px;
- }
}
}
}
-
- > div,
- > fieldset {
- border-top-width: 0;
- }
}
}
.messageTabMenu + .innerError {
- box-sizing: border-box;
- margin-top: -1px;
+ margin-top: -1px; // TODO
width: 100%;
}
-.messageTabMenuNavigation > ul {
- background-color: $wcfContentBackground;
- font-size: 0;
- white-space: nowrap;
+.messageTabMenuNavigation {
+ position: relative;
- > li {
- display: inline-block;
+ > ul {
+ border-bottom: 1px solid $wcfContentBorderInner;
+ margin-bottom: 10px;
+ padding: 10px 0;
- > a {
- // TODO: border-right: 1px solid $wcfContentBorder;
- border-bottom: 1px solid transparent;
- color: $wcfButtonText;
- display: block;
- font-size: 1rem;
- margin-bottom: -1px;
- padding: 7px 14px 8px 14px;
- text-decoration: none;
-
- @extend .userSelectNone;
-
- &:hover {
- color: $wcfContentLink;
+ @extend .inlineList;
+
+ > li {
+ &:not(:last-child) {
+ margin-right: 20px;
}
- > span.icon {
- display: none;
- }
- }
-
- &.active {
> a {
- background-color: $wcfContentBackground;
- color: $wcfContentLink;
+ display: block;
+
+ @extend .userSelectNone;
+
+ > span.icon {
+ display: none;
+ }
}
}
}
+
+ > span {
+ border-top: 1px solid $wcfContentLink;
+ bottom: 0;
+ content: "";
+ position: absolute;
+ transition: transform .2s linear, width .2s linear;
+ }
}
@media only screen and (max-width: 800px) {
- .redactor-toolbar > li > a:hover {
- background-color: transparent !important;
- }
-
.messageTabMenu {
> nav > ul > li:not(.active) > a {
> span.icon {
}
> div > nav {
- margin: ($wcfGapTiny - $wcfGapSmall) -$wcfGapSmall $wcfGapSmall -$wcfGapSmall;
+ // TODO: margin: ($wcfGapTiny - $wcfGapSmall) -$wcfGapSmall $wcfGapSmall -$wcfGapSmall;
}
}
}