[ckan-changes] commit/ckan: zephod: [welcome][s]: Fixed in Firefox. Don't welcome logged-in users.

Bitbucket commits-noreply at bitbucket.org
Fri Oct 21 16:45:49 UTC 2011


1 new changeset in ckan:

http://bitbucket.org/okfn/ckan/changeset/441e615cacc2/
changeset:   441e615cacc2
branch:      release-v1.5
user:        zephod
date:        2011-10-21 18:45:41
summary:     [welcome][s]: Fixed in Firefox. Don't welcome logged-in users.
affected #:  1 file (-1 bytes)

--- a/ckan/public/scripts/application.js	Fri Oct 21 17:35:59 2011 +0100
+++ b/ckan/public/scripts/application.js	Fri Oct 21 17:45:41 2011 +0100
@@ -1,5 +1,7 @@
 (function ($) {
   $(document).ready(function () {
+    CKAN.Utils.isLoggedIn = Boolean($.cookie("ckan_display_name"));
+
     CKAN.Utils.setupUserAutocomplete($('input.autocomplete-user'));
     CKAN.Utils.setupAuthzGroupAutocomplete($('input.autocomplete-authzgroup'));
     CKAN.Utils.setupPackageAutocomplete($('input.autocomplete-dataset'));
@@ -24,7 +26,7 @@
     var isGroupNew = $('body.group.new').length > 0;
 
     // Two main entrance-points to the site:
-    if (isFrontPage || isDatasetView) {
+    if (!CKAN.Utils.isLoggedIn && (isFrontPage || isDatasetView)) {
       CKAN.Utils.setupTopBar($('.top-bar'));
     }
 
@@ -121,7 +123,6 @@
 
     // Bind to the close button
     topBar.find('.js-kill-button').live('click', function() {
-      console.log('killing top-bar');
       $.cookie(cookieName, 'true', { expires: 365 });
       topBar.hide();
     });

Repository URL: https://bitbucket.org/okfn/ckan/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.




More information about the ckan-changes mailing list