Skip to content

Commit

Permalink
Made PrimaryImage & Excerpt readonly for copies. Fixes #1644
Browse files Browse the repository at this point in the history
  • Loading branch information
tidyui committed Sep 10, 2021
1 parent 2e7e5d9 commit b19d195
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<div :class="{ 'd-none': selectedSetting != 'uid-settings' }">
<div class="form-group" v-if="usePrimaryImage">
<label>@Localizer.Content["Primary image"]</label>
<div class="block image-block primary-image primary-image-modal">
<div class="block image-block primary-image primary-image-modal" :class="{ readonly: isCopy}">
<div class="block-body has-media-picker rounded" :class="{ empty: primaryImage.id === null }">
<img class="rounded" :src="primaryImageUrl">
<div class="media-picker">
Expand All @@ -57,6 +57,7 @@
</div>
</div>
</div>
<div class="content-blocker"></div>
</div>
</div>
<div class="form-group">
Expand Down Expand Up @@ -102,12 +103,16 @@
</div>
<div class="form-group" v-if="useExcerpt">
<label>@Localizer.Content["Excerpt"]</label>
<div v-if="useHtmlExcerpt" class="block text-block ingress" :class="{ empty: isExcerptEmpty }">
<div v-if="useHtmlExcerpt" class="block text-block ingress" :class="{ empty: isExcerptEmpty, readonly: isCopy }">
<div id="excerpt-toolbar" class="component-toolbar"></div>
<div id="excerpt-body" class="block-body html-block" contenteditable="true" v-html="excerpt" v-on:blur="onExcerptBlur">
</div>
<div class="content-blocker"></div>
</div>
<div v-else class="position-relative" :class="{ readonly: isCopy }">
<textarea v-model="excerpt" rows="5" maxlength="255" class="form-control"></textarea>
<div class="content-blocker"></div>
</div>
<textarea v-else v-model="excerpt" rows="5" maxlength="255" class="form-control"></textarea>
</div>
</div>

Expand Down
5 changes: 2 additions & 3 deletions core/Piranha.Manager/assets/src/scss/inc/_badges.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@

.badge {
padding: .5rem 1rem;
position: absolute;
top: -.175rem;
margin: -.125rem 0 -.75rem;
text-transform: uppercase;

i {
margin-right: .5rem;
}
Expand Down

0 comments on commit b19d195

Please sign in to comment.