Improved domain table on virtual server homepage

4 posts / 0 new
Last post
#1 Wed, 11/16/2005 - 16:10
ChrisBlackwell

Improved domain table on virtual server homepage

HI,

Just a couple of suggestions for improving the list of domains on the Virtualmin module homepage.

I have a lot of sites with multiple aliases, most of which are simply .com/net/org versions of the same domain. So it would cool if these could be hidden by default. Adding a little plus/minus button next to domains with aliases or subservers to expand/collapse them. Can be done with some very simple javascript, so will work in pretty much any browser.

Also it would be nice to be able to go directly from the main screen to some of the domain management features, like edit Mail/FTP Users. A nice popup actions menu for each of the servers would be neat :)

I'm having a look at the source for the relevant pages, but my perls not great, if i manage to come up with anything i'll let you have it.

cheers, chris

Wed, 11/16/2005 - 20:29
Joe
Joe's picture

That's an excellent idea, Chris!

We've already got a new version of the theme (plus some Webmin and Virtualmin changes) that makes use of dropdown displays like this in addition to resolving the issue of "where am I?" when a new user first logs into Webmin, but I didn't think about aliases or any Virtualmin front page stuff. This will definitely be in the next major theme revision (probably in the next two weeks). I've got to convert them from the straight proof-of-concept HTML to JavaScript-enabled AJAX-y kind of stuff, and have some new images made (assuming I can distract David from his new job at SuSE/Novell long enough to draw for us, if not I'll have to make them myself or find a new artist).

There will be a lot of this kind of thing coming very soon--I know there is a lot of cool stuff that should be right out front, but getting the JavaScript written (or choosing a good library) and getting all of the stylesheets and design in place is very time-consuming.

Feedback of this kind is always welcome. Ease of use and efficiency of the GUI is always worth devoting effort to.

--

Check out the forum guidelines!

Sun, 06/07/2009 - 06:58
ChrisBlackwell

If its any help i had a play around with the HTML from the domain table and this is what i came up with..

[!-- Parent or main domain row -->
[tr bgcolor=#ffffff>
[!-- add an extra column for the expand control -->
<td><a href="javascript:showhideAlias('sub11310586506191');">±</a></td>
[td><a
href="https://server.com:10000/virtual-server/edit_domain.cgi?dom=113105865061...
[td>domain</td>
[td><br></td>
[td>1[sp](<a
href="https://server.com:10000/virtual-server/list_users.cgi?dom=1131058650619...) [/td>
[td>1[sp](<a
href="https://server.com:10000/virtual-server/list_aliases.cgi?dom=11310586506...) [/td>
[td>50 MB</td>
[td>2432 kB</td></tr>
<!-- wrap all aliases/sub-servers in a tbody tag and hide them -->
<tbody id="sub11310586506191" style="display:none;">
[tr bgcolor=#ffffff>
<td>[sp]</td>
[td>[sp][sp][sp][sp]<a
href="https://server.com:10000/virtual-server/edit_domain.cgi?dom=113111074625...
[td>domain</td>
[td>Alias of domain.com</td>
[td>0</td>
[td>1[sp](<a
href="https://server.com:10000/virtual-server/list_aliases.cgi?dom=11311107462...) [/td>
[td>[sp][sp]"</td>
[td><br></td></tr>
</tbody>

<script>
function showhideAlias(id) {
var row = document.getElementById(id);
if(row.style.display=="none") row.style.display = "";
else row.style.display = "none";
}
</script>

Wrapping the aliases in a tbody tag is the most efficient way of hiding them, you could give all sub/aliase[tr>'s an id, but then you'd have to loop and hide them all.

One consideration might be that crappy browsers that don't support the javascript might still support the style and you wouldnt be able to get to the hidden domains. It might be worth loading the page with them visible and then hiding them in an onLoad function. Also disabling this feature in the module config would be good.

Thu, 11/17/2005 - 04:41
ChrisBlackwell

when you say you've got a new version of the theme, i'm hoping that functionality and theming will stay seperate as i'm using the tiger theme from stressfree, possibly the best theme i've seen :)

Topic locked