iNerd Blog

CSS Useful posts

Posted in WEB by Ari on 16 April 2010

Recently I found this useful CSS article by Shaun Inman. The article is title CSS Qualified Selectors – some advanced CSS stuff.

Some sneek peek:

To remove the img border that
…contained checkbox is disabled? The pointer cursor is misleading (since the label’s checkbox can’t be un/checked). Currently we need to manually class the label (or disable an additional arbitrary parent element) to correct this. With Qualified Selectors (combined with attribute selectors) we could just write:

label < input[disabled]
{
cursor: default;
}

.. To differentiate the previously visited links

ul.archive li < h3 a:visited
{
opacity: 0.5;
}

To hide an empty excerpt:

div.excerpt !< * { display: none; }

Another good post would be CSS Child and sibling selector

Advertisements

ASP.NET MVC Useful Sites

Posted in Programming by Ari on 9 April 2010

Here are some useful sites that i would love to refer back to in the future ( coz I forget things sometimes):

Regular Expression Library

Regular Expressions Library

Validation Application Block (Ms validation Framework)

http://msdn.microsoft.com/en-us/library/dd203099.aspx

ASP.NET MVC tutorials

Contact Management System

Scott Gu MVC Store

CSS Stuff

CSS tricks

— will soon be updated when i have the time. A lot more coming!

ASP.NET MVC Menu Item Helper (selected/non-selected menu)

Posted in Uncategorized by Ari on 9 April 2010
using System;
using System.Web.Mvc;
using System.Web.Mvc.Html;
namespace Helpers
{
     /// <summary>
     /// This helper method renders a link within an HTML LI tag.
     /// A attribute is added to the tag when
     /// the link being rendered corresponds to the current
     /// controller and action.
     /// 
    /// This helper method is used in the Site.Master View 
   /// Master Page to display the website menu.
   /// </summary>
 public static class MenuItemHelper
 {
          public static string MenuItem(this HtmlHelper helper, string linkText, string actionName, string controllerName)
          {
                      string currentControllerName = (string)helper.ViewContext.RouteData.Values["controller"];
                      string currentActionName = (string)helper.ViewContext.RouteData.Values["action"];

                      var builder = new TagBuilder("li");
 
                     // Add selected class
                     if (currentControllerName.Equals(controllerName, StringComparison.CurrentCultureIgnoreCase) && currentActionName.Equals(actionName,StringComparison.CurrentCultureIgnoreCase))
                            builder.AddCssClass("selected");            
 
                    // Add link
                   builder.InnerHtml = helper.ActionLink(linkText, actionName, controllerName);

                   // Render Tag Builder
                   return builder.ToString(TagRenderMode.Normal);
 }

         }
}

Image link in ASP.NET MVC

Posted in Programming by Ari on 9 April 2010
<td>
    <%= Html.ActionLink("Edit", "Edit", new { id=item.Id  }) %> |
    <%= Html.ActionLink("Delete", "Delete", new { id=item.Id  }) %>
</td>

This is how a normal link usually written. When you want a url to be embedded within an image it should be written like this:

<td>
   <a href='<%= Url.Action("Edit", new {id=item.Id}) %>'>
       <img src="../../Content/Edit.png" alt="Edit" /></a>
</td>
<td>
   <a href='<%= Url.Action("Delete", new {id=item.Id}) %>'>
       <img src="../../Content/Delete.png" alt="Delete" /></a>

</td>


	
Tagged with:

CACOO – Create diagrams online with Real time collaboration!!

Posted in IT world by Ari on 7 April 2010

CacooCacoo is a user-friendly online drawing tool that allows you to create a variety of diagrams such as site maps, wire frames, UML and network charts, and the best thing is, it is FREE OF CHARGE!!

Most people still use traditional applications like Powerpoint or Visio for creating diagrams or charting software, which isn’t always a simple task (especially if the designs are complicated or need to look pretty). There’s no shortage of easy-to-use online diagramming and design applications addressing the need, but a tool called Cacoo tries to stand out from the pack with some unique features.

Developed by Japan-based Nulab, the Flash application is entirely browser-based, free and available in English (and Japanese). Cacoo features a library of icons users can drag and drop to create site maps, wireframes, flow charts, network diagrams, mind maps, UML diagrams, and more. Much like similar tools, Cacoo users can align the design elements to each other, resize, flip and skew them, create their own components from existing ones, upload images to include in the diagrams, and more. – quoted from TechCrunch.

The major selling point of Cacoo is that you can share the diagram you created with your colleagues or other people. Your colleague can then modify your diagram and you will be seeing what they change in real time. It also has a chat feature which make communication easy. I myself has played around with it, it is great, smooth and very intuitive.

Wireframe

Wire frame real time collaboration

Tagged with: , , , ,