Day: November 8, 2015

禁止点击背景而关闭bootstrap弹出框 Disable click outside of bootstrap model area to close modal

On Options chapter, in the page you linked, you can see the backdrop option. Passing this option with value 'static' will prevent closing the modal. As @PedroVagner pointed on comments, you also can pass {keyboard: false} to prevent closing the modal by pressing Esc. If you opening the modal by js use: $('#myModal').modal({backdrop: 'static', keyboard:… Read

调整谷歌reCAPTCHA大小 How to resize the Google noCAPTCHA reCAPTCHA

最近调试reCAPTCHA的时候,发现手机版的reCAPTCHA会不适应大小: 经修改后应该为: 代码如下: .g-recaptcha {transform:scale(0.77);-webkit-transform:scale(0.77);transform-origin:0 0;-webkit-transform-origin:0 0;} 或者: @media screen and (max-height: 575px){ .g-recaptcha {transform:scale(0.77);-webkit-transform:scale(0.77);transform-origin:0 0;-webkit-tran… Read More

Magento 获取已登录用户的信息– Get Logged In Customer’s Full Name, First Name, Last Name and Email Address

// Check if any customer is logged in or not if (Mage::getSingleton('customer/session')->isLoggedIn()) { // Load the customer's data $customer = Mage::getSingleton('customer/session')->getCustomer(); $customer->getPrefix(); $customer->getName(); // Full Name $customer->getFirstname(); // First Name $customer->g… Read More