[ckan-changes] commit/ckan: 5 new changesets
Bitbucket
commits-noreply at bitbucket.org
Fri Sep 9 07:31:40 UTC 2011
5 new changesets in ckan:
http://bitbucket.org/okfn/ckan/changeset/9b175853a362/
changeset: 9b175853a362
branch: feature-1294-ux-improvements-dataset
user: zephod
date: 2011-09-08 17:29:29
summary: [ux,package/new][s]: Glitchfix. Removed hidden last row of table. Paper bag on head.
affected #: 1 file (703 bytes)
--- a/ckan/templates/package/new_package_form.html Thu Sep 08 16:01:49 2011 +0100
+++ b/ckan/templates/package/new_package_form.html Thu Sep 08 16:29:29 2011 +0100
@@ -102,26 +102,6 @@
</td></tr></py:for>
- <tr class="hook-last-row" style="display: none;">
- <py:for each="col in c.resource_columns">
- <td py:choose="" class="resource-${col}">
- <input py:when="col == 'format'"
- name="resources__0__${col}"
- type="text" value=""
- class="autocomplete-format short"
- />
- <input py:otherwise=""
- name="resources__0__${col}"
- type="text"
- value=""
- class="${'medium-width' if col=='description' else 'short'}" />
- </td>
- </py:for>
- <td class="resource-id">
- <input name="resources__0__id" type="hidden" value="" />
- </td>
-
- </tr></tbody></table>
http://bitbucket.org/okfn/ckan/changeset/3d27159c3b69/
changeset: 3d27159c3b69
branch: feature-1294-ux-improvements-dataset
user: rgrp
date: 2011-09-08 19:02:57
summary: [refactor,template/layout][xs]: always include direct github ckanjs link (to avoid worries about script include order).
affected #: 1 file (77 bytes)
--- a/ckan/templates/layout_base.html Thu Sep 08 16:29:29 2011 +0100
+++ b/ckan/templates/layout_base.html Thu Sep 08 18:02:57 2011 +0100
@@ -53,8 +53,8 @@
<script type="text/javascript" src="${g.site_url}/scripts/vendor/showdown/showdown.js"></script><script type="text/javascript" src="${g.site_url}/scripts/vendor/jquery.fileupload/20110801/jquery.iframe-transport.js"></script><script type="text/javascript" src="${g.site_url}/scripts/vendor/jquery.fileupload/20110801/jquery.fileupload.js"></script>
+ <script src="https://raw.github.com/okfn/ckanjs/master/pkg/ckanjs.js"></script><script type="text/javascript" src="${g.site_url}/scripts/ckanjs.js"></script>
- <!--script><![CDATA[window.CKAN.Client || document.write("<script src='https://raw.github.com/okfn/ckanjs/master/pkg/ckanjs.js'>\x3C/script>")]]></script--><!-- finally our application js that sets everything up--><script type="text/javascript" src="${g.site_url}/scripts/application.js?lang=${c.locale}"></script><script type="text/javascript" src="${g.site_url}/scripts/templates.js"></script>
http://bitbucket.org/okfn/ckan/changeset/ccf2a54d016f/
changeset: ccf2a54d016f
branch: feature-1294-ux-improvements-dataset
user: rgrp
date: 2011-09-08 19:03:27
summary: [refactor,js][s]: remove unused DatasetFullForCore view.
affected #: 1 file (3.1 KB)
--- a/ckan/public/scripts/application.js Thu Sep 08 18:02:57 2011 +0100
+++ b/ckan/public/scripts/application.js Thu Sep 08 18:03:27 2011 +0100
@@ -463,109 +463,3 @@
}
});
-
-CKAN.View.DatasetFullForCore = Backbone.View.extend({
- initialize: function() {
- _.bindAll(this, 'render');
- this.model.bind('change', this.render);
-
- // slightly painful but we have to set this up here so
- // it has access to self because when called this will
- // be overridden and refer to the element in dom that
- // was being saved
- var self = this;
- this.saveFromEditable = function(value, settings) {
- var _attribute = $(this).attr('backbone-attribute');
- var _data = {};
- _data[_attribute] = value;
- self.model.set(_data);
- self.model.save({}, {
- success: function(model) {
- CKAN.View.flash('Saved updated notes');
- },
- error: function(model, error) {
- CKAN.View.flash('Error saving notes ' + error.responseText, 'error');
- }
- });
- // do not worry too much about what we return here
- // because update of model will automatically lead to
- // re-render
- return value;
- };
- },
-
- events: {
- 'click .action-resource-add': 'showResourceAdd'
- },
-
- render: function() {
- },
-
- setupEditable: function() {
- var self = this;
- this.el.find('.editable-area').editable(
- self.saveFromEditable, {
- type : 'textarea',
- cancel : 'Cancel',
- submit : 'OK',
- tooltip : 'Click to edit...',
- onblur : 'ignore',
- data : function(value, settings) {
- var _attribute = $(this).attr('backbone-attribute');
- return self.model.get(_attribute);
- }
- }
- );
- },
-
- showResourceAdd: function(e) {
- var self = this;
- e.preventDefault();
- var $el = $('<div />').addClass('resource-add-dialog');
- $('body').append($el);
- var resource = new CKAN.Model.Resource({
- 'dataset': self.model
- });
- function handleNewResourceSave(model) {
- var res = self.model.get('resources');
- res.add(model);
- $el.dialog('close');
- self.model.save({}, {
- success: function(model) {
- CKAN.View.flash('Saved dataset');
- // TODO: no need to re-render (should happen automatically)
- self.render();
- }
- , error: function(model, error) {
- CKAN.View.flash('Failed to save: ' + error, 'error');
- }
- });
- }
- resource.bind('change', handleNewResourceSave);
- var resourceView = new CKAN.View.ResourceCreate({
- el: $el,
- model: resource
- });
- resourceView.render();
- dialogOptions = {
- autoOpen: false,
- // does not seem to work for width ...
- position: ['center', 'center'],
- buttons: [],
- width: 660,
- resize: 'auto',
- modal: false,
- draggable: true,
- resizable: true
- };
- dialogOptions.title = 'Add Data (File, API, ...)';
- $el.dialog(dialogOptions);
- $el.dialog('open');
- $el.bind("dialogbeforeclose", function () {
- self.el.find('.resource-add-dialog').remove();
- });
- }
- });
-
-
-
http://bitbucket.org/okfn/ckan/changeset/3365b7ccc4db/
changeset: 3365b7ccc4db
branch: feature-1294-ux-improvements-dataset
user: rgrp
date: 2011-09-08 21:27:02
summary: [js/vendor][xs]: bump jquery version to 1.6.2 as >= 1.6 is needed by jquery.fileupload (use of .prop method).
affected #: 3 files (230.7 KB)
Diff too large to display.
http://bitbucket.org/okfn/ckan/changeset/a3ce2d9de5de/
changeset: a3ce2d9de5de
branch: feature-1294-ux-improvements-dataset
user: rgrp
date: 2011-09-09 09:30:40
summary: [js/templates,ux][s]: (refs #878) minor fixes to add resource via file upload template.
* file upload now working on resource edit (though more to be done)!
affected #: 1 file (76 bytes)
--- a/ckan/public/scripts/templates.js Thu Sep 08 20:27:02 2011 +0100
+++ b/ckan/public/scripts/templates.js Fri Sep 09 08:30:40 2011 +0100
@@ -45,10 +45,12 @@
';
CKAN.Templates.resourceUpload = ' \
+<div class="fileupload"> \
<form action="http://test-ckan-net-storage.commondatastorage.googleapis.com/" class="resource-upload" \
enctype="multipart/form-data" \
method="POST"> \
\
+ <div class="hidden-inputs"></div> \
<dl> \
<dt> \
<label class="field_opt fileinput-button" for="file"> \
@@ -65,6 +67,7 @@
</form> \
<div class="messages" style="display: none;"></div> \
</div> \
+</div> \
';
CKAN.Templates.resourceEntry = ' \
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