Gibe / Umbraco-Link-Picker

Link picker property editor for Umbraco 7
12 stars 10 forks source link

Link Picker does not set $dirty #13

Open bjarnef opened 8 years ago

bjarnef commented 8 years ago

It seems that Link Picker does not set $dirty, when you choose a node (or enter a link) (making the "unsaved changed" dialog pop up when you navigate to another node without saving changes).

It is also an issue with MNTP: http://issues.umbraco.org/issue/U4-8143

karltynan commented 8 years ago

What version of Umbraco are you seeing this on?

bjarnef commented 8 years ago

Umbraco 7.4.1

Are you watching model.value and set dirty property on form when value has changed?

Like this: https://github.com/imulus/uWestFest/blob/master/urlpicker/app/scripts/controllers/url.picker.controller.js#L147-L160

or this: https://github.com/imulus/Archetype/blob/master/app/controllers/controller.js#L443-L448

karltynan commented 8 years ago

Interesting that I don't get the pop up on 7.4.0.

So the intention is to show the pop up if you have made changes and not saved, and not to show it if you haven't made an changes.

I will look into adding this functionality for the next version.

bjarnef commented 8 years ago

Yep, that is how the popup is intended - it show up when a property form has dirty property set to true. You should be able to see a ng-dirty class on the form, when you have made a change.

But I think it is an issue for Content Picker / MNTP as well: http://issues.umbraco.org/issue/U4-8143