Change d&d tooltip

Ask our community for help with v1.x versions of our products.
User avatar
Albareto
Posts: 60
Joined: Mon May 31, 2010 2:52 pm

Change d&d tooltip

Post by Albareto » Wed Dec 08, 2010 11:52 am

Hi there,

Is there any way of changing the drag and drop tooltip?

I would like to use a custom one instead of the default but I didn't find any example or property to change this, is it possible?

Thanks!

User avatar
mats
Core Developer
Core Developer
Posts: 14589
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden
Contact:

Re: Change d&d tooltip

Post by mats » Wed Dec 08, 2010 12:05 pm

Since everything is just JavaScript and Ext, the answer is pretty much always - Yes it's possible :)

You'll have to override the dropzone onNodeOver method, and getDragData on the dragzone. It'll be a fairly big override, but for next release I'm refactoring the DnD class to make this easier....
Tired of debugging javascript errors in web applications? Try our new error logging service RootCause, or read more on the Sencha blog

@bryntum
Facebook
API documentation

User avatar
Albareto
Posts: 60
Joined: Mon May 31, 2010 2:52 pm

Re: Change d&d tooltip

Post by Albareto » Wed Dec 08, 2010 12:06 pm

Ok, yes, I debugged that and I show it but I was "expecting" (maybe better word is hoping) not to do so.

Thanks

User avatar
mats
Core Developer
Core Developer
Posts: 14589
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden
Contact:

Re: Change d&d tooltip

Post by mats » Wed Dec 08, 2010 12:09 pm

I agree that the code should be cleaned up, maybe I'll have time to refactor it into a solution that uses an XTemplate instead, then it would have been very easy for you to solve this...
Tired of debugging javascript errors in web applications? Try our new error logging service RootCause, or read more on the Sencha blog

@bryntum
Facebook
API documentation

User avatar
Albareto
Posts: 60
Joined: Mon May 31, 2010 2:52 pm

Re: Change d&d tooltip

Post by Albareto » Wed Dec 08, 2010 12:12 pm

Yeah, but easy things are for cowards! :twisted:

Anyway, if in the future you do it would be great!

User avatar
Albareto
Posts: 60
Joined: Mon May 31, 2010 2:52 pm

Re: Change d&d tooltip

Post by Albareto » Wed Dec 08, 2010 1:22 pm

Ok, solved the problem, actually it's a big bunch of code that has to be copied but anyway it's working fine, luckily I don't need to copy the dragZone part as I when it comes in the onNodeOver it already comes with the date we are over and the picture.

Thanks for the support!!

User avatar
mats
Core Developer
Core Developer
Posts: 14589
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden
Contact:

Re: Change d&d tooltip

Post by mats » Wed Dec 08, 2010 1:45 pm

Good work! Just curious, what did you want to change, could you post a screenshot of your new tooltip? Would be interesting to see before I start refactoring the DnD class...
Tired of debugging javascript errors in web applications? Try our new error logging service RootCause, or read more on the Sencha blog

@bryntum
Facebook
API documentation

User avatar
Albareto
Posts: 60
Joined: Mon May 31, 2010 2:52 pm

Re: Change d&d tooltip

Post by Albareto » Wed Dec 08, 2010 2:17 pm

We are using the scheduler only to show days (one day per column) so I wanted to show only the current day in the tooltip, and also to show it localized, for example for English:
dnd_tooltip_en.png
dnd_tooltip_en.png (9.08 KiB) Viewed 1846 times
or for Spanish:
dnd_tooltip_es.png
dnd_tooltip_es.png (10.19 KiB) Viewed 1846 times
and so on for all the languages we support. It is a very easy thing, just removing the other date and cast the startDate.

User avatar
mats
Core Developer
Core Developer
Posts: 14589
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden
Contact:

Re: Change d&d tooltip

Post by mats » Wed Dec 08, 2010 2:21 pm

Ok Cool, this will be much easier to accomplish with the change I'm doing now...
Tired of debugging javascript errors in web applications? Try our new error logging service RootCause, or read more on the Sencha blog

@bryntum
Facebook
API documentation

User avatar
vandries
Posts: 141
Joined: Mon Mar 06, 2017 1:36 pm

Re: Change d&d tooltip

Post by vandries » Wed Oct 31, 2018 11:52 am

hello,
any progress?
I'd like to be able to specify date format to use in dnd tooltip.

Post Reply