Merge pull request #179 from taigaio/us/97/markdown-help

Add help button in WYSIWYG and markdown syntax in taiga-web
stable
Jesús Espino 2014-11-27 13:17:31 +01:00
commit 7cc56aa719
6 changed files with 71 additions and 6 deletions

View File

@ -564,6 +564,10 @@ EditableDescriptionDirective = ($window, $document, $rootscope, $repo, $confirm,
<textarea placeholder="Empty space is so boring... go on be descriptive... A rose by any other name would smell as sweet..." <textarea placeholder="Empty space is so boring... go on be descriptive... A rose by any other name would smell as sweet..."
ng-model="item.description" ng-model="item.description"
tg-markitup="tg-markitup"></textarea> tg-markitup="tg-markitup"></textarea>
<a class="help-markdown" href="https://taiga.io/support/taiga-markdown-syntax/" target="_blank" title="Mardown syntax help">
<span class="icon icon-help"></span>
<span>Markdown syntax help</span>
</a>
<span class="save-container"> <span class="save-container">
<a class="save icon icon-floppy" href="" title="Save" /> <a class="save icon icon-floppy" href="" title="Save" />
</span> </span>

View File

@ -233,6 +233,10 @@ HistoryDirective = ($log, $loading) ->
ng-model="<%- ngmodel %>.comment" tg-markitup="tg-markitup"> ng-model="<%- ngmodel %>.comment" tg-markitup="tg-markitup">
</textarea> </textarea>
<% if (mode !== "edit") { %> <% if (mode !== "edit") { %>
<a class="help-markdown" href="https://taiga.io/support/taiga-markdown-syntax/" target="_blank" title="Mardown syntax help">
<span class="icon icon-help"></span>
<span>Markdown syntax help</span>
</a>
<a href="" title="Comment" class="button button-green save-comment">Comment</a> <a href="" title="Comment" class="button button-green save-comment">Comment</a>
<% } %> <% } %>
</div> </div>

View File

@ -215,14 +215,17 @@ EditableWikiContentDirective = ($window, $document, $repo, $confirm, $loading, $
$analytics) -> $analytics) ->
template = """ template = """
<div class="view-wiki-content"> <div class="view-wiki-content">
<section class="wysiwyg" <section class="wysiwyg" tg-bind-html="wiki.html"></section>
tg-bind-html="wiki.html"></section>
<span class="edit icon icon-edit" title="Edit"></span> <span class="edit icon icon-edit" title="Edit"></span>
</div> </div>
<div class="edit-wiki-content" style="display: none;"> <div class="edit-wiki-content" style="display: none;">
<textarea placeholder="Write your wiki page here" <textarea placeholder="Write your wiki page here"
ng-model="wiki.content" ng-model="wiki.content"
tg-markitup="tg-markitup"></textarea> tg-markitup="tg-markitup"></textarea>
<a class="help-markdown" href="https://taiga.io/support/taiga-markdown-syntax/" target="_blank" title="Mardown syntax help">
<span class="icon icon-help"></span>
<span>Markdown syntax help</span>
</a>
<span class="action-container"> <span class="action-container">
<a class="save icon icon-floppy" href="" title="Save" /> <a class="save icon icon-floppy" href="" title="Save" />
<a class="cancel icon icon-delete" href="" title="Cancel" /> <a class="cancel icon icon-delete" href="" title="Cancel" />

View File

@ -177,7 +177,6 @@
textarea { textarea {
background: $white; background: $white;
height: 10rem; height: 10rem;
margin-bottom: 2rem;
} }
.save-container { .save-container {
position: absolute; position: absolute;
@ -217,6 +216,24 @@
right: 2.5rem; right: 2.5rem;
top: .4rem; top: .4rem;
} }
.help-markdown {
@extend %small;
color: $gray-light;
&:hover {
span {
@include transition(color .2s linear);
color: $grayer;
}
.icon {
@include transition(color .2s linear);
color: $fresh-taiga;
}
}
.icon {
color: $gray-light;
margin-right: .2rem;
}
}
} }
} }

View File

@ -1,5 +1,6 @@
.wiki { .wiki {
.remove { .remove,
.help-markdown {
@extend %small; @extend %small;
color: $gray-light; color: $gray-light;
&:hover { &:hover {
@ -9,12 +10,25 @@
} }
.icon { .icon {
@include transition(color .2s linear); @include transition(color .2s linear);
color: $red;
} }
} }
.icon { .icon {
color: $gray-light; color: $gray-light;
margin-right: .3rem; margin-right: .2rem;
}
}
.remove {
&:hover {
.icon {
color: $red;
}
}
}
.help-markdown {
&:hover {
.icon {
color: $fresh-taiga;
}
} }
} }
} }

View File

@ -73,6 +73,10 @@
@include transition(height .3s ease-in); @include transition(height .3s ease-in);
height: 6rem; height: 6rem;
} }
.help-markdown {
@include transition(opacity .3s linear);
opacity: 1;
}
.preview-icon { .preview-icon {
opacity: 1; opacity: 1;
position: absolute; position: absolute;
@ -85,6 +89,25 @@
height: 5rem; height: 5rem;
min-height: 41px; min-height: 41px;
} }
.help-markdown {
@extend %small;
color: $gray-light;
opacity: 0;
&:hover {
span {
@include transition(color .2s linear);
color: $grayer;
}
.icon {
@include transition(color .2s linear);
color: $fresh-taiga;
}
}
.icon {
color: $gray-light;
margin-right: .2rem;
}
}
.save-comment { .save-comment {
color: $white; color: $white;
float: right; float: right;