diff --git a/admin/core/um-admin-metabox.php b/admin/core/um-admin-metabox.php index 92456cdd..e88abf58 100644 --- a/admin/core/um-admin-metabox.php +++ b/admin/core/um-admin-metabox.php @@ -961,6 +961,20 @@ class UM_Admin_Metabox { break; + case '_crop': + ?> + +
+ +
+ + set_field_type == 'image' ) { diff --git a/assets/css/um-crop.css b/assets/css/um-crop.css new file mode 100644 index 00000000..c5b4fce1 --- /dev/null +++ b/assets/css/um-crop.css @@ -0,0 +1,41 @@ +/* + * imgAreaSelect default style + */ + +.imgareaselect-border1 { + background: url(../img/border-v.gif) repeat-y left top; +} + +.imgareaselect-border2 { + background: url(../img/border-h.gif) repeat-x left top; +} + +.imgareaselect-border3 { + background: url(../img/border-v.gif) repeat-y right top; +} + +.imgareaselect-border4 { + background: url(../img/border-h.gif) repeat-x left bottom; +} + +.imgareaselect-border1, .imgareaselect-border2, +.imgareaselect-border3, .imgareaselect-border4 { + filter: alpha(opacity=50); + opacity: 0.5; +} + +.imgareaselect-handle { + background-color: #fff; + border: solid 1px #000; + filter: alpha(opacity=50); + opacity: 0.5; +} + +.imgareaselect-outer { + background-color: #000; + filter: alpha(opacity=50); + opacity: 0.5; +} + +.imgareaselect-selection { +} \ No newline at end of file diff --git a/assets/css/um-fileupload.css b/assets/css/um-fileupload.css index d2dc306a..2d677d3d 100644 --- a/assets/css/um-fileupload.css +++ b/assets/css/um-fileupload.css @@ -2,48 +2,46 @@ - image preview */ +.um .um-single-image-preview, +.um .um-single-file-preview { + margin-bottom: 20px; +} + .um-single-image-preview, .um-single-file-preview { display: none; width: 100%; - background: #f5f5f5; box-sizing: border-box; - border: 2px dashed #ddd; text-align: center; - margin: 15px 0 0 0; position: relative; + min-height: 40px; } .um-single-image-preview a.cancel, .um-single-file-preview a.cancel { position: absolute; - top: 6px; - right: 6px; + top: -15px; + right: -15px; width: 30px; height: 30px; - line-height: 30px; border-radius: 999px; - background: #f5f5f5; + background: #ddd; cursor: pointer; - opacity: 0.75; transition: 0.2s; text-decoration: none !important; } -.um-single-image-preview a.cancel:hover, -.um-single-file-preview a.cancel:hover -{opacity: 1} .um-single-image-preview a.cancel i, .um-single-file-preview a.cancel i { - font-size: 22px; - color: #424242; - vertical-align: middle; + font-size: 16px; + color: #888; + position: relative; + top: 4px; } .um-single-image-preview img { max-width: 100%; margin: 0 auto !important; - max-height: 250px; padding: 0 !important; display: block !important; } @@ -85,7 +83,6 @@ */ .upload-statusbar { - background: #fff; margin: 20px 0 0 0; } @@ -96,15 +93,15 @@ .upload-progress { position: relative; width: 100%; - background: #fff; box-sizing: border-box; } .upload-bar { width: 0; - height: 12px; + height: 10px; color: #666; - background: #3ba1da; + background: #7ACF58; + border-radius: 3px; } /* @@ -116,11 +113,10 @@ text-align: center; vertical-align:middle; padding: 20px; - background: #f5f5f5; box-sizing: border-box; border: 2px dashed #ddd; + border-radius: 3px; font-size: 18px; - margin: 15px 0 0 0; line-height: 1em; } @@ -167,4 +163,4 @@ background: #44b0ec; } -.um-form input[type="file"]::-webkit-file-upload-button { cursor: pointer } \ No newline at end of file +.um-modal input[type="file"]::-webkit-file-upload-button { cursor: pointer } \ No newline at end of file diff --git a/assets/css/um-modal.css b/assets/css/um-modal.css index 0ae673ac..1bb34bf2 100644 --- a/assets/css/um-modal.css +++ b/assets/css/um-modal.css @@ -16,27 +16,40 @@ - modal */ -.um-modal * {-webkit-font-smoothing: antialiased !important;-moz-osx-font-smoothing: grayscale;} +.um-modal * { + -webkit-font-smoothing: antialiased !important; + -moz-osx-font-smoothing: grayscale !important; +} + +.um-modal-hidden-content { + display: none; +} .um-modal { border-radius: 3px; - background: #fff; position: fixed; - top: 50% !important; - left: 50% !important; + left: 50%; display: none; z-index: 100010; box-sizing: border-box; + bottom: -50px; } .um-modal.normal {width: 500px;margin-left: -250px;} .um-modal.large {width: 730px;margin-left: -365px;} .um-modal.small {width: 400px;margin-left: -200px;} .um-modal-body { - min-height: 100px; - padding: 0 20px; + min-height: 3px; + padding: 20px; box-sizing: border-box; width: 100%; + background: #fff; + border-radius: 0 0 3px 3px; +} + +.um-modal.loading .um-modal-body { + background: #fff url(../img/loading.gif) no-repeat center; + min-height: 150px; } .um-modal div.um { @@ -48,8 +61,56 @@ height: 44px; line-height: 44px; color: #fff; - background: #aaa; + background: #3ba1da; padding: 0 20px; box-sizing: border-box; - font-size: 16px; + font-size: 15px; +} + +.um-modal-footer { + margin-top: 20px; +} + +.um-modal-left { + float: left; +} + +.um-modal-right { + float: right; +} + +.um-modal-btn.disabled, +.um-modal-btn.disabled:hover { + opacity: 0.5; + cursor: default !important; + background: #3ba1da; +} + +.um-modal-btn { + cursor: pointer !important; + line-height: 34px !important; + height: 34px; + display: inline-block; + border-radius: 3px; + padding: 0 20px; + color: #fff; + background: #3ba1da; + vertical-align: middle; + font-size: 14px; + box-sizing: border-box; + transition: 0.2s; + text-decoration: none !important; +} + +.um-modal-btn:hover { + background: #44b0ec; +} + +.um-modal-btn.alt { + color: #666; + background: #eee; +} + +.um-modal-btn.alt:hover { + background: #e5e5e5; } \ No newline at end of file diff --git a/assets/css/um-responsive.css b/assets/css/um-responsive.css index d4e00844..a9240ae3 100644 --- a/assets/css/um-responsive.css +++ b/assets/css/um-responsive.css @@ -1,3 +1,4 @@ +.uimob340-show, .uimob500-show, .uimob800-show, .uimob960-show @@ -5,6 +6,7 @@ display: none; } +div.uimob340 .uimob340-show, div.uimob500 .uimob500-show, div.uimob800 .uimob800-show, div.uimob960 .uimob960-show @@ -12,6 +14,7 @@ div.uimob960 .uimob960-show display: block; } +div.uimob340 .uimob340-hide, div.uimob500 .uimob500-hide, div.uimob800 .uimob800-hide, div.uimob960 .uimob960-hide @@ -19,12 +22,54 @@ div.uimob960 .uimob960-hide display: none; } +/** + for 340px and below +**/ + +/********************************************/ + +.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%; +} + +.um-modal.uimob340 { + width: 100% !important; + margin: 0 !important; + left: 0 !important; +} + +.um-modal.uimob340, +.um-modal.uimob340 .um-modal-body, +.um-modal.uimob340 .um-modal-header { + border-radius: 0; +} + /** for 500px and below **/ /********************************************/ +.um-modal.uimob500 { + width: 100% !important; + margin: 0 !important; + left: 0 !important; +} + +.um-modal.uimob500, +.um-modal.uimob500 .um-modal-body, +.um-modal.uimob500 .um-modal-header { + border-radius: 0; +} + div.uimob500 .um-profile-body { padding-left: 0; padding-right: 0; @@ -247,4 +292,34 @@ div.uimob960 .um-member { width: 48%; } -div.uimob960 .um-gutter-sizer { width: 4% } \ No newline at end of file +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: 800px ){ + .um-single-image-preview img {max-height: 500px} +} + +@media screen and ( max-height: 700px ){ + .um-single-image-preview img {max-height: 350px} +} + +@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} +} \ No newline at end of file diff --git a/assets/css/um-styles.css b/assets/css/um-styles.css index f71fe7e5..74670e46 100644 --- a/assets/css/um-styles.css +++ b/assets/css/um-styles.css @@ -8,7 +8,6 @@ box-sizing: border-box; color: #666; font-size: 15px; - overflow: hidden; margin-bottom: 30px !important; -webkit-font-smoothing: antialiased !important; -moz-osx-font-smoothing: grayscale !important; @@ -448,6 +447,7 @@ input[type=submit].um-button:focus { } .um-button { + font-size: 15px; border: none !important; display: block; width: 100%; @@ -468,6 +468,15 @@ input[type=submit].um-button:focus { letter-spacing: 0.5px; } + +.um-button.um-btn-auto-width { + width: auto; + display: inline-block; + padding: 14px 20px !important; + min-width: 200px; + max-width: 450px; +} + a.um-link-alt { line-height: 22px; color: #888 !important; diff --git a/assets/img/border-anim-h.gif b/assets/img/border-anim-h.gif new file mode 100644 index 00000000..ec9f5da7 Binary files /dev/null and b/assets/img/border-anim-h.gif differ diff --git a/assets/img/border-anim-v.gif b/assets/img/border-anim-v.gif new file mode 100644 index 00000000..331cc90b Binary files /dev/null and b/assets/img/border-anim-v.gif differ diff --git a/assets/img/border-h.gif b/assets/img/border-h.gif new file mode 100644 index 00000000..a2aa5b0d Binary files /dev/null and b/assets/img/border-h.gif differ diff --git a/assets/img/border-v.gif b/assets/img/border-v.gif new file mode 100644 index 00000000..4bfd5556 Binary files /dev/null and b/assets/img/border-v.gif differ diff --git a/assets/img/loading.gif b/assets/img/loading.gif new file mode 100644 index 00000000..11858f09 Binary files /dev/null and b/assets/img/loading.gif differ diff --git a/assets/js/um-crop.js b/assets/js/um-crop.js new file mode 100644 index 00000000..bde7a214 --- /dev/null +++ b/assets/js/um-crop.js @@ -0,0 +1 @@ +eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(m($){18 W=2v.4T,D=2v.4S,F=2v.4R,u=2v.4Q;m V(){C $("<4P/>")};$.N=m(T,c){18 O=$(T),1F,A=V(),1k=V(),I=V().r(V()).r(V()).r(V()),B=V().r(V()).r(V()).r(V()),E=$([]),1K,G,l,17={v:0,l:0},Q,M,1l,1g={v:0,l:0},12=0,1J="1H",2k,2j,1t,1s,S,1B,1A,2o,2n,14,1Q,a,b,j,g,f={a:0,b:0,j:0,g:0,H:0,L:0},2u=R.4O,1M=4N.4M,$p,d,i,o,w,h,2p;m 1n(x){C x+17.v-1g.v};m 1m(y){C y+17.l-1g.l};m 1b(x){C x-17.v+1g.v};m 1a(y){C y-17.l+1g.l};m 1z(3J){C 3J.4L-1g.v};m 1y(3I){C 3I.4K-1g.l};m 13(32){18 1i=32||1t,1h=32||1s;C{a:u(f.a*1i),b:u(f.b*1h),j:u(f.j*1i),g:u(f.g*1h),H:u(f.j*1i)-u(f.a*1i),L:u(f.g*1h)-u(f.b*1h)}};m 23(a,b,j,g,31){18 1i=31||1t,1h=31||1s;f={a:u(a/1i||0),b:u(b/1h||0),j:u(j/1i||0),g:u(g/1h||0)};f.H=f.j-f.a;f.L=f.g-f.b};m 1f(){9(!1F||!O.H()){C}17={v:u(O.2t().v),l:u(O.2t().l)};Q=O.2Y();M=O.3H();17.l+=(O.30()-M)>>1;17.v+=(O.2q()-Q)>>1;1B=u(c.4J/1t)||0;1A=u(c.4I/1s)||0;2o=u(F(c.4H/1t||1<<24,Q));2n=u(F(c.4G/1s||1<<24,M));9($().4F=="1.3.2"&&1J=="21"&&!2u["4E"]){17.l+=D(R.1q.2r,2u.2r);17.v+=D(R.1q.2s,2u.2s)}1g=/1H|4D/.1c(1l.q("1p"))?{v:u(1l.2t().v)-1l.2s(),l:u(1l.2t().l)-1l.2r()}:1J=="21"?{v:$(R).2s(),l:$(R).2r()}:{v:0,l:0};G=1n(0);l=1m(0);9(f.j>Q||f.g>M){1U()}};m 1V(3F){9(!1Q){C}A.q({v:1n(f.a),l:1m(f.b)}).r(1k).H(w=f.H).L(h=f.L);1k.r(I).r(E).q({v:0,l:0});I.H(D(w-I.2q()+I.2Y(),0)).L(D(h-I.30()+I.3H(),0));$(B[0]).q({v:G,l:l,H:f.a,L:M});$(B[1]).q({v:G+f.a,l:l,H:w,L:f.b});$(B[2]).q({v:G+f.j,l:l,H:Q-f.j,L:M});$(B[3]).q({v:G+f.a,l:l+f.g,H:w,L:M-f.g});w-=E.2q();h-=E.30();2O(E.3f){15 8:$(E[4]).q({v:w>>1});$(E[5]).q({v:w,l:h>>1});$(E[6]).q({v:w>>1,l:h});$(E[7]).q({l:h>>1});15 4:E.3G(1,3).q({v:w});E.3G(2,4).q({l:h})}9(3F!==Y){9($.N.2Z!=2R){$(R).U($.N.2z,$.N.2Z)}9(c.1T){$(R)[$.N.2z]($.N.2Z=2R)}}9(1j&&I.2q()-I.2Y()==2){I.q("3E",0);3x(m(){I.q("3E","4C")},0)}};m 22(3D){1f();1V(3D);a=1n(f.a);b=1m(f.b);j=1n(f.j);g=1m(f.g)};m 27(2X,2w){c.1P?2X.4B(c.1P,2w):2X.1r()};m 1d(2W){18 x=1b(1z(2W))-f.a,y=1a(1y(2W))-f.b;9(!2p){1f();2p=11;A.1G("4A",m(){2p=Y})}S="";9(c.2D){9(y<=c.1W){S="n"}X{9(y>=f.L-c.1W){S="s"}}9(x<=c.1W){S+="w"}X{9(x>=f.H-c.1W){S+="e"}}}A.q("2V",S?S+"-19":c.26?"4z":"");9(1K){1K.4y()}};m 2S(4x){$("1q").q("2V","");9(c.4w||f.H*f.L==0){27(A.r(B),m(){$(J).1r()})}$(R).U("P",2l);A.P(1d);c.2f(T,13())};m 2C(1X){9(1X.3z!=1){C Y}1f();9(S){$("1q").q("2V",S+"-19");a=1n(f[/w/.1c(S)?"j":"a"]);b=1m(f[/n/.1c(S)?"g":"b"]);$(R).P(2l).1G("1x",2S);A.U("P",1d)}X{9(c.26){2k=G+f.a-1z(1X);2j=l+f.b-1y(1X);A.U("P",1d);$(R).P(2T).1G("1x",m(){c.2f(T,13());$(R).U("P",2T);A.P(1d)})}X{O.1O(1X)}}C Y};m 1w(3C){9(14){9(3C){j=D(G,F(G+Q,a+W(g-b)*14*(j>a||-1)));g=u(D(l,F(l+M,b+W(j-a)/14*(g>b||-1))));j=u(j)}X{g=D(l,F(l+M,b+W(j-a)/14*(g>b||-1)));j=u(D(G,F(G+Q,a+W(g-b)*14*(j>a||-1))));g=u(g)}}};m 1U(){a=F(a,G+Q);b=F(b,l+M);9(W(j-a)<1B){j=a-1B*(jG+Q){a=G+Q-1B}}}9(W(g-b)<1A){g=b-1A*(gl+M){b=l+M-1A}}}j=D(G,F(j,G+Q));g=D(l,F(g,l+M));1w(W(j-a)