1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 17:02:41 +01:00
phorge-phorge/webroot/rsrc/css/application/pholio/pholio-edit.css
epriestley 87871b3588 Add JS support for replacing Pholio mocks 1:1
Summary:
Ref T3572. Needs some CSS tweaks, but this lets you drag an image on top of another image to replace it. There's no server-side or transaction support (and I'm not planning to build that), I just wanted to clear the way on the JS side.

You'll get an additional array posted called `replaces`. Keys are old file PHIDs; values are new file PHIDs.

Note that a key may not exist yet (if a user adds an image, and then also replaces that same image). In this case, the server should just treat it as an add.

Test Plan: Dragged images on top of other images.

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3572

Differential Revision: https://secure.phabricator.com/D6499
2013-07-19 14:07:22 -07:00

131 lines
2.5 KiB
CSS

/**
* @provides pholio-edit-css
*/
.pholio-uploaded-image {
padding: 4px;
border: 1px solid transparent;
margin: 0 0 12px 0;
overflow: hidden;
}
.pholio-uploaded-image .thumb-box {
border: 1px solid #D5D9DF;
border-radius: 3px;
min-width: 280px;
width: 48%;
float: left;
text-align: center;
}
.pholio-uploaded-image .image-data {
width: 48%;
float: right;
}
.pholio-uploaded-image .thumb-box .title {
width: 100%;
float: left;
background: #EDF0F4;
border-top-left-radius: 3px;
border-top-right-radius: 3px;
border-bottom: 1px solid #D5D9DF;
}
.pholio-thumb-frame {
background: #ffffff;
padding: 12px 0px 0px 0px;
width: 100%;
}
.pholio-uploaded-image .thumb-box .pholio-thumb-frame img {
margin: 0 auto;
}
.pholio-uploaded-image .thumb-box .title .text {
width: 220px;
float: left;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
padding: 6px 0px 0px 8px;
}
.pholio-uploaded-image .thumb-box .title .remove {
float: right;
}
.pholio-uploaded-image .thumb-box .title .remove .button {
background: #EDF0F4;
border: none;
}
.pholio-uploaded-image .thumb-box .title .remove .button:hover {
box-shadow: inset 0 0 2px rgba(0,0,0,.2);
}
.pholio-uploaded-image .image-data .aphront-form-control {
padding: 0px 0px 4px 4px;
}
.pholio-uploaded-image .image-data .aphront-form-label {
text-align: left;
margin: 0px 0px 5px 0px;
}
.pholio-uploaded-image .image-data .aphront-form-input {
margin: 0;
width: 100%;
}
.aphront-form-input .aphront-form-drag-and-drop-file-list {
float: left;
width: 100%;
}
.aphront-form-input .aphront-form-drag-and-drop-file-list
.drag-and-drop-file-target {
padding: 20px;
clear: both;
}
.pholio-edit-drop {
border-width: 1px;
border-style: dashed;
border-color: #999999;
text-align: center;
padding: 16px;
color: #666666;
}
.pholio-uploaded-image.pholio-drop-active,
.pholio-edit-drop.pholio-drop-active {
border-style: solid;
border-color: {$green};
background-color: {$lightgreen};
}
.pholio-replacing {
opacity: 0.5;
border-color: {$green};
background-color: {$lightgreen};
}
.pholio-drop-uploading {
padding: 24px;
text-align: center;
border: 1px solid #bbbbbb;
background: #fcfcfc;
color: #666666;
margin-bottom: 12px;
}
.pholio-drop-undo {
padding: 8px;
margin-bottom: 12px;
text-align: center;
color: #333333;
border: 1px solid {$yellow};
background-color: {$lightyellow};
}
.pholio-drop-undo a {
font-weight: bold;
}