{"action":"created","issue":{"url":"https://api.github.com/repos/riganti/dotvvm/issues/296","repository_url":"https://api.github.com/repos/riganti/dotvvm","labels_url":"https://api.github.com/repos/riganti/dotvvm/issues/296/labels{/name}","comments_url":"https://api.github.com/repos/riganti/dotvvm/issues/296/comments","events_url":"https://api.github.com/repos/riganti/dotvvm/issues/296/events","html_url":"https://github.com/riganti/dotvvm/issues/296","id":198267002,"number":296,"title":"FormControls.Enabled attached property with inheritance to allow disabling the whole form at once","user":{"login":"tomasherceg","id":5599524,"avatar_url":"https://avatars.githubusercontent.com/u/5599524?v=3","gravatar_id":"","url":"https://api.github.com/users/tomasherceg","html_url":"https://github.com/tomasherceg","followers_url":"https://api.github.com/users/tomasherceg/followers","following_url":"https://api.github.com/users/tomasherceg/following{/other_user}","gists_url":"https://api.github.com/users/tomasherceg/gists{/gist_id}","starred_url":"https://api.github.com/users/tomasherceg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomasherceg/subscriptions","organizations_url":"https://api.github.com/users/tomasherceg/orgs","repos_url":"https://api.github.com/users/tomasherceg/repos","events_url":"https://api.github.com/users/tomasherceg/events{/privacy}","received_events_url":"https://api.github.com/users/tomasherceg/received_events","type":"User","site_admin":false},"labels":[{"id":144942659,"url":"https://api.github.com/repos/riganti/dotvvm/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":185314075,"url":"https://api.github.com/repos/riganti/dotvvm/labels/Framework","name":"Framework","color":"bfe5bf","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-01-01T13:16:38Z","updated_at":"2017-01-01T15:48:55Z","closed_at":null,"body":"We should add a new attached property `FormControls.Enabled` which could be applied to any HTML element, and all form controls could be disabled using this property, so it could be very easy to disable the whole form at once.\r\n\r\nIf both `FormControls.Enabled` and the `Enabled` property on the controls is set, the `Enabled` takes the precendence, because we may need to disable the whole form except of one field which should be enabled all the time. \r\n\r\nWe should review all form controls because now there will be a difference between not setting the `Enabled` property (which means take the default from `FormControls.Enabled`) and setting it to `true`, `false` or a binding, which will have the priority.\r\n\r\nAlso, maybe we could support this on a DotvvmProperty level, because this is basically an extended behavior of the default value - we are saying \"if this property is not set, use this second property to determine the value (which wil be set, or will have its own default value)\".\r\nMaybe it would be just enough to check whether the defeultValue is not a dependency property, and if so, just call `GetValue` on it.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/riganti/dotvvm/issues/comments/269907897","html_url":"https://github.com/riganti/dotvvm/issues/296#issuecomment-269907897","issue_url":"https://api.github.com/repos/riganti/dotvvm/issues/296","id":269907897,"user":{"login":"exyi","id":7894687,"avatar_url":"https://avatars.githubusercontent.com/u/7894687?v=3","gravatar_id":"","url":"https://api.github.com/users/exyi","html_url":"https://github.com/exyi","followers_url":"https://api.github.com/users/exyi/followers","following_url":"https://api.github.com/users/exyi/following{/other_user}","gists_url":"https://api.github.com/users/exyi/gists{/gist_id}","starred_url":"https://api.github.com/users/exyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exyi/subscriptions","organizations_url":"https://api.github.com/users/exyi/orgs","repos_url":"https://api.github.com/users/exyi/repos","events_url":"https://api.github.com/users/exyi/events{/privacy}","received_events_url":"https://api.github.com/users/exyi/received_events","type":"User","site_admin":false},"created_at":"2017-01-01T15:48:55Z","updated_at":"2017-01-01T15:48:55Z","body":"I just wanted to demonstrate that it is pretty easy to do for the DotvvmProperty part :), I'd also put this logic inside core DotvvmProperty, it can be quite useful in other places.\r\n\r\nThe problem with bindings is that they are compiler for fixed DataContext so they can't be transfered to different control. It is one of the things I'm trying to solve in bindingSystemRefactoring branch - it will allow you to replace the knockout `$context` parameter with `$parentContext`s (I forgot to put issue for that on github, working on it now, sorry)."}}
{"actor":{"display_login":"exyi"}}