2010-06-13 Steffen Kamper <info@sk-typo3.de>
+ * Fixed bug #14640: Improve cookie detection at login screen (Thanks to Steffen Gebert)
* Fixed bug #14565: There is no way to disable compress and concatenate
* Fixed bug #14545: [No Title] shown when editing a record on root level (Thanks to Reinhard Fuehricht)
* Fixed bug #14681: Use self:: for static method calls with classname:: within the same class in t3lib (Thanks to Sebastian Michaelsen)
TYPO3BackendLogin.registerEventListeners();
TYPO3BackendLogin.setVisibilityOfClearIcon($('t3-username'), $('t3-username-clearIcon'));
TYPO3BackendLogin.setVisibilityOfClearIcon($('t3-password'), $('t3-password-clearIcon'));
+ TYPO3BackendLogin.checkCookieSupport();
TYPO3BackendLogin.checkForLogintypeCookie();
TYPO3BackendLogin.checkForInterfaceCookie();
$('t3-username').activate();
TYPO3BackendLogin.setLogintypeCookie('username');
},
-
+
+ /**
+ * Checks browser's cookie support
+ */
+ checkCookieSupport: function() {
+ Ext.util.Cookies.set('typo3-login-cookiecheck', true);
+ cookieEnabled = Ext.util.Cookies.get('typo3-login-cookiecheck');
+
+ if (!cookieEnabled) {
+ TYPO3BackendLogin.showCookieWarning()
+ }
+
+ Ext.util.Cookies.clear('typo3-login-cookiecheck');
+ },
+
+ /**
+ * Hides input fields and shows cookie warning
+ */
+ showCookieWarning: function() {
+ Ext.get('t3-login-form-fields').setVisibilityMode(Ext.Element.DISPLAY).hide();
+ Ext.get('t3-nocookies-error').show();
+ },
+
+ /**
+ * Hides cookie warning and shows input fields
+ */
+ hideCookieWarning: function() {
+ Ext.get('t3-nocookies-error').setVisibilityMode(Ext.Element.DISPLAY).hide();
+ Ext.get('t3-login-form-fields').show();
+ },
+
/**
* Store a login type in a cookie to save it for future visits
* Login type means wether you login by username/password or OpenID
}
};
-Event.observe(window, 'load', TYPO3BackendLogin.start);
+Ext.onReady(TYPO3BackendLogin.start, TYPO3BackendLogin);
</noscript>
<div id="t3-nocookies-error" class="t3-login-alert t3-login-alert-warning" style="display:none">
<h2>###ERROR_COOKIES###</h2>
+ <div id="t3-nocookies-ignore"><a href="#" onclick="TYPO3BackendLogin.hideCookieWarning()">###ERROR_COOKIES_IGNORE###</a></div>
</div>
<div id="t3-login-process" style="display: none">
<h2>###LOGIN_PROCESS###</h2>
</div>
###FORM###
<div class="t3-login-bottomBorder"></div>
- <script type="text/javascript">
- /*<![CDATA[*/
- document.cookie = "typo3-login-cookiecheck";
- cookieEnabled = (document.cookie.indexOf("typo3-login-cookiecheck") != -1) ? true : false;
- if (cookieEnabled) {
- document.getElementById("t3-login-form-fields").style.display = 'block';
- }
- else {
- document.getElementById("t3-nocookies-error").style.display = 'block';
- }
- /*]]>*/
- </script>
<script type="text/javascript" src="sysext/t3skin/resources/login.js"></script>
</div>
<div class="shadow-box-bottom-424"></div>