1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-23 15:19:42 +02:00

Merge pull request #48 from documize/edit-template

edit saved templates
This commit is contained in:
Harvey Kandola 2016-10-18 13:07:51 -07:00 committed by GitHub
commit 06ef6d3a09
4 changed files with 33 additions and 21 deletions

View file

@ -39,6 +39,7 @@ export default Ember.Component.extend(TooltipMixin, NotifierMixin, {
title: "Empty",
description: "An empty canvas for your words",
img: "template-blank",
locked: true
};
saved.forEach(function(t) {

View file

@ -209,25 +209,10 @@
> .item {
list-style: none;
cursor: pointer;
padding: 10px 5px;
margin: 5px 0;
margin: 20px 0;
@include ease-in();
&:hover {
@include ease-in();
> .details {
> .title {
color: $color-primary;
}
> .desc {
color: $color-primary;
}
}
}
.icon {
text-align: center;
display: inline-block;
@ -240,12 +225,26 @@
height: 40px;
width: 40px;
}
> .edit-control {
color: $color-gray;
font-size: 0.9rem;
text-align: center;
float: left;
margin: 5px 0 0 9px;
cursor: pointer;
&:hover {
color: $color-link;
}
}
}
> .details {
vertical-align: top;
display: inline-block;
width: 80%;
cursor: pointer;
> .title {
font-size: 1rem;
@ -255,10 +254,16 @@
}
> .desc {
color: $color-gray;
color: $color-off-black;
font-size: 0.9rem;
margin-top: 5px;
}
&:hover {
> .title, > .desc {
color: $color-link !important;
}
}
}
}
}

View file

@ -7,6 +7,7 @@
{{folder/start-document
savedTemplates=savedTemplates
folder=folder
editor=folderService.canEditCurrentFolder
onEditTemplate=(action 'onEditTemplate')
onDocumentTemplate=(action 'onDocumentTemplate')}}
{{/if}}

View file

@ -2,12 +2,17 @@
<div class="templates-list">
<ul class="list">
{{#each savedTemplates key="id"as |template|}}
<li class="item" {{action 'startDocument' template}}>
{{#each savedTemplates key="id" as |template|}}
<li class="item">
<div class="icon">
<img class="img" src="/assets/img/{{template.img}}.png" srcset="/assets/img/{{template.img}}@2x.png" />
{{#if editor}}
{{#unless template.locked}}
<div class="edit-control" {{action 'editTemplate' template}}>edit</div>
{{/unless}}
{{/if}}
</div>
<div class="details">
<div class="details" {{action 'startDocument' template}}>
<div class='title'>
{{template.title}}
</div>