Commits

Davi Medeiros  committed 95abe0c

Adds login slider resources

  • Participants
  • Parent commits 9244df8

Comments (0)

Files changed (2)

File ploneorgbr/portal/theme/skins/images/login_btn.png

Added
New image

File ploneorgbr/portal/theme/skins/javascripts/login.js

+$(function(){
+
+    var url = window.location.href;
+    $("#login-link").click(function() {
+        // the login template is static html so we define came_from
+        // here as there is no TAL available
+        $('#came-from-input').val(url);
+        $("#login-popup").slideToggle();
+        return false;
+    });
+
+    $("#login-slide-form").submit(function(){
+    // for testing purposes, we want the form action to point to
+    // /plone.org/login_form if we are local or staging
+    if(url.indexOf('http://plone.org.br') != 0 && url.indexOf('https://plone.org.br') != 0){
+        if(url.indexOf('http://staging.plone.org.br') == 0 || url.indexOf('https://staging.plone.org.br') == 0){
+            $(this).attr('action', 'https://staging.plone.org/login_form');
+        } else {
+            $(this).attr('action', '/plone.org.br/login_form');
+        }
+    }
+});
+
+});