Changeset 2237525
- Timestamp:
- 02/03/2020 09:14:12 AM (6 years ago)
- Location:
- zoho-forms/tags/2.0
- Files:
-
- 5 edited
-
readme.txt (modified) (1 diff)
-
tinymce/zforms_dailog.css (modified) (3 diffs)
-
tinymce/zforms_dailog.js (modified) (7 diffs)
-
tinymce/zforms_dialog.php (modified) (6 diffs)
-
zohoforms-block.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
zoho-forms/tags/2.0/readme.txt
r2209845 r2237525 29 29 30 30 Once you define the height and width of your form and click **Embed**, the form's preview will be shown in the editor. 31 32 You can also create a short code as shown below to embed your form in your WordPress page: 33 [zohoForms src=<Form Permalink> width=100% height=600px] 34 35 Note: You can copy the Form Permalink from the [Share tab](https://www.zoho.com/forms/help/share/public-sharing.html) in your form builder. 31 36 32 37 These setup instructions are for WordPress versions 5.0 and above. -
zoho-forms/tags/2.0/tinymce/zforms_dailog.css
r2047986 r2237525 8 8 .popupOuterWrapper{ font-size: 13px;padding: 25px;padding-top:25px;padding-bottom: 15px;} 9 9 .popupOuterWrapper .popupInnerWrapper{ padding-bottom:10px;} 10 .popupOuterWrapper .popupInnerWrapper label{ display: block;margin-bottom: 5px;}10 .popupOuterWrapper .popupInnerWrapper label{ display: block;margin-bottom: 8px;} 11 11 .popupOuterWrapper .popupInnerWrapper label em{ color:#ff0000;font-weight:600;} 12 12 .popupOuterWrapper .popupContainer input{ padding:5px 10px;} … … 19 19 .flLeft{float:left;} 20 20 .flRight{float:right;} 21 .popupFotter{ text-align:center; margin-top: 28px;}21 .popupFotter{ text-align:center; margin-top:30px;} 22 22 .signWrapper{ text-align:center; font-size:13px; margin:18% 13%;} 23 23 .signWrapper input{ padding: 4px 8px; font-size: 13px;cursor: pointer;} 24 24 .popupContainer select{padding: 5px;font-size: 12px;background: #fff;width: 100%;} 25 .errorCont textarea, .errorCont select { border:1px solid #ff0000;}26 .errorCont p{font-size:12px; color:#ff0000; margin:0; padding-top:3px; }25 .errorCont textarea, .errorCont select, .errorCont .zf-wb-dropWrapper{ border:1px solid #ff0000} 26 .errorCont p{font-size:12px; color:#ff0000; margin:0; padding-top:3px; position: absolute;} 27 27 .brandingFotterWrapper{ position:fixed; bottom:0; width:100%;} 28 28 .brandingFotterWrapper .brandingFotterCont{ margin:10px; } … … 30 30 .forceColors{ background:#fff !important;} 31 31 .popupOuterWrapper .popupContainer textarea:focus, .popupOuterWrapper .popupContainer input:focus, .popupOuterWrapper .popupContainer select:focus{ border:1px solid #000;} 32 .zf-wb-dropWrapper{ border:1px solid #d6d6d6; position: relative; height:32px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px; overflow: hidden;} 33 .zf-wb-dropWrapper::before{ content: "";right: 12px;top: 11px; position: absolute;width: 0; height: 0; border-left: 6px solid transparent;border-right: 6px solid transparent;border-top: 7px solid #222;} 34 35 .zf-wb-dropWrapper select{ 36 position: absolute; 37 top: 0; 38 border: 0 none !important; 39 width: 100%; 40 max-width: 100%; 41 outline: none !important; 42 -moz-outline: none !important; 43 margin: 0; 44 appearance: none; 45 -moz-appearance: radio-container; 46 -webkit-appearance: none; 47 background: transparent; 48 text-overflow: ''; 49 webkit-user-select: none; 50 -moz-user-select: none; 51 -ms-user-select: none; 52 -o-user-select: none; 53 user-select: none; 54 text-indent: 2px; 55 white-space: nowrap; 56 text-overflow: ellipsis; 57 height: auto; 58 font-size: 14px !important; 59 padding-bottom: 5px; 60 line-height: inherit;; 61 } 62 .zf-wb-dropWrapper select:hover{color:#444 !important;} 63 .zf-wb-dropWrapper select:focus, .zf-wb-dropWrapper select option{-moz-outline: none !important; outline: none !important; border:none; -moz-box-shadow: none !important;-webkit-box-shadow: none !important;box-shadow: none !important;outline-offset: -2px !important; color: #444;} 64 select:-moz-focusring {color: transparent !important;text-shadow: 0 0 0 #000 !important;} 65 .popupOuterWrapper .popupContainer input[type="submit"]:focus{border: 1px solid transparent; outline: none;} 66 .zf-wb-loading{ text-align: center;} 67 .zf-wb-loading p{ display: inline;padding: 0 10px 0 0px !important;} 68 /*loading animation */ 69 .zf-wb-spinner { text-align: center;display: inline;position: relative;top: 2px;} 70 .zf-wb-spinner > div { 71 width: 11px; 72 height: 11px; 73 background-color: #333; 74 75 border-radius: 100%; 76 display: inline-block; 77 -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both; 78 animation: sk-bouncedelay 1.4s infinite ease-in-out both; 79 } 80 81 .zf-wb-spinner .bounce1 { 82 -webkit-animation-delay: -0.32s; 83 animation-delay: -0.32s; 84 } 85 86 .zf-wb-spinner .bounce2 { 87 -webkit-animation-delay: -0.16s; 88 animation-delay: -0.16s; 89 } 90 91 @-webkit-keyframes sk-bouncedelay { 92 0%, 80%, 100% { -webkit-transform: scale(0) } 93 40% { -webkit-transform: scale(1.0) } 94 } 95 96 @keyframes sk-bouncedelay { 97 0%, 80%, 100% { 98 -webkit-transform: scale(0); 99 transform: scale(0); 100 } 40% { 101 -webkit-transform: scale(1.0); 102 transform: scale(1.0); 103 } 104 } -
zoho-forms/tags/2.0/tinymce/zforms_dailog.js
r2047986 r2237525 96 96 document.getElementById("formSelectionError").style.display="block"; 97 97 document.getElementById("formSelectionError").innerHTML="Please select a form."; 98 document.getElementById("selctContainer").class List.add("errorCont");98 document.getElementById("selctContainer").className= "errorCont"; 99 99 } 100 100 else … … 110 110 formHeight.value="600px"; 111 111 } 112 var urlBuild = zForms[formName][1]; 112 var urlBuild = formName; 113 113 114 insertContent(urlBuild,formWidth.value,formHeight.value); 114 115 … … 126 127 document.getElementById("publicLink").className= "selected"; 127 128 document.getElementById("permaLinkDiv").style.display="block"; 128 document.getElementById("createFormDiv").style.display="none";129 129 document.getElementById("chooseFormDiv").style.display= "none"; 130 document.getElementById("signinDiv").style.display="none";131 document.getElementById("refreshDiv").style.display="none";132 130 document.getElementById("selectForm").classList.remove("selected"); 133 131 … … 138 136 if(window.tinyMCE) 139 137 { 140 window.open("https://www.zoho.com/forms/login.html"); 141 document.getElementById("refreshDiv").style.display="block"; 142 document.getElementById("signinDiv").style.display="none"; 138 var domainValue = $("#zForm_domain").val(); 139 var formsUrl = getZohoURL(domainValue); 140 if(formsUrl !=""){ 141 window.open(formsUrl+"/forms/login.html"); 142 document.getElementById("refreshDiv").style.display="block"; 143 document.getElementById("signinDiv").style.display="none"; 144 } 143 145 } 144 146 } … … 162 164 } 163 165 } 166 function showChooseFormDiv() 167 { 168 document.getElementById("selectForm").classList.add("selected"); 169 document.getElementById("chooseFormDiv").style.display="block"; 170 document.getElementById("permaLinkDiv").style.display= "none"; 171 document.getElementById("publicLink").className= "none"; 172 } 173 174 function proceedToSelectFormOnTinyMce(){ 175 var domainValue = $("#zForm_domain").val(); 176 if(domainValue == "-select-"){ 177 $("#domainSelectionErr").show(); 178 $("#domainSelectionDiv").addClass("errorCont"); 179 return; 180 } 181 var formsUrl = getZohoFormsURL(domainValue); 182 if(formsUrl !=""){ 183 getZohoFormsLisOnTinyMce(formsUrl); 184 $("#domainSelectionDiv").hide(); 185 $("#refreshDiv").hide(); 186 $("#loadingDiv").show(); 187 setTimeout(function() { 188 $("#loadingDiv").hide(); 189 if(a==""){ 190 $("#signinDiv").show(); 191 }else if(a.forms.length == 0){ 192 $("#createFormDiv").show(); 193 }else{ 194 getForms(); 195 $("#formSelectionDiv").show(); 196 } 197 198 }, 2000); 199 } 200 } 201 function getZohoFormsLisOnTinyMce(formsUrl){ 202 var apiURL = formsUrl+"/api/getforms?type=plugin"; 203 $("#loadingDiv").show(); 204 getFormsAndIncludeScriptOnTinyMce(apiURL,addToFormListDropDown); 205 } 206 207 function addToFormListDropDown(){ 208 if(a!=""){ 209 var len = a.forms.length; 210 if(len > 0){ 211 212 var formList =document.getElementById("formname"); 213 for(i = 0; i < len;i++){ 214 var option = document.createElement("option"); 215 option.text = a.forms[i].display_name; 216 option.value = a.forms[i].public_url; 217 formList.options.add(option); 218 } 219 $("#zFormSelectDiv").show(); 220 } 221 } 222 } 223 function getFormsAndIncludeScriptOnTinyMce(url,callback) 224 { 225 var script = document.createElement("script") 226 script.type = "text/javascript"; 227 if (script.readyState) 228 { 229 //IE 230 231 script.onreadystatechange = function(){ 232 if (script.readyState == "loaded" || script.readyState == "complete") 233 { 234 script.onreadystatechange = null; 235 callback(); 236 } 237 }; 238 } 239 else 240 { 241 //Others 242 script.onload = function(){ 243 callback(); 244 }; 245 script.onerror = function(){ 246 callback(); 247 }; 248 } 249 script.src = url; 250 document.getElementsByTagName("head")[0].appendChild(script); 251 } 252 //constructing url based on domain extention 253 function getZohoFormsURL(domain){ 254 if(domain != undefined && domain.length != 0 && domain != "-select-" && (domain == ".com" || domain == ".eu" || domain == ".com.cn" || domain == ".au" || domain == ".in")){ 255 return "https://forms.zoho"+domain; 256 }else{ 257 return ""; 258 } 259 } 260 function getZohoURL(domain){ 261 if(domain != undefined && domain.length != 0 && domain != "-select-"){ 262 return "https://zoho"+domain; 263 }else{ 264 return ""; 265 } 266 } 267 function hideDomainSelctError(){ 268 $("#domainSelectionDiv").removeClass("errorCont"); 269 $("#domainSelectionErr").hide(); 270 } 164 271 165 272 function hideError() 166 273 { 167 if(document.getElementById("selctContainer").classList.contains("errorCont")) 168 {274 if(document.getElementById("selctContainer").classList.contains("errorCont")){ 275 document.getElementById("formSelectionError").style.display="none"; 169 276 document.getElementById("selctContainer").classList.remove("errorCont"); 170 document.getElementById("formSelectionError").style.display="none";171 277 } 172 278 if(document.getElementById("permaContainer").classList.contains("errorCont")) … … 176 282 } 177 283 } 284 285 178 286 179 287 function selectForm() … … 225 333 function createForm() 226 334 { 227 window.open("https://forms.zoho.com/"); 228 document.getElementById("refreshDiv").style.display="block"; 229 document.getElementById("createFormDiv").style.display="none"; 230 document.getElementById("signinDiv").style.display="none"; 231 } 335 var domainValue = $("#zForm_domain").val(); 336 var formsUrl = getZohoFormsURL(domainValue); 337 if(formsUrl !=""){ 338 window.open(formsUrl); 339 document.getElementById("refreshDiv").style.display="block"; 340 document.getElementById("createFormDiv").style.display="none"; 341 document.getElementById("signinDiv").style.display="none"; 342 } 343 } -
zoho-forms/tags/2.0/tinymce/zforms_dialog.php
r2047986 r2237525 23 23 <div class="legandTabCont"> 24 24 <a href="javascript:void(0);" class="selected" id="publicLink" onclick="embedPerma()" > <em>Use Public Link</em></a> 25 <a class="lastTab" href="javascript:void(0);" id="selectForm" onclick=" chooseForm()"><em>Select Your Form</em></a>25 <a class="lastTab" href="javascript:void(0);" id="selectForm" onclick="showChooseFormDiv()"><em>Select Your Form</em></a> 26 26 <div class="clearBoth"></div> 27 27 </div> … … 36 36 </div> 37 37 38 <div class="twoColumns" >38 <div class="twoColumns" style="margin-top:20px"> 39 39 <div class="popupInnerWrapper flLeft"> 40 40 <label>Width </label> … … 58 58 </div> 59 59 60 61 60 <div class="popupOuterWrapper" id="chooseFormDiv" style="display:none"> 61 <div id="domainSelectionDiv" class="popupInnerWrapper" style="margin-top: 12%;"> 62 <label>Select the domain your Zoho account belongs to<em>*</em></label> 63 <div class="popupContainer zf-wb-dropWrapper" > 64 <select id="zForm_domain" onchange="hideDomainSelctError()"; style="width: 100%"> 65 <option value="-select-">-Select-</option> 66 <option value=".com">zoho.com</option> 67 <option value=".eu">zoho.eu</option> 68 <option value=".com.cn">zoho.com.cn</option> 69 <option value=".in">zoho.in</option> 70 <option value=".au">zoho.au</option> 71 </select> 72 </div> 73 <p id="domainSelectionErr" style="display:none">Please choose a domain.</p> 74 <div class="popupContainer popupFotter"> 75 <input class="blue" type="submit" value="Connect" onclick="proceedToSelectFormOnTinyMce();"> 76 </div> 77 </div> 78 79 80 <div class="popupInnerWrapper" id="formSelectionDiv" style="display:none"> 62 81 63 <div class="popupInnerWrapper">82 <div id="selctContainer"> 64 83 <label>Choose a form<em>*</em></label> 65 <div class="popupContainer " id="selctContainer">84 <div class="popupContainer zf-wb-dropWrapper"> 66 85 <select id="formname" onchange="hideError()"; style="width: 100%"> 67 86 <option>-Select-</option> 68 87 </select> 69 <p id="formSelectionError" />88 70 89 </div> 90 <p id="formSelectionError" /> 71 91 </div> 72 <div class="twoColumns" >92 <div class="twoColumns" style="margin-top:20px"> 73 93 <div class="popupInnerWrapper flLeft"> 74 94 <label>Width </label> … … 92 112 </div> 93 113 </div> 94 95 <div class="popupOuterWrapper" id="signinDiv" style="display:none"> 96 <div class="popupInnerWrapper"> 114 <div class="popupInnerWrapper" id="signinDiv" style="display:none"> 115 <div > 97 116 <div class="signWrapper"> 98 117 <p> Sign in to your Zoho Forms account to select a form. </p> … … 101 120 </div> 102 121 </div> 103 <div class="popup OuterWrapper" id="createFormDiv" style="display:none">104 <div class="popupInnerWrapper">122 <div class="popupInnerWrapper" id="createFormDiv" style="display:none"> 123 <div > 105 124 <div class="signWrapper"> 106 125 <p> You have not created any forms yet. Click on Create to build a new form. </p> … … 109 128 </div> 110 129 </div> 111 112 <div class="popupOuterWrapper" id="refreshDiv" style="display:none"> 113 <div class="popupInnerWrapper"> 130 <div class="popupInnerWrapper" id="refreshDiv" style="display:none"> 131 <div > 114 132 <div class="signWrapper"> 115 133 <p> Please Refresh to view your forms. </p> 116 <input class="blue" type="button" value="Refresh" id="button_refresh" onclick=" refresh()">134 <input class="blue" type="button" value="Refresh" id="button_refresh" onclick="proceedToSelectFormOnTinyMce()"> 117 135 </div> 118 136 </div> 119 137 120 138 </div> 121 139 <div id="loadingDiv" class="zf-wb-loading signWrapper" style="display: none;"> 140 <p>loading</p> 141 <div class="zf-wb-spinner"> 142 <div class="bounce1"></div> 143 <div class="bounce2"></div> 144 <div class="bounce3"></div> 145 </div> 146 </div> 147 </div> 122 148 <div class="brandingFotterWrapper"> 123 149 <div class="flRight brandingFotterCont"> -
zoho-forms/tags/2.0/zohoforms-block.js
r2209845 r2237525 283 283 }, 284 284 "zoho.in" 285 ), 286 wpCreateElem("option", 287 { 288 value: ".au" 289 }, 290 "zoho.au" 285 291 ) 286 292 )
Note: See TracChangeset
for help on using the changeset viewer.