first commit

This commit is contained in:
2024-11-10 21:08:49 +01:00
commit 0d932ce5ee
14455 changed files with 2567501 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

@@ -0,0 +1,56 @@
.upload_button, .remove_button, .upload_input {
vertical-align: bottom !important;
}
.dc-wp-fields-uploader img {
margin-right: 5px;
border-radius: 5%;
-moz-border-radius: 5%;
-webkit-border-radius: 5%;
-nsborder-radius: 5%;
border: 2px solid #dfdfdf;
}
.dc-wp-fields-uploader .placeHolder {
background: url('images/Placeholder.png');
background: url(images/Placeholder.png) no-repeat center center / 75px 75px;
webkit-background-size: cover;
moz-background-size: cover;
o-background-size: cover;
background-size: cover;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/Placeholder.png', sizingMethod='scale');
-ms-filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/Placeholder.png', sizingMethod='scale');
width :75px;
height: 75px;
display: inline-block;
}
.dc-wp-fields-uploader .placeHoldervideo {
background: url('images/PlaceholderVideo.png');
background: url(images/PlaceholderVideo.png) no-repeat center center / 75px 75px;
}
.dc-wp-fields-uploader .placeHolderdoc, .dc-wp-fields-uploader .placeHolderdocx {
background: url('images/Placeholderdoc.png');
background: url(images/Placeholderdoc.png) no-repeat center center / 75px 75px;
}
.dc-wp-fields-uploader .placeHolderpdf {
background: url('images/Placeholderpdf.png');
background: url(images/Placeholderpdf.png) no-repeat center center / 75px 75px;
}
.dc-wp-fields-uploader .placeHolderppt, .dc-wp-fields-uploader .placeHolderpptx {
background: url('images/Placeholderppt.png');
background: url(images/Placeholderppt.png) no-repeat center center / 75px 75px;
}
.dc-wp-fields-uploader .placeHolderxls, .dc-wp-fields-uploader .placeHolderxlsx {
background: url('images/Placeholderxls.png');
background: url(images/Placeholderxls.png) no-repeat center center / 75px 75px;
}
.dc-wp-fields-uploader .placeHoldertxt {
background: url('images/Placeholdertxt.png');
background: url(images/Placeholdertxt.png) no-repeat center center / 75px 75px;
}

View File

@@ -0,0 +1,63 @@
jQuery(document).ready(function($){
var _custom_media = true,
_orig_send_attachment = wp.media.editor.send.attachment;
$('.dc-wp-fields-uploader .upload_button').click(function(e) {
var send_attachment_bkp = wp.media.editor.send.attachment;
var button = $(this);
var mime = $(this).data('mime');
var id = button.attr('id').replace('_button', '');
_custom_media = true;
wp.media.editor.send.attachment = function(props, attachment) {
console.log(JSON.stringify(props) +":"+ JSON.stringify(attachment));
if ( _custom_media ) {
if(mime == 'image') {
$("#"+id+'_display').attr('src', attachment.url).removeClass('placeHolder').show();
if($("#"+id+'_preview').length > 0)
$("#"+id+'_preview').attr('src', attachment.url);
} else {
$("#"+id+'_display').attr('href', attachment.url);
if(attachment.icon) $("#"+id+'_display span').css('background', 'url("'+attachment.icon+'")').css('width', '48px').css('height', '64px');
}
$("#"+id).val(attachment.url);
$("#"+id).hide();
button.hide();
$("#"+id+'_remove_button').show();
} else {
return _orig_send_attachment.apply( this, [props, attachment] );
};
}
wp.media.editor.open(button);
return false;
});
$('.dc-wp-fields-uploader .remove_button').each(function() {
var button = $(this);
var mime = $(this).data('mime');
var id = button.attr('id').replace('_remove_button', '');
if(mime == 'image')
var attachment_url = $("#"+id+'_display').attr('src');
else
var attachment_url = $("#"+id+'_display').attr('href');
if(attachment_url.length == 0) button.hide();
else $("#"+id+'_button').hide();
button.click(function(e) {
id = $(this).attr('id').replace('_remove_button', '');
if(mime == 'image') {
$("#"+id+'_display').attr('src', '').addClass('placeHolder').hide();
$("#"+id+'_preview').attr('src', '');
} else {
$("#"+id+'_display').attr('href', '#');
}
$("#"+id).val('');
$(this).hide();
$("#"+id+'_button').show();
return false;
});
});
$('.add_media').on('click', function(){
_custom_media = false;
});
});

View File

@@ -0,0 +1 @@
.remove_button,.upload_button,.upload_input{vertical-align:bottom!important}.dc-wp-fields-uploader img{margin-right:5px;border-radius:5%;-moz-border-radius:5%;-webkit-border-radius:5%;-nsborder-radius:5%;border:2px solid #dfdfdf}.dc-wp-fields-uploader .placeHolder{background:url(images/Placeholder.png);background:url(images/Placeholder.png) no-repeat center center / 75px 75px;webkit-background-size:cover;moz-background-size:cover;o-background-size:cover;background-size:cover;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/Placeholder.png', sizingMethod='scale');-ms-filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/Placeholder.png', sizingMethod='scale');width:75px;height:75px;display:inline-block}.dc-wp-fields-uploader .placeHoldervideo{background:url(images/PlaceholderVideo.png);background:url(images/PlaceholderVideo.png) no-repeat center center / 75px 75px}.dc-wp-fields-uploader .placeHolderdoc,.dc-wp-fields-uploader .placeHolderdocx{background:url(images/Placeholderdoc.png);background:url(images/Placeholderdoc.png) no-repeat center center / 75px 75px}.dc-wp-fields-uploader .placeHolderpdf{background:url(images/Placeholderpdf.png);background:url(images/Placeholderpdf.png) no-repeat center center / 75px 75px}.dc-wp-fields-uploader .placeHolderppt,.dc-wp-fields-uploader .placeHolderpptx{background:url(images/Placeholderppt.png);background:url(images/Placeholderppt.png) no-repeat center center / 75px 75px}.dc-wp-fields-uploader .placeHolderxls,.dc-wp-fields-uploader .placeHolderxlsx{background:url(images/Placeholderxls.png);background:url(images/Placeholderxls.png) no-repeat center center / 75px 75px}.dc-wp-fields-uploader .placeHoldertxt{background:url(images/Placeholdertxt.png);background:url(images/Placeholdertxt.png) no-repeat center center / 75px 75px}

View File

@@ -0,0 +1 @@
jQuery(document).ready(function(e){var t=true,n=wp.media.editor.send.attachment;e(".dc-wp-fields-uploader .upload_button").click(function(r){var i=wp.media.editor.send.attachment;var s=e(this);var o=e(this).data("mime");var u=s.attr("id").replace("_button","");t=true;wp.media.editor.send.attachment=function(r,i){console.log(JSON.stringify(r)+":"+JSON.stringify(i));if(t){if(o=="image"){e("#"+u+"_display").attr("src",i.url).removeClass("placeHolder").show();if(e("#"+u+"_preview").length>0)e("#"+u+"_preview").attr("src",i.url)}else{e("#"+u+"_display").attr("href",i.url);if(i.icon)e("#"+u+"_display span").css("background",'url("'+i.icon+'")').css("width","48px").css("height","64px")}e("#"+u).val(i.url);e("#"+u).hide();s.hide();e("#"+u+"_remove_button").show()}else{return n.apply(this,[r,i])}};wp.media.editor.open(s);return false});e(".dc-wp-fields-uploader .remove_button").each(function(){var t=e(this);var n=e(this).data("mime");var r=t.attr("id").replace("_remove_button","");if(n=="image")var i=e("#"+r+"_display").attr("src");else var i=e("#"+r+"_display").attr("href");if(i.length==0)t.hide();else e("#"+r+"_button").hide();t.click(function(t){r=e(this).attr("id").replace("_remove_button","");if(n=="image"){e("#"+r+"_display").attr("src","").addClass("placeHolder").hide();e("#"+r+"_preview").attr("src","")}else{e("#"+r+"_display").attr("href","#")}e("#"+r).val("");e(this).hide();e("#"+r+"_button").show();return false})});e(".add_media").on("click",function(){t=false})})