public FilterFieldsScript(string name, Func <IEnumerable <FilterField> > getFields) { _getFields = getFields; _name = name; _scriptName = "FilterFields." + name; DynamicScriptManager.Register(this); }
public static void ProcessScriptRequest(HttpContext context, string scriptKey, string contentType) { var response = context.Response; var request = context.Request; var script = DynamicScriptManager.GetScript(scriptKey); if (script == null) { throw new HttpException(404, "File not found!"); } int expiresOffset = 365; // Cache for 365 days in browser cache response.ContentType = contentType; response.Charset = "utf-8"; response.Cache.SetExpires(DateTime.Now.AddDays(expiresOffset)); response.Cache.SetCacheability(HttpCacheability.Private); response.Cache.SetValidUntilExpires(false); response.Cache.VaryByHeaders["Accept-Encoding"] = true; var enc = Regex.Replace("" + request.Headers["Accept-Encoding"], @"\s+", "").ToLower(); var supportsGzip = script.CompressedBytes != null && enc.IndexOf("gzip") != -1 || request.Headers["---------------"] != null; if (supportsGzip) { response.AppendHeader("Content-Encoding", "gzip"); } WriteWithIfModifiedSinceControl(context, supportsGzip ? script.CompressedBytes : script.UncompressedBytes, script.Time); }
public async static Task ReturnScript(HttpContext context, string scriptKey, string contentType) { var dynamicScript = DynamicScriptManager.GetScript(scriptKey); if (dynamicScript == null) { context.Response.StatusCode = (int)HttpStatusCode.NotFound; await context.Response.WriteAsync("File not found!"); return; } var mediaType = new MediaTypeHeaderValue(contentType); mediaType.Encoding = System.Text.Encoding.UTF8; context.Response.ContentType = mediaType.ToString(); var responseHeaders = context.Response.GetTypedHeaders(); var cacheControl = new CacheControlHeaderValue(); cacheControl.MaxAge = TimeSpan.FromDays(365); // allow CDNs to cache anonymous resources if (!string.IsNullOrEmpty((string)context.Request.Query["v"]) && !Authorization.IsLoggedIn) { cacheControl.Public = true; } else { cacheControl.Private = true; } cacheControl.MustRevalidate = false; responseHeaders.CacheControl = cacheControl; var supportsGzip = dynamicScript.CompressedBytes != null && context.Request.Headers["Accept-Encoding"].Any(x => x.IndexOf("gzip") >= 0); byte[] contentBytes; if (supportsGzip) { context.Response.Headers["Content-Encoding"] = "gzip"; contentBytes = dynamicScript.CompressedBytes; } else { contentBytes = dynamicScript.UncompressedBytes; } await WriteWithIfModifiedSinceControl(context, contentBytes, dynamicScript.Time); }
public void ProcessRequest(HttpContext context) { var request = context.Request; DynamicScriptManager.IfNotRegistered("BundleCss", () => { DynamicScriptManager.Register("BundleCss", new ConcatenatedScript(new Func <string>[] { () => { using (var sr = new StreamReader( HostingEnvironment.MapPath("~/Content/bundle.css"))) return(sr.ReadToEnd()); } })); }); DynamicScriptHandler.ProcessScriptRequest(context, "BundleCss", "text/css"); }
public SaveResponse Update(TranslationUpdateRequest request) { if (request.Translations == null) { throw new ArgumentNullException("translations"); } var translations = List(new TranslationListRequest { SourceLanguageID = request.TargetLanguageID, }).Entities.ToDictionary(x => x.Key, x => x.CustomText); foreach (var item in request.Translations) { translations[item.Key] = item.Value; } var result = new SortedDictionary <string, string>(StringComparer.OrdinalIgnoreCase); foreach (var pair in translations) { if (!pair.Value.IsEmptyOrNull()) { result.Add(pair.Key, pair.Value); } } string json = JSON.StringifyIndented(result, indentation: 2); var textsFilePath = GetUserTextsFilePath(request.TargetLanguageID); Directory.CreateDirectory(Path.GetDirectoryName(textsFilePath)); File.WriteAllText(textsFilePath, json); var localTextRegistry = Dependency.Resolve <ILocalTextRegistry>(); (localTextRegistry as IRemoveAll)?.RemoveAll(); Startup.InitializeLocalTexts(localTextRegistry, Dependency.Resolve <IWebHostEnvironment>()); TwoLevelCache.ExpireGroupItems(UserRow.Fields.GenerationKey); DynamicScriptManager.Reset(); return(new SaveResponse()); }
public async static Task ReturnScript(HttpContext context, string scriptKey, string contentType) { var dynamicScript = DynamicScriptManager.GetScript(scriptKey); if (dynamicScript == null) { context.Response.StatusCode = (int)HttpStatusCode.NotFound; await context.Response.WriteAsync("File not found!"); return; } var mediaType = new MediaTypeHeaderValue(contentType); mediaType.Encoding = System.Text.Encoding.UTF8; context.Response.ContentType = mediaType.ToString(); var responseHeaders = context.Response.GetTypedHeaders(); var cacheControl = responseHeaders.CacheControl = new CacheControlHeaderValue(); cacheControl.MaxAge = TimeSpan.FromDays(365); cacheControl.Private = true; cacheControl.MustRevalidate = false; var supportsGzip = dynamicScript.CompressedBytes != null && context.Request.GetTypedHeaders().AcceptEncoding.ToString() .IndexOf("gzip", StringComparison.OrdinalIgnoreCase) >= 0; byte[] contentBytes; if (supportsGzip) { context.Response.Headers["Content-Encoding"] = "gzip"; contentBytes = dynamicScript.CompressedBytes; } else { contentBytes = dynamicScript.UncompressedBytes; } await WriteWithIfModifiedSinceControl(context, contentBytes, dynamicScript.Time); }
public static void ProcessScriptRequest(HttpContext context, string scriptKey, string contentType) { var response = context.Response; var request = context.Request; DynamicScriptManager.Script script; try { script = DynamicScriptManager.GetScript(scriptKey); } catch (ValidationError ve) { if (ve.ErrorCode == "AccessDenied") { response.StatusCode = 403; return; } throw; } if (script == null) { response.StatusCode = 404; response.StatusDescription = "A dynamic script with key " + scriptKey + " is not found!"; return; } int expiresOffset = 365; // Cache for 365 days in browser cache response.ContentType = contentType; response.Charset = "utf-8"; response.Cache.SetExpires(DateTime.Now.AddDays(expiresOffset)); // allow CDNs to cache anonymous resources if (!string.IsNullOrEmpty(request.QueryString["v"]) && !Authorization.IsLoggedIn) { response.Cache.SetCacheability(HttpCacheability.Public); } else { response.Cache.SetCacheability(HttpCacheability.Private); } response.Cache.SetValidUntilExpires(false); response.Cache.VaryByHeaders["Accept-Encoding"] = true; var enc = Regex.Replace("" + request.Headers["Accept-Encoding"], @"\s+", "").ToLower(); var supportsGzip = script.CompressedBytes != null && enc.IndexOf("gzip") != -1 || request.Headers["---------------"] != null; if (supportsGzip) { response.AppendHeader("Content-Encoding", "gzip"); } WriteWithIfModifiedSinceControl(context, supportsGzip ? script.CompressedBytes : script.UncompressedBytes, script.Time); }
#pragma warning disable 1998 public async override global::System.Threading.Tasks.Task ExecuteAsync() { BeginContext(0, 260, true); WriteLiteral(@" <meta charset=""utf-8"" /> <meta http-equiv=""X-UA-Compatible"" content=""IE=edge""> <meta http-equiv=""Content-Type"" content=""text/html;charset=utf-8"" /> <meta name=""viewport"" content=""width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"" /> "); EndContext(); BeginContext(260, 50, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("link", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "98f94e43c6438d00da7e132f75d26ad0401262ed5880", async() => { } ); __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(310, 2, true); WriteLiteral("\r\n"); EndContext(); BeginContext(312, 60, false); __tagHelperExecutionContext = __tagHelperScopeManager.Begin("link", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "98f94e43c6438d00da7e132f75d26ad0401262ed7215", async() => { } ); __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper>(); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_4); __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_5); await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); if (!__tagHelperExecutionContext.Output.IsContentModified) { await __tagHelperExecutionContext.SetOutputContentAsync(); } Write(__tagHelperExecutionContext.Output); __tagHelperExecutionContext = __tagHelperScopeManager.End(); EndContext(); BeginContext(372, 2, true); WriteLiteral("\r\n"); EndContext(); BeginContext(375, 24, false); #line 8 "D:\Users\tamir\Source\Repos\SereneApp\SereneApp.Web\Views\Shared\_LayoutHead.cshtml" Write(Html.StyleBundle("Base")); #line default #line hidden EndContext(); BeginContext(399, 2, true); WriteLiteral("\r\n"); EndContext(); BeginContext(402, 24, false); #line 9 "D:\Users\tamir\Source\Repos\SereneApp\SereneApp.Web\Views\Shared\_LayoutHead.cshtml" Write(Html.StyleBundle("Site")); #line default #line hidden EndContext(); BeginContext(426, 2, true); WriteLiteral("\r\n"); EndContext(); #line 10 "D:\Users\tamir\Source\Repos\SereneApp\SereneApp.Web\Views\Shared\_LayoutHead.cshtml" if (System.Globalization.CultureInfo.CurrentUICulture.TextInfo.IsRightToLeft) { #line default #line hidden BeginContext(516, 46, false); #line 12 "D:\Users\tamir\Source\Repos\SereneApp\SereneApp.Web\Views\Shared\_LayoutHead.cshtml" Write(Html.Stylesheet("~/Content/site/site.rtl.css")); #line default #line hidden EndContext(); #line 12 "D:\Users\tamir\Source\Repos\SereneApp\SereneApp.Web\Views\Shared\_LayoutHead.cshtml" } #line default #line hidden BeginContext(567, 51, true); WriteLiteral("<script type=\"application/json\" id=\"ScriptCulture\">"); EndContext(); BeginContext(619, 54, false); #line 14 "D:\Users\tamir\Source\Repos\SereneApp\SereneApp.Web\Views\Shared\_LayoutHead.cshtml" Write(Html.Raw(Serenity.JSON.Stringify(new ScriptCulture()))); #line default #line hidden EndContext(); BeginContext(673, 182, true); WriteLiteral("</script>\r\n<script type=\"text/javascript\">window.paceOptions = { startOnPageLoad: false, ajax: { trackMethods: [\'GET\', \'POST\'], trackWebSockets: false, ignoreURLs: [] } };</script>\r\n"); EndContext(); BeginContext(856, 25, false); #line 16 "D:\Users\tamir\Source\Repos\SereneApp\SereneApp.Web\Views\Shared\_LayoutHead.cshtml" Write(Html.ScriptBundle("Base")); #line default #line hidden EndContext(); BeginContext(881, 2, true); WriteLiteral("\r\n"); EndContext(); BeginContext(884, 25, false); #line 17 "D:\Users\tamir\Source\Repos\SereneApp\SereneApp.Web\Views\Shared\_LayoutHead.cshtml" Write(Html.ScriptBundle("Site")); #line default #line hidden EndContext(); BeginContext(909, 2, true); WriteLiteral("\r\n"); EndContext(); BeginContext(912, 28, false); #line 18 "D:\Users\tamir\Source\Repos\SereneApp\SereneApp.Web\Views\Shared\_LayoutHead.cshtml" Write(Html.LocalTextScript("Site")); #line default #line hidden EndContext(); BeginContext(940, 41, true); WriteLiteral("\r\n\r\n<script type=\"text/javascript\">\r\n "); EndContext(); BeginContext(982, 78, false); #line 21 "D:\Users\tamir\Source\Repos\SereneApp\SereneApp.Web\Views\Shared\_LayoutHead.cshtml" Write(Html.Raw(DynamicScriptManager.GetScriptText("Lookup.Administration.Language"))); #line default #line hidden EndContext(); BeginContext(1060, 6, true); WriteLiteral("\r\n "); EndContext(); BeginContext(1067, 65, false); #line 22 "D:\Users\tamir\Source\Repos\SereneApp\SereneApp.Web\Views\Shared\_LayoutHead.cshtml" Write(Html.Raw(DynamicScriptManager.GetScriptText("RegisteredScripts"))); #line default #line hidden EndContext(); BeginContext(1132, 11, true); WriteLiteral("\r\n</script>"); EndContext(); }
#pragma warning disable 1998 public async override global::System.Threading.Tasks.Task ExecuteAsync() { #line 1 "D:\Users\tamir\Source\Repos\SereneApp\SereneApp.Web\Modules\Membership\Account\AccountLogin.cshtml" ViewData["Title"] = "Login"; ViewData["PageId"] = "Login"; Layout = MVC.Views.Shared._LayoutSlim; #line default #line hidden BeginContext(120, 2, true); WriteLiteral("\r\n"); EndContext(); DefineSection("Head", async() => { BeginContext(137, 6, true); WriteLiteral("\r\n "); EndContext(); BeginContext(144, 39, false); #line 8 "D:\Users\tamir\Source\Repos\SereneApp\SereneApp.Web\Modules\Membership\Account\AccountLogin.cshtml" Write(Html.Script("~/Scripts/vegas/vegas.js")); #line default #line hidden EndContext(); BeginContext(183, 37, true); WriteLiteral("\r\n <script type=\"text/javascript\">"); EndContext(); BeginContext(221, 69, false); #line 9 "D:\Users\tamir\Source\Repos\SereneApp\SereneApp.Web\Modules\Membership\Account\AccountLogin.cshtml" Write(Html.Raw(DynamicScriptManager.GetScriptText("Form.Membership.Login"))); #line default #line hidden EndContext(); BeginContext(290, 46, true); WriteLiteral("</script>\r\n <script type=\"text/javascript\">"); EndContext(); BeginContext(337, 43, false); #line 10 "D:\Users\tamir\Source\Repos\SereneApp\SereneApp.Web\Modules\Membership\Account\AccountLogin.cshtml" Write(Html.Raw(Html.GetLocalTextContent("Login"))); #line default #line hidden EndContext(); BeginContext(380, 15, true); WriteLiteral("</script>\r\n "); EndContext(); BeginContext(396, 44, false); #line 11 "D:\Users\tamir\Source\Repos\SereneApp\SereneApp.Web\Modules\Membership\Account\AccountLogin.cshtml" Write(Html.Stylesheet("~/Scripts/vegas/vegas.css")); #line default #line hidden EndContext(); BeginContext(440, 8009, true); WriteLiteral(@" <style type=""text/css""> body { font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; color: #000; -ms-overflow-style: scrollbar; } #LoginPanel { padding: 30px 20px; width: 550px; margin: 90px auto auto auto; background: rgba(0,0,0,0.5); border-radius: 12px; font-weight: 700; } #LoginPanel .caption { width: 180px; } #LoginPanel .logo { margin: 0 auto 20px auto; width: 128px; height: 128px; background: transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOvwAADr8BOAVTJAAAABp0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuMTFH80I3AAAREklEQVR4Xu1diXabuhbtp/Fp/M57H3Bv0ySlvYmboXYSO/GEZwNm8Jypd1x+2jzhS7BsBAEPV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+4hgUoaanCmzCt9yNNBjYCrY6IcPXMCylWt1tgQYPl5e3Etw8qm6GjfEgfgN27Hz6dCF6fVSUSmU3mEI+PxoTYysqZRBXK9e2aBDVivuuf+xRcFfpgiKzCOENw1S+fy8K4d+L6+uihKlS0NVCDHgI5P9DIDLtIoahysfH8Xob3lbWaLRkbNrEW8exSdQzPl7i++D8k+NsBLV7B2yWJF5ho/vFZ+iBdFnV3e1LgjQy5Rq6RE/G/4FELNezRBXaT5yLolgkiBVj/LZQLlexvRx1fLndcpKE0aAMK4nohei7BraNDQambNsjBUmTSRsEPAoEt0n8gaFm1xXDBEJwQmIA1B0g7l8m7llGWRq4euTdYWiAoEHCjeNz7C1EoNlu626wqWmGfHZWEIILCAgICAgIZBwfPvwPYzJ1DskIsl4AAAAASUVORK5CYII=) no-repeat center center; } #LoginPanel h3 { font-size: 18px; font-weight: 700; margin: 16px 0 24px; color: #f5f27e; text-align: center; text-shadow: 0 1px 1px #333; } #LoginPanel .buttons { text-align: right; padding: 8px 0 4px 0; margin-right: 28px; } "); WriteLiteral(@" #LoginPanel .btn { padding: 8px 24px; font-weight: 700; } #LoginPanel .caption { color: #ececec; font-weight: 700; text-shadow: 0 1px 1px #333; } #LoginPanel .actions { padding-right: 28px; } #LoginPanel .actions a { color: #ececec; padding: 2px 2px 2px 2px; margin-top: 5px; display: block; float: right; clear: both; border-bottom: 1px dashed #999; text-shadow: 0 1px 1px #333; } #LoginPanel .actions a i { font-weight: 700; margin-right: 4px; } #LoginPanel .s-Form label.error { background-image: url("); EndContext(); BeginContext(8450, 50, false); #line 88 "D:\Users\tamir\Source\Repos\SereneApp\SereneApp.Web\Modules\Membership\Account\AccountLogin.cshtml" Write(Url.Content("~/Content/serenity/images/cross.png")); #line default #line hidden EndContext(); BeginContext(8500, 781, true); WriteLiteral(@"); padding: 26px 0 0 22px; } #LoginPanel .s-Form label.error.checked { background-image: none; } #LoginPanel .s-Form .field { padding: 8px; } #LoginPanel .s-Form input { padding: 6px 10px; border: none; background: rgba(0, 0, 0, 0.6); color: #fff; } #LoginPanel .s-Form .caption { padding: 6px 10px; color: #fff; } #LoginPanel a { color: aqua; } #LoginPanel .s-PropertyGrid .categories { height: auto; } #LoginPanel .flex-layout .s-PropertyGrid { display: block; } "); EndContext(); BeginContext(9282, 343, true); WriteLiteral(@"@media(max-width: 550px), (max-height: 500px) { #LoginPanel { padding: 16px 4px 16px 4px; position: absolute; margin: 0; width: auto; top: 10px; left: 10px; right: 10px; } } </style> "); EndContext(); } ); BeginContext(9628, 123, true); WriteLiteral("\r\n<script id=\"Template_LoginPanel\" type=\"text/template\">\r\n<div class=\"flex-layout\">\r\n <div class=\"logo\"></div>\r\n <h3>"); EndContext(); BeginContext(9752, 38, false); #line 141 "D:\Users\tamir\Source\Repos\SereneApp\SereneApp.Web\Modules\Membership\Account\AccountLogin.cshtml" Write(Texts.Forms.Membership.Login.FormTitle); #line default #line hidden EndContext(); BeginContext(9790, 397, true); WriteLiteral(@"</h3> <form id=""~_Form"" action=""""> <div class=""s-Form""> <div class=""fieldset ui-widget ui-widget-content ui-corner-all""> <div id=""~_PropertyGrid""></div> <div class=""clear""></div> </div> <div class=""buttons""> <button id=""LoginButton"" type=""submit"" class=""btn btn-primary""> "); EndContext(); BeginContext(10188, 41, false); #line 150 "D:\Users\tamir\Source\Repos\SereneApp\SereneApp.Web\Modules\Membership\Account\AccountLogin.cshtml" Write(Texts.Forms.Membership.Login.SignInButton); #line default #line hidden EndContext(); BeginContext(10229, 109, true); WriteLiteral("\r\n </button>\r\n </div>\r\n <div class=\"actions\">\r\n <a href=\""); EndContext(); BeginContext(10339, 39, false); #line 154 "D:\Users\tamir\Source\Repos\SereneApp\SereneApp.Web\Modules\Membership\Account\AccountLogin.cshtml" Write(Url.Content("~/Account/ForgotPassword")); #line default #line hidden EndContext(); BeginContext(10378, 41, true); WriteLiteral("\"><i class=\"fa fa-angle-right\"></i> "); EndContext(); BeginContext(10420, 43, false); #line 154 "D:\Users\tamir\Source\Repos\SereneApp\SereneApp.Web\Modules\Membership\Account\AccountLogin.cshtml" Write(Texts.Forms.Membership.Login.ForgotPassword); #line default #line hidden EndContext(); BeginContext(10463, 31, true); WriteLiteral("</a>\r\n <a href=\""); EndContext(); BeginContext(10495, 31, false); #line 155 "D:\Users\tamir\Source\Repos\SereneApp\SereneApp.Web\Modules\Membership\Account\AccountLogin.cshtml" Write(Url.Content("~/Account/SignUp")); #line default #line hidden EndContext(); BeginContext(10526, 41, true); WriteLiteral("\"><i class=\"fa fa-angle-right\"></i> "); EndContext(); BeginContext(10568, 41, false); #line 155 "D:\Users\tamir\Source\Repos\SereneApp\SereneApp.Web\Modules\Membership\Account\AccountLogin.cshtml" Write(Texts.Forms.Membership.Login.SignUpButton); #line default #line hidden EndContext(); BeginContext(10609, 119, true); WriteLiteral("</a>\r\n <div class=\"clear\"></div>\r\n </div>\r\n </div>\r\n </form>\r\n</div>\r\n</script>\r\n\r\n"); EndContext(); #line 163 "D:\Users\tamir\Source\Repos\SereneApp\SereneApp.Web\Modules\Membership\Account\AccountLogin.cshtml" if (DataMigrations.SkippedMigrations) { #line default #line hidden BeginContext(10771, 422, true); WriteLiteral(@"<div class=""alert alert-error alert-dismissible""> <button type=""button"" class=""close"" data-dismiss=""alert"" aria-hidden=""true"">×</button> <h4><i class=""icon fa fa-warning""></i> Warning!</h4> SereneApp skipped running migrations to avoid modifying an arbitrary database. If you'd like to run migrations on this database, remove the safety check in SiteInitialization.RunMigrations method. </div> "); EndContext(); #line 172 "D:\Users\tamir\Source\Repos\SereneApp\SereneApp.Web\Modules\Membership\Account\AccountLogin.cshtml" } #line default #line hidden BeginContext(11196, 2, true); WriteLiteral("\r\n"); EndContext(); #line 174 "D:\Users\tamir\Source\Repos\SereneApp\SereneApp.Web\Modules\Membership\Account\AccountLogin.cshtml" if (ViewData["Activated"] != null) { #line default #line hidden BeginContext(11238, 181, true); WriteLiteral("<div class=\"alert alert-info alert-dismissible\">\r\n <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">×</button>\r\n <h4><i class=\"icon fa fa-info\"></i>"); EndContext(); BeginContext(11420, 41, false); #line 178 "D:\Users\tamir\Source\Repos\SereneApp\SereneApp.Web\Modules\Membership\Account\AccountLogin.cshtml" Write(LocalText.Get("Dialogs.InformationTitle")); #line default #line hidden EndContext(); BeginContext(11461, 11, true); WriteLiteral("</h4>\r\n "); EndContext(); BeginContext(11473, 55, false); #line 179 "D:\Users\tamir\Source\Repos\SereneApp\SereneApp.Web\Modules\Membership\Account\AccountLogin.cshtml" Write(Texts.Forms.Membership.SignUp.ActivationCompleteMessage); #line default #line hidden EndContext(); BeginContext(11528, 10, true); WriteLiteral("\r\n</div>\r\n"); EndContext(); #line 181 "D:\Users\tamir\Source\Repos\SereneApp\SereneApp.Web\Modules\Membership\Account\AccountLogin.cshtml" } #line default #line hidden BeginContext(11541, 866, true); WriteLiteral(@" <div class=""page-content""> <div id=""LoginPanel""> </div> </div> <script type=""text/javascript""> var loginPanel; var LoginPanel = (function (_super) { __extends(LoginPanel, _super); function LoginPanel(container) { var _this = _super.call(this, container) || this; $(function () { $('body').vegas({ delay: 30000, cover: true, overlay: ""data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACAQMAAABIeJ9nAAAAA3NCSVQICAjb4U"" + ""/gAAAABlBMVEX///8AAABVwtN+AAAAAnRSTlMA/1uRIrUAAAAJcEhZcwAAAsQAAALEAVuRnQsAAAAWdEVYdENyZWF0"" + ""aW9uIFRpbWUAMDQvMTMvMTGrW0T6AAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M1cbXjNgAAAAxJREFUCJljaGBgAAABhACBrONIPgAAAABJRU5ErkJggg=="", slides: [ { src: "); EndContext(); BeginContext(12408, 87, false); #line 205 "D:\Users\tamir\Source\Repos\SereneApp\SereneApp.Web\Modules\Membership\Account\AccountLogin.cshtml" Write(Html.Raw(ContentHashCache.ResolveWithHash("~/Content/site/slides/slide1.jpg").ToJson())); #line default #line hidden EndContext(); BeginContext(12495, 52, true); WriteLiteral(", transition: \'fade\' },\r\n { src: "); EndContext(); BeginContext(12548, 87, false); #line 206 "D:\Users\tamir\Source\Repos\SereneApp\SereneApp.Web\Modules\Membership\Account\AccountLogin.cshtml" Write(Html.Raw(ContentHashCache.ResolveWithHash("~/Content/site/slides/slide2.jpg").ToJson())); #line default #line hidden EndContext(); BeginContext(12635, 55, true); WriteLiteral(", transition: \'zoomOut\' },\r\n { src: "); EndContext(); BeginContext(12691, 87, false); #line 207 "D:\Users\tamir\Source\Repos\SereneApp\SereneApp.Web\Modules\Membership\Account\AccountLogin.cshtml" Write(Html.Raw(ContentHashCache.ResolveWithHash("~/Content/site/slides/slide3.jpg").ToJson())); #line default #line hidden EndContext(); BeginContext(12778, 1882, true); WriteLiteral(@", transition: 'swirlLeft' } ] }); $('#LoginButton').click(function (e) { e.preventDefault(); if (!_this.validateForm()) { return; } var request = _this.getSaveEntity(); Q.serviceCall({ url: Q.resolveUrl('~/Account/Login'), request: request, onSuccess: function (response) { _this.redirectToReturnUrl(); }, onError: function (response) { if (response != null && response.Error != null && !Q.isEmptyOrNull(response.Error.Message)) { Q.notifyError(response.Error.Message); loginPanel.byId('Password').focus(); return; } Q.ErrorHandling.showServiceError(response.Error); "); WriteLiteral(@" } }); }); }); return _this; } LoginPanel.prototype.getTemplateName = function () { return 'LoginPanel'; }; LoginPanel.prototype.getFormKey = function () { return ""Membership.Login""; }; LoginPanel.prototype.redirectToReturnUrl = function () { var q = Q.parseQueryString(); var returnUrl = q['returnUrl'] || q['ReturnUrl']; if (returnUrl) { var hash = window.location.hash; if (hash != null && hash != '#') returnUrl += hash; window.location.href = returnUrl; } else { window.location.href = Q.resolveUrl('~/'); } }; return LoginPanel; }(Serenity.PropertyPanel)); jQuery(function() { loginPanel = new LoginPanel($('#LoginPanel')).init(); "); EndContext(); #line 258 "D:\Users\tamir\Source\Repos\SereneApp\SereneApp.Web\Modules\Membership\Account\AccountLogin.cshtml" if (ViewData["Activated"] != null) { #line default #line hidden BeginContext(14710, 63, true); WriteLiteral("\r\n $(function() { \r\n loginPanel.byId(\'Username\').val("); EndContext(); BeginContext(14774, 56, false); #line 262 "D:\Users\tamir\Source\Repos\SereneApp\SereneApp.Web\Modules\Membership\Account\AccountLogin.cshtml" Write(Html.Raw(Serenity.JSON.Stringify(ViewData["Activated"]))); #line default #line hidden EndContext(); BeginContext(14830, 63, true); WriteLiteral(");\r\n loginPanel.byId(\'Password\').focus();\r\n });\r\n "); EndContext(); #line 265 "D:\Users\tamir\Source\Repos\SereneApp\SereneApp.Web\Modules\Membership\Account\AccountLogin.cshtml" } #line default #line hidden BeginContext(14905, 14, true); WriteLiteral("});\r\n</script>"); EndContext(); }
public static TScript Register <TScript>(this TScript script) where TScript : INamedDynamicScript { DynamicScriptManager.Register(script); return(script); }