2017-11-27 11 views
1

SelectAllActiveEnabledがtrueの場合、チェックボックスはクリック可能で、cssカーソル値はポインタです。 SelectAllActiveEnabledがfalseに評価されるとき、チェックボックスはクリック可能ではなく、カーソル値はまだポインタです。どのように私はそれを許可されないように設定するのですか?あなたは、このように結合styleを使用する必要があります「純粋なノックアウト」解決策を探しているならノックアウトチェックボックスラベルcss-cursorからポインタを無効にする

<label> 
    <input type="checkbox" data-bind="checked: selectAllActiveReleases, enable: SelectAllActiveEnabled" /> 
    @Html.GetTranslation(Center.Infrastructure.TranslationSources.Center_Web_Orders_ReleaseFull_ReleaseOverview_LabelSelectAllActiveReleases) 
</label> 
+0

':enabled' CSSセレクタを使ってカーソルを変更します。ノックアウトでそれをやって気にしないでください。 – Tomalak

+0

'input [type = checkbox]:無効{ カーソル:不可。 } ' – adiga

答えて

0

<input type="checkbox" data-bind="checked: selectAllActiveReleases, enable: SelectAllActiveEnabled, style:{'cursor': cursorForCheckbox()}" /> 

あなたはあなたのビューモデルにcursorForCheckboxを導入する必要があります。このようなもの:

self.cursorForCheckbox = ko.pureComputed(function() {return self.SelectAllActiveEnabled() ? 'pointer' : 'not-allowed';}); 
関連する問題