Closed (fixed)
Project:
Views Bookmark
Version:
master
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 May 2007 at 07:53 UTC
Updated:
17 Apr 2008 at 05:28 UTC
Jump to comment: Most recent file
Comments
Comment #1
moshe weitzman commentedAnyone available to review this? If not, I might do so. Would be nice to provide some feedback to users after marking a node.
Comment #2
Steven commentedI like the current minimalist interface. Since the change is immediate, I think it is fairly obvious.
The better solution would be to replace the current link with a more graphical indicator/button that better signals the state (e.g. plus-sign / check-mark) and separates it from the action (add / remove from bookmarks).
Comment #3
merlinofchaos commentedI'm pretty happy with this. I had to make a couple of minor changes to make it work with other changes I made, but nothing too concerning. Commited to -dev. Thanks!
Comment #4
moshe weitzman commentedthe js file was omitted from the commit.
Comment #5
Steven commentedThat means it's still RTBC...
Comment #6
moshe weitzman commentedI just committed the js file and everything works except after i bookmarl or unbookmark, the node link's text flips state twice, and thus mirepsents the bookmarked status. the bookmark is saved/unsaved file, just the text is changed and then changed back. i guess some event is firing twice or something ... setting to needs work.
Comment #7
moshe weitzman commentedi meant to say that the bookmark/unbook action works properly, but the text is wrong.
Comment #8
merlinofchaos commentedWhoops. There was a fix I had to make to the JS to get that to work right. I just hadn't gotten back to this to commit the file.
Comment #9
m3avrck commentedAny updates to this one? Seeing lots of *missing* JS files :-)
Comment #10
bohtho commentedI also see the link which is flipping text twice as Moshe said. Any updates ?
Comment #11
nedjoThe .js file is in the DRUPAL-5 branch. Looks like the last commit on the .js file fixed the flipping issue. Works for me.
Comment #12
nedjoFails without clean URLs. This seems to be due to the way the extra argument to trigger javascript is appended.
Attached is a patch that removes this extra argument and instead tests for a header sent by jQuery to distinguish between a regular and a jQuery/js request.
Comment #13
KentBye commentedI can confirm that ajax bookmarking doesn't work with clean URLs turned off, and that nedjo's patch fixes the issue after Steven's patch is applied. Great patch. Would love to see it committed.
Comment #14
Steven commentedRelying on HTTP headers, which are known to be filtered by overzealous proxies and firewalls, seems like a bad idea.
Comment #15
KentBye commentedI personally will be using this with clean URLs enabled, and so Steven's original patch works fine for me.
The only addition to Steven's script that I'd love to see is some sort of CSS class or id added to the mark and unmark links so that button images could be easily added. I came up with the following way to directly insert the button images, but I'm sure that there's a better way to do it via CSS theming.
I replaced
with
The FlipLabel conditional is keyed off of the name of the image name which is created on the page load, and I'm sure there's a cleaner way to do this as well.
Comment #16
quicksketchI took a good long look at the ajax implementation and made some fairly sweeping changes, but while keeping the original idea intact.
- Fixed several bugs: clean urls, duplicate javascript settings being added, setting proper response headers and making the request expect a json response, rather than manually running Drupal.parseJson.
- The entire link is now replaced, rather than updated. Class attributes and the link title weren't being updated before. I figured it's silly to update all the attributes and content individually, replacing it makes it simpler and more easily themable from the PHP side.
- The default attributes of the javascript links now include helpful classes before and after they have been bookmarked.
- The javascript behavior can now be over ridden with a well-placed hook_link_alter in another module. As well as the classes applied to the bookmark link.
Let's call this one done and open new issues for any new problems. Thanks!
Comment #17
(not verified) commentedComment #18
physiotek commentedis this included in the official stable release for D5? because when i click on the link it immediatly change the bookmark/unbookmark link but the page refresh. is this patch goal is to avoid the page refresh??
thanks!
pht3k
Comment #19
mooffie commented@pht3k: Please open a new issue. It's best if you provide a link to a faulty page on your website.
(Yes, this feature is included in the 'official' release, but you should use the 'dev' one, since it fixes a bunch of misc bugs.)