-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit dbbb65d
Showing
11 changed files
with
1,403 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<img src="https://ps.w.org/pepro-noconflict-video/assets/banner-772x250.png" style="border-radius: 7px;"/> | ||
<img src="https://ps.w.org/pepro-noconflict-video/assets/banner-772x250-rtl.png" style="border-radius: 7px;"/> | ||
|
||
**Pepro noConflict Video** | ||
========================== | ||
|
||
### **Developed by** [Perpro Development Group](https://pepro.dev/) for WooCommerce | ||
|
||
*Current Version: 1.1.0* \| *Lead Developer:* [Amirhosseinhpv](https://hpv.im/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/** | ||
* @Author: Amirhosseinhpv | ||
* @Date: 2021/07/08 10:01:18 | ||
* @Email: [email protected] | ||
* @Last modified by: Amirhosseinhpv | ||
* @Last modified time: 2021/07/08 18:33:18 | ||
* @License: GPLv2 | ||
* @Copyright: Copyright © Amirhosseinhpv (https://hpv.im), all rights reserved. | ||
*/ | ||
|
||
.video2_class .wpb_element_title { | ||
position: absolute; | ||
display: flex; | ||
align-items: center; | ||
} | ||
.wpb_el_type_pepro_mediapicker { | ||
display: block; | ||
background: #e3e5e5 none repeat scroll 0% 0%; | ||
padding: 4px 0.3rem; | ||
margin: 2rem 1rem; | ||
border-radius: 4px; | ||
direction: ltr; | ||
line-height: 1.6; | ||
font-family: Consolas; | ||
} | ||
.vc_col-sm-6.pp-bottom { | ||
border-bottom: 1px solid #ececec; | ||
padding-bottom: 1rem; | ||
} | ||
|
||
/* common vc css fix for rtl-ready */ | ||
.vc_css-editor select { | ||
width: 100% !important; | ||
text-align: right; | ||
} | ||
[dir="rtl"] .vc_general.vc_ui-tabs-line>li { | ||
float: right; | ||
} | ||
[dir="rtl"] .vc_ui-panel-header .vc_ui-panel-header-controls { | ||
float: left; | ||
margin: 2px 12px 0 0; | ||
} | ||
[dir="rtl"] .vc_ui-panel-header .vc_ui-panel-header-heading { | ||
margin: 0 0 1rem 1rem; | ||
} | ||
[dir="rtl"] .vc_add-element-container .wpb-content-layouts li { | ||
float: right; | ||
} | ||
[dir="rtl"] .vc_add-element-container .vc_element-icon { | ||
position: absolute; | ||
top: 20px; | ||
right: 8px; | ||
} | ||
[dir="rtl"] .vc_add-element-container .wpb-content-layouts a { | ||
padding: 2px 47px 4px 2px; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/** | ||
* @Author: Amirhosseinhpv | ||
* @Date: 2021/07/08 10:01:18 | ||
* @Email: [email protected] | ||
* @Last modified by: Amirhosseinhpv | ||
* @Last modified time: 2021/07/08 18:33:14 | ||
* @License: GPLv2 | ||
* @Copyright: Copyright © Amirhosseinhpv (https://hpv.im), all rights reserved. | ||
*/ | ||
|
||
(function ($) { | ||
vc.atts.pepro_mediapicker = { | ||
init: function (param, $field) { | ||
$(".vc_filepicker .wpb_element_label").each(function (index) { | ||
$(this).append( | ||
`<a class='vc_filepicker_btn' href='javascript:;' style="padding: 0 0.5rem; margin: .4rem;box-shadow: none !important;"><i class='fas fa-folder-open'></i></a>` | ||
); | ||
}); | ||
$(".vc_filepicker .vc_filepicker_btn").click(function (e) { | ||
e.preventDefault(); | ||
var me = $(this); | ||
var upload = wp | ||
.media({ multiple: false }) | ||
.on("select", function () { | ||
var select = upload.state().get("selection"); | ||
var attach = select.first().toJSON(); | ||
me.parents(".vc_filepicker") | ||
.find(".textfield") | ||
.val(attach.url) | ||
.trigger("change"); | ||
}) | ||
.open(); | ||
}); | ||
$(document).on("click tap",".wpb_el_type_textfield .wpb_element_label", function (e) { | ||
$(this).parent().find(".textfield").focus(); | ||
} ); | ||
pepro_mediapicker_generate(); | ||
$(document).on("click tap change", ".vc_active[data-vc-shortcode='video2'] :input", function(e){ | ||
pepro_mediapicker_generate(); | ||
}); | ||
function pepro_mediapicker_generate() { | ||
$src = $(".textfield.src").val(); | ||
$webm = $(".textfield.webm").val(); | ||
$width = $(".textfield.width").val(); | ||
$height = $(".textfield.height").val(); | ||
$poster = $(".attach_image.poster").val(); | ||
$playicon = $(".attach_image.playicon").val(); | ||
$loop = $(".checkbox.loop").prop("checked") ? "true" : "false"; | ||
$autoplay = $(".checkbox.autoplay").prop("checked") ? "true" : "false"; | ||
$class = $(".textfield.class").val(); | ||
$border = $(".textfield.border").val(); | ||
$play_w = $(".textfield.play_w").val(); | ||
$play_h = $(".textfield.play_h").val(); | ||
$(".wpb_el_type_pepro_mediapicker").html( | ||
`[video2 width="${$width}" height="${$height}" poster="${$poster}" loop="${$loop}" autoplay="${$autoplay}" class="${$class}" border="${$border}" src="${$src}" webm="${$webm}" playicon="${$playicon}" play_w="${$play_w}" play_h="${$play_h}"]` | ||
); | ||
} | ||
}, | ||
|
||
}; | ||
})(window.jQuery); |
Oops, something went wrong.