Closed (duplicate)
Project:
DraggableViews
Version:
7.x-2.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
16 Feb 2010 at 16:01 UTC
Updated:
27 Jan 2015 at 16:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
ManyNancy commentedYep that would be a great feature. Thanks!
Comment #2
aren cambre commented+1
Comment #3
aren cambre commentedComment #4
rokrThis is the companion issue in core: #504378: Auto-save draggable forms
Comment #5
randomuser commented+1
Maybe a plugin for the Ajax module like ajax_views_refresh?
http://drupal.org/project/ajax_views_refresh
http://drupal.org/project/ajax
Comment #6
btopro commentedI actually have a module that adds ajax refreshing to the book module called outline designer. http://drupal.org/project/outline_designer . I'm sure the code isn't horribly different from what's performed there to pull it off.
It also adds context menu / in line editing of titles and things like that but I'd love to port functionality into draggable if possible as I'm looking to make my project plug/n/play with things other then just books (menus, views, etc).
Comment #7
sirkitree commented+1
Comment #8
hampshire commentedI would be interested as well.
Comment #9
yannickoosubscribe
Comment #10
aren cambre commentedAssuming new features go in latest version.
Comment #11
drupalina commentedIs this feature in the latest 6.x-3x-dev ?
Given that the lists in views can be pretty long, we can't expect the end-user to realise that they have to scroll down to the bottom of the page in order to see the info-message or the "Save" button. I saw the screencasts for http://drupal.org/project/outline_designer - it would be awesome is some of that AJAX-saving code would be adopted in DraggableViews.
Comment #12
burgs commentedsubscribing
Comment #13
btopro commentedSomething similar to this I would think get this integrated -- http://drupal.org/node/1016248#comment-3906774
I'll try taking a closer look at where this could go / what detection to do but it seems like if the displayed information is book related that outline designer could be told to hijack it via:
Comment #14
danny_joris commentedsubscribing
Comment #15
btopro commentedoutline designer 1.3 introduces a module called outline child pages which opens up ways of integrating outline designer with other book-like projects. I'll take a look tomorrow and see if there's anything I can do to make certain draggable views work with outline designer's ajax save functionality.
Comment #16
carn1x commentedsubscribing
Comment #17
jantimon commentedFor D7 there is a patch (#1268824: Ajax Support).
However it does not save form onchange but only onclick as you cannot hook into the change event right now (#1268530: drupal_add_tabledrag: Add javascript hooks for module writers).
Comment #18
ari-meetai commentedThis is interesting. With that patch to tabledrag it would be possible.
Comment #19
rokrAssuming new features go in latest version.
Just realized how snappy the ajax works. Would be great to have an option to auto save order.
Comment #20
ygerasimov commentedLets postpone this issue till the core tabledrag.js will have event we can hook into. See #17 for details.
Comment #21
dippers commentedThis is a code snippet I use in a custom js file to auto submit a draggable view whenever the row order changes. It also hides the 'view has changed' warning message. The draggable view must be ajax enabled via the UI.
Comment #22
ygerasimov commentedWow! Well done Mike! I have added this javascript and committed it b84d605
Comment #23
dippers commentedIt was really posted as a snippet that could be modified as required. For committing it really needs an admin interface that turns autosubmit on/off and passes that through Drupal.settings. As it stands it will autosubmit ALL ajaxed draggable views.
Comment #24
ygerasimov commentedIt is intended behavior to autosubmit ajaxed draggable view. It is implemented in list display already.
Comment #25
zdean commentedNot sure if I should open new issues, but there are 2 problems related to #22:
1. the name of the js file (I think) should be draggableviews_table.js and not draggableviews_table.js.js
2. if there are multiple draggable views on a page, it seems to only work on the first view. The 2nd, 3rd, etc. views still show/require "save" to save the reorder.
Comment #26
dippers commentedOn point 2 the selector to find the submit button should be find('.form-actions input') in the two places it occurs to allow for multiple submit buttons on the page. This change is probably also relevant to the list view version.
Comment #27
zdean commented#26 did not work for me...the "save" buttons now appear for all of the views on the page, including the first view.
*edit: using #26, I was able to get the "save" buttons to hide; however, none of the views now automatically save the reorder...and since the save buttons are hidden, there's no way to save the reorder.
Comment #28
dippers commented@zdean it is working fine here. Do you have a publicly accessible url showing it not working?
Comment #31
stiknoltz commentedI ran into an issue when having multiple forms on a page containing a draggableviews enabled view.
The ID of the submit button has an integer appended and incremented such that your draggableviews .views-form submit input may be #form-submit--3 or some other number.
This patch generalizes the 'find' target such that it shouldn't be an issue.
Comment #32
drupwell commentedI cannot get AJAX autosave to work in listviews or tableviews before/after patching #31. But if I, after patching #31, edit the following in draggableviews_table.js, then autosave works fine for tableviews at least, Save-button is still visible though.
From: $table.parent().find('#edit-actions input').triggerHandler('mousedown');
To: $table.parent().find('#edit-actions #edit-submit').triggerHandler('mousedown');
BR / Fredrik
Comment #34
istryker commentedmarking as a duplication of #1989128: Ajax auto submit not working when multiple forms
Comment #35
istryker commented