Commit 79c2cdc7 by Frances Botsford Committed by cahrens

switching studio assets lock to use checkbox instead of link

parent 1d7f8911
...@@ -34,10 +34,6 @@ body.course.uploads { ...@@ -34,10 +34,6 @@ body.course.uploads {
width: 100%; width: 100%;
word-wrap: break-word; word-wrap: break-word;
thead tr {
}
th { th {
@extend %t-copy-sub2; @extend %t-copy-sub2;
background-color: $gray-l5; background-color: $gray-l5;
...@@ -82,15 +78,6 @@ body.course.uploads { ...@@ -82,15 +78,6 @@ body.course.uploads {
background-image: url('../img/bg-micro-stripes.png'); background-image: url('../img/bg-micro-stripes.png');
background-position: 0 0; background-position: 0 0;
background-repeat: repeat; background-repeat: repeat;
.locked a {
background-color: $gray;
color: $white;
&:hover {
background-color: $blue;
}
}
} }
&:hover { &:hover {
...@@ -102,49 +89,21 @@ body.course.uploads { ...@@ -102,49 +89,21 @@ body.course.uploads {
color: $gray; color: $gray;
} }
} }
}
.thumb-cols {
padding: ($baseline/2) $baseline;
width: 100px;
}
.name-cols {
width: ($baseline*12.5);
}
.date-cols {
width: ($baseline*5);
} }
.embed-cols { .thumb-col {
width: ($baseline*10); padding: ($baseline/2) $baseline;
}
.actions-cols {
width: ($baseline*3);
padding: ($baseline/2);
}
.thumb-col { img {
overflow: hidden; width: 100%;
.thumb {
width: ($baseline*5);
img {
width: 100%;
}
} }
} }
.name-col { .name-col {
@extend %t-copy-sub1;
text-overflow: ellipsis;
.title { .title {
@extend %t-copy-sub1;
display: inline-block; display: inline-block;
max-width: 200px; max-width: 200px;
overflow: hidden; overflow: hidden;
...@@ -163,6 +122,7 @@ body.course.uploads { ...@@ -163,6 +122,7 @@ body.course.uploads {
color: $gray-l2; color: $gray-l2;
.embeddable-xml-input { .embeddable-xml-input {
@include transition(all $tmg-f2 ease-in-out 0s);
@extend %t-copy-sub2; @extend %t-copy-sub2;
box-shadow: none; box-shadow: none;
border: none; border: none;
...@@ -179,6 +139,7 @@ body.course.uploads { ...@@ -179,6 +139,7 @@ body.course.uploads {
} }
.actions-col { .actions-col {
padding: ($baseline/2);
text-align: center; text-align: center;
} }
} }
...@@ -207,14 +168,67 @@ body.course.uploads { ...@@ -207,14 +168,67 @@ body.course.uploads {
display: inline-block; display: inline-block;
vertical-align: bottom; vertical-align: bottom;
} }
}
&.action-lock {
position: relative;
}
&.action-lock label {
position: absolute;
top: 0;
right: 0;
height: 30px;
width: 30px;
&:hover {
background-color: $blue;
}
}
&.action-lock .lock-checkbox {
position: absolute;
top: 0;
right: 0;
height: 30px;
width: 30px;
opacity: 0;
}
&.action-lock .lock-checkbox:hover ~ .action-button {
background-color: $blue;
color: $gray-l6;
}
&.action-lock .lock-checkbox ~ .action-button {
.icon-lock {
display: none;
}
.icon-unlock-alt {
display: inline-block;
}
}
&.action-lock .lock-checkbox:checked ~ .action-button {
background-color: $gray;
color: $white;
.icon-lock {
display: inline-block;
}
.icon-unlock-alt {
display: none;
}
}
}
.show-xml { .show-xml {
@include blue-button; @include blue-button;
} }
.upload-modal { .upload-modal {
display: none; display: none;
width: 640px !important; width: 640px !important;
......
...@@ -18,17 +18,13 @@ ...@@ -18,17 +18,13 @@
</td> </td>
<td class="actions-col"> <td class="actions-col">
<ul> <ul>
<li class="action-item"> <li class="action-item action-delete">
<a href="#" data-tooltip="<%= gettext('Delete this asset') %>" class="remove-asset-button action-button"><i class="icon-remove-sign"></i> <span class="sr"><%= gettext('Delete this asset') %></span></a> <a href="#" data-tooltip="<%= gettext('Delete this asset') %>" class="remove-asset-button action-button"><i class="icon-remove-sign"></i> <span class="sr"><%= gettext('Delete this asset') %></span></a>
</li> </li>
<% if (locked) { %> <li class="action-item action-lock">
<li class="action-item locked"> <label for="lock-asset"><span class="sr"><%= gettext('Lock this asset') %></span></label>
<a href="#" data-tooltip="<%= gettext('Unlock this asset') %>" class="lock-asset-button action-button"><i class="icon-lock"></i> <span class="sr"><%= gettext('Unlock this asset') %></span></a> <input type="checkbox" name="lock-asset" class="lock-checkbox" data-tooltip="<%= gettext('Lock/unlock file') %>" />
<div class="action-button"><i class="icon-lock"></i><i class="icon-unlock-alt"></i></div>
</li> </li>
<% } else { %>
<li class="action-item">
<a href="#" data-tooltip="<%= gettext('Lock this asset') %>" class="lock-asset-button action-button"><i class="icon-unlock-alt"></i> <span class="sr"><%= gettext('Lock this asset') %></span></a>
</li>
<% }%>
</ul> </ul>
</td> </td>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment