Mobile work and profile settings

This commit is contained in:
ultimatemember
2014-12-29 15:51:55 +02:00
parent 0c9c715175
commit 6c94a20220
40 changed files with 4993 additions and 386 deletions
+256 -26
View File
@@ -1,41 +1,271 @@
/*
* imgAreaSelect default style
*/
.cropper-container {
position: relative;
overflow: hidden;
.imgareaselect-border1 {
background: url(../img/border-v.gif) repeat-y left top;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none;
}
.imgareaselect-border2 {
background: url(../img/border-h.gif) repeat-x left top;
.cropper-container img {
width: 100%;
height: 100%;
min-width: 0 !important;
min-height: 0 !important;
max-width: none !important;
max-height: none !important;
}
.imgareaselect-border3 {
background: url(../img/border-v.gif) repeat-y right top;
.cropper-modal,
.cropper-canvas {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
.imgareaselect-border4 {
background: url(../img/border-h.gif) repeat-x left bottom;
.cropper-canvas {
background-color: #fff;
opacity: 0;
filter: alpha(opacity=0);
}
.imgareaselect-border1, .imgareaselect-border2,
.imgareaselect-border3, .imgareaselect-border4 {
filter: alpha(opacity=50);
opacity: 0.5;
.cropper-modal {
background-color: #000;
opacity: .5;
filter: alpha(opacity=50);
}
.imgareaselect-handle {
background-color: #fff;
border: solid 1px #000;
filter: alpha(opacity=50);
opacity: 0.5;
.cropper-dragger {
position: absolute;
top: 10%;
left: 10%;
width: 80%;
height: 80%;
}
.imgareaselect-outer {
background-color: #000;
filter: alpha(opacity=50);
opacity: 0.5;
.cropper-viewer {
display: block;
width: 100%;
height: 100%;
overflow: hidden;
outline-width: 1px;
outline-style: solid;
outline-color: #69f;
outline-color: rgba(51, 102, 255, .75);
}
.imgareaselect-selection {
}
.cropper-dashed {
position: absolute;
display: block;
border: 0 dashed #fff;
opacity: .5;
filter: alpha(opacity=50);
}
.cropper-dashed.dashed-h {
top: 33.3%;
left: 0;
width: 100%;
height: 33.3%;
border-top-width: 1px;
border-bottom-width: 1px;
}
.cropper-dashed.dashed-v {
top: 0;
left: 33.3%;
width: 33.3%;
height: 100%;
border-right-width: 1px;
border-left-width: 1px;
}
.cropper-face,
.cropper-line,
.cropper-point {
position: absolute;
display: block;
width: 100%;
height: 100%;
opacity: .1;
filter: alpha(opacity=10);
}
.cropper-face {
top: 0;
left: 0;
cursor: move;
background-color: #fff;
}
.cropper-line {
background-color: #69f;
}
.cropper-line.line-e {
top: 0;
right: -3px;
width: 5px;
cursor: e-resize;
}
.cropper-line.line-n {
top: -3px;
left: 0;
height: 5px;
cursor: n-resize;
}
.cropper-line.line-w {
top: 0;
left: -3px;
width: 5px;
cursor: w-resize;
}
.cropper-line.line-s {
bottom: -3px;
left: 0;
height: 5px;
cursor: s-resize;
}
.cropper-point {
width: 5px;
height: 5px;
background-color: #69f;
opacity: .75;
filter: alpha(opacity=75);
}
.cropper-point.point-e {
top: 50%;
right: -3px;
margin-top: -3px;
cursor: e-resize;
}
.cropper-point.point-n {
top: -3px;
left: 50%;
margin-left: -3px;
cursor: n-resize;
}
.cropper-point.point-w {
top: 50%;
left: -3px;
margin-top: -3px;
cursor: w-resize;
}
.cropper-point.point-s {
bottom: -3px;
left: 50%;
margin-left: -3px;
cursor: s-resize;
}
.cropper-point.point-ne {
top: -3px;
right: -3px;
cursor: ne-resize;
}
.cropper-point.point-nw {
top: -3px;
left: -3px;
cursor: nw-resize;
}
.cropper-point.point-sw {
bottom: -3px;
left: -3px;
cursor: sw-resize;
}
.cropper-point.point-se {
right: -3px;
bottom: -3px;
width: 20px;
height: 20px;
cursor: se-resize;
opacity: 1;
filter: alpha(opacity=100);
}
.cropper-point.point-se:before {
position: absolute;
right: -50%;
bottom: -50%;
display: block;
width: 200%;
height: 200%;
content: " ";
background-color: #69f;
opacity: 0;
filter: alpha(opacity=0);
}
@media (min-width: 768px) {
.cropper-point.point-se {
width: 15px;
height: 15px;
}
}
@media (min-width: 992px) {
.cropper-point.point-se {
width: 10px;
height: 10px;
}
}
@media (min-width: 1200px) {
.cropper-point.point-se {
width: 5px;
height: 5px;
opacity: .75;
filter: alpha(opacity=75);
}
}
/* Helper classes for JavaScript */
.cropper-hidden {
display: none !important;
}
.cropper-invisible {
position: fixed;
top: 0;
left: 0;
z-index: -1;
width: auto !important;
max-width: none !important;
height: auto !important;
max-height: none !important;
opacity: 0;
filter: alpha(opacity=0);
}
.cropper-move {
cursor: move;
}
.cropper-crop {
cursor: crosshair;
}
.cropper-disabled .cropper-canvas,
.cropper-disabled .cropper-face,
.cropper-disabled .cropper-line,
.cropper-disabled .cropper-point {
cursor: not-allowed;
}
+30 -23
View File
@@ -7,14 +7,24 @@
margin-bottom: 20px;
}
.um .um-single-image-preview > img {
max-height: 200px;
display: block;
overflow: hidden;
margin: auto;
border-radius: 3px;
}
.um-single-image-preview,
.um-single-file-preview {
display: none;
width: 100%;
box-sizing: border-box;
text-align: center;
position: relative;
min-height: 40px;
}
.um-single-image-preview > img {
max-width: 100%;
max-height: inherit;
}
.um-single-image-preview a.cancel,
@@ -27,8 +37,9 @@
border-radius: 999px;
background: #ddd;
cursor: pointer;
transition: 0.2s;
text-decoration: none !important;
z-index: 8888;
opacity: 0.75;
}
.um-single-image-preview a.cancel i,
@@ -39,44 +50,40 @@
top: 4px;
}
.um-single-image-preview img {
max-width: 100%;
margin: 0 auto !important;
padding: 0 !important;
display: block !important;
}
/*
- file preview
- file info
*/
.um-single-fileinfo {
padding: 36px 0 30px 0;
padding: 26px 0 20px 0;
display: inline-block;
}
.um-single-fileinfo span.icon {
font-size: 38px;
font-size: 42px;
display: inline-block;
width: 100px;
height: 70px;
line-height: 70px;
border-radius: 5px;
border-radius: 3px;
background-color: #666;
color: #fff !important;
}
.um-single-fileinfo span.icon i {line-height: 1em !important;vertical-align: middle}
.um-single-fileinfo span.icon i{vertical-align: middle}
.um-single-fileinfo span.filename {
display: block;
font-size: 18px;
line-height: 24px;
color: #666;
font-size: 16px;
color: #888;
padding: 15px 0 0 0;
}
.um-single-fileinfo a {text-decoration: none !important; opacity: 0.85 }
.um-single-fileinfo a:hover { opacity: 1 }
.um-single-fileinfo a {
text-decoration: none !important;
opacity: 0.9;
}
.um-single-fileinfo a:hover {
opacity: 1
}
/*
- upload progress
@@ -122,7 +129,7 @@
.ajax-upload-dragdrop span.str {
display: block;
margin: 0 0 12px 0;
margin: 0 0 15px 0;
}
.ajax-upload-dragdrop span.icon {
+6
View File
@@ -111,8 +111,14 @@
.um-gutter-sizer { width: 5% }
/*
- Member cover
*/
.um-member-cover {
background-color: #eee;
box-sizing: border-box;
position: relative;
}
.um-member-cover-e {
+2 -1
View File
@@ -64,7 +64,7 @@
background: #3ba1da;
padding: 0 20px;
box-sizing: border-box;
font-size: 15px;
font-size: 17px;
}
.um-modal-footer {
@@ -93,6 +93,7 @@
display: inline-block;
border-radius: 3px;
padding: 0 20px;
text-align: center;
color: #fff;
background: #3ba1da;
vertical-align: middle;
+112 -16
View File
@@ -4,6 +4,19 @@
.um-profile {
box-sizing: border-box;
padding-top: 10px;
}
.um-profile .um-cover-overlay {
display: none;
}
.um-profile.um-editing .um-cover.has-cover .um-cover-overlay {
display: block;
}
.um-profile.um-viewing .um-profile-photo-overlay {
display: none;
}
.um-profile img {display: block;overflow:hidden;border-radius:0!important;margin: 0!important}
@@ -33,21 +46,11 @@
- Profile cover
*/
.um-cover{
.um-cover {
background-color: #eee;
}
.um-cover-add span {
display: table-cell;
vertical-align: middle;
}
.um-cover-e {
text-align: center;
box-sizing: border-box;
position: relative;
}
.um-cover-e.empty {border: 2px dashed #ddd}
.um-cover-e img {width: 100% !important}
.um-cover-add {
color: #aaa;
@@ -55,8 +58,61 @@
width: 100%;
display: table;
}
.um-cover-add span {
display: table-cell;
vertical-align: middle;
}
.um-cover-add:hover { color: #3ba1da }
.um-cover-e {
text-align: center;
box-sizing: border-box;
}
.um-cover-e img {width: 100% !important}
.um-cover-overlay {
position: absolute;
top: 0;
left: 0;
background: rgba(0,0,0,.5);
text-align: center;
box-sizing: border-box;
padding: 0 40px;
color: #fff;
text-shadow: 0 2px #333;
cursor: pointer !important;
line-height: 21px;
font-size: 16px;
height: 100%;
width: 100%;
}
.um-cover-overlay:hover {
background: rgba(0,0,0,.55);
}
.um-cover-overlay span.um-cover-overlay-s {
display: table;
height: 100%;
width: 100%;
}
.um-cover-overlay ins {
display: table-cell;
vertical-align: middle;
height: 100%;
text-decoration: none !important;
}
.um-cover-overlay i {
font-size: 46px;
display: block;
margin-bottom: 6px;
}
/*
- Profile header
*/
@@ -70,7 +126,7 @@
.um-profile-edit {
position: absolute;
top: 15px;
right: 15px;
right: 0;
vertical-align: middle;
z-index: 99;
font-size: 30px;
@@ -124,7 +180,6 @@
.um-profile-photo {
float: left;
width: 250px;
position: relative;
}
@@ -136,11 +191,51 @@
left: 30px;
}
.um-profile-photo img {
.um-profile-photo a.um-profile-photo-img img {
width: 100%;
height: 100%;
}
.um-profile-photo-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,.5);
text-align: center;
box-sizing: border-box;
padding: 0 40px;
color: #fff;
line-height: 21px;
font-size: 16px;
text-shadow: 0 1px #333;
cursor: pointer !important;
}
.um-profile-photo-overlay:hover {
background: rgba(0,0,0,.55);
}
.um-profile-photo-overlay span.um-profile-photo-overlay-s {
display: table;
height: 100%;
width: 100%;
}
.um-profile-photo-overlay ins {
display: table-cell;
vertical-align: middle;
height: 100%;
text-decoration: none !important;
}
.um-profile-photo-overlay i {
font-size: 46px;
display: block;
margin-bottom: 6px;
}
/*
- Profile meta
*/
@@ -164,12 +259,13 @@
font-size: 15px;
}
.um-meta span:first-child {margin: 0 5px 0 0}
.um-meta span {
margin: 0 5px;
font-size: 14px;
}
.um-meta-text {
margin: 12px 0 0 0;
margin: 6px 0 0 0;
color: #666;
}
+296 -39
View File
@@ -28,22 +28,31 @@ div.uimob960 .uimob960-hide
/********************************************/
.uimob340 .um-half {
float: none;
width: 100%;
margin: 0 0 10px 0;
div.uimob340 .um-cover-overlay span.um-cover-overlay-t,
div.uimob340 .um-profile-photo-overlay span.um-profile-photo-overlay-t
{
display: none !important;
}
.uimob340 .um-button.um-btn-auto-width {
min-width: auto;
max-width: auto;
width: 100%;
div.uimob340 .um-cover-overlay,
div.uimob340 .um-profile-photo-overlay
{
padding: 0;
}
div.uimob340 .um-cover-overlay i,
div.uimob340 .um-profile-photo-overlay i
{
margin-bottom: 0;
font-size: 30px;
}
.um-modal.uimob340 {
width: 100% !important;
margin: 0 !important;
left: 0 !important;
height: 100%;
background: #fff;
}
.um-modal.uimob340,
@@ -52,16 +61,181 @@ div.uimob960 .uimob960-hide
border-radius: 0;
}
.um-modal.uimob340 .um-modal-header {text-align: center}
.um-modal.uimob340 .um-modal-footer {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
box-sizing: border-box;
padding: 10px;
border-top: 1px solid #ddd;
}
.um-modal.uimob340 .um-modal-right {
width: 100%;
float: none;
}
.um-modal.uimob340 .um-modal-footer a.um-modal-btn {
width: 48%;
margin: 0 1%;
float: left;
display: block;
line-height: 44px !important;
height: 44px;
}
.um-modal.uimob340 .ajax-upload-dragdrop span.icon {
font-size: 40px;
line-height: 40px;
}
div.uimob340 .um-profile-body {
padding-left: 0;
padding-right: 0;
}
div.uimob340 .um-profile-photo {
width: 100% !important;
text-align: center !important;
position: absolute;
top: -20px;
left: 0;
}
div.uimob340 .um-profile-photo a.um-profile-photo-img {
width: 100px !important;
height: 100px !important;
margin: 0 auto !important;
float: none !important;
display: inline-block !important;
position: relative !important;
top: auto !important;
left: auto !important;
}
div.uimob340 .um-header .um-profile-meta {
padding-left: 0 !important;
padding-right: 0 !important;
text-align: center !important;
padding-top: 90px !important;
}
div.uimob340 .um-header .um-name {
float: none !important;
margin-right: 0 !important;
font-size: 18px;
}
div.uimob340 .um-header .um-meta-text {
padding: 0 20px;
}
div.uimob340 .um-header .um-meta {padding: 0 20px}
div.uimob340 .um-header .um-meta span:first-child {display: block}
div.uimob340 .um-header .um-meta span {display: none}
div.uimob340 .um-col-121,
div.uimob340 .um-col-122,
div.uimob340 .um-col-131,
div.uimob340 .um-col-132,
div.uimob340 .um-col-133 {
float: none;
width: 100%;
margin: 0;
}
div.uimob340 .um-field-half {
float: none;
width: 100%;
}
div.uimob340 .um-search {
padding: 20px 0 !important;
width: 100% !important;
box-sizing: border-box;
}
div.uimob340 .um-search .um-search-filter {
width: 100% !important;
float: none !important;
padding: 0 0 15px 0 !important;
}
div.uimob340 .um-search .um-search-submit .um-button {
display: block !important;
min-width: 100% !important;
margin: 0 0 15px 0 !important;
}
div.uimob340 .um-member {
width: 100%;
}
div.uimob340 .um-gutter-sizer { width: 0px }
div.uimob340 .um-account-main {
float: none;
width: 100%;
padding: 0;
box-sizing: border-box;
}
div.uimob340 .um-account-tab {
padding-bottom: 20px;
border-bottom: 1px solid #eee;
}
div.uimob340 .um-account-main div.um-field {padding-top: 15px}
div.uimob340 .um-account-meta {
margin-bottom: 0;
}
.uimob340 .um-half {
float: none;
width: 100%;
margin: 0 0 10px 0;
}
.uimob340 .um-button.um-btn-auto-width {
min-width: auto;
max-width: auto;
width: 100%;
}
/**
for 500px and below
**/
/********************************************/
div.uimob500 .um-cover-overlay span.um-cover-overlay-t,
div.uimob500 .um-profile-photo-overlay span.um-profile-photo-overlay-t
{
display: none !important;
}
div.uimob500 .um-cover-overlay,
div.uimob500 .um-profile-photo-overlay
{
padding: 0;
}
div.uimob500 .um-cover-overlay i,
div.uimob500 .um-profile-photo-overlay i
{
margin-bottom: 0;
font-size: 30px;
}
.um-modal.uimob500 {
width: 100% !important;
margin: 0 !important;
left: 0 !important;
height: 100%;
background: #fff;
}
.um-modal.uimob500,
@@ -70,15 +244,41 @@ div.uimob960 .uimob960-hide
border-radius: 0;
}
.um-modal.uimob500 .um-modal-header {text-align: center}
.um-modal.uimob500 .um-modal-footer {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
box-sizing: border-box;
padding: 10px;
border-top: 1px solid #ddd;
}
.um-modal.uimob500 .um-modal-right {
width: 100%;
float: none;
}
.um-modal.uimob500 .um-modal-footer a.um-modal-btn {
width: 48%;
margin: 0 1%;
float: left;
display: block;
line-height: 44px !important;
height: 44px;
}
.um-modal.uimob500 .ajax-upload-dragdrop span.icon {
font-size: 40px;
line-height: 40px;
}
div.uimob500 .um-profile-body {
padding-left: 0;
padding-right: 0;
}
div.uimob500 .um-profile-edit {
right: 0;
}
div.uimob500 .um-profile-photo {
width: 100% !important;
text-align: center !important;
@@ -102,7 +302,7 @@ div.uimob500 .um-header .um-profile-meta {
padding-left: 0 !important;
padding-right: 0 !important;
text-align: center !important;
padding-top: 70px !important;
padding-top: 80px !important;
}
div.uimob500 .um-header .um-name {
@@ -112,13 +312,12 @@ div.uimob500 .um-header .um-name {
}
div.uimob500 .um-header .um-meta-text {
margin: 0;
padding: 0 20px;
}
div.uimob500 .um-header .um-meta {padding: 0 20px}
div.uimob500 .um-header .um-meta span {display: block}
div.uimob500 .um-header .um-meta span.b {display: none}
div.uimob500 .um-header .um-meta span:first-child {display: block}
div.uimob500 .um-header .um-meta span {display: none}
div.uimob500 .um-col-121,
div.uimob500 .um-col-122,
@@ -157,7 +356,7 @@ div.uimob500 .um-member {
width: 100%;
}
div.uimob500 .um-gutter-sizer { width: 0px }
div.uimob500 .um-gutter-sizer { width: 0px }
div.uimob500 .um-account-main {
float: none;
@@ -246,6 +445,32 @@ div.uimob800 .um-account-meta img {
border-radius: 3px;
}
div.uimob800 .um-profile-photo {
width: 200px !important;
}
div.uimob800 .um-profile-photo a.um-profile-photo-img {
width: 140px !important;
height: 140px !important;
top: -70px !important;
}
div.uimob800 .um-header .um-profile-meta {
padding-left: 200px;
}
div.uimob800 .um-cover-overlay span.um-cover-overlay-t,
div.uimob800 .um-profile-photo-overlay span.um-profile-photo-overlay-t
{
display: none !important;
}
div.uimob800 .um-cover-overlay,
div.uimob800 .um-profile-photo-overlay
{
padding: 0;
}
/********************************************/
/**
@@ -296,30 +521,62 @@ div.uimob960 .um-gutter-sizer { width: 4% }
/************************************************/
@media screen and ( max-height: 900px ){
.um-single-image-preview img {max-height: 500px}
@media screen and (max-height: 400px) {
.ajax-upload-dragdrop span.icon {
display: none;
}
.um-modal {
width: 100% !important;
margin: 0 !important;
left: 0 !important;
height: 100%;
background: #fff;
}
.um-modal,
.um-modal .um-modal-body,
.um-modal .um-modal-header {
border-radius: 0;
}
.um-modal .um-modal-header {text-align: center; font-size: 14px}
.um-modal .um-modal-footer {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
box-sizing: border-box;
padding: 10px;
border-top: 1px solid #ddd;
}
.um-modal .um-modal-right {
width: 100%;
float: none;
}
.um-modal .um-modal-footer a.um-modal-btn {
width: 48%;
margin: 0 1%;
float: left;
display: block;
line-height: 44px !important;
height: 44px;
}
}
@media screen and ( max-height: 800px ){
.um-single-image-preview img {max-height: 500px}
}
@media screen and (max-height: 300px) {
@media screen and ( max-height: 700px ){
.um-single-image-preview img {max-height: 350px}
}
.um-modal-header {
display: none;
}
.ajax-upload-dragdrop span.icon,
.ajax-upload-dragdrop span.str {
display: none;
}
@media screen and ( max-height: 600px ){
.um-single-image-preview img {max-height: 300px}
}
@media screen and ( max-height: 500px ){
.um-single-image-preview img {max-height: 250px}
}
@media screen and ( max-height: 400px ){
.um-single-image-preview img {max-height: 200px}
}
@media screen and ( max-height: 300px ){
.um-single-image-preview img {max-height: 150px}
}
+69 -4
View File
@@ -25,7 +25,8 @@
box-sizing: content-box;
}
.um a:focus {
.um a:focus,
.um-modal a:focus {
outline: 0 !important;
}
@@ -209,8 +210,17 @@ p.um-notice.success {
}
.um-tip i {
font-size: 18px;
font-size: 20px;
vertical-align: middle;
position: relative;
top: 2px;
}
.um-tip-text {
display: block;
font-size: 13px;
line-height: 15px;
color: #999;
}
/*
@@ -264,7 +274,6 @@ p.um-notice.success {
.um-field-icon {
position: absolute;
z-index: 888;
cursor: default;
text-align: center !important;
top: 2px;
@@ -485,4 +494,60 @@ a.um-link-alt {
font-weight: normal;
text-align: center;
}
a.um-link-alt:hover {text-decoration: underline !important;}
a.um-link-alt:hover {text-decoration: underline !important;}
/*
- Dropdown menu
*/
.um-dropdown {
position: absolute;
height: auto;
background: #fff;
border-radius: 5px;
z-index: 555;
display: none;
border: 1px solid #e5e5e5;
box-sizing: border-box;
-webkit-box-shadow: 0 0 2px rgba(0,0,0,0.1);
box-shadow: 0 0 1px rgba(0,0,0,0.1);
}
.um-dropdown ul,
.um-dropdown li {
list-style-type: none !important;
padding: 0 !important;
margin: 0 !important;
}
.um-dropdown li a {
display: block;
padding: 8px 12px;
color: #666;
z-index: 4;
font-size: 14px;
line-height: 18px;
position: relative;
}
.um-dropdown li:last-child a {
border-top: 1px solid #e5e5e5;
padding: 12px;
}
.um-dropdown li a:hover {
color: #3ba1da;
}
.um-dropdown-b {
position: relative;
}
.um-dropdown-arr {
position: absolute;
color: #fff;
font-size: 24px;
width: 24px;
height: 24px;
z-index: 2;
}
+21 -3
View File
@@ -6,17 +6,35 @@ $photosize_up = ( $photosize / 2 ) + 10;
$meta_padding = ( $photosize + 60 ) . 'px';
if ( $photocorner == 1 ) {
print ".um-$form_id.um .um-profile-photo a.um-profile-photo-img, .um-profile-photo img { border-radius: 999px !important }";
print "
.um-$form_id.um .um-profile-photo a.um-profile-photo-img,
.um-$form_id.um .um-profile-photo img,
.um-$form_id.um .um-profile-photo span.um-profile-photo-overlay
{ border-radius: 999px !important }";
}
if ( $photocorner == 2 ) {
print ".um-$form_id.um .um-profile-photo a.um-profile-photo-img, .um-profile-photo img { border-radius: 4px !important }";
print "
.um-$form_id.um .um-profile-photo a.um-profile-photo-img,
.um-$form_id.um .um-profile-photo img,
.um-$form_id.um .um-profile-photo span.um-profile-photo-overlay
{ border-radius: 4px !important }";
}
if ( $photocorner == 3 ) {
print ".um-$form_id.um .um-profile-photo a.um-profile-photo-img, .um-profile-photo img { border-radius: 0px !important }";
print "
.um-$form_id.um .um-profile-photo a.um-profile-photo-img,
.um-$form_id.um .um-profile-photo img,
.um-$form_id.um .um-profile-photo span.um-profile-photo-overlay
{ border-radius: 0px !important }";
}
print "
.um-$form_id.um .um-profile-photo {
width: $meta_padding;
}
";
print "
.um-$form_id.um .um-header.no-cover a.um-profile-photo-img img,
.um-$form_id.um .um-profile-photo a.um-profile-photo-img {
Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

+1569 -1
View File
File diff suppressed because one or more lines are too long
+101 -19
View File
@@ -1,11 +1,3 @@
function initCrop_UM() {
jQuery('.um-single-image-preview.crop img').imgAreaSelect({
handles: true,
});
}
function initImageUpload_UM( trigger ) {
if (trigger.data('upload_help_text')){
@@ -43,7 +35,7 @@ function initImageUpload_UM( trigger ) {
showAbort: false,
showDone: false,
showFileCounter: false,
showStatusAfterSuccess: false,
showStatusAfterSuccess: true,
onSubmit:function(files){
trigger.parents('.um-modal-body').find('.um-error-block').remove();
@@ -57,24 +49,114 @@ function initImageUpload_UM( trigger ) {
if (data.error && data.error != '') {
trigger.parents('.um-modal-body').append('<div class="um-error-block">'+data.error+'</div>');
trigger.parents('.um-modal-body').find('.upload-statusbar').hide(0);
um_modal_responsive();
} else {
jQuery.each( data, function(key, value) {
trigger.parents('.um-modal-body').find('.um-single-image-preview img').attr('src', value);
var img_id = trigger.parents('.um-modal-body').find('.um-single-image-preview img');
var img_id_h = trigger.parents('.um-modal-body').find('.um-single-image-preview');
img_id.attr("src", value);
img_id.load(function(){
trigger.parents('.um-modal-body').find('.um-modal-btn.um-finish-upload.disabled').removeClass('disabled');
trigger.parents('.um-modal-body').find('.ajax-upload-dragdrop,.upload-statusbar').hide(0);
img_id_h.show(0);
um_modal_responsive();
});
});
trigger.parents('.um-modal-body').find('.ajax-upload-dragdrop').fadeOut( function () {
trigger.parents('.um-modal-body').find('.um-single-image-preview').show();
trigger.parents('.um-modal-body').find('.um-modal-btn.um-finish-upload.disabled').removeClass('disabled');
um_modal_responsive();
} );
initCrop_UM();
}
}
});
}
function initFileUpload_UM( trigger ) {
if (trigger.data('upload_help_text')){
upload_help_text = '<span class="help">' + trigger.data('upload_help_text') + '</span>';
} else {
upload_help_text = '';
}
if ( trigger.data('icon') ) {
icon = '<span class="icon"><i class="'+ trigger.data('icon') + '"></i></span>';
} else {
icon = '';
}
if ( trigger.data('upload_text') ) {
upload_text = '<span class="str">' + trigger.data('upload_text') + '</span>';
} else {
upload_text = '';
}
trigger.uploadFile({
url: ultimatemember_file_upload_url,
method: "POST",
multiple: false,
formData: {key: trigger.data('key'), set_id: trigger.data('set_id'), set_mode: trigger.data('set_mode') },
fileName: trigger.data('key'),
allowedTypes: trigger.data('allowed_types'),
maxFileSize: trigger.data('max_size'),
dragDropStr: icon + upload_text + upload_help_text,
sizeErrorStr: trigger.data('max_size_error'),
extErrorStr: trigger.data('extension_error'),
maxFileCountErrorStr: trigger.data('max_files_error'),
maxFileCount: 1,
showDelete: false,
showAbort: false,
showDone: false,
showFileCounter: false,
showStatusAfterSuccess: true,
onSubmit:function(files){
trigger.parents('.um-modal-body').find('.um-error-block').remove();
},
onSuccess:function(files,data,xhr){
trigger.selectedFiles = 0;
data = jQuery.parseJSON(data);
if (data.error && data.error != '') {
trigger.parents('.um-modal-body').append('<div class="um-error-block">'+data.error+'</div>');
trigger.parents('.um-modal-body').find('.upload-statusbar').hide(0);
um_modal_responsive();
} else {
jQuery.each( data, function(key, value) {
trigger.parents('.um-modal-body').find('.um-modal-btn.um-finish-upload.disabled').removeClass('disabled');
trigger.parents('.um-modal-body').find('.ajax-upload-dragdrop,.upload-statusbar').hide(0);
trigger.parents('.um-modal-body').find('.um-single-file-preview').show(0);
if (key == 'icon') {
trigger.parents('.um-modal-body').find('.um-single-fileinfo i').removeClass().addClass(value);
} else if ( key == 'icon_bg' ) {
trigger.parents('.um-modal-body').find('.um-single-fileinfo span.icon').css({'background-color' : value } );
} else if ( key == 'filename' ) {
trigger.parents('.um-modal-body').find('.um-single-fileinfo span.filename').html(value);
} else {
trigger.parents('.um-modal-body').find('.um-single-fileinfo a').attr('href', value);
}
});
um_modal_responsive();
}
}
});
}
+217 -15
View File
@@ -1,10 +1,103 @@
function initCrop_UM() {
// only when a crop image is in view
var target_img = jQuery('.um-modal:visible .um-single-image-preview.crop img');
var target_img_parent = jQuery('.um-modal:visible .um-single-image-preview.crop');
var crop_data = target_img.parent().attr('data-crop');
var min_width = target_img.parent().attr('data-min_width');
var min_height = target_img.parent().attr('data-min_height');
var ratio = target_img.parent().attr('data-ratio');
// custom defined ratio maybe
if ( jQuery('.um-modal').find('#um_upload_single').attr('data-ratio') ) {
var ratio = jQuery('.um-modal').find('#um_upload_single').attr('data-ratio');
var ratio_split = ratio.split(':');
var ratio = ratio_split[0];
}
if ( target_img.length ) {
if ( target_img.attr('src') != '' ) {
var max_height = jQuery(window).height() - ( jQuery('.um-modal-footer a').height() + 20 ) - 50 - ( jQuery('.um-modal-header:visible').height() );
target_img.css({'height' : 'auto'});
target_img_parent.css({'height' : 'auto'});
if ( jQuery(window).height() <= 400 ) {
target_img_parent.css({ 'height': max_height +'px', 'max-height' : max_height + 'px' });
target_img.css({ 'height' : 'auto' });
} else {
target_img.css({ 'height': 'auto', 'max-height' : max_height + 'px' });
target_img_parent.css({ 'height': target_img.height(), 'max-height' : max_height + 'px' });
}
if ( crop_data == 'square' ) {
var opts = {
minWidth: min_width,
minHeight: min_height,
dragCrop: false,
aspectRatio: 1.0,
zoomable: false,
rotatable: false,
dashed: false,
done: function(data) {
target_img.parent().attr('data-coord', Math.round(data.x) + ',' + Math.round(data.y) + ',' + Math.round(data.width) + ',' + Math.round(data.height) );
}
};
} else if ( crop_data == 'cover' ) {
var opts = {
minWidth: min_width,
minHeight: Math.round( min_width / ratio ),
dragCrop: false,
aspectRatio: ratio,
zoomable: false,
rotatable: false,
dashed: false,
done: function(data) {
target_img.parent().attr('data-coord', Math.round(data.x) + ',' + Math.round(data.y) + ',' + Math.round(data.width) + ',' + Math.round(data.height) );
}
};
} else {
var opts = {
dragCrop: true,
aspectRatio: "auto",
zoomable: false,
rotatable: false,
dashed: false,
done: function(data) {
target_img.parent().attr('data-coord', Math.round(data.x) + ',' + Math.round(data.y) + ',' + Math.round(data.width) + ',' + Math.round(data.height) );
}
};
}
target_img.cropper( opts );
}
}
}
function um_new_modal( id, size ){
var modal = jQuery('body').find('.um-modal-overlay');
jQuery('.tipsy').hide();
jQuery('.um-dropdown').hide();
jQuery('body,html').css("overflow", "hidden");
jQuery(document).bind("touchmove", function(e){e.preventDefault();});
jQuery('.um-modal').on('touchmove', function(e){e.stopPropagation();});
jQuery('body').append('<div class="um-modal-overlay" /><div class="um-modal" />');
jQuery('#' + id).prependTo('.um-modal');
@@ -14,6 +107,8 @@ function um_new_modal( id, size ){
um_modal_size( size );
initImageUpload_UM( jQuery('.um-modal:visible').find('.um-single-image-upload') );
initFileUpload_UM( jQuery('.um-modal:visible').find('.um-single-file-upload') );
um_modal_responsive();
@@ -22,13 +117,9 @@ function um_new_modal( id, size ){
function um_modal_responsive() {
var modal = jQuery('.um-modal:visible');
if ( modal.length ) {
var window_height_diff = jQuery(window).height() - modal.innerHeight();
var half_gap = window_height_diff / 2 + 'px';
var element_width = jQuery(window).width();
modal.removeClass('uimob340');
@@ -37,35 +128,49 @@ function um_modal_responsive() {
if ( element_width <= 340 ) {
modal.addClass('uimob340');
initCrop_UM();
modal.animate({ 'bottom' : 0 }, 300);
} else if ( element_width <= 500 ) {
modal.addClass('uimob500');
initCrop_UM();
modal.animate({ 'bottom' : 0 }, 300);
} else if ( element_width <= 800 ) {
initCrop_UM();
var half_gap = ( jQuery(window).height() - modal.innerHeight() ) / 2 + 'px';
modal.animate({ 'bottom' : half_gap }, 300);
} else if ( element_width <= 960 ) {
initCrop_UM();
var half_gap = ( jQuery(window).height() - modal.innerHeight() ) / 2 + 'px';
modal.animate({ 'bottom' : half_gap }, 300);
} else if ( element_width > 960 ) {
initCrop_UM();
var half_gap = ( jQuery(window).height() - modal.innerHeight() ) / 2 + 'px';
modal.animate({ 'bottom' : half_gap }, 300);
}
}
}
function um_remove_modal(){
jQuery('.um-single-image-preview.crop img').imgAreaSelect({ hide: true });
jQuery('.um-single-image-preview img').cropper("destroy");
jQuery('body,html').css("overflow", "auto");
jQuery(document).unbind('touchmove');
jQuery('.um-modal div[id^="um_"]').hide().appendTo('body');
jQuery('.um-modal,.um-modal-overlay').remove();
}
function um_modal_size( aclass ) {
@@ -97,6 +202,25 @@ jQuery(document).ready(function() {
return false;
});
/**
remove uploaded file
**/
jQuery(document).on('click', '.um-modal .um-single-file-preview a.cancel', function(e){
e.preventDefault();
var parent = jQuery(this).parents('.um-modal-body');
parent.find('.um-single-file-preview').hide();
parent.find('.ajax-upload-dragdrop').show();
parent.find('.um-modal-btn.um-finish-upload').addClass('disabled');
um_modal_responsive();
return false;
});
/**
remove uploaded image
**/
@@ -105,6 +229,10 @@ jQuery(document).ready(function() {
var parent = jQuery(this).parents('.um-modal-body');
parent.find('.um-single-image-preview img').cropper("destroy");
parent.find('.um-single-image-preview img').attr('src', '');
parent.find('.um-single-image-preview').hide();
parent.find('.ajax-upload-dragdrop').show();
@@ -117,19 +245,80 @@ jQuery(document).ready(function() {
});
/**
finish upload
finish file upload
**/
jQuery(document).on('click', '.um-finish-upload', function(){
jQuery(document).on('click', '.um-finish-upload.file', function(){
var key = jQuery(this).attr('data-key');
var src = jQuery(this).parents('.um-modal-body').find('.um-single-image-preview img').attr('src');
jQuery('.um-single-image-preview[data-key='+key+']').fadeIn().find('img').attr('src', src);
var preview = jQuery(this).parents('.um-modal-body').find('.um-single-file-preview').html();
um_remove_modal();
jQuery('.um-single-image-preview[data-key='+key+']').parents('.um-field').find('.um-btn-auto-width').html('Change/Modify Photo');
jQuery('.um-single-file-preview[data-key='+key+']').fadeIn().html( preview );
jQuery('.um-single-file-preview[data-key='+key+']').parents('.um-field').find('.um-btn-auto-width').html( jQuery(this).attr('data-change') );
});
/**
finish image upload
**/
jQuery(document).on('click', '.um-finish-upload.image', function(){
var elem = jQuery(this);
var key = jQuery(this).attr('data-key');
var img_c = jQuery(this).parents('.um-modal-body').find('.um-single-image-preview');
var src = img_c.find('img').attr('src');
var coord = img_c.attr('data-coord');
if ( jQuery(this).parents('#um_upload_single').attr('data-user_id') ) {
var user_id = jQuery(this).parents('#um_upload_single').attr('data-user_id');
} else {
var user_id = 0;
}
if ( coord ) { // crop image first before processing
jQuery(this).html( jQuery(this).attr('data-processing') ).addClass('disabled');
jQuery.ajax({
url: ultimatemember_ajax_url,
type: 'POST',
data: {
action: 'ultimatemember_resize_image',
src : src,
coord : coord,
user_id : user_id,
key: key,
},
success: function(data){
d = new Date();
if ( key == 'profile_photo') {
jQuery('.um-profile-photo-img img').attr('src', data + "?"+d.getTime());
}
if ( key == 'cover_photo') {
jQuery('.um-cover-e').empty().html('<a href="#"><img src="' + data + "?"+d.getTime() + '" alt="" /></a>');
jQuery('.um-cover-overlay').show();
}
jQuery('.um-single-image-preview[data-key='+key+']').fadeIn().find('img').attr('src', data + "?"+d.getTime());
um_remove_modal();
jQuery('.um-single-image-preview[data-key='+key+']').parents('.um-field').find('.um-btn-auto-width').html( elem.attr('data-change') );
}
});
} else {
d = new Date();
jQuery('.um-single-image-preview[data-key='+key+']').fadeIn().find('img').attr('src', src + "?"+d.getTime());
um_remove_modal();
jQuery('.um-single-image-preview[data-key='+key+']').parents('.um-field').find('.um-btn-auto-width').html( elem.attr('data-change') );
}
});
@@ -148,6 +337,19 @@ jQuery(document).ready(function() {
if ( jQuery(this).data('modal-copy') ) {
jQuery('#' + modal_id).html( jQuery(this).parents('.um-field').find('.um-modal-hidden-content').html() );
if ( jQuery(this).parents('.um-profile-photo').attr('data-user_id') ) {
jQuery('#' + modal_id).attr('data-user_id', jQuery(this).parents('.um-profile-photo').attr('data-user_id') );
}
if ( jQuery(this).parents('.um-cover').attr('data-ratio') ) {
jQuery('#' + modal_id).attr('data-ratio', jQuery(this).parents('.um-cover').attr('data-ratio') );
}
if ( jQuery(this).parents('.um-cover').attr('data-user_id') ) {
jQuery('#' + modal_id).attr('data-user_id', jQuery(this).parents('.um-cover').attr('data-user_id') );
}
um_new_modal( modal_id, size );
} else {
um_new_modal( modal_id, size );
+52
View File
@@ -8,5 +8,57 @@ jQuery(document).ready(function() {
return false;
});
/* No need to allow # */
jQuery(document).on('click', '.um-cover a', function(e){
e.preventDefault();
return false;
});
/* Reset profile photo */
jQuery(document).on('click', '.um-reset-profile-photo', function(e){
jQuery('.um-profile-photo-img img').attr('src', jQuery(this).attr('data-default_src') );
user_id = jQuery(this).attr('data-user_id');
metakey = 'profile_photo';
jQuery.ajax({
url: ultimatemember_ajax_url,
type: 'post',
data: {
action: 'ultimatemember_delete_profile_photo',
metakey: metakey,
user_id: user_id
}
});
});
/* Reset cover photo */
jQuery(document).on('click', '.um-reset-cover-photo', function(e){
jQuery('.um-cover-overlay').hide();
jQuery('.um-cover-e').html('<a href="#" class="um-cover-add um-manual-trigger" data-parent=".um-cover" data-child=".um-btn-auto-width"><span class="um-cover-add-i"><i class="um-icon-plus-add um-tip-n" title="Upload a cover photo"></i></span></a>');
jQuery('.um-dropdown').hide();
um_responsive();
user_id = jQuery(this).attr('data-user_id');
metakey = 'cover_photo';
jQuery.ajax({
url: ultimatemember_ajax_url,
type: 'post',
data: {
action: 'ultimatemember_delete_cover_photo',
metakey: metakey,
user_id: user_id
}
});
});
});
+79 -5
View File
@@ -1,5 +1,57 @@
function um_responsive(){
function UM_domenus(){
jQuery('.um-dropdown').each(function(){
var menu = jQuery(this);
var element = jQuery(this).attr('data-element');
var position = jQuery(this).attr('data-position');
jQuery(element).addClass('um-trigger-menu-on-'+menu.attr('data-trigger'));
if ( position == 'bc' ){
if ( 200 > jQuery(element).find('img').width() ) {
left_p = ( ( jQuery(element).width() - jQuery(element).find('img').width() ) / 2 ) + ( ( jQuery(element).find('img').width() - 200 ) / 2 );
} else {
left_p = ( ( jQuery(element).width() - jQuery(element).find('img').width() ) / 2 );
}
top_ = parseInt( jQuery(element).find('a').css('top') );
if ( top_ ) {
top_p = jQuery(element).find('img').height() + 4 + top_;
left_gap = 4;
} else {
top_p = jQuery(element).find('img').height() + 4;
left_gap = 0;
}
if ( top_p == 4 && element == 'div.um-cover' ) {
top_p = jQuery(element).height() / 2 + ( menu.height() / 2 );
}
menu.css({
'top' : top_p,
'width': 200,
'left': left_p + left_gap,
'text-align' : 'center',
});
menu.find('.um-dropdown-arr').find('i').addClass('um-icon-arrow-sans-up');
menu.find('.um-dropdown-arr').css({
'top' : '-18px',
'left' : ( menu.width() / 2 ) - 12,
});
}
});
}
function um_responsive(){
// responsive um shortcode
jQuery('.um').each(function(){
element_width = jQuery(this).width();
@@ -48,19 +100,39 @@ function um_responsive(){
jQuery(this).removeClass('uimob960');
}
jQuery('.um-members').each(function(){
UM_Member_Grid( jQuery(this) );
});
// account nav
if ( jQuery('.um-account-nav').length > 0 && jQuery('.um-account-side').is(':visible') && jQuery('.um-account-tab:visible').length == 0 ) {
jQuery('.um-account-side li a.current').trigger('click');
}
// show
jQuery(this).css('opacity',1);
});
// responsive cover
jQuery('.um-cover, .um-member-cover').each(function(){
var elem = jQuery(this);
var ratio = elem.data('ratio');
var width = elem.width();
var ratios = ratio.split(':');
calcHeight = Math.round( width / ratios[0] ) + 'px';
elem.height( calcHeight );
elem.find('.um-cover-add').height( calcHeight );
});
// members directory
jQuery('.um-members').each(function(){
UM_Member_Grid( jQuery(this) );
});
// menus
UM_domenus();
}
/* Run only when window is loaded */
@@ -74,6 +146,8 @@ jQuery(window).load(function() {
/* Run only when window is resized */
jQuery(window).resize(function() {
jQuery('.um-single-image-preview.crop:visible img').cropper("destroy");
um_responsive();
um_modal_responsive();
+38 -100
View File
@@ -1,12 +1,40 @@
jQuery(document).ready(function() {
/* Tooltips */
/* dropdown menu links */
jQuery(document).on('click', '.um-dropdown a', function(e){
e.preventDefault();
return false;
});
/* trigger dropdown on click */
jQuery(document).on('click', '.um-trigger-menu-on-click', function(e){
e.preventDefault();
jQuery('.um-dropdown').hide();
menu = jQuery(this).find('.um-dropdown');
menu.show();
return false;
});
/* hide dropdown */
jQuery(document).on('click', '.um-dropdown-hide', function(e){
menu = jQuery(this).parents('.um-dropdown');
menu.hide();
});
/* manual triggers */
jQuery(document).on('click', 'a.um-manual-trigger', function(){
var child = jQuery(this).attr('data-child');
var parent = jQuery(this).attr('data-parent');
jQuery(this).parents( parent ).find( child ).trigger('click');
});
/* tooltips */
jQuery('.um-tip-n').tipsy({gravity: 'n', opacity: 1, live: true, offset: 3 });
jQuery('.um-tip-w').tipsy({gravity: 'w', opacity: 1, live: true, offset: 3 });
jQuery('.um-tip-e').tipsy({gravity: 'e', opacity: 1, live: true, offset: 3 });
jQuery('.um-tip-s').tipsy({gravity: 's', opacity: 1, live: true, offset: 3 });
/* Custom Radio Buttons */
/* custom radio buttons */
jQuery('.um-field-radio').mouseenter(function(){
if (!jQuery(this).hasClass('active')) {
jQuery(this).find('i').removeClass().addClass('um-icon-check-3');
@@ -26,7 +54,7 @@ jQuery(document).ready(function() {
this_field.find('i').removeClass('um-icon-blank').addClass('um-icon-check-3');
});
/* Custom Checkbox Buttons */
/* custom checkbox buttons */
jQuery('.um-field-checkbox').mouseenter(function(){
if (!jQuery(this).hasClass('active')) {
jQuery(this).find('i').removeClass().addClass('um-icon-cross');
@@ -51,7 +79,7 @@ jQuery(document).ready(function() {
});
/* Date picker */
/* datepicker */
jQuery('.um-datepicker').pickadate({
min: [1900,1,1],
max: true,
@@ -60,7 +88,7 @@ jQuery(document).ready(function() {
hiddenSuffix: '__true'
});
/* Time picker */
/* timepicker */
jQuery('.um-timepicker').pickatime({
formatSubmit: 'HH:i',
hiddenSuffix: '__true'
@@ -95,108 +123,18 @@ jQuery(document).ready(function() {
/* remove uploaded image */
jQuery(document).on('click', '.um .um-single-image-preview a.cancel', function(e){
e.preventDefault();
var parent = jQuery(this).parents('.um-field');
parent.find('.um-single-image-preview').hide();
parent.find('.um-btn-auto-width').html('Upload');
return false;
});
/* File Upload */
jQuery(".um-single-file-upload").each(function(){
var trigger = jQuery(this);
if (trigger.data('upload_help_text')){
upload_help_text = '<span class="help">' + trigger.data('upload_help_text') + '</span>';
} else {
upload_help_text = '';
}
if ( trigger.data('icon') ) {
icon = '<span class="icon"><i class="'+ trigger.data('icon') + '"></i></span>';
} else {
icon = '';
}
if ( trigger.data('upload_text') ) {
upload_text = '<span class="str">' + trigger.data('upload_text') + '</span>';
} else {
upload_text = '';
}
trigger.uploadFile({
url: ultimatemember_file_upload_url,
method: "POST",
multiple: false,
formData: {key: trigger.data('key'), set_id: trigger.data('set_id'), set_mode: trigger.data('set_mode') },
fileName: trigger.data('key'),
allowedTypes: trigger.data('allowed_types'),
maxFileSize: trigger.data('max_size'),
dragDropStr: icon + upload_text + upload_help_text,
sizeErrorStr: trigger.data('max_size_error'),
extErrorStr: trigger.data('extension_error'),
maxFileCountErrorStr: trigger.data('max_files_error'),
maxFileCount: 1,
showDelete: false,
showAbort: false,
showDone: false,
showFileCounter: false,
showStatusAfterSuccess: false,
onSubmit:function(files){
trigger.parents('.um-field').find('.um-error-block').remove();
},
onSuccess:function(files,data,xhr){
trigger.selectedFiles = 0;
data = jQuery.parseJSON(data);
if (data.error && data.error != '') {
trigger.parents('.um-field').append('<div class="um-error-block">'+data.error+'</div>');
} else {
trigger.parents('.um-field').find('.ajax-upload-dragdrop').fadeOut( function() {
trigger.parents('.um-field').find('.um-single-file-preview').fadeIn();
});
jQuery.each( data, function(key, value) {
if (key == 'icon') {
trigger.parents('.um-field').find('.um-single-fileinfo i').removeClass().addClass(value);
} else if ( key == 'icon_bg' ) {
trigger.parents('.um-field').find('.um-single-fileinfo span.icon').css({'background-color' : value } );
} else if ( key == 'filename' ) {
trigger.parents('.um-field').find('.um-single-fileinfo span.filename').html(value);
} else {
trigger.parents('.um-field').find('.um-single-fileinfo a').attr('href', value);
}
});
}
}
});
});
/* Remove a single file upload */
jQuery(document).on('click', '.um-single-file-preview a.cancel', function(e){
/* remove uploaded file */
jQuery(document).on('click', '.um .um-single-file-preview a.cancel', function(e){
e.preventDefault();
var trigger = jQuery(this).parents('.um-field').find('.um-single-file-upload');
trigger.parents('.um-field').find('.um-single-file-preview').fadeOut(function(){
trigger.parents('.um-field').find('.ajax-upload-dragdrop').fadeIn();
});
var parent = jQuery(this).parents('.um-field');
parent.find('.um-single-file-preview').hide();
parent.find('.um-btn-auto-width').html('Upload');
return false;
});