Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...~/admin/tabs/tabs.ascx - cut down 60% of the code!~/admin/tabs/tabs.ascx - cut down 60% of the code!
Previous
 
Next
New Post
3/21/2008 4:22 PM
 

Today I made the tabs control 25 lines as opposed to 95 lines using DIVs/CSS instead of tables. (CSS is only 3 lines)

Here's the code:

<%@ Control Inherits="DotNetNuke.Modules.Admin.Tabs.Tabs" language="vb" AutoEventWireup="false" Explicit="True" CodeFile="Tabs.ascx.vb" %>
<%@ Register TagPrefix="dnn" TagName="HelpButton" Src="~/controls/HelpButtonControl.ascx" %>
<asp:panel id="pnlTabs" runat="server" cssclass="WorkPanel" visible="True">
    <div id="pages-left">
    <label style="DISPLAY:none" for="<%=lstTabs.ClientID%>">First Tabs</label>
    <asp:listbox id="lstTabs" runat="server" rows="22" datatextfield="TabName" datavaluefield="TabId" cssclass="NormalTextBox" width="400px"></asp:listbox>
    </div>
    <div id="pages-right">
        <asp:label id="lblMovePage" runat="server" resourcekey="MovePage">Move Page</asp:label>
        <hr noshade size="1" />
        <ul>
            <li><asp:imagebutton id="cmdUp" resourcekey="cmdUp.Help" runat="server" alternatetext="Move Tab Up In Current Level" commandname="up" imageurl="~/images/up.gif"></asp:imagebutton><dnn:HelpButton id="hbtnUpHelp" resourcekey="cmdUp" runat="server" /></li>
            <li><asp:imagebutton id="cmdDown" resourcekey="cmdDown.Help" runat="server" alternatetext="Move Tab Down In Current Level" commandname="down" imageurl="~/images/dn.gif"></asp:imagebutton><dnn:helpbutton id="hbtnDownHelp" resourcekey="cmdDown" runat="server" /></li>
            <li><asp:imagebutton id="cmdLeft" resourcekey="cmdLeft.Help" runat="server" alternatetext="Move Tab Up One Hierarchical Level" commandname="left" imageurl="~/images/lt.gif"></asp:imagebutton><dnn:helpbutton id="hbtnLeftHelp" resourcekey="cmdLeft" runat="server" /></li>
            <li><asp:imagebutton id="cmdRight" resourcekey="cmdRight.Help" runat="server" alternatetext="Move Tab Down One Hierarchical Level" commandname="right" imageurl="~/images/rt.gif"></asp:imagebutton><dnn:helpbutton id="hbtnRightHelp" resourcekey="cmdRight" runat="server" /></li>
        </ul>
        <asp:label id="lblActions" runat="server" resourcekey="Actions">Actions</asp:label>
        <hr noshade size="1" />
        <ul>
            <li><asp:imagebutton id="cmdEdit" resourcekey="cmdEdit.Help" runat="server" alternatetext="Edit Tab" imageurl="~/images/edit.gif"></asp:imagebutton><dnn:helpbutton id="hbtnEditHelp" resourcekey="cmdEdit" runat="server" /></li>
            <li><asp:imagebutton id="cmdView" resourcekey="cmdView.Help" runat="server" alternatetext="View Tab" imageurl="~/images/view.gif"></asp:imagebutton><dnn:helpbutton id="hbtnViewHelp" resourcekey="cmdView" runat="server" /></li>
            <li><asp:imagebutton id="cmdDelete" resourcekey="cmdDelete.Help" runat="server" alternatetext="Delete Tab" imageurl="~/images/delete.gif"></asp:imagebutton><dnn:helpbutton id="hbtnDeleteHelp" resourcekey="cmdDelete" runat="server" /></li>
        </ul>
    </div>
</asp:panel>

CSS:

#pages-left{ width:410px; float:left; }
#pages-right{ width:100px; float:left; }
#pages-right ul, #pages-right li{ list-style-type:none;}
 
Thanks for reading!
 
New Post
3/22/2008 5:08 AM
 

please suggest enhancements and report bugs at the public issue tracker at support.dotnetnuke.com.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
3/24/2008 7:44 AM
 

Oh, my bad, I thought this was a discussion forum....?? Thought people might like to see this and talk about it.

 
New Post
3/24/2008 7:44 PM
 

I read his response to you a little differently, Joseph. Not that it is wrong to post this here - but since it is what it is, it should also be posted on gemini where it has a chance of getting included as an enhancement to DNN.


pmgerholdt
 
New Post
3/25/2008 1:17 PM
 

What's even better than discussing it?  Actually including it in a future DNN update so everyone gets to benefit from your excellent changes!  That's all Sebastian was suggesting :)

Brandon


Brandon Haynes
BrandonHaynes.org
 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...~/admin/tabs/tabs.ascx - cut down 60% of the code!~/admin/tabs/tabs.ascx - cut down 60% of the code!


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out