Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
2,095 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
CKAN.Templates.resourceUpload = ' \ | ||
<div class="fileupload"> \ | ||
<form action="http://test-ckan-net-storage.commondatastorage.googleapis.com/" class="resource-upload" \ | ||
enctype="multipart/form-data" \ | ||
method="POST"> \ | ||
\ | ||
<div class="fileupload-buttonbar"> \ | ||
<div class="hidden-inputs"></div> \ | ||
<label class="fileinput-button"> \ | ||
File \ | ||
</label> \ | ||
<input type="file" name="file" /> \ | ||
<span class="fileinfo"></span> \ | ||
<input type="submit" value="upload" /> \ | ||
</div> \ | ||
</form> \ | ||
<div class="messages" style="display: none;"></div> \ | ||
</div> \ | ||
'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
this.CKAN || (this.CKAN = {}); | ||
this.CKAN.View || (this.CKAN.View = {}); | ||
|
||
(function (CKAN, $, _, Backbone, undefined) { | ||
CKAN.View.ResourceCreate = Backbone.View.extend({ | ||
initialize: function() { | ||
this.el = $(this.el); | ||
_.bindAll(this, 'renderMain'); | ||
this.renderMain(); | ||
this.$edit = $(this.el.find('.edit')[0]); | ||
this.$upload = $(this.el.find('.upload')[0]); | ||
this.editView = new CKAN.View.ResourceEditView({ | ||
model: this.model, | ||
el: this.$edit | ||
}); | ||
this.uploadView = new CKAN.View.ResourceUpload({ | ||
el: this.$upload, | ||
model: this.model, | ||
// TODO: horrible reverse depedency ... | ||
client: CKAN.UI.workspace.client | ||
}); | ||
}, | ||
|
||
renderMain: function () { | ||
this.el.empty(); | ||
tmplData = { | ||
}; | ||
var tmpl = $.tmpl(CKAN.Templates.resourceCreate, tmplData); | ||
this.el.html(tmpl); | ||
return this; | ||
}, | ||
|
||
render: function () { | ||
this.editView.render(); | ||
this.uploadView.render(); | ||
} | ||
}); | ||
|
||
})(CKAN, $, _, Backbone, undefined); | ||
|
Oops, something went wrong.