How to disable default skin for a particular control? - asp.net-3.5

Is it possible to have a control which does not use the default skin that is specified in a .skin file?
I have a control for which I do not want a default skin applied to.

Find this solution in most asp.net books: use EnableTheming
<asp:Button ID="Button1" runat="server" Text="Button" EnableTheming="false" />
However, it just doesn't work :D. Someone said it's a bug and suggest a workaround: set SkinID to a "not exist" ID
<asp:Button ID="Button1" runat="server" Text="Button" SkinID="0" />
This works for me but... have a bad feeling

Related

Add aria-hidden to Title element

I am trying to make a business critical SAPUI5 application more accessible using screen readers by adding ARIA labels and landmarks. One issue is that some SAPUI5 elements such as sap.m.Title's without text have been used (abused) for layout purposes. I would like to add the aria-hidden attribute or a SAPUI5 analogue to these Title elements. But I can't figure out how to do this. I would like to change
<Title text="" class="title" />
into
<Title aria-hidden="true" text="" class="title" />
But setting aria-hidden on the Title like this seems to be invalid. How would I go about setting a standard HTML attribute on a SAPUI5 control?
Thank you in advance for your help!
Joshua

Why are Breadcrumbs sapui5 minimized?

in my SAPUI5-application i use breadcrumbs. This feature is quite nice, but on a specific word ("Vertrag") the link to the overriding breadcrumb is collapsed and there's a dropdown-field. By changing the word from "Vertrag" to "Vertrags", the overriding breadcrumb isn't collapsed anymore.
Can you help me, to disaple this dropdown-field?
XML-file containing the breadcrumb:
<FlexBox height="50px" alignItems="Start" justifyContent="Center">
<Breadcrumbs currentLocationText="{i18n>Contract}">
<Link press="onPressBreadcrumb" text="{i18n>Overview}" id="Overview"/>
</Breadcrumbs>
</FlexBox>
OK
Not OK
Thanks.
I think, this must be a issue on calculation width of the flex box. Try to play with margins, pattern or other stuff that affect rendering.
Or try to force for test like this
<FlexBox height="50px" alignItems="Start" justifyContent="Center">
<Breadcrumbs currentLocationText="{i18n>Contract}">
<Link press="onPressBreadcrumb" text="{i18n>Overview}" id="Overview"/>
</Breadcrumbs>
<Label text="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" />
</FlexBox>
It may be necessary to test it on all popular browsers.

TYPO3 addToolbarItem (BE extension)

Hey guys and Happy Easter,
I am working on an extension for the backend and would like to have the standard toolbar with save and cancel options in my own extension.
So I would like to have sth. like this:
I am kind of an newbie and would like to have a little more detailed answer.
Found something about addToolbarItem on the internet but don't know how to use it.
Edit:
Unfortunately I have to work with TYPO3 v4.5 and pibase extension and don't have enough time to change the version to 6.2.9...
Thanks!
Assuming you're using TYPO 6.x+ and Extbase!
You can put additional elements from your view to the layout by additional sections. most probably your view now looks like:
<f:layout name="Default"/>
<f:section name="content">
<h1>Foo</h1>
</f:section>
so add new section i.e.:
<f:layout name="Default"/>
<f:section name="myButtons">
<f:be.buttons.icon icon="actions-document-new" title="Create new Foo" />
</f:section>
<f:section name="content">
<h1>Foo</h1>
</f:section>
And finally in your Default.html layout render your section in proper place (set it as optional, otherwise you'll get an exception if missing!)
....
<div class="typo3-docheader-buttons">
<div class="left">
<f:render section="myButtons" optional="true"/>
</div>
<div class="right">
<span title="Reload" class="t3-icon t3-icon-actions t3-icon-actions-system t3-icon-system-refresh"> </span>
<f:be.buttons.shortcut />
</div>
</div>
....
Of course this way you can also set other elements like <f:be.menus.actionMenu>, <f:be.pageInfo /> etc, or even just your text labels.
Check ViewHelpers in typo3/sysext/fluid/Classes/ViewHelpers/Be/ for some ready to use elements.

Image for form label

I am quite interested in exploring accessibility in forms and accessibility in general.
Is it against the rules to use an image as a label if the image also has an alt tag representing the the label? Would this be ok? If not what is the best approach? I have a small form for clients to enter their links to the social sites they use and would like to use the logo of the social site rather than text (label).
Thanks,
Jack
I think it would be better to use CSS class:
<div class="social">
<label for="social1" class="s1">Social 1</label>
<input type="text id="social1" name="social1" />
<label for="social2" class="s2">Social 2</label>
<input type="text id="social2" name="social2" />
</div>
So you could apply background like this:
.social {
display: block;
width: 50px;
height: 50px;
background-repeat: no-repeat;
}
.social .s1{
background-image: url("social1.gif");
}
.social .s2{
background-image: url("social2.gif");
}
I would not remove text from the labels. So it would be possible for users to select that text but still look like an image (with appropriate background).
But if you really want to stick with images only then you can use this approach:
<div class="social">
<label for="social1" class="s1">
<img alt="Social 1" src="img/social1.gif" />
</label>
<input type="text id="social1" name="social1" />
<label for="social2" class="s2">
<img alt="Social 2" src="img/social2.gif" />
</label>
<input type="text id="social2" name="social2" />
</div>
and answering your question, I think it is ok to have images with alt text.
Disclaimer: I'm not a usability expert
I think it would depend on a few factors.
Are the links all to sites that have well known brands/logos? Will people understand that it's not some random art?
Is there some context that indicated that it is clickable? For instance, is this in a table where one of the table headers states "Link"? Does it highlight when you mouse over it?
Is there a reason why typical text links would look particularly ugly or nondistinctive?
Are there sites with similar functionality that do the same thing?
I hope this helps in some fashion!

ASP.NET LinkButton OnClick Event Is Not Working On Home Page

I have a user control that handles logging a user in to my site. This user control is placed in the upper right corner of all pages as a Quick Login Box. The problem I'm having is that on my production server, the LinkButton click events I have provided for logging in and reset are not firing the OnClick event after a postback. Its like it just forgets to do it.
Normally this wouldn't be such an issue to debug, except that it does not happen when running in debug on localhost (nor when running in release on localhost). It only seems to be occurring on my production server and only on my home page. If I try to login using the user control from any other page it works fine and the OnClick event runs as it normally should. I'm at my wits end here as I just don't know of anymore ways to debug this thing and every suggestion I've encountered on Google does not help. Below is the markup I'm using in my user control, any suggestions or help would be greatly appreciated. The LinkButton's "Login" and "Reset" do not work at all.
<asp:Panel ID="AnonPanel" runat="server" DefaultButton="Login">
<div id="welcome">
<span class="welcome">Welcome </span><span class="guest1">Guest!</span> <span>Login </span>|<span > Signup</span>
</div>
<div id="input_boxarea">
<div id="user_id">
<asp:TextBox ID="UserName" runat="server" CssClass="input_box1"></asp:TextBox>
</div>
<div id="password">
<asp:TextBox ID="Password" runat="server" TextMode="Password" CssClass="input_box1" size="16"></asp:TextBox>
</div>
</div>
<div id="remember">
<div id="reme">
<div id="reme1">
<asp:CheckBox ID="RememberMe" runat="server" />
</div>
<div id="reme2">Remember me</div>
</div>
<div id="loginbutton1"><span class="login"><asp:LinkButton ID="Login"
runat="server" CommandName="Login" onclick="Login_Click">Login</asp:LinkButton></span></div>
<div id="resetbutton1"><span class="login"><asp:LinkButton ID="Reset"
runat="server" onclick="Reset_Click">Reset</asp:LinkButton></span></div>
</div>
<asp:Panel ID="AdminPanel" runat="server" Visible="false">
<div id="welcome_loggedin">
<span class="welcome">Welcome </span><span class="guest1"><asp:LoginName ID="LoginName1" runat="server" />!</span><br />
<asp:HyperLink ID="MyAccountLink" CssClass="memberLink" runat="server" NavigateUrl="/my-account.html">My Account</asp:HyperLink><br />
<asp:HyperLink ID="MyLeaguesLink" CssClass="memberLink" runat="server" NavigateUrl="/my-leagues.html">My Leagues</asp:HyperLink><br />
<asp:HyperLink ID="AdminLink" CssClass="memberLink" runat="server" NavigateUrl="/admin/">Admin Area</asp:HyperLink><br />
<asp:HyperLink ID="IssueTrackerLink" CssClass="memberLink" runat="server" Target="_blank">Issue Tracker</asp:HyperLink><br />
<asp:HyperLink ID="Logout" CssClass="memberLink" runat="server" NavigateUrl="/logout.html">Logout</asp:HyperLink>
</div>
<asp:Panel ID="UserPanel" runat="server" Visible="false">
<div id="welcome_loggedin">
<span class="welcome">Welcome </span><span class="guest1"><asp:LoginName ID="LoginName2" runat="server" />!</span><br />
<asp:HyperLink ID="HyperLink1" CssClass="memberLink" runat="server" NavigateUrl="/my-account.html">My Account</asp:HyperLink><br />
<asp:HyperLink ID="HyperLink2" CssClass="memberLink" runat="server" NavigateUrl="/my-leagues.html">My Leagues</asp:HyperLink><br />
<asp:HyperLink ID="HyperLink3" CssClass="memberLink" runat="server" NavigateUrl="/logout.html">Logout</asp:HyperLink>
</div></asp:Panel>
try changing "causes validation" property to false and see if that makes a difference.
Could you temporarily perform some logging from those event handlers?
You could write to a .txt file on the web server. Or to the event log.
As the first line in the click event, write to the log. Then, perform the desired action (login, reset) in a try-catch block. Both the try and the catch write to the log again. If there's some weird exception happening, you can capture the details in your catch logging.
If you want to leave this temporary code in place, but don't want to perform logging unnecessarily, you could add a toggle in <appSettings> in your web.config file, so that you can turn the logging on and off.