[ckan-changes] commit/ckan: zephod: [js][s]: Didn't mean to commit so much. Repaired Create Group form.

Bitbucket commits-noreply at bitbucket.org
Tue Nov 1 19:15:21 UTC 2011


1 new commit in ckan:


https://bitbucket.org/okfn/ckan/changeset/6c811062bc10/
changeset:   6c811062bc10
branch:      release-v1.5
user:        zephod
date:        2011-11-01 20:15:14
summary:     [js][s]: Didn't mean to commit so much. Repaired Create Group form.
affected #:  3 files

diff -r 13fe6ae084a83029c3589abf597c87c41911091a -r 6c811062bc10b43ce7cdceac7ee7a22e4191274b ckan/public/css/style.css
--- a/ckan/public/css/style.css
+++ b/ckan/public/css/style.css
@@ -972,6 +972,10 @@
 .group-create-form .state-field {
   display: none;
 }
+.group-create-form a.url-edit {
+  font-weight: normal;
+  margin-left: 10px;
+}
 
 
 


diff -r 13fe6ae084a83029c3589abf597c87c41911091a -r 6c811062bc10b43ce7cdceac7ee7a22e4191274b ckan/public/scripts/application.js
--- a/ckan/public/scripts/application.js
+++ b/ckan/public/scripts/application.js
@@ -18,11 +18,6 @@
       client: client
     };
 
-    var isFrontPage = $('body.index.home').length > 0;
-    if (isFrontPage) {
-      CKAN.Utils.setupWelcomeBanner($('.js-welcome-banner'));
-    }
-
     var isDatasetView = $('body.package.read').length > 0;
     if (isDatasetView) {
       var _dataset = new CKAN.Model.Dataset(preload_dataset);
@@ -90,15 +85,6 @@
     messageDiv.show(1200);
   };
 
-  // Animate the appearance of an element by expanding its height
-  my.animateHeight = function(element, animTime) {
-    if (!animTime) animTime = 350;
-    element.show();
-    var finalHeight = element.height();
-    element.height(0);
-    element.animate({height:finalHeight}, animTime);
-  }
-
   my.bindInputChanges = function(input, callback) {
     input.keyup(callback);
     input.keydown(callback);
@@ -106,20 +92,6 @@
     input.change(callback);
   };
 
-  my.setupWelcomeBanner = function(banner) {
-
-    var cookieName = 'ckan_killtopbar';
-    var isKilled = ($.cookie(cookieName)!=null);
-    if (!isKilled) {
-      banner.show();
-      // Bind to the close button
-      banner.find('.js-kill-button').live('click', function() {
-        $.cookie(cookieName, 'true', { expires: 365 });
-        banner.hide();
-      });
-    }
-  };
-
   my.setupUrlEditor = function(slugType,readOnly) {
     // Page elements to hook onto
     var titleInput = $('.js-title');
@@ -128,14 +100,6 @@
     var urlInput = $('.js-url-input');
     var validMsg = $('.js-url-is-valid');
 
-    console.log(titleInput);
-    console.log(urlText);
-    console.log(urlSuffix);
-    console.log(urlInput);
-    console.log(validMsg);
-
-
-
     var api_url = '/api/2/util/is_slug_valid';
     // (make length less than max, in case we need a few for '_' chars to de-clash slugs.)
     var MAX_SLUG_LENGTH = 90;


diff -r 13fe6ae084a83029c3589abf597c87c41911091a -r 6c811062bc10b43ce7cdceac7ee7a22e4191274b ckan/templates/group/new_group_form.html
--- a/ckan/templates/group/new_group_form.html
+++ b/ckan/templates/group/new_group_form.html
@@ -19,8 +19,8 @@
 
     <dt><label class="field_opt" for="title">Url</label></dt><dd class="name-field">
-      <span class="url-text">${g.site_url+h.url_for(controller='group',id=None)+'/'}<span class="js-url-viewmode js-url-suffix"> </span><a style="display: none;" href="#" class="url-edit js-url-editlink js-url-viewmode">(edit)</a></span>
-      <input style="display: none;" id="name" maxlength="100" name="name" type="text" class="url-slug-editor js-url-editmode js-url-slug-editor" value="${data.get('name', '')}" />
+      <span class="js-url-text url-text">${g.site_url+h.url_for(controller='group',id=None)+'/'}<span class="js-url-viewmode js-url-suffix"> </span><a style="display: none;" href="#" class="url-edit js-url-editlink js-url-viewmode">(edit)</a></span>
+      <input style="display: none;" id="name" maxlength="100" name="name" type="text" class="url-input js-url-editmode js-url-input" value="${data.get('name', '')}" /><p class="js-url-is-valid"> </p></dd><dd style="display: none;" class="js-url-editmode instructions basic">2+ chars, lowercase, using only 'a-z0-9' and '-_'</dd>

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