Feature - SortIndex on Script- and CssResouce attribute for GadgetController

Vote:
 

When adding resources on a gadgetController, ex:

[CssResource("Content/jquery.jqplot.min.css")]
[ScriptResource("Content/jquery.jqplot.min.js")]
[ScriptResource("Content/jqplot.highlighter.min.js")]
[ScriptResource("Content/jqplot.canvasAxisTickRenderer.min.js")]
[ScriptResource("Content/jqplot.canvasTextRenderer.min.js")]
[ScriptResource("Content/jqplot.dateAxisRenderer.min.js")]
[Gadget]
    public class SerwGadgetTrendsController : Controller
    {
        public ActionResult Index(Guid gadgetId)
        {
            return View();
        }

[CssResource("Content/MyCss.css")] [ScriptResource("Script/MyScript.js")] [Gadget]    
public class MyGadget: Controller    
{
        public ActionResult Index(Guid gadgetId)
        {            return View();        }

You sometimes want them to be added in a specific order. I.e a SortIndex attribute.

#34949
Nov 22, 2009 20:45
Vote:
 

Your message looks very strange but it's a great idea nontheless. We have now added a sort index is used like this:

    [EPiServer.Shell.Gadgets.Gadget]
    [EPiServer.Shell.Web.ScriptResource("JScript1.js", SortIndex = 100)]
    [EPiServer.Shell.Web.ScriptResource("JScript2.js", SortIndex = 50)]

#35296
Dec 03, 2009 11:26
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.