Skip to content

Commit

Permalink
[#1506][resources][m]: Refactoring look-and-feel.
Browse files Browse the repository at this point in the history
  • Loading branch information
teajaymars committed Mar 1, 2012
1 parent 68d0050 commit ea18973
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 18 deletions.
39 changes: 24 additions & 15 deletions ckan/public/css/style.css
Expand Up @@ -1536,35 +1536,37 @@ body.editresources fieldset#resources > h3 {
margin: 0;
}
.resource-list li {
margin-bottom: 4px;
background: #fff;
border-radius: 4px;
border: 0;
border: 1px solid #eee;
border-top-color: transparent;
border-left-color: transparent;
border-right: 0;
position: relative;
margin-right: 20px;
margin: 0 20px 0 0;
z-index: 1;
white-space: nowrap;
overflow: hidden;
font-weight: bold;
}
.resource-list li:last-child {
border-bottom-color: transparent;
}
.resource-list li a {
display: block;
padding: 5px 10px;
color: #333;
}
.resource-list li:hover a{
color: #B22;
}
.resource-list li:hover {
border-color: #ccc;
background: #f7f7f7;
}
.resource-list li.active {
border-color: #888;
border-right: 0;
background: #f9f9f9;
margin-right: 0;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
hr.resource-list-divide {
margin: 10px 0;
width: 380px;
background: #eee;
}


Expand All @@ -1590,18 +1592,25 @@ body.editresources .error-explanation {

/* While dragging.... */
.resource-list-edit li.ui-sortable-helper {
box-shadow: 2px 2px 2px rgba(0,0,0,0.1);
box-shadow: 2px 2px 8px rgba(0,0,0,0.1);
}
.resource-list-edit li.ui-sortable-helper.active {
margin-right: 20px;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
border-right: 1px solid #888;
}
.resource-list-add,
.resource-list-edit {
width: 400px;
}
.resource-list-add {
margin-top: 20px;
}
.resource-list-add li {
border-top: 1px solid #eee;
}
.resource-list-add li.active {
border-bottom-color: #888;
}
.resource-list-add li a {
padding-left: 43px;
}
Expand Down
3 changes: 1 addition & 2 deletions ckan/templates/package/new_package_form.html
Expand Up @@ -136,9 +136,8 @@ <h3>Add resources:</h3>
</div>
<ul class="resource-list resource-list-edit drag-drop-list">
</ul>
<hr class="resource-list-divide"/>
<ul class="resource-list resource-list-add">
<li class="ui-state-default"><a href="#" class="js-resource-add">${h.icon('page_white_add')}New resource...</a></li>
<li><a href="#" class="js-resource-add">${h.icon('page_white_add')}New resource...</a></li>
</ul>
<div style="display: none;" class="resource-panel">
<button class="pretty-button danger resource-panel-close">x</button>
Expand Down
2 changes: 1 addition & 1 deletion ckan/templates/package/read_core.html
Expand Up @@ -29,7 +29,7 @@ <h3>Resources
</py:if></h3>
<ul class="resource-list">
<py:for each="res in c.pkg_dict.get('resources', [])">
<li class="ui-state-default">
<li>
<a href="${h.url_for(controller='package', action='resource_read', id=c.pkg_dict['name'], resource_id=res['id'])}">
${h.resource_icon(res)}
${h.resource_display_name(res)}
Expand Down

0 comments on commit ea18973

Please sign in to comment.