Skip to content

Commit

Permalink
Merge pull request #1302 from vektor-inc/develop
Browse files Browse the repository at this point in the history
[ Change version ] 1.39.0.0
  • Loading branch information
kurudrive authored Jun 28, 2022
2 parents e55cacb + efb6022 commit 37e95e2
Show file tree
Hide file tree
Showing 18 changed files with 547 additions and 164 deletions.
6 changes: 6 additions & 0 deletions inc/vk-blocks/admin/admin-license.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,9 @@

<?php submit_button(); ?>
</section>
<script>
const licenseKeyElem = document.getElementById('vk-blocks-pro-license-key');
licenseKeyElem.addEventListener('blur', (e) => {
licenseKeyElem.value = licenseKeyElem.value.trim();
});
</script>
52 changes: 26 additions & 26 deletions inc/vk-blocks/languages/vk-blocks-js.pot
Original file line number Diff line number Diff line change
Expand Up @@ -268,19 +268,19 @@ msgid "Ignore this post"
msgstr ""

#: src/blocks/_pro/grid-column-item/edit.js:102
#: src/blocks/_pro/gridcolcard/edit-common.js:158
#: src/blocks/_pro/gridcolcard/edit-common.js:155
msgid "Color Settings"
msgstr ""

#: src/blocks/_pro/grid-column-item/edit.js:104
#: src/blocks/_pro/gridcolcard/edit-common.js:160
#: src/blocks/_pro/gridcolcard/edit-common.js:157
#: src/blocks/button/edit.js:681
#: src/blocks/heading/edit.js:324
msgid "Text Color"
msgstr ""

#: src/blocks/_pro/grid-column-item/edit.js:110
#: src/blocks/_pro/gridcolcard/edit-common.js:169
#: src/blocks/_pro/gridcolcard/edit-common.js:163
#: src/blocks/border-box/edit.js:216
#: src/blocks/button/edit.js:664
msgid "Background Color"
Expand Down Expand Up @@ -356,54 +356,54 @@ msgstr ""
msgid "You can create a variety of layouts with grid column card blocks."
msgstr ""

#: src/blocks/_pro/gridcolcard-item/edit.js:201
#: src/blocks/_pro/gridcolcard-item/edit.js:218
#: src/blocks/_pro/select-post-list-item/edit.js:66
#: src/blocks/button/edit.js:216
msgid "Unlink"
msgstr ""

#: src/blocks/_pro/gridcolcard-item/edit.js:202
#: src/blocks/_pro/gridcolcard-item/edit.js:219
#: src/blocks/button/edit.js:217
msgid "Input Link URL"
msgstr ""

#: src/blocks/_pro/gridcolcard-item/edit.js:241
#: src/blocks/_pro/gridcolcard-item/edit.js:258
#: src/blocks/_pro/select-post-list-item/edit.js:102
#: src/blocks/button/edit.js:256
msgid "Submit"
msgstr ""

#: src/blocks/_pro/gridcolcard-item/edit.js:255
#: src/blocks/_pro/gridcolcard-item/edit.js:272
msgid "Edit mode"
msgstr ""

#: src/blocks/_pro/gridcolcard-item/edit.js:265
#: src/blocks/_pro/gridcolcard-item/edit.js:282
msgid "All columns"
msgstr ""

#: src/blocks/_pro/gridcolcard-item/edit.js:273
#: src/blocks/_pro/gridcolcard-item/edit.js:290
msgid "This column only"
msgstr ""

#: src/blocks/_pro/gridcolcard-item/edit.js:278
#: src/blocks/_pro/gridcolcard-item/edit.js:295
msgid "Edit Lock"
msgstr ""

#: src/blocks/_pro/gridcolcard-item/edit.js:281
#: src/blocks/_pro/gridcolcard-item/edit.js:298
msgid "Lock edits this block from the parent and other Grid Column Item block"
msgstr ""

#: src/blocks/_pro/gridcolcard-item/edit.js:292
#: src/blocks/_pro/gridcolcard-item/edit.js:309
msgid "Column Setting"
msgstr ""

#: src/blocks/_pro/gridcolcard-item/edit.js:295
#: src/blocks/_pro/gridcolcard-item/edit.js:312
#: src/blocks/_pro/icon-card-item/edit.js:120
#: src/blocks/pr-blocks/edit.js:254
msgid "Link URL:"
msgstr ""

#: src/blocks/_pro/gridcolcard-item/edit.js:301
#: src/blocks/_pro/gridcolcard-item/edit.js:318
#: src/blocks/_pro/icon-card-item/edit.js:128
#: src/blocks/button/edit.js:242
#: src/blocks/icon/edit.js:254
Expand All @@ -412,61 +412,61 @@ msgstr ""
msgid "Open link new tab."
msgstr ""

#: src/blocks/_pro/gridcolcard-item/edit.js:308
#: src/blocks/_pro/gridcolcard-item/edit.js:325
msgid ""
"If you set a link URL, do not place the link element (text or button) in "
"the Grid Column Card Item. It may not be displayed correctly."
msgstr ""

#: src/blocks/_pro/gridcolcard-item/edit.js:312
#: src/blocks/_pro/gridcolcard-item/edit.js:329
msgid "Make sure that no link is specified for the image block, etc."
msgstr ""

#: src/blocks/_pro/gridcolcard/edit-common.js:116
#: src/blocks/_pro/gridcolcard/edit-common.js:113
msgid "Image fit to column"
msgstr ""

#: src/blocks/_pro/gridcolcard/edit-common.js:128
#: src/blocks/_pro/gridcolcard/edit-common.js:125
msgid "Column footer button area"
msgstr ""

#: src/blocks/_pro/gridcolcard/edit-common.js:138
#: src/blocks/_pro/gridcolcard/edit-common.js:135
#: src/blocks/heading/edit.js:370
msgid "Display"
msgstr ""

#: src/blocks/_pro/gridcolcard/edit-common.js:146
#: src/blocks/_pro/gridcolcard/edit-common.js:143
#: src/blocks/_pro/slider/edit.js:374
#: src/blocks/heading/edit.js:374
msgid "Hide"
msgstr ""

#: src/blocks/_pro/gridcolcard/edit-common.js:154
#: src/blocks/_pro/gridcolcard/edit-common.js:151
msgid "Delete"
msgstr ""

#: src/blocks/_pro/gridcolcard/edit-common.js:181
#: src/blocks/_pro/gridcolcard/edit-common.js:170
msgid "Column Radius"
msgstr ""

#: src/blocks/_pro/gridcolcard/edit-common.js:187
#: src/blocks/_pro/gridcolcard/edit-common.js:176
#: src/blocks/balloon/edit.js:319
#: src/extensions/core/image/style.js:15
#: src/extensions/core/table/style.js:12
msgid "Border"
msgstr ""

#: src/blocks/_pro/gridcolcard/edit-common.js:196
#: src/blocks/_pro/gridcolcard/edit-common.js:185
#: src/blocks/border-box/edit.js:207
#: src/extensions/core/group/style.js:47
msgid "Border Color"
msgstr ""

#: src/blocks/_pro/gridcolcard/edit-common.js:64
#: src/blocks/_pro/gridcolcard/edit-common.js:61
msgid "Column padding"
msgstr ""

#: src/blocks/_pro/gridcolcard/edit-common.js:72
#: src/blocks/_pro/gridcolcard/edit-common.js:69
msgid "Column header media area"
msgstr ""

Expand Down
12 changes: 7 additions & 5 deletions inc/vk-components/package/class-vk-component-mini-contents.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,15 @@ public static function get_view( $options ) {
$html = '';
$style = '';

$font_style = '';
$mini_content_style = '';
if ( $options['text_align'] ) {
$style = ' style="text-align:' . esc_attr( $options['text_align'] ) . '"';
$mini_content_style = ' style="text-align:' . esc_attr( $options['text_align'] ) . '"';
$font_style .= 'text-align:' . esc_attr( $options['text_align'] ) . ';';
}

$html .= '<div class="' . esc_attr( $options['outer_class'] ) . '"' . $style . '>';
$html .= '<div class="' . esc_attr( $options['outer_class'] ) . '"' . $mini_content_style . '>';

$font_style = '';
if ( $options['text_color'] ) {
$font_style .= 'color:' . $options['text_color'] . ';';
}
Expand All @@ -63,7 +65,7 @@ public static function get_view( $options ) {
$font_style = ' style="' . esc_attr( $font_style ) . '"';
}

// If Text Title exist
// If Text Title exist.
if ( $options['title_text'] ) {
if ( $options['title_class'] ) {
$title_class = ' class="' . esc_attr( $options['title_class'] ) . '"';
Expand All @@ -73,7 +75,7 @@ public static function get_view( $options ) {
$html .= '</' . esc_html( $options['title_tag'] ) . '>';
}

// If Text caption exist
// If Text caption exist.
if ( $options['caption_text'] ) {
if ( $options['caption_class'] ) {
$caption_class = ' class="' . esc_attr( $options['caption_class'] ) . '"';
Expand Down
8 changes: 7 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link:
Tags: Gutenberg,FAQ,alert
Requires at least: 5.8
Tested up to: 6.0.0
Stable tag: 1.38.0.1
Stable tag: 1.39.0.0
Requires PHP: 7.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -64,6 +64,12 @@ e.g.

== Changelog ==

= 1.39.0 =
[ Improvement ] License key remove space.
[ Bug Fix ][ Common mergin ] cope with table margin bottom 0,margin top 0
[ Bug fix ][ GridColCard ( Pro ) ] cope with custom color palette
[ Other ] VK Compo ( mini-content ) Update ( Fix slider align )

= 1.38.0 =
[ Bug fix ][ Post List (Pro) ] cope with pagenation hook

Expand Down
69 changes: 69 additions & 0 deletions src/blocks/_pro/gridcolcard-item/deprecated/1.38.0/save.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import { InnerBlocks, useBlockProps } from '@wordpress/block-editor';

export default function save(props) {
const { attributes } = props;
const {
backgroundColor,
textColor,
headerDisplay,
footerDisplay,
containerSpace,
borderRadius,
border,
borderColor,
url,
urlOpenType,
} = attributes;

const style = {
backgroundColor: null,
border: null,
};
if (textColor) {
style.color = `${textColor}`;
}
if (backgroundColor) {
style.backgroundColor = `${backgroundColor}`;
}
if (border) {
style.border = `1px solid ${borderColor}`;
}
if (borderRadius) {
style.borderRadius = `${borderRadius}`;
}

const containerClasses = ['vk_gridcolcard_item'];
if (headerDisplay === 'delete') {
containerClasses.push('vk_gridcolcard_item-noHeader');
}
if (footerDisplay === 'delete') {
containerClasses.push('vk_gridcolcard_item-noFooter');
}
const containerClass = containerClasses.join(' ');

const blockProps = useBlockProps.save({
className: `${containerClass}`,
style,
});

const TagName = url ? 'a' : 'div';

return (
<div {...blockProps}>
<TagName
className={`vk_gridcolcard_item_container`}
style={{
paddingTop: containerSpace.top,
paddingBottom: containerSpace.bottom,
paddingLeft: containerSpace.left,
paddingRight: containerSpace.right,
}}
href={url}
target={urlOpenType ? '_blank' : undefined}
rel={urlOpenType ? 'noopener noreferrer' : undefined}
>
<InnerBlocks.Content />
</TagName>
</div>
);
}
67 changes: 67 additions & 0 deletions src/blocks/_pro/gridcolcard-item/deprecated/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import save1_38_0 from './1.38.0/save';

const blockAttributes = {
"editLock": {
"type": "boolean",
"default": false
},
"textColor": {
"type": "string"
},
"backgroundColor": {
"type": "string"
},
"containerSpace": {
"type": "object",
"default": {
"top": null,
"left": null,
"right": null,
"bottom": null
}
},
"headerImageAspectRatio": {
"type": "string",
"default": "1.618/1"
},
"headerImageFit": {
"type": "boolean",
"default": true
},
"headerDisplay": {
"type": "string",
"default": "delete"
},
"footerDisplay": {
"type": "string",
"default": "delete"
},
"borderRadius": {
"type": "string",
"default": null
},
"border": {
"type": "boolean",
"default": false
},
"borderColor": {
"type": "string",
"default": "#e5e5e5"
},
"url": {
"type": "string"
},
"urlOpenType": {
"type": "Boolean",
"default": false

}
};

const deprecated = [
{
attributes: blockAttributes,
save: save1_38_0,
},
];
export default deprecated;
Loading

0 comments on commit 37e95e2

Please sign in to comment.