diff --git a/ckan/public/css/style.css b/ckan/public/css/style.css index 9943ad947da..50592a2fd2f 100644 --- a/ckan/public/css/style.css +++ b/ckan/public/css/style.css @@ -1,5 +1,3 @@ -@import url('forms.css'); - body.no-sidebar .sidebar-outer { display: none; } body.no-sidebar #content { border-right: none; } body.no-sidebar .content-outer { @@ -150,8 +148,8 @@ a:hover { color: #183661; } -fieldset { - border: 0px; +label { + font-weight: bold; } @@ -963,92 +961,33 @@ ul.button-row li { } -/* ================================= */ -/* = Edit Dataset Page: Navigation = */ -/* ================================= */ -body.package.edit div#content { - /* Flip the sidebar to the left-hand side */ - margin-right: 29px; - margin-left: 0px; - float: right; - padding-right: 0; - padding-left: 20px; - border: none; - border-left: 1px solid #eee; -} -body.package.edit div#sidebar { - /* Flip the sidebar to the left-hand side */ - padding-left: 0px; - float: left; - margin-right: 0px; -} -body.package.edit ul.widget-list { - margin-left: 1.5em; - margin-right: 0; -} -ul.dataset-edit-nav { - list-style-type: none; - padding-left: 0; -} -ul.dataset-edit-nav li a { - text-decoration: none; - font-weight: bold; - display: block; - padding: 7px 0 7px 10px; - margin-bottom: 7px; - margin-left: 20px; - border: 1px transparent solid; -} -ul.dataset-edit-nav li a.active, -ul.dataset-edit-nav 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'); - border-right: none; - -moz-border-radius-bottomleft: 5px; - -webkit-border-bottom-left-radius: 5px; - border-bottom-left-radius: 5px; - -moz-border-radius-topleft: 5px; - -webkit-border-top-left-radius: 5px; - border-top-left-radius: 5px; - -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box; -} - - /* ===================== */ /* = Edit Dataset Page = */ /* ===================== */ -.dataset-edit-form fieldset#resources { - display: none; -} .dataset-edit-form button.dataset-delete { vertical-align: middle; } +.dataset-edit-form legend { + display: none; +} +.dataset-edit-form fieldset#summary { + border-top: 1px solid #ccc; + padding-top: 15px; +} +.dataset-edit-tabs ul { + min-width: 180px; +} +. /* ======================= */ /* = Edit Resources Page = */ /* ======================= */ -body.editresources #content { - width: 100%; - padding-right: 0; - margin-right: 0; - border-right: 0; -} -body.editresources #sidebar { +.dataset-editresources-form fieldset { display: none; } -.dataset-editresources-form fieldset#basic-information, -.dataset-editresources-form fieldset#groups, -.dataset-editresources-form fieldset#further-information, -.dataset-editresources-form fieldset#extras, -.dataset-editresources-form fieldset#delete { - display: none; +.dataset-editresources-form fieldset#resources, +.dataset-editresources-form fieldset#summary { + display: block; } .dataset-editresources-form .resource-add li h4 { @@ -1072,33 +1011,27 @@ body.editresources #sidebar { display: none; } .dataset-create-form fieldset#basic-information, -.dataset-create-form fieldset#resources { +.dataset-create-form fieldset#resources, +.dataset-create-form fieldset#summary { display: block; padding-bottom: 0; margin-bottom: 0; } -.dataset-create-form dt.homepage-label, -.dataset-create-form dd.homepage-field, -.dataset-create-form dd.homepage-instructions -{ +.dataset-create-form .homepage-field, +.dataset-create-form .tags-field { display: none; } -.dataset-create-form dt.tags-label, -.dataset-create-form dd.tags-field, -.dataset-create-form dd.tags-instructions -{ - display: none; -} -dd.license-instructions { +#license-instructions { font-size: 11px; } -.dataset-create-form dd.name-field { +.dataset-create-form .name-field { padding-top: 0.2em; } -.dataset-create-form dd.name-field p { +.dataset-create-form .name-field p { margin-bottom: 4px; } .dataset-create-form .description-field textarea { + width: 400px; height: 70px; } @@ -1126,6 +1059,7 @@ label.edit-summary { } #log_message { height: 40px; + width: 400px; color: #666; font-size: 11px; } @@ -1421,7 +1355,7 @@ body.authz form button { /* Dev */ fieldset#resources { - min-height: 430px; + min-height: 230px; margin-bottom: 40px; position: relative; padding: 0; @@ -1507,7 +1441,7 @@ body.editresources .error-explanation { } .resource-list-add, .resource-list-edit { - width: 400px; + width: 350px; } .resource-list-add { margin-top: 20px; @@ -1542,9 +1476,9 @@ button.resource-edit-delete { box-shadow: 2px 2px 4px #888; margin-bottom: 20px; position: absolute; - left: 399px; + left: 349px; top: 0px; - padding: 10px; + padding: 10px 20px; min-height: 100px; min-width: 530px; } diff --git a/ckan/public/scripts/application.js b/ckan/public/scripts/application.js index 00ca88035cc..5c61a53b9c9 100644 --- a/ckan/public/scripts/application.js +++ b/ckan/public/scripts/application.js @@ -572,7 +572,7 @@ CKAN.View.Resource = Backbone.View.extend({ this.table.show(); this.table.find('.js-resource-edit-name').focus(); this.li.addClass('active'); - panel.css('top', Math.max(0, this.li.position().top+this.li.height() - panel.height())); + panel.css('top', Math.max(10, this.li.position().top+this.li.height() - panel.height())); }, /* * Called when my delete button is clicked. Calls back to the parent @@ -1150,33 +1150,6 @@ CKAN.Utils = function($, my) { }; }(); - // Show/hide fieldset sections from the edit dataset form. - my.setupDatasetEditNavigation = function() { - - function showSection(sectionToShowId) { - $('.dataset-edit-form fieldset').hide(); - $('.dataset-edit-form fieldset#'+sectionToShowId).show(); - $('.dataset-edit-nav li a').removeClass('active'); - $('.dataset-edit-nav li a[href=#section-'+sectionToShowId+']').addClass('active'); - window.location.hash = 'section-'+sectionToShowId; - } - - // Set up initial form state - // Prefix="#section-" - var initialSection = window.location.hash.slice(9) || 'basic-information'; - showSection(initialSection); - - // Adjust form state on click - $('.dataset-edit-nav li a').live('click', function(e) { - e.preventDefault(); - var $el = $(e.target); - // Prefix="#section-" - var showMe = $el.attr('href').slice(9); - showSection(showMe); - return false; - }); - }; - my.countObject = function(obj) { var count=0; $.each(obj, function() { diff --git a/ckan/templates/package/edit.html b/ckan/templates/package/edit.html index 77f4fda2a4f..030d6ce6ca0 100644 --- a/ckan/templates/package/edit.html +++ b/ckan/templates/package/edit.html @@ -5,6 +5,7 @@ ${c.pkg.title or c.pkg.name} - Edit - Datasets Edit: ${c.pkg.title or c.pkg.name} + no-sidebar - - - + + + - Basic Information - Further Information - Extras - Delete + Basic Information + Further Information + Extras + Delete - - - - - ${c.form} + ${c.form} + diff --git a/ckan/templates/package/new_package_form.html b/ckan/templates/package/new_package_form.html index 9a665c37cc1..63ace5d1c7e 100644 --- a/ckan/templates/package/new_package_form.html +++ b/ckan/templates/package/new_package_form.html @@ -1,9 +1,8 @@ - - + xmlns:xi="http://www.w3.org/2001/XInclude" > Errors in form @@ -27,65 +26,77 @@ Errors in form - - - Title - + + Basic Information + + Title + - - ${errors.get('title', '')} + ${errors.get('title', '')} + + - Url - + + Url + ${h.url(controller='package', action='search')+'/'} (edit) Warning: URL is very long. Consider changing it to something shorter. - - 2+ characters, lowercase, using only 'a-z0-9' and '-_' - ${errors.get('name', '')} + 2+ characters, lowercase, using only 'a-z0-9' and '-_' + ${errors.get('name', '')} + + - Home Page - - The URL for the web page describing the data (not the data itself). - e.g. http://www.example.com/growth-figures.html - ${errors.get('url', '')} + + Home Page + + + The URL for the web page describing the data (not the data itself). + e.g. http://www.example.com/growth-figures.html + ${errors.get('url', '')} + + - License - + + License + ${licence_desc} - - (Don't worry if you don't know which license the data has been released under). + (Don't worry if you don't know which license the data has been released under). + + - Description - - - Edit - Preview - - ${data.get('notes','')} - - You can use Markdown formatting here. - - - - Groups - - + + Description + + + + Edit + Preview + + ${data.get('notes','')} + + You can use Markdown formatting here. + + + + + + Groups + - + + Member of: + Errors in form Add to: - + (None) ${group['name']} @@ -108,24 +119,26 @@ Errors in form Cannot add any groups. + - - - Tags - - + + + + + Tags + - - Comma-separated terms that may link this dataset to similar ones. For more information on conventions, see this wiki page. - e.g. pollution, rivers, water quality - ${errors.get('tag_string', '')} - + Comma-separated terms that may link this dataset to similar ones. For more information on conventions, see this wiki page. + e.g. pollution, rivers, water quality + ${errors.get('tag_string', '')} + + - + + Add/Edit Resources - Add resources: Upload or link data files, APIs and other materials related to your dataset. @@ -143,7 +156,7 @@ Add resources: ${h.icon('page_white_add')}New resource... - x + x Add a resource: @@ -155,31 +168,48 @@ Add resources: - - - Author - - The name of the main contact, for enquiries about this particular dataset, using the e-mail address in the following field. - - Author email - + + + Author + + + The name of the main contact, for enquiries about this particular dataset, using the e-mail address in the following field. + + - Maintainer - - If there is another important contact person (in addition to the person in the Author field) then provide details here. + + Author email + + + + - Maintainer email - + + Maintainer + + + If there is another important contact person (in addition to the person in the Author field) then provide details here. + + - Version - - A number representing the version (if applicable) - e.g. 1.2.0 + + Maintainer email + + + + - + + Version + + + A number representing the version (if applicable) + e.g. 1.2.0 + + - + Adding custom fields to the dataset such as "location:uk" can help users find it in the search engine. This data will also appear under Additional Information when viewing the dataset. @@ -203,7 +233,8 @@ Add resources: - + + Delete @@ -219,10 +250,15 @@ Add resources: - - -Edit summary (briefly describe the changes you have made)... -${data.get('log_message', h.auto_log_message(c))} + + + Summary + + Briefly describe the changes you have made... + ${data.get('log_message', h.auto_log_message(c))} + + + Author: ${c.author} @@ -236,7 +272,7 @@ Add resources: - + @@ -247,5 +283,4 @@ Add resources: -
${errors.get('title', '')}
Warning: URL is very long. Consider changing it to something shorter.
2+ characters, lowercase, using only 'a-z0-9' and '-_'
${errors.get('name', '')}
The URL for the web page describing the data (not the data itself).
e.g. http://www.example.com/growth-figures.html
${errors.get('url', '')}
(Don't worry if you don't know which license the data has been released under).
Comma-separated terms that may link this dataset to similar ones. For more information on conventions, see this wiki page.
e.g. pollution, rivers, water quality
${errors.get('tag_string', '')}
Upload or link data files, APIs and other materials related to your dataset.
The name of the main contact, for enquiries about this particular dataset, using the e-mail address in the following field.
If there is another important contact person (in addition to the person in the Author field) then provide details here.
A number representing the version (if applicable)
e.g. 1.2.0
Adding custom fields to the dataset such as "location:uk" can help users find it in the search engine. This data will also appear under Additional Information when viewing the dataset.
Briefly describe the changes you have made...
Author: ${c.author}