Changeset 3138242
- Timestamp:
- 08/20/2024 02:35:06 PM (7 months ago)
- Location:
- ocamba-hood
- Files:
-
- 10 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
ocamba-hood/tags/1.0.4/assets/css/admin-app.css
r3137413 r3138242 1 .p1rem{padding:1rem}.m0{margin:0}.p0{padding:0}.df{display:flex}.dif{display:inline-flex}.g1rem{gap:1rem}.tac{text-align:center}.jcsb{justify-content:space-between}.aic{align-items:center}.pRel{position:relative}.t0dot3s{transition:.3s}.w-100{width:100%}.h-100{height:100%}.minH53px{min-height:53px}.o1{opacity:1}@media (min-width: 0px){.mobileHide{display:none}.mobileShow{display:block}}@media (min-width: 783px){.mobileHide{display:block}.mobileShow{display:none}}.ripple{display:inline-block;position:relative;width:80px;height:80px}.ripple div{position:absolute;border:4px solid #195278;opacity:1;border-radius:50%;animation:ripple 1s cubic-bezier(0,.2,.8,1) infinite}.ripple div:nth-child(2){animation-delay:-.5s}@keyframes ripple{0%{top:36px;left:36px;width:0;height:0;opacity:0}4.9%{top:36px;left:36px;width:0;height:0;opacity:0}5%{top:36px;left:36px;width:0;height:0;opacity:1}to{top:0;left:0;width:72px;height:72px;opacity:0}}dialog{background:transparent;border:none;box-shadow:none;backdrop-filter:blur(18px)}dialog::backdrop{backdrop-filter:blur(5px)}.switch{position:relative;display:inline-block;width:60px;height:34px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;inset:0;background-color:#ccc;-webkit-transition:.4s;transition:.4s}.slider:before{position:absolute;content:"";height:26px;width:26px;left:4px;bottom:4px;background-color:#fff;-webkit-transition:.4s;transition:.4s}input:checked+.slider{background-color:#2271b1}input: focus+.slider{box-shadow:0 0 1px #2271b1}input:checked+.slider:before{-webkit-transform:translateX(26px);-ms-transform:translateX(26px);transform:translate(26px)}.slider.round{border-radius:34px}.slider.round:before{border-radius:50%}@media screen and (max-width: 782px){table thead{clip:rect(0 0 0 0);position:absolute}table td:before{content:attr(data-label);float:left;font-weight:700;text-transform:uppercase}}.hideObject{min-height:0px;overflow:hidden;padding:0;margin:0!important;scale:0;opacity:0}.ocambaMessageContainer{margin-right:2rem}.ocambaMessageContainer .notice-dismiss{right:0;top:auto}#ocambaPluginWrap .form-table td,#ocambaPluginWrap .form-table th{border:1px solid #2271b1;padding:1rem}#ocambaPluginWrap .form-table{background-color:#fff;max-width:980px}#code_key{max-width:44ch}@media screen and (max-width: 782px){#ocambaPluginWrap .form-table{background-color:#fff;max-width:100%}#code_key{max-width:100%}.formSubmitCode_key{display:flex!important;gap:1rem;align-items:center;justify-content:center}#ocamba-hood-settings-form{width:100%;display:flex;flex-direction:column;align-items:end;gap:1rem}.formSubmitCode_keyInnerDiv{width:100%;display:flex;flex-direction:column}#submit{width:100%;margin-bottom:0}.formSubmitCode_keyMobileText{width:auto;text-align:justify;margin:0!important;padding:0}.fomrActivateCode_key{display:flex!important;align-items:center;justify-content:space-between}}1 .p1rem{padding:1rem}.m0{margin:0}.p0{padding:0}.df{display:flex}.dif{display:inline-flex}.g1rem{gap:1rem}.tac{text-align:center}.jcsb{justify-content:space-between}.aic{align-items:center}.pRel{position:relative}.t0dot3s{transition:.3s}.w-100{width:100%}.h-100{height:100%}.minH53px{min-height:53px}.o1{opacity:1}@media (min-width: 0px){.mobileHide{display:none}.mobileShow{display:block}}@media (min-width: 783px){.mobileHide{display:block}.mobileShow{display:none}}.ripple{display:inline-block;position:relative;width:80px;height:80px}.ripple div{position:absolute;border:4px solid #195278;opacity:1;border-radius:50%;animation:ripple 1s cubic-bezier(0,.2,.8,1) infinite}.ripple div:nth-child(2){animation-delay:-.5s}@keyframes ripple{0%{top:36px;left:36px;width:0;height:0;opacity:0}4.9%{top:36px;left:36px;width:0;height:0;opacity:0}5%{top:36px;left:36px;width:0;height:0;opacity:1}to{top:0;left:0;width:72px;height:72px;opacity:0}}dialog{background:transparent;border:none;box-shadow:none;backdrop-filter:blur(18px)}dialog::backdrop{backdrop-filter:blur(5px)}.switch{position:relative;display:inline-block;width:60px;height:34px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;inset:0;background-color:#ccc;-webkit-transition:.4s;transition:.4s}.slider:before{position:absolute;content:"";height:26px;width:26px;left:4px;bottom:4px;background-color:#fff;-webkit-transition:.4s;transition:.4s}input:checked+.slider{background-color:#2271b1}input:checked+.slider.disabledSwitch{background-color:#ccc;cursor:no-drop}input:focus+.slider{box-shadow:0 0 1px #2271b1}input:checked+.slider:before{-webkit-transform:translateX(26px);-ms-transform:translateX(26px);transform:translate(26px)}.slider.round{border-radius:34px}.slider.round:before{border-radius:50%}@media screen and (max-width: 782px){table thead{clip:rect(0 0 0 0);position:absolute}table td:before{content:attr(data-label);float:left;font-weight:700;text-transform:uppercase}}.hideObject{min-height:0px;overflow:hidden;padding:0;margin:0!important;scale:0;opacity:0}.ocambaMessageContainer{margin-right:2rem}.ocambaMessageContainer .notice-dismiss{right:0;top:auto}#ocambaPluginWrap .form-table td,#ocambaPluginWrap .form-table th{border:1px solid #2271b1;padding:1rem}#ocambaPluginWrap .form-table{background-color:#fff;max-width:980px}#code_key{max-width:44ch}@media screen and (max-width: 782px){#ocambaPluginWrap .form-table{background-color:#fff;max-width:100%}#code_key{max-width:100%}.formSubmitCode_key{display:flex!important;gap:1rem;align-items:center;justify-content:center}#ocamba-hood-settings-form{width:100%;display:flex;flex-direction:column;align-items:end;gap:1rem}.formSubmitCode_keyInnerDiv{width:100%;display:flex;flex-direction:column}#submit{width:100%;margin-bottom:0}.formSubmitCode_keyMobileText{width:auto;text-align:justify;margin:0!important;padding:0}.fomrActivateCode_key{display:flex!important;align-items:center;justify-content:space-between}} -
ocamba-hood/tags/1.0.4/assets/js/admin-app.js
r3137413 r3138242 1 class d{constructor(){this.inputCodeKey=document.getElementById("code_key"),this.submitButton=document.getElementById("submit"),this.submitForm()}submitForm=()=>{this.inputCodeKey.addEventListener("input",()=>{this.inputCodeKey.value===this.inputCodeKey.dataset.presentCodeKey?this.submitButton.disabled=!0:this.submitButton.disabled=!1}),document.getElementById("activateAndDeactivateCodeKey").addEventListener("change",t=>{let a=document.getElementById("ocamba-hood-settings-form-switch"),o=a.action,e=a.elements.activateAndDeactivateCodeKey.checked,i=a.elements._wpnonce.value,s=new URLSearchParams({ocamba_hood_options_verify_activate_deactivate:i,action:"admin_activate_deativate_code_key_submision",code_key_active:e});this.fetchFunction(o,s,this.submitActivateOrDeactivateCodeKey.bind(this))}),document.getElementById("submit").addEventListener("click",t=>{t.preventDefault();let a=document.getElementById("ocamba-hood-settings-form"),o=a.action,e=this.inputCodeKey.value,i=a.elements._wpnonce.value,s=new URLSearchParams({ocamba_hood_options_verify:i,action:"admin_code_key_subbmision",code_key:this.inputCodeKey.value});e===""?this.inputCodeKeyValidation(ocambaI18n.emptyCodeKey):e.length<32||e.length>44?this.inputCodeKeyValidation(ocambaI18n.notValidCodeKeyLength):e===this.inputCodeKey.dataset.presentCodeKey?this.inputCodeKeyValidation(ocambaI18n.CodeKeyDidNotChaged):(this.inputCodeKey.style.border="1px solid #8c8f94",this.fetchFunction(o,s,this.submitCodeKey.bind(this),!0))})};inputCodeKeyValidation(t){this.submitCodeKey({success:!1,data:{message:t,state:"error",status_code:400}}),document.getElementById("code_key").style.border="1px solid #d63638",setTimeout(function(){document.getElementById("code_key").style.border="1px solid #8c8f94"},5e3)}fetchFunction(t,a,o,e=!1){let i=document.querySelector("#loadingDialog");i.showModal(),fetch(t,{method:"POST",body:a}).then(s=>s.json()).then(s=>{o(s,e)}).catch(s=>{console.error("Error:",s)}).finally(()=>{i.close()})}submitActivateOrDeactivateCodeKey(t){t.data.state===!0?(this.inputCodeKey.disabled=!1,this.inputCodeKey.value!==this.inputCodeKey.dataset.presentCodeKey&&(this.submitButton.disabled=!1)):t.data.state===!1&&(this.inputCodeKey.disabled=!0,this.submitButton.disabled=!0),this.submitCodeKey(t)}submitCodeKey(t,a=!1){if(a&&t.success&&(this.inputCodeKey.dataset.presentCodeKey=this.inputCodeKey.value,this.submitButton.disabled=!0),document.getElementById("ocambaPluginWrap")){let o=document.getElementById("responseHolder");o.innerHTML="";let e=document.createElement("div");e.className="ocambaMessageContainer o1 h-100 t0dot3s pRel df minH53px jcsb aic notice notice-"+(t.success?"success":"error"),e.innerHTML=t.data.message;let i=document.createElement("button");i.className="notice-dismiss",i.innerHTML='<span class="screen-reader-text">'+ocambaI18n.dismisThisNotice+"</span>",e.appendChild(i),i.addEventListener("click",()=>{e.animate({opacity:0},{duration:300,easing:"linear",iterations:1,fill:"both"}).onfinish=function(){e.classList.add("hideObject"),e.remove(),o.innerHTML=""}}),o.append(e)}}}class c{admin_ocamba_hood;constructor(){this.admin_ocamba_hood=new d}}new c;1 class n{constructor(){this.inputCodeKey=document.getElementById("code_key"),this.submitButton=document.getElementById("submit"),this.activateDeactivateForm=document.getElementById("ocamba-hood-settings-form-switch"),this.switchSlider=this.activateDeactivateForm.querySelector(".slider"),this.submitForm()}submitForm=()=>{this.inputCodeKey.addEventListener("input",()=>{document.getElementById("ocamba-hood-settings-form-switch").querySelector(".slider")&&(this.inputCodeKey.value===this.inputCodeKey.dataset.presentCodeKey?(this.submitButton.disabled=!0,this.activateDeactivateForm.elements.activateAndDeactivateCodeKey.disabled=!1,this.switchSlider.classList.remove("disabledSwitch")):(this.submitButton.disabled=!1,this.activateDeactivateForm.elements.activateAndDeactivateCodeKey.disabled=!0,this.switchSlider.classList.add("disabledSwitch")))}),document.getElementById("activateAndDeactivateCodeKey").addEventListener("change",t=>{let o=document.getElementById("ocamba-hood-settings-form-switch"),a=this.activateDeactivateForm.action,e=this.activateDeactivateForm.elements.activateAndDeactivateCodeKey.checked,i=o.elements._wpnonce.value,s=new URLSearchParams({ocamba_hood_options_verify_activate_deactivate:i,action:"admin_activate_deativate_code_key_submision",code_key_active:e});this.fetchFunction(a,s,this.submitActivateOrDeactivateCodeKey.bind(this))}),document.getElementById("submit").addEventListener("click",t=>{t.preventDefault();let o=document.getElementById("ocamba-hood-settings-form"),a=o.action,e=this.inputCodeKey.value,i=o.elements._wpnonce.value,s=new URLSearchParams({ocamba_hood_options_verify:i,action:"admin_code_key_subbmision",code_key:this.inputCodeKey.value});e===""?this.inputCodeKeyValidation(ocambaI18n.emptyCodeKey):e.length<32||e.length>44?this.inputCodeKeyValidation(ocambaI18n.notValidCodeKeyLength):e===this.inputCodeKey.dataset.presentCodeKey?this.inputCodeKeyValidation(ocambaI18n.CodeKeyDidNotChaged):(this.inputCodeKey.style.border="1px solid #8c8f94",this.fetchFunction(a,s,this.submitCodeKey.bind(this),!0))})};inputCodeKeyValidation(t){this.submitCodeKey({success:!1,data:{message:t,state:"error",status_code:400}}),document.getElementById("code_key").style.border="1px solid #d63638",setTimeout(function(){document.getElementById("code_key").style.border="1px solid #8c8f94"},5e3)}fetchFunction(t,o,a,e=!1){let i=document.querySelector("#loadingDialog");i.showModal(),fetch(t,{method:"POST",body:o}).then(s=>s.json()).then(s=>{a(s,e)}).catch(s=>{console.error("Error:",s)}).finally(()=>{i.close()})}submitActivateOrDeactivateCodeKey(t){t.data.state===!0?(this.inputCodeKey.disabled=!1,this.inputCodeKey.value!==this.inputCodeKey.dataset.presentCodeKey&&(this.submitButton.disabled=!1)):t.data.state===!1&&(this.inputCodeKey.disabled=!0,this.submitButton.disabled=!0),this.submitCodeKey(t)}submitCodeKey(t,o=!1){if(o&&t.success&&(this.inputCodeKey.dataset.presentCodeKey=this.inputCodeKey.value,this.submitButton.disabled=!0,this.activateDeactivateForm.elements.activateAndDeactivateCodeKey.disabled=!1,this.switchSlider.style.cssText='background-color: "", cursor: ""',this.switchSlider.classList.remove("disabledSwitch")),document.getElementById("ocambaPluginWrap")){let a=document.getElementById("responseHolder");a.innerHTML="";let e=document.createElement("div");e.className="ocambaMessageContainer o1 h-100 t0dot3s pRel df minH53px jcsb aic notice notice-"+(t.success?"success":"error"),e.innerHTML=t.data.message;let i=document.createElement("button");i.className="notice-dismiss",i.innerHTML='<span class="screen-reader-text">'+ocambaI18n.dismisThisNotice+"</span>",e.appendChild(i),i.addEventListener("click",()=>{e.animate({opacity:0},{duration:300,easing:"linear",iterations:1,fill:"both"}).onfinish=function(){e.classList.add("hideObject"),e.remove(),a.innerHTML=""}}),a.append(e)}}}class c{admin_ocamba_hood;constructor(){this.admin_ocamba_hood=new n}}new c; -
ocamba-hood/tags/1.0.4/ocamba-hood.php
r3137413 r3138242 5 5 * @copyright 2024 Del Systems 6 6 * @license GPL-2.0-or-later 7 * @version 1.0. 107 * @version 1.0.4 8 8 * Plugin Name: Ocamba Hood 9 9 * Plugin URI: http://wordpress.org/plugins/ocamba-hood/ … … 11 11 * Author: Del Systems 12 12 * Author URI: https://delsystems.net 13 * Version: 1.0. 1013 * Version: 1.0.4 14 14 * License: GPL v2 or later 15 15 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt … … 58 58 * @copyright 2024 Del Systems 59 59 * @license GPL-2.0-or-later 60 * @version 1.0. 1060 * @version 1.0.4 61 61 */ 62 62 class Ocamba_Hood 63 63 { 64 private $plugin_version = '1.0. 10';64 private $plugin_version = '1.0.4'; 65 65 private $domain; 66 66 -
ocamba-hood/tags/1.0.4/readme.txt
r3137413 r3138242 3 3 Requires at least: 3.8 4 4 Tested up to: 6.6 5 Stable tag: 1.0. 105 Stable tag: 1.0.4 6 6 Donate link: https://delsystems.net 7 7 Tags: customers, push, web push, notifications … … 12 12 == Description == 13 13 14 ** Hood Engage Plugin for WordPress**14 **Hood Engage Plugin for WordPress** 15 15 16 16 Hood Engage simplifies driving traffic to your website, connecting with visitors, and creating a loyal subscriber base. Implement and use advanced Hood Engage features directly from your WP dashboard in just a few clicks. … … 20 20 * Supports **Chrome** (Desktop & Android), **Safari** (Mac OS X), **Microsoft Edge** (Desktop & Android), **Opera** (Desktop & Android), and **Firefox** (Desktop & Android) on HTTPS sites. 21 21 * User-friendly tag management system - Ocamba Hood's tag management system allows you to easily organize, update, and monitor tags, ensuring accurate data collection and streamlined site performance. 22 * Advanced scheduler – Schedule tasks based on data-driven customer behavior patterns to reach users when they’re most likely to engage, optimize delivery based on user’s time zones, set quiet hours, and more.22 * Advanced scheduler - Schedule tasks based on data-driven customer behavior patterns to reach users when they're most likely to engage, optimize delivery based on user's time zones, set quiet hours, and more. 23 23 * Trigger-based event targeting - Address your customers' needs at precisely the right moment based on their actions on your website. 24 24 * Opt-in customization - Personalize when and how you want your visitors to opt in for browser notifications. … … 94 94 = 1.0.4 = 95 95 - Update: Variable nameing changed: "Tag" -> "Code Key" 96 - Update: Documentation URL updated 97 - Bug Fix: ACTIVATE/DEACTIVATE switch can only be used before there is any changes to the inputted Code Key 98 - Bug Fix: If there is no inputted "Code Key" then ACTIVATE/DEACTIVATE switch will be inactive 96 99 97 100 = 1.0.3 = -
ocamba-hood/tags/1.0.4/templates/admin-template.php
r3137413 r3138242 71 71 type="checkbox" 72 72 <?php echo esc_html($macros["CODE_KEY_ACTIVE"] == 'true' ? "checked" : ""); ?> 73 <?php echo esc_html($macros["CODE_KEY"] == '' ? 'disabled' : '' ) ?> 73 74 > 74 <span class="slider round "></span>75 <span class="slider round <?php echo esc_html($macros["CODE_KEY"] == '' ? 'disabledSwitch' : '' ) ?>"></span> 75 76 </label> 76 77 </form> -
ocamba-hood/trunk/assets/css/admin-app.css
r3137413 r3138242 1 .p1rem{padding:1rem}.m0{margin:0}.p0{padding:0}.df{display:flex}.dif{display:inline-flex}.g1rem{gap:1rem}.tac{text-align:center}.jcsb{justify-content:space-between}.aic{align-items:center}.pRel{position:relative}.t0dot3s{transition:.3s}.w-100{width:100%}.h-100{height:100%}.minH53px{min-height:53px}.o1{opacity:1}@media (min-width: 0px){.mobileHide{display:none}.mobileShow{display:block}}@media (min-width: 783px){.mobileHide{display:block}.mobileShow{display:none}}.ripple{display:inline-block;position:relative;width:80px;height:80px}.ripple div{position:absolute;border:4px solid #195278;opacity:1;border-radius:50%;animation:ripple 1s cubic-bezier(0,.2,.8,1) infinite}.ripple div:nth-child(2){animation-delay:-.5s}@keyframes ripple{0%{top:36px;left:36px;width:0;height:0;opacity:0}4.9%{top:36px;left:36px;width:0;height:0;opacity:0}5%{top:36px;left:36px;width:0;height:0;opacity:1}to{top:0;left:0;width:72px;height:72px;opacity:0}}dialog{background:transparent;border:none;box-shadow:none;backdrop-filter:blur(18px)}dialog::backdrop{backdrop-filter:blur(5px)}.switch{position:relative;display:inline-block;width:60px;height:34px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;inset:0;background-color:#ccc;-webkit-transition:.4s;transition:.4s}.slider:before{position:absolute;content:"";height:26px;width:26px;left:4px;bottom:4px;background-color:#fff;-webkit-transition:.4s;transition:.4s}input:checked+.slider{background-color:#2271b1}input: focus+.slider{box-shadow:0 0 1px #2271b1}input:checked+.slider:before{-webkit-transform:translateX(26px);-ms-transform:translateX(26px);transform:translate(26px)}.slider.round{border-radius:34px}.slider.round:before{border-radius:50%}@media screen and (max-width: 782px){table thead{clip:rect(0 0 0 0);position:absolute}table td:before{content:attr(data-label);float:left;font-weight:700;text-transform:uppercase}}.hideObject{min-height:0px;overflow:hidden;padding:0;margin:0!important;scale:0;opacity:0}.ocambaMessageContainer{margin-right:2rem}.ocambaMessageContainer .notice-dismiss{right:0;top:auto}#ocambaPluginWrap .form-table td,#ocambaPluginWrap .form-table th{border:1px solid #2271b1;padding:1rem}#ocambaPluginWrap .form-table{background-color:#fff;max-width:980px}#code_key{max-width:44ch}@media screen and (max-width: 782px){#ocambaPluginWrap .form-table{background-color:#fff;max-width:100%}#code_key{max-width:100%}.formSubmitCode_key{display:flex!important;gap:1rem;align-items:center;justify-content:center}#ocamba-hood-settings-form{width:100%;display:flex;flex-direction:column;align-items:end;gap:1rem}.formSubmitCode_keyInnerDiv{width:100%;display:flex;flex-direction:column}#submit{width:100%;margin-bottom:0}.formSubmitCode_keyMobileText{width:auto;text-align:justify;margin:0!important;padding:0}.fomrActivateCode_key{display:flex!important;align-items:center;justify-content:space-between}}1 .p1rem{padding:1rem}.m0{margin:0}.p0{padding:0}.df{display:flex}.dif{display:inline-flex}.g1rem{gap:1rem}.tac{text-align:center}.jcsb{justify-content:space-between}.aic{align-items:center}.pRel{position:relative}.t0dot3s{transition:.3s}.w-100{width:100%}.h-100{height:100%}.minH53px{min-height:53px}.o1{opacity:1}@media (min-width: 0px){.mobileHide{display:none}.mobileShow{display:block}}@media (min-width: 783px){.mobileHide{display:block}.mobileShow{display:none}}.ripple{display:inline-block;position:relative;width:80px;height:80px}.ripple div{position:absolute;border:4px solid #195278;opacity:1;border-radius:50%;animation:ripple 1s cubic-bezier(0,.2,.8,1) infinite}.ripple div:nth-child(2){animation-delay:-.5s}@keyframes ripple{0%{top:36px;left:36px;width:0;height:0;opacity:0}4.9%{top:36px;left:36px;width:0;height:0;opacity:0}5%{top:36px;left:36px;width:0;height:0;opacity:1}to{top:0;left:0;width:72px;height:72px;opacity:0}}dialog{background:transparent;border:none;box-shadow:none;backdrop-filter:blur(18px)}dialog::backdrop{backdrop-filter:blur(5px)}.switch{position:relative;display:inline-block;width:60px;height:34px}.switch input{opacity:0;width:0;height:0}.slider{position:absolute;cursor:pointer;inset:0;background-color:#ccc;-webkit-transition:.4s;transition:.4s}.slider:before{position:absolute;content:"";height:26px;width:26px;left:4px;bottom:4px;background-color:#fff;-webkit-transition:.4s;transition:.4s}input:checked+.slider{background-color:#2271b1}input:checked+.slider.disabledSwitch{background-color:#ccc;cursor:no-drop}input:focus+.slider{box-shadow:0 0 1px #2271b1}input:checked+.slider:before{-webkit-transform:translateX(26px);-ms-transform:translateX(26px);transform:translate(26px)}.slider.round{border-radius:34px}.slider.round:before{border-radius:50%}@media screen and (max-width: 782px){table thead{clip:rect(0 0 0 0);position:absolute}table td:before{content:attr(data-label);float:left;font-weight:700;text-transform:uppercase}}.hideObject{min-height:0px;overflow:hidden;padding:0;margin:0!important;scale:0;opacity:0}.ocambaMessageContainer{margin-right:2rem}.ocambaMessageContainer .notice-dismiss{right:0;top:auto}#ocambaPluginWrap .form-table td,#ocambaPluginWrap .form-table th{border:1px solid #2271b1;padding:1rem}#ocambaPluginWrap .form-table{background-color:#fff;max-width:980px}#code_key{max-width:44ch}@media screen and (max-width: 782px){#ocambaPluginWrap .form-table{background-color:#fff;max-width:100%}#code_key{max-width:100%}.formSubmitCode_key{display:flex!important;gap:1rem;align-items:center;justify-content:center}#ocamba-hood-settings-form{width:100%;display:flex;flex-direction:column;align-items:end;gap:1rem}.formSubmitCode_keyInnerDiv{width:100%;display:flex;flex-direction:column}#submit{width:100%;margin-bottom:0}.formSubmitCode_keyMobileText{width:auto;text-align:justify;margin:0!important;padding:0}.fomrActivateCode_key{display:flex!important;align-items:center;justify-content:space-between}} -
ocamba-hood/trunk/assets/js/admin-app.js
r3137413 r3138242 1 class d{constructor(){this.inputCodeKey=document.getElementById("code_key"),this.submitButton=document.getElementById("submit"),this.submitForm()}submitForm=()=>{this.inputCodeKey.addEventListener("input",()=>{this.inputCodeKey.value===this.inputCodeKey.dataset.presentCodeKey?this.submitButton.disabled=!0:this.submitButton.disabled=!1}),document.getElementById("activateAndDeactivateCodeKey").addEventListener("change",t=>{let a=document.getElementById("ocamba-hood-settings-form-switch"),o=a.action,e=a.elements.activateAndDeactivateCodeKey.checked,i=a.elements._wpnonce.value,s=new URLSearchParams({ocamba_hood_options_verify_activate_deactivate:i,action:"admin_activate_deativate_code_key_submision",code_key_active:e});this.fetchFunction(o,s,this.submitActivateOrDeactivateCodeKey.bind(this))}),document.getElementById("submit").addEventListener("click",t=>{t.preventDefault();let a=document.getElementById("ocamba-hood-settings-form"),o=a.action,e=this.inputCodeKey.value,i=a.elements._wpnonce.value,s=new URLSearchParams({ocamba_hood_options_verify:i,action:"admin_code_key_subbmision",code_key:this.inputCodeKey.value});e===""?this.inputCodeKeyValidation(ocambaI18n.emptyCodeKey):e.length<32||e.length>44?this.inputCodeKeyValidation(ocambaI18n.notValidCodeKeyLength):e===this.inputCodeKey.dataset.presentCodeKey?this.inputCodeKeyValidation(ocambaI18n.CodeKeyDidNotChaged):(this.inputCodeKey.style.border="1px solid #8c8f94",this.fetchFunction(o,s,this.submitCodeKey.bind(this),!0))})};inputCodeKeyValidation(t){this.submitCodeKey({success:!1,data:{message:t,state:"error",status_code:400}}),document.getElementById("code_key").style.border="1px solid #d63638",setTimeout(function(){document.getElementById("code_key").style.border="1px solid #8c8f94"},5e3)}fetchFunction(t,a,o,e=!1){let i=document.querySelector("#loadingDialog");i.showModal(),fetch(t,{method:"POST",body:a}).then(s=>s.json()).then(s=>{o(s,e)}).catch(s=>{console.error("Error:",s)}).finally(()=>{i.close()})}submitActivateOrDeactivateCodeKey(t){t.data.state===!0?(this.inputCodeKey.disabled=!1,this.inputCodeKey.value!==this.inputCodeKey.dataset.presentCodeKey&&(this.submitButton.disabled=!1)):t.data.state===!1&&(this.inputCodeKey.disabled=!0,this.submitButton.disabled=!0),this.submitCodeKey(t)}submitCodeKey(t,a=!1){if(a&&t.success&&(this.inputCodeKey.dataset.presentCodeKey=this.inputCodeKey.value,this.submitButton.disabled=!0),document.getElementById("ocambaPluginWrap")){let o=document.getElementById("responseHolder");o.innerHTML="";let e=document.createElement("div");e.className="ocambaMessageContainer o1 h-100 t0dot3s pRel df minH53px jcsb aic notice notice-"+(t.success?"success":"error"),e.innerHTML=t.data.message;let i=document.createElement("button");i.className="notice-dismiss",i.innerHTML='<span class="screen-reader-text">'+ocambaI18n.dismisThisNotice+"</span>",e.appendChild(i),i.addEventListener("click",()=>{e.animate({opacity:0},{duration:300,easing:"linear",iterations:1,fill:"both"}).onfinish=function(){e.classList.add("hideObject"),e.remove(),o.innerHTML=""}}),o.append(e)}}}class c{admin_ocamba_hood;constructor(){this.admin_ocamba_hood=new d}}new c;1 class n{constructor(){this.inputCodeKey=document.getElementById("code_key"),this.submitButton=document.getElementById("submit"),this.activateDeactivateForm=document.getElementById("ocamba-hood-settings-form-switch"),this.switchSlider=this.activateDeactivateForm.querySelector(".slider"),this.submitForm()}submitForm=()=>{this.inputCodeKey.addEventListener("input",()=>{document.getElementById("ocamba-hood-settings-form-switch").querySelector(".slider")&&(this.inputCodeKey.value===this.inputCodeKey.dataset.presentCodeKey?(this.submitButton.disabled=!0,this.activateDeactivateForm.elements.activateAndDeactivateCodeKey.disabled=!1,this.switchSlider.classList.remove("disabledSwitch")):(this.submitButton.disabled=!1,this.activateDeactivateForm.elements.activateAndDeactivateCodeKey.disabled=!0,this.switchSlider.classList.add("disabledSwitch")))}),document.getElementById("activateAndDeactivateCodeKey").addEventListener("change",t=>{let o=document.getElementById("ocamba-hood-settings-form-switch"),a=this.activateDeactivateForm.action,e=this.activateDeactivateForm.elements.activateAndDeactivateCodeKey.checked,i=o.elements._wpnonce.value,s=new URLSearchParams({ocamba_hood_options_verify_activate_deactivate:i,action:"admin_activate_deativate_code_key_submision",code_key_active:e});this.fetchFunction(a,s,this.submitActivateOrDeactivateCodeKey.bind(this))}),document.getElementById("submit").addEventListener("click",t=>{t.preventDefault();let o=document.getElementById("ocamba-hood-settings-form"),a=o.action,e=this.inputCodeKey.value,i=o.elements._wpnonce.value,s=new URLSearchParams({ocamba_hood_options_verify:i,action:"admin_code_key_subbmision",code_key:this.inputCodeKey.value});e===""?this.inputCodeKeyValidation(ocambaI18n.emptyCodeKey):e.length<32||e.length>44?this.inputCodeKeyValidation(ocambaI18n.notValidCodeKeyLength):e===this.inputCodeKey.dataset.presentCodeKey?this.inputCodeKeyValidation(ocambaI18n.CodeKeyDidNotChaged):(this.inputCodeKey.style.border="1px solid #8c8f94",this.fetchFunction(a,s,this.submitCodeKey.bind(this),!0))})};inputCodeKeyValidation(t){this.submitCodeKey({success:!1,data:{message:t,state:"error",status_code:400}}),document.getElementById("code_key").style.border="1px solid #d63638",setTimeout(function(){document.getElementById("code_key").style.border="1px solid #8c8f94"},5e3)}fetchFunction(t,o,a,e=!1){let i=document.querySelector("#loadingDialog");i.showModal(),fetch(t,{method:"POST",body:o}).then(s=>s.json()).then(s=>{a(s,e)}).catch(s=>{console.error("Error:",s)}).finally(()=>{i.close()})}submitActivateOrDeactivateCodeKey(t){t.data.state===!0?(this.inputCodeKey.disabled=!1,this.inputCodeKey.value!==this.inputCodeKey.dataset.presentCodeKey&&(this.submitButton.disabled=!1)):t.data.state===!1&&(this.inputCodeKey.disabled=!0,this.submitButton.disabled=!0),this.submitCodeKey(t)}submitCodeKey(t,o=!1){if(o&&t.success&&(this.inputCodeKey.dataset.presentCodeKey=this.inputCodeKey.value,this.submitButton.disabled=!0,this.activateDeactivateForm.elements.activateAndDeactivateCodeKey.disabled=!1,this.switchSlider.style.cssText='background-color: "", cursor: ""',this.switchSlider.classList.remove("disabledSwitch")),document.getElementById("ocambaPluginWrap")){let a=document.getElementById("responseHolder");a.innerHTML="";let e=document.createElement("div");e.className="ocambaMessageContainer o1 h-100 t0dot3s pRel df minH53px jcsb aic notice notice-"+(t.success?"success":"error"),e.innerHTML=t.data.message;let i=document.createElement("button");i.className="notice-dismiss",i.innerHTML='<span class="screen-reader-text">'+ocambaI18n.dismisThisNotice+"</span>",e.appendChild(i),i.addEventListener("click",()=>{e.animate({opacity:0},{duration:300,easing:"linear",iterations:1,fill:"both"}).onfinish=function(){e.classList.add("hideObject"),e.remove(),a.innerHTML=""}}),a.append(e)}}}class c{admin_ocamba_hood;constructor(){this.admin_ocamba_hood=new n}}new c; -
ocamba-hood/trunk/ocamba-hood.php
r3137413 r3138242 5 5 * @copyright 2024 Del Systems 6 6 * @license GPL-2.0-or-later 7 * @version 1.0. 107 * @version 1.0.4 8 8 * Plugin Name: Ocamba Hood 9 9 * Plugin URI: http://wordpress.org/plugins/ocamba-hood/ … … 11 11 * Author: Del Systems 12 12 * Author URI: https://delsystems.net 13 * Version: 1.0. 1013 * Version: 1.0.4 14 14 * License: GPL v2 or later 15 15 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt … … 58 58 * @copyright 2024 Del Systems 59 59 * @license GPL-2.0-or-later 60 * @version 1.0. 1060 * @version 1.0.4 61 61 */ 62 62 class Ocamba_Hood 63 63 { 64 private $plugin_version = '1.0. 10';64 private $plugin_version = '1.0.4'; 65 65 private $domain; 66 66 -
ocamba-hood/trunk/readme.txt
r3137413 r3138242 3 3 Requires at least: 3.8 4 4 Tested up to: 6.6 5 Stable tag: 1.0. 105 Stable tag: 1.0.4 6 6 Donate link: https://delsystems.net 7 7 Tags: customers, push, web push, notifications … … 12 12 == Description == 13 13 14 ** Hood Engage Plugin for WordPress**14 **Hood Engage Plugin for WordPress** 15 15 16 16 Hood Engage simplifies driving traffic to your website, connecting with visitors, and creating a loyal subscriber base. Implement and use advanced Hood Engage features directly from your WP dashboard in just a few clicks. … … 20 20 * Supports **Chrome** (Desktop & Android), **Safari** (Mac OS X), **Microsoft Edge** (Desktop & Android), **Opera** (Desktop & Android), and **Firefox** (Desktop & Android) on HTTPS sites. 21 21 * User-friendly tag management system - Ocamba Hood's tag management system allows you to easily organize, update, and monitor tags, ensuring accurate data collection and streamlined site performance. 22 * Advanced scheduler – Schedule tasks based on data-driven customer behavior patterns to reach users when they’re most likely to engage, optimize delivery based on user’s time zones, set quiet hours, and more.22 * Advanced scheduler - Schedule tasks based on data-driven customer behavior patterns to reach users when they're most likely to engage, optimize delivery based on user's time zones, set quiet hours, and more. 23 23 * Trigger-based event targeting - Address your customers' needs at precisely the right moment based on their actions on your website. 24 24 * Opt-in customization - Personalize when and how you want your visitors to opt in for browser notifications. … … 94 94 = 1.0.4 = 95 95 - Update: Variable nameing changed: "Tag" -> "Code Key" 96 - Update: Documentation URL updated 97 - Bug Fix: ACTIVATE/DEACTIVATE switch can only be used before there is any changes to the inputted Code Key 98 - Bug Fix: If there is no inputted "Code Key" then ACTIVATE/DEACTIVATE switch will be inactive 96 99 97 100 = 1.0.3 = -
ocamba-hood/trunk/templates/admin-template.php
r3137413 r3138242 71 71 type="checkbox" 72 72 <?php echo esc_html($macros["CODE_KEY_ACTIVE"] == 'true' ? "checked" : ""); ?> 73 <?php echo esc_html($macros["CODE_KEY"] == '' ? 'disabled' : '' ) ?> 73 74 > 74 <span class="slider round "></span>75 <span class="slider round <?php echo esc_html($macros["CODE_KEY"] == '' ? 'disabledSwitch' : '' ) ?>"></span> 75 76 </label> 76 77 </form>
Note: See TracChangeset
for help on using the changeset viewer.