Skip to content
Open
20 changes: 6 additions & 14 deletions admin/themes/default/css/sass/pages/_items.scss
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,7 @@
/* Edit Item
================================================== */

#all-tags-list {
padding: 0;
}

.tag-list li.tag-removed {
.tag-list .tag-group.tag-removed {
color: #B00D00;
background: #F9E8E7;
border: 1px solid rgba(#B00D00, 0.25);
Expand All @@ -306,23 +302,19 @@
outline: none;
}

.undo-remove-tag a:after {
.undo-remove-tag .icon:after {
background-color: #B00D00;
color: white;
}
}

.undo-remove-tag {
.tag-list .tag-group .undo-remove-tag,
.tag-list .tag-group.tag-removed .remove-tag {
display: none;
text-indent: -9999px;
}

.tag-list li.tag-removed .remove-tag {
display: none;
}

.tag-removed .undo-remove-tag {
display: inline;
.tag-list .tag-removed .undo-remove-tag {
display: inline-block;
}

.controls {
Expand Down
75 changes: 43 additions & 32 deletions admin/themes/default/css/sass/pages/_tags.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ form.form-inline.editableform {
.editable-error-block.editable-error {
position: absolute;
top: 100%;
z-index: 10;
background-color: #fff;
text-shadow: none;
color: $darkred;
Expand All @@ -43,9 +44,12 @@ form.form-inline.editableform {

.tag-list {
padding: 0;
list-style: none;
display: flex;
flex-wrap: wrap;
}

.tag-list li {
.tag-list .tag-group {
height: 22px;
color: $green;
background: $lightgreen;
Expand Down Expand Up @@ -73,7 +77,7 @@ form.form-inline.editableform {
position: relative;
}

.tag-list li .count:after {
.tag-list .tag-group .count:after {
content: "";
width: 1px;
position: absolute;
Expand All @@ -83,50 +87,57 @@ form.form-inline.editableform {
right: 0;
}

.tag-list li .tag, .tag-list li a, .tag-list li .count {
.tag-list .tag-group .tag, .tag-list .tag-group button, .tag-list .tag-group .count {
display: inline-block;
color: darken($green, 15%);
color: darken($green, 15%);
}

.tag-list li .delete-tag a, .tag-list li .remove-tag a, .tag-list li .undo-remove-tag a {
text-indent: -9999px;
width: 16px;
height: 16px;
margin-left: 8px;
position: relative;
top: 3px;
.tag-list .tag-group {
display: inline-flex;
align-items: center;
gap: $spacing-m;
}

.tag-list .tag-group .button {
margin: 0;
padding: 0;
border: 0;
width: 24px;
height: 24px;
min-height: 0;
background: transparent;
text-align: center;
}

.tag-list .tag-group button.editable {
margin: 0;
padding: 0;
border: 0;
min-height: 0;
background: transparent;
font-weight: normal;
}

.tag-list li .delete-tag a:after, .tag-list li .remove-tag a:after, .undo-remove-tag a:after {
content: "\f067" / "";
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
transform: rotate(45deg);
.tag-list .tag-group .delete-tag .icon:after,
.tag-list .tag-group .remove-tag .icon:after,
.undo-remove-tag .icon:after {
content: "\f00d" / "";
font-family: "Font Awesome 5 Free";
font-weight: 900;
height: 100%;
width: 100%;
background-color: rgba($green, 1);
-webkit-border-radius: 20px;
-moz-border-radius: 20px;
border-radius: 20px;
color:$lightgreen;
display: block;
position: relative;
font-size: $spacing-m;
top: 0;
float: left;
text-indent: 4px;
line-height: 17px;
text-shadow: none;
width: 16px;
height: 16px;
line-height: 16px;
border-radius: 16px;
display: inline-block;
}

.undo-remove-tag a:after {
content: "\f112" / "";
.undo-remove-tag .icon:after {
content: "\f0e2" / "";
color: #BB8282;
font-size: 9px;
text-indent: 3px;
line-height: 18px;
}

#tags-nav {
Expand Down
93 changes: 50 additions & 43 deletions admin/themes/default/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2848,36 +2848,28 @@ ul.details li:last-child {

/* Edit Item
================================================== */
#all-tags-list {
padding: 0;
}

.tag-list li.tag-removed {
.tag-list .tag-group.tag-removed {
color: #B00D00;
background: #F9E8E7;
border: 1px solid rgba(176, 13, 0, 0.25);
}
.tag-list li.tag-removed:hover, .tag-list li.tag-removed:focus {
.tag-list .tag-group.tag-removed:hover, .tag-list .tag-group.tag-removed:focus {
border-color: rgba(176, 13, 0, 0.65);
background: rgb(243.9, 212.45, 210.6);
outline: none;
}
.tag-list li.tag-removed .undo-remove-tag a:after {
.tag-list .tag-group.tag-removed .undo-remove-tag .icon:after {
background-color: #B00D00;
color: white;
}

.undo-remove-tag {
display: none;
text-indent: -9999px;
}

.tag-list li.tag-removed .remove-tag {
.tag-list .tag-group .undo-remove-tag,
.tag-list .tag-group.tag-removed .remove-tag {
display: none;
}

.tag-removed .undo-remove-tag {
display: inline;
.tag-list .tag-removed .undo-remove-tag {
display: inline-block;
}

.controls {
Expand Down Expand Up @@ -3356,6 +3348,7 @@ form.form-inline.editableform {
.editable-error-block.editable-error {
position: absolute;
top: 100%;
z-index: 10;
background-color: #fff;
text-shadow: none;
color: #82423B;
Expand All @@ -3368,9 +3361,12 @@ form.form-inline.editableform {

.tag-list {
padding: 0;
list-style: none;
display: flex;
flex-wrap: wrap;
}

.tag-list li {
.tag-list .tag-group {
height: 22px;
color: #3f7b00;
background: #eaf2e1;
Expand All @@ -3380,7 +3376,7 @@ form.form-inline.editableform {
margin: 0 10px 10px 0;
padding: 5px 10px;
}
.tag-list li:hover, .tag-list li:focus {
.tag-list .tag-group:hover, .tag-list .tag-group:focus {
border-color: rgba(63, 123, 0, 0.65);
background: rgb(221.5465116279, 234.2906976744, 207.2093023256);
outline: none;
Expand All @@ -3392,7 +3388,7 @@ form.form-inline.editableform {
position: relative;
}

.tag-list li .count:after {
.tag-list .tag-group .count:after {
content: "";
width: 1px;
position: absolute;
Expand All @@ -3402,46 +3398,57 @@ form.form-inline.editableform {
right: 0;
}

.tag-list li .tag, .tag-list li a, .tag-list li .count {
.tag-list .tag-group .tag, .tag-list .tag-group button, .tag-list .tag-group .count {
display: inline-block;
color: rgb(23.8170731707, 46.5, 0);
}

.tag-list li .delete-tag a, .tag-list li .remove-tag a, .tag-list li .undo-remove-tag a {
text-indent: -9999px;
width: 16px;
height: 16px;
margin-left: 8px;
position: relative;
top: 3px;
.tag-list .tag-group {
display: inline-flex;
align-items: center;
gap: 10px;
}

.tag-list .tag-group .button {
margin: 0;
padding: 0;
border: 0;
width: 24px;
height: 24px;
min-height: 0;
background: transparent;
text-align: center;
}

.tag-list .tag-group button.editable {
margin: 0;
padding: 0;
border: 0;
min-height: 0;
background: transparent;
font-weight: normal;
}

.tag-list li .delete-tag a:after, .tag-list li .remove-tag a:after, .undo-remove-tag a:after {
content: "\f067"/"";
transform: rotate(45deg);
.tag-list .tag-group .delete-tag .icon:after,
.tag-list .tag-group .remove-tag .icon:after,
.undo-remove-tag .icon:after {
content: "\f00d"/"";
font-family: "Font Awesome 5 Free";
font-weight: 900;
height: 100%;
width: 100%;
background-color: #3f7b00;
border-radius: 20px;
color: #eaf2e1;
display: block;
position: relative;
font-size: 10px;
top: 0;
float: left;
text-indent: 4px;
line-height: 17px;
text-shadow: none;
width: 16px;
height: 16px;
line-height: 16px;
border-radius: 16px;
display: inline-block;
}

.undo-remove-tag a:after {
content: "\f112"/"";
.undo-remove-tag .icon:after {
content: "\f0e2"/"";
color: #BB8282;
font-size: 9px;
text-indent: 3px;
line-height: 18px;
}

#tags-nav {
Expand Down
19 changes: 13 additions & 6 deletions admin/themes/default/items/tag-form.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,29 @@
<input type="text" name="tags" size="20" id="tags" class="textinput" value="" />
<p id="add-tags-explanation" class="explanation"><?php echo __('Separate tags with %s', option('tag_delimiter')); ?></p>
<input type="submit" name="add-tags-button" id="add-tags-button" class="button" value="<?php echo __('Add Tags'); ?>" />
<div id="tags-sr-alerts" class="sr-only" aria-live="polite"
data-duplicate-alert="<?php echo __('Tag already added.'); ?>"
data-success-alert="<?php echo __('Tag added.'); ?>">
</div>
<div id="tags-sr-alerts-repeat" class="sr-only" aria-live="polite"></div>
</div>
<div id="all-tags">
<?php if ($tags): ?>
<h3><?php echo __('All Tags'); ?></h3>

<div class="tag-list">
<ul id="all-tags-list">
<ul id="all-tags-list" class="tag-list" data-new-tag-id="0">
<?php foreach( $tags as $tag ): ?>
<?php $tagId = $tag->id; ?>
<li>
<?php echo '<span class="tag">' . html_escape($tag->name) . '</span>';
echo '<span class="undo-remove-tag"><a href="#">' . __('Undo') . '</a></span>';
echo '<span class="remove-tag"><a href="#">' . __('Remove') . '</a></span>'; ?>
<div role="group" aria-labelledby="tag-<?php echo $tagId; ?>-name" class="tag-group">
<?php echo '<span class="tag" id="tag-' . $tagId . '-name">' . html_escape($tag->name) . '</span>';
echo '<button type="button" class="remove-tag button" aria-label="' . __('Remove') . '" title="' . __('Remove') . '"><span class="icon"></span></button>';
echo '<button type="button" class="undo-remove-tag button" aria-label="' . __('Undo remove') . '" title="' . __('Undo remove') . '"><span class="icon"></span></button>';
?>
</div>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
</div>
</div>
Expand Down
3 changes: 3 additions & 0 deletions admin/themes/default/javascripts/globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,15 @@ if (!Omeka) {
url = $(this).parents('form').attr('action');
} else if ($(this).is('a')) {
url = $(this).attr('href');
} else if ($(this).is('button')) {
url = $(this).data('action-url');
} else {
return;
}

$.post(url, function (response){
$(response).dialog({modal:true});
$('.ui-dialog [type="submit"]').focus();
});
});
};
Expand Down
Loading
Loading