SetReadOnly() private method

private SetReadOnly ( jQueryObject elements, bool isReadOnly ) : jQueryObject
elements jQueryObject
isReadOnly bool
return jQueryObject
コード例 #1
0
        private void UpdateInterface()
        {
            for (var i = 0; i < editors.Count; i++)
            {
                var item   = items[i];
                var editor = editors[i];

                bool readOnly = item.ReadOnly == true || !CanModifyItem(item);
                EditorUtils.SetReadOnly(editor, readOnly);
                EditorUtils.SetRequired(editor, !readOnly && Q.IsTrue(item.Required) &&
                                        (item.EditorType != "Boolean"));

                if (item.Visible == false ||
                    item.ReadPermission != null ||
                    item.InsertPermission != null ||
                    item.UpdatePermission != null ||
                    item.HideOnInsert == true ||
                    item.HideOnUpdate == true)
                {
                    bool hidden =
                        (item.ReadPermission != null && !Q.Authorization.HasPermission(item.ReadPermission)) ||
                        item.Visible == false ||
                        (Mode == PropertyGridMode.Insert && item.HideOnInsert == true) ||
                        (Mode == PropertyGridMode.Update && item.HideOnUpdate == true);

                    editor.GetGridField().Toggle(!hidden);
                }
            }
        }
コード例 #2
0
        private void UpdateInterface()
        {
            for (var i = 0; i < editors.Count; i++)
            {
                var item   = items[i];
                var editor = editors[i];

                bool readOnly = item.ReadOnly == true ||
                                (Mode == PropertyGridMode.Insert && item.Insertable == false) ||
                                (Mode == PropertyGridMode.Update && item.Updatable == false);

                EditorUtils.SetReadOnly(editor, readOnly);
                EditorUtils.SetRequired(editor, !readOnly && Q.IsTrue(item.Required) &&
                                        (item.EditorType != "Boolean"));

                if (item.Visible == false ||
                    item.HideOnInsert == true ||
                    item.HideOnUpdate == true)
                {
                    bool hidden =
                        item.Visible == false ||
                        (Mode == PropertyGridMode.Insert && item.HideOnInsert == true) ||
                        (Mode == PropertyGridMode.Update && item.HideOnUpdate == true);

                    editor.GetGridField().Toggle(!hidden);
                }
            }
        }
コード例 #3
0
        private void UpdateReadOnly()
        {
            for (var i = 0; i < editors.Count; i++)
            {
                var item   = items[i];
                var editor = editors[i];

                bool readOnly = item.ReadOnly == true ||
                                (Mode == PropertyGridMode.Insert && item.Insertable == false) ||
                                (Mode == PropertyGridMode.Update && item.Updatable == false);

                EditorUtils.SetReadOnly(editor, readOnly);
                EditorUtils.SetRequired(editor, !readOnly && Q.IsTrue(item.Required) &&
                                        (item.EditorType != "Boolean"));
            }
        }
コード例 #4
0
 public static jQueryObject SetReadOnly(jQueryObject elements, bool isReadOnly)
 {
     return(EditorUtils.SetReadOnly(elements, isReadOnly));
 }
コード例 #5
0
 public static void SetReadOnly(Widget widget, bool isReadOnly)
 {
     EditorUtils.SetReadOnly(widget, isReadOnly);
 }