C# 클래스 NovelTheory.Component.JavascriptHelper

파일 보기 프로젝트 열기: jamescurran/JavascriptHelper 1 사용 예제들

Private Properties

프로퍼티 타입 설명
CombineUrl string
CombineUrlPath string
Create JavascriptHelper
InsertCss_Bundled System.Web.Mvc.MvcHtmlString
InsertCss_None System.Web.Mvc.MvcHtmlString
InsertDependancy int
InsertScripts_Bundled System.Web.Mvc.MvcHtmlString
InsertScripts_None System.Web.Mvc.MvcHtmlString
JavascriptHelper System
RenderCssFile void
RenderJavascriptBlocks void
RenderJavascriptFile void

공개 메소드들

메소드 설명
AddFile ( string filename ) : System.Web.Mvc.MvcHtmlString
AddInlineFile ( string text ) : System.Web.Mvc.MvcHtmlString
AddInlineScript ( string text ) : System.Web.Mvc.MvcHtmlString

Adds the inline script.

AddNoScriptText ( string text ) : System.Web.Mvc.MvcHtmlString
AddOnReadyScript ( string text ) : string

Adds the on ready script.

accepts a block of script as text. Appended to script run on page ready. All on rendered, wrapped in a jQuery document ready event function, at the point of InsertOnReady()

AddScript ( string text ) : string

Adds the script.

accepts a block of script as text. Each call is rendered. All script from either AddScript methods is rendered in a block at the script insertion point.

AddScript ( string id, string text ) : string

Adds the script.

accepts a block of script as text. Multiple calls with the same id are rendered only once. All script from either AddScript methods is rendered in a block at the script insertion point.

Create ( System.Web.Mvc.ViewContext vc ) : JavascriptHelper
Create ( System.Web.WebPages.WebPageContext webPageContext ) : JavascriptHelper

Creates the specified web page context.

Used in @helper functions: var script = StateTheaterMvc.Component.JavascriptHelper.Create(WebPageContext.Current);

Create ( System.Web.Mvc.WebViewPage page ) : JavascriptHelper

Creates the specified page.

Used in view pages functions: var script = StateTheaterMvc.Component.JavascriptHelper.Create(this);

InsertCss ( ) : System.Web.Mvc.MvcHtmlString

Inserts the CSS.

Renders all css files

InsertOnReady ( ) : System.Web.Mvc.MvcHtmlString
InsertScripts ( ) : System.Web.Mvc.MvcHtmlString
Std ( string std ) : string

Adds standard javascript files

비공개 메소드들

메소드 설명
CombineUrl ( string baseUrl ) : string
CombineUrlPath ( string path1, string path2 ) : string
Create ( System.Web.Mvc.HtmlHelper html ) : JavascriptHelper
InsertCss_Bundled ( transformType ttype ) : System.Web.Mvc.MvcHtmlString
InsertCss_None ( ) : System.Web.Mvc.MvcHtmlString
InsertDependancy ( string name, int pos ) : int

Inserts the details of a required javascript file into the list.

Places the details of the js script file known by name onto the list of files that will be included on this page. Designed to place new files at the end, and files they depend on just before them.

InsertScripts_Bundled ( transformType ttype ) : System.Web.Mvc.MvcHtmlString
InsertScripts_None ( ) : System.Web.Mvc.MvcHtmlString

Inserts the scripts.

Renders all script files & script blocks.

JavascriptHelper ( System.Web.Mvc.ViewContext vc ) : System
RenderCssFile ( TextWriter tw, string file ) : void
RenderJavascriptBlocks ( TextWriter sb ) : void
RenderJavascriptFile ( TextWriter sb, string file ) : void

메소드 상세

AddFile() 공개 메소드

public AddFile ( string filename ) : System.Web.Mvc.MvcHtmlString
filename string
리턴 System.Web.Mvc.MvcHtmlString

AddInlineFile() 공개 메소드

public AddInlineFile ( string text ) : System.Web.Mvc.MvcHtmlString
text string
리턴 System.Web.Mvc.MvcHtmlString

AddInlineScript() 공개 메소드

Adds the inline script.
public AddInlineScript ( string text ) : System.Web.Mvc.MvcHtmlString
text string The text.
리턴 System.Web.Mvc.MvcHtmlString

AddNoScriptText() 공개 메소드

public AddNoScriptText ( string text ) : System.Web.Mvc.MvcHtmlString
text string
리턴 System.Web.Mvc.MvcHtmlString

AddOnReadyScript() 공개 메소드

Adds the on ready script.
accepts a block of script as text. Appended to script run on page ready. All on rendered, wrapped in a jQuery document ready event function, at the point of InsertOnReady()
public AddOnReadyScript ( string text ) : string
text string The text.
리턴 string

AddScript() 공개 메소드

Adds the script.
accepts a block of script as text. Each call is rendered. All script from either AddScript methods is rendered in a block at the script insertion point.
public AddScript ( string text ) : string
text string The text.
리턴 string

AddScript() 공개 메소드

Adds the script.
accepts a block of script as text. Multiple calls with the same id are rendered only once. All script from either AddScript methods is rendered in a block at the script insertion point.
public AddScript ( string id, string text ) : string
id string The id.
text string The text.
리턴 string

Create() 공개 정적인 메소드

public static Create ( System.Web.Mvc.ViewContext vc ) : JavascriptHelper
vc System.Web.Mvc.ViewContext
리턴 JavascriptHelper

Create() 공개 정적인 메소드

Creates the specified web page context.
Used in @helper functions: var script = StateTheaterMvc.Component.JavascriptHelper.Create(WebPageContext.Current);
public static Create ( System.Web.WebPages.WebPageContext webPageContext ) : JavascriptHelper
webPageContext System.Web.WebPages.WebPageContext The web page context.
리턴 JavascriptHelper

Create() 공개 정적인 메소드

Creates the specified page.
Used in view pages functions: var script = StateTheaterMvc.Component.JavascriptHelper.Create(this);
public static Create ( System.Web.Mvc.WebViewPage page ) : JavascriptHelper
page System.Web.Mvc.WebViewPage
리턴 JavascriptHelper

InsertCss() 공개 메소드

Inserts the CSS.
Renders all css files
public InsertCss ( ) : System.Web.Mvc.MvcHtmlString
리턴 System.Web.Mvc.MvcHtmlString

InsertOnReady() 공개 메소드

public InsertOnReady ( ) : System.Web.Mvc.MvcHtmlString
리턴 System.Web.Mvc.MvcHtmlString

InsertScripts() 공개 메소드

public InsertScripts ( ) : System.Web.Mvc.MvcHtmlString
리턴 System.Web.Mvc.MvcHtmlString

Std() 공개 메소드

Adds standard javascript files
public Std ( string std ) : string
std string a comma-separated list of script file ids.
리턴 string