Skip to content

Commit

Permalink
Merge branch 'dev-branch'
Browse files Browse the repository at this point in the history
  • Loading branch information
nithinjohn22 committed Nov 19, 2024
2 parents f772ed5 + fbd11fa commit a160eaf
Show file tree
Hide file tree
Showing 49 changed files with 26,858 additions and 380 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.DS_Store
Thumbs.db
node_modules
build
# build
*.code-workspace
*.zip
*.log
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## Changelog

### V 3.5.0 - 2024-11-07
* Added: Job listing block.
* Fixed: Translation issue in email digest.
* Minor bug fixes and code improvements.

### V 3.4.7 - 2024-09-24
* Fixed: Recaptcha won't reset after submitting the application form.
* Minor bug fixes and code improvements.
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ The plugin comes with two layouts - Grid and List which are designed carefully a

## Changelog

**V 3.5.0 - 2024-11-07**
* Added: Job listing block.
* Fixed: Translation issue in email digest.
* Minor bug fixes and code improvements.

**V 3.4.7 - 2024-09-24**
* Fixed: Recaptcha won't reset after submitting the application form.
* Minor bug fixes and code improvements.
Expand Down
1 change: 1 addition & 0 deletions admin/class-awsm-job-openings-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@ public static function get_default_settings( $option_name = '' ) {
/* translators: %1$s: Site link, %2$s: Plugin website link */
'footer_text' => sprintf( esc_html__( 'Sent from %1$s by %2$s Plugin', 'wp-job-openings' ), '<a href="{site-url}">{site-title}</a>', '<a href="https://wpjobopenings.com">' . esc_html__( 'WP Job Openings', 'wp-job-openings' ) . '</a>' ),
),
'awsm_jobs_email_digest' => 'enable',
);
if ( ! empty( $option_name ) ) {
if ( isset( $options[ $option_name ] ) ) {
Expand Down
2 changes: 0 additions & 2 deletions assets/css/editor.min.css

This file was deleted.

1 change: 0 additions & 1 deletion assets/css/editor.min.css.map

This file was deleted.

10 changes: 10 additions & 0 deletions assets/css/public/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ a.awsm-job-item {
.awsm-filter-wrap * {
box-sizing: border-box;
}

.awsm-job-wrap, .awsm-job-wrap * {
box-sizing: border-box;
}

.awsm-filter-wrap {
margin: 0 -10px 20px;
}
Expand Down Expand Up @@ -694,3 +699,8 @@ ul.awsm-error-message li {
.awsm-jobs-is-block-theme .site-title {
margin-bottom: 0;
}

.awsm-job-featured-image img {
max-width: 100%;
height: auto;
}
2 changes: 1 addition & 1 deletion assets/css/style.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/style.min.css.map

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions assets/img/arrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 9 additions & 6 deletions assets/js/public/job-listings.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

'use strict';

jQuery(function($) {
jQuery(function($) {
var rootWrapperSelector = '.awsm-job-wrap';
var wrapperSelector = '.awsm-job-listings';

Expand All @@ -12,11 +12,11 @@ jQuery(function($) {
var currentUrl = window.location.protocol + '//' + window.location.host + window.location.pathname;
var triggerFilter = true;

function getListingsData($wrapper) {
function getListingsData($wrapper) {
var data = [];
var parsedListingsAttrs = [ 'listings', 'specs', 'search', 'lang', 'taxonomy', 'termId' ];
var dataAttrs = $wrapper.data();
$.each(dataAttrs, function(dataAttr, value) {
$.each(dataAttrs, function(dataAttr, value) {
if ($.inArray(dataAttr, parsedListingsAttrs) === -1) {
data.push({
name: dataAttr,
Expand All @@ -27,12 +27,13 @@ jQuery(function($) {
return data;
}

function awsmJobFilters($rootWrapper) {
function awsmJobFilters($rootWrapper) {
var $wrapper = $rootWrapper.find(wrapperSelector);
var $filterForm = $rootWrapper.find(filterSelector + ' form');
var formData = $filterForm.serializeArray();
var listings = $wrapper.data('listings');
var specs = $wrapper.data('specs');

formData.push({
name: 'listings_per_page',
value: listings
Expand All @@ -43,6 +44,7 @@ jQuery(function($) {
value: specs
});
}

var listingsData = getListingsData($wrapper);
if (listingsData.length > 0) {
formData = formData.concat(listingsData);
Expand Down Expand Up @@ -159,7 +161,7 @@ jQuery(function($) {
}
};

$(filterSelector + ' .awsm-filter-option').on('change', function(e) {
$(filterSelector + ' .awsm-filter-option').on('change', function(e) {
e.preventDefault();
var $elem = $(this);
var $selected = $elem.find('option:selected');
Expand Down Expand Up @@ -195,7 +197,7 @@ jQuery(function($) {
/* ========== Job Listings Load More ========== */

$(wrapperSelector).on('click', '.awsm-jobs-pagination .awsm-load-more-btn, .awsm-jobs-pagination a.page-numbers', function(e) {
e.preventDefault();
e.preventDefault();
var $triggerElem = $(this);
var isDefaultPagination = $triggerElem.hasClass('awsm-load-more-btn');
var paged = 1;
Expand Down Expand Up @@ -278,6 +280,7 @@ jQuery(function($) {
value: specs
});
}

if (typeof lang !== 'undefined') {
wpData.push({
name: 'lang',
Expand Down
2 changes: 1 addition & 1 deletion assets/js/script.min.js.map

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions blocks/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org

# WordPress Coding Standards
# https://make.wordpress.org/core/handbook/coding-standards/

root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab

[*.{yml,yaml}]
indent_style = space
indent_size = 2
30 changes: 30 additions & 0 deletions blocks/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Coverage directory used by tools like istanbul
coverage

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Output of `npm pack`
*.tgz

# Output of `wp-scripts plugin-zip`
*.zip

# dotenv environment variables file
.env
65 changes: 65 additions & 0 deletions blocks/build/block.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "wp-job-openings/blocks",
"version": "1.0.0",
"title": "",
"category": "",
"icon": "",
"description": "",
"attributes": {
"filter_options": {
"type": "array",
"default": []
},
"select_filter_full": {
"type": "boolean",
"default": false
},
"other_options": {
"type": "array",
"default": []
},
"layout": {
"type": "string",
"default": "list"
},
"listing_per_page": {
"type": "number",
"default": 10
},
"number_of_columns": {
"type": "number",
"default": 3
},
"pagination": {
"type": "string",
"default": "modern"
},
"hide_expired_jobs": {
"type": "boolean",
"default": false
},
"search": {
"type": "boolean",
"default": false
},
"search_placeholder": {
"type": "string",
"default": ""
},
"enable_job_filter": {
"type": "boolean",
"default": true
}
},
"example": {},
"supports": {
"html": false
},
"textdomain": "wp-job-openings",
"editorScript": "file:./index.js",
"editorStyle": "file:./index.css",
"style": "file:./style-index.css",
"viewScript": "file:./view.js"
}
Loading

0 comments on commit a160eaf

Please sign in to comment.