Daniel Fernandes
6 years ago
committed by
Dac Chartrand
9 changed files with 115 additions and 19 deletions
@ -0,0 +1,33 @@ |
|||||||
|
document.addEventListener( 'DOMContentLoaded', function () { |
||||||
|
let checkbox = document.getElementById( '_customize-input-pb_network_contact_form' ); |
||||||
|
let email = document.getElementById( 'customize-control-pb_network_contact_email' ); |
||||||
|
let link = document.getElementById( 'customize-control-pb_network_contact_link' ); |
||||||
|
let title = document.getElementById( 'customize-control-pb_network_contact_form_title' ); |
||||||
|
|
||||||
|
checkbox.addEventListener( 'click', toggleReadOnly ); |
||||||
|
|
||||||
|
function toggleReadOnly() { |
||||||
|
if ( checkbox.checked === false ) { |
||||||
|
email.classList.add( 'hidden' ); |
||||||
|
email.style.cssText = null; |
||||||
|
|
||||||
|
title.classList.add( 'hidden' ); |
||||||
|
title.style.cssText = null; |
||||||
|
|
||||||
|
link.classList.remove( 'hidden' ); |
||||||
|
link.style.cssText = 'display: list-item;'; |
||||||
|
} else { |
||||||
|
email.classList.remove( 'hidden' ); |
||||||
|
email.style.cssText = 'display: list-item;'; |
||||||
|
|
||||||
|
title.classList.remove( 'hidden' ); |
||||||
|
title.style.cssText = 'display: list-item;'; |
||||||
|
|
||||||
|
link.classList.add( 'hidden' ); |
||||||
|
link.style.cssText = null; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
toggleReadOnly(); |
||||||
|
|
||||||
|
} ); |
@ -0,0 +1 @@ |
|||||||
|
!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=4)}({4:function(e,t,n){e.exports=n("5MvR")},"5MvR":function(e,t){document.addEventListener("DOMContentLoaded",function(){var e=document.getElementById("_customize-input-pb_network_contact_form"),t=document.getElementById("customize-control-pb_network_contact_email"),n=document.getElementById("customize-control-pb_network_contact_link"),o=document.getElementById("customize-control-pb_network_contact_form_title");function r(){!1===e.checked?(t.classList.add("hidden"),t.style.cssText=null,o.classList.add("hidden"),o.style.cssText=null,n.classList.remove("hidden"),n.style.cssText="display: list-item;"):(t.classList.remove("hidden"),t.style.cssText="display: list-item;",o.classList.remove("hidden"),o.style.cssText="display: list-item;",n.classList.add("hidden"),n.style.cssText=null)}e.addEventListener("click",r),r()})}}); |
@ -1 +1 @@ |
|||||||
!function(e){var t={};function n(i){if(t[i])return t[i].exports;var a=t[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(i,a,function(t){return e[t]}.bind(null,a));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=4)}({4:function(e,t,n){e.exports=n("eeN9")},eeN9:function(e,t){tinymce.create("tinymce.plugins.aldine_page_section",{init:function(e,t){e.addButton("aldine_page_section",{title:aldine.page_section.title,icon:"icon dashicons-layout",onclick:function(){e.windowManager.open({title:aldine.page_section.title,body:[{type:"textbox",name:"title",label:aldine.page_section.title_label,value:aldine.page_section.title},{type:"listbox",name:"variant",label:"Variant",values:[{text:aldine.page_section.standard,value:""},{text:aldine.page_section.accent,value:"accent"},{text:aldine.page_section.bordered,value:"bordered"},{text:aldine.page_section.borderless,value:"borderless"}],value:""}],onsubmit:function(t){e.insertContent('[aldine_page_section title="'+t.data.title+'" variant="'+t.data.variant+'"]<p>Insert your page section content here.</p>[/aldine_page_section]')}})}})},createControl:function(e,t){return null}}),tinymce.PluginManager.add("aldine_page_section",tinymce.plugins.aldine_page_section)}}); |
!function(e){var t={};function n(i){if(t[i])return t[i].exports;var a=t[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(i,a,function(t){return e[t]}.bind(null,a));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=5)}({5:function(e,t,n){e.exports=n("eeN9")},eeN9:function(e,t){tinymce.create("tinymce.plugins.aldine_page_section",{init:function(e,t){e.addButton("aldine_page_section",{title:aldine.page_section.title,icon:"icon dashicons-layout",onclick:function(){e.windowManager.open({title:aldine.page_section.title,body:[{type:"textbox",name:"title",label:aldine.page_section.title_label,value:aldine.page_section.title},{type:"listbox",name:"variant",label:"Variant",values:[{text:aldine.page_section.standard,value:""},{text:aldine.page_section.accent,value:"accent"},{text:aldine.page_section.bordered,value:"bordered"},{text:aldine.page_section.borderless,value:"borderless"}],value:""}],onsubmit:function(t){e.insertContent('[aldine_page_section title="'+t.data.title+'" variant="'+t.data.variant+'"]<p>Insert your page section content here.</p>[/aldine_page_section]')}})}})},createControl:function(e,t){return null}}),tinymce.PluginManager.add("aldine_page_section",tinymce.plugins.aldine_page_section)}}); |
Loading…
Reference in new issue