mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
+28
-28
@@ -1,10 +1,10 @@
|
||||
jQuery(document).ready(function() {
|
||||
|
||||
|
||||
jQuery(document).on('click', '.um-popup-overlay', function(){
|
||||
|
||||
remove_Modal();
|
||||
});
|
||||
|
||||
|
||||
jQuery(document).on('click', '.um-modal-overlay, a[data-action="um_remove_modal"]', function(){
|
||||
um_remove_modal();
|
||||
});
|
||||
@@ -13,7 +13,7 @@ jQuery(document).ready(function() {
|
||||
e.preventDefault();
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
jQuery(document).on('click', '.um-modal .um-single-file-preview a.cancel', function(e){
|
||||
e.preventDefault();
|
||||
|
||||
@@ -37,10 +37,10 @@ jQuery(document).ready(function() {
|
||||
um_modal_responsive();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
jQuery(document).on('click', '.um-modal .um-single-image-preview a.cancel', function(e){
|
||||
e.preventDefault();
|
||||
|
||||
@@ -67,30 +67,30 @@ jQuery(document).ready(function() {
|
||||
um_modal_responsive();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
jQuery(document).on('click', '.um-finish-upload.file:not(.disabled)', function(){
|
||||
|
||||
|
||||
var key = jQuery(this).attr('data-key');
|
||||
|
||||
|
||||
var preview = jQuery(this).parents('.um-modal-body').find('.um-single-file-preview').html();
|
||||
|
||||
|
||||
um_remove_modal();
|
||||
|
||||
|
||||
jQuery('.um-single-file-preview[data-key='+key+']').fadeIn().html( preview );
|
||||
|
||||
var file = jQuery('.um-field[data-key='+key+']').find('.um-single-fileinfo a').data('file');
|
||||
|
||||
|
||||
jQuery('.um-single-file-preview[data-key='+key+']').parents('.um-field').find('.um-btn-auto-width').html( jQuery(this).attr('data-change') );
|
||||
|
||||
|
||||
jQuery('.um-single-file-preview[data-key='+key+']').parents('.um-field').find('input[type="hidden"]').val( file );
|
||||
|
||||
|
||||
});
|
||||
|
||||
jQuery(document).on('click', '.um-finish-upload.image:not(.disabled)', 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');
|
||||
@@ -112,7 +112,7 @@ jQuery(document).ready(function() {
|
||||
}
|
||||
|
||||
if ( coord ) {
|
||||
|
||||
|
||||
jQuery(this).html( jQuery(this).attr('data-processing') ).addClass('disabled');
|
||||
|
||||
jQuery.ajax({
|
||||
@@ -157,23 +157,23 @@ jQuery(document).ready(function() {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
} 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') );
|
||||
|
||||
|
||||
jQuery('.um-single-image-preview[data-key='+key+']').parents('.um-field').find('input[type=hidden]').val( file );
|
||||
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
jQuery(document.body).on('click', 'a[data-modal^="um_"], span[data-modal^="um_"]', function(e){
|
||||
|
||||
var modal_id = jQuery(this).attr('data-modal');
|
||||
@@ -183,19 +183,19 @@ jQuery(document).ready(function() {
|
||||
if ( jQuery(this).data('modal-size') ) {
|
||||
size = jQuery(this).data('modal-size');
|
||||
}
|
||||
|
||||
|
||||
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') );
|
||||
}
|
||||
@@ -209,4 +209,4 @@ jQuery(document).ready(function() {
|
||||
um_new_modal( modal_id, size );
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@@ -234,7 +234,7 @@ jQuery(document).ready(function() {
|
||||
/**
|
||||
disable link
|
||||
**/
|
||||
jQuery(document.body).on('click', '.um-admin-builder a, .um-admin-modal a', function(e){
|
||||
jQuery(document.body).on('click', '.um-admin-builder a, .um-admin-modal a:not(.um-preview-upload)', function(e){
|
||||
e.preventDefault();
|
||||
return false;
|
||||
});
|
||||
|
||||
@@ -709,7 +709,7 @@ function um_user_submitted_registration_formatted( $style = false ) {
|
||||
UM()->fields()->get_fields = $fields;
|
||||
|
||||
foreach ( $fields as $key => $array ) {
|
||||
if ( isset( $array['type'] ) && $array['type'] == 'row' ) {
|
||||
if ( isset( $array['type'] ) && 'row' === $array['type'] ) {
|
||||
$rows[ $key ] = $array;
|
||||
unset( UM()->fields()->get_fields[ $key ] ); // not needed now
|
||||
}
|
||||
@@ -747,7 +747,6 @@ function um_user_submitted_registration_formatted( $style = false ) {
|
||||
$cols_num = $col_split[ $c ];
|
||||
|
||||
// sub row fields
|
||||
$subrow_fields = null;
|
||||
$subrow_fields = UM()->fields()->get_fields_in_subrow( $row_fields, $c );
|
||||
|
||||
if ( is_array( $subrow_fields ) ) {
|
||||
@@ -766,7 +765,6 @@ function um_user_submitted_registration_formatted( $style = false ) {
|
||||
$output .= um_user_submited_display( $key, $data['title'] );
|
||||
}
|
||||
}
|
||||
|
||||
} elseif ( $cols_num == 2 ) {
|
||||
|
||||
$col1_fields = UM()->fields()->get_fields_in_column( $subrow_fields, 1 );
|
||||
@@ -782,7 +780,6 @@ function um_user_submitted_registration_formatted( $style = false ) {
|
||||
$output .= um_user_submited_display( $key, $data['title'] );
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
$col1_fields = UM()->fields()->get_fields_in_column( $subrow_fields, 1 );
|
||||
@@ -805,29 +802,19 @@ function um_user_submitted_registration_formatted( $style = false ) {
|
||||
$output .= um_user_submited_display( $key, $data['title'] );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
} // endfor
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ( $style ) {
|
||||
$output .= '</div>';
|
||||
}
|
||||
|
||||
|
||||
return $output;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -882,7 +869,7 @@ function um_user_submited_display( $k, $title, $data = array(), $style = true )
|
||||
}
|
||||
|
||||
if ( ! empty( $filedata['original_name'] ) ) {
|
||||
$v = '<a href="' . esc_attr( $baseurl . um_user( 'ID' ) . '/' . $file ) . '">' . esc_html( $filedata['original_name'] ) . '</a>';
|
||||
$v = '<a class="um-preview-upload" target="_blank" href="' . esc_attr( $baseurl . um_user( 'ID' ) . '/' . $file ) . '">' . esc_html( $filedata['original_name'] ) . '</a>';
|
||||
} else {
|
||||
$v = $baseurl . um_user( 'ID' ) . '/' . $file;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user