Skip to content

Commit

Permalink
Merge branch 'feature-1788-browser-compatibility'
Browse files Browse the repository at this point in the history
  • Loading branch information
teajaymars committed Mar 30, 2012
2 parents a89bba5 + 9b5564b commit 5900d96
Show file tree
Hide file tree
Showing 11 changed files with 357 additions and 2,060 deletions.
6 changes: 3 additions & 3 deletions ckan/controllers/package.py
Expand Up @@ -261,7 +261,7 @@ def read(self, id, format='html'):
try:
c.pkg_dict = get_action('package_show')(context, data_dict)
c.pkg = context['package']
c.pkg_json = json.dumps(c.pkg_dict)
c.resources_json = json.dumps(c.pkg_dict.get('resources',[]))
except NotFound:
abort(404, _('Dataset not found'))
except NotAuthorized:
Expand Down Expand Up @@ -400,7 +400,7 @@ def new(self, data=None, errors=None, error_summary=None):

data = data or clean_dict(unflatten(tuplize_dict(parse_params(
request.params, ignore_keys=[CACHE_PARAMETER]))))
c.pkg_json = json.dumps(data)
c.resources_json = json.dumps(data.get('resources',[]))

errors = errors or {}
error_summary = error_summary or {}
Expand Down Expand Up @@ -439,7 +439,7 @@ def edit(self, id, data=None, errors=None, error_summary=None):
abort(404, _('Dataset not found'))

c.pkg = context.get("package")
c.pkg_json = json.dumps(data)
c.resources_json = json.dumps(data.get('resources',[]))

try:
check_access('package_update',context)
Expand Down
206 changes: 85 additions & 121 deletions ckan/public/css/style.css
Expand Up @@ -415,8 +415,7 @@ ul.no-break li {
/* ======================= */
div.form-actions p.hints {
width: 50%;
float: right;
margin: 0;
margin: 10px 0 0 0;
}


Expand Down Expand Up @@ -900,13 +899,6 @@ span.extras-label {
display: block;
}

.dataset-editresources-form .resource-add li h4 {
display: inline;
padding-right: 20px;
}
.dataset-editresources-form .resource-add .subpane {
margin-top: 10px;
}
.dataset-editresources-form .resource-add .fileinfo {
margin: 7px 0;
}
Expand All @@ -920,7 +912,18 @@ span.extras-label {
width: 400px;
height: 70px;
}
.resource-add > .nav {
margin-bottom: 0;
width: 522px;
}
.resource-add .tab-pane {
padding: 20px;
background: #fff;
border: 1px solid #DDD;
border-top: none;
width: 480px;

}

/* ==================== */
/* = Add Dataset Page = */
Expand All @@ -933,8 +936,6 @@ span.extras-label {
.dataset-create-form fieldset#resources,
.dataset-create-form fieldset#summary {
display: block;
padding-bottom: 0;
margin-bottom: 0;
}
.dataset-create-form .homepage-field,
.dataset-create-form .tags-field {
Expand Down Expand Up @@ -1224,52 +1225,33 @@ body.authz form button {
/* ==================== */
/* = Activity Streams = */
/* ==================== */

.activity-stream .activity {
padding-bottom:1em;

}
.activity-stream .activity a {
font-weight:bold;

}
.activity-stream .activity .actor {

}
.activity-stream .activity .verb {
background-color:PapayaWhip;
padding:.25em;
margin:.25em;

}
.activity-stream .activity .object {

}
.activity-stream .activity .target {

}
.activity-stream .activity .date {
color:#999;

}






/* Dev */
/* ===================== */
/* == Resource Editor == */
/* ===================== */
fieldset#resources {
min-height: 230px;
margin-bottom: 40px;
position: relative;
padding: 0;
}
body.editresources fieldset#resources > legend,
body.editresources fieldset#resources > .instructions {
display: none;
}
fieldset#resources > .instructions {
width: 300px;
padding: 12px 12px 2px 12px;
}
.resource-list {
Expand All @@ -1278,114 +1260,67 @@ fieldset#resources > .instructions {
margin: 0;
}
.resource-list li {
white-space: nowrap;
overflow: hidden;
background: #fff;
border: 0;
border: 1px solid #eee;
border-top-color: transparent;
border-left-color: transparent;
border-right: 0;
border-right: 1px solid transparent;
border-left: 1px solid transparent;
border-top: 1px solid transparent;
border-bottom: 1px solid #eee;
margin-bottom: 0;
position: relative;
margin: 0 20px 0 0;
z-index: 1;
white-space: nowrap;
overflow: hidden;
font-weight: bold;
}
.resource-list li:hover {
background-color: #f7f7f7;
}
.resource-list li:last-child {
border-bottom-color: transparent;
}
.resource-list li.active {
border-color: #888;
border-right-color: #f9f9f9;
background-color: #f9f9f9;
margin-right: -21px;
}
/**/
.resource-list li a {
display: block;
padding: 5px 10px;
color: #333;
border-right: 0;
font-weight: bold;
}
.resource-list li:hover a{
.resource-list li a:hover {
color: #B22;
}
.resource-list li:hover {
background-color: #f7f7f7;
}
.resource-list a:hover {
text-decoration: none;
}
.resource-list li.active {
border-color: #888;
background-color: #f9f9f9;
margin-right: 0;
}


/* HasErrors */
.resource-list li.hasErrors {
border-color: #c00;
border-right: 1px solid #c00;
}
.resource-list li.active.hasErrors {
border-right: 0;
}
.resource-list li.hasErrors a {
color: #c00;
}
.resource-errors {
display: none;
}
.resource-errors dl {
margin-bottom: 0;
}
body.editresources .error-explanation {
/* Let JS render the resource errors inline */
display: none;
/* Resource-list-edit */
.resource-list-edit {
padding-top: 10px;
}


/* While dragging.... */
.resource-list-edit li.ui-sortable-helper {
border-color: #888;
box-shadow: 2px 2px 8px rgba(0,0,0,0.1);
}
.resource-list-edit li.ui-sortable-helper.active {
margin-right: 20px;
border-right: 1px solid #888;
}
.resource-list-add,
.resource-list-edit {
width: 350px;
}

/* Resource-list-add */
.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;
}
.resource-list-edit li a {
padding-left: 0;
}

button.resource-edit-delete {
margin-top: 10px;
float: right;
}



/* Right-hand-side edit resource panel */
/* ----------------------------------- */
.resource-panel {
background: #f9f9f9;
border: 1px solid #888;
box-shadow: 2px 2px 4px #888;
margin-bottom: 20px;
position: absolute;
left: 349px;
top: 0px;
padding: 10px 20px;
min-height: 100px;
min-width: 530px;
position: relative;
}
.resource-panel .resource-panel-close {
position: absolute;
Expand All @@ -1395,28 +1330,28 @@ button.resource-edit-delete {
padding: 0;
text-align: center;
}
.resource-panel .hint {
font-size: 11px;
}
.resource-details input[type="text"] {
.resource-panel input[type="text"] {
width: 397px;
}
.resource-add input[type="text"] {
width: 280px;
.resource-panel .markdown-editor {
width: 390px;
}
.resource-details .markdown-editor {
width: 30em;
.resource-panel textarea {
height: 90px;
}
.resource-details .control-group {
.resource-panel .control-group {
margin-bottom: 3px;
}
.resource-details textarea {
width: 340px;
height: 90px;
.resource-panel .hint {
font-size: 11px;
}
.resource-details.resource-add {
.resource-panel .resource-add {
min-height: 140px;
margin-bottom: 30px;
}
.resource-panel .resource-add input[type="text"] {
width: 280px;
}

/* Resource extra fields */
/* --------------------- */
Expand All @@ -1434,3 +1369,32 @@ button.resource-edit-delete {
width: 164px;
}


button.resource-edit-delete {
margin-top: 10px;
float: right;
}



/* HasErrors */
.resource-list li.hasErrors {
border-color: #c00;
border-right: 1px solid #c00;
}
.resource-list li.active.hasErrors {
border-right: 0;
}
.resource-list li.hasErrors a {
color: #c00;
}
.resource-errors {
display: none;
}
.resource-errors dl {
margin-bottom: 0;
}
body.editresources .error-explanation {
/* Let JS render the resource errors inline */
display: none;
}

0 comments on commit 5900d96

Please sign in to comment.