Skip to content

Commit

Permalink
[#3816] Remove button for resource query
Browse files Browse the repository at this point in the history
  • Loading branch information
wardi committed Oct 29, 2017
1 parent 675b5ec commit 395633d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ckan/public/base/javascript/modules/image-upload.js
Expand Up @@ -59,13 +59,19 @@ this.ckan.module('image-upload', function($) {
.appendTo(this.el);

// Button to use a query for this resource
var removeText = this._('Remove');
if (this.field_query_input) {
this.button_query = $('<a href="javascript:;" class="btn btn-default">' +
'<i class="fa fa-filter"></i>' +
this._('Query') + '</a>')
.prop('title', this._('Query data from other resources'))
.on('click', this._onQuery)
.insertAfter(this.input);
$('<a href="javascript:;" class="btn btn-danger btn-remove-url">'
+ removeText + '</a>')
.prop('title', removeText)
.on('click', this._onRemove)
.insertBefore(this.field_query_input);
}

// Button to set the field to be a URL
Expand All @@ -83,7 +89,6 @@ this.ckan.module('image-upload', function($) {
.insertAfter(this.input);

// Button for resetting the form when there is a URL set
var removeText = this._('Remove');
$('<a href="javascript:;" class="btn btn-danger btn-remove-url">'
+ removeText + '</a>')
.prop('title', removeText)
Expand Down

0 comments on commit 395633d

Please sign in to comment.