Skip to content

Commit

Permalink
[#2223]: Tidying JS template code to match bootstrap form markup.
Browse files Browse the repository at this point in the history
  • Loading branch information
teajaymars committed Mar 21, 2012
1 parent 66b59b6 commit 9034afa
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 1,754 deletions.
3 changes: 3 additions & 0 deletions ckan/public/css/style.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@import url('forms.css');

body.no-sidebar .sidebar-outer { display: none; }
body.no-sidebar #content { border-right: none; }
body.no-sidebar .content-outer {
width: 940px;
}
Expand Down Expand Up @@ -136,6 +137,8 @@ footer h3 {

h1, h2, h3, h4, h5 {
font-family: 'Ubuntu', Georgia;
font-weight: normal;
margin-bottom: 10px;
}

a, a:visited {
Expand Down
2 changes: 1 addition & 1 deletion ckan/public/scripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ var CKAN = CKAN || {};
openid._signin = openid.signin;
openid.signin = function (arg) {
$.get('/user/set_lang/' + CKAN.LANG, function (){openid._signin(arg);})
}
};
}
if ($('#login').length){
$('#login').submit( function () {
Expand Down
44 changes: 15 additions & 29 deletions ckan/public/scripts/templates.js
Original file line number Diff line number Diff line change
@@ -1,37 +1,23 @@

CKAN.Templates.resourceAddLinkFile = ' \
<form> \
<dl> \
<dt> \
<label class="field_opt" for="url"> \
'+CKAN.Strings.fileUrl+' \
</label> \
</dt> \
<dd> \
<input name="url" type="text" placeholder="http://mydataset.com/file.csv" style="width: 60%"/> \
<input name="save" type="submit" class="btn primary" value="'+CKAN.Strings.add+'" /> \
<input name="reset" type="reset" class="btn" value="'+CKAN.Strings.cancel+'" /> \
</dd> \
</dl> \
\
<form class="form-inline"> \
<label class="field_opt" for="url"> \
'+CKAN.Strings.fileUrl+' \
</label> \
<input name="url" type="text" class="input-small" placeholder="http://mydataset.com/file.csv"/> \
<input name="save" type="submit" class="btn btn-primary" value="'+CKAN.Strings.add+'" /> \
<input name="reset" type="reset" class="btn" value="'+CKAN.Strings.cancel+'" /> \
</form> \
';

CKAN.Templates.resourceAddLinkApi = ' \
<form> \
<dl> \
<dt> \
<label class="field_opt" for="url"> \
'+CKAN.Strings.apiUrl+' \
</label> \
</dt> \
<dd> \
<input name="url" type="text" placeholder="http://mydataset.com/api/" style="width: 60%" /> \
<input name="save" type="submit" class="btn primary" value="'+CKAN.Strings.add+'" /> \
<input name="reset" type="reset" class="btn" value="'+CKAN.Strings.cancel+'" /> \
</dd> \
</dl> \
\
<form class="form-inline"> \
<label class="field_opt" for="url"> \
'+CKAN.Strings.apiUrl+' \
</label> \
<input name="url" type="text" class="input-small" placeholder="http://mydataset.com/api/"/> \
<input name="save" type="submit" class="btn btn-primary" value="'+CKAN.Strings.add+'" /> \
<input name="reset" type="reset" class="btn" value="'+CKAN.Strings.cancel+'" /> \
</form> \
';

Expand All @@ -52,7 +38,7 @@ CKAN.Templates.resourceUpload = ' \
<input type="file" name="file" /> \
<br /> \
<div class="fileinfo"></div> \
<input id="upload" name="upload" type="submit" class="btn primary" value="'+CKAN.Strings.add+'" /> \
<input id="upload" name="upload" type="submit" class="btn btn-primary" value="'+CKAN.Strings.add+'" /> \
<input id="reset" name="reset" type="reset" class="btn" value="'+CKAN.Strings.cancel+'" /> \
</dd> \
</dl> \
Expand Down

0 comments on commit 9034afa

Please sign in to comment.