PDA

View Full Version : [CLOSED] Item disable style stopped working



supera
Jan 23, 2012, 3:11 PM
It seems to me that after the upgrade to 2.x, some styles have stopped working

I have in my css



.x-item-disabled input {
color: #C6C6C6 !important;
}


In my combobox, I set DisabledClass="x-item-disable"


I link the css file this way



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Sugestões</title>
<link href="~/Resources/Styles/SuperaWeb.css" rel="stylesheet" type="text/css" />
<link href="~/Resources/Styles/ExtNet.css" rel="stylesheet" type="text/css" />
</head>

geoffrey.mcgill
Jan 23, 2012, 3:39 PM
Hi,

The following sample appears to function correctly.

Example


<%@ Page Language="C#" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Ext.NET Example</title>


<link href="example.css" rel="stylesheet" type="text/css" />


<%--
<style type="text/css">
.x-item-disabled input {
color : #f00 !important;
}
</style>
--%>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />


<ext:ComboBox runat="server" Disabled="true" Text="Hello World" />
</form>
</body>
</html>

If this issue is still an issue, please post a simplified code sample which demonstrates how to reproduce.

supera
Jan 23, 2012, 3:58 PM
Hi Geoffrey... thank you for your response.

I wish that the FieldLabel stay in black color, like other fields, when it is disable...

I create a single exemple, without a Css file, and did not change a Fieldlabel color also...

I teste this code in IE, Firefox, Google Chrome and Opera, with the same result.

Follow:



<%@ Page Language="C#" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Ext.NET Example</title>

<style type="text/css">
.x-item-disabled input {
color : Black !important;
}
</style>

</head>
<body>
<form id="Form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<ext:TextField runat="server" ID="txtNome" FieldLabel="teste" Disabled="true"/>
</form>
</body>
</html>

Daniil
Jan 23, 2012, 4:46 PM
Hi @supera,

Please apply:

<style type="text/css">
.x-item-disabled {
opacity: 1;
filter: alpha(opacity=100);
}
</style>

It works almost 100% apart from a text color of input HTML element in IE - it's gray. IE manages CSS of disabled input HTML elements itself on a browser level, therefore, unfortunately, there is no way to override it.

supera
Jan 23, 2012, 6:05 PM
Hi Daniil

Thanks for your responde

I test your exemple and this working fine! Improved somewhat the presentation of the disabled fields.

Too bad the code below no work in version 2.x. .. worked well in version 1.x



.x-item-disabled input {
color: Black !important;
}

Daniil
Jan 24, 2012, 6:51 AM
Many CSS classes names, rules have been changed in Ext.NET v2 / ExtJS 4 in optimization purpose.