login.js 740 B

123456789101112131415161718192021222324
  1. Ext.onReady(function() {
  2. if (top.frames.length !== 0) {
  3. top.location=self.document.location;
  4. }
  5. Ext.override(Ext.form.Field,{
  6. defaultAutoCreate: {tag: "input", type: "text", size: "20", autocomplete: "on" }
  7. });
  8. var fl = Ext.get('modx-fl-link');
  9. if (fl) { fl.on('click',MODx.loadFLForm); }
  10. var lu = Ext.get('modx-login-username');
  11. if (lu) { lu.focus(); }
  12. Ext.get('modx-login-language-select').on('change',function(e,cb) {
  13. var p = MODx.getURLParameters();
  14. p.cultureKey = cb.value;
  15. location.href = '?'+Ext.urlEncode(p);
  16. });
  17. });
  18. MODx.loadFLForm = function(a) {
  19. Ext.get('modx-fl-link').ghost().remove();
  20. Ext.get('modx-forgot-login-form').slideIn();
  21. };