Changeset 3186671
- Timestamp:
- 11/12/2024 06:10:33 PM (14 months ago)
- Location:
- jobboardwp
- Files:
-
- 14 added
- 12 deleted
- 32 edited
- 1 copied
-
tags/1.2.9 (copied) (copied from jobboardwp/trunk)
-
tags/1.2.9/includes/blocks/blocks-manifest.php (added)
-
tags/1.2.9/includes/blocks/jb-job-post/block.json (modified) (1 diff)
-
tags/1.2.9/includes/blocks/jb-job-post/build (deleted)
-
tags/1.2.9/includes/blocks/jb-job-post/src/index.asset.php (added)
-
tags/1.2.9/includes/blocks/jb-job-post/src/index.js (modified) (1 diff)
-
tags/1.2.9/includes/blocks/jb-job/block.json (modified) (1 diff)
-
tags/1.2.9/includes/blocks/jb-job/build (deleted)
-
tags/1.2.9/includes/blocks/jb-job/src/index.asset.php (added)
-
tags/1.2.9/includes/blocks/jb-job/src/index.js (modified) (1 diff)
-
tags/1.2.9/includes/blocks/jb-jobs-categories-list/block.json (modified) (1 diff)
-
tags/1.2.9/includes/blocks/jb-jobs-categories-list/build (deleted)
-
tags/1.2.9/includes/blocks/jb-jobs-categories-list/src/index.asset.php (added)
-
tags/1.2.9/includes/blocks/jb-jobs-categories-list/src/index.js (modified) (1 diff)
-
tags/1.2.9/includes/blocks/jb-jobs-dashboard/block.json (modified) (1 diff)
-
tags/1.2.9/includes/blocks/jb-jobs-dashboard/build (deleted)
-
tags/1.2.9/includes/blocks/jb-jobs-dashboard/src/index.asset.php (added)
-
tags/1.2.9/includes/blocks/jb-jobs-dashboard/src/index.js (modified) (1 diff)
-
tags/1.2.9/includes/blocks/jb-jobs-list/block.json (modified) (1 diff)
-
tags/1.2.9/includes/blocks/jb-jobs-list/build (deleted)
-
tags/1.2.9/includes/blocks/jb-jobs-list/src/index.asset.php (added)
-
tags/1.2.9/includes/blocks/jb-jobs-list/src/index.js (modified) (1 diff)
-
tags/1.2.9/includes/blocks/jb-recent-jobs/block.json (modified) (1 diff)
-
tags/1.2.9/includes/blocks/jb-recent-jobs/build (deleted)
-
tags/1.2.9/includes/blocks/jb-recent-jobs/src/index.asset.php (added)
-
tags/1.2.9/includes/blocks/jb-recent-jobs/src/index.js (modified) (1 diff)
-
tags/1.2.9/includes/common/class-blocks.php (modified) (2 diffs)
-
tags/1.2.9/jobboardwp.php (modified) (1 diff)
-
tags/1.2.9/languages/jobboardwp.pot (modified) (20 diffs)
-
tags/1.2.9/readme.txt (modified) (2 diffs)
-
trunk/includes/blocks/blocks-manifest.php (added)
-
trunk/includes/blocks/jb-job-post/block.json (modified) (1 diff)
-
trunk/includes/blocks/jb-job-post/build (deleted)
-
trunk/includes/blocks/jb-job-post/src/index.asset.php (added)
-
trunk/includes/blocks/jb-job-post/src/index.js (modified) (1 diff)
-
trunk/includes/blocks/jb-job/block.json (modified) (1 diff)
-
trunk/includes/blocks/jb-job/build (deleted)
-
trunk/includes/blocks/jb-job/src/index.asset.php (added)
-
trunk/includes/blocks/jb-job/src/index.js (modified) (1 diff)
-
trunk/includes/blocks/jb-jobs-categories-list/block.json (modified) (1 diff)
-
trunk/includes/blocks/jb-jobs-categories-list/build (deleted)
-
trunk/includes/blocks/jb-jobs-categories-list/src/index.asset.php (added)
-
trunk/includes/blocks/jb-jobs-categories-list/src/index.js (modified) (1 diff)
-
trunk/includes/blocks/jb-jobs-dashboard/block.json (modified) (1 diff)
-
trunk/includes/blocks/jb-jobs-dashboard/build (deleted)
-
trunk/includes/blocks/jb-jobs-dashboard/src/index.asset.php (added)
-
trunk/includes/blocks/jb-jobs-dashboard/src/index.js (modified) (1 diff)
-
trunk/includes/blocks/jb-jobs-list/block.json (modified) (1 diff)
-
trunk/includes/blocks/jb-jobs-list/build (deleted)
-
trunk/includes/blocks/jb-jobs-list/src/index.asset.php (added)
-
trunk/includes/blocks/jb-jobs-list/src/index.js (modified) (1 diff)
-
trunk/includes/blocks/jb-recent-jobs/block.json (modified) (1 diff)
-
trunk/includes/blocks/jb-recent-jobs/build (deleted)
-
trunk/includes/blocks/jb-recent-jobs/src/index.asset.php (added)
-
trunk/includes/blocks/jb-recent-jobs/src/index.js (modified) (1 diff)
-
trunk/includes/common/class-blocks.php (modified) (2 diffs)
-
trunk/jobboardwp.php (modified) (1 diff)
-
trunk/languages/jobboardwp.pot (modified) (20 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
jobboardwp/tags/1.2.9/includes/blocks/jb-job-post/block.json
r2916991 r3186671 6 6 "category": "jb-blocks", 7 7 "icon": "forms", 8 "editorScript": "file:./ build/index.js",8 "editorScript": "file:./src/index.js", 9 9 "textdomain": "jobboardwp" 10 10 } -
jobboardwp/tags/1.2.9/includes/blocks/jb-job-post/src/index.js
r2916991 r3186671 1 import { registerBlockType } from '@wordpress/blocks'; 2 import ServerSideRender from '@wordpress/server-side-render'; 3 import { useBlockProps } from '@wordpress/block-editor'; 4 import jQuery from 'jquery'; 5 6 registerBlockType('jb-block/jb-job-post', { 7 edit: function (props) { 8 jQuery('#jb-job-preview, #jb-job-draft, #jb_company_logo_plupload').attr('disabled', 'disabled'); 9 const blockProps = useBlockProps(); 10 return ( 11 <div {...blockProps}> 12 <ServerSideRender block="jb-block/jb-job-post" /> 13 </div> 14 ); 15 }, 16 save: function () { 17 return null; 18 } 19 }); 1 (()=>{"use strict";var e={n:o=>{var t=o&&o.__esModule?()=>o.default:()=>o;return e.d(t,{a:t}),t},d:(o,t)=>{for(var r in t)e.o(t,r)&&!e.o(o,r)&&Object.defineProperty(o,r,{enumerable:!0,get:t[r]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};const o=window.wp.blocks,t=window.wp.serverSideRender;var r=e.n(t);const n=window.wp.blockEditor,s=window.wp.element,c=window.ReactJSXRuntime;(0,o.registerBlockType)("jb-block/jb-job-post",{edit:function(){(0,s.useEffect)((()=>{document.querySelectorAll("#jb-job-preview, #jb-job-draft, #jb_company_logo_plupload").forEach((e=>{e.setAttribute("disabled","disabled")}))}),[]);const e=(0,n.useBlockProps)();return(0,c.jsx)("div",{...e,children:(0,c.jsx)(r(),{block:"jb-block/jb-job-post"})})},save:()=>null}),jQuery(window).on("load",(function(){new MutationObserver((e=>{e.forEach((e=>{jQuery(e.addedNodes).find(".jb-job-submission-form-wrapper").each((function(){const e=document.querySelector(".jb-job-submission-form-wrapper");e&&e.addEventListener("click",(o=>{o.target!==e&&(o.preventDefault(),o.stopPropagation())}))}))}))})).observe(document,{attributes:!1,childList:!0,characterData:!1,subtree:!0})}))})(); -
jobboardwp/tags/1.2.9/includes/blocks/jb-job/block.json
r2916991 r3186671 6 6 "icon": "text", 7 7 "category": "jb-blocks", 8 "attributes": { 9 "job_id": { 10 "type": "integer" 11 } 12 }, 13 "editorScript": "file:./build/index.js", 8 "editorScript": "file:./src/index.js", 14 9 "textdomain": "jobboardwp" 15 10 } -
jobboardwp/tags/1.2.9/includes/blocks/jb-job/src/index.js
r2916991 r3186671 1 import { useSelect } from '@wordpress/data'; 2 import { PanelBody, SelectControl, Spinner } from '@wordpress/components'; 3 import { InspectorControls, useBlockProps } from '@wordpress/block-editor'; 4 import ServerSideRender from '@wordpress/server-side-render'; 5 import { registerBlockType } from "@wordpress/blocks"; 6 7 registerBlockType('jb-block/jb-job', { 8 edit: function (props) { 9 let { job_id, setAttributes } = props.attributes; 10 const blockProps = useBlockProps(); 11 const posts = useSelect((select) => { 12 return select('core').getEntityRecords('postType', 'jb-job', { 13 per_page: -1, 14 _fields: ['id', 'title'] 15 }); 16 }); 17 18 if (!posts) { 19 return ( 20 <p> 21 <Spinner /> 22 {wp.i18n.__('Loading...', 'jobboardwp')} 23 </p> 24 ); 25 } 26 27 if (posts.length === 0) { 28 return 'No posts found.'; 29 } 30 31 let posts_data = [{ id: '', title: '' }].concat(posts); 32 33 let get_post = posts_data.map((post) => { 34 return { 35 label: post.title.rendered, 36 value: post.id 37 }; 38 }); 39 40 function jbShortcode(value) { 41 let shortcode = ''; 42 if (value !== undefined && value !== '') { 43 shortcode = '[jb_job id="' + value + '"]'; 44 } else { 45 shortcode = '[jb_job]'; 46 } 47 return shortcode; 48 } 49 50 return ( 51 <div {...blockProps}> 52 <ServerSideRender block="jb-block/jb-job" attributes={props.attributes} /> 53 <InspectorControls> 54 <PanelBody title={wp.i18n.__('Job', 'jobboardwp')}> 55 <SelectControl 56 label={wp.i18n.__('Job', 'jobboardwp')} 57 className="jb_select_job" 58 value={job_id} 59 options={get_post} 60 style={{ height: '35px', lineHeight: '20px', padding: '0 7px' }} 61 onChange={(value) => { 62 props.setAttributes({ job_id: value }); 63 jbShortcode(value); 64 }} 65 /> 66 </PanelBody> 67 </InspectorControls> 68 </div> 69 ); 70 }, // end edit 71 72 save: function save(props) { 73 return null; 74 } 75 76 }); 1 (()=>{"use strict";var e={n:o=>{var t=o&&o.__esModule?()=>o.default:()=>o;return e.d(t,{a:t}),t},d:(o,t)=>{for(var n in t)e.o(t,n)&&!e.o(o,n)&&Object.defineProperty(o,n,{enumerable:!0,get:t[n]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};const o=window.wp.data,t=window.wp.components,n=window.wp.blockEditor,r=window.wp.serverSideRender;var i=e.n(r);const s=window.wp.blocks,a=window.ReactJSXRuntime;(0,s.registerBlockType)("jb-block/jb-job",{edit:function(e){const{attributes:r,setAttributes:s}=e,{job_id:d}=r,c=(0,n.useBlockProps)(),l=(0,o.useSelect)((e=>e("core").getEntityRecords("postType","jb-job",{per_page:-1,_fields:["id","title"]})),[]);if(!l)return(0,a.jsxs)("p",{children:[(0,a.jsx)(t.Spinner,{}),wp.i18n.__("Loading...","jobboardwp")]});if(0===l.length)return(0,a.jsx)("p",{children:wp.i18n.__("Jobs not found","jobboardwp")});const b=[{label:"",value:""}].concat(l.map((e=>({label:e.title.rendered,value:e.id}))));return(0,a.jsxs)("div",{...c,children:[(0,a.jsx)(i(),{block:"jb-block/jb-job",attributes:r}),(0,a.jsx)(n.InspectorControls,{children:(0,a.jsx)(t.PanelBody,{title:wp.i18n.__("Job","jobboardwp"),children:(0,a.jsx)(t.SelectControl,{label:wp.i18n.__("Job","jobboardwp"),className:"jb_select_job",value:d,options:b,onChange:e=>s({job_id:e})})})})]})},save:()=>null}),jQuery(window).on("load",(function(e){new MutationObserver((function(e){e.forEach((function(e){jQuery(e.addedNodes).find(".jb-single-job-wrapper").each((function(){const e=document.querySelector(".jb-single-job-wrapper");e&&e.addEventListener("click",(o=>{o.target!==e&&(o.preventDefault(),o.stopPropagation())}))}))}))})).observe(document,{attributes:!1,childList:!0,characterData:!1,subtree:!0})}))})(); -
jobboardwp/tags/1.2.9/includes/blocks/jb-jobs-categories-list/block.json
r2916991 r3186671 6 6 "category": "jb-blocks", 7 7 "icon": "editor-ul", 8 "editorScript": "file:./ build/index.js",8 "editorScript": "file:./src/index.js", 9 9 "textdomain": "jobboardwp" 10 10 } -
jobboardwp/tags/1.2.9/includes/blocks/jb-jobs-categories-list/src/index.js
r2916991 r3186671 1 jQuery(window).on( 'load', function($) { 2 var observer = new MutationObserver(function(mutations) { 3 mutations.forEach(function(mutation) { 4 5 jQuery(mutation.addedNodes).find('.jb-job-categories').each(function() { 6 wp.JB.job_categories_list.objects.wrapper = jQuery('.jb-job-categories'); 7 if ( wp.JB.job_categories_list.objects.wrapper.length ) { 8 wp.JB.job_categories_list.ajax(); 9 } 10 }); 11 12 jQuery(mutation.addedNodes).find('.jb').each(function() { 13 jb_responsive(); 14 }); 15 }); 16 }); 17 18 observer.observe(document, {attributes: false, childList: true, characterData: false, subtree:true}); 19 }); 20 21 import { registerBlockType } from '@wordpress/blocks'; 22 import ServerSideRender from '@wordpress/server-side-render'; 23 import { useBlockProps } from '@wordpress/block-editor'; 24 25 registerBlockType('jb-block/jb-jobs-categories-list', { 26 edit: function(props) { 27 const blockProps = useBlockProps(); 28 29 return ( 30 <div {...blockProps}> 31 <ServerSideRender block="jb-block/jb-jobs-categories-list" /> 32 </div> 33 ); 34 }, 35 save: function() { 36 return null; 37 } 38 }); 1 (()=>{"use strict";var e={n:t=>{var o=t&&t.__esModule?()=>t.default:()=>t;return e.d(o,{a:o}),o},d:(t,o)=>{for(var r in o)e.o(o,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:o[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.blocks,o=window.wp.serverSideRender;var r=e.n(o);const n=window.wp.blockEditor,c=window.ReactJSXRuntime;jQuery(window).on("load",(function(e){new MutationObserver((function(e){e.forEach((function(e){jQuery(e.addedNodes).find(".jb-job-categories").each((function(){wp.JB.job_categories_list.objects.wrapper=jQuery(".jb-job-categories"),wp.JB.job_categories_list.objects.wrapper.length&&wp.JB.job_categories_list.ajax();const e=document.querySelector(".jb-job-categories");e&&e.addEventListener("click",(t=>{t.target!==e&&(t.preventDefault(),t.stopPropagation())}))})),jQuery(e.addedNodes).find(".jb").each((function(){jb_responsive();const e=document.querySelector(".jb-job-categories");e&&e.addEventListener("click",(t=>{t.target!==e&&(t.preventDefault(),t.stopPropagation())}))}))}))})).observe(document,{attributes:!1,childList:!0,characterData:!1,subtree:!0})})),(0,t.registerBlockType)("jb-block/jb-jobs-categories-list",{edit:function(e){const t=(0,n.useBlockProps)();return(0,c.jsx)("div",{...t,children:(0,c.jsx)(r(),{block:"jb-block/jb-jobs-categories-list"})})},save:function(){return null}})})(); -
jobboardwp/tags/1.2.9/includes/blocks/jb-jobs-dashboard/block.json
r2916991 r3186671 6 6 "category": "jb-blocks", 7 7 "icon": "dashboard", 8 "editorScript": "file:./ build/index.js",8 "editorScript": "file:./src/index.js", 9 9 "textdomain": "jobboardwp" 10 10 } -
jobboardwp/tags/1.2.9/includes/blocks/jb-jobs-dashboard/src/index.js
r2916991 r3186671 1 jQuery(window).on( 'load', function($) { 2 var observer = new MutationObserver(function(mutations) { 3 mutations.forEach(function(mutation) { 4 5 jQuery(mutation.addedNodes).find('.jb-job-dashboard').each(function() { 6 wp.JB.jobs_dashboard.objects.wrapper = jQuery('.jb-job-dashboard'); 7 if ( wp.JB.jobs_dashboard.objects.wrapper.length ) { 8 wp.JB.jobs_dashboard.ajax(); 9 } 10 }); 11 12 jQuery(mutation.addedNodes).find('.jb').each(function() { 13 jb_responsive(); 14 }); 15 }); 16 }); 17 18 observer.observe(document, {attributes: false, childList: true, characterData: false, subtree:true}); 19 }); 20 21 import { registerBlockType } from '@wordpress/blocks'; 22 import ServerSideRender from '@wordpress/server-side-render'; 23 import { useBlockProps } from '@wordpress/block-editor'; 24 25 registerBlockType('jb-block/jb-jobs-dashboard', { 26 edit: function (props) { 27 const blockProps = useBlockProps(); 28 29 return ( 30 <div {...blockProps}> 31 <ServerSideRender block="jb-block/jb-jobs-dashboard" /> 32 </div> 33 ); 34 }, 35 36 save: function () { 37 return null; 38 } 39 }); 1 (()=>{"use strict";var e={n:o=>{var r=o&&o.__esModule?()=>o.default:()=>o;return e.d(r,{a:r}),r},d:(o,r)=>{for(var t in r)e.o(r,t)&&!e.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:r[t]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};const o=window.wp.blocks,r=window.wp.serverSideRender;var t=e.n(r);const a=window.wp.blockEditor,n=window.ReactJSXRuntime;jQuery(window).on("load",(function(e){new MutationObserver((function(e){e.forEach((function(e){jQuery(e.addedNodes).find(".jb-job-dashboard").each((function(){wp.JB.jobs_dashboard.objects.wrapper=jQuery(".jb-job-dashboard"),wp.JB.jobs_dashboard.objects.wrapper.length&&wp.JB.jobs_dashboard.ajax();const e=document.querySelector(".jb-job-dashboard");e&&e.addEventListener("click",(o=>{o.target!==e&&(o.preventDefault(),o.stopPropagation())}))})),jQuery(e.addedNodes).find(".jb").each((function(){jb_responsive();const e=document.querySelector(".jb-job-dashboard");e&&e.addEventListener("click",(o=>{o.target!==e&&(o.preventDefault(),o.stopPropagation())}))}))}))})).observe(document,{attributes:!1,childList:!0,characterData:!1,subtree:!0})})),(0,o.registerBlockType)("jb-block/jb-jobs-dashboard",{edit:function(e){const o=(0,a.useBlockProps)();return(0,n.jsx)("div",{...o,children:(0,n.jsx)(t(),{block:"jb-block/jb-jobs-dashboard"})})},save:function(){return null}})})(); -
jobboardwp/tags/1.2.9/includes/blocks/jb-jobs-list/block.json
r2916991 r3186671 6 6 "icon": "editor-ul", 7 7 "category": "jb-blocks", 8 "attributes": { 9 "user_id": { 10 "type": "string" 11 }, 12 "per_page": { 13 "type": "string" 14 }, 15 "no_logo": { 16 "type": "boolean" 17 }, 18 "hide_filled": { 19 "type": "boolean" 20 }, 21 "hide_expired": { 22 "type": "boolean" 23 }, 24 "hide_search": { 25 "type": "boolean" 26 }, 27 "hide_location_search": { 28 "type": "boolean" 29 }, 30 "hide_filters": { 31 "type": "boolean" 32 }, 33 "hide_job_types": { 34 "type": "boolean" 35 }, 36 "no_jobs_text": { 37 "type": "string" 38 }, 39 "no_job_search_text": { 40 "type": "string" 41 }, 42 "load_more_text": { 43 "type": "string" 44 }, 45 "category": { 46 "type": "string" 47 }, 48 "type": { 49 "type": "string" 50 }, 51 "orderby": { 52 "type": "string", 53 "default": "date" 54 }, 55 "order": { 56 "type": "string", 57 "default": "DESC" 58 }, 59 "filled_only": { 60 "type": "boolean", 61 "default": false 62 } 63 }, 64 "editorScript": "file:./build/index.js", 8 "editorScript": "file:./src/index.js", 65 9 "textdomain": "jobboardwp" 66 10 } -
jobboardwp/tags/1.2.9/includes/blocks/jb-jobs-list/src/index.js
r2916991 r3186671 1 import { useSelect } from '@wordpress/data'; 2 import { PanelBody, SelectControl, TextControl, ToggleControl, Spinner } from '@wordpress/components'; 3 import { InspectorControls, useBlockProps } from '@wordpress/block-editor'; 4 import ServerSideRender from '@wordpress/server-side-render'; 5 import { registerBlockType } from '@wordpress/blocks'; 6 7 registerBlockType('jb-block/jb-jobs-list', { 8 edit: (function (props) { 9 const blockProps = useBlockProps(); 10 const users = useSelect((select) => { 11 return select('core').getEntityRecords('root', 'user', { 12 per_page: -1, 13 _fields: ['id', 'name'] 14 }); 15 }); 16 const types = useSelect((select) => { 17 return select('core').getEntityRecords('taxonomy', 'jb-job-type', { 18 per_page: -1, 19 _fields: ['id', 'name'] 20 }); 21 }); 22 const categories = useSelect((select) => { 23 return select('core').getEntityRecords('taxonomy', 'jb-job-category', { 24 per_page: -1, 25 _fields: ['id', 'name'] 26 }); 27 }); 28 let user_id = props.attributes.user_id, 29 users_data = [{id: '', name: ''}], 30 per_page = props.attributes.per_page, 31 no_logo = props.attributes.no_logo, 32 hide_filled = props.attributes.hide_filled, 33 hide_expired = props.attributes.hide_expired, 34 hide_search = props.attributes.hide_search, 35 hide_location_search = props.attributes.hide_location_search, 36 hide_filters = props.attributes.hide_filters, 37 hide_job_types = props.attributes.hide_job_types, 38 no_jobs_text = props.attributes.no_jobs_text, 39 no_job_search_text = props.attributes.no_job_search_text, 40 load_more_text = props.attributes.load_more_text, 41 orderby = props.attributes.orderby, 42 order = props.attributes.order, 43 orderby_opt = [ 44 {label: wp.i18n.__('Date', 'jobboardwp'), value: 'date'}, 45 {label: wp.i18n.__('Title', 'jobboardwp'), value: 'title'} 46 ], 47 order_opt = [ 48 {label: wp.i18n.__('Ascending', 'jobboardwp'), value: 'ASC'}, 49 {label: wp.i18n.__('Descending', 'jobboardwp'), value: 'DESC'} 50 ], 51 type = props.attributes.type, 52 types_data = [], 53 // categories = props.categories, 54 category = props.attributes.category, 55 categories_data = [], 56 filled_only = props.attributes.filled_only, 57 category_hide = '-hide', 58 type_hide = '-hide'; 59 60 if ('' === category) { 61 category = []; 62 } 63 if ('' === type) { 64 type = []; 65 } 66 67 if (users !== null) { 68 users_data = users_data.concat(users); 69 } 70 71 if (types !== null) { 72 types_data = types_data.concat(types); 73 if (types.length !== 0) { 74 type_hide = ''; 75 } 76 } 77 78 if (categories !== null) { 79 categories_data = categories_data.concat(categories); 80 if (categories.length !== 0) { 81 category_hide = ''; 82 } 83 } 84 85 function get_option(data, type) { 86 87 let option = []; 88 89 if (type === 'user') { 90 data.map(function (user) { 91 option.push( 92 { 93 label: user.name, 94 value: user.id 95 } 96 ); 97 }); 98 } else if (type === 'type') { 99 data.map(function (type) { 100 option.push( 101 { 102 label: type.name, 103 value: type.id 104 } 105 ); 106 }); 107 } else if (type === 'category') { 108 data.map(function (category) { 109 option.push( 110 { 111 label: category.name, 112 value: category.id 113 } 114 ); 115 }); 116 } 117 118 return option; 119 } 120 121 function jbShortcode(user_id, per_page, no_logo, hide_filled, hide_expired, hide_search, hide_location_search, hide_filters, hide_job_types, no_jobs_text, no_job_search_text, load_more_text, category, type, orderby, order, filled_only) { 122 let shortcode = '[jb_jobs'; 123 124 if (user_id !== undefined && user_id !== '') { 125 shortcode = shortcode + ' employer-id="' + user_id + '"'; 126 } 127 128 if (per_page !== undefined && per_page !== '') { 129 shortcode = shortcode + ' per-page="' + per_page + '"'; 130 } 131 132 if (no_logo === true) { 133 shortcode = shortcode + ' no-logo="' + 1 + '"'; 134 } else { 135 shortcode = shortcode + ' no-logo="' + 0 + '"'; 136 } 137 138 if (hide_filled === true) { 139 shortcode = shortcode + ' hide-filled="' + 1 + '"'; 140 } else { 141 shortcode = shortcode + ' hide-filled="' + 0 + '"'; 142 } 143 144 if (hide_expired === true) { 145 shortcode = shortcode + ' hide-expired="' + 1 + '"'; 146 } else { 147 shortcode = shortcode + ' hide-expired="' + 0 + '"'; 148 } 149 150 if (hide_search === true) { 151 shortcode = shortcode + ' hide-search="' + 1 + '"'; 152 } else { 153 shortcode = shortcode + ' hide-search="' + 0 + '"'; 154 } 155 156 if (hide_location_search === true) { 157 shortcode = shortcode + ' hide-location-search="' + 1 + '"'; 158 } else { 159 shortcode = shortcode + ' hide-location-search="' + 0 + '"'; 160 } 161 162 if (hide_filters === true) { 163 shortcode = shortcode + ' hide-filters="' + 1 + '"'; 164 } else { 165 shortcode = shortcode + ' hide-filters="' + 0 + '"'; 166 } 167 168 if (hide_job_types === true) { 169 shortcode = shortcode + ' hide-job-types="' + 1 + '"'; 170 } else { 171 shortcode = shortcode + ' hide-job-types="' + 0 + '"'; 172 } 173 174 if (no_jobs_text !== undefined && no_jobs_text !== '') { 175 shortcode = shortcode + ' no-jobs-text="' + no_jobs_text + '"'; 176 } 177 178 if (no_job_search_text !== undefined && no_job_search_text !== '') { 179 shortcode = shortcode + ' no-jobs-search-text="' + no_job_search_text + '"'; 180 } 181 182 if (load_more_text !== undefined && load_more_text !== '') { 183 shortcode = shortcode + ' load-more-text="' + load_more_text + '"'; 184 } 185 186 if (type !== undefined && type !== '') { 187 shortcode = shortcode + ' type="' + type + '"'; 188 } 189 190 if (category !== undefined && category !== '') { 191 shortcode = shortcode + ' category="' + category + '"'; 192 } 193 194 if (orderby !== undefined) { 195 shortcode = shortcode + ' orderby="' + orderby + '"'; 196 } 197 198 if (order !== undefined) { 199 shortcode = shortcode + ' order="' + order + '"'; 200 } 201 202 if (filled_only === true) { 203 shortcode = shortcode + ' filled-only="' + 1 + '"'; 204 } else { 205 shortcode = shortcode + ' filled-only="' + 0 + '"'; 206 } 207 208 shortcode = shortcode + ']'; 209 return shortcode; 210 } 211 212 if (!users_data || !types_data || !categories_data) { 213 return ( 214 <p> 215 <Spinner /> 216 {wp.i18n.__('Loading...', 'jobboardwp')} 217 </p> 218 ); 219 } 220 221 if (0 === users_data.length || 0 === types_data.length || 0 === categories_data.length) { 222 return 'No data.'; 223 } 224 225 let get_category = get_option(categories_data, 'category'); 226 let get_users = get_option(users_data, 'user'); 227 let get_types = get_option(types_data, 'type'); 228 229 return ( 230 <div {...blockProps}> 231 <ServerSideRender block="jb-block/jb-jobs-list" attributes={props.attributes} /> 232 <InspectorControls> 233 <PanelBody title={wp.i18n.__('Jobs list', 'jobboardwp')}> 234 <SelectControl 235 label={wp.i18n.__('Select employer', 'jobboardwp')} 236 className="jb_select_employer" 237 value={props.attributes.user_id} 238 options={get_users} 239 style={{height: '35px', lineHeight: '20px', padding: '0 7px'}} 240 onChange={(value) => { 241 props.setAttributes({user_id: value}); 242 jbShortcode(value, per_page, no_logo, hide_filled, hide_expired, hide_search, hide_location_search, hide_filters, hide_job_types, no_jobs_text, no_job_search_text, load_more_text, category, type, orderby, order, filled_only); 243 }} 244 /> 245 <TextControl 246 label={wp.i18n.__('Per page', 'jobboardwp')} 247 className="jb_per_page" 248 type="number" 249 min={ 1 } 250 value={props.attributes.per_page} 251 onChange={(value) => { 252 if (value === '') { 253 value = 1; 254 } 255 props.setAttributes({per_page: value}); 256 jbShortcode(user_id, value, no_logo, hide_filled, hide_expired, hide_search, hide_location_search, hide_filters, hide_job_types, no_jobs_text, no_job_search_text, load_more_text, category, type, orderby, order, filled_only); 257 }} 258 /> 259 <ToggleControl 260 label={wp.i18n.__('Hide logo', 'jobboardwp')} 261 className="jb_no_logo" 262 checked={props.attributes.no_logo} 263 onChange={(value) => { 264 props.setAttributes({no_logo: value}); 265 jbShortcode(user_id, per_page, value, hide_filled, hide_expired, hide_search, hide_location_search, hide_filters, hide_job_types, no_jobs_text, no_job_search_text, load_more_text, category, type, orderby, order, filled_only); 266 }} 267 /> 268 <ToggleControl 269 label={wp.i18n.__('Hide filled', 'jobboardwp')} 270 className="jb_hide_filled" 271 checked={props.attributes.hide_filled} 272 onChange={(value) => { 273 props.setAttributes({hide_filled: value}); 274 jbShortcode(user_id, per_page, no_logo, value, hide_expired, hide_search, hide_location_search, hide_filters, hide_job_types, no_jobs_text, no_job_search_text, load_more_text, category, type, orderby, order, filled_only); 275 }} 276 /> 277 <ToggleControl 278 label={wp.i18n.__('Hide expired', 'jobboardwp')} 279 className="jb_hide_expired" 280 checked={props.attributes.hide_expired} 281 onChange={(value) => { 282 props.setAttributes({hide_expired: value}); 283 jbShortcode(user_id, per_page, no_logo, hide_filled, value, hide_search, hide_location_search, hide_filters, hide_job_types, no_jobs_text, no_job_search_text, load_more_text, category, type, orderby, order, filled_only); 284 }} 285 /> 286 <ToggleControl 287 label={wp.i18n.__('Hide search', 'jobboardwp')} 288 className="jb_hide_search" 289 checked={props.attributes.hide_search} 290 onChange={(value) => { 291 props.setAttributes({hide_search: value}); 292 jbShortcode(user_id, per_page, no_logo, hide_filled, hide_expired, value, hide_location_search, hide_filters, hide_job_types, no_jobs_text, no_job_search_text, load_more_text, category, type, orderby, order, filled_only); 293 }} 294 /> 295 <ToggleControl 296 label={wp.i18n.__('Hide location search', 'jobboardwp')} 297 className="jb_hide_location_search" 298 checked={props.attributes.hide_location_search} 299 onChange={(value) => { 300 props.setAttributes({hide_location_search: value}); 301 jbShortcode(user_id, per_page, no_logo, hide_filled, hide_expired, hide_search, value, hide_filters, hide_job_types, no_jobs_text, no_job_search_text, load_more_text, category, type, orderby, order, filled_only); 302 }} 303 /> 304 <ToggleControl 305 label={wp.i18n.__('Hide filters', 'jobboardwp')} 306 className="jb_hide_filters" 307 checked={props.attributes.hide_filters} 308 onChange={(value) => { 309 props.setAttributes({hide_filters: value}); 310 jbShortcode(user_id, per_page, no_logo, hide_filled, hide_expired, hide_search, hide_location_search, value, hide_job_types, no_jobs_text, no_job_search_text, load_more_text, category, type, orderby, order, filled_only); 311 }} 312 /> 313 <ToggleControl 314 label={wp.i18n.__('Hide job types', 'jobboardwp')} 315 className="jb_hide_job_types" 316 checked={props.attributes.hide_job_types} 317 onChange={(value) => { 318 props.setAttributes({hide_job_types: value}); 319 jbShortcode(user_id, per_page, no_logo, hide_filled, hide_expired, hide_search, hide_location_search, hide_filters, value, no_jobs_text, no_job_search_text, load_more_text, category, type, orderby, order, filled_only); 320 }} 321 /> 322 <TextControl 323 label={wp.i18n.__('No jobs text', 'jobboardwp')} 324 className="jb_no_jobs_text" 325 type="text" 326 value={props.attributes.no_jobs_text} 327 onChange={(value) => { 328 props.setAttributes({no_jobs_text: value}); 329 jbShortcode(user_id, per_page, no_logo, hide_filled, hide_expired, hide_search, hide_location_search, hide_filters, hide_job_types, value, no_job_search_text, load_more_text, category, type, orderby, order, filled_only); 330 }} 331 /> 332 <TextControl 333 label={wp.i18n.__('No job search text', 'jobboardwp')} 334 className="jb_no_job_search_text" 335 type="text" 336 value={props.attributes.no_job_search_text} 337 onChange={(value) => { 338 props.setAttributes({no_job_search_text: value}); 339 jbShortcode(user_id, per_page, no_logo, hide_filled, hide_expired, hide_search, hide_location_search, hide_filters, hide_job_types, no_jobs_text, value, load_more_text, category, type, orderby, order, filled_only); 340 }} 341 /> 342 <TextControl 343 label={wp.i18n.__('Load more text', 'jobboardwp')} 344 className="jb_load_more_text" 345 type="text" 346 value={props.attributes.load_more_text} 347 onChange={(value) => { 348 props.setAttributes({load_more_text: value}); 349 jbShortcode(user_id, per_page, no_logo, hide_filled, hide_expired, hide_search, hide_location_search, hide_filters, hide_job_types, no_jobs_text, no_job_search_text, value, category, type, orderby, order, filled_only); 350 }} 351 /> 352 <SelectControl 353 label={wp.i18n.__('Select category', 'jobboardwp')} 354 className={'jb_select_category' + category_hide} 355 value={category} 356 options={get_category} 357 multiple={true} 358 suffix=' ' 359 style={{height: '35px', lineHeight: '20px', padding: '0 7px'}} 360 onChange={(value) => { 361 props.setAttributes({category: value}); 362 jbShortcode(user_id, per_page, no_logo, hide_filled, hide_expired, hide_search, hide_location_search, hide_filters, hide_job_types, no_jobs_text, no_job_search_text, load_more_text, value, type, orderby, order, filled_only); 363 }} 364 /> 365 <SelectControl 366 label={wp.i18n.__('Select type', 'jobboardwp')} 367 className="{'jb_select_type' + type_hide}" 368 value={type} 369 options={get_types} 370 multiple={true} 371 suffix=' ' 372 style={{height: '80px', overflow: 'auto'}} 373 onChange={(value) => { 374 props.setAttributes({type: value}); 375 jbShortcode(user_id, per_page, no_logo, hide_filled, hide_expired, hide_search, hide_location_search, hide_filters, hide_job_types, no_jobs_text, no_job_search_text, load_more_text, category, value, orderby, order, filled_only); 376 }} 377 /> 378 <SelectControl 379 label={wp.i18n.__('Select order by', 'jobboardwp')} 380 className='jb_select_orderby' 381 value={props.attributes.orderby} 382 options={orderby_opt} 383 style={{height: '35px', lineHeight: '20px', padding: '0 7px'}} 384 onChange={(value) => { 385 props.setAttributes({orderby: value}); 386 jbShortcode(user_id, per_page, no_logo, hide_filled, hide_expired, hide_search, hide_location_search, hide_filters, hide_job_types, no_jobs_text, no_job_search_text, load_more_text, category, type, value, order, filled_only); 387 }} 388 /> 389 <SelectControl 390 label={wp.i18n.__('Select order', 'jobboardwp')} 391 className='jb_select_order' 392 value={props.attributes.order} 393 options={order_opt} 394 style={{height: '35px', lineHeight: '20px', padding: '0 7px'}} 395 onChange={(value) => { 396 props.setAttributes({order: value}); 397 jbShortcode(user_id, per_page, no_logo, hide_filled, hide_expired, hide_search, hide_location_search, hide_filters, hide_job_types, no_jobs_text, no_job_search_text, load_more_text, category, type, orderby, value, filled_only); 398 }} 399 /> 400 <ToggleControl 401 label={wp.i18n.__('Filled only', 'jobboardwp')} 402 className="jb_filled_only" 403 checked={props.attributes.filled_only} 404 onChange={(value) => { 405 props.setAttributes({filled_only: value}); 406 jbShortcode(user_id, per_page, no_logo, hide_filled, hide_expired, hide_search, hide_location_search, hide_filters, hide_job_types, no_jobs_text, no_job_search_text, load_more_text, category, type, orderby, order, value); 407 }} 408 /> 409 </PanelBody> 410 </InspectorControls> 411 </div> 412 ); 413 } // end withSelect 414 ), // end edit 415 416 save: function save(props) { 417 return null; 418 } 419 }); 420 421 jQuery(window).on( 'load', function($) { 422 let observer = new MutationObserver(function(mutations) { 423 mutations.forEach(function(mutation) { 424 425 jQuery(mutation.addedNodes).find('.jb-jobs').each(function() { 426 wp.JB.jobs_list.objects.wrapper = jQuery('.jb-jobs'); 427 if ( wp.JB.jobs_list.objects.wrapper.length ) { 428 wp.JB.jobs_list.objects.wrapper.each( function () { 429 wp.JB.jobs_list.ajax( jQuery(this) ); 430 }); 431 } 432 }); 433 434 jQuery(mutation.addedNodes).find('.jb').each(function() { 435 jb_responsive(); 436 }); 437 }); 438 }); 439 440 observer.observe(document, {attributes: false, childList: true, characterData: false, subtree:true}); 441 }); 1 (()=>{"use strict";var e={n:o=>{var l=o&&o.__esModule?()=>o.default:()=>o;return e.d(l,{a:l}),l},d:(o,l)=>{for(var t in l)e.o(l,t)&&!e.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:l[t]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};const o=window.wp.data,l=window.wp.components,t=window.wp.blockEditor,a=window.wp.serverSideRender;var n=e.n(a);const r=window.wp.blocks,i=window.wp.element,b=window.ReactJSXRuntime;(0,r.registerBlockType)("jb-block/jb-jobs-list",{edit:e=>{const a=(0,t.useBlockProps)(),{attributes:r,setAttributes:d}=e,{user_id:s,per_page:p,no_logo:c,hide_filled:_,hide_expired:j,hide_search:w,hide_location_search:u,hide_filters:g,hide_job_types:h,no_jobs_text:x="",no_job_search_text:y="",load_more_text:C="",orderby:v,order:m,type:f,category:S,filled_only:k}=r,T=(0,o.useSelect)((e=>e("core").getEntityRecords("root","user",{per_page:-1,_fields:["id","name","username"]})),[]),E=(0,o.useSelect)((e=>e("core").getEntityRecords("taxonomy","jb-job-type",{per_page:-1,_fields:["id","name"]})),[]),B=(0,o.useSelect)((e=>e("core").getEntityRecords("taxonomy","jb-job-category",{per_page:-1,_fields:["id","name"]})),[]),H=(0,i.useMemo)((()=>({users:[{label:"",value:""}].concat(T?T.map((({id:e,name:o})=>({label:o,value:e}))):[]),types:E?E.map((({id:e,name:o})=>({label:o,value:e}))):[],categories:B?B.map((({id:e,name:o})=>({label:o,value:e}))):[]})),[T,E,B]),P=(0,i.useCallback)(((e,o)=>{d({[e]:o})}),[d]);return T&&E&&B?(0,b.jsxs)("div",{...a,children:[(0,b.jsx)(n(),{block:"jb-block/jb-jobs-list",attributes:r}),(0,b.jsx)(t.InspectorControls,{children:(0,b.jsxs)(l.PanelBody,{title:wp.i18n.__("Jobs list","jobboardwp"),children:[(0,b.jsx)(l.SelectControl,{label:wp.i18n.__("Select employer","jobboardwp"),value:s,options:[{label:wp.i18n.__("Select a User","jobboardwp"),value:""},...T?T.map((e=>({label:e.name||e.username,value:e.id}))):[]],onChange:e=>P("user_id",e)}),(0,b.jsx)(l.TextControl,{label:wp.i18n.__("Per page","jobboardwp"),type:"number",min:1,value:p,onChange:e=>P("per_page",e||1)}),(0,b.jsx)(l.ToggleControl,{label:wp.i18n.__("Hide logo","jobboardwp"),checked:c,onChange:e=>P("no_logo",e)}),(0,b.jsx)(l.ToggleControl,{label:wp.i18n.__("Hide filled","jobboardwp"),checked:_,onChange:e=>P("hide_filled",e)}),(0,b.jsx)(l.ToggleControl,{label:wp.i18n.__("Hide expired","jobboardwp"),checked:j,onChange:e=>P("hide_expired",e)}),(0,b.jsx)(l.ToggleControl,{label:wp.i18n.__("Hide search","jobboardwp"),checked:w,onChange:e=>P("hide_search",e)}),(0,b.jsx)(l.ToggleControl,{label:wp.i18n.__("Hide location search","jobboardwp"),checked:u,onChange:e=>P("hide_location_search",e)}),(0,b.jsx)(l.ToggleControl,{label:wp.i18n.__("Hide filters","jobboardwp"),checked:g,onChange:e=>P("hide_filters",e)}),(0,b.jsx)(l.ToggleControl,{label:wp.i18n.__("Hide job types","jobboardwp"),checked:h,onChange:e=>P("hide_job_types",e)}),(0,b.jsx)(l.TextControl,{label:wp.i18n.__("No jobs text","jobboardwp"),value:x,onChange:e=>P("no_jobs_text",e)}),(0,b.jsx)(l.TextControl,{label:wp.i18n.__("No job search text","jobboardwp"),value:y,onChange:e=>P("no_job_search_text",e)}),(0,b.jsx)(l.TextControl,{label:wp.i18n.__("Load more text","jobboardwp"),value:C,onChange:e=>P("load_more_text",e)}),(0,b.jsx)(l.SelectControl,{label:wp.i18n.__("Select category","jobboardwp"),value:S,options:H.categories,multiple:!0,onChange:e=>P("category",e)}),(0,b.jsx)(l.SelectControl,{label:wp.i18n.__("Select type","jobboardwp"),value:f,options:H.types,multiple:!0,onChange:e=>P("type",e)}),(0,b.jsx)(l.SelectControl,{label:wp.i18n.__("Select order by","jobboardwp"),value:v,options:[{label:wp.i18n.__("Date","jobboardwp"),value:"date"},{label:wp.i18n.__("Title","jobboardwp"),value:"title"}],onChange:e=>P("orderby",e)}),(0,b.jsx)(l.SelectControl,{label:wp.i18n.__("Select order","jobboardwp"),value:m,options:[{label:wp.i18n.__("Ascending","jobboardwp"),value:"ASC"},{label:wp.i18n.__("Descending","jobboardwp"),value:"DESC"}],onChange:e=>P("order",e)}),(0,b.jsx)(l.ToggleControl,{label:wp.i18n.__("Filled only","jobboardwp"),checked:k,onChange:e=>P("filled_only",e)})]})})]}):(0,b.jsxs)("p",{children:[(0,b.jsx)(l.Spinner,{}),wp.i18n.__("Loading...","jobboardwp")]})},save:()=>null}),jQuery(window).on("load",(function(e){new MutationObserver((function(e){e.forEach((function(e){jQuery(e.addedNodes).find(".jb-jobs").each((function(){wp.JB.jobs_list.objects.wrapper=jQuery(".jb-jobs"),wp.JB.jobs_list.objects.wrapper.length&&wp.JB.jobs_list.objects.wrapper.each((function(){wp.JB.jobs_list.ajax(jQuery(this))}));const e=document.querySelector(".jb-jobs");e&&e.addEventListener("click",(o=>{o.target!==e&&(o.preventDefault(),o.stopPropagation())}))})),jQuery(e.addedNodes).find(".jb").each((function(){jb_responsive();const e=document.querySelector(".jb-jobs");e&&e.addEventListener("click",(o=>{o.target!==e&&(o.preventDefault(),o.stopPropagation())}))}))}))})).observe(document,{attributes:!1,childList:!0,characterData:!1,subtree:!0})}))})(); -
jobboardwp/tags/1.2.9/includes/blocks/jb-recent-jobs/block.json
r2916991 r3186671 6 6 "icon": "editor-ul", 7 7 "category": "jb-blocks", 8 "attributes": { 9 "number": { 10 "type": "string", 11 "default": 5 12 }, 13 "no_logo": { 14 "type": "boolean" 15 }, 16 "hide_filled": { 17 "type": "boolean" 18 }, 19 "no_job_types": { 20 "type": "boolean" 21 }, 22 "category": { 23 "type": "string" 24 }, 25 "type": { 26 "type": "string" 27 }, 28 "orderby": { 29 "type": "string", 30 "default": "date" 31 }, 32 "remote_only": { 33 "type": "boolean", 34 "default": false 35 } 36 }, 37 "editorScript": "file:./build/index.js", 8 "editorScript": "file:./src/index.js", 38 9 "textdomain": "jobboardwp" 39 10 } -
jobboardwp/tags/1.2.9/includes/blocks/jb-recent-jobs/src/index.js
r2916991 r3186671 1 import { useSelect } from '@wordpress/data'; 2 import { PanelBody, SelectControl, TextControl, ToggleControl, Spinner } from '@wordpress/components'; 3 import { InspectorControls, useBlockProps } from '@wordpress/block-editor'; 4 import ServerSideRender from '@wordpress/server-side-render'; 5 import { registerBlockType } from '@wordpress/blocks'; 6 7 registerBlockType('jb-block/jb-recent-jobs', { 8 edit: (function (props) { 9 const blockProps = useBlockProps(); 10 const types = useSelect((select) => { 11 return select('core').getEntityRecords('taxonomy', 'jb-job-type', { 12 per_page: -1, 13 _fields: ['id', 'name'] 14 }); 15 }); 16 const categories = useSelect((select) => { 17 return select('core').getEntityRecords('taxonomy', 'jb-job-category', { 18 per_page: -1, 19 _fields: ['id', 'name'] 20 }); 21 }); 22 let number = props.attributes.number, 23 no_logo = props.attributes.no_logo, 24 no_job_types = props.attributes.no_job_types, 25 hide_filled = props.attributes.hide_filled, 26 orderby = props.attributes.orderby, 27 orderby_opt = [ 28 {label: wp.i18n.__('Posting date', 'jobboardwp'), value: 'date'}, 29 {label: wp.i18n.__('Expiry date', 'jobboardwp'), value: 'expiry_date'} 30 ], 31 type = props.attributes.type, 32 types_data = [], 33 category = props.attributes.category, 34 categories_data = [], 35 remote_only = props.attributes.remote_only, 36 category_hide = '-hide', 37 type_hide = '-hide'; 38 39 if ('' === category) { 40 category = []; 41 } 42 if ('' === type) { 43 type = []; 44 } 45 if (types !== null) { 46 types_data = types_data.concat(types); 47 if (types.length !== 0) { 48 type_hide = ''; 49 } 50 } 51 52 if (categories !== null) { 53 categories_data = categories_data.concat(categories); 54 if (categories.length !== 0) { 55 category_hide = ''; 56 } 57 } 58 59 function get_option(data, type) { 60 61 let option = []; 62 63 if (type === 'type') { 64 data.map(function (type) { 65 option.push( 66 { 67 label: type.name, 68 value: type.id 69 } 70 ); 71 }); 72 } else if (type === 'category') { 73 data.map(function (category) { 74 option.push( 75 { 76 label: category.name, 77 value: category.id 78 } 79 ); 80 }); 81 } 82 83 return option; 84 } 85 86 function jbShortcode(number, category, type, remote_only, orderby, hide_filled, no_logo, no_job_types) { 87 let shortcode = '[jb_recent_jobs'; 88 89 if (number !== undefined && number !== '') { 90 shortcode = shortcode + ' number="' + number + '"'; 91 } else { 92 shortcode = shortcode + ' number="' + 5 + '"'; 93 } 94 95 if (no_logo === true) { 96 shortcode = shortcode + ' no_logo="' + 1 + '"'; 97 } else { 98 shortcode = shortcode + ' no_logo="' + 0 + '"'; 99 } 100 101 if (hide_filled === true) { 102 shortcode = shortcode + ' hide_filled="' + 1 + '"'; 103 } else { 104 shortcode = shortcode + ' hide_filled="' + 0 + '"'; 105 } 106 107 if (no_job_types === true) { 108 shortcode = shortcode + ' no_job_types="' + 1 + '"'; 109 } else { 110 shortcode = shortcode + ' no_job_types="' + 0 + '"'; 111 } 112 113 if (type !== undefined && type !== '') { 114 shortcode = shortcode + ' type="' + type + '"'; 115 } 116 117 if (category !== undefined && category !== '') { 118 shortcode = shortcode + ' category="' + category + '"'; 119 } 120 121 if (orderby !== undefined) { 122 shortcode = shortcode + ' orderby="' + orderby + '"'; 123 } 124 125 if (remote_only === true) { 126 shortcode = shortcode + ' remote_only="' + 1 + '"'; 127 } else { 128 shortcode = shortcode + ' remote_only="' + 0 + '"'; 129 } 130 131 shortcode = shortcode + ']'; 132 return shortcode; 133 } 134 135 if (!types_data || !categories_data) { 136 return ( 137 <p> 138 <Spinner /> 139 {wp.i18n.__('Loading...', 'jobboardwp')} 140 </p> 141 ); 142 } 143 144 if (0 === types_data.length || 0 === categories_data.length) { 145 return 'No data.'; 146 } 147 148 let get_category = get_option(categories_data, 'category'); 149 let get_types = get_option(types_data, 'type'); 150 151 152 return ( 153 <div {...blockProps}> 154 <ServerSideRender block="jb-block/jb-recent-jobs" attributes={props.attributes} /> 155 <InspectorControls> 156 <PanelBody title={wp.i18n.__('Recent jobs', 'jobboardwp')}> 157 <TextControl 158 label={wp.i18n.__('Number', 'jobboardwp')} 159 className="jb_number" 160 type="number" 161 min={ 1 } 162 value={props.attributes.number} 163 onChange={(value) => { 164 if (value === '') { 165 value = 1; 166 } 167 props.setAttributes({number: value}); 168 jbShortcode(value, category, type, remote_only, orderby, hide_filled, no_logo, no_job_types); 169 }} 170 /> 171 <ToggleControl 172 label={wp.i18n.__('Hide logo', 'jobboardwp')} 173 className="jb_no_logo" 174 checked={props.attributes.no_logo} 175 onChange={(value) => { 176 props.setAttributes({no_logo: value}); 177 jbShortcode(number, category, type, remote_only, orderby, hide_filled, value, no_job_types); 178 }} 179 /> 180 <ToggleControl 181 label={wp.i18n.__('Hide filled', 'jobboardwp')} 182 className="jb_hide_filled" 183 checked={props.attributes.hide_filled} 184 onChange={(value) => { 185 props.setAttributes({hide_filled: value}); 186 jbShortcode(number, category, type, remote_only, orderby, value, no_logo, no_job_types); 187 }} 188 /> 189 <ToggleControl 190 label={wp.i18n.__('Hide job types', 'jobboardwp')} 191 className="jb_no_job_types" 192 checked={props.attributes.no_job_types} 193 onChange={(value) => { 194 props.setAttributes({no_job_types: value}); 195 jbShortcode(number, category, type, remote_only, orderby, hide_filled, no_logo, value); 196 }} 197 /> 198 <SelectControl 199 label={wp.i18n.__('Select category', 'jobboardwp')} 200 className="{'jb_select_category' + category_hide}" 201 value={category} 202 options={get_category} 203 multiple={true} 204 suffix=' ' 205 style={{height: '80px', overflow: 'auto'}} 206 onChange={(value) => { 207 props.setAttributes({category: value}); 208 jbShortcode(number, value, type, remote_only, orderby, hide_filled, no_logo, no_job_types); 209 }} 210 /> 211 <SelectControl 212 label={wp.i18n.__('Select type', 'jobboardwp')} 213 className="{'jb_select_type' + type_hide}" 214 value={type} 215 options={get_types} 216 multiple={true} 217 suffix=' ' 218 style={{height: '80px', overflow: 'auto'}} 219 onChange={(value) => { 220 props.setAttributes({type: value}); 221 jbShortcode(number, category, value, remote_only, orderby, hide_filled, no_logo, no_job_types); 222 }} 223 /> 224 <SelectControl 225 label={wp.i18n.__('Select order by', 'jobboardwp')} 226 className='jb_select_orderby' 227 value={props.attributes.orderby} 228 options={orderby_opt} 229 style={{height: '35px', lineHeight: '20px', padding: '0 7px'}} 230 onChange={(value) => { 231 props.setAttributes({orderby: value}); 232 jbShortcode(number, category, type, remote_only, value, hide_filled, no_logo, no_job_types); 233 }} 234 /> 235 <ToggleControl 236 label={wp.i18n.__('Remote only', 'jobboardwp')} 237 className="jb_remote_only" 238 checked={props.attributes.remote_only} 239 onChange={(value) => { 240 props.setAttributes({remote_only: value}); 241 jbShortcode(number, category, type, value, orderby, hide_filled, no_logo, no_job_types); 242 }} 243 /> 244 </PanelBody> 245 </InspectorControls> 246 </div> 247 ); 248 } // end withSelect 249 ), // end edit 250 save: function save(props) { 251 return null; 252 } 253 }); 1 (()=>{"use strict";var e={n:o=>{var t=o&&o.__esModule?()=>o.default:()=>o;return e.d(t,{a:t}),t},d:(o,t)=>{for(var n in t)e.o(t,n)&&!e.o(o,n)&&Object.defineProperty(o,n,{enumerable:!0,get:t[n]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};const o=window.wp.data,t=window.wp.components,n=window.wp.blockEditor,r=window.wp.serverSideRender;var a=e.n(r);const l=window.wp.blocks,i=window.wp.element,b=window.ReactJSXRuntime;(0,l.registerBlockType)("jb-block/jb-recent-jobs",{edit:e=>{const r=(0,n.useBlockProps)(),{attributes:l,setAttributes:d}=e,{number:s,no_logo:c,hide_filled:p,no_job_types:w,orderby:j,type:u,category:y,remote_only:_}=l,g=(0,o.useSelect)((e=>e("core").getEntityRecords("taxonomy","jb-job-type",{per_page:-1,_fields:["id","name"]})),[]),m=(0,o.useSelect)((e=>e("core").getEntityRecords("taxonomy","jb-job-category",{per_page:-1,_fields:["id","name"]})),[]),h=(0,i.useMemo)((()=>({types:g?g.map((({id:e,name:o})=>({label:o,value:e}))):[],categories:m?m.map((({id:e,name:o})=>({label:o,value:e}))):[]})),[g,m]),v=(0,i.useCallback)(((e,o)=>d({[e]:o})),[d]);return g&&m?(0,b.jsxs)("div",{...r,children:[(0,b.jsx)(a(),{block:"jb-block/jb-recent-jobs",attributes:l}),(0,b.jsx)(n.InspectorControls,{children:(0,b.jsxs)(t.PanelBody,{title:wp.i18n.__("Recent jobs","jobboardwp"),children:[(0,b.jsx)(t.TextControl,{label:wp.i18n.__("Number","jobboardwp"),type:"number",min:1,value:s,onChange:e=>v("number",e||1)}),(0,b.jsx)(t.ToggleControl,{label:wp.i18n.__("Hide logo","jobboardwp"),checked:c,onChange:e=>v("no_logo",e)}),(0,b.jsx)(t.ToggleControl,{label:wp.i18n.__("Hide filled","jobboardwp"),checked:p,onChange:e=>v("hide_filled",e)}),(0,b.jsx)(t.ToggleControl,{label:wp.i18n.__("Hide job types","jobboardwp"),checked:w,onChange:e=>v("no_job_types",e)}),(0,b.jsx)(t.SelectControl,{label:wp.i18n.__("Select category","jobboardwp"),value:Array.isArray(y)?y:[],options:h.categories,multiple:!0,onChange:e=>v("category",Array.isArray(e)?e:[e])}),(0,b.jsx)(t.SelectControl,{label:wp.i18n.__("Select type","jobboardwp"),value:Array.isArray(u)?u:[],options:h.types,multiple:!0,onChange:e=>v("type",Array.isArray(e)?e:[e])}),(0,b.jsx)(t.SelectControl,{label:wp.i18n.__("Select order by","jobboardwp"),value:j,options:[{label:wp.i18n.__("Posting date","jobboardwp"),value:"date"},{label:wp.i18n.__("Expiry date","jobboardwp"),value:"expiry_date"}],onChange:e=>v("orderby",e)}),(0,b.jsx)(t.ToggleControl,{label:wp.i18n.__("Remote only","jobboardwp"),checked:_,onChange:e=>v("remote_only",e)})]})})]}):(0,b.jsxs)("p",{children:[(0,b.jsx)(t.Spinner,{}),wp.i18n.__("Loading...","jobboardwp")]})},save:()=>null}),jQuery(window).on("load",(function(e){new MutationObserver((function(e){e.forEach((function(e){jQuery(e.addedNodes).find(".jb-jobs-widget").each((function(){const e=document.querySelector(".jb-jobs-widget");e&&e.addEventListener("click",(o=>{o.target!==e&&(o.preventDefault(),o.stopPropagation())}))}))}))})).observe(document,{attributes:!1,childList:!0,characterData:!1,subtree:!0})}))})(); -
jobboardwp/tags/1.2.9/includes/common/class-blocks.php
r3169481 r3186671 9 9 10 10 if ( ! class_exists( 'jb\common\Blocks' ) ) { 11 12 11 13 12 /** … … 27 26 28 27 public function block_editor_render() { 28 if ( function_exists( 'wp_register_block_metadata_collection' ) ) { 29 wp_register_block_metadata_collection( JB_PATH . 'includes/blocks', JB_PATH . 'includes/blocks/blocks-manifest.php' ); 30 } 31 29 32 $blocks = array( 30 33 'jb-block/jb-job-post' => array( -
jobboardwp/tags/1.2.9/jobboardwp.php
r3169481 r3186671 4 4 * Plugin URI: https://jobboardwp.com/ 5 5 * Description: Add a modern job board to your website. Display job listings and allow employers to submit and manage jobs all from the front-end 6 * Version: 1.2. 86 * Version: 1.2.9 7 7 * Author: JobBoardWP 8 8 * Text Domain: jobboardwp -
jobboardwp/tags/1.2.9/languages/jobboardwp.pot
r3169481 r3186671 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: JobBoardWP 1.2. 8\n"5 "Project-Id-Version: JobBoardWP 1.2.9\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/jobboardwp\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2024-1 0-15T18:36:23+00:00\n"12 "POT-Creation-Date: 2024-11-12T10:09:11+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.11.0\n" … … 672 672 #: includes/common/class-cpt.php:59 673 673 #: includes/common/class-cpt.php:363 674 #: includes/blocks/jb-job/build/index.js:1675 #: includes/blocks/jb-job/src/index.js:54676 #: includes/blocks/jb-job/src/index.js: 56674 #: blocks-src/jb-job/src/index.js:44 675 #: blocks-src/jb-job/src/index.js:46 676 #: includes/blocks/jb-job/src/index.js:1 677 677 msgid "Job" 678 678 msgstr "" … … 855 855 #: includes/admin/class-settings.php:730 856 856 #: includes/admin/class-site-health.php:453 857 #: includes/blocks/jb-jobs-list/build/index.js:1858 #: includes/blocks/jb-jobs-list/src/index.js: 305857 #: blocks-src/jb-jobs-list/src/index.js:91 858 #: includes/blocks/jb-jobs-list/src/index.js:1 859 859 msgid "Hide filters" 860 860 msgstr "" … … 867 867 #: includes/admin/class-site-health.php:457 868 868 #: includes/widgets/class-recent-jobs.php:192 869 #: includes/blocks/jb-jobs-list/build/index.js:1870 #: includes/blocks/jb-jobs-list/src/index.js:314871 #: includes/blocks/jb- recent-jobs/build/index.js:1872 #: includes/blocks/jb-recent-jobs/src/index.js:1 90869 #: blocks-src/jb-jobs-list/src/index.js:96 870 #: blocks-src/jb-recent-jobs/src/index.js:56 871 #: includes/blocks/jb-jobs-list/src/index.js:1 872 #: includes/blocks/jb-recent-jobs/src/index.js:1 873 873 msgid "Hide job types" 874 874 msgstr "" … … 3195 3195 3196 3196 #: includes/frontend/class-shortcodes.php:522 3197 #: includes/blocks/jb-jobs-list/build/index.js:13198 #: includes/blocks/jb-jobs-list/src/index.js: 453197 #: blocks-src/jb-jobs-list/src/index.js:134 3198 #: includes/blocks/jb-jobs-list/src/index.js:1 3199 3199 msgid "Title" 3200 3200 msgstr "" … … 3257 3257 3258 3258 #: includes/widgets/class-recent-jobs.php:169 3259 #: includes/blocks/jb-recent-jobs/build/index.js:13260 #: includes/blocks/jb-recent-jobs/src/index.js: 2363259 #: blocks-src/jb-recent-jobs/src/index.js:84 3260 #: includes/blocks/jb-recent-jobs/src/index.js:1 3261 3261 msgid "Remote only" 3262 3262 msgstr "" 3263 3263 3264 3264 #: includes/widgets/class-recent-jobs.php:174 3265 #: includes/blocks/jb-jobs-list/build/index.js:13266 #: includes/blocks/jb-jobs-list/src/index.js:2693267 #: includes/blocks/jb- recent-jobs/build/index.js:13268 #: includes/blocks/jb-recent-jobs/src/index.js:1 813265 #: blocks-src/jb-jobs-list/src/index.js:71 3266 #: blocks-src/jb-recent-jobs/src/index.js:51 3267 #: includes/blocks/jb-jobs-list/src/index.js:1 3268 #: includes/blocks/jb-recent-jobs/src/index.js:1 3269 3269 msgid "Hide filled" 3270 3270 msgstr "" … … 3275 3275 3276 3276 #: includes/widgets/class-recent-jobs.php:180 3277 #: includes/blocks/jb-recent-jobs/build/index.js:13278 #: includes/blocks/jb-recent-jobs/src/index.js: 293277 #: blocks-src/jb-recent-jobs/src/index.js:79 3278 #: includes/blocks/jb-recent-jobs/src/index.js:1 3279 3279 msgid "Expiry date" 3280 3280 msgstr "" 3281 3281 3282 3282 #: includes/widgets/class-recent-jobs.php:181 3283 #: includes/blocks/jb-recent-jobs/build/index.js:13284 #: includes/blocks/jb-recent-jobs/src/index.js: 283283 #: blocks-src/jb-recent-jobs/src/index.js:78 3284 #: includes/blocks/jb-recent-jobs/src/index.js:1 3285 3285 msgid "Posting date" 3286 3286 msgstr "" … … 3601 3601 msgstr "" 3602 3602 3603 #: includes/blocks/jb-job/build/index.js:13604 #: includes/blocks/jb-job/src/index.js:223605 #: includes/blocks/jb-jobs-list/build/index.js:13606 #: includes/blocks/jb-job s-list/src/index.js:2163607 #: includes/blocks/jb- recent-jobs/build/index.js:13608 #: includes/blocks/jb-recent-jobs/src/index.js:1 393603 #: blocks-src/jb-job/src/index.js:24 3604 #: blocks-src/jb-jobs-list/src/index.js:36 3605 #: blocks-src/jb-recent-jobs/src/index.js:28 3606 #: includes/blocks/jb-job/src/index.js:1 3607 #: includes/blocks/jb-jobs-list/src/index.js:1 3608 #: includes/blocks/jb-recent-jobs/src/index.js:1 3609 3609 msgid "Loading..." 3610 3610 msgstr "" 3611 3611 3612 #: includes/blocks/jb-jobs-list/build/index.js:1 3613 #: includes/blocks/jb-jobs-list/src/index.js:44 3612 #: blocks-src/jb-job/src/index.js:30 3613 #: includes/blocks/jb-job/src/index.js:1 3614 msgid "Jobs not found" 3615 msgstr "" 3616 3617 #: blocks-src/jb-jobs-list/src/index.js:45 3618 #: includes/blocks/jb-jobs-list/src/index.js:1 3619 msgid "Jobs list" 3620 msgstr "" 3621 3622 #: blocks-src/jb-jobs-list/src/index.js:47 3623 #: includes/blocks/jb-jobs-list/src/index.js:1 3624 msgid "Select employer" 3625 msgstr "" 3626 3627 #: blocks-src/jb-jobs-list/src/index.js:50 3628 #: includes/blocks/jb-jobs-list/src/index.js:1 3629 msgid "Select a User" 3630 msgstr "" 3631 3632 #: blocks-src/jb-jobs-list/src/index.js:59 3633 #: includes/blocks/jb-jobs-list/src/index.js:1 3634 msgid "Per page" 3635 msgstr "" 3636 3637 #: blocks-src/jb-jobs-list/src/index.js:66 3638 #: blocks-src/jb-recent-jobs/src/index.js:46 3639 #: includes/blocks/jb-jobs-list/src/index.js:1 3640 #: includes/blocks/jb-recent-jobs/src/index.js:1 3641 msgid "Hide logo" 3642 msgstr "" 3643 3644 #: blocks-src/jb-jobs-list/src/index.js:76 3645 #: includes/blocks/jb-jobs-list/src/index.js:1 3646 msgid "Hide expired" 3647 msgstr "" 3648 3649 #: blocks-src/jb-jobs-list/src/index.js:81 3650 #: includes/blocks/jb-jobs-list/src/index.js:1 3651 msgid "Hide search" 3652 msgstr "" 3653 3654 #: blocks-src/jb-jobs-list/src/index.js:86 3655 #: includes/blocks/jb-jobs-list/src/index.js:1 3656 msgid "Hide location search" 3657 msgstr "" 3658 3659 #: blocks-src/jb-jobs-list/src/index.js:101 3660 #: includes/blocks/jb-jobs-list/src/index.js:1 3661 msgid "No jobs text" 3662 msgstr "" 3663 3664 #: blocks-src/jb-jobs-list/src/index.js:106 3665 #: includes/blocks/jb-jobs-list/src/index.js:1 3666 msgid "No job search text" 3667 msgstr "" 3668 3669 #: blocks-src/jb-jobs-list/src/index.js:111 3670 #: includes/blocks/jb-jobs-list/src/index.js:1 3671 msgid "Load more text" 3672 msgstr "" 3673 3674 #: blocks-src/jb-jobs-list/src/index.js:116 3675 #: blocks-src/jb-recent-jobs/src/index.js:61 3676 #: includes/blocks/jb-jobs-list/src/index.js:1 3677 #: includes/blocks/jb-recent-jobs/src/index.js:1 3678 msgid "Select category" 3679 msgstr "" 3680 3681 #: blocks-src/jb-jobs-list/src/index.js:123 3682 #: blocks-src/jb-recent-jobs/src/index.js:68 3683 #: includes/blocks/jb-jobs-list/src/index.js:1 3684 #: includes/blocks/jb-recent-jobs/src/index.js:1 3685 msgid "Select type" 3686 msgstr "" 3687 3688 #: blocks-src/jb-jobs-list/src/index.js:130 3689 #: blocks-src/jb-recent-jobs/src/index.js:75 3690 #: includes/blocks/jb-jobs-list/src/index.js:1 3691 #: includes/blocks/jb-recent-jobs/src/index.js:1 3692 msgid "Select order by" 3693 msgstr "" 3694 3695 #: blocks-src/jb-jobs-list/src/index.js:133 3696 #: includes/blocks/jb-jobs-list/src/index.js:1 3614 3697 msgid "Date" 3615 3698 msgstr "" 3616 3699 3617 #: includes/blocks/jb-jobs-list/build/index.js:1 3618 #: includes/blocks/jb-jobs-list/src/index.js:48 3700 #: blocks-src/jb-jobs-list/src/index.js:139 3701 #: includes/blocks/jb-jobs-list/src/index.js:1 3702 msgid "Select order" 3703 msgstr "" 3704 3705 #: blocks-src/jb-jobs-list/src/index.js:142 3706 #: includes/blocks/jb-jobs-list/src/index.js:1 3619 3707 msgid "Ascending" 3620 3708 msgstr "" 3621 3709 3622 #: includes/blocks/jb-jobs-list/build/index.js:13623 #: includes/blocks/jb-jobs-list/src/index.js: 493710 #: blocks-src/jb-jobs-list/src/index.js:143 3711 #: includes/blocks/jb-jobs-list/src/index.js:1 3624 3712 msgid "Descending" 3625 3713 msgstr "" 3626 3714 3627 #: includes/blocks/jb-jobs-list/build/index.js:1 3628 #: includes/blocks/jb-jobs-list/src/index.js:233 3629 msgid "Jobs list" 3630 msgstr "" 3631 3632 #: includes/blocks/jb-jobs-list/build/index.js:1 3633 #: includes/blocks/jb-jobs-list/src/index.js:235 3634 msgid "Select employer" 3635 msgstr "" 3636 3637 #: includes/blocks/jb-jobs-list/build/index.js:1 3638 #: includes/blocks/jb-jobs-list/src/index.js:246 3639 msgid "Per page" 3640 msgstr "" 3641 3642 #: includes/blocks/jb-jobs-list/build/index.js:1 3643 #: includes/blocks/jb-jobs-list/src/index.js:260 3644 #: includes/blocks/jb-recent-jobs/build/index.js:1 3645 #: includes/blocks/jb-recent-jobs/src/index.js:172 3646 msgid "Hide logo" 3647 msgstr "" 3648 3649 #: includes/blocks/jb-jobs-list/build/index.js:1 3650 #: includes/blocks/jb-jobs-list/src/index.js:278 3651 msgid "Hide expired" 3652 msgstr "" 3653 3654 #: includes/blocks/jb-jobs-list/build/index.js:1 3655 #: includes/blocks/jb-jobs-list/src/index.js:287 3656 msgid "Hide search" 3657 msgstr "" 3658 3659 #: includes/blocks/jb-jobs-list/build/index.js:1 3660 #: includes/blocks/jb-jobs-list/src/index.js:296 3661 msgid "Hide location search" 3662 msgstr "" 3663 3664 #: includes/blocks/jb-jobs-list/build/index.js:1 3665 #: includes/blocks/jb-jobs-list/src/index.js:323 3666 msgid "No jobs text" 3667 msgstr "" 3668 3669 #: includes/blocks/jb-jobs-list/build/index.js:1 3670 #: includes/blocks/jb-jobs-list/src/index.js:333 3671 msgid "No job search text" 3672 msgstr "" 3673 3674 #: includes/blocks/jb-jobs-list/build/index.js:1 3675 #: includes/blocks/jb-jobs-list/src/index.js:343 3676 msgid "Load more text" 3677 msgstr "" 3678 3679 #: includes/blocks/jb-jobs-list/build/index.js:1 3680 #: includes/blocks/jb-jobs-list/src/index.js:353 3681 #: includes/blocks/jb-recent-jobs/build/index.js:1 3682 #: includes/blocks/jb-recent-jobs/src/index.js:199 3683 msgid "Select category" 3684 msgstr "" 3685 3686 #: includes/blocks/jb-jobs-list/build/index.js:1 3687 #: includes/blocks/jb-jobs-list/src/index.js:366 3688 #: includes/blocks/jb-recent-jobs/build/index.js:1 3689 #: includes/blocks/jb-recent-jobs/src/index.js:212 3690 msgid "Select type" 3691 msgstr "" 3692 3693 #: includes/blocks/jb-jobs-list/build/index.js:1 3694 #: includes/blocks/jb-jobs-list/src/index.js:379 3695 #: includes/blocks/jb-recent-jobs/build/index.js:1 3696 #: includes/blocks/jb-recent-jobs/src/index.js:225 3697 msgid "Select order by" 3698 msgstr "" 3699 3700 #: includes/blocks/jb-jobs-list/build/index.js:1 3701 #: includes/blocks/jb-jobs-list/src/index.js:390 3702 msgid "Select order" 3703 msgstr "" 3704 3705 #: includes/blocks/jb-jobs-list/build/index.js:1 3706 #: includes/blocks/jb-jobs-list/src/index.js:401 3715 #: blocks-src/jb-jobs-list/src/index.js:148 3716 #: includes/blocks/jb-jobs-list/src/index.js:1 3707 3717 msgid "Filled only" 3708 3718 msgstr "" 3709 3719 3710 #: includes/blocks/jb-recent-jobs/build/index.js:13711 #: includes/blocks/jb-recent-jobs/src/index.js:1 563720 #: blocks-src/jb-recent-jobs/src/index.js:37 3721 #: includes/blocks/jb-recent-jobs/src/index.js:1 3712 3722 msgid "Recent jobs" 3713 3723 msgstr "" 3714 3724 3715 #: includes/blocks/jb-recent-jobs/build/index.js:13716 #: includes/blocks/jb-recent-jobs/src/index.js:1 583725 #: blocks-src/jb-recent-jobs/src/index.js:39 3726 #: includes/blocks/jb-recent-jobs/src/index.js:1 3717 3727 msgid "Number" 3718 3728 msgstr "" 3719 3729 3730 #: blocks-src/jb-job-post/block.json 3720 3731 #: includes/blocks/jb-job-post/block.json 3721 3732 msgctxt "block title" … … 3723 3734 msgstr "" 3724 3735 3736 #: blocks-src/jb-job-post/block.json 3725 3737 #: includes/blocks/jb-job-post/block.json 3726 3738 msgctxt "block description" … … 3728 3740 msgstr "" 3729 3741 3742 #: blocks-src/jb-job/block.json 3730 3743 #: includes/blocks/jb-job/block.json 3731 3744 msgctxt "block title" … … 3733 3746 msgstr "" 3734 3747 3748 #: blocks-src/jb-job/block.json 3735 3749 #: includes/blocks/jb-job/block.json 3736 3750 msgctxt "block description" … … 3738 3752 msgstr "" 3739 3753 3754 #: blocks-src/jb-jobs-categories-list/block.json 3740 3755 #: includes/blocks/jb-jobs-categories-list/block.json 3741 3756 msgctxt "block title" … … 3743 3758 msgstr "" 3744 3759 3760 #: blocks-src/jb-jobs-categories-list/block.json 3745 3761 #: includes/blocks/jb-jobs-categories-list/block.json 3746 3762 msgctxt "block description" … … 3748 3764 msgstr "" 3749 3765 3766 #: blocks-src/jb-jobs-dashboard/block.json 3750 3767 #: includes/blocks/jb-jobs-dashboard/block.json 3751 3768 msgctxt "block title" … … 3753 3770 msgstr "" 3754 3771 3772 #: blocks-src/jb-jobs-dashboard/block.json 3755 3773 #: includes/blocks/jb-jobs-dashboard/block.json 3756 3774 msgctxt "block description" … … 3758 3776 msgstr "" 3759 3777 3778 #: blocks-src/jb-jobs-list/block.json 3760 3779 #: includes/blocks/jb-jobs-list/block.json 3761 3780 msgctxt "block title" … … 3763 3782 msgstr "" 3764 3783 3784 #: blocks-src/jb-jobs-list/block.json 3765 3785 #: includes/blocks/jb-jobs-list/block.json 3766 3786 msgctxt "block description" … … 3768 3788 msgstr "" 3769 3789 3790 #: blocks-src/jb-recent-jobs/block.json 3770 3791 #: includes/blocks/jb-recent-jobs/block.json 3771 3792 msgctxt "block title" … … 3773 3794 msgstr "" 3774 3795 3796 #: blocks-src/jb-recent-jobs/block.json 3775 3797 #: includes/blocks/jb-recent-jobs/block.json 3776 3798 msgctxt "block description" -
jobboardwp/tags/1.2.9/readme.txt
r3169481 r3186671 6 6 Requires PHP: 5.6 7 7 Requires at least: 5.5 8 Tested up to: 6. 69 Stable tag: 1.2. 88 Tested up to: 6.7 9 Stable tag: 1.2.9 10 10 License: GPLv3 11 11 License URI: http://www.gnu.org/licenses/gpl-3.0.txt … … 105 105 106 106 == Changelog == 107 108 = 1.2.9: November 12, 2024 = 109 110 * Added: Supporting new `wp_register_block_metadata_collection()` function for registering WP Blocks 111 112 * Cached and optimized/minified assets(JS/CSS) must be flushed/re-generated after upgrade 107 113 108 114 = 1.2.8: October 16, 2024 = -
jobboardwp/trunk/includes/blocks/jb-job-post/block.json
r2916991 r3186671 6 6 "category": "jb-blocks", 7 7 "icon": "forms", 8 "editorScript": "file:./ build/index.js",8 "editorScript": "file:./src/index.js", 9 9 "textdomain": "jobboardwp" 10 10 } -
jobboardwp/trunk/includes/blocks/jb-job-post/src/index.js
r2916991 r3186671 1 import { registerBlockType } from '@wordpress/blocks'; 2 import ServerSideRender from '@wordpress/server-side-render'; 3 import { useBlockProps } from '@wordpress/block-editor'; 4 import jQuery from 'jquery'; 5 6 registerBlockType('jb-block/jb-job-post', { 7 edit: function (props) { 8 jQuery('#jb-job-preview, #jb-job-draft, #jb_company_logo_plupload').attr('disabled', 'disabled'); 9 const blockProps = useBlockProps(); 10 return ( 11 <div {...blockProps}> 12 <ServerSideRender block="jb-block/jb-job-post" /> 13 </div> 14 ); 15 }, 16 save: function () { 17 return null; 18 } 19 }); 1 (()=>{"use strict";var e={n:o=>{var t=o&&o.__esModule?()=>o.default:()=>o;return e.d(t,{a:t}),t},d:(o,t)=>{for(var r in t)e.o(t,r)&&!e.o(o,r)&&Object.defineProperty(o,r,{enumerable:!0,get:t[r]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};const o=window.wp.blocks,t=window.wp.serverSideRender;var r=e.n(t);const n=window.wp.blockEditor,s=window.wp.element,c=window.ReactJSXRuntime;(0,o.registerBlockType)("jb-block/jb-job-post",{edit:function(){(0,s.useEffect)((()=>{document.querySelectorAll("#jb-job-preview, #jb-job-draft, #jb_company_logo_plupload").forEach((e=>{e.setAttribute("disabled","disabled")}))}),[]);const e=(0,n.useBlockProps)();return(0,c.jsx)("div",{...e,children:(0,c.jsx)(r(),{block:"jb-block/jb-job-post"})})},save:()=>null}),jQuery(window).on("load",(function(){new MutationObserver((e=>{e.forEach((e=>{jQuery(e.addedNodes).find(".jb-job-submission-form-wrapper").each((function(){const e=document.querySelector(".jb-job-submission-form-wrapper");e&&e.addEventListener("click",(o=>{o.target!==e&&(o.preventDefault(),o.stopPropagation())}))}))}))})).observe(document,{attributes:!1,childList:!0,characterData:!1,subtree:!0})}))})(); -
jobboardwp/trunk/includes/blocks/jb-job/block.json
r2916991 r3186671 6 6 "icon": "text", 7 7 "category": "jb-blocks", 8 "attributes": { 9 "job_id": { 10 "type": "integer" 11 } 12 }, 13 "editorScript": "file:./build/index.js", 8 "editorScript": "file:./src/index.js", 14 9 "textdomain": "jobboardwp" 15 10 } -
jobboardwp/trunk/includes/blocks/jb-job/src/index.js
r2916991 r3186671 1 import { useSelect } from '@wordpress/data'; 2 import { PanelBody, SelectControl, Spinner } from '@wordpress/components'; 3 import { InspectorControls, useBlockProps } from '@wordpress/block-editor'; 4 import ServerSideRender from '@wordpress/server-side-render'; 5 import { registerBlockType } from "@wordpress/blocks"; 6 7 registerBlockType('jb-block/jb-job', { 8 edit: function (props) { 9 let { job_id, setAttributes } = props.attributes; 10 const blockProps = useBlockProps(); 11 const posts = useSelect((select) => { 12 return select('core').getEntityRecords('postType', 'jb-job', { 13 per_page: -1, 14 _fields: ['id', 'title'] 15 }); 16 }); 17 18 if (!posts) { 19 return ( 20 <p> 21 <Spinner /> 22 {wp.i18n.__('Loading...', 'jobboardwp')} 23 </p> 24 ); 25 } 26 27 if (posts.length === 0) { 28 return 'No posts found.'; 29 } 30 31 let posts_data = [{ id: '', title: '' }].concat(posts); 32 33 let get_post = posts_data.map((post) => { 34 return { 35 label: post.title.rendered, 36 value: post.id 37 }; 38 }); 39 40 function jbShortcode(value) { 41 let shortcode = ''; 42 if (value !== undefined && value !== '') { 43 shortcode = '[jb_job id="' + value + '"]'; 44 } else { 45 shortcode = '[jb_job]'; 46 } 47 return shortcode; 48 } 49 50 return ( 51 <div {...blockProps}> 52 <ServerSideRender block="jb-block/jb-job" attributes={props.attributes} /> 53 <InspectorControls> 54 <PanelBody title={wp.i18n.__('Job', 'jobboardwp')}> 55 <SelectControl 56 label={wp.i18n.__('Job', 'jobboardwp')} 57 className="jb_select_job" 58 value={job_id} 59 options={get_post} 60 style={{ height: '35px', lineHeight: '20px', padding: '0 7px' }} 61 onChange={(value) => { 62 props.setAttributes({ job_id: value }); 63 jbShortcode(value); 64 }} 65 /> 66 </PanelBody> 67 </InspectorControls> 68 </div> 69 ); 70 }, // end edit 71 72 save: function save(props) { 73 return null; 74 } 75 76 }); 1 (()=>{"use strict";var e={n:o=>{var t=o&&o.__esModule?()=>o.default:()=>o;return e.d(t,{a:t}),t},d:(o,t)=>{for(var n in t)e.o(t,n)&&!e.o(o,n)&&Object.defineProperty(o,n,{enumerable:!0,get:t[n]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};const o=window.wp.data,t=window.wp.components,n=window.wp.blockEditor,r=window.wp.serverSideRender;var i=e.n(r);const s=window.wp.blocks,a=window.ReactJSXRuntime;(0,s.registerBlockType)("jb-block/jb-job",{edit:function(e){const{attributes:r,setAttributes:s}=e,{job_id:d}=r,c=(0,n.useBlockProps)(),l=(0,o.useSelect)((e=>e("core").getEntityRecords("postType","jb-job",{per_page:-1,_fields:["id","title"]})),[]);if(!l)return(0,a.jsxs)("p",{children:[(0,a.jsx)(t.Spinner,{}),wp.i18n.__("Loading...","jobboardwp")]});if(0===l.length)return(0,a.jsx)("p",{children:wp.i18n.__("Jobs not found","jobboardwp")});const b=[{label:"",value:""}].concat(l.map((e=>({label:e.title.rendered,value:e.id}))));return(0,a.jsxs)("div",{...c,children:[(0,a.jsx)(i(),{block:"jb-block/jb-job",attributes:r}),(0,a.jsx)(n.InspectorControls,{children:(0,a.jsx)(t.PanelBody,{title:wp.i18n.__("Job","jobboardwp"),children:(0,a.jsx)(t.SelectControl,{label:wp.i18n.__("Job","jobboardwp"),className:"jb_select_job",value:d,options:b,onChange:e=>s({job_id:e})})})})]})},save:()=>null}),jQuery(window).on("load",(function(e){new MutationObserver((function(e){e.forEach((function(e){jQuery(e.addedNodes).find(".jb-single-job-wrapper").each((function(){const e=document.querySelector(".jb-single-job-wrapper");e&&e.addEventListener("click",(o=>{o.target!==e&&(o.preventDefault(),o.stopPropagation())}))}))}))})).observe(document,{attributes:!1,childList:!0,characterData:!1,subtree:!0})}))})(); -
jobboardwp/trunk/includes/blocks/jb-jobs-categories-list/block.json
r2916991 r3186671 6 6 "category": "jb-blocks", 7 7 "icon": "editor-ul", 8 "editorScript": "file:./ build/index.js",8 "editorScript": "file:./src/index.js", 9 9 "textdomain": "jobboardwp" 10 10 } -
jobboardwp/trunk/includes/blocks/jb-jobs-categories-list/src/index.js
r2916991 r3186671 1 jQuery(window).on( 'load', function($) { 2 var observer = new MutationObserver(function(mutations) { 3 mutations.forEach(function(mutation) { 4 5 jQuery(mutation.addedNodes).find('.jb-job-categories').each(function() { 6 wp.JB.job_categories_list.objects.wrapper = jQuery('.jb-job-categories'); 7 if ( wp.JB.job_categories_list.objects.wrapper.length ) { 8 wp.JB.job_categories_list.ajax(); 9 } 10 }); 11 12 jQuery(mutation.addedNodes).find('.jb').each(function() { 13 jb_responsive(); 14 }); 15 }); 16 }); 17 18 observer.observe(document, {attributes: false, childList: true, characterData: false, subtree:true}); 19 }); 20 21 import { registerBlockType } from '@wordpress/blocks'; 22 import ServerSideRender from '@wordpress/server-side-render'; 23 import { useBlockProps } from '@wordpress/block-editor'; 24 25 registerBlockType('jb-block/jb-jobs-categories-list', { 26 edit: function(props) { 27 const blockProps = useBlockProps(); 28 29 return ( 30 <div {...blockProps}> 31 <ServerSideRender block="jb-block/jb-jobs-categories-list" /> 32 </div> 33 ); 34 }, 35 save: function() { 36 return null; 37 } 38 }); 1 (()=>{"use strict";var e={n:t=>{var o=t&&t.__esModule?()=>t.default:()=>t;return e.d(o,{a:o}),o},d:(t,o)=>{for(var r in o)e.o(o,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:o[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.blocks,o=window.wp.serverSideRender;var r=e.n(o);const n=window.wp.blockEditor,c=window.ReactJSXRuntime;jQuery(window).on("load",(function(e){new MutationObserver((function(e){e.forEach((function(e){jQuery(e.addedNodes).find(".jb-job-categories").each((function(){wp.JB.job_categories_list.objects.wrapper=jQuery(".jb-job-categories"),wp.JB.job_categories_list.objects.wrapper.length&&wp.JB.job_categories_list.ajax();const e=document.querySelector(".jb-job-categories");e&&e.addEventListener("click",(t=>{t.target!==e&&(t.preventDefault(),t.stopPropagation())}))})),jQuery(e.addedNodes).find(".jb").each((function(){jb_responsive();const e=document.querySelector(".jb-job-categories");e&&e.addEventListener("click",(t=>{t.target!==e&&(t.preventDefault(),t.stopPropagation())}))}))}))})).observe(document,{attributes:!1,childList:!0,characterData:!1,subtree:!0})})),(0,t.registerBlockType)("jb-block/jb-jobs-categories-list",{edit:function(e){const t=(0,n.useBlockProps)();return(0,c.jsx)("div",{...t,children:(0,c.jsx)(r(),{block:"jb-block/jb-jobs-categories-list"})})},save:function(){return null}})})(); -
jobboardwp/trunk/includes/blocks/jb-jobs-dashboard/block.json
r2916991 r3186671 6 6 "category": "jb-blocks", 7 7 "icon": "dashboard", 8 "editorScript": "file:./ build/index.js",8 "editorScript": "file:./src/index.js", 9 9 "textdomain": "jobboardwp" 10 10 } -
jobboardwp/trunk/includes/blocks/jb-jobs-dashboard/src/index.js
r2916991 r3186671 1 jQuery(window).on( 'load', function($) { 2 var observer = new MutationObserver(function(mutations) { 3 mutations.forEach(function(mutation) { 4 5 jQuery(mutation.addedNodes).find('.jb-job-dashboard').each(function() { 6 wp.JB.jobs_dashboard.objects.wrapper = jQuery('.jb-job-dashboard'); 7 if ( wp.JB.jobs_dashboard.objects.wrapper.length ) { 8 wp.JB.jobs_dashboard.ajax(); 9 } 10 }); 11 12 jQuery(mutation.addedNodes).find('.jb').each(function() { 13 jb_responsive(); 14 }); 15 }); 16 }); 17 18 observer.observe(document, {attributes: false, childList: true, characterData: false, subtree:true}); 19 }); 20 21 import { registerBlockType } from '@wordpress/blocks'; 22 import ServerSideRender from '@wordpress/server-side-render'; 23 import { useBlockProps } from '@wordpress/block-editor'; 24 25 registerBlockType('jb-block/jb-jobs-dashboard', { 26 edit: function (props) { 27 const blockProps = useBlockProps(); 28 29 return ( 30 <div {...blockProps}> 31 <ServerSideRender block="jb-block/jb-jobs-dashboard" /> 32 </div> 33 ); 34 }, 35 36 save: function () { 37 return null; 38 } 39 }); 1 (()=>{"use strict";var e={n:o=>{var r=o&&o.__esModule?()=>o.default:()=>o;return e.d(r,{a:r}),r},d:(o,r)=>{for(var t in r)e.o(r,t)&&!e.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:r[t]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};const o=window.wp.blocks,r=window.wp.serverSideRender;var t=e.n(r);const a=window.wp.blockEditor,n=window.ReactJSXRuntime;jQuery(window).on("load",(function(e){new MutationObserver((function(e){e.forEach((function(e){jQuery(e.addedNodes).find(".jb-job-dashboard").each((function(){wp.JB.jobs_dashboard.objects.wrapper=jQuery(".jb-job-dashboard"),wp.JB.jobs_dashboard.objects.wrapper.length&&wp.JB.jobs_dashboard.ajax();const e=document.querySelector(".jb-job-dashboard");e&&e.addEventListener("click",(o=>{o.target!==e&&(o.preventDefault(),o.stopPropagation())}))})),jQuery(e.addedNodes).find(".jb").each((function(){jb_responsive();const e=document.querySelector(".jb-job-dashboard");e&&e.addEventListener("click",(o=>{o.target!==e&&(o.preventDefault(),o.stopPropagation())}))}))}))})).observe(document,{attributes:!1,childList:!0,characterData:!1,subtree:!0})})),(0,o.registerBlockType)("jb-block/jb-jobs-dashboard",{edit:function(e){const o=(0,a.useBlockProps)();return(0,n.jsx)("div",{...o,children:(0,n.jsx)(t(),{block:"jb-block/jb-jobs-dashboard"})})},save:function(){return null}})})(); -
jobboardwp/trunk/includes/blocks/jb-jobs-list/block.json
r2916991 r3186671 6 6 "icon": "editor-ul", 7 7 "category": "jb-blocks", 8 "attributes": { 9 "user_id": { 10 "type": "string" 11 }, 12 "per_page": { 13 "type": "string" 14 }, 15 "no_logo": { 16 "type": "boolean" 17 }, 18 "hide_filled": { 19 "type": "boolean" 20 }, 21 "hide_expired": { 22 "type": "boolean" 23 }, 24 "hide_search": { 25 "type": "boolean" 26 }, 27 "hide_location_search": { 28 "type": "boolean" 29 }, 30 "hide_filters": { 31 "type": "boolean" 32 }, 33 "hide_job_types": { 34 "type": "boolean" 35 }, 36 "no_jobs_text": { 37 "type": "string" 38 }, 39 "no_job_search_text": { 40 "type": "string" 41 }, 42 "load_more_text": { 43 "type": "string" 44 }, 45 "category": { 46 "type": "string" 47 }, 48 "type": { 49 "type": "string" 50 }, 51 "orderby": { 52 "type": "string", 53 "default": "date" 54 }, 55 "order": { 56 "type": "string", 57 "default": "DESC" 58 }, 59 "filled_only": { 60 "type": "boolean", 61 "default": false 62 } 63 }, 64 "editorScript": "file:./build/index.js", 8 "editorScript": "file:./src/index.js", 65 9 "textdomain": "jobboardwp" 66 10 } -
jobboardwp/trunk/includes/blocks/jb-jobs-list/src/index.js
r2916991 r3186671 1 import { useSelect } from '@wordpress/data'; 2 import { PanelBody, SelectControl, TextControl, ToggleControl, Spinner } from '@wordpress/components'; 3 import { InspectorControls, useBlockProps } from '@wordpress/block-editor'; 4 import ServerSideRender from '@wordpress/server-side-render'; 5 import { registerBlockType } from '@wordpress/blocks'; 6 7 registerBlockType('jb-block/jb-jobs-list', { 8 edit: (function (props) { 9 const blockProps = useBlockProps(); 10 const users = useSelect((select) => { 11 return select('core').getEntityRecords('root', 'user', { 12 per_page: -1, 13 _fields: ['id', 'name'] 14 }); 15 }); 16 const types = useSelect((select) => { 17 return select('core').getEntityRecords('taxonomy', 'jb-job-type', { 18 per_page: -1, 19 _fields: ['id', 'name'] 20 }); 21 }); 22 const categories = useSelect((select) => { 23 return select('core').getEntityRecords('taxonomy', 'jb-job-category', { 24 per_page: -1, 25 _fields: ['id', 'name'] 26 }); 27 }); 28 let user_id = props.attributes.user_id, 29 users_data = [{id: '', name: ''}], 30 per_page = props.attributes.per_page, 31 no_logo = props.attributes.no_logo, 32 hide_filled = props.attributes.hide_filled, 33 hide_expired = props.attributes.hide_expired, 34 hide_search = props.attributes.hide_search, 35 hide_location_search = props.attributes.hide_location_search, 36 hide_filters = props.attributes.hide_filters, 37 hide_job_types = props.attributes.hide_job_types, 38 no_jobs_text = props.attributes.no_jobs_text, 39 no_job_search_text = props.attributes.no_job_search_text, 40 load_more_text = props.attributes.load_more_text, 41 orderby = props.attributes.orderby, 42 order = props.attributes.order, 43 orderby_opt = [ 44 {label: wp.i18n.__('Date', 'jobboardwp'), value: 'date'}, 45 {label: wp.i18n.__('Title', 'jobboardwp'), value: 'title'} 46 ], 47 order_opt = [ 48 {label: wp.i18n.__('Ascending', 'jobboardwp'), value: 'ASC'}, 49 {label: wp.i18n.__('Descending', 'jobboardwp'), value: 'DESC'} 50 ], 51 type = props.attributes.type, 52 types_data = [], 53 // categories = props.categories, 54 category = props.attributes.category, 55 categories_data = [], 56 filled_only = props.attributes.filled_only, 57 category_hide = '-hide', 58 type_hide = '-hide'; 59 60 if ('' === category) { 61 category = []; 62 } 63 if ('' === type) { 64 type = []; 65 } 66 67 if (users !== null) { 68 users_data = users_data.concat(users); 69 } 70 71 if (types !== null) { 72 types_data = types_data.concat(types); 73 if (types.length !== 0) { 74 type_hide = ''; 75 } 76 } 77 78 if (categories !== null) { 79 categories_data = categories_data.concat(categories); 80 if (categories.length !== 0) { 81 category_hide = ''; 82 } 83 } 84 85 function get_option(data, type) { 86 87 let option = []; 88 89 if (type === 'user') { 90 data.map(function (user) { 91 option.push( 92 { 93 label: user.name, 94 value: user.id 95 } 96 ); 97 }); 98 } else if (type === 'type') { 99 data.map(function (type) { 100 option.push( 101 { 102 label: type.name, 103 value: type.id 104 } 105 ); 106 }); 107 } else if (type === 'category') { 108 data.map(function (category) { 109 option.push( 110 { 111 label: category.name, 112 value: category.id 113 } 114 ); 115 }); 116 } 117 118 return option; 119 } 120 121 function jbShortcode(user_id, per_page, no_logo, hide_filled, hide_expired, hide_search, hide_location_search, hide_filters, hide_job_types, no_jobs_text, no_job_search_text, load_more_text, category, type, orderby, order, filled_only) { 122 let shortcode = '[jb_jobs'; 123 124 if (user_id !== undefined && user_id !== '') { 125 shortcode = shortcode + ' employer-id="' + user_id + '"'; 126 } 127 128 if (per_page !== undefined && per_page !== '') { 129 shortcode = shortcode + ' per-page="' + per_page + '"'; 130 } 131 132 if (no_logo === true) { 133 shortcode = shortcode + ' no-logo="' + 1 + '"'; 134 } else { 135 shortcode = shortcode + ' no-logo="' + 0 + '"'; 136 } 137 138 if (hide_filled === true) { 139 shortcode = shortcode + ' hide-filled="' + 1 + '"'; 140 } else { 141 shortcode = shortcode + ' hide-filled="' + 0 + '"'; 142 } 143 144 if (hide_expired === true) { 145 shortcode = shortcode + ' hide-expired="' + 1 + '"'; 146 } else { 147 shortcode = shortcode + ' hide-expired="' + 0 + '"'; 148 } 149 150 if (hide_search === true) { 151 shortcode = shortcode + ' hide-search="' + 1 + '"'; 152 } else { 153 shortcode = shortcode + ' hide-search="' + 0 + '"'; 154 } 155 156 if (hide_location_search === true) { 157 shortcode = shortcode + ' hide-location-search="' + 1 + '"'; 158 } else { 159 shortcode = shortcode + ' hide-location-search="' + 0 + '"'; 160 } 161 162 if (hide_filters === true) { 163 shortcode = shortcode + ' hide-filters="' + 1 + '"'; 164 } else { 165 shortcode = shortcode + ' hide-filters="' + 0 + '"'; 166 } 167 168 if (hide_job_types === true) { 169 shortcode = shortcode + ' hide-job-types="' + 1 + '"'; 170 } else { 171 shortcode = shortcode + ' hide-job-types="' + 0 + '"'; 172 } 173 174 if (no_jobs_text !== undefined && no_jobs_text !== '') { 175 shortcode = shortcode + ' no-jobs-text="' + no_jobs_text + '"'; 176 } 177 178 if (no_job_search_text !== undefined && no_job_search_text !== '') { 179 shortcode = shortcode + ' no-jobs-search-text="' + no_job_search_text + '"'; 180 } 181 182 if (load_more_text !== undefined && load_more_text !== '') { 183 shortcode = shortcode + ' load-more-text="' + load_more_text + '"'; 184 } 185 186 if (type !== undefined && type !== '') { 187 shortcode = shortcode + ' type="' + type + '"'; 188 } 189 190 if (category !== undefined && category !== '') { 191 shortcode = shortcode + ' category="' + category + '"'; 192 } 193 194 if (orderby !== undefined) { 195 shortcode = shortcode + ' orderby="' + orderby + '"'; 196 } 197 198 if (order !== undefined) { 199 shortcode = shortcode + ' order="' + order + '"'; 200 } 201 202 if (filled_only === true) { 203 shortcode = shortcode + ' filled-only="' + 1 + '"'; 204 } else { 205 shortcode = shortcode + ' filled-only="' + 0 + '"'; 206 } 207 208 shortcode = shortcode + ']'; 209 return shortcode; 210 } 211 212 if (!users_data || !types_data || !categories_data) { 213 return ( 214 <p> 215 <Spinner /> 216 {wp.i18n.__('Loading...', 'jobboardwp')} 217 </p> 218 ); 219 } 220 221 if (0 === users_data.length || 0 === types_data.length || 0 === categories_data.length) { 222 return 'No data.'; 223 } 224 225 let get_category = get_option(categories_data, 'category'); 226 let get_users = get_option(users_data, 'user'); 227 let get_types = get_option(types_data, 'type'); 228 229 return ( 230 <div {...blockProps}> 231 <ServerSideRender block="jb-block/jb-jobs-list" attributes={props.attributes} /> 232 <InspectorControls> 233 <PanelBody title={wp.i18n.__('Jobs list', 'jobboardwp')}> 234 <SelectControl 235 label={wp.i18n.__('Select employer', 'jobboardwp')} 236 className="jb_select_employer" 237 value={props.attributes.user_id} 238 options={get_users} 239 style={{height: '35px', lineHeight: '20px', padding: '0 7px'}} 240 onChange={(value) => { 241 props.setAttributes({user_id: value}); 242 jbShortcode(value, per_page, no_logo, hide_filled, hide_expired, hide_search, hide_location_search, hide_filters, hide_job_types, no_jobs_text, no_job_search_text, load_more_text, category, type, orderby, order, filled_only); 243 }} 244 /> 245 <TextControl 246 label={wp.i18n.__('Per page', 'jobboardwp')} 247 className="jb_per_page" 248 type="number" 249 min={ 1 } 250 value={props.attributes.per_page} 251 onChange={(value) => { 252 if (value === '') { 253 value = 1; 254 } 255 props.setAttributes({per_page: value}); 256 jbShortcode(user_id, value, no_logo, hide_filled, hide_expired, hide_search, hide_location_search, hide_filters, hide_job_types, no_jobs_text, no_job_search_text, load_more_text, category, type, orderby, order, filled_only); 257 }} 258 /> 259 <ToggleControl 260 label={wp.i18n.__('Hide logo', 'jobboardwp')} 261 className="jb_no_logo" 262 checked={props.attributes.no_logo} 263 onChange={(value) => { 264 props.setAttributes({no_logo: value}); 265 jbShortcode(user_id, per_page, value, hide_filled, hide_expired, hide_search, hide_location_search, hide_filters, hide_job_types, no_jobs_text, no_job_search_text, load_more_text, category, type, orderby, order, filled_only); 266 }} 267 /> 268 <ToggleControl 269 label={wp.i18n.__('Hide filled', 'jobboardwp')} 270 className="jb_hide_filled" 271 checked={props.attributes.hide_filled} 272 onChange={(value) => { 273 props.setAttributes({hide_filled: value}); 274 jbShortcode(user_id, per_page, no_logo, value, hide_expired, hide_search, hide_location_search, hide_filters, hide_job_types, no_jobs_text, no_job_search_text, load_more_text, category, type, orderby, order, filled_only); 275 }} 276 /> 277 <ToggleControl 278 label={wp.i18n.__('Hide expired', 'jobboardwp')} 279 className="jb_hide_expired" 280 checked={props.attributes.hide_expired} 281 onChange={(value) => { 282 props.setAttributes({hide_expired: value}); 283 jbShortcode(user_id, per_page, no_logo, hide_filled, value, hide_search, hide_location_search, hide_filters, hide_job_types, no_jobs_text, no_job_search_text, load_more_text, category, type, orderby, order, filled_only); 284 }} 285 /> 286 <ToggleControl 287 label={wp.i18n.__('Hide search', 'jobboardwp')} 288 className="jb_hide_search" 289 checked={props.attributes.hide_search} 290 onChange={(value) => { 291 props.setAttributes({hide_search: value}); 292 jbShortcode(user_id, per_page, no_logo, hide_filled, hide_expired, value, hide_location_search, hide_filters, hide_job_types, no_jobs_text, no_job_search_text, load_more_text, category, type, orderby, order, filled_only); 293 }} 294 /> 295 <ToggleControl 296 label={wp.i18n.__('Hide location search', 'jobboardwp')} 297 className="jb_hide_location_search" 298 checked={props.attributes.hide_location_search} 299 onChange={(value) => { 300 props.setAttributes({hide_location_search: value}); 301 jbShortcode(user_id, per_page, no_logo, hide_filled, hide_expired, hide_search, value, hide_filters, hide_job_types, no_jobs_text, no_job_search_text, load_more_text, category, type, orderby, order, filled_only); 302 }} 303 /> 304 <ToggleControl 305 label={wp.i18n.__('Hide filters', 'jobboardwp')} 306 className="jb_hide_filters" 307 checked={props.attributes.hide_filters} 308 onChange={(value) => { 309 props.setAttributes({hide_filters: value}); 310 jbShortcode(user_id, per_page, no_logo, hide_filled, hide_expired, hide_search, hide_location_search, value, hide_job_types, no_jobs_text, no_job_search_text, load_more_text, category, type, orderby, order, filled_only); 311 }} 312 /> 313 <ToggleControl 314 label={wp.i18n.__('Hide job types', 'jobboardwp')} 315 className="jb_hide_job_types" 316 checked={props.attributes.hide_job_types} 317 onChange={(value) => { 318 props.setAttributes({hide_job_types: value}); 319 jbShortcode(user_id, per_page, no_logo, hide_filled, hide_expired, hide_search, hide_location_search, hide_filters, value, no_jobs_text, no_job_search_text, load_more_text, category, type, orderby, order, filled_only); 320 }} 321 /> 322 <TextControl 323 label={wp.i18n.__('No jobs text', 'jobboardwp')} 324 className="jb_no_jobs_text" 325 type="text" 326 value={props.attributes.no_jobs_text} 327 onChange={(value) => { 328 props.setAttributes({no_jobs_text: value}); 329 jbShortcode(user_id, per_page, no_logo, hide_filled, hide_expired, hide_search, hide_location_search, hide_filters, hide_job_types, value, no_job_search_text, load_more_text, category, type, orderby, order, filled_only); 330 }} 331 /> 332 <TextControl 333 label={wp.i18n.__('No job search text', 'jobboardwp')} 334 className="jb_no_job_search_text" 335 type="text" 336 value={props.attributes.no_job_search_text} 337 onChange={(value) => { 338 props.setAttributes({no_job_search_text: value}); 339 jbShortcode(user_id, per_page, no_logo, hide_filled, hide_expired, hide_search, hide_location_search, hide_filters, hide_job_types, no_jobs_text, value, load_more_text, category, type, orderby, order, filled_only); 340 }} 341 /> 342 <TextControl 343 label={wp.i18n.__('Load more text', 'jobboardwp')} 344 className="jb_load_more_text" 345 type="text" 346 value={props.attributes.load_more_text} 347 onChange={(value) => { 348 props.setAttributes({load_more_text: value}); 349 jbShortcode(user_id, per_page, no_logo, hide_filled, hide_expired, hide_search, hide_location_search, hide_filters, hide_job_types, no_jobs_text, no_job_search_text, value, category, type, orderby, order, filled_only); 350 }} 351 /> 352 <SelectControl 353 label={wp.i18n.__('Select category', 'jobboardwp')} 354 className={'jb_select_category' + category_hide} 355 value={category} 356 options={get_category} 357 multiple={true} 358 suffix=' ' 359 style={{height: '35px', lineHeight: '20px', padding: '0 7px'}} 360 onChange={(value) => { 361 props.setAttributes({category: value}); 362 jbShortcode(user_id, per_page, no_logo, hide_filled, hide_expired, hide_search, hide_location_search, hide_filters, hide_job_types, no_jobs_text, no_job_search_text, load_more_text, value, type, orderby, order, filled_only); 363 }} 364 /> 365 <SelectControl 366 label={wp.i18n.__('Select type', 'jobboardwp')} 367 className="{'jb_select_type' + type_hide}" 368 value={type} 369 options={get_types} 370 multiple={true} 371 suffix=' ' 372 style={{height: '80px', overflow: 'auto'}} 373 onChange={(value) => { 374 props.setAttributes({type: value}); 375 jbShortcode(user_id, per_page, no_logo, hide_filled, hide_expired, hide_search, hide_location_search, hide_filters, hide_job_types, no_jobs_text, no_job_search_text, load_more_text, category, value, orderby, order, filled_only); 376 }} 377 /> 378 <SelectControl 379 label={wp.i18n.__('Select order by', 'jobboardwp')} 380 className='jb_select_orderby' 381 value={props.attributes.orderby} 382 options={orderby_opt} 383 style={{height: '35px', lineHeight: '20px', padding: '0 7px'}} 384 onChange={(value) => { 385 props.setAttributes({orderby: value}); 386 jbShortcode(user_id, per_page, no_logo, hide_filled, hide_expired, hide_search, hide_location_search, hide_filters, hide_job_types, no_jobs_text, no_job_search_text, load_more_text, category, type, value, order, filled_only); 387 }} 388 /> 389 <SelectControl 390 label={wp.i18n.__('Select order', 'jobboardwp')} 391 className='jb_select_order' 392 value={props.attributes.order} 393 options={order_opt} 394 style={{height: '35px', lineHeight: '20px', padding: '0 7px'}} 395 onChange={(value) => { 396 props.setAttributes({order: value}); 397 jbShortcode(user_id, per_page, no_logo, hide_filled, hide_expired, hide_search, hide_location_search, hide_filters, hide_job_types, no_jobs_text, no_job_search_text, load_more_text, category, type, orderby, value, filled_only); 398 }} 399 /> 400 <ToggleControl 401 label={wp.i18n.__('Filled only', 'jobboardwp')} 402 className="jb_filled_only" 403 checked={props.attributes.filled_only} 404 onChange={(value) => { 405 props.setAttributes({filled_only: value}); 406 jbShortcode(user_id, per_page, no_logo, hide_filled, hide_expired, hide_search, hide_location_search, hide_filters, hide_job_types, no_jobs_text, no_job_search_text, load_more_text, category, type, orderby, order, value); 407 }} 408 /> 409 </PanelBody> 410 </InspectorControls> 411 </div> 412 ); 413 } // end withSelect 414 ), // end edit 415 416 save: function save(props) { 417 return null; 418 } 419 }); 420 421 jQuery(window).on( 'load', function($) { 422 let observer = new MutationObserver(function(mutations) { 423 mutations.forEach(function(mutation) { 424 425 jQuery(mutation.addedNodes).find('.jb-jobs').each(function() { 426 wp.JB.jobs_list.objects.wrapper = jQuery('.jb-jobs'); 427 if ( wp.JB.jobs_list.objects.wrapper.length ) { 428 wp.JB.jobs_list.objects.wrapper.each( function () { 429 wp.JB.jobs_list.ajax( jQuery(this) ); 430 }); 431 } 432 }); 433 434 jQuery(mutation.addedNodes).find('.jb').each(function() { 435 jb_responsive(); 436 }); 437 }); 438 }); 439 440 observer.observe(document, {attributes: false, childList: true, characterData: false, subtree:true}); 441 }); 1 (()=>{"use strict";var e={n:o=>{var l=o&&o.__esModule?()=>o.default:()=>o;return e.d(l,{a:l}),l},d:(o,l)=>{for(var t in l)e.o(l,t)&&!e.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:l[t]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};const o=window.wp.data,l=window.wp.components,t=window.wp.blockEditor,a=window.wp.serverSideRender;var n=e.n(a);const r=window.wp.blocks,i=window.wp.element,b=window.ReactJSXRuntime;(0,r.registerBlockType)("jb-block/jb-jobs-list",{edit:e=>{const a=(0,t.useBlockProps)(),{attributes:r,setAttributes:d}=e,{user_id:s,per_page:p,no_logo:c,hide_filled:_,hide_expired:j,hide_search:w,hide_location_search:u,hide_filters:g,hide_job_types:h,no_jobs_text:x="",no_job_search_text:y="",load_more_text:C="",orderby:v,order:m,type:f,category:S,filled_only:k}=r,T=(0,o.useSelect)((e=>e("core").getEntityRecords("root","user",{per_page:-1,_fields:["id","name","username"]})),[]),E=(0,o.useSelect)((e=>e("core").getEntityRecords("taxonomy","jb-job-type",{per_page:-1,_fields:["id","name"]})),[]),B=(0,o.useSelect)((e=>e("core").getEntityRecords("taxonomy","jb-job-category",{per_page:-1,_fields:["id","name"]})),[]),H=(0,i.useMemo)((()=>({users:[{label:"",value:""}].concat(T?T.map((({id:e,name:o})=>({label:o,value:e}))):[]),types:E?E.map((({id:e,name:o})=>({label:o,value:e}))):[],categories:B?B.map((({id:e,name:o})=>({label:o,value:e}))):[]})),[T,E,B]),P=(0,i.useCallback)(((e,o)=>{d({[e]:o})}),[d]);return T&&E&&B?(0,b.jsxs)("div",{...a,children:[(0,b.jsx)(n(),{block:"jb-block/jb-jobs-list",attributes:r}),(0,b.jsx)(t.InspectorControls,{children:(0,b.jsxs)(l.PanelBody,{title:wp.i18n.__("Jobs list","jobboardwp"),children:[(0,b.jsx)(l.SelectControl,{label:wp.i18n.__("Select employer","jobboardwp"),value:s,options:[{label:wp.i18n.__("Select a User","jobboardwp"),value:""},...T?T.map((e=>({label:e.name||e.username,value:e.id}))):[]],onChange:e=>P("user_id",e)}),(0,b.jsx)(l.TextControl,{label:wp.i18n.__("Per page","jobboardwp"),type:"number",min:1,value:p,onChange:e=>P("per_page",e||1)}),(0,b.jsx)(l.ToggleControl,{label:wp.i18n.__("Hide logo","jobboardwp"),checked:c,onChange:e=>P("no_logo",e)}),(0,b.jsx)(l.ToggleControl,{label:wp.i18n.__("Hide filled","jobboardwp"),checked:_,onChange:e=>P("hide_filled",e)}),(0,b.jsx)(l.ToggleControl,{label:wp.i18n.__("Hide expired","jobboardwp"),checked:j,onChange:e=>P("hide_expired",e)}),(0,b.jsx)(l.ToggleControl,{label:wp.i18n.__("Hide search","jobboardwp"),checked:w,onChange:e=>P("hide_search",e)}),(0,b.jsx)(l.ToggleControl,{label:wp.i18n.__("Hide location search","jobboardwp"),checked:u,onChange:e=>P("hide_location_search",e)}),(0,b.jsx)(l.ToggleControl,{label:wp.i18n.__("Hide filters","jobboardwp"),checked:g,onChange:e=>P("hide_filters",e)}),(0,b.jsx)(l.ToggleControl,{label:wp.i18n.__("Hide job types","jobboardwp"),checked:h,onChange:e=>P("hide_job_types",e)}),(0,b.jsx)(l.TextControl,{label:wp.i18n.__("No jobs text","jobboardwp"),value:x,onChange:e=>P("no_jobs_text",e)}),(0,b.jsx)(l.TextControl,{label:wp.i18n.__("No job search text","jobboardwp"),value:y,onChange:e=>P("no_job_search_text",e)}),(0,b.jsx)(l.TextControl,{label:wp.i18n.__("Load more text","jobboardwp"),value:C,onChange:e=>P("load_more_text",e)}),(0,b.jsx)(l.SelectControl,{label:wp.i18n.__("Select category","jobboardwp"),value:S,options:H.categories,multiple:!0,onChange:e=>P("category",e)}),(0,b.jsx)(l.SelectControl,{label:wp.i18n.__("Select type","jobboardwp"),value:f,options:H.types,multiple:!0,onChange:e=>P("type",e)}),(0,b.jsx)(l.SelectControl,{label:wp.i18n.__("Select order by","jobboardwp"),value:v,options:[{label:wp.i18n.__("Date","jobboardwp"),value:"date"},{label:wp.i18n.__("Title","jobboardwp"),value:"title"}],onChange:e=>P("orderby",e)}),(0,b.jsx)(l.SelectControl,{label:wp.i18n.__("Select order","jobboardwp"),value:m,options:[{label:wp.i18n.__("Ascending","jobboardwp"),value:"ASC"},{label:wp.i18n.__("Descending","jobboardwp"),value:"DESC"}],onChange:e=>P("order",e)}),(0,b.jsx)(l.ToggleControl,{label:wp.i18n.__("Filled only","jobboardwp"),checked:k,onChange:e=>P("filled_only",e)})]})})]}):(0,b.jsxs)("p",{children:[(0,b.jsx)(l.Spinner,{}),wp.i18n.__("Loading...","jobboardwp")]})},save:()=>null}),jQuery(window).on("load",(function(e){new MutationObserver((function(e){e.forEach((function(e){jQuery(e.addedNodes).find(".jb-jobs").each((function(){wp.JB.jobs_list.objects.wrapper=jQuery(".jb-jobs"),wp.JB.jobs_list.objects.wrapper.length&&wp.JB.jobs_list.objects.wrapper.each((function(){wp.JB.jobs_list.ajax(jQuery(this))}));const e=document.querySelector(".jb-jobs");e&&e.addEventListener("click",(o=>{o.target!==e&&(o.preventDefault(),o.stopPropagation())}))})),jQuery(e.addedNodes).find(".jb").each((function(){jb_responsive();const e=document.querySelector(".jb-jobs");e&&e.addEventListener("click",(o=>{o.target!==e&&(o.preventDefault(),o.stopPropagation())}))}))}))})).observe(document,{attributes:!1,childList:!0,characterData:!1,subtree:!0})}))})(); -
jobboardwp/trunk/includes/blocks/jb-recent-jobs/block.json
r2916991 r3186671 6 6 "icon": "editor-ul", 7 7 "category": "jb-blocks", 8 "attributes": { 9 "number": { 10 "type": "string", 11 "default": 5 12 }, 13 "no_logo": { 14 "type": "boolean" 15 }, 16 "hide_filled": { 17 "type": "boolean" 18 }, 19 "no_job_types": { 20 "type": "boolean" 21 }, 22 "category": { 23 "type": "string" 24 }, 25 "type": { 26 "type": "string" 27 }, 28 "orderby": { 29 "type": "string", 30 "default": "date" 31 }, 32 "remote_only": { 33 "type": "boolean", 34 "default": false 35 } 36 }, 37 "editorScript": "file:./build/index.js", 8 "editorScript": "file:./src/index.js", 38 9 "textdomain": "jobboardwp" 39 10 } -
jobboardwp/trunk/includes/blocks/jb-recent-jobs/src/index.js
r2916991 r3186671 1 import { useSelect } from '@wordpress/data'; 2 import { PanelBody, SelectControl, TextControl, ToggleControl, Spinner } from '@wordpress/components'; 3 import { InspectorControls, useBlockProps } from '@wordpress/block-editor'; 4 import ServerSideRender from '@wordpress/server-side-render'; 5 import { registerBlockType } from '@wordpress/blocks'; 6 7 registerBlockType('jb-block/jb-recent-jobs', { 8 edit: (function (props) { 9 const blockProps = useBlockProps(); 10 const types = useSelect((select) => { 11 return select('core').getEntityRecords('taxonomy', 'jb-job-type', { 12 per_page: -1, 13 _fields: ['id', 'name'] 14 }); 15 }); 16 const categories = useSelect((select) => { 17 return select('core').getEntityRecords('taxonomy', 'jb-job-category', { 18 per_page: -1, 19 _fields: ['id', 'name'] 20 }); 21 }); 22 let number = props.attributes.number, 23 no_logo = props.attributes.no_logo, 24 no_job_types = props.attributes.no_job_types, 25 hide_filled = props.attributes.hide_filled, 26 orderby = props.attributes.orderby, 27 orderby_opt = [ 28 {label: wp.i18n.__('Posting date', 'jobboardwp'), value: 'date'}, 29 {label: wp.i18n.__('Expiry date', 'jobboardwp'), value: 'expiry_date'} 30 ], 31 type = props.attributes.type, 32 types_data = [], 33 category = props.attributes.category, 34 categories_data = [], 35 remote_only = props.attributes.remote_only, 36 category_hide = '-hide', 37 type_hide = '-hide'; 38 39 if ('' === category) { 40 category = []; 41 } 42 if ('' === type) { 43 type = []; 44 } 45 if (types !== null) { 46 types_data = types_data.concat(types); 47 if (types.length !== 0) { 48 type_hide = ''; 49 } 50 } 51 52 if (categories !== null) { 53 categories_data = categories_data.concat(categories); 54 if (categories.length !== 0) { 55 category_hide = ''; 56 } 57 } 58 59 function get_option(data, type) { 60 61 let option = []; 62 63 if (type === 'type') { 64 data.map(function (type) { 65 option.push( 66 { 67 label: type.name, 68 value: type.id 69 } 70 ); 71 }); 72 } else if (type === 'category') { 73 data.map(function (category) { 74 option.push( 75 { 76 label: category.name, 77 value: category.id 78 } 79 ); 80 }); 81 } 82 83 return option; 84 } 85 86 function jbShortcode(number, category, type, remote_only, orderby, hide_filled, no_logo, no_job_types) { 87 let shortcode = '[jb_recent_jobs'; 88 89 if (number !== undefined && number !== '') { 90 shortcode = shortcode + ' number="' + number + '"'; 91 } else { 92 shortcode = shortcode + ' number="' + 5 + '"'; 93 } 94 95 if (no_logo === true) { 96 shortcode = shortcode + ' no_logo="' + 1 + '"'; 97 } else { 98 shortcode = shortcode + ' no_logo="' + 0 + '"'; 99 } 100 101 if (hide_filled === true) { 102 shortcode = shortcode + ' hide_filled="' + 1 + '"'; 103 } else { 104 shortcode = shortcode + ' hide_filled="' + 0 + '"'; 105 } 106 107 if (no_job_types === true) { 108 shortcode = shortcode + ' no_job_types="' + 1 + '"'; 109 } else { 110 shortcode = shortcode + ' no_job_types="' + 0 + '"'; 111 } 112 113 if (type !== undefined && type !== '') { 114 shortcode = shortcode + ' type="' + type + '"'; 115 } 116 117 if (category !== undefined && category !== '') { 118 shortcode = shortcode + ' category="' + category + '"'; 119 } 120 121 if (orderby !== undefined) { 122 shortcode = shortcode + ' orderby="' + orderby + '"'; 123 } 124 125 if (remote_only === true) { 126 shortcode = shortcode + ' remote_only="' + 1 + '"'; 127 } else { 128 shortcode = shortcode + ' remote_only="' + 0 + '"'; 129 } 130 131 shortcode = shortcode + ']'; 132 return shortcode; 133 } 134 135 if (!types_data || !categories_data) { 136 return ( 137 <p> 138 <Spinner /> 139 {wp.i18n.__('Loading...', 'jobboardwp')} 140 </p> 141 ); 142 } 143 144 if (0 === types_data.length || 0 === categories_data.length) { 145 return 'No data.'; 146 } 147 148 let get_category = get_option(categories_data, 'category'); 149 let get_types = get_option(types_data, 'type'); 150 151 152 return ( 153 <div {...blockProps}> 154 <ServerSideRender block="jb-block/jb-recent-jobs" attributes={props.attributes} /> 155 <InspectorControls> 156 <PanelBody title={wp.i18n.__('Recent jobs', 'jobboardwp')}> 157 <TextControl 158 label={wp.i18n.__('Number', 'jobboardwp')} 159 className="jb_number" 160 type="number" 161 min={ 1 } 162 value={props.attributes.number} 163 onChange={(value) => { 164 if (value === '') { 165 value = 1; 166 } 167 props.setAttributes({number: value}); 168 jbShortcode(value, category, type, remote_only, orderby, hide_filled, no_logo, no_job_types); 169 }} 170 /> 171 <ToggleControl 172 label={wp.i18n.__('Hide logo', 'jobboardwp')} 173 className="jb_no_logo" 174 checked={props.attributes.no_logo} 175 onChange={(value) => { 176 props.setAttributes({no_logo: value}); 177 jbShortcode(number, category, type, remote_only, orderby, hide_filled, value, no_job_types); 178 }} 179 /> 180 <ToggleControl 181 label={wp.i18n.__('Hide filled', 'jobboardwp')} 182 className="jb_hide_filled" 183 checked={props.attributes.hide_filled} 184 onChange={(value) => { 185 props.setAttributes({hide_filled: value}); 186 jbShortcode(number, category, type, remote_only, orderby, value, no_logo, no_job_types); 187 }} 188 /> 189 <ToggleControl 190 label={wp.i18n.__('Hide job types', 'jobboardwp')} 191 className="jb_no_job_types" 192 checked={props.attributes.no_job_types} 193 onChange={(value) => { 194 props.setAttributes({no_job_types: value}); 195 jbShortcode(number, category, type, remote_only, orderby, hide_filled, no_logo, value); 196 }} 197 /> 198 <SelectControl 199 label={wp.i18n.__('Select category', 'jobboardwp')} 200 className="{'jb_select_category' + category_hide}" 201 value={category} 202 options={get_category} 203 multiple={true} 204 suffix=' ' 205 style={{height: '80px', overflow: 'auto'}} 206 onChange={(value) => { 207 props.setAttributes({category: value}); 208 jbShortcode(number, value, type, remote_only, orderby, hide_filled, no_logo, no_job_types); 209 }} 210 /> 211 <SelectControl 212 label={wp.i18n.__('Select type', 'jobboardwp')} 213 className="{'jb_select_type' + type_hide}" 214 value={type} 215 options={get_types} 216 multiple={true} 217 suffix=' ' 218 style={{height: '80px', overflow: 'auto'}} 219 onChange={(value) => { 220 props.setAttributes({type: value}); 221 jbShortcode(number, category, value, remote_only, orderby, hide_filled, no_logo, no_job_types); 222 }} 223 /> 224 <SelectControl 225 label={wp.i18n.__('Select order by', 'jobboardwp')} 226 className='jb_select_orderby' 227 value={props.attributes.orderby} 228 options={orderby_opt} 229 style={{height: '35px', lineHeight: '20px', padding: '0 7px'}} 230 onChange={(value) => { 231 props.setAttributes({orderby: value}); 232 jbShortcode(number, category, type, remote_only, value, hide_filled, no_logo, no_job_types); 233 }} 234 /> 235 <ToggleControl 236 label={wp.i18n.__('Remote only', 'jobboardwp')} 237 className="jb_remote_only" 238 checked={props.attributes.remote_only} 239 onChange={(value) => { 240 props.setAttributes({remote_only: value}); 241 jbShortcode(number, category, type, value, orderby, hide_filled, no_logo, no_job_types); 242 }} 243 /> 244 </PanelBody> 245 </InspectorControls> 246 </div> 247 ); 248 } // end withSelect 249 ), // end edit 250 save: function save(props) { 251 return null; 252 } 253 }); 1 (()=>{"use strict";var e={n:o=>{var t=o&&o.__esModule?()=>o.default:()=>o;return e.d(t,{a:t}),t},d:(o,t)=>{for(var n in t)e.o(t,n)&&!e.o(o,n)&&Object.defineProperty(o,n,{enumerable:!0,get:t[n]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};const o=window.wp.data,t=window.wp.components,n=window.wp.blockEditor,r=window.wp.serverSideRender;var a=e.n(r);const l=window.wp.blocks,i=window.wp.element,b=window.ReactJSXRuntime;(0,l.registerBlockType)("jb-block/jb-recent-jobs",{edit:e=>{const r=(0,n.useBlockProps)(),{attributes:l,setAttributes:d}=e,{number:s,no_logo:c,hide_filled:p,no_job_types:w,orderby:j,type:u,category:y,remote_only:_}=l,g=(0,o.useSelect)((e=>e("core").getEntityRecords("taxonomy","jb-job-type",{per_page:-1,_fields:["id","name"]})),[]),m=(0,o.useSelect)((e=>e("core").getEntityRecords("taxonomy","jb-job-category",{per_page:-1,_fields:["id","name"]})),[]),h=(0,i.useMemo)((()=>({types:g?g.map((({id:e,name:o})=>({label:o,value:e}))):[],categories:m?m.map((({id:e,name:o})=>({label:o,value:e}))):[]})),[g,m]),v=(0,i.useCallback)(((e,o)=>d({[e]:o})),[d]);return g&&m?(0,b.jsxs)("div",{...r,children:[(0,b.jsx)(a(),{block:"jb-block/jb-recent-jobs",attributes:l}),(0,b.jsx)(n.InspectorControls,{children:(0,b.jsxs)(t.PanelBody,{title:wp.i18n.__("Recent jobs","jobboardwp"),children:[(0,b.jsx)(t.TextControl,{label:wp.i18n.__("Number","jobboardwp"),type:"number",min:1,value:s,onChange:e=>v("number",e||1)}),(0,b.jsx)(t.ToggleControl,{label:wp.i18n.__("Hide logo","jobboardwp"),checked:c,onChange:e=>v("no_logo",e)}),(0,b.jsx)(t.ToggleControl,{label:wp.i18n.__("Hide filled","jobboardwp"),checked:p,onChange:e=>v("hide_filled",e)}),(0,b.jsx)(t.ToggleControl,{label:wp.i18n.__("Hide job types","jobboardwp"),checked:w,onChange:e=>v("no_job_types",e)}),(0,b.jsx)(t.SelectControl,{label:wp.i18n.__("Select category","jobboardwp"),value:Array.isArray(y)?y:[],options:h.categories,multiple:!0,onChange:e=>v("category",Array.isArray(e)?e:[e])}),(0,b.jsx)(t.SelectControl,{label:wp.i18n.__("Select type","jobboardwp"),value:Array.isArray(u)?u:[],options:h.types,multiple:!0,onChange:e=>v("type",Array.isArray(e)?e:[e])}),(0,b.jsx)(t.SelectControl,{label:wp.i18n.__("Select order by","jobboardwp"),value:j,options:[{label:wp.i18n.__("Posting date","jobboardwp"),value:"date"},{label:wp.i18n.__("Expiry date","jobboardwp"),value:"expiry_date"}],onChange:e=>v("orderby",e)}),(0,b.jsx)(t.ToggleControl,{label:wp.i18n.__("Remote only","jobboardwp"),checked:_,onChange:e=>v("remote_only",e)})]})})]}):(0,b.jsxs)("p",{children:[(0,b.jsx)(t.Spinner,{}),wp.i18n.__("Loading...","jobboardwp")]})},save:()=>null}),jQuery(window).on("load",(function(e){new MutationObserver((function(e){e.forEach((function(e){jQuery(e.addedNodes).find(".jb-jobs-widget").each((function(){const e=document.querySelector(".jb-jobs-widget");e&&e.addEventListener("click",(o=>{o.target!==e&&(o.preventDefault(),o.stopPropagation())}))}))}))})).observe(document,{attributes:!1,childList:!0,characterData:!1,subtree:!0})}))})(); -
jobboardwp/trunk/includes/common/class-blocks.php
r3169481 r3186671 9 9 10 10 if ( ! class_exists( 'jb\common\Blocks' ) ) { 11 12 11 13 12 /** … … 27 26 28 27 public function block_editor_render() { 28 if ( function_exists( 'wp_register_block_metadata_collection' ) ) { 29 wp_register_block_metadata_collection( JB_PATH . 'includes/blocks', JB_PATH . 'includes/blocks/blocks-manifest.php' ); 30 } 31 29 32 $blocks = array( 30 33 'jb-block/jb-job-post' => array( -
jobboardwp/trunk/jobboardwp.php
r3169481 r3186671 4 4 * Plugin URI: https://jobboardwp.com/ 5 5 * Description: Add a modern job board to your website. Display job listings and allow employers to submit and manage jobs all from the front-end 6 * Version: 1.2. 86 * Version: 1.2.9 7 7 * Author: JobBoardWP 8 8 * Text Domain: jobboardwp -
jobboardwp/trunk/languages/jobboardwp.pot
r3169481 r3186671 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: JobBoardWP 1.2. 8\n"5 "Project-Id-Version: JobBoardWP 1.2.9\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/jobboardwp\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2024-1 0-15T18:36:23+00:00\n"12 "POT-Creation-Date: 2024-11-12T10:09:11+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.11.0\n" … … 672 672 #: includes/common/class-cpt.php:59 673 673 #: includes/common/class-cpt.php:363 674 #: includes/blocks/jb-job/build/index.js:1675 #: includes/blocks/jb-job/src/index.js:54676 #: includes/blocks/jb-job/src/index.js: 56674 #: blocks-src/jb-job/src/index.js:44 675 #: blocks-src/jb-job/src/index.js:46 676 #: includes/blocks/jb-job/src/index.js:1 677 677 msgid "Job" 678 678 msgstr "" … … 855 855 #: includes/admin/class-settings.php:730 856 856 #: includes/admin/class-site-health.php:453 857 #: includes/blocks/jb-jobs-list/build/index.js:1858 #: includes/blocks/jb-jobs-list/src/index.js: 305857 #: blocks-src/jb-jobs-list/src/index.js:91 858 #: includes/blocks/jb-jobs-list/src/index.js:1 859 859 msgid "Hide filters" 860 860 msgstr "" … … 867 867 #: includes/admin/class-site-health.php:457 868 868 #: includes/widgets/class-recent-jobs.php:192 869 #: includes/blocks/jb-jobs-list/build/index.js:1870 #: includes/blocks/jb-jobs-list/src/index.js:314871 #: includes/blocks/jb- recent-jobs/build/index.js:1872 #: includes/blocks/jb-recent-jobs/src/index.js:1 90869 #: blocks-src/jb-jobs-list/src/index.js:96 870 #: blocks-src/jb-recent-jobs/src/index.js:56 871 #: includes/blocks/jb-jobs-list/src/index.js:1 872 #: includes/blocks/jb-recent-jobs/src/index.js:1 873 873 msgid "Hide job types" 874 874 msgstr "" … … 3195 3195 3196 3196 #: includes/frontend/class-shortcodes.php:522 3197 #: includes/blocks/jb-jobs-list/build/index.js:13198 #: includes/blocks/jb-jobs-list/src/index.js: 453197 #: blocks-src/jb-jobs-list/src/index.js:134 3198 #: includes/blocks/jb-jobs-list/src/index.js:1 3199 3199 msgid "Title" 3200 3200 msgstr "" … … 3257 3257 3258 3258 #: includes/widgets/class-recent-jobs.php:169 3259 #: includes/blocks/jb-recent-jobs/build/index.js:13260 #: includes/blocks/jb-recent-jobs/src/index.js: 2363259 #: blocks-src/jb-recent-jobs/src/index.js:84 3260 #: includes/blocks/jb-recent-jobs/src/index.js:1 3261 3261 msgid "Remote only" 3262 3262 msgstr "" 3263 3263 3264 3264 #: includes/widgets/class-recent-jobs.php:174 3265 #: includes/blocks/jb-jobs-list/build/index.js:13266 #: includes/blocks/jb-jobs-list/src/index.js:2693267 #: includes/blocks/jb- recent-jobs/build/index.js:13268 #: includes/blocks/jb-recent-jobs/src/index.js:1 813265 #: blocks-src/jb-jobs-list/src/index.js:71 3266 #: blocks-src/jb-recent-jobs/src/index.js:51 3267 #: includes/blocks/jb-jobs-list/src/index.js:1 3268 #: includes/blocks/jb-recent-jobs/src/index.js:1 3269 3269 msgid "Hide filled" 3270 3270 msgstr "" … … 3275 3275 3276 3276 #: includes/widgets/class-recent-jobs.php:180 3277 #: includes/blocks/jb-recent-jobs/build/index.js:13278 #: includes/blocks/jb-recent-jobs/src/index.js: 293277 #: blocks-src/jb-recent-jobs/src/index.js:79 3278 #: includes/blocks/jb-recent-jobs/src/index.js:1 3279 3279 msgid "Expiry date" 3280 3280 msgstr "" 3281 3281 3282 3282 #: includes/widgets/class-recent-jobs.php:181 3283 #: includes/blocks/jb-recent-jobs/build/index.js:13284 #: includes/blocks/jb-recent-jobs/src/index.js: 283283 #: blocks-src/jb-recent-jobs/src/index.js:78 3284 #: includes/blocks/jb-recent-jobs/src/index.js:1 3285 3285 msgid "Posting date" 3286 3286 msgstr "" … … 3601 3601 msgstr "" 3602 3602 3603 #: includes/blocks/jb-job/build/index.js:13604 #: includes/blocks/jb-job/src/index.js:223605 #: includes/blocks/jb-jobs-list/build/index.js:13606 #: includes/blocks/jb-job s-list/src/index.js:2163607 #: includes/blocks/jb- recent-jobs/build/index.js:13608 #: includes/blocks/jb-recent-jobs/src/index.js:1 393603 #: blocks-src/jb-job/src/index.js:24 3604 #: blocks-src/jb-jobs-list/src/index.js:36 3605 #: blocks-src/jb-recent-jobs/src/index.js:28 3606 #: includes/blocks/jb-job/src/index.js:1 3607 #: includes/blocks/jb-jobs-list/src/index.js:1 3608 #: includes/blocks/jb-recent-jobs/src/index.js:1 3609 3609 msgid "Loading..." 3610 3610 msgstr "" 3611 3611 3612 #: includes/blocks/jb-jobs-list/build/index.js:1 3613 #: includes/blocks/jb-jobs-list/src/index.js:44 3612 #: blocks-src/jb-job/src/index.js:30 3613 #: includes/blocks/jb-job/src/index.js:1 3614 msgid "Jobs not found" 3615 msgstr "" 3616 3617 #: blocks-src/jb-jobs-list/src/index.js:45 3618 #: includes/blocks/jb-jobs-list/src/index.js:1 3619 msgid "Jobs list" 3620 msgstr "" 3621 3622 #: blocks-src/jb-jobs-list/src/index.js:47 3623 #: includes/blocks/jb-jobs-list/src/index.js:1 3624 msgid "Select employer" 3625 msgstr "" 3626 3627 #: blocks-src/jb-jobs-list/src/index.js:50 3628 #: includes/blocks/jb-jobs-list/src/index.js:1 3629 msgid "Select a User" 3630 msgstr "" 3631 3632 #: blocks-src/jb-jobs-list/src/index.js:59 3633 #: includes/blocks/jb-jobs-list/src/index.js:1 3634 msgid "Per page" 3635 msgstr "" 3636 3637 #: blocks-src/jb-jobs-list/src/index.js:66 3638 #: blocks-src/jb-recent-jobs/src/index.js:46 3639 #: includes/blocks/jb-jobs-list/src/index.js:1 3640 #: includes/blocks/jb-recent-jobs/src/index.js:1 3641 msgid "Hide logo" 3642 msgstr "" 3643 3644 #: blocks-src/jb-jobs-list/src/index.js:76 3645 #: includes/blocks/jb-jobs-list/src/index.js:1 3646 msgid "Hide expired" 3647 msgstr "" 3648 3649 #: blocks-src/jb-jobs-list/src/index.js:81 3650 #: includes/blocks/jb-jobs-list/src/index.js:1 3651 msgid "Hide search" 3652 msgstr "" 3653 3654 #: blocks-src/jb-jobs-list/src/index.js:86 3655 #: includes/blocks/jb-jobs-list/src/index.js:1 3656 msgid "Hide location search" 3657 msgstr "" 3658 3659 #: blocks-src/jb-jobs-list/src/index.js:101 3660 #: includes/blocks/jb-jobs-list/src/index.js:1 3661 msgid "No jobs text" 3662 msgstr "" 3663 3664 #: blocks-src/jb-jobs-list/src/index.js:106 3665 #: includes/blocks/jb-jobs-list/src/index.js:1 3666 msgid "No job search text" 3667 msgstr "" 3668 3669 #: blocks-src/jb-jobs-list/src/index.js:111 3670 #: includes/blocks/jb-jobs-list/src/index.js:1 3671 msgid "Load more text" 3672 msgstr "" 3673 3674 #: blocks-src/jb-jobs-list/src/index.js:116 3675 #: blocks-src/jb-recent-jobs/src/index.js:61 3676 #: includes/blocks/jb-jobs-list/src/index.js:1 3677 #: includes/blocks/jb-recent-jobs/src/index.js:1 3678 msgid "Select category" 3679 msgstr "" 3680 3681 #: blocks-src/jb-jobs-list/src/index.js:123 3682 #: blocks-src/jb-recent-jobs/src/index.js:68 3683 #: includes/blocks/jb-jobs-list/src/index.js:1 3684 #: includes/blocks/jb-recent-jobs/src/index.js:1 3685 msgid "Select type" 3686 msgstr "" 3687 3688 #: blocks-src/jb-jobs-list/src/index.js:130 3689 #: blocks-src/jb-recent-jobs/src/index.js:75 3690 #: includes/blocks/jb-jobs-list/src/index.js:1 3691 #: includes/blocks/jb-recent-jobs/src/index.js:1 3692 msgid "Select order by" 3693 msgstr "" 3694 3695 #: blocks-src/jb-jobs-list/src/index.js:133 3696 #: includes/blocks/jb-jobs-list/src/index.js:1 3614 3697 msgid "Date" 3615 3698 msgstr "" 3616 3699 3617 #: includes/blocks/jb-jobs-list/build/index.js:1 3618 #: includes/blocks/jb-jobs-list/src/index.js:48 3700 #: blocks-src/jb-jobs-list/src/index.js:139 3701 #: includes/blocks/jb-jobs-list/src/index.js:1 3702 msgid "Select order" 3703 msgstr "" 3704 3705 #: blocks-src/jb-jobs-list/src/index.js:142 3706 #: includes/blocks/jb-jobs-list/src/index.js:1 3619 3707 msgid "Ascending" 3620 3708 msgstr "" 3621 3709 3622 #: includes/blocks/jb-jobs-list/build/index.js:13623 #: includes/blocks/jb-jobs-list/src/index.js: 493710 #: blocks-src/jb-jobs-list/src/index.js:143 3711 #: includes/blocks/jb-jobs-list/src/index.js:1 3624 3712 msgid "Descending" 3625 3713 msgstr "" 3626 3714 3627 #: includes/blocks/jb-jobs-list/build/index.js:1 3628 #: includes/blocks/jb-jobs-list/src/index.js:233 3629 msgid "Jobs list" 3630 msgstr "" 3631 3632 #: includes/blocks/jb-jobs-list/build/index.js:1 3633 #: includes/blocks/jb-jobs-list/src/index.js:235 3634 msgid "Select employer" 3635 msgstr "" 3636 3637 #: includes/blocks/jb-jobs-list/build/index.js:1 3638 #: includes/blocks/jb-jobs-list/src/index.js:246 3639 msgid "Per page" 3640 msgstr "" 3641 3642 #: includes/blocks/jb-jobs-list/build/index.js:1 3643 #: includes/blocks/jb-jobs-list/src/index.js:260 3644 #: includes/blocks/jb-recent-jobs/build/index.js:1 3645 #: includes/blocks/jb-recent-jobs/src/index.js:172 3646 msgid "Hide logo" 3647 msgstr "" 3648 3649 #: includes/blocks/jb-jobs-list/build/index.js:1 3650 #: includes/blocks/jb-jobs-list/src/index.js:278 3651 msgid "Hide expired" 3652 msgstr "" 3653 3654 #: includes/blocks/jb-jobs-list/build/index.js:1 3655 #: includes/blocks/jb-jobs-list/src/index.js:287 3656 msgid "Hide search" 3657 msgstr "" 3658 3659 #: includes/blocks/jb-jobs-list/build/index.js:1 3660 #: includes/blocks/jb-jobs-list/src/index.js:296 3661 msgid "Hide location search" 3662 msgstr "" 3663 3664 #: includes/blocks/jb-jobs-list/build/index.js:1 3665 #: includes/blocks/jb-jobs-list/src/index.js:323 3666 msgid "No jobs text" 3667 msgstr "" 3668 3669 #: includes/blocks/jb-jobs-list/build/index.js:1 3670 #: includes/blocks/jb-jobs-list/src/index.js:333 3671 msgid "No job search text" 3672 msgstr "" 3673 3674 #: includes/blocks/jb-jobs-list/build/index.js:1 3675 #: includes/blocks/jb-jobs-list/src/index.js:343 3676 msgid "Load more text" 3677 msgstr "" 3678 3679 #: includes/blocks/jb-jobs-list/build/index.js:1 3680 #: includes/blocks/jb-jobs-list/src/index.js:353 3681 #: includes/blocks/jb-recent-jobs/build/index.js:1 3682 #: includes/blocks/jb-recent-jobs/src/index.js:199 3683 msgid "Select category" 3684 msgstr "" 3685 3686 #: includes/blocks/jb-jobs-list/build/index.js:1 3687 #: includes/blocks/jb-jobs-list/src/index.js:366 3688 #: includes/blocks/jb-recent-jobs/build/index.js:1 3689 #: includes/blocks/jb-recent-jobs/src/index.js:212 3690 msgid "Select type" 3691 msgstr "" 3692 3693 #: includes/blocks/jb-jobs-list/build/index.js:1 3694 #: includes/blocks/jb-jobs-list/src/index.js:379 3695 #: includes/blocks/jb-recent-jobs/build/index.js:1 3696 #: includes/blocks/jb-recent-jobs/src/index.js:225 3697 msgid "Select order by" 3698 msgstr "" 3699 3700 #: includes/blocks/jb-jobs-list/build/index.js:1 3701 #: includes/blocks/jb-jobs-list/src/index.js:390 3702 msgid "Select order" 3703 msgstr "" 3704 3705 #: includes/blocks/jb-jobs-list/build/index.js:1 3706 #: includes/blocks/jb-jobs-list/src/index.js:401 3715 #: blocks-src/jb-jobs-list/src/index.js:148 3716 #: includes/blocks/jb-jobs-list/src/index.js:1 3707 3717 msgid "Filled only" 3708 3718 msgstr "" 3709 3719 3710 #: includes/blocks/jb-recent-jobs/build/index.js:13711 #: includes/blocks/jb-recent-jobs/src/index.js:1 563720 #: blocks-src/jb-recent-jobs/src/index.js:37 3721 #: includes/blocks/jb-recent-jobs/src/index.js:1 3712 3722 msgid "Recent jobs" 3713 3723 msgstr "" 3714 3724 3715 #: includes/blocks/jb-recent-jobs/build/index.js:13716 #: includes/blocks/jb-recent-jobs/src/index.js:1 583725 #: blocks-src/jb-recent-jobs/src/index.js:39 3726 #: includes/blocks/jb-recent-jobs/src/index.js:1 3717 3727 msgid "Number" 3718 3728 msgstr "" 3719 3729 3730 #: blocks-src/jb-job-post/block.json 3720 3731 #: includes/blocks/jb-job-post/block.json 3721 3732 msgctxt "block title" … … 3723 3734 msgstr "" 3724 3735 3736 #: blocks-src/jb-job-post/block.json 3725 3737 #: includes/blocks/jb-job-post/block.json 3726 3738 msgctxt "block description" … … 3728 3740 msgstr "" 3729 3741 3742 #: blocks-src/jb-job/block.json 3730 3743 #: includes/blocks/jb-job/block.json 3731 3744 msgctxt "block title" … … 3733 3746 msgstr "" 3734 3747 3748 #: blocks-src/jb-job/block.json 3735 3749 #: includes/blocks/jb-job/block.json 3736 3750 msgctxt "block description" … … 3738 3752 msgstr "" 3739 3753 3754 #: blocks-src/jb-jobs-categories-list/block.json 3740 3755 #: includes/blocks/jb-jobs-categories-list/block.json 3741 3756 msgctxt "block title" … … 3743 3758 msgstr "" 3744 3759 3760 #: blocks-src/jb-jobs-categories-list/block.json 3745 3761 #: includes/blocks/jb-jobs-categories-list/block.json 3746 3762 msgctxt "block description" … … 3748 3764 msgstr "" 3749 3765 3766 #: blocks-src/jb-jobs-dashboard/block.json 3750 3767 #: includes/blocks/jb-jobs-dashboard/block.json 3751 3768 msgctxt "block title" … … 3753 3770 msgstr "" 3754 3771 3772 #: blocks-src/jb-jobs-dashboard/block.json 3755 3773 #: includes/blocks/jb-jobs-dashboard/block.json 3756 3774 msgctxt "block description" … … 3758 3776 msgstr "" 3759 3777 3778 #: blocks-src/jb-jobs-list/block.json 3760 3779 #: includes/blocks/jb-jobs-list/block.json 3761 3780 msgctxt "block title" … … 3763 3782 msgstr "" 3764 3783 3784 #: blocks-src/jb-jobs-list/block.json 3765 3785 #: includes/blocks/jb-jobs-list/block.json 3766 3786 msgctxt "block description" … … 3768 3788 msgstr "" 3769 3789 3790 #: blocks-src/jb-recent-jobs/block.json 3770 3791 #: includes/blocks/jb-recent-jobs/block.json 3771 3792 msgctxt "block title" … … 3773 3794 msgstr "" 3774 3795 3796 #: blocks-src/jb-recent-jobs/block.json 3775 3797 #: includes/blocks/jb-recent-jobs/block.json 3776 3798 msgctxt "block description" -
jobboardwp/trunk/readme.txt
r3169481 r3186671 6 6 Requires PHP: 5.6 7 7 Requires at least: 5.5 8 Tested up to: 6. 69 Stable tag: 1.2. 88 Tested up to: 6.7 9 Stable tag: 1.2.9 10 10 License: GPLv3 11 11 License URI: http://www.gnu.org/licenses/gpl-3.0.txt … … 105 105 106 106 == Changelog == 107 108 = 1.2.9: November 12, 2024 = 109 110 * Added: Supporting new `wp_register_block_metadata_collection()` function for registering WP Blocks 111 112 * Cached and optimized/minified assets(JS/CSS) must be flushed/re-generated after upgrade 107 113 108 114 = 1.2.8: October 16, 2024 =
Note: See TracChangeset
for help on using the changeset viewer.