diff --git a/app/assets/javascripts/templateFolderForm.js b/app/assets/javascripts/templateFolderForm.js index 01cc8bab3..b6668d19a 100644 --- a/app/assets/javascripts/templateFolderForm.js +++ b/app/assets/javascripts/templateFolderForm.js @@ -29,6 +29,9 @@ this.states.filter(state => state.cancellable).forEach((x) => this.addCancelButton(x)); this.states.filter(state => state.key === 'items-selected-buttons').forEach(x => this.addClearButton(x)); + // activate stickiness of elements in each state + this.activateStickyElements(); + // first off show the new template / new folder buttons this.currentState = this.$form.data('prev-state') || 'unknown'; if (this.currentState === 'unknown') { @@ -41,6 +44,18 @@ this.$form.on('change', 'input[type=checkbox]', () => this.templateFolderCheckboxChanged()); }; + this.activateStickyElements = function() { + var oldClass = '.js-will-stick-at-bottom-when-scrolling'; + var newClass = 'js-stick-at-bottom-when-scrolling'; + + this.states.forEach(state => { + state.$el + .find(oldClass) + .removeClass(oldClass) + .addClass(newClass); + }); + }; + this.addCancelButton = function(state) { let $cancel = this.makeButton('Cancel', () => { diff --git a/app/templates/views/templates/_move_to.html b/app/templates/views/templates/_move_to.html index cf752d9b8..c08713bdf 100644 --- a/app/templates/views/templates/_move_to.html +++ b/app/templates/views/templates/_move_to.html @@ -6,14 +6,14 @@ {% if templates_and_folders_form.move_to.choices and template_list.templates_to_show %}
-
+
{{ radios_nested(templates_and_folders_form.move_to, move_to_children, option_hints=option_hints) }}
-
+
{{ page_footer('Move', button_name='operation', button_value='move-to-existing-folder') }}
-
+
Move to a new folder {{ textbox(templates_and_folders_form.move_to_new_folder_name) }} @@ -21,7 +21,7 @@
{% endif %} -
+
Add a new folder {{ textbox(templates_and_folders_form.add_new_folder_name) }} @@ -31,10 +31,10 @@
Add a new template -
+
{{ radios(templates_and_folders_form.add_template_by_template_type) }}
-
+
{{ page_footer('Continue', button_name='operation', button_value='add-new-template') }}