Skip to content

Commit

Permalink
Add help text to reordering
Browse files Browse the repository at this point in the history
  • Loading branch information
Zharktas committed Jun 12, 2019
1 parent b8f215d commit 2d84025
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ckan/public/base/javascript/modules/resource-reorder.js
Expand Up @@ -8,6 +8,7 @@ this.ckan.module('resource-reorder', function($) {
},
template: {
title: '<h1></h1>',
help_text: '<p></p>',
button: [
'<a href="javascript:;" class="btn btn-default">',
'<i class="fa fa-bars"></i>',
Expand Down Expand Up @@ -39,11 +40,19 @@ this.ckan.module('resource-reorder', function($) {
jQuery.proxyAll(this, /_on/);

var labelText = this._('Reorder resources');
var helpText = this._('You can rearrange the resources by dragging them using the arrow icon. Drag the resource ' +
'to the right and place it to the desired location on the list. When you are done, click the "Save order" -button.');

this.html_title = $(this.template.title)
.text(labelText)
.insertBefore(this.el)
.hide();

this.html_help_text = $(this.template.help_text)
.text(helpText)
.insertBefore(this.el)
.hide();

var button = $(this.template.button)
.on('click', this._onHandleStartReorder)
.appendTo('.page_primary_action');
Expand Down Expand Up @@ -81,6 +90,7 @@ this.ckan.module('resource-reorder', function($) {
this.html_form_actions
.add(this.html_handles)
.add(this.html_title)
.add(this.html_help_text)
.show();
this.el
.addClass('reordering')
Expand Down Expand Up @@ -130,6 +140,7 @@ this.ckan.module('resource-reorder', function($) {
this.html_form_actions
.add(this.html_handles)
.add(this.html_title)
.add(this.html_help_text)
.hide();
this.el
.removeClass('reordering')
Expand Down

0 comments on commit 2d84025

Please sign in to comment.