[ckan-changes] commit/ckan: 4 new changesets

Bitbucket commits-noreply at bitbucket.org
Tue Sep 6 11:25:48 UTC 2011


4 new changesets in ckan:

http://bitbucket.org/okfn/ckan/changeset/42b9540edad7/
changeset:   42b9540edad7
branch:      feature-1296-inline-add-resources
user:        zephod
date:        2011-09-06 11:26:10
summary:     [close-branch]: Closing when unfinished. About to replace with another branch.
affected #:  0 files (0 bytes)

http://bitbucket.org/okfn/ckan/changeset/ffdb8f165d66/
changeset:   ffdb8f165d66
branch:      feature-1294-ux-improvements-dataset
user:        zephod
date:        2011-09-06 11:34:25
summary:     [merge,between-branch][s]: Pulling in feature 1296 work from an incomplete (and now closed) branch.
affected #:  13 files (210.8 KB)
Diff too large to display.
http://bitbucket.org/okfn/ckan/changeset/61d0b494cd91/
changeset:   61d0b494cd91
branch:      feature-1294-ux-improvements-dataset
user:        zephod
date:        2011-09-06 11:51:20
summary:     [ux][s]: Fixes to get inline adding of resources working again. Very minor.
affected #:  2 files (273 bytes)

--- a/ckan/public/scripts/application.js	Tue Sep 06 10:34:25 2011 +0100
+++ b/ckan/public/scripts/application.js	Tue Sep 06 10:51:20 2011 +0100
@@ -17,7 +17,7 @@
     };
     if (isPackageRead) {
       var dataset = client.getDatasetById(LOCAL_packageId);
-      var $el = $('#package');
+      var $el = $('#dataset');
       
       var view = new CKAN.View.DatasetFullForCore({
         model: dataset,
@@ -304,7 +304,6 @@
     initialize: function() {
       _.bindAll(this, 'render');
       this.model.bind('change', this.render);
-      console.log(this.el);
 
       // slightly painful but we have to set this up here so
       // it has access to self because when called this will


--- a/ckan/templates/package/read_core.html	Tue Sep 06 10:34:25 2011 +0100
+++ b/ckan/templates/package/read_core.html	Tue Sep 06 10:51:20 2011 +0100
@@ -10,11 +10,10 @@
       ${c.pkg_notes_formatted}
     </div>
     
-    <!-- Downloads and resources -->
+    <!-- Resources --><div class="resources subsection">
-      <h3>Downloads & Resources</h3>
-      <py:choose test="">
-      <table py:when="c.pkg_dict.get('resources', [])">
+      <h3>Resources</h3>
+      <table><tr><th>Description</th><th>Format</th>
@@ -42,13 +41,9 @@
             <a href="${h.url_for(controller='package', action='edit', id=c.pkg.name)}"
               class="action-resource-add"
               >
-              add it to the list
-            </a>
-            .
+              add it to the list</a>.
         </caption></table>
-      <table py:otherwise=""><tr><th>Resources</th><td>None given for this dataset.</td></tr></table>
-      </py:choose></div><hr class="cleared" />


http://bitbucket.org/okfn/ckan/changeset/299efdd4b6d2/
changeset:   299efdd4b6d2
branch:      feature-1294-ux-improvements-dataset
user:        zephod
date:        2011-09-06 13:12:42
summary:     [ux][m]: Dataset edit form broken into sections; tabs on the right select section to show.
affected #:  3 files (2.6 KB)

--- a/ckan/public/css/style.css	Tue Sep 06 10:51:20 2011 +0100
+++ b/ckan/public/css/style.css	Tue Sep 06 12:12:42 2011 +0100
@@ -682,3 +682,38 @@
   margin-right: 10px;
 }
 
+/**************************************
+ * Edit Dataset Page
+ *************************************/
+ul.edit-form-navigation {
+  list-style-type: none;
+  padding-left: 0;
+}
+ul.edit-form-navigation li a {
+  text-decoration: none;
+  font-weight: bold;
+  display: block;
+  padding: 7px 0 7px 10px;
+  margin-bottom: 7px;
+  border: 1px transparent solid;
+}
+ul.edit-form-navigation li a.active,  
+ul.edit-form-navigation li a:hover {
+  border: 1px solid #e0e0e0;
+  background-color: #e2e2e2;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#f0f0f0), to(#e2e2e2)); 
+  background-image: -webkit-linear-gradient(top, #f0f0f0, #e2e2e2); 
+  background-image:    -moz-linear-gradient(top, #f0f0f0, #e2e2e2); 
+  background-image:     -ms-linear-gradient(top, #f0f0f0, #e2e2e2); 
+  background-image:      -o-linear-gradient(top, #f0f0f0, #e2e2e2); 
+  background-image:         linear-gradient(top, #f0f0f0, #e2e2e2);
+            filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#f0f0f0', EndColorStr='#e2e2e2');
+
+     -moz-border-radius: 5px; 
+  -webkit-border-radius: 5px; 
+          border-radius: 5px; 
+  -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box; 
+}
+
+
+


--- a/ckan/public/scripts/application.js	Tue Sep 06 10:51:20 2011 +0100
+++ b/ckan/public/scripts/application.js	Tue Sep 06 12:12:42 2011 +0100
@@ -5,6 +5,7 @@
     CKAN.Utils.setupPackageAutocomplete($('input.autocomplete-dataset'));
     CKAN.Utils.setupTagAutocomplete($('input.autocomplete-tag'));
     CKAN.Utils.setupFormatAutocomplete($('input.autocomplete-format'));
+    CKAN.Utils.setupDatasetEditNavigation();
 
     var isPackageRead = $('body.package.read').length > 0;
     var config = {
@@ -185,6 +186,30 @@
     });
   };
 
+  my.setupDatasetEditNavigation = function() {
+    function showSection(sectionToShowId) {
+      $('.dataset fieldset').hide();
+      $('.dataset fieldset#'+sectionToShowId).show();
+      $('.edit-form-navigation li a').removeClass('active');
+      $('.edit-form-navigation li a[href=#'+sectionToShowId+']').addClass('active');
+      // Unfortunately, scrolls page (which we don't want). Would be a nice extra but not vital.
+      // window.location.hash = sectionToShowId;
+    }
+
+    // Set up initial form state
+    var initialSection = window.location.hash.slice(1) || 'basic-information';
+    showSection(initialSection);
+    
+    // Adjust form state on click
+    $('.edit-form-navigation li a').live('click', function(e) {
+      var $el = $(e.target);
+      var showMe = $el.attr('href').slice(1);
+      showSection(showMe);
+      return false;
+    });  
+
+  };
+
   // Name slug generator for $name element using $title element
   //
   // Also does nice things like show errors if name not available etc


--- a/ckan/templates/package/edit.html	Tue Sep 06 10:51:20 2011 +0100
+++ b/ckan/templates/package/edit.html	Tue Sep 06 12:12:42 2011 +0100
@@ -14,6 +14,19 @@
     <link rel="stylesheet" href="${g.site_url}/css/flexitable.css" /></py:def>
 
+  <py:match path="primarysidebar">
+    <li class="widget-container widget_text">
+      <ul class="edit-form-navigation">
+        <!-- One button for each fieldset -->
+        <li><a class="active" href="#basic-information">Basic Information</a></li>
+        <li><a class="" href="#resources">Resources</a></li>
+        <li><a class="" href="#groups">Groups</a></li>
+        <li><a class="" href="#detail">Details</a></li>
+        <li><a class="" href="#extras">Extras</a></li>
+      </ul>
+    </li>
+  </py:match>
+
   <div py:match="content" class="dataset"><div id="preview" style="margin-left: 20px;" py:if="c.preview"><hr />

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