Skip to content

Commit

Permalink
Merge pull request #28 from codersaiful/1.0.2.0
Browse files Browse the repository at this point in the history
1.0.2.0
  • Loading branch information
codersaiful authored Feb 25, 2021
2 parents 08a75ed + 9014cd7 commit 40ca7ac
Show file tree
Hide file tree
Showing 14 changed files with 246 additions and 67 deletions.
6 changes: 4 additions & 2 deletions admin/admin-handle.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ public static function admin_menu(){
'menu_title' => __( 'UltraAddons', 'ultraaddons' ),
'capability' => self::$capability,
'menu_slug' => self::$menu_slug,//'ultraaddons-elementor-light',
'function' => [ __CLASS__, 'root_page' ],
'function' => [ __CLASS__, 'widgets_page' ],
//'function' => [ __CLASS__, 'root_page' ], //When Welcome Page will Active, then it will active
'icon_url' => $icon_url,
'position' => 45,
];
Expand Down Expand Up @@ -163,7 +164,8 @@ public static function get_submenu(){
'page_title' => __( 'UltraAddons Widgets', 'ultraaddons' ),
'menu_title' => __( 'Widgets', 'ultraaddons' ),
'capability' => self::$capability,
'menu_slug' => 'ultraaddons-widgets',
// 'menu_slug' => 'ultraaddons-widgets', //When Welcome Page will Active, then it will active
'menu_slug' => 'ultraaddons-elementor-light',
'function' => [__CLASS__, 'widgets_page'],
'position' => 1,
],
Expand Down
6 changes: 4 additions & 2 deletions admin/pages/extensions.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@

if( filter_input_array( INPUT_POST ) ){
$updated = filter_input_array( INPUT_POST );
$update_value = false;
if( ! empty( $updated['item'] ) ){
update_option( Extensions_Manager::$disabled_items_key, $updated['item'] );
$update_value = $updated['item'];
}
update_option( Extensions_Manager::$disabled_items_key, $update_value );
}

$items = Extensions_Manager::get_list();
Expand Down Expand Up @@ -64,7 +66,7 @@ class="ua-option-item <?php echo esc_attr( implode( " ", $html_class ) ); ?>">
<?php } ?>
</div>
<div class="ua-widget-footer">
<button class="primary button button-primary ua-primary ua-no-update" type="submit"><?php echo esc_html__( 'Save Change', 'ultraaddons' ); ?></button>
<button class="primary button button-primary ua-primary ua-no-update" type="submit" name="submit"><?php echo esc_html__( 'Save Change', 'ultraaddons' ); ?></button>
</div>
</form>

Expand Down
10 changes: 5 additions & 5 deletions admin/pages/header-footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<div class="ultraaddons-section ua-option-wrapper">
<div class="ua-section-inside">
<div class="ua-header">
<h1 class="ua-page-title"><?php echo esc_html__( 'Header & Footer Controlling', 'ultraaddons' ); ?></h1>
<h1 class="ua-page-title"><?php echo esc_html__( 'Header & Footer', 'ultraaddons' ); ?></h1>
</div>

<div class="ua-sectioon-content">
Expand All @@ -60,7 +60,7 @@
Template list is coming from Elementor Template. If you already made your header in Elementor
Template, Then Choose any one. Otherwise,
Create new
<a href="<?php echo esc_url( $add_new_elementor_template ); ?>">
<a href="<?php echo esc_url( $add_new_elementor_template ); ?>" target="_blank">
Header as Elementor Template
</a>.
</p>
Expand All @@ -79,11 +79,11 @@
</select>
<div class="ua-form-message">
<p>
Template list is coming from Elementor Template. If you already made your header in Elementor
Template list is coming from Elementor Template. If you already made your footer in Elementor
Template, Then Choose any one. Otherwise,
Create new
<a href="<?php echo esc_url( $add_new_elementor_template ); ?>">
Header as Elementor Template
<a href="<?php echo esc_url( $add_new_elementor_template ); ?>" target="_blank">
Footer as Elementor Template
</a>.
</p>
</div>
Expand Down
3 changes: 2 additions & 1 deletion admin/pages/includes/admin-header.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@
*
* @version 1.0.0.11
*/
$header_title = esc_html__( 'UltraAddons Elementor Lite', 'ultraaddons' );
$header_title = esc_html__( 'UltraAddons', 'ultraaddons' );
$header_title = apply_filters( 'ultraaddons/admin/header_title', $header_title );
$full_logo_image = ULTRA_ADDONS_ASSETS . 'images/svg/full-color-logo.svg';
$full_logo_image = apply_filters( 'ultraaddons/admin/header_logo', $full_logo_image );
?>
<div class="wrap about-wrap ultraaddons-wrap ultraaddons-admin-wrapper ua-version-<?php echo esc_attr( ultraaddons_plugin_version() ); ?>">
<h1 class="ultraaddons-color-heading">
<?php echo wp_kses_post( $header_title ); ?>
<smal class="ultraaddons-version-in-title">v<?php echo esc_html( ULTRA_ADDONS_VERSION ); ?></smal>
</h1>

<div class="ultraaddons-dashboard-area">
Expand Down
2 changes: 1 addition & 1 deletion admin/pages/widgets.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class="ua-option-item <?php echo esc_attr( implode( " ", $html_class ) ); ?>">
<?php } ?>
</div>
<div class="ua-item-footer">
<button class="primary button button-primary ua-primary ua-no-update" type="submit"><?php echo esc_html__( 'Save Change', 'ultraaddons' ); ?></button>
<button class="primary button button-primary ua-primary ua-no-update" type="submit" name="submit"><?php echo esc_html__( 'Save Change', 'ultraaddons' ); ?></button>
</div>
</form>

Expand Down
21 changes: 20 additions & 1 deletion assets/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,25 @@ li#toplevel_page_ultraaddons-elementor-light.current .wp-menu-image img {
border-bottom: 1px solid #eee;
}
h1.ultraaddons-color-heading {
font-weight: 900;
font-weight: 400;
color: #691fe1;
color: #ffffff;
text-shadow: 2px 4px 7px #5050503d;
/* text-shadow: -5px 1px 0px #e0e0e0; */
/* background: linear-gradient(45deg, #d422fc, #2b1ed1); */
display: inline-block;
/* padding: 20px; */
/* -webkit-background-clip: text; */
/* -webkit-text-fill-color: transparent; */
}
smal.ultraaddons-version-in-title {
font-weight: 100;
color: #ffffff;
font-size: 50%;
background: #5656567a;
/* background: linear-gradient(212deg, #0000004f, #a9a9a9); */
padding: 0 9px 3px 9px;
border-radius: 3px;
}
p.ultraaddons-info {
font-size: 22px;
Expand Down Expand Up @@ -142,6 +160,7 @@ ul.ua-submenu li a {
/*background: #ac21f2;*/
border-bottom: 6px solid rgb(90, 42, 183);
background: rgb(116, 57, 229);
text-decoration: none;
}
ul.ua-submenu li.ua-current-menu a {
background: #4caf50;
Expand Down
2 changes: 1 addition & 1 deletion assets/css/widgets/product-table.css
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ div.wpt-footer-cart-wrapper>a:after {

.ua-element-product-table .wpt_product_table_wrapper div.tables_cart_message_box a.cart-contents span.amount {
color: #16ecb2;
background: #021429;
background: rgb(0 0 0 / 45%);
padding: 12px;
height: 100%;
}
Expand Down
60 changes: 55 additions & 5 deletions assets/js/frontend.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
return this.data( dataAttr );
};

/**
* For Deleveloper Only
*/
console.log(ULTRAADDONS_DATA);

$window.on( 'elementor/frontend/init', function() {

var cx_settings;
Expand Down Expand Up @@ -100,10 +105,10 @@
});

// Slider
elementorFrontend.hooks.addAction(
EF.hooks.addAction(
'frontend/element_ready/ultraaddons-slider.default',
function ($scope) {
elementorFrontend.elementsHandler.addHandler(SliderBase, {
EF.elementsHandler.addHandler(SliderBase, {
$element: $scope,
selectors: {
container: '.ua-slider-wrapper',
Expand All @@ -114,23 +119,24 @@
}
);

elementorFrontend.hooks.addAction( 'frontend/element_ready/ultraaddons-slider.default', add_number_inside_bullets);
EF.hooks.addAction( 'frontend/element_ready/ultraaddons-slider.default', add_number_inside_bullets);


// Cart Update in Editor Screen
elementorFrontend.hooks.addAction(
EF.hooks.addAction(
'frontend/element_ready/ultraaddons-cart.default',
function ($scope) {
trigger_cart_update();
}
);

// Cart Update in Editor Screen
elementorFrontend.hooks.addAction(
EF.hooks.addAction(
'frontend/element_ready/ultraaddons-product-table.default',
function ($scope) {
$('.wpt_product_table_wrapper .search_select,select.filter_select').select2();
trigger_cart_update();
minicart_footer_load();
}
);

Expand Down Expand Up @@ -180,5 +186,49 @@
$( document.body ).trigger( 'removed_from_cart' );
// $( document.body ).trigger( 'wpt_minicart_load' );
}
function minicart_footer_load(){
var footer_cart = 'always_show';
var footer_cart_size = '74';
var footer_possition = 'bottom_right';


$('body').append("<div class='wpt_notice_board'></div>");
$('body').append('<div style="height: ' + footer_cart_size + 'px;width: ' + footer_cart_size + 'px;" class="wpt-footer-cart-wrapper '+ footer_possition +' '+ footer_cart +'"><a target="_blank" href="#"></a></div>');

//$(window).trigger('wpt_minicart_now');

var minicart_type = $('div.tables_cart_message_box').attr('data-type');

$.ajax({
type: 'POST',
url: ULTRAADDONS_DATA.ajax_url,
data: {
action: 'wpt_fragment_refresh'
},
success: function(response){

// setFragmentsRefresh( response );
if(typeof minicart_type !== 'undefined'){
var cart_hash = response.cart_hash;
var fragments = response.fragments;
var html = '';
var supportedElement = ['div.widget_shopping_cart_content','a.cart-contents','a.footer-cart-contents'];
if ( fragments && cart_hash !== '' ) {
if(minicart_type === 'load'){
$.each( fragments, function( key, value ) {
if('string' === typeof key && $.inArray(key, supportedElement) != -1 && typeof $( key ) === 'object') {
html += value;
}

});
$('div.tables_cart_message_box').attr('data-type','refresh');//Set
$('div.tables_cart_message_box').html(html);
}

}

}
}
});
}
} (jQuery, window));
2 changes: 1 addition & 1 deletion inc/core/extensions-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,4 @@ public static function disableExtensionKeys(){
}
}

Extensions_Manager::init();
//Extensions_Manager::init();
8 changes: 4 additions & 4 deletions inc/core/header-footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class Header_Footer {
public static $data = [
'header_id' => false,
'footer_id' => false,
'type' => 'php', //It will php and css. In
'wrapper' => 'flued',
'type' => 'css', //It will php and css. among php,css,additional
'wrapper' => 'box', //Default value is: box, among box and flued
];

protected static $body_class = [];
Expand Down Expand Up @@ -68,7 +68,7 @@ public static function init() {
}

public static function add_footer() {
// /echo ultraaddons_elementor_display_content( self::get_footer_id() );
echo ultraaddons_elementor_display_content( self::get_footer_id() );
}
public static function show_footer( $name, $args ) {
include ULTRA_ADDONS_DIR . 'template/footer.php';
Expand Down Expand Up @@ -219,4 +219,4 @@ public static function body_class( $class ) {
}
}

Header_Footer::init();
//Header_Footer::init();
Loading

0 comments on commit 40ca7ac

Please sign in to comment.