[ckan-changes] commit/ckan: 5 new changesets
Bitbucket
commits-noreply at bitbucket.org
Wed Oct 12 17:50:21 UTC 2011
5 new changesets in ckan:
http://bitbucket.org/okfn/ckan/changeset/7e2bccf6e583/
changeset: 7e2bccf6e583
branch: feature-1368-ux-fixes
user: zephod
date: 2011-10-10 17:14:22
summary: [ux][m]: Revised the unsaved changes notice.
affected #: 2 files (-1 bytes)
--- a/ckan/public/scripts/application.js Mon Oct 10 12:14:06 2011 +0100
+++ b/ckan/public/scripts/application.js Mon Oct 10 16:14:22 2011 +0100
@@ -60,6 +60,16 @@
var CKAN = CKAN || {};
CKAN.Utils = function($, my) {
+
+ my.flashMessage = function(msg, category) {
+ if (!category) {
+ category = 'info';
+ }
+ var messageDiv = $('<div />').html(msg).addClass(category).hide();
+ $('.flash-messages').append(messageDiv);
+ messageDiv.show('slow');
+ };
+
// Attach dataset autocompletion to provided elements
//
// Requires: jquery-ui autocomplete
@@ -396,6 +406,7 @@
var boundToUnload = false;
this.el.change(function() {
if (!boundToUnload) {
+ CKAN.Utils.flashMessage(CKAN.Strings.youHaveUnsavedChanges,'notice');
boundToUnload = true;
window.onbeforeunload = function () {
return CKAN.Strings.youHaveUnsavedChanges;
--- a/ckan/templates/layout_base.html Mon Oct 10 12:14:06 2011 +0100
+++ b/ckan/templates/layout_base.html Mon Oct 10 16:14:22 2011 +0100
@@ -81,7 +81,7 @@
</header></div><py:with vars="messages = list(h._flash.pop_messages())">
- <div class="class container" py:if="len(messages)">
+ <div class="flash-messages container"><div class="${m.category}" py:for="m in messages">
${h.literal(m)}
</div>
http://bitbucket.org/okfn/ckan/changeset/9a3f2229c2c6/
changeset: 9a3f2229c2c6
branch: feature-1368-ux-fixes
user: zephod
date: 2011-10-11 20:40:45
summary: [ux][m]: Rewrote and refined the resource interface...again
affected #: 6 files (-1 bytes)
--- a/ckan/public/css/forms.css Mon Oct 10 16:14:22 2011 +0100
+++ b/ckan/public/css/forms.css Tue Oct 11 19:40:45 2011 +0100
@@ -117,37 +117,6 @@
color: #555;
font-size: 90%;
}
-
-form table thead th.form-label {
- width: 23%;
- display: none;
-}
-form table thead th.form-value {
- width: 27%;
- display: none;
-}
-form table tbody tr td.form-label,
-form table tbody tr td.form-value {
- font-size: 0.92em;
- line-height: 1.5em;
- padding-top: 0;
- padding-bottom: 4px;
- white-space: nowrap;
- background: inherit;
-}
-form table tbody tr td.form-label {
- text-align: right;
- font-weight: bold;
- padding-right: 4px;
- vertical-align: middle;
-}
-form table tbody tr td.form-value {
- padding-left: 4px;
- border-left: 1px dashed #aaa;
-}
-form table td.form-value input {
- width: 100%;
-}
label.has-errors, label.fieldWithErrors {
font-weight: bold;
--- a/ckan/public/css/style.css Mon Oct 10 16:14:22 2011 +0100
+++ b/ckan/public/css/style.css Tue Oct 11 19:40:45 2011 +0100
@@ -807,31 +807,6 @@
}
-table.resource-table tbody tr td.resource-expand-link,
-table.resource-table tbody tr td.resource-is-changed {
- vertical-align: top;
-}
-
-td.resource-expanded {
- padding: 8px 0 8px 0;
-}
-td.resource-expand-link {
- padding-top: 6px;
- text-align: center;
-}
-th.resource-expand-link,
-td.resource-expand-link,
-th.resource-is-changed,
-td.resource-is-changed {
- text-align: center;
- padding: 8px 0 0 0;
- width: 20px;
-}
-
-div.inner table {
- margin-bottom: 0;
-}
-
/* ====================== */
/* = Add Resources Page = */
/* ====================== */
@@ -840,7 +815,7 @@
width: 60%;
}
-button.delete-resource {
+button.done-editing {
float: right;
}
@@ -1240,3 +1215,94 @@
color: #000;
}
+/* ============================= */
+/* = Inline resource edit form = */
+/* ============================= */
+
+
+
+/*
+table.resource-table tbody tr td.resource-delete-link {
+ vertical-align: top;
+}
+
+td.resource-expanded {
+ padding: 8px 0 8px 0;
+}
+.resource-expand-link,
+.resource-delete-link {
+ padding-top: 6px;
+ text-align: center;
+ width: 20px;
+}
+div.inner {
+ padding-right: 10px;
+}
+div.inner table {
+ margin-bottom: 0;
+}
+*/
+th.resource-edit-delete,
+td.resource-edit-delete {
+ /* Override screen.css */
+ padding: 0;
+ width: 40px;
+}
+td.resource-edit-delete img {
+ padding: 8px;
+}
+a.resource-edit-expand {
+ padding-left: 13px;
+ background-position: left center;
+ background-repeat: no-repeat;
+}
+td.resource-edit {
+ padding: 10px;
+ vertical-align: top;
+}
+.resource-edit-expanded {
+ overflow: hidden;
+ margin: 0;
+}
+.resource-edit-expanded table {
+ /* Override screen.css */
+ margin: 10px 0;
+}
+table.resource-table td.resource-edit tbody td {
+ /* Override alternating background */
+ background: transparent;
+}
+td.resource-edit-delete {
+ vertical-align: top;
+ text-align: center;
+}
+td.resource-edit input {
+ /* Override forms.css */
+ width: 100%;
+}
+th.resource-edit-label {
+ width: 23%;
+ display: none;
+}
+th.resource-edit-value {
+ width: 27%;
+ display: none;
+}
+td.resource-edit-label,
+td.resource-edit-value {
+ font-size: 0.92em;
+ line-height: 1.5em;
+ padding-top: 0;
+ padding-bottom: 4px;
+ background: inherit;
+}
+td.resource-edit-label {
+ text-align: right;
+ font-weight: bold;
+ padding-right: 4px;
+ vertical-align: middle;
+}
+td.resource-edit-value {
+ padding-left: 4px;
+ border-left: 1px dashed #aaa;
+}
--- a/ckan/public/scripts/application.js Mon Oct 10 16:14:22 2011 +0100
+++ b/ckan/public/scripts/application.js Tue Oct 11 19:40:45 2011 +0100
@@ -515,12 +515,10 @@
initialize: function() {
_.bindAll(this, 'render', 'toggleExpanded');
var self = this;
- this.model.bind('change', function() { self.hasChanged=true; });
this.model.bind('change', this.render());
this.position = this.options.position;
this.expanded = this.model.isNew();
- this.hasChanged = this.model.isNew();
this.animate = this.model.isNew();
},
@@ -532,29 +530,42 @@
var $newRow = $.tmpl(CKAN.Templates.resourceEntry, tmplData);
this.el.html($newRow);
- if (this.expanded) {
- this.el.find('a.resource-expand-link').hide();
- this.el.find('.resource-summary').hide();
- if (this.animate) {
- this.el.find('.resource-expanded .inner').hide();
- this.el.find('.resource-expanded .inner').show('slow');
+ var expandedTable = this.el.find('.js-resource-edit-expanded');
+
+ var animTime = 350;
+ if (!this.animate) {
+ if (!this.expanded) {
+ expandedTable.hide();
}
+ }
+ else if (this.expanded) {
+ var finalHeight = expandedTable.height();
+ expandedTable.height(0).animate(
+ {height:finalHeight},
+ animTime
+ );
+ this.el.find('.js-resource-edit-name').focus();
}
else {
- this.el.find('a.resource-collapse-link').hide();
- this.el.find('.resource-expanded').hide();
+ expandedTable.animate(
+ {height:0},
+ animTime,
+ function() { expandedTable.hide(); }
+ );
}
+ arrow_icon = this.expanded? 'open' : 'closed';
+ this.el.find('.js-resource-edit-toggle').css("background-image", "url('/images/icons/arrow-"+arrow_icon+".gif')");
- if (!this.hasChanged) {
- this.el.find('img.resource-is-changed').hide();
- }
this.animate = false;
},
events: {
- 'click a.resource-expand-link': 'toggleExpanded',
- 'click a.resource-collapse-link': 'toggleExpanded',
- 'click .delete-resource': 'clickDelete'
+ 'click .js-resource-edit-toggle': 'toggleExpanded',
+ 'click .js-resource-edit-delete': 'clickDelete',
+ 'change input.js-resource-edit-name': 'nameChanged',
+ 'keydown input.js-resource-edit-name': 'nameChanged',
+ 'keyup input.js-resource-edit-name': 'nameChanged',
+ 'keypressed input.js-resource-edit-name': 'nameChanged',
},
clickDelete: function(e) {
@@ -562,6 +573,13 @@
this.options.deleteResource();
},
+ nameChanged: function(e) {
+ var newName = $(e.target).val();
+ $link = this.el.find('.js-resource-edit-toggle');
+ newName = newName || CKAN.Strings.noNameBrackets;
+ $link.html(newName);
+ },
+
saveData: function() {
this.model.set(this.getData(), {
error: function(model, error) {
--- a/ckan/public/scripts/templates.js Mon Oct 10 16:14:22 2011 +0100
+++ b/ckan/public/scripts/templates.js Tue Oct 11 19:40:45 2011 +0100
@@ -64,44 +64,26 @@
CKAN.Templates.resourceEntry = ' \
- <td class="resource-expand-link"> \
- <a class="resource-expand-link" href="#"><img src="/images/icons/edit-expand.png" /></a> \
- <a class="resource-collapse-link" href="#"><img src="/images/icons/edit-collapse.png" /></a> \
- </td> \
- <td class="resource-summary resource-url"> \
- ${resource.url} \
- </td> \
- <td class="resource-summary resource-name"> \
- ${resource.name} \
- </td> \
- <td class="resource-summary resource-format"> \
- ${resource.format} \
- </td> \
- <td class="resource-expanded" colspan="3"> \
- <div class="inner"> \
+ <td class="resource-edit"> \
+ <a class="resource-edit-expand js-resource-edit-toggle" href="#">{{if resource.name==""}}'+CKAN.Strings.noNameBrackets+'{{/if}}${resource.name}</a>\
+ <div class="resource-edit-expanded js-resource-edit-expanded"> \
<table> \
- <thead> \
- <th class="form-label"></th> \
- <th class="form-value"></th> \
- <th class="form-label"></th> \
- <th class="form-value"></th> \
- </thead> \
<tbody> \
<tr> \
- <td class="form-label">'+CKAN.Strings.name+'</td> \
- <td class="form-value" colspan="3"> \
- <input name="resources__${num}__name" type="text" value="${resource.name}" class="long" /> \
+ <td class="resource-edit-label">'+CKAN.Strings.name+'</td> \
+ <td class="resource-edit-value" colspan="3"> \
+ <input class="js-resource-edit-name" name="resources__${num}__name" type="text" value="${resource.name}" class="long" /> \
</td> \
</tr> \
<tr> \
- <td class="form-label">'+CKAN.Strings.description+'</td> \
- <td class="form-value" colspan="3"> \
+ <td class="resource-edit-label">'+CKAN.Strings.description+'</td> \
+ <td class="resource-edit-value" colspan="3"> \
<input name="resources__${num}__description" type="text" value="${resource.description}" class="long" /> \
</td> \
</tr> \
<tr> \
- <td class="form-label">'+CKAN.Strings.url+'</td> \
- <td class="form-value" colspan="3"> \
+ <td class="resource-edit-label">'+CKAN.Strings.url+'</td> \
+ <td class="resource-edit-value" colspan="3"> \
{{if resource.resource_type=="file.upload"}} \
${resource.url} \
<input name="resources__${num}__url" type="hidden" value="${resource.url}" /> \
@@ -112,59 +94,60 @@
</td> \
</tr> \
<tr> \
- <td class="form-label">'+CKAN.Strings.format+'</td> \
- <td class="form-value"> \
+ <td class="resource-edit-label">'+CKAN.Strings.format+'</td> \
+ <td class="resource-edit-value"> \
<input name="resources__${num}__format" type="text" value="${resource.format}" class="long autocomplete-format" /> \
</td> \
- <td class="form-label">'+CKAN.Strings.resourceType+'</td> \
- <td class="form-value"> \
- {{if resource.resource_type=="file.upload"}} \
- ${resource.resource_type} \
- <input name="resources__${num}__resource_type" type="hidden" value="${resource.resource_type}" /> \
- {{/if}} \
- {{if resource.resource_type!="file.upload"}} \
- <input name="resources__${num}__resource_type" type="text" value="${resource.resource_type}" /> \
- {{/if}} \
+ <td class="resource-edit-label">'+CKAN.Strings.resourceType+'</td> \
+ <td class="resource-edit-value"> \
+ {{if resource.resource_type=="file.upload"}} \
+ ${resource.resource_type} \
+ <input name="resources__${num}__resource_type" type="hidden" value="${resource.resource_type}" /> \
+ {{/if}} \
+ {{if resource.resource_type!="file.upload"}} \
+ <input name="resources__${num}__resource_type" type="text" value="${resource.resource_type}" /> \
+ {{/if}} \
</td> \
</tr> \
<tr> \
- <td class="form-label">'+CKAN.Strings.sizeBracketsBytes+'</td> \
- <td class="form-value"> \
+ <td class="resource-edit-label">'+CKAN.Strings.sizeBracketsBytes+'</td> \
+ <td class="resource-edit-value"> \
<input name="resources__${num}__size" type="text" value="${resource.size}" class="long" /> \
</td> \
- <td class="form-label">'+CKAN.Strings.mimetype+'</td> \
- <td class="form-value"> \
+ <td class="resource-edit-label">'+CKAN.Strings.mimetype+'</td> \
+ <td class="resource-edit-value"> \
<input name="resources__${num}__mimetype" type="text" value="${resource.mimetype}" /> \
</td> \
</tr> \
<tr> \
- <td class="form-label">'+CKAN.Strings.lastModified+'</td> \
- <td class="form-value"> \
+ <td class="resource-edit-label">'+CKAN.Strings.lastModified+'</td> \
+ <td class="resource-edit-value"> \
<input name="resources__${num}__last_modified" type="text" value="${resource.last_modified}" /> \
</td> \
- <td class="form-label">'+CKAN.Strings.mimetypeInner+'</td> \
- <td class="form-value"> \
+ <td class="resource-edit-label">'+CKAN.Strings.mimetypeInner+'</td> \
+ <td class="resource-edit-value"> \
<input name="resources__${num}__mimetype_inner" type="text" value="${resource.mimetype_inner}" /> \
</td> \
</tr> \
<tr> \
- <td class="form-label">'+CKAN.Strings.hash+'</td> \
- <td class="form-value"> \
+ <td class="resource-edit-label">'+CKAN.Strings.hash+'</td> \
+ <td class="resource-edit-value" colspan="3"> \
${resource.hash || "Unknown"} \
<input name="resources__${num}__hash" type="hidden" value="${resource.hash}" /> \
</td> \
- <td class="form-label">'+CKAN.Strings.id+'</td> \
- <td class="form-value"> \
+ </tr> \
+ <tr> \
+ <td class="resource-edit-label">'+CKAN.Strings.id+'</td> \
+ <td class="resource-edit-value" colspan="3"> \
${resource.id} \
<input name="resources__${num}__id" type="hidden" value="${resource.id}" /> \
</td> \
</tr> \
</tbody> \
</table> \
- <button class="delete-resource pretty-button danger">'+CKAN.Strings.deleteResource+'</button> \
</div> \
</td> \
- <td class="resource-is-changed"> \
- <img src="/images/icons/add.png" title="'+CKAN.Strings.resourceHasUnsavedChanges+'" class="resource-is-changed" /> \
+ <td class="resource-edit-delete"> \
+ <a class="resource-edit-delete js-resource-edit-delete" href="#"><img src="/images/icons/delete.png" /></a> \
</td> \
';
--- a/ckan/templates/js_strings.html Mon Oct 10 16:14:22 2011 +0100
+++ b/ckan/templates/js_strings.html Tue Oct 11 19:40:45 2011 +0100
@@ -21,6 +21,7 @@
CKAN.Strings.addDataset = "${_('Add Dataset')}";
CKAN.Strings.youHaveUnsavedChanges = "${_('You have unsaved changes. Hit Save Changes at the bottom of the page to submit them.')}";
CKAN.Strings.loading = "${_('Loading...')}";
+ CKAN.Strings.noNameBrackets = '<em>'+"${_('(no name)')}"+'</em>';
/*
* Used in templates.js.
@@ -41,7 +42,7 @@
CKAN.Strings.mimetypeInner = "${_('Mimetype (Inner)')}";
CKAN.Strings.hash = "${_('Hash')}";
CKAN.Strings.id = "${_('ID')}";
- CKAN.Strings.deleteResource = "${_('Delete Resource')}";
+ CKAN.Strings.doneEditing = "${_('Done')}";
CKAN.Strings.resourceHasUnsavedChanges = "${_('This resource has unsaved changes.')}";
--- a/ckan/templates/package/new_package_form.html Mon Oct 10 16:14:22 2011 +0100
+++ b/ckan/templates/package/new_package_form.html Tue Oct 11 19:40:45 2011 +0100
@@ -91,44 +91,11 @@
<table class="resource-table edit"><thead><tr>
- <th class="resource-expand-link"></th>
- <th class="field_req resource-url">URL</th>
- <th class="field_opt resource-description">Name</th>
- <th class="field_opt resource-format">Format</th>
- <th class="field_opt resource-is-changed"></th>
+ <th class="field_req resource-url">Resource</th>
+ <th class="resource-delete-link"></th></tr></thead><tbody class="resource-table">
- <py:for each="num, res in enumerate(data.get('resources', []))">
- <tr class="resource-summary">
- <td class="resource-expand-link">
- <a class="resource-expand-link" href="#"><img src="/images/icons/edit-expand.png" /></a>
- <a class="resource-expand-link" href="#" style="display: none;"><img src="/images/icons/edit-collapse.png" /></a>
- </td>
- <td class="resource-summary resource-url">
- ${res.get('url', '')}
- </td>
- <td class="resource-summary resource-name">
- ${res.get('name', '')}
- </td>
- <td class="resource-summary resource-format">
- ${res.get('format', '')}
- </td>
- <td class="resource-expanded" colspan="3" style="display: none;">
- <!-- Replaced with a javascript template -->
- <input name="resources__${num}__url" type="text" value="${res.get('url', '')}" />
- <input name="resources__${num}__format" type="text" value="${res.get('format', '')}" />
- <input name="resources__${num}__description" type="text" value="${res.get('description', '')}" />
- <input name="resources__${num}__hash" type="text" value="${res.get('hash', '')}" />
- <input name="resources__${num}__id" type="hidden" value="${res.get('id', '')}" />
- </td>
- <td class="resource-is-changed">
- </td>
- </tr>
- </py:for>
- <py:if test="not len(data.get('resources', []))">
- <tr class="table-empty"><td colspan="5">(none)</td></tr>
- </py:if></tbody></table>
http://bitbucket.org/okfn/ckan/changeset/8d0b27274cb4/
changeset: 8d0b27274cb4
branch: feature-1368-ux-fixes
user: zephod
date: 2011-10-12 11:21:02
summary: [ux][m]: Code tidying the backbone/jquery material powering the resource page.
affected #: 5 files (-1 bytes)
--- a/ckan/public/css/style.css Tue Oct 11 19:40:45 2011 +0100
+++ b/ckan/public/css/style.css Wed Oct 12 10:21:02 2011 +0100
@@ -1242,6 +1242,9 @@
margin-bottom: 0;
}
*/
+.resource-table tr {
+ overflow: hidden;
+}
th.resource-edit-delete,
td.resource-edit-delete {
/* Override screen.css */
@@ -1252,6 +1255,7 @@
padding: 8px;
}
a.resource-edit-expand {
+ background-image: url('/images/icons/arrow-closed.gif');
padding-left: 13px;
background-position: left center;
background-repeat: no-repeat;
Binary file ckan/public/images/icons/arrow-closed.gif has changed
Binary file ckan/public/images/icons/arrow-open.gif has changed
Binary file ckan/public/images/icons/delete.png has changed
--- a/ckan/public/scripts/application.js Tue Oct 11 19:40:45 2011 +0100
+++ b/ckan/public/scripts/application.js Wed Oct 12 10:21:02 2011 +0100
@@ -67,7 +67,8 @@
}
var messageDiv = $('<div />').html(msg).addClass(category).hide();
$('.flash-messages').append(messageDiv);
- messageDiv.show('slow');
+ messageDiv.show(1200);
+
};
// Attach dataset autocompletion to provided elements
@@ -402,9 +403,10 @@
CKAN.View.DatasetEdit = Backbone.View.extend({
initialize: function() {
_.bindAll(this, 'render');
+ var collection = this.model.get('resources');
var boundToUnload = false;
- this.el.change(function() {
+ var changesMade = function() {
if (!boundToUnload) {
CKAN.Utils.flashMessage(CKAN.Strings.youHaveUnsavedChanges,'notice');
boundToUnload = true;
@@ -412,7 +414,10 @@
return CKAN.Strings.youHaveUnsavedChanges;
};
}
- });
+ };
+ this.el.change(changesMade);
+ collection.bind('remove', changesMade);
+
this.el.submit(function() {
// Don't stop us leaving
window.onbeforeunload = null;
@@ -421,14 +426,14 @@
// Tabbed view for adding resources
var $el=this.el.find('.resource-add');
this.addView=new CKAN.View.ResourceAdd({
- collection: this.model.get('resources'),
+ collection: collection,
el: $el
});
// Table for editing resources
var $el=this.el.find('.resource-table.edit');
this.resourceList=new CKAN.View.ResourceEditList({
- collection: this.model.get('resources'),
+ collection: collection,
el: $el
});
@@ -449,22 +454,10 @@
CKAN.View.ResourceEditList = Backbone.View.extend({
initialize: function() {
- _.bindAll(this, 'render', 'addRow');
- this.collection.bind('add', this.addRow);
- },
-
- render: function() {
- var self = this;
-
- // Have to trash entire content; some stuff was there on page load
- this.el.find('tbody').empty();
- this.collection.each(this.addRow);
-
- if (this.collection.isEmpty()) {
- $tr = $('<tr />').addClass('table-empty');
- $tr.html('<td></td><td colspan="4">'+CKAN.Strings.bracketsNone+'</td>');
- this.el.find('tbody').append($tr);
- }
+ _.bindAll(this, 'addResource');
+ this.collection.bind('add', this.addResource);
+ this.collection.bind('remove', this.removeResource);
+ this.collection.each(this.addResource);
},
nextIndex: function() {
@@ -479,143 +472,82 @@
return maxId+1;
},
- addRow: function(resource) {
- // Strip placeholder row
- this.el.find('tr.table-empty').remove();
+ addResource: function(resource) {
+ var position = this.nextIndex();
+ // Create a row from the template
+ var $tr = $('<tr />');
+ $tr.html($.tmpl(
+ CKAN.Templates.resourceEntry,
+ { resource: resource.toTemplateJSON(),
+ num: position
+ }
+ ));
+ $tr.find('.js-resource-edit-expanded').hide();
+ this.el.find('tbody.resource-table').append($tr);
- // TODO tidy up so the view creates its own elements
- var $tr = $('<tr />');
+ // == Inner Function: Toggle the expanded options set == //
+ var toggleOpen = function(triggerEvent) {
+ if (triggerEvent) triggerEvent.preventDefault();
+ var animTime = 350;
+ var expandedTable = $tr.find('.js-resource-edit-expanded');
+ var finalHeight = expandedTable.height();
+ var icon = 'closed';
+ console.log(expandedTable);
- // Captured by an inner function
- var self = this;
+ if (expandedTable.is(':visible')) {
+ expandedTable.animate(
+ {height:0},
+ animTime,
+ function() {
+ expandedTable.height(finalHeight);
+ expandedTable.hide();
+ }
+ );
+ }
+ else {
+ expandedTable.show();
+ expandedTable.height(0);
+ // Transition to its true height
+ expandedTable.animate({height:finalHeight}, animTime);
+ $tr.find('.js-resource-edit-name').focus();
+ icon = 'open';
+ }
+ $tr.find('.js-resource-edit-toggle').css("background-image", "url('/images/icons/arrow-"+icon+".gif')");
+ };
- this.el.find('tbody.resource-table').append($tr);
- var _view = new CKAN.View.ResourceEdit({
- model: resource,
- el: $tr,
- position: this.nextIndex(),
- deleteResource: function() {
- // Passing down a capture to remove the resource
- $tr.remove();
-
- self.collection.remove(resource);
- if (self.collection.isEmpty()) {
- self.render();
- }
- }
- });
- _view.render();
+ // == Inner Function: Delete the row == //
+ var collection = this.collection;
+ var deleteResource = function(triggerEvent) {
+ if (triggerEvent) triggerEvent.preventDefault();
+ collection.remove(resource);
+ $tr.remove();
+ };
+
+ // == Inner Function: Update the name as you type == //
+ var nameChanged = function(e) {
+ // Update the resource title as you type
+ var newName = $(e.target).val();
+ $link = $tr.find('.js-resource-edit-toggle');
+ newName = newName || CKAN.Strings.noNameBrackets;
+ $link.html(newName);
+ };
+
+ // Trigger animation
+ if (resource.isNew()) {
+ toggleOpen();
+ }
+
+ var nameBox = $tr.find('input.js-resource-edit-name');
+ nameBox.change(nameChanged);
+ nameBox.keydown(nameChanged);
+ nameBox.keyup(nameChanged);
+ nameBox.keypress(nameChanged);
+
+ $tr.find('.js-resource-edit-toggle').click(toggleOpen);
+ $tr.find('.js-resource-edit-delete').click(deleteResource);
},
-
- events: {
- }
});
-CKAN.View.ResourceEdit = Backbone.View.extend({
- initialize: function() {
- _.bindAll(this, 'render', 'toggleExpanded');
- var self = this;
- this.model.bind('change', this.render());
- this.position = this.options.position;
-
- this.expanded = this.model.isNew();
- this.animate = this.model.isNew();
- },
-
- render: function() {
- var tmplData = {
- resource: this.model.toTemplateJSON(),
- num: this.position
- };
- var $newRow = $.tmpl(CKAN.Templates.resourceEntry, tmplData);
- this.el.html($newRow);
-
- var expandedTable = this.el.find('.js-resource-edit-expanded');
-
- var animTime = 350;
- if (!this.animate) {
- if (!this.expanded) {
- expandedTable.hide();
- }
- }
- else if (this.expanded) {
- var finalHeight = expandedTable.height();
- expandedTable.height(0).animate(
- {height:finalHeight},
- animTime
- );
- this.el.find('.js-resource-edit-name').focus();
- }
- else {
- expandedTable.animate(
- {height:0},
- animTime,
- function() { expandedTable.hide(); }
- );
- }
- arrow_icon = this.expanded? 'open' : 'closed';
- this.el.find('.js-resource-edit-toggle').css("background-image", "url('/images/icons/arrow-"+arrow_icon+".gif')");
-
- this.animate = false;
- },
-
- events: {
- 'click .js-resource-edit-toggle': 'toggleExpanded',
- 'click .js-resource-edit-delete': 'clickDelete',
- 'change input.js-resource-edit-name': 'nameChanged',
- 'keydown input.js-resource-edit-name': 'nameChanged',
- 'keyup input.js-resource-edit-name': 'nameChanged',
- 'keypressed input.js-resource-edit-name': 'nameChanged',
- },
-
- clickDelete: function(e) {
- e.preventDefault();
- this.options.deleteResource();
- },
-
- nameChanged: function(e) {
- var newName = $(e.target).val();
- $link = this.el.find('.js-resource-edit-toggle');
- newName = newName || CKAN.Strings.noNameBrackets;
- $link.html(newName);
- },
-
- saveData: function() {
- this.model.set(this.getData(), {
- error: function(model, error) {
- var msg = CKAN.Strings.failedToSave;
- msg += JSON.stringify(error);
- alert(msg);
- }
- });
- return false;
- },
-
- getData: function() {
- var _data = $(this.el).find('input').serializeArray();
- modelData = {};
- $.each(_data, function(idx, value) {
- modelData[value.name.split('__')[2]] = value.value
- });
- return modelData;
- },
-
- toggleExpanded: function(e) {
- e.preventDefault();
-
- this.expanded = !this.expanded;
- this.animate = true;
- // Closing the form; update the model fields
- if (!this.expanded) {
- this.saveData();
- // Model might not have changed
- this.render();
- } else {
- this.render();
- }
- }
-
-});
CKAN.View.ResourceAdd = Backbone.View.extend({
initialize: function() {
http://bitbucket.org/okfn/ckan/changeset/c5676b2c0cbc/
changeset: c5676b2c0cbc
branch: feature-1368-ux-fixes
user: zephod
date: 2011-10-12 15:15:32
summary: [ux][m]: Code tidying & glitch fixing.
affected #: 3 files (-1 bytes)
Binary file ckan/public/images/icons/delete.png has changed
--- a/ckan/public/scripts/application.js Wed Oct 12 10:21:02 2011 +0100
+++ b/ckan/public/scripts/application.js Wed Oct 12 14:15:32 2011 +0100
@@ -48,7 +48,7 @@
var _dataset = new CKAN.Model.Dataset(preload_dataset);
var $el=$('form#dataset-edit');
- var view=new CKAN.View.DatasetEdit({
+ var view=new CKAN.View.DatasetEditForm({
model: _dataset,
el: $el
});
@@ -395,66 +395,66 @@
return SlugCreator;
})();
-
return my;
}(jQuery, CKAN.Utils || {});
-CKAN.View.DatasetEdit = Backbone.View.extend({
+CKAN.View.DatasetEditForm = Backbone.View.extend({
initialize: function() {
- _.bindAll(this, 'render');
- var collection = this.model.get('resources');
+ var resources = this.model.get('resources');
+ var $form = this.el;
- var boundToUnload = false;
var changesMade = function() {
- if (!boundToUnload) {
- CKAN.Utils.flashMessage(CKAN.Strings.youHaveUnsavedChanges,'notice');
- boundToUnload = true;
- window.onbeforeunload = function () {
- return CKAN.Strings.youHaveUnsavedChanges;
- };
+ var boundToUnload = false;
+ return function() {
+ if (!boundToUnload) {
+ CKAN.Utils.flashMessage(CKAN.Strings.youHaveUnsavedChanges,'notice');
+ boundToUnload = true;
+ window.onbeforeunload = function () {
+ return CKAN.Strings.youHaveUnsavedChanges;
+ };
+ }
}
- };
- this.el.change(changesMade);
- collection.bind('remove', changesMade);
+ }();
- this.el.submit(function() {
+ $form.find('input').live('change', function(e) {
+ $target = $(e.target);
+ // Entering text in the 'add' box does not represent a change
+ if ($target.closest('.resource-add').length==0) {
+ changesMade();
+ }
+ });
+ resources.bind('add', changesMade);
+ resources.bind('remove', changesMade);
+
+ $form.submit(function() {
// Don't stop us leaving
window.onbeforeunload = null;
});
- // Tabbed view for adding resources
- var $el=this.el.find('.resource-add');
- this.addView=new CKAN.View.ResourceAdd({
- collection: collection,
+ // Table for editing resources
+ var $el = this.el.find('.resource-table.edit');
+ this.resourceList=new CKAN.View.ResourceEditList({
+ collection: resources,
el: $el
});
- // Table for editing resources
- var $el=this.el.find('.resource-table.edit');
- this.resourceList=new CKAN.View.ResourceEditList({
- collection: collection,
+ // Tabbed view for adding resources
+ var $el = this.el.find('.resource-add');
+ this.addView=new CKAN.View.ResourceAddTabs({
+ collection: resources,
el: $el
});
- this.render();
- },
-
-
- render: function() {
this.addView.render();
this.resourceList.render();
},
-
- events: {
- }
-
});
CKAN.View.ResourceEditList = Backbone.View.extend({
initialize: function() {
- _.bindAll(this, 'addResource');
+ _.bindAll(this, 'addResource', 'removeResource');
this.collection.bind('add', this.addResource);
this.collection.bind('remove', this.removeResource);
this.collection.each(this.addResource);
@@ -484,6 +484,7 @@
));
$tr.find('.js-resource-edit-expanded').hide();
this.el.find('tbody.resource-table').append($tr);
+ resource.view_tr = $tr;
// == Inner Function: Toggle the expanded options set == //
var toggleOpen = function(triggerEvent) {
@@ -492,7 +493,6 @@
var expandedTable = $tr.find('.js-resource-edit-expanded');
var finalHeight = expandedTable.height();
var icon = 'closed';
- console.log(expandedTable);
if (expandedTable.is(':visible')) {
expandedTable.animate(
@@ -520,17 +520,17 @@
var deleteResource = function(triggerEvent) {
if (triggerEvent) triggerEvent.preventDefault();
collection.remove(resource);
- $tr.remove();
};
- // == Inner Function: Update the name as you type == //
- var nameChanged = function(e) {
- // Update the resource title as you type
- var newName = $(e.target).val();
+ // == Inner Functions: Update the name as you type == //
+ var setName = function(newName) {
$link = $tr.find('.js-resource-edit-toggle');
newName = newName || CKAN.Strings.noNameBrackets;
$link.html(newName);
};
+ var nameBoxChanged = function(e) {
+ setName($(e.target).val());
+ }
// Trigger animation
if (resource.isNew()) {
@@ -538,18 +538,27 @@
}
var nameBox = $tr.find('input.js-resource-edit-name');
- nameBox.change(nameChanged);
- nameBox.keydown(nameChanged);
- nameBox.keyup(nameChanged);
- nameBox.keypress(nameChanged);
+ nameBox.change(nameBoxChanged);
+ nameBox.keydown(nameBoxChanged);
+ nameBox.keyup(nameBoxChanged);
+ nameBox.keypress(nameBoxChanged);
$tr.find('.js-resource-edit-toggle').click(toggleOpen);
$tr.find('.js-resource-edit-delete').click(deleteResource);
+ // Initialise name
+ setName(resource.attributes.name);
+ },
+
+ removeResource: function(resource) {
+ if (resource.view_tr) {
+ resource.view_tr.remove();
+ delete resource.view_tr;
+ }
},
});
-CKAN.View.ResourceAdd = Backbone.View.extend({
+CKAN.View.ResourceAddTabs = Backbone.View.extend({
initialize: function() {
_.bindAll(this, 'render', 'addNewResource', 'reset');
},
--- a/ckan/public/scripts/templates.js Wed Oct 12 10:21:02 2011 +0100
+++ b/ckan/public/scripts/templates.js Wed Oct 12 14:15:32 2011 +0100
@@ -1,6 +1,6 @@
CKAN.Templates.resourceAddLinkFile = ' \
- <form class="resource-add" action=""> \
+ <form class="resource-add"> \
<dl> \
<dt> \
<label class="field_opt" for="url"> \
@@ -18,7 +18,7 @@
';
CKAN.Templates.resourceAddLinkApi = ' \
- <form class="resource-add" action=""> \
+ <form class="resource-add"> \
<dl> \
<dt> \
<label class="field_opt" for="url"> \
@@ -65,7 +65,7 @@
CKAN.Templates.resourceEntry = ' \
<td class="resource-edit"> \
- <a class="resource-edit-expand js-resource-edit-toggle" href="#">{{if resource.name==""}}'+CKAN.Strings.noNameBrackets+'{{/if}}${resource.name}</a>\
+ <a class="resource-edit-expand js-resource-edit-toggle" href="#">${resource.name}</a>\
<div class="resource-edit-expanded js-resource-edit-expanded"> \
<table> \
<tbody> \
http://bitbucket.org/okfn/ckan/changeset/efa7edba9480/
changeset: efa7edba9480
branch: feature-1368-ux-fixes
user: zephod
date: 2011-10-12 19:36:14
summary: [ux][m]: Deleted button tabs; let's use real buttons.
affected #: 8 files (-1 bytes)
--- a/ckan/public/css/style.css Wed Oct 12 14:15:32 2011 +0100
+++ b/ckan/public/css/style.css Wed Oct 12 18:36:14 2011 +0100
@@ -791,6 +791,10 @@
padding: 0 5px 5px 10px;
width: 32em;
}
+div.markdown-editor .button-row {
+ padding-right: 40px;
+ text-align: center;
+}
div.markdown-preview {
background: white;
@@ -834,6 +838,9 @@
div.resource-add-subpane {
margin-top: 10px;
}
+div.resource-add .fileinfo {
+ margin: 7px 0;
+}
/* ==================== */
@@ -892,6 +899,12 @@
background: #eee;
}
+body.package.read #sidebar ul.tags,
+body.package.read #sidebar ul.groups {
+ margin-bottom: 10px;
+}
+
+
.success .new-dataset {
font-size: 150%;
}
@@ -899,45 +912,17 @@
font-weight: bold;
}
-/* =============================== */
-/* = Mini-Tabs [Markdown Editor] = */
-/* =============================== */
-
-ul.tabs {
+/* ============= */
+/* = Mini-Tabs = */
+/* ============= */
+ul.button-row {
margin-bottom: 5px;
}
-
-ul.tabs li {
+ul.button-row li {
display: inline;
+ margin-right: 10px;
}
-ul.tabs li a {
- display: inline-block;
- padding: 2px 8px;
- margin-right: 10px;
- font-size: 10px;
- font-weight: bold;
- text-decoration: none;
- color: #666;
- border: 1px solid #DDD;
- border-color: #DDD;
- border-right-color: #BBB;
- border-bottom-color: #BBB;
- -webkit-border-radius: 10px;
- -moz-border-radius: 10px;
- border-top-left-radius: 10px 10px;
- border-top-right-radius: 10px 10px;
- border-bottom-right-radius: 10px 10px;
- border-bottom-left-radius: 10px 10px;
-}
-
-ul.tabs li a.selected {
- color: #333;
- background: white;
- border-color: #BBB;
- border-right-color: #DDD;
- border-bottom-color: #DDD;
-}
/* ============================== */
@@ -1124,6 +1109,7 @@
-moz-transition: 0.1s linear all;
transition: 0.1s linear all;
}
+.pretty-button.depressed,
.pretty-button:hover {
background-position: 0 -15px;
color: #333;
@@ -1191,6 +1177,7 @@
opacity: 0.65;
cursor: default;
}
+.pretty-button.depressed,
.pretty-button:active {
-webkit-box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.05);
-moz-box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.05);
--- a/ckan/public/scripts/application.js Wed Oct 12 14:15:32 2011 +0100
+++ b/ckan/public/scripts/application.js Wed Oct 12 18:36:14 2011 +0100
@@ -7,7 +7,7 @@
$('input.autocomplete-format').live('keyup', function(){
CKAN.Utils.setupFormatAutocomplete($(this));
});
- CKAN.Utils.setupMarkdownEditor($('.markdown-editor .tabs a, .markdown-editor .markdown-preview'));
+ CKAN.Utils.setupMarkdownEditor($('.markdown-editor'));
// set up ckan js
var config = {
endpoint: '/'
@@ -40,7 +40,7 @@
// Selectively enable the upload button
var storageEnabled = $.inArray('storage',CKAN.plugins)>=0;
if (storageEnabled) {
- $('div.resource-add li.upload-file').show();
+ $('li.js-upload-file').show();
}
// Set up hashtag nagivigation
@@ -226,20 +226,20 @@
});
};
- my.setupMarkdownEditor = function(elements) {
+ my.setupMarkdownEditor = function(markdownEditor) {
// Markdown editor hooks
- elements.live('click', function(e) {
+ markdownEditor.find('button, div.markdown-preview').live('click', function(e) {
e.preventDefault();
- var $el = $(e.target);
- var action = $el.attr('action') || 'write';
+ var $target = $(e.target);
+ console.log('clicked');
// Extract neighbouring elements
- var div=$el.closest('.markdown-editor')
- div.find('.tabs a').removeClass('selected');
- div.find('.tabs a[action='+action+']').addClass('selected');
- var textarea = div.find('.markdown-input');
- var preview = div.find('.markdown-preview');
+ var markdownEditor=$target.closest('.markdown-editor')
+ markdownEditor.find('button').removeClass('depressed');
+ var textarea = markdownEditor.find('.markdown-input');
+ var preview = markdownEditor.find('.markdown-preview');
// Toggle the preview
- if (action=='preview') {
+ if ($target.is('.js-markdown-preview')) {
+ $target.addClass('depressed');
raw_markdown=textarea.val();
preview.html("<em>"+CKAN.Strings.loading+"<em>");
$.post("/api/util/markdown", { q: raw_markdown },
@@ -250,6 +250,7 @@
textarea.hide();
preview.show();
} else {
+ markdownEditor.find('.js-markdown-edit').addClass('depressed');
textarea.show();
preview.hide();
textarea.focus();
@@ -567,12 +568,12 @@
},
events: {
- 'click .action-resource-tab': 'clickAdd',
+ 'click button': 'clickButton',
'click input[name=reset]': 'reset'
},
reset: function() {
- this.el.find('.tabs a').removeClass('selected');
+ this.el.find('button').removeClass('depressed');
if (this.subView != null) {
this.subView.remove();
this.subView = null;
@@ -580,40 +581,43 @@
return false;
},
- clickAdd: function(e) {
+ clickButton: function(e) {
e.preventDefault();
+ var $target = $(e.target);
+
+ if ($target.is('.depressed')) {
+ this.reset();
+ }
+ else {
+ this.reset();
+ $target.addClass('depressed');
- this.reset();
+ var $subPane = $('<div />').addClass('resource-add-subpane');
+ this.el.append($subPane);
- var action = $(e.target).attr('action');
- this.el.find('.tabs a').removeClass('selected');
- this.el.find('.tabs a[action='+action+']').addClass('selected');
+ var tempResource = new CKAN.Model.Resource({});
- var $subPane = $('<div />').addClass('resource-add-subpane');
- this.el.append($subPane);
-
- var tempResource = new CKAN.Model.Resource({});
-
- tempResource.bind('change', this.addNewResource);
- // Open sub-pane
- if (action=='upload-file') {
- this.subView = new CKAN.View.ResourceUpload({
- el: $subPane,
- model: tempResource,
- // TODO: horrible reverse depedency ...
- client: CKAN.UI.workspace.client
- });
+ tempResource.bind('change', this.addNewResource);
+ // Open sub-pane
+ if ($target.is('.js-upload-file')) {
+ this.subView = new CKAN.View.ResourceUpload({
+ el: $subPane,
+ model: tempResource,
+ // TODO: horrible reverse depedency ...
+ client: CKAN.UI.workspace.client
+ });
+ }
+ else if ($target.is('.js-link-file') || $target.is('.js-link-api')) {
+ this.subView = new CKAN.View.ResourceAddLink({
+ el: $subPane,
+ model: tempResource,
+ mode: ($target.is('.js-link-file'))? 'file' : 'api',
+ // TODO: horrible reverse depedency ...
+ client: CKAN.UI.workspace.client
+ });
+ }
+ this.subView.render();
}
- else if (action=='link-file' || action=='link-api') {
- this.subView = new CKAN.View.ResourceAddLink({
- el: $subPane,
- model: tempResource,
- mode: (action=='link-file')? 'file' : 'api',
- // TODO: horrible reverse depedency ...
- client: CKAN.UI.workspace.client
- });
- }
- this.subView.render();
},
addNewResource: function(tempResource) {
--- a/ckan/public/scripts/templates.js Wed Oct 12 14:15:32 2011 +0100
+++ b/ckan/public/scripts/templates.js Wed Oct 12 18:36:14 2011 +0100
@@ -50,7 +50,8 @@
</dt> \
<dd> \
<input type="file" name="file" /> \
- <span class="fileinfo"></span> \
+ <br /> \
+ <div class="fileinfo"></div> \
<input id="upload" name="upload" type="submit" class="pretty-button primary" value="'+CKAN.Strings.add+'" /> \
<input id="reset" name="reset" type="reset" class="pretty-button" value="'+CKAN.Strings.cancel+'" /> \
</dd> \
--- a/ckan/templates/layout_base.html Wed Oct 12 14:15:32 2011 +0100
+++ b/ckan/templates/layout_base.html Wed Oct 12 18:36:14 2011 +0100
@@ -215,7 +215,6 @@
<!-- TODO should not be necessary; we use AJAX to produce consistent previews --><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><!-- Translated js strings live inside an html template. --><xi:include href="js_strings.html" />
--- a/ckan/templates/package/layout.html Wed Oct 12 14:15:32 2011 +0100
+++ b/ckan/templates/package/layout.html Wed Oct 12 18:36:14 2011 +0100
@@ -16,10 +16,10 @@
<li py:attrs="{'class':'current-tab'} if c.action=='authz' else {}" py:if="h.check_access('package_edit_permissions',{'id':c.pkg.id})">
${h.subnav_link(c, h.icon('lock') + _('Authorization'), controller='package', action='authz', id=c.pkg.name)}
</li>
- <li class="action">
+ <!--li class="action">
${h.subnav_link(c, h.icon('atom_feed') + _('Subscribe'),
controller='package', action='history', id=c.pkg.name, format='atom', days=7)}
- </li>
+ </li--></ul></py:if></py:match>
--- a/ckan/templates/package/new_package_form.html Wed Oct 12 14:15:32 2011 +0100
+++ b/ckan/templates/package/new_package_form.html Wed Oct 12 18:36:14 2011 +0100
@@ -52,9 +52,9 @@
<dt class="description-label"><label class="field_opt" for="notes">Description</label></dt><dd class="description-field"><div class="markdown-editor">
- <ul class="tabs">
- <li><a href="#" action="write" class="selected">Write</a></li>
- <li><a href="#" action="preview">Preview</a></li>
+ <ul class="button-row">
+ <li><button class="pretty-button js-markdown-edit depressed">Edit</button></li>
+ <li><button class="pretty-button js-markdown-preview">Preview</button></li></ul><textarea class="markdown-input" tabindex="3" name="notes" id="notes" placeholder="${_('Start with a summary sentence ...')}">${data.get('notes','')}</textarea><div class="markdown-preview" style="display: none;"></div>
@@ -101,11 +101,11 @@
<div class="resource-add">
- <ul class="tabs">
+ <ul class="button-row"><li><h4>Add a resource:</h4></li>
- <li><a href="#" action="link-file" class="action-resource-tab">Link to a file</a></li>
- <li><a href="#" action="link-api" class="action-resource-tab">Link to an API</a></li>
- <li class="upload-file" style="display:none;"><a href="#" action="upload-file" class="action-resource-tab">Upload a file</a></li>
+ <li><button class="pretty-button js-link-file">Link to a file</button></li>
+ <li><button class="pretty-button js-link-api">Link to an API</button></li>
+ <li class="js-upload-file" style="display:none;"><button class="pretty-button js-upload-file">Upload a file</button></li></ul></div></fieldset>
--- a/ckan/templates/package/read.html Wed Oct 12 14:15:32 2011 +0100
+++ b/ckan/templates/package/read.html Wed Oct 12 18:36:14 2011 +0100
@@ -49,14 +49,11 @@
<li><h3>Tags</h3>
${tag_list(c.pkg_dict.get('tags', ''))}
- <span class="widget_action" py:if="h.check_access('package_update',{'id':c.pkg.id})">
- ${h.subnav_link(c, 'add tags »', controller='package', action='edit', id=c.pkg.name)}
- </span></li><li><h3>Groups</h3><py:if test="c.pkg.groups">
- <ul>
+ <ul class="groups"><li py:for="group in sorted(c.pkg.groups, key=lambda g: g.display_name)"><a href="${h.url_for(controller='group', action='read', id=group.name)}">${group.display_name}</a></li>
@@ -66,11 +63,6 @@
<py:if test="not c.pkg.groups">
Groups are collections of dataset maintained by users of ${g.site_title}. This dataset has not been added to any groups yet.
</py:if>
-
-
- <p class="widget_action" py:if="h.check_access('package_update',{'id':c.pkg.id})">
- ${h.subnav_link(c, 'add to a group »', controller='package', action='edit', id=c.pkg.name)}
- </p></p></li><li py:if="h.check_access('package_update',{'id':c.pkg.id})">
--- a/ckan/templates/user/edit_user_form.html Wed Oct 12 14:15:32 2011 +0100
+++ b/ckan/templates/user/edit_user_form.html Wed Oct 12 18:36:14 2011 +0100
@@ -23,9 +23,9 @@
<dt><label for="about">About:</label></dt><dd class="description-field"><div class="markdown-editor">
- <ul class="tabs">
- <li><a href="#" action="write" class="selected">Write</a></li>
- <li><a href="#" action="preview">Preview</a></li>
+ <ul class="button-row">
+ <li><button class="pretty-button js-markdown-edit depressed">Edit</button></li>
+ <li><button class="pretty-button js-markdown-preview">Preview</button></li></ul><textarea class="markdown-input" tabindex="3" name="about" id="about" placeholder="${_('A little about you...')}">${data.get('about','')}</textarea><div class="markdown-preview" style="display: none;"></div>
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