Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update

Add proper license files.
Added some more infrastructure code.
Update bootstrap to 2.1.1
  • Loading branch information...
commit 6e173a8c62f3ecdba4bc1fc802ae5716694640ad 1 parent f5d5afc
@a-fung authored
Showing with 1,164 additions and 30 deletions.
  1. +1 −0  .gitignore
  2. +180 −1 LICENSE
  3. +62 −0 NOTICE
  4. BIN  external_libraries/MySql.Data.dll
  5. +16 −3 gather_aspnet.ps1
  6. +16 −3 gather_php.ps1
  7. +6 −4 source/aspnetserver/admin.html
  8. +11 −0 source/aspnetserver/afung.MangaWeb3.Server.csproj
  9. +2 −2 source/aspnetserver/css/bootstrap-responsive.min.css
  10. +2 −2 source/aspnetserver/css/bootstrap.min.css
  11. +1 −1  source/aspnetserver/css/mangaweb.css
  12. BIN  source/aspnetserver/img/loading.gif
  13. +6 −3 source/aspnetserver/index.html
  14. +7 −4 source/aspnetserver/install.html
  15. +22 −0 source/aspnetserver/js/afung.MangaWeb3.Client.Install.debug.js
  16. +3 −1 source/aspnetserver/js/afung.MangaWeb3.Client.Install.js
  17. +270 −0 source/aspnetserver/js/afung.MangaWeb3.Client.debug.js
  18. +26 −2 source/aspnetserver/js/afung.MangaWeb3.Client.js
  19. +1 −1  source/aspnetserver/js/bootstrap.min.js
  20. +44 −0 source/aspnetserver/lang/en-us.html
  21. +2 −0  source/aspnetserver/lang/zh-hk.html
  22. 0  source/aspnetserver/template/client.html
  23. +1 −0  source/aspnetserverinstall/InstallAjax.aspx
  24. +17 −0 source/aspnetserverinstall/InstallAjax.aspx.cs
  25. +15 −0 source/aspnetserverinstall/InstallAjax.aspx.designer.cs
  26. +8 −0 source/aspnetserverinstall/afung.MangaWeb3.Server.Install.csproj
  27. +1 −1  source/haxe/afung/mangaWeb3/server/ServerAjax.hx
  28. +24 −2 source/less/mangaweb.less
  29. +96 −0 source/scriptsharp/Application.cs
  30. +17 −0 source/scriptsharp/Environment.cs
  31. +39 −0 source/scriptsharp/HtmlConstants.cs
  32. +129 −0 source/scriptsharp/Strings.cs
  33. +94 −0 source/scriptsharp/Template.cs
  34. +11 −0 source/scriptsharp/afung.MangaWeb3.Client.csproj
  35. +33 −0 source/scriptsharpinstall/InstallApp.cs
  36. +1 −0  source/scriptsharpinstall/afung.MangaWeb3.Client.Install.csproj
View
1  .gitignore
@@ -167,3 +167,4 @@ pip-log.txt
scriptbin/
haxephp/
output/
+copy*test.ps1
View
181 LICENSE
@@ -1 +1,180 @@
-TBD
+ MangaWeb3 Project
+ Copyright 2012 Man Kwan Liu
+
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
View
62 NOTICE
@@ -0,0 +1,62 @@
+MangaWeb3 Project
+Copyright 2012 Man Kwan Liu
+
+MangaWeb3 is licensed under the Apache License v2.0 (see LICENSE file).
+MangaWeb3 also includes works distributed under the licenses listed below.
+
+Bootstrap
+--------------
+Website: http://twitter.github.com/bootstrap/
+Copyright: Copyright 2012 Twitter, Inc.
+License: The Apache License, Version 2.0
+ http://www.apache.org/licenses/LICENSE-2.0
+
+
+GLYPHICONS FREE
+--------------
+Website: http://glyphicons.com/
+Copyright: © 2010 - 2012 Jan Kovařík
+License: The Creative Commons Attribution 3.0 Unported (CC BY 3.0)
+ http://creativecommons.org/licenses/by/3.0/deed.en
+
+
+The Haxe libraries
+--------------
+Website: http://haxe.org/
+Copyright: Copyright (c) 2005, the Haxe Project Contributors
+License: The Haxe libraries license
+ http://haxe.org/doc/license
+
+
+jQuery
+--------------
+Website: http://jquery.com/
+Copyright: © 2012 The jQuery Foundation
+License: The MIT License
+ https://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt
+
+
+Json.NET
+--------------
+Website: http://json.codeplex.com/
+Copyright: Copyright (c) 2007 James Newton-King
+License: The MIT License (MIT)
+ http://json.codeplex.com/license
+
+
+MySQL
+--------------
+Website: http://www.mysql.com
+Copyright: © 2012, Oracle Corporation and/or its affiliates
+License: The GPL License
+ http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
+
+
+SevenZipSharp
+--------------
+Website: http://sevenzipsharp.codeplex.com
+Copyright: Copyright (C) Markovtsev Vadim 2009, 2010
+License: The GNU Library General Public License (LGPL)
+ http://sevenzipsharp.codeplex.com/license
+
+
View
BIN  external_libraries/MySql.Data.dll
Binary file not shown
View
19 gather_aspnet.ps1
@@ -8,14 +8,17 @@ if (!$dir.Exists) { $dir.Create(); }
$path = $(get-location).ToString() + "\output\aspnet";
$dir = new-object "System.IO.DirectoryInfo" -argumentlist $path;
if ($dir.Exists) {
- $dir.Delete($true);
+ Remove-Item $path\* -recurse;
Start-Sleep -s 1;
}
-$dir.Create();
+else {
+ $dir.Create();
+}
# copy files
copy LICENSE $path
+copy NOTICE $path
# HTML files
@@ -42,7 +45,7 @@ copy source\aspnetserver\js\servertype.js $path\js
# debug js files
-if ($false) {
+if ($true) {
copy source\aspnetserver\js\afung.MangaWeb3.Client.Admin.debug.js $path\js
copy source\aspnetserver\js\afung.MangaWeb3.Client.Install.debug.js $path\js
copy source\aspnetserver\js\afung.MangaWeb3.Client.debug.js $path\js
@@ -56,6 +59,16 @@ mkdir $path\img
copy source\aspnetserver\img\*.* $path\img
+# lang files
+mkdir $path\lang
+copy source\aspnetserver\lang\*.* $path\lang
+
+
+# template files
+mkdir $path\template
+copy source\aspnetserver\template\*.* $path\template
+
+
# aspx files
copy source\aspnetserver\*.aspx $path
copy source\aspnetserverinstall\*.aspx $path
View
19 gather_php.ps1
@@ -8,14 +8,17 @@ if (!$dir.Exists) { $dir.Create(); }
$path = $(get-location).ToString() + "\output\php";
$dir = new-object "System.IO.DirectoryInfo" -argumentlist $path;
if ($dir.Exists) {
- $dir.Delete($true);
+ Remove-Item $path\* -recurse;
Start-Sleep -s 1;
}
-$dir.Create();
+else {
+ $dir.Create();
+}
# copy files
copy LICENSE $path
+copy NOTICE $path
# HTML files
@@ -42,7 +45,7 @@ copy source\php\js\servertype.js $path\js
# debug js files
-if ($false) {
+if ($true) {
copy source\aspnetserver\js\afung.MangaWeb3.Client.Admin.debug.js $path\js
copy source\aspnetserver\js\afung.MangaWeb3.Client.Install.debug.js $path\js
copy source\aspnetserver\js\afung.MangaWeb3.Client.debug.js $path\js
@@ -56,6 +59,16 @@ mkdir $path\img
copy source\aspnetserver\img\*.* $path\img
+# lang files
+mkdir $path\lang
+copy source\aspnetserver\lang\*.* $path\lang
+
+
+# template files
+mkdir $path\template
+copy source\aspnetserver\template\*.* $path\template
+
+
# php files
robocopy source\php $path /E
View
10 source/aspnetserver/admin.html
@@ -1,16 +1,18 @@
<!DOCTYPE html>
<html>
<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=0" />
<title>MangaWeb - Admin</title>
<link href="css/bootstrap.min.css" rel="stylesheet" />
<link href="css/bootstrap-responsive.min.css" rel="stylesheet" />
<link href="css/mangaweb.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.8.1.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
- <script type="text/javascript" src="js/mscorlib.js"></script>
- <script type="text/javascript" src="js/afung.MangaWeb3.Common.js"></script>
- <script type="text/javascript" src="js/afung.MangaWeb3.Client.js"></script>
- <script type="text/javascript" src="js/afung.MangaWeb3.Client.Admin.js"></script>
+ <script type="text/javascript" src="js/mscorlib.debug.js"></script>
+ <script type="text/javascript" src="js/afung.MangaWeb3.Common.debug.js"></script>
+ <script type="text/javascript" src="js/afung.MangaWeb3.Client.debug.js"></script>
+ <script type="text/javascript" src="js/afung.MangaWeb3.Client.Admin.debug.js"></script>
<script type="text/javascript" src="js/servertype.js"></script>
</head>
<body>
View
11 source/aspnetserver/afung.MangaWeb3.Server.csproj
@@ -33,6 +33,11 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
+ <Reference Include="MySql.Data, Version=6.5.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\external_libraries\MySql.Data.dll</HintPath>
+ <Private>True</Private>
+ </Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>..\..\external_libraries\Newtonsoft.Json.dll</HintPath>
</Reference>
@@ -76,6 +81,9 @@
<Content Include="js\jquery-1.8.1.min.js" />
<Content Include="js\mscorlib.debug.js" />
<Content Include="js\mscorlib.js" />
+ <Content Include="js\servertype.js" />
+ <Content Include="lang\en-us.html" />
+ <Content Include="lang\zh-hk.html" />
<Content Include="ServerAjax.aspx" />
<Content Include="Web.config" />
<Content Include="Web.Debug.config">
@@ -101,6 +109,9 @@
<Name>afung.MangaWeb3.Common</Name>
</ProjectReference>
</ItemGroup>
+ <ItemGroup>
+ <Folder Include="template\" />
+ </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
<ProjectExtensions>
View
4 source/aspnetserver/css/bootstrap-responsive.min.css
@@ -1,9 +1,9 @@
/*!
- * Bootstrap Responsive v2.1.0
+ * Bootstrap Responsive v2.1.1
*
* Copyright 2012 Twitter, Inc
* Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Designed and built with all the love in the world @twitter by @mdo and @fat.
- */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.hidden{display:none;visibility:hidden}.visible-phone{display:none!important}.visible-tablet{display:none!important}.hidden-desktop{display:none!important}.visible-desktop{display:inherit!important}@media(min-width:768px) and (max-width:979px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-tablet{display:inherit!important}.hidden-tablet{display:none!important}}@media(max-width:767px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-phone{display:inherit!important}.hidden-phone{display:none!important}}@media(min-width:1200px){.row{margin-left:-30px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;margin-left:30px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:1170px}.span12{width:1170px}.span11{width:1070px}.span10{width:970px}.span9{width:870px}.span8{width:770px}.span7{width:670px}.span6{width:570px}.span5{width:470px}.span4{width:370px}.span3{width:270px}.span2{width:170px}.span1{width:70px}.offset12{margin-left:1230px}.offset11{margin-left:1130px}.offset10{margin-left:1030px}.offset9{margin-left:930px}.offset8{margin-left:830px}.offset7{margin-left:730px}.offset6{margin-left:630px}.offset5{margin-left:530px}.offset4{margin-left:430px}.offset3{margin-left:330px}.offset2{margin-left:230px}.offset1{margin-left:130px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.564102564102564%;*margin-left:2.5109110747408616%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.45299145299145%;*width:91.39979996362975%}.row-fluid .span10{width:82.90598290598291%;*width:82.8527914166212%}.row-fluid .span9{width:74.35897435897436%;*width:74.30578286961266%}.row-fluid .span8{width:65.81196581196582%;*width:65.75877432260411%}.row-fluid .span7{width:57.26495726495726%;*width:57.21176577559556%}.row-fluid .span6{width:48.717948717948715%;*width:48.664757228587014%}.row-fluid .span5{width:40.17094017094017%;*width:40.11774868157847%}.row-fluid .span4{width:31.623931623931625%;*width:31.570740134569924%}.row-fluid .span3{width:23.076923076923077%;*width:23.023731587561375%}.row-fluid .span2{width:14.52991452991453%;*width:14.476723040552828%}.row-fluid .span1{width:5.982905982905983%;*width:5.929714493544281%}.row-fluid .offset12{margin-left:105.12820512820512%;*margin-left:105.02182214948171%}.row-fluid .offset12:first-child{margin-left:102.56410256410257%;*margin-left:102.45771958537915%}.row-fluid .offset11{margin-left:96.58119658119658%;*margin-left:96.47481360247316%}.row-fluid .offset11:first-child{margin-left:94.01709401709402%;*margin-left:93.91071103837061%}.row-fluid .offset10{margin-left:88.03418803418803%;*margin-left:87.92780505546462%}.row-fluid .offset10:first-child{margin-left:85.47008547008548%;*margin-left:85.36370249136206%}.row-fluid .offset9{margin-left:79.48717948717949%;*margin-left:79.38079650845607%}.row-fluid .offset9:first-child{margin-left:76.92307692307693%;*margin-left:76.81669394435352%}.row-fluid .offset8{margin-left:70.94017094017094%;*margin-left:70.83378796144753%}.row-fluid .offset8:first-child{margin-left:68.37606837606839%;*margin-left:68.26968539734497%}.row-fluid .offset7{margin-left:62.393162393162385%;*margin-left:62.28677941443899%}.row-fluid .offset7:first-child{margin-left:59.82905982905982%;*margin-left:59.72267685033642%}.row-fluid .offset6{margin-left:53.84615384615384%;*margin-left:53.739770867430444%}.row-fluid .offset6:first-child{margin-left:51.28205128205128%;*margin-left:51.175668303327875%}.row-fluid .offset5{margin-left:45.299145299145295%;*margin-left:45.1927623204219%}.row-fluid .offset5:first-child{margin-left:42.73504273504273%;*margin-left:42.62865975631933%}.row-fluid .offset4{margin-left:36.75213675213675%;*margin-left:36.645753773413354%}.row-fluid .offset4:first-child{margin-left:34.18803418803419%;*margin-left:34.081651209310785%}.row-fluid .offset3{margin-left:28.205128205128204%;*margin-left:28.0987452264048%}.row-fluid .offset3:first-child{margin-left:25.641025641025642%;*margin-left:25.53464266230224%}.row-fluid .offset2{margin-left:19.65811965811966%;*margin-left:19.551736679396257%}.row-fluid .offset2:first-child{margin-left:17.094017094017094%;*margin-left:16.98763411529369%}.row-fluid .offset1{margin-left:11.11111111111111%;*margin-left:11.004728132387708%}.row-fluid .offset1:first-child{margin-left:8.547008547008547%;*margin-left:8.440625568285142%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:30px}input.span12,textarea.span12,.uneditable-input.span12{width:1156px}input.span11,textarea.span11,.uneditable-input.span11{width:1056px}input.span10,textarea.span10,.uneditable-input.span10{width:956px}input.span9,textarea.span9,.uneditable-input.span9{width:856px}input.span8,textarea.span8,.uneditable-input.span8{width:756px}input.span7,textarea.span7,.uneditable-input.span7{width:656px}input.span6,textarea.span6,.uneditable-input.span6{width:556px}input.span5,textarea.span5,.uneditable-input.span5{width:456px}input.span4,textarea.span4,.uneditable-input.span4{width:356px}input.span3,textarea.span3,.uneditable-input.span3{width:256px}input.span2,textarea.span2,.uneditable-input.span2{width:156px}input.span1,textarea.span1,.uneditable-input.span1{width:56px}.thumbnails{margin-left:-30px}.thumbnails>li{margin-left:30px}.row-fluid .thumbnails{margin-left:0}}@media(min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px}.span12{width:724px}.span11{width:662px}.span10{width:600px}.span9{width:538px}.span8{width:476px}.span7{width:414px}.span6{width:352px}.span5{width:290px}.span4{width:228px}.span3{width:166px}.span2{width:104px}.span1{width:42px}.offset12{margin-left:764px}.offset11{margin-left:702px}.offset10{margin-left:640px}.offset9{margin-left:578px}.offset8{margin-left:516px}.offset7{margin-left:454px}.offset6{margin-left:392px}.offset5{margin-left:330px}.offset4{margin-left:268px}.offset3{margin-left:206px}.offset2{margin-left:144px}.offset1{margin-left:82px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.7624309392265194%;*margin-left:2.709239449864817%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.43646408839778%;*width:91.38327259903608%}.row-fluid .span10{width:82.87292817679558%;*width:82.81973668743387%}.row-fluid .span9{width:74.30939226519337%;*width:74.25620077583166%}.row-fluid .span8{width:65.74585635359117%;*width:65.69266486422946%}.row-fluid .span7{width:57.18232044198895%;*width:57.12912895262725%}.row-fluid .span6{width:48.61878453038674%;*width:48.56559304102504%}.row-fluid .span5{width:40.05524861878453%;*width:40.00205712942283%}.row-fluid .span4{width:31.491712707182323%;*width:31.43852121782062%}.row-fluid .span3{width:22.92817679558011%;*width:22.87498530621841%}.row-fluid .span2{width:14.3646408839779%;*width:14.311449394616199%}.row-fluid .span1{width:5.801104972375691%;*width:5.747913483013988%}.row-fluid .offset12{margin-left:105.52486187845304%;*margin-left:105.41847889972962%}.row-fluid .offset12:first-child{margin-left:102.76243093922652%;*margin-left:102.6560479605031%}.row-fluid .offset11{margin-left:96.96132596685082%;*margin-left:96.8549429881274%}.row-fluid .offset11:first-child{margin-left:94.1988950276243%;*margin-left:94.09251204890089%}.row-fluid .offset10{margin-left:88.39779005524862%;*margin-left:88.2914070765252%}.row-fluid .offset10:first-child{margin-left:85.6353591160221%;*margin-left:85.52897613729868%}.row-fluid .offset9{margin-left:79.8342541436464%;*margin-left:79.72787116492299%}.row-fluid .offset9:first-child{margin-left:77.07182320441989%;*margin-left:76.96544022569647%}.row-fluid .offset8{margin-left:71.2707182320442%;*margin-left:71.16433525332079%}.row-fluid .offset8:first-child{margin-left:68.50828729281768%;*margin-left:68.40190431409427%}.row-fluid .offset7{margin-left:62.70718232044199%;*margin-left:62.600799341718584%}.row-fluid .offset7:first-child{margin-left:59.94475138121547%;*margin-left:59.838368402492065%}.row-fluid .offset6{margin-left:54.14364640883978%;*margin-left:54.037263430116376%}.row-fluid .offset6:first-child{margin-left:51.38121546961326%;*margin-left:51.27483249088986%}.row-fluid .offset5{margin-left:45.58011049723757%;*margin-left:45.47372751851417%}.row-fluid .offset5:first-child{margin-left:42.81767955801105%;*margin-left:42.71129657928765%}.row-fluid .offset4{margin-left:37.01657458563536%;*margin-left:36.91019160691196%}.row-fluid .offset4:first-child{margin-left:34.25414364640884%;*margin-left:34.14776066768544%}.row-fluid .offset3{margin-left:28.45303867403315%;*margin-left:28.346655695309746%}.row-fluid .offset3:first-child{margin-left:25.69060773480663%;*margin-left:25.584224756083227%}.row-fluid .offset2{margin-left:19.88950276243094%;*margin-left:19.783119783707537%}.row-fluid .offset2:first-child{margin-left:17.12707182320442%;*margin-left:17.02068884448102%}.row-fluid .offset1{margin-left:11.32596685082873%;*margin-left:11.219583872105325%}.row-fluid .offset1:first-child{margin-left:8.56353591160221%;*margin-left:8.457152932878806%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:710px}input.span11,textarea.span11,.uneditable-input.span11{width:648px}input.span10,textarea.span10,.uneditable-input.span10{width:586px}input.span9,textarea.span9,.uneditable-input.span9{width:524px}input.span8,textarea.span8,.uneditable-input.span8{width:462px}input.span7,textarea.span7,.uneditable-input.span7{width:400px}input.span6,textarea.span6,.uneditable-input.span6{width:338px}input.span5,textarea.span5,.uneditable-input.span5{width:276px}input.span4,textarea.span4,.uneditable-input.span4{width:214px}input.span3,textarea.span3,.uneditable-input.span3{width:152px}input.span2,textarea.span2,.uneditable-input.span2{width:90px}input.span1,textarea.span1,.uneditable-input.span1{width:28px}}@media(max-width:767px){body{padding-right:20px;padding-left:20px}.navbar-fixed-top,.navbar-fixed-bottom{margin-right:-20px;margin-left:-20px}.container-fluid{padding:0}.dl-horizontal dt{float:none;width:auto;clear:none;text-align:left}.dl-horizontal dd{margin-left:0}.container{width:auto}.row-fluid{width:100%}.row,.thumbnails{margin-left:0}.thumbnails>li{float:none;margin-left:0}[class*="span"],.row-fluid [class*="span"]{display:block;float:none;width:auto;margin-left:0}.span12,.row-fluid .span12{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto}.modal{position:fixed;top:20px;right:20px;left:20px;width:auto;margin:0}.modal.fade.in{top:auto}}@media(max-width:480px){.nav-collapse{-webkit-transform:translate3d(0,0,0)}.page-header h1 small{display:block;line-height:20px}input[type="checkbox"],input[type="radio"]{border:1px solid #ccc}.form-horizontal .control-group>label{float:none;width:auto;padding-top:0;text-align:left}.form-horizontal .controls{margin-left:0}.form-horizontal .control-list{padding-top:0}.form-horizontal .form-actions{padding-right:10px;padding-left:10px}.modal{top:10px;right:10px;left:10px}.modal-header .close{padding:10px;margin:-10px}.carousel-caption{position:static}}@media(max-width:979px){body{padding-top:0}.navbar-fixed-top,.navbar-fixed-bottom{position:static}.navbar-fixed-top{margin-bottom:20px}.navbar-fixed-bottom{margin-top:20px}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding:5px}.navbar .container{width:auto;padding:0}.navbar .brand{padding-right:10px;padding-left:10px;margin:0 0 0 -5px}.nav-collapse{clear:both}.nav-collapse .nav{float:none;margin:0 0 10px}.nav-collapse .nav>li{float:none}.nav-collapse .nav>li>a{margin-bottom:2px}.nav-collapse .nav>.divider-vertical{display:none}.nav-collapse .nav .nav-header{color:#555;text-shadow:none}.nav-collapse .nav>li>a,.nav-collapse .dropdown-menu a{padding:9px 15px;font-weight:bold;color:#555;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.nav-collapse .btn{padding:4px 10px 4px;font-weight:normal;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.nav-collapse .dropdown-menu li+li a{margin-bottom:2px}.nav-collapse .nav>li>a:hover,.nav-collapse .dropdown-menu a:hover{background-color:#f2f2f2}.navbar-inverse .nav-collapse .nav>li>a:hover,.navbar-inverse .nav-collapse .dropdown-menu a:hover{background-color:#111}.nav-collapse.in .btn-group{padding:0;margin-top:5px}.nav-collapse .dropdown-menu{position:static;top:auto;left:auto;display:block;float:none;max-width:none;padding:0;margin:0 15px;background-color:transparent;border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.nav-collapse .dropdown-menu:before,.nav-collapse .dropdown-menu:after{display:none}.nav-collapse .dropdown-menu .divider{display:none}.nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:10px 15px;margin:10px 0;border-top:1px solid #f2f2f2;border-bottom:1px solid #f2f2f2;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1)}.navbar .nav-collapse .nav.pull-right{float:none;margin-left:0}.nav-collapse,.nav-collapse.collapse{height:0;overflow:hidden}.navbar .btn-navbar{display:block}.navbar-static .navbar-inner{padding-right:10px;padding-left:10px}}@media(min-width:980px){.nav-collapse.collapse{height:auto!important;overflow:visible!important}}
+ */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.hidden{display:none;visibility:hidden}.visible-phone{display:none!important}.visible-tablet{display:none!important}.hidden-desktop{display:none!important}.visible-desktop{display:inherit!important}@media(min-width:768px) and (max-width:979px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-tablet{display:inherit!important}.hidden-tablet{display:none!important}}@media(max-width:767px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-phone{display:inherit!important}.hidden-phone{display:none!important}}@media(min-width:1200px){.row{margin-left:-30px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:30px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:1170px}.span12{width:1170px}.span11{width:1070px}.span10{width:970px}.span9{width:870px}.span8{width:770px}.span7{width:670px}.span6{width:570px}.span5{width:470px}.span4{width:370px}.span3{width:270px}.span2{width:170px}.span1{width:70px}.offset12{margin-left:1230px}.offset11{margin-left:1130px}.offset10{margin-left:1030px}.offset9{margin-left:930px}.offset8{margin-left:830px}.offset7{margin-left:730px}.offset6{margin-left:630px}.offset5{margin-left:530px}.offset4{margin-left:430px}.offset3{margin-left:330px}.offset2{margin-left:230px}.offset1{margin-left:130px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.564102564102564%;*margin-left:2.5109110747408616%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.45299145299145%;*width:91.39979996362975%}.row-fluid .span10{width:82.90598290598291%;*width:82.8527914166212%}.row-fluid .span9{width:74.35897435897436%;*width:74.30578286961266%}.row-fluid .span8{width:65.81196581196582%;*width:65.75877432260411%}.row-fluid .span7{width:57.26495726495726%;*width:57.21176577559556%}.row-fluid .span6{width:48.717948717948715%;*width:48.664757228587014%}.row-fluid .span5{width:40.17094017094017%;*width:40.11774868157847%}.row-fluid .span4{width:31.623931623931625%;*width:31.570740134569924%}.row-fluid .span3{width:23.076923076923077%;*width:23.023731587561375%}.row-fluid .span2{width:14.52991452991453%;*width:14.476723040552828%}.row-fluid .span1{width:5.982905982905983%;*width:5.929714493544281%}.row-fluid .offset12{margin-left:105.12820512820512%;*margin-left:105.02182214948171%}.row-fluid .offset12:first-child{margin-left:102.56410256410257%;*margin-left:102.45771958537915%}.row-fluid .offset11{margin-left:96.58119658119658%;*margin-left:96.47481360247316%}.row-fluid .offset11:first-child{margin-left:94.01709401709402%;*margin-left:93.91071103837061%}.row-fluid .offset10{margin-left:88.03418803418803%;*margin-left:87.92780505546462%}.row-fluid .offset10:first-child{margin-left:85.47008547008548%;*margin-left:85.36370249136206%}.row-fluid .offset9{margin-left:79.48717948717949%;*margin-left:79.38079650845607%}.row-fluid .offset9:first-child{margin-left:76.92307692307693%;*margin-left:76.81669394435352%}.row-fluid .offset8{margin-left:70.94017094017094%;*margin-left:70.83378796144753%}.row-fluid .offset8:first-child{margin-left:68.37606837606839%;*margin-left:68.26968539734497%}.row-fluid .offset7{margin-left:62.393162393162385%;*margin-left:62.28677941443899%}.row-fluid .offset7:first-child{margin-left:59.82905982905982%;*margin-left:59.72267685033642%}.row-fluid .offset6{margin-left:53.84615384615384%;*margin-left:53.739770867430444%}.row-fluid .offset6:first-child{margin-left:51.28205128205128%;*margin-left:51.175668303327875%}.row-fluid .offset5{margin-left:45.299145299145295%;*margin-left:45.1927623204219%}.row-fluid .offset5:first-child{margin-left:42.73504273504273%;*margin-left:42.62865975631933%}.row-fluid .offset4{margin-left:36.75213675213675%;*margin-left:36.645753773413354%}.row-fluid .offset4:first-child{margin-left:34.18803418803419%;*margin-left:34.081651209310785%}.row-fluid .offset3{margin-left:28.205128205128204%;*margin-left:28.0987452264048%}.row-fluid .offset3:first-child{margin-left:25.641025641025642%;*margin-left:25.53464266230224%}.row-fluid .offset2{margin-left:19.65811965811966%;*margin-left:19.551736679396257%}.row-fluid .offset2:first-child{margin-left:17.094017094017094%;*margin-left:16.98763411529369%}.row-fluid .offset1{margin-left:11.11111111111111%;*margin-left:11.004728132387708%}.row-fluid .offset1:first-child{margin-left:8.547008547008547%;*margin-left:8.440625568285142%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:30px}input.span12,textarea.span12,.uneditable-input.span12{width:1156px}input.span11,textarea.span11,.uneditable-input.span11{width:1056px}input.span10,textarea.span10,.uneditable-input.span10{width:956px}input.span9,textarea.span9,.uneditable-input.span9{width:856px}input.span8,textarea.span8,.uneditable-input.span8{width:756px}input.span7,textarea.span7,.uneditable-input.span7{width:656px}input.span6,textarea.span6,.uneditable-input.span6{width:556px}input.span5,textarea.span5,.uneditable-input.span5{width:456px}input.span4,textarea.span4,.uneditable-input.span4{width:356px}input.span3,textarea.span3,.uneditable-input.span3{width:256px}input.span2,textarea.span2,.uneditable-input.span2{width:156px}input.span1,textarea.span1,.uneditable-input.span1{width:56px}.thumbnails{margin-left:-30px}.thumbnails>li{margin-left:30px}.row-fluid .thumbnails{margin-left:0}}@media(min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px}.span12{width:724px}.span11{width:662px}.span10{width:600px}.span9{width:538px}.span8{width:476px}.span7{width:414px}.span6{width:352px}.span5{width:290px}.span4{width:228px}.span3{width:166px}.span2{width:104px}.span1{width:42px}.offset12{margin-left:764px}.offset11{margin-left:702px}.offset10{margin-left:640px}.offset9{margin-left:578px}.offset8{margin-left:516px}.offset7{margin-left:454px}.offset6{margin-left:392px}.offset5{margin-left:330px}.offset4{margin-left:268px}.offset3{margin-left:206px}.offset2{margin-left:144px}.offset1{margin-left:82px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.7624309392265194%;*margin-left:2.709239449864817%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.43646408839778%;*width:91.38327259903608%}.row-fluid .span10{width:82.87292817679558%;*width:82.81973668743387%}.row-fluid .span9{width:74.30939226519337%;*width:74.25620077583166%}.row-fluid .span8{width:65.74585635359117%;*width:65.69266486422946%}.row-fluid .span7{width:57.18232044198895%;*width:57.12912895262725%}.row-fluid .span6{width:48.61878453038674%;*width:48.56559304102504%}.row-fluid .span5{width:40.05524861878453%;*width:40.00205712942283%}.row-fluid .span4{width:31.491712707182323%;*width:31.43852121782062%}.row-fluid .span3{width:22.92817679558011%;*width:22.87498530621841%}.row-fluid .span2{width:14.3646408839779%;*width:14.311449394616199%}.row-fluid .span1{width:5.801104972375691%;*width:5.747913483013988%}.row-fluid .offset12{margin-left:105.52486187845304%;*margin-left:105.41847889972962%}.row-fluid .offset12:first-child{margin-left:102.76243093922652%;*margin-left:102.6560479605031%}.row-fluid .offset11{margin-left:96.96132596685082%;*margin-left:96.8549429881274%}.row-fluid .offset11:first-child{margin-left:94.1988950276243%;*margin-left:94.09251204890089%}.row-fluid .offset10{margin-left:88.39779005524862%;*margin-left:88.2914070765252%}.row-fluid .offset10:first-child{margin-left:85.6353591160221%;*margin-left:85.52897613729868%}.row-fluid .offset9{margin-left:79.8342541436464%;*margin-left:79.72787116492299%}.row-fluid .offset9:first-child{margin-left:77.07182320441989%;*margin-left:76.96544022569647%}.row-fluid .offset8{margin-left:71.2707182320442%;*margin-left:71.16433525332079%}.row-fluid .offset8:first-child{margin-left:68.50828729281768%;*margin-left:68.40190431409427%}.row-fluid .offset7{margin-left:62.70718232044199%;*margin-left:62.600799341718584%}.row-fluid .offset7:first-child{margin-left:59.94475138121547%;*margin-left:59.838368402492065%}.row-fluid .offset6{margin-left:54.14364640883978%;*margin-left:54.037263430116376%}.row-fluid .offset6:first-child{margin-left:51.38121546961326%;*margin-left:51.27483249088986%}.row-fluid .offset5{margin-left:45.58011049723757%;*margin-left:45.47372751851417%}.row-fluid .offset5:first-child{margin-left:42.81767955801105%;*margin-left:42.71129657928765%}.row-fluid .offset4{margin-left:37.01657458563536%;*margin-left:36.91019160691196%}.row-fluid .offset4:first-child{margin-left:34.25414364640884%;*margin-left:34.14776066768544%}.row-fluid .offset3{margin-left:28.45303867403315%;*margin-left:28.346655695309746%}.row-fluid .offset3:first-child{margin-left:25.69060773480663%;*margin-left:25.584224756083227%}.row-fluid .offset2{margin-left:19.88950276243094%;*margin-left:19.783119783707537%}.row-fluid .offset2:first-child{margin-left:17.12707182320442%;*margin-left:17.02068884448102%}.row-fluid .offset1{margin-left:11.32596685082873%;*margin-left:11.219583872105325%}.row-fluid .offset1:first-child{margin-left:8.56353591160221%;*margin-left:8.457152932878806%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:710px}input.span11,textarea.span11,.uneditable-input.span11{width:648px}input.span10,textarea.span10,.uneditable-input.span10{width:586px}input.span9,textarea.span9,.uneditable-input.span9{width:524px}input.span8,textarea.span8,.uneditable-input.span8{width:462px}input.span7,textarea.span7,.uneditable-input.span7{width:400px}input.span6,textarea.span6,.uneditable-input.span6{width:338px}input.span5,textarea.span5,.uneditable-input.span5{width:276px}input.span4,textarea.span4,.uneditable-input.span4{width:214px}input.span3,textarea.span3,.uneditable-input.span3{width:152px}input.span2,textarea.span2,.uneditable-input.span2{width:90px}input.span1,textarea.span1,.uneditable-input.span1{width:28px}}@media(max-width:767px){body{padding-right:20px;padding-left:20px}.navbar-fixed-top,.navbar-fixed-bottom,.navbar-static-top{margin-right:-20px;margin-left:-20px}.container-fluid{padding:0}.dl-horizontal dt{float:none;width:auto;clear:none;text-align:left}.dl-horizontal dd{margin-left:0}.container{width:auto}.row-fluid{width:100%}.row,.thumbnails{margin-left:0}.thumbnails>li{float:none;margin-left:0}[class*="span"],.row-fluid [class*="span"]{display:block;float:none;width:100%;margin-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.span12,.row-fluid .span12{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto}.controls-row [class*="span"]+[class*="span"]{margin-left:0}.modal{position:fixed;top:20px;right:20px;left:20px;width:auto;margin:0}.modal.fade.in{top:auto}}@media(max-width:480px){.nav-collapse{-webkit-transform:translate3d(0,0,0)}.page-header h1 small{display:block;line-height:20px}input[type="checkbox"],input[type="radio"]{border:1px solid #ccc}.form-horizontal .control-label{float:none;width:auto;padding-top:0;text-align:left}.form-horizontal .controls{margin-left:0}.form-horizontal .control-list{padding-top:0}.form-horizontal .form-actions{padding-right:10px;padding-left:10px}.modal{top:10px;right:10px;left:10px}.modal-header .close{padding:10px;margin:-10px}.carousel-caption{position:static}}@media(max-width:979px){body{padding-top:0}.navbar-fixed-top,.navbar-fixed-bottom{position:static}.navbar-fixed-top{margin-bottom:20px}.navbar-fixed-bottom{margin-top:20px}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding:5px}.navbar .container{width:auto;padding:0}.navbar .brand{padding-right:10px;padding-left:10px;margin:0 0 0 -5px}.nav-collapse{clear:both}.nav-collapse .nav{float:none;margin:0 0 10px}.nav-collapse .nav>li{float:none}.nav-collapse .nav>li>a{margin-bottom:2px}.nav-collapse .nav>.divider-vertical{display:none}.nav-collapse .nav .nav-header{color:#777;text-shadow:none}.nav-collapse .nav>li>a,.nav-collapse .dropdown-menu a{padding:9px 15px;font-weight:bold;color:#777;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.nav-collapse .btn{padding:4px 10px 4px;font-weight:normal;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.nav-collapse .dropdown-menu li+li a{margin-bottom:2px}.nav-collapse .nav>li>a:hover,.nav-collapse .dropdown-menu a:hover{background-color:#f2f2f2}.navbar-inverse .nav-collapse .nav>li>a:hover,.navbar-inverse .nav-collapse .dropdown-menu a:hover{background-color:#111}.nav-collapse.in .btn-group{padding:0;margin-top:5px}.nav-collapse .dropdown-menu{position:static;top:auto;left:auto;display:block;float:none;max-width:none;padding:0;margin:0 15px;background-color:transparent;border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.nav-collapse .dropdown-menu:before,.nav-collapse .dropdown-menu:after{display:none}.nav-collapse .dropdown-menu .divider{display:none}.nav-collapse .nav>li>.dropdown-menu:before,.nav-collapse .nav>li>.dropdown-menu:after{display:none}.nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:10px 15px;margin:10px 0;border-top:1px solid #f2f2f2;border-bottom:1px solid #f2f2f2;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1)}.navbar-inverse .nav-collapse .navbar-form,.navbar-inverse .nav-collapse .navbar-search{border-top-color:#111;border-bottom-color:#111}.navbar .nav-collapse .nav.pull-right{float:none;margin-left:0}.nav-collapse,.nav-collapse.collapse{height:0;overflow:hidden}.navbar .btn-navbar{display:block}.navbar-static .navbar-inner{padding-right:10px;padding-left:10px}}@media(min-width:980px){.nav-collapse.collapse{height:auto!important;overflow:visible!important}}
View
4 source/aspnetserver/css/bootstrap.min.css
2 additions, 2 deletions not shown
View
2  source/aspnetserver/css/mangaweb.css
@@ -1,2 +1,2 @@
-
+body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif,"Meiryo UI","MS UI Gothic","MS PGothic","MS Pゴシック","MS Gothic","MS ゴシック","Microsoft JHengHei UI","Microsoft JHengHei","微軟正黑體",MingLiU,"細明體"}code,pre{font-family:Monaco,Menlo,Consolas,"Courier New",monospace,"Meiryo UI","MS UI Gothic","MS PGothic","MS Pゴシック","MS Gothic","MS ゴシック","Microsoft JHengHei UI","Microsoft JHengHei","微軟正黑體",MingLiU,"細明體"}input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif,"Meiryo UI","MS UI Gothic","MS PGothic","MS Pゴシック","MS Gothic","MS ゴシック","Microsoft JHengHei UI","Microsoft JHengHei","微軟正黑體",MingLiU,"細明體"}.navbar-search .search-query{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif,"Meiryo UI","MS UI Gothic","MS PGothic","MS Pゴシック","MS Gothic","MS ゴシック","Microsoft JHengHei UI","Microsoft JHengHei","微軟正黑體",MingLiU,"細明體"}.temp{display:none}
/* This beautiful CSS-File has been crafted with LESS (lesscss.org) and compiled by simpLESS (wearekiss.com/simpless) */
View
BIN  source/aspnetserver/img/loading.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
9 source/aspnetserver/index.html
@@ -1,14 +1,17 @@
<!DOCTYPE html>
<html>
<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=0" />
<title>MangaWeb</title>
<link href="css/bootstrap.min.css" rel="stylesheet" />
<link href="css/bootstrap-responsive.min.css" rel="stylesheet" />
+ <link href="css/mangaweb.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.8.1.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
- <script type="text/javascript" src="js/mscorlib.js"></script>
- <script type="text/javascript" src="js/afung.MangaWeb3.Common.js"></script>
- <script type="text/javascript" src="js/afung.MangaWeb3.Client.js"></script>
+ <script type="text/javascript" src="js/mscorlib.debug.js"></script>
+ <script type="text/javascript" src="js/afung.MangaWeb3.Common.debug.js"></script>
+ <script type="text/javascript" src="js/afung.MangaWeb3.Client.debug.js"></script>
<script type="text/javascript" src="js/servertype.js"></script>
</head>
<body>
View
11 source/aspnetserver/install.html
@@ -1,15 +1,18 @@
<!DOCTYPE html>
<html>
<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=0" />
<title>MangaWeb - Install</title>
<link href="css/bootstrap.min.css" rel="stylesheet" />
<link href="css/bootstrap-responsive.min.css" rel="stylesheet" />
+ <link href="css/mangaweb.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.8.1.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
- <script type="text/javascript" src="js/mscorlib.js"></script>
- <script type="text/javascript" src="js/afung.MangaWeb3.Common.js"></script>
- <script type="text/javascript" src="js/afung.MangaWeb3.Client.js"></script>
- <script type="text/javascript" src="js/afung.MangaWeb3.Client.Install.js"></script>
+ <script type="text/javascript" src="js/mscorlib.debug.js"></script>
+ <script type="text/javascript" src="js/afung.MangaWeb3.Common.debug.js"></script>
+ <script type="text/javascript" src="js/afung.MangaWeb3.Client.debug.js"></script>
+ <script type="text/javascript" src="js/afung.MangaWeb3.Client.Install.debug.js"></script>
<script type="text/javascript" src="js/servertype.js"></script>
</head>
<body>
View
22 source/aspnetserver/js/afung.MangaWeb3.Client.Install.debug.js
@@ -3,6 +3,28 @@
(function() {
+Type.registerNamespace('afung.MangaWeb3.Client.Install');
+
+////////////////////////////////////////////////////////////////////////////////
+// afung.MangaWeb3.Client.Install.InstallApp
+
+afung.MangaWeb3.Client.Install.InstallApp = function afung_MangaWeb3_Client_Install_InstallApp() {
+ /// <summary>
+ /// Class InstallApp
+ /// </summary>
+ afung.MangaWeb3.Client.Install.InstallApp.initializeBase(this);
+}
+afung.MangaWeb3.Client.Install.InstallApp.prototype = {
+
+ startStage2: function afung_MangaWeb3_Client_Install_InstallApp$startStage2() {
+ afung.MangaWeb3.Client.Template.templates[afung.MangaWeb3.Client.Template.templates.length] = 'install';
+ afung.MangaWeb3.Client.Template.templateIds['install'] = [ 'install-mysql-error', 'install-module' ];
+ afung.MangaWeb3.Client.Install.InstallApp.callBaseMethod(this, 'startStage2');
+ }
+}
+
+
+afung.MangaWeb3.Client.Install.InstallApp.registerClass('afung.MangaWeb3.Client.Install.InstallApp', afung.MangaWeb3.Client.Application);
})();
//! This script was generated using Script# v0.7.4.0
View
4 source/aspnetserver/js/afung.MangaWeb3.Client.Install.js
@@ -1,3 +1,5 @@
// afung.MangaWeb3.Client.Install.js
(function(){
-})();// This script was generated using Script# v0.7.4.0
+Type.registerNamespace('afung.MangaWeb3.Client.Install');afung.MangaWeb3.Client.Install.InstallApp=function(){afung.MangaWeb3.Client.Install.InstallApp.initializeBase(this);}
+afung.MangaWeb3.Client.Install.InstallApp.prototype={startStage2:function(){afung.MangaWeb3.Client.Template.templates[afung.MangaWeb3.Client.Template.templates.length]='install';afung.MangaWeb3.Client.Template.templateIds['install']=['install-mysql-error','install-module'];afung.MangaWeb3.Client.Install.InstallApp.callBaseMethod(this, 'startStage2');}}
+afung.MangaWeb3.Client.Install.InstallApp.registerClass('afung.MangaWeb3.Client.Install.InstallApp',afung.MangaWeb3.Client.Application);})();// This script was generated using Script# v0.7.4.0
View
270 source/aspnetserver/js/afung.MangaWeb3.Client.debug.js
@@ -9,9 +9,14 @@ Type.registerNamespace('afung.MangaWeb3.Client');
// afung.MangaWeb3.Client.ServerType
afung.MangaWeb3.Client.ServerType = function() {
+ /// <summary>
+ /// Server Type enum
+ /// </summary>
/// <field name="aspNet" type="Number" integer="true" static="true">
+ /// The server is running ASP.NET
/// </field>
/// <field name="php" type="Number" integer="true" static="true">
+ /// The server is running PHP
/// </field>
};
afung.MangaWeb3.Client.ServerType.prototype = {
@@ -22,15 +27,280 @@ afung.MangaWeb3.Client.ServerType.registerEnum('afung.MangaWeb3.Client.ServerTyp
////////////////////////////////////////////////////////////////////////////////
+// afung.MangaWeb3.Client.Application
+
+afung.MangaWeb3.Client.Application = function afung_MangaWeb3_Client_Application() {
+ /// <summary>
+ /// Class Application
+ /// </summary>
+ /// <field name="_fatalErrorMessageHtml" type="String" static="true">
+ /// The HTML for showing fatal error message
+ /// </field>
+ /// <field name="_fatalErrorMessageClass" type="String" static="true">
+ /// The class for showing fatal error message inside the above HTML
+ /// </field>
+ var defaultLanguageLoadFailed = function(error) {
+ afung.MangaWeb3.Client.Application.showFatalError(String.format('Unabled to load default language file ({0}). Please check that you have the correct file on your server', error));
+ };
+ var defaultLanguageLoadFinished = ss.Delegate.create(this, function() {
+ var userLanguageLoadFailed = ss.Delegate.create(this, function(error) {
+ this.startStage2();
+ });
+ var userLanguageLoadFinished = ss.Delegate.create(this, function() {
+ this.startStage2();
+ });
+ try {
+ afung.MangaWeb3.Client.Strings.loadUserLanguage(userLanguageLoadFinished, userLanguageLoadFailed);
+ }
+ catch (error) {
+ userLanguageLoadFailed(error);
+ }
+ });
+ try {
+ afung.MangaWeb3.Client.Strings.loadDefaultLanguage(defaultLanguageLoadFinished, defaultLanguageLoadFailed);
+ }
+ catch (error) {
+ defaultLanguageLoadFailed(error);
+ }
+}
+afung.MangaWeb3.Client.Application.showFatalError = function afung_MangaWeb3_Client_Application$showFatalError(message) {
+ /// <summary>
+ /// Show fatal error
+ /// </summary>
+ /// <param name="message" type="String">
+ /// the message to be shown
+ /// </param>
+ var errorMessageObject = $('<div class="container"><div class="row"><div class="span12"><div class="alert alert-error"><h4>Fatal Error</h4><span class="fatalerrormsg"></span></div></div></div></div>');
+ $('body').prepend(errorMessageObject);
+ $('.fatalerrormsg', errorMessageObject).text(message);
+}
+afung.MangaWeb3.Client.Application.prototype = {
+
+ startStage2: function afung_MangaWeb3_Client_Application$startStage2() {
+ /// <summary>
+ /// Stage 2 of booting up the application
+ /// </summary>
+ var templateLoadFailed = function(error) {
+ afung.MangaWeb3.Client.Application.showFatalError(String.format('Unabled to load template file ({0}). Please check that you have the correct file on your server', error));
+ };
+ var templateLoadFinished = function() {
+ };
+ afung.MangaWeb3.Client.Template.loadTemplateFile(templateLoadFinished, templateLoadFailed);
+ }
+}
+
+
+////////////////////////////////////////////////////////////////////////////////
+// afung.MangaWeb3.Client.HtmlConstants
+
+afung.MangaWeb3.Client.HtmlConstants = function afung_MangaWeb3_Client_HtmlConstants() {
+ /// <summary>
+ /// Class for constants related to HTML
+ /// </summary>
+ /// <field name="attributeId" type="String" static="true">
+ /// The ID attribute
+ /// </field>
+ /// <field name="classTemp" type="String" static="true">
+ /// The class temp
+ /// </field>
+ /// <field name="tagBody" type="String" static="true">
+ /// Tag Body
+ /// </field>
+ /// <field name="tagDiv" type="String" static="true">
+ /// Tag Div
+ /// </field>
+ /// <field name="tagParagraph" type="String" static="true">
+ /// Tag Paragraph
+ /// </field>
+}
+
+
+////////////////////////////////////////////////////////////////////////////////
+// afung.MangaWeb3.Client.Strings
+
+afung.MangaWeb3.Client.Strings = function afung_MangaWeb3_Client_Strings() {
+ /// <summary>
+ /// The Strings class which contains logic related to strings including language
+ /// </summary>
+ /// <field name="defaultLanguage" type="String" static="true">
+ /// The default language is English (United States)
+ /// </field>
+ /// <field name="languages" type="Object" static="true">
+ /// List of supported languages
+ /// </field>
+ /// <field name="_languageFilePathFormat" type="String" static="true">
+ /// Format of language file path
+ /// </field>
+ /// <field name="_currentLanguage" type="String" static="true">
+ /// Current Language
+ /// </field>
+ /// <field name="_loadedLanguageData" type="Object" static="true">
+ /// Dictionary to store loaded language data
+ /// </field>
+}
+afung.MangaWeb3.Client.Strings.loadDefaultLanguage = function afung_MangaWeb3_Client_Strings$loadDefaultLanguage(successCallback, failureCallback) {
+ /// <param name="successCallback" type="Function">
+ /// </param>
+ /// <param name="failureCallback" type="System.Action`1">
+ /// </param>
+ afung.MangaWeb3.Client.Strings.loadLanguageFile('en-us', successCallback, failureCallback);
+}
+afung.MangaWeb3.Client.Strings.loadUserLanguage = function afung_MangaWeb3_Client_Strings$loadUserLanguage(successCallback, failureCallback) {
+ /// <param name="successCallback" type="Function">
+ /// </param>
+ /// <param name="failureCallback" type="System.Action`1">
+ /// </param>
+ afung.MangaWeb3.Client.Strings.loadLanguageFile('en-us', successCallback, failureCallback);
+}
+afung.MangaWeb3.Client.Strings.loadLanguageFile = function afung_MangaWeb3_Client_Strings$loadLanguageFile(language, successCallback, failureCallback) {
+ /// <param name="language" type="String">
+ /// </param>
+ /// <param name="successCallback" type="Function">
+ /// </param>
+ /// <param name="failureCallback" type="System.Action`1">
+ /// </param>
+ if (Object.keyExists(afung.MangaWeb3.Client.Strings._loadedLanguageData, language)) {
+ successCallback();
+ return;
+ }
+ var onError = function(request, textStatus, error) {
+ failureCallback(error);
+ };
+ var onFinish = function(data, textStatus, request) {
+ afung.MangaWeb3.Client.Strings._loadedLanguageData[language] = {};
+ $(data).each(function(index, element) {
+ var currentObject = $(element);
+ if (!String.compare(element.tagName, 'p', true)) {
+ var stringId = currentObject.attr('id');
+ if (!String.isNullOrEmpty(stringId)) {
+ afung.MangaWeb3.Client.Strings._loadedLanguageData[language][stringId] = currentObject.html();
+ }
+ }
+ });
+ successCallback();
+ };
+ var options = {};
+ options.type = 'GET';
+ options.dataType = 'html';
+ options.error = onError;
+ options.success = onFinish;
+ $.ajax(String.format('lang/{0}.html', language), options);
+}
+afung.MangaWeb3.Client.Strings.get = function afung_MangaWeb3_Client_Strings$get(stringId) {
+ /// <summary>
+ /// Get the string from string ID
+ /// </summary>
+ /// <param name="stringId" type="String">
+ /// String ID
+ /// </param>
+ /// <returns type="String"></returns>
+ if (afung.MangaWeb3.Client.Strings._currentLanguage !== 'en-us' && Object.keyExists(afung.MangaWeb3.Client.Strings._loadedLanguageData, afung.MangaWeb3.Client.Strings._currentLanguage) && Object.keyExists(afung.MangaWeb3.Client.Strings._loadedLanguageData[afung.MangaWeb3.Client.Strings._currentLanguage], stringId)) {
+ return afung.MangaWeb3.Client.Strings._loadedLanguageData[afung.MangaWeb3.Client.Strings._currentLanguage][stringId];
+ }
+ else if (Object.keyExists(afung.MangaWeb3.Client.Strings._loadedLanguageData, 'en-us') && Object.keyExists(afung.MangaWeb3.Client.Strings._loadedLanguageData['en-us'], stringId)) {
+ return afung.MangaWeb3.Client.Strings._loadedLanguageData['en-us'][stringId];
+ }
+ return 'String Not Defined';
+}
+
+
+////////////////////////////////////////////////////////////////////////////////
+// afung.MangaWeb3.Client.Template
+
+afung.MangaWeb3.Client.Template = function afung_MangaWeb3_Client_Template() {
+ /// <summary>
+ /// Template class. Manage all template loading and parsing
+ /// </summary>
+ /// <field name="_templateFilePathFormat" type="String" static="true">
+ /// Format of template file path
+ /// </field>
+ /// <field name="templates" type="Array" elementType="String" static="true">
+ /// The template files to load
+ /// </field>
+ /// <field name="templateIds" type="Object" static="true">
+ /// The IDs in template files to parse
+ /// The order of the IDs matters!
+ /// </field>
+ /// <field name="_loadedTemplateData" type="Object" static="true">
+ /// The loaded template data
+ /// </field>
+}
+afung.MangaWeb3.Client.Template.loadTemplateFile = function afung_MangaWeb3_Client_Template$loadTemplateFile(successCallback, failureCallback) {
+ /// <param name="successCallback" type="Function">
+ /// </param>
+ /// <param name="failureCallback" type="System.Action`1">
+ /// </param>
+ var templateIndex = 0;
+ var currentTemplateFile = '';
+ var tempDiv = $(document.createElement('div')).appendTo($('body')).addClass('temp');
+ var loadNextTemplate = function() {
+ };
+ var onError = function(request, textStatus, error) {
+ failureCallback(error);
+ };
+ var onFinish = function(data, textStatus, request) {
+ var templateDiv = $(document.createElement('div')).appendTo(tempDiv).append($(data));
+ afung.MangaWeb3.Client.Template._loadedTemplateData[currentTemplateFile] = {};
+ var $enum1 = ss.IEnumerator.getEnumerator(afung.MangaWeb3.Client.Template.templateIds[currentTemplateFile]);
+ while ($enum1.moveNext()) {
+ var templateId = $enum1.current;
+ var selectedTemplate = $('#' + templateId, templateDiv);
+ afung.MangaWeb3.Client.Template._loadedTemplateData[currentTemplateFile][templateId] = selectedTemplate.clone();
+ selectedTemplate.remove();
+ }
+ templateDiv.remove();
+ templateIndex++;
+ loadNextTemplate();
+ };
+ loadNextTemplate = function() {
+ if (templateIndex >= afung.MangaWeb3.Client.Template.templates.length) {
+ tempDiv.remove();
+ successCallback();
+ return;
+ }
+ currentTemplateFile = afung.MangaWeb3.Client.Template.templates[templateIndex];
+ var options = {};
+ options.type = 'GET';
+ options.dataType = 'html';
+ options.error = onError;
+ options.success = onFinish;
+ $.ajax(String.format('template/{0}.html', currentTemplateFile), options);
+ };
+ loadNextTemplate();
+}
+
+
+////////////////////////////////////////////////////////////////////////////////
// afung.MangaWeb3.Client.Environment
afung.MangaWeb3.Client.Environment = function afung_MangaWeb3_Client_Environment() {
+ /// <summary>
+ /// Contain environment variables
+ /// </summary>
/// <field name="serverType" type="afung.MangaWeb3.Client.ServerType" static="true">
+ /// The server type.
+ /// Should be set from servertype.js
/// </field>
}
+afung.MangaWeb3.Client.Application.registerClass('afung.MangaWeb3.Client.Application');
+afung.MangaWeb3.Client.HtmlConstants.registerClass('afung.MangaWeb3.Client.HtmlConstants');
+afung.MangaWeb3.Client.Strings.registerClass('afung.MangaWeb3.Client.Strings');
+afung.MangaWeb3.Client.Template.registerClass('afung.MangaWeb3.Client.Template');
afung.MangaWeb3.Client.Environment.registerClass('afung.MangaWeb3.Client.Environment');
+afung.MangaWeb3.Client.HtmlConstants.attributeId = 'id';
+afung.MangaWeb3.Client.HtmlConstants.classTemp = 'temp';
+afung.MangaWeb3.Client.HtmlConstants.tagBody = 'body';
+afung.MangaWeb3.Client.HtmlConstants.tagDiv = 'div';
+afung.MangaWeb3.Client.HtmlConstants.tagParagraph = 'p';
+afung.MangaWeb3.Client.Strings.defaultLanguage = 'en-us';
+afung.MangaWeb3.Client.Strings.languages = { 'en-us': 'English (United States)', 'zh-hk': 'Chinese (Hong Kong)' };
+afung.MangaWeb3.Client.Strings._currentLanguage = 'en-us';
+afung.MangaWeb3.Client.Strings._loadedLanguageData = {};
+afung.MangaWeb3.Client.Template.templates = [ 'client' ];
+afung.MangaWeb3.Client.Template.templateIds = { client: [ 'div3', 'div2', 'div1' ] };
+afung.MangaWeb3.Client.Template._loadedTemplateData = {};
afung.MangaWeb3.Client.Environment.serverType = 0;
})();
View
28 source/aspnetserver/js/afung.MangaWeb3.Client.js
@@ -1,5 +1,29 @@
// afung.MangaWeb3.Client.js
(function(){
Type.registerNamespace('afung.MangaWeb3.Client');afung.MangaWeb3.Client.ServerType=function(){};afung.MangaWeb3.Client.ServerType.prototype = {aspNet:0,php:1}
-afung.MangaWeb3.Client.ServerType.registerEnum('afung.MangaWeb3.Client.ServerType',false);afung.MangaWeb3.Client.Environment=function(){}
-afung.MangaWeb3.Client.Environment.registerClass('afung.MangaWeb3.Client.Environment');afung.MangaWeb3.Client.Environment.serverType=0;})();// This script was generated using Script# v0.7.4.0
+afung.MangaWeb3.Client.ServerType.registerEnum('afung.MangaWeb3.Client.ServerType',false);afung.MangaWeb3.Client.Application=function(){var $0=function($p1_0){
+afung.MangaWeb3.Client.Application.showFatalError(String.format('Unabled to load default language file ({0}). Please check that you have the correct file on your server',$p1_0));};var $1=ss.Delegate.create(this,function(){
+var $1_0=ss.Delegate.create(this,function($p2_0){
+this.startStage2();});var $1_1=ss.Delegate.create(this,function(){
+this.startStage2();});try{afung.MangaWeb3.Client.Strings.loadUserLanguage($1_1,$1_0);}catch($1_2){$1_0($1_2);}});try{afung.MangaWeb3.Client.Strings.loadDefaultLanguage($1,$0);}catch($2){$0($2);}}
+afung.MangaWeb3.Client.Application.showFatalError=function(message){var $0=$('<div class="container"><div class="row"><div class="span12"><div class="alert alert-error"><h4>Fatal Error</h4><span class="fatalerrormsg"></span></div></div></div></div>');$('body').prepend($0);$('.fatalerrormsg',$0).text(message);}
+afung.MangaWeb3.Client.Application.prototype={startStage2:function(){var $0=function($p1_0){
+afung.MangaWeb3.Client.Application.showFatalError(String.format('Unabled to load template file ({0}). Please check that you have the correct file on your server',$p1_0));};var $1=function(){
+};afung.MangaWeb3.Client.Template.loadTemplateFile($1,$0);}}
+afung.MangaWeb3.Client.HtmlConstants=function(){}
+afung.MangaWeb3.Client.Strings=function(){}
+afung.MangaWeb3.Client.Strings.loadDefaultLanguage=function(successCallback,failureCallback){afung.MangaWeb3.Client.Strings.loadLanguageFile('en-us',successCallback,failureCallback);}
+afung.MangaWeb3.Client.Strings.loadUserLanguage=function(successCallback,failureCallback){afung.MangaWeb3.Client.Strings.loadLanguageFile('en-us',successCallback,failureCallback);}
+afung.MangaWeb3.Client.Strings.loadLanguageFile=function(language,successCallback,failureCallback){if(Object.keyExists(afung.MangaWeb3.Client.Strings.$2,language)){successCallback();return;}var $0=function($p1_0,$p1_1,$p1_2){
+failureCallback($p1_2);};var $1=function($p1_0,$p1_1,$p1_2){
+afung.MangaWeb3.Client.Strings.$2[language]={};$($p1_0).each(function($p2_0,$p2_1){
+var $2_0=$($p2_1);if(!String.compare($p2_1.tagName,'p',true)){var $2_1=$2_0.attr('id');if(!String.isNullOrEmpty($2_1)){afung.MangaWeb3.Client.Strings.$2[language][$2_1]=$2_0.html();}}});successCallback();};var $2={};$2.type='GET';$2.dataType='html';$2.error=$0;$2.success=$1;$.ajax(String.format('lang/{0}.html',language),$2);}
+afung.MangaWeb3.Client.Strings.get=function(stringId){if(afung.MangaWeb3.Client.Strings.$1!=='en-us'&&Object.keyExists(afung.MangaWeb3.Client.Strings.$2,afung.MangaWeb3.Client.Strings.$1)&&Object.keyExists(afung.MangaWeb3.Client.Strings.$2[afung.MangaWeb3.Client.Strings.$1],stringId)){return afung.MangaWeb3.Client.Strings.$2[afung.MangaWeb3.Client.Strings.$1][stringId];}else if(Object.keyExists(afung.MangaWeb3.Client.Strings.$2,'en-us')&&Object.keyExists(afung.MangaWeb3.Client.Strings.$2['en-us'],stringId)){return afung.MangaWeb3.Client.Strings.$2['en-us'][stringId];}return 'String Not Defined';}
+afung.MangaWeb3.Client.Template=function(){}
+afung.MangaWeb3.Client.Template.loadTemplateFile=function(successCallback,failureCallback){var $0=0;var $1='';var $2=$(document.createElement('div')).appendTo($('body')).addClass('temp');var $3=function(){
+};var $4=function($p1_0,$p1_1,$p1_2){
+failureCallback($p1_2);};var $5=function($p1_0,$p1_1,$p1_2){
+var $1_0=$(document.createElement('div')).appendTo($2).append($($p1_0));afung.MangaWeb3.Client.Template.$1[$1]={};var $enum1=ss.IEnumerator.getEnumerator(afung.MangaWeb3.Client.Template.templateIds[$1]);while($enum1.moveNext()){var $1_1=$enum1.current;var $1_2=$('#'+$1_1,$1_0);afung.MangaWeb3.Client.Template.$1[$1][$1_1]=$1_2.clone();$1_2.remove();}$1_0.remove();$0++;$3();};$3=function(){
+if($0>=afung.MangaWeb3.Client.Template.templates.length){$2.remove();successCallback();return;}$1=afung.MangaWeb3.Client.Template.templates[$0];var $1_0={};$1_0.type='GET';$1_0.dataType='html';$1_0.error=$4;$1_0.success=$5;$.ajax(String.format('template/{0}.html',$1),$1_0);};$3();}
+afung.MangaWeb3.Client.Environment=function(){}
+afung.MangaWeb3.Client.Application.registerClass('afung.MangaWeb3.Client.Application');afung.MangaWeb3.Client.HtmlConstants.registerClass('afung.MangaWeb3.Client.HtmlConstants');afung.MangaWeb3.Client.Strings.registerClass('afung.MangaWeb3.Client.Strings');afung.MangaWeb3.Client.Template.registerClass('afung.MangaWeb3.Client.Template');afung.MangaWeb3.Client.Environment.registerClass('afung.MangaWeb3.Client.Environment');afung.MangaWeb3.Client.HtmlConstants.attributeId='id';afung.MangaWeb3.Client.HtmlConstants.classTemp='temp';afung.MangaWeb3.Client.HtmlConstants.tagBody='body';afung.MangaWeb3.Client.HtmlConstants.tagDiv='div';afung.MangaWeb3.Client.HtmlConstants.tagParagraph='p';afung.MangaWeb3.Client.Strings.defaultLanguage='en-us';afung.MangaWeb3.Client.Strings.languages={'en-us':'English (United States)','zh-hk':'Chinese (Hong Kong)'};afung.MangaWeb3.Client.Strings.$1='en-us';afung.MangaWeb3.Client.Strings.$2={};afung.MangaWeb3.Client.Template.templates=['client'];afung.MangaWeb3.Client.Template.templateIds={client:['div3','div2','div1']};afung.MangaWeb3.Client.Template.$1={};afung.MangaWeb3.Client.Environment.serverType=0;})();// This script was generated using Script# v0.7.4.0
View
2  source/aspnetserver/js/bootstrap.min.js
@@ -3,4 +3,4 @@
* Copyright 2012 Twitter, Inc.
* http://www.apache.org/licenses/LICENSE-2.0.txt
*/
-!function(e){e(function(){"use strict";e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(e.style[n]!==undefined)return t[n]}();return e&&{end:e}}()})}(window.jQuery),!function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed").remove()}var n=e(this),r=n.attr("data-target"),i;r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=e(r),t&&t.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(t=e.Event("close"));if(t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.on(e.support.transition.end,s):s()},e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e(function(){e("body").on("click.alert.data-api",t,n.prototype.close)})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.parent('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")},e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("button"),s=typeof n=="object"&&n;i||r.data("button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e(function(){e("body").on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=n,this.options.slide&&this.slide(this.options.slide),this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},to:function(t){var n=this.$element.find(".item.active"),r=n.parent().children(),i=r.index(n),s=this;if(t>r.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){s.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",e(r[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle()),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this,f=e.Event("slide",{relatedTarget:i[0]});this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u]();if(i.hasClass("active"))return;if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}},e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("carousel"),s=e.extend({},e.fn.carousel.defaults,typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e(function(){e("body").on("click.carousel.data-api","[data-slide]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=!i.data("modal")&&e.extend({},i.data(),n.data());i.carousel(s),t.preventDefault()})})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning)return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning)return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=typeof n=="object"&&n;i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e(function(){e("body").on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse(s)})})}(window.jQuery),!function(e){"use strict";function r(){i(e(t)).removeClass("open")}function i(t){var n=t.attr("data-target"),r;return n||(n=t.attr("href"),n=n&&n.replace(/.*(?=#[^\s]*$)/,"")),r=e(n),r.length||(r=t.parent()),r}var t="[data-toggle=dropdown]",n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),s,o;if(n.is(".disabled, :disabled"))return;return s=i(n),o=s.hasClass("open"),r(),o||(s.toggleClass("open"),n.focus()),!1},keydown:function(t){var n,r,s,o,u,a;if(!/(38|40|27)/.test(t.keyCode))return;n=e(this),t.preventDefault(),t.stopPropagation();if(n.is(".disabled, :disabled"))return;o=i(n),u=o.hasClass("open");if(!u||u&&t.keyCode==27)return n.click();r=e("[role=menu] li:not(.divider) a",o);if(!r.length)return;a=r.index(r.filter(":focus")),t.keyCode==38&&a>0&&a--,t.keyCode==40&&a<r.length-1&&a++,~a||(a=0),r.eq(a).focus()}},e.fn.dropdown=function(t){return this.each(function(){var r=e(this),i=r.data("dropdown");i||r.data("dropdown",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.dropdown.Constructor=n,e(function(){e("html").on("click.dropdown.data-api touchstart.dropdown.data-api",r),e("body").on("click.dropdown touchstart.dropdown.data-api",".dropdown",function(e){e.stopPropagation()}).on("click.dropdown.data-api touchstart.dropdown.data-api",t,n.prototype.toggle).on("keydown.dropdown.data-api touchstart.dropdown.data-api",t+", [role=menu]",n.prototype.keydown)})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=n,this.$element=e(t).delegate('[data-dismiss="modal"]',"click.dismiss.modal",e.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};t.prototype={constructor:t,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var t=this,n=e.Event("show");this.$element.trigger(n);if(this.isShown||n.isDefaultPrevented())return;e("body").addClass("modal-open"),this.isShown=!0,this.escape(),this.backdrop(function(){var n=e.support.transition&&t.$element.hasClass("fade");t.$element.parent().length||t.$element.appendTo(document.body),t.$element.show(),n&&t.$element[0].offsetWidth,t.$element.addClass("in").attr("aria-hidden",!1).focus(),t.enforceFocus(),n?t.$element.one(e.support.transition.end,function(){t.$element.trigger("shown")}):t.$element.trigger("shown")})},hide:function(t){t&&t.preventDefault();var n=this;t=e.Event("hide"),this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return;this.isShown=!1,e("body").removeClass("modal-open"),this.escape(),e(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),e.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal()},enforceFocus:function(){var t=this;e(document).on("focusin.modal",function(e){t.$element[0]!==e.target&&!t.$element.has(e.target).length&&t.$element.focus()})},escape:function(){var e=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(t){t.which==27&&e.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var t=this,n=setTimeout(function(){t.$element.off(e.support.transition.end),t.hideModal()},500);this.$element.one(e.support.transition.end,function(){clearTimeout(n),t.hideModal()})},hideModal:function(e){this.$element.hide().trigger("hidden"),this.backdrop()},removeBackdrop:function(){this.$backdrop.remove(),this.$backdrop=null},backdrop:function(t){var n=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&r;this.$backdrop=e('<div class="modal-backdrop '+r+'" />').appendTo(document.body),this.options.backdrop!="static"&&this.$backdrop.click(e.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),i?this.$backdrop.one(e.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,e.proxy(this.removeBackdrop,this)):this.removeBackdrop()):t&&t()}},e.fn.modal=function(n){return this.each(function(){var r=e(this),i=r.data("modal"),s=e.extend({},e.fn.modal.defaults,r.data(),typeof n=="object"&&n);i||r.data("modal",i=new t(this,s)),typeof n=="string"?i[n]():s.show&&i.show()})},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e.fn.modal.Constructor=t,e(function(){e("body").on("click.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s).one("hide",function(){n.focus()})})})}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,n,r){var i,s;this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.enabled=!0,this.options.trigger=="click"?this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this)):this.options.trigger!="manual"&&(i=this.options.trigger=="hover"?"mouseenter":"focus",s=this.options.trigger=="hover"?"mouseleave":"blur",this.$element.on(i+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.leave,this))),this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=e.extend({},e.fn[this.type].defaults,t,this.$element.data()),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);if(!n.options.delay||!n.options.delay.show)return n.show();clearTimeout(this.timeout),n.hoverState="in",this.timeout=setTimeout(function(){n.hoverState=="in"&&n.show()},n.options.delay.show)},leave:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!n.options.delay||!n.options.delay.hide)return n.hide();n.hoverState="out",this.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},show:function(){var e,t,n,r,i,s,o;if(this.hasContent()&&this.enabled){e=this.tip(),this.setContent(),this.options.animation&&e.addClass("fade"),s=typeof this.options.placement=="function"?this.options.placement.call(this,e[0],this.$element[0]):this.options.placement,t=/in/.test(s),e.remove().css({top:0,left:0,display:"block"}).appendTo(t?this.$element:document.body),n=this.getPosition(t),r=e[0].offsetWidth,i=e[0].offsetHeight;switch(t?s.split(" ")[1]:s){case"bottom":o={top:n.top+n.height,left:n.left+n.width/2-r/2};break;case"top":o={top:n.top-i,left:n.left+n.width/2-r/2};break;case"left":o={top:n.top+n.height/2-i/2,left:n.left-r};break;case"right":o={top:n.top+n.height/2-i/2,left:n.left+n.width}}e.css(o).addClass(s).addClass("in")}},setContent:function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},hide:function(){function r(){var t=setTimeout(function(){n.off(e.support.transition.end).remove()},500);n.one(e.support.transition.end,function(){clearTimeout(t),n.remove()})}var t=this,n=this.tip();return n.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?r():n.remove(),this},fixTitle:function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(t){return e.extend({},t?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},tip:function(){return this.$tip=this.$tip||e(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(){this[this.tip().hasClass("in")?"hide":"show"]()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}},e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("tooltip"),s=typeof n=="object"&&n;i||r.data("tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover",title:"",delay:0,html:!0}}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype,{constructor:t,setContent:function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content > *")[this.options.html?"html":"text"](n),e.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-content")||(typeof n.content=="function"?n.content.call(t[0]):n.content),e},tip:function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}}),e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("popover"),s=typeof n=="object"&&n;i||r.data("popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.defaults=e.extend({},e.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'})}(window.jQuery),!function(e){"use strict";function t(t,n){var r=e.proxy(this.process,this),i=e(t).is("body")?e(window):e(t),s;this.options=e.extend({},e.fn.scrollspy.defaults,n),this.$scrollElement=i.on("scroll.scroll-spy.data-api",r),this.selector=(this.options.target||(s=e(t).attr("href"))&&s.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=e("body"),this.refresh(),this.process()}t.prototype={constructor:t,refresh:function(){var t=this,n;this.offsets=e([]),this.targets=e([]),n=this.$body.find(this.selector).map(function(){var t=e(this),n=t.data("target")||t.attr("href"),r=/^#\w/.test(n)&&e(n);return r&&r.length&&[[r.position().top,n]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},process:function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,n=t-this.$scrollElement.height(),r=this.offsets,i=this.targets,s=this.activeTarget,o;if(e>=n)return s!=(o=i.last()[0])&&this.activate(o);for(o=r.length;o--;)s!=i[o]&&e>=r[o]&&(!r[o+1]||e<=r[o+1])&&this.activate(i[o])},activate:function(t){var n,r;this.activeTarget=t,e(this.selector).parent(".active").removeClass("active"),r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',n=e(r).parent("li").addClass("active"),n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate")}},e.fn.scrollspy=function(n){return this.each(function(){var r=e(this),i=r.data("scrollspy"),s=typeof n=="object"&&n;i||r.data("scrollspy",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.defaults={offset:10},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(window.jQuery),!function(e){"use strict";var t=function(t){this.element=e(t)};t.prototype={constructor:t,show:function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),r=t.attr("data-target"),i,s,o;r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("active"))return;i=n.find(".active a").last()[0],o=e.Event("show",{relatedTarget:i}),t.trigger(o);if(o.isDefaultPrevented())return;s=e(r),this.activate(t.parent("li"),n),this.activate(s,s.parent(),function(){t.trigger({type:"shown",relatedTarget:i})})},activate:function(t,n,r){function o(){i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),s?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),r&&r()}var i=n.find("> .active"),s=r&&e.support.transition&&i.hasClass("fade");s?i.one(e.support.transition.end,o):o(),i.removeClass("in")}},e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("tab");i||r.data("tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e(function(){e("body").on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.typeahead.defaults,n),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.$menu=e(this.options.menu).appendTo("body"),this.source=this.options.source,this.shown=!1,this.listen()};t.prototype={constructor:t,select:function(){var e=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(e)).change(),this.hide()},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.offset(),{height:this.$element[0].offsetHeight});return this.$menu.css({top:t.top+t.height,left:t.left}),this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(t){var n;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(n=e.isFunction(this.source)?this.source(this.query,e.proxy(this.process,this)):this.source,n?this.process(n):this)},process:function(t){var n=this;return t=e.grep(t,function(e){return n.matcher(e)}),t=this.sorter(t),t.length?this.render(t.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(e){return~e.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(e){var t=[],n=[],r=[],i;while(i=e.shift())i.toLowerCase().indexOf(this.query.toLowerCase())?~i.indexOf(this.query)?n.push(i):r.push(i):t.push(i);return t.concat(n,r)},highlighter:function(e){var t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return e.replace(new RegExp("("+t+")","ig"),function(e,t){return"<strong>"+t+"</strong>"})},render:function(t){var n=this;return t=e(t).map(function(t,r){return t=e(n.options.item).attr("data-value",r),t.find("a").html(n.highlighter(r)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(t){var n=this.$menu.find(".active").removeClass("active"),r=n.next();r.length||(r=e(this.$menu.find("li")[0])),r.addClass("active")},prev:function(e){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||(n=this.$menu.find("li").last()),n.addClass("active")},listen:function(){this.$element.on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),(e.browser.webkit||e.browser.msie)&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this))},move:function(e){if(!this.shown)return;switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()},keydown:function(t){this.suppressKeyPressRepeat=!~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){if(this.suppressKeyPressRepeat)return;this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPropagation(),e.preventDefault()},blur:function(e){var t=this;setTimeout(function(){t.hide()},150)},click:function(e){e.stopPropagation(),e.preventDefault(),this.select()},mouseenter:function(t){this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")}},e.fn.typeahead=function(n){return this.each(function(){var r=e(this),i=r.data("typeahead"),s=typeof n=="object"&&n;i||r.data("typeahead",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},e.fn.typeahead.Constructor=t,e(function(){e("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(t){var n=e(this);if(n.data("typeahead"))return;t.preventDefault(),n.typeahead(n.data())})})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=e.extend({},e.fn.affix.defaults,n),this.$window=e(window).on("scroll.affix.data-api",e.proxy(this.checkPosition,this)),this.$element=e(t),this.checkPosition()};t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var t=e(document).height(),n=this.$window.scrollTop(),r=this.$element.offset(),i=this.options.offset,s=i.bottom,o=i.top,u="affix affix-top affix-bottom",a;typeof i!="object"&&(s=o=i),typeof o=="function"&&(o=i.top()),typeof s=="function"&&(s=i.bottom()),a=this.unpin!=null&&n+this.unpin<=r.top?!1:s!=null&&r.top+this.$element.height()>=t-s?"bottom":o!=null&&n<=o?"top":!1;if(this.affixed===a)return;this.affixed=a,this.unpin=a=="bottom"?r.top-n:null,this.$element.removeClass(u).addClass("affix"+(a?"-"+a:""))},e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("affix"),s=typeof n=="object"&&n;i||r.data("affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.defaults={offset:0},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(window.jQuery);
+!function(e){e(function(){"use strict";e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(e.style[n]!==undefined)return t[n]}();return e&&{end:e}}()})}(window.jQuery),!function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed").remove()}var n=e(this),r=n.attr("data-target"),i;r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=e(r),t&&t.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(t=e.Event("close"));if(t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.on(e.support.transition.end,s):s()},e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e(function(){e("body").on("click.alert.data-api",t,n.prototype.close)})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")},e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("button"),s=typeof n=="object"&&n;i||r.data("button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e(function(){e("body").on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=n,this.options.slide&&this.slide(this.options.slide),this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},to:function(t){var n=this.$element.find(".item.active"),r=n.parent().children(),i=r.index(n),s=this;if(t>r.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){s.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",e(r[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle()),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this,f=e.Event("slide",{relatedTarget:i[0]});this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u]();if(i.hasClass("active"))return;if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}},e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("carousel"),s=e.extend({},e.fn.carousel.defaults,typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e(function(){e("body").on("click.carousel.data-api","[data-slide]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=!i.data("modal")&&e.extend({},i.data(),n.data());i.carousel(s),t.preventDefault()})})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning)return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning)return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=typeof n=="object"&&n;i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e(function(){e("body").on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse(s)})})}(window.jQuery),!function(e){"use strict";function r(){i(e(t)).removeClass("open")}function i(t){var n=t.attr("data-target"),r;return n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")),r=e(n),r.length||(r=t.parent()),r}var t="[data-toggle=dropdown]",n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),s,o;if(n.is(".disabled, :disabled"))return;return s=i(n),o=s.hasClass("open"),r(),o||(s.toggleClass("open"),n.focus()),!1},keydown:function(t){var n,r,s,o,u,a;if(!/(38|40|27)/.test(t.keyCode))return;n=e(this),t.preventDefault(),t.stopPropagation();if(n.is(".disabled, :disabled"))return;o=i(n),u=o.hasClass("open");if(!u||u&&t.keyCode==27)return n.click();r=e("[role=menu] li:not(.divider) a",o);if(!r.length)return;a=r.index(r.filter(":focus")),t.keyCode==38&&a>0&&a--,t.keyCode==40&&a<r.length-1&&a++,~a||(a=0),r.eq(a).focus()}},e.fn.dropdown=function(t){return this.each(function(){var r=e(this),i=r.data("dropdown");i||r.data("dropdown",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.dropdown.Constructor=n,e(function(){e("html").on("click.dropdown.data-api touchstart.dropdown.data-api",r),e("body").on("click.dropdown touchstart.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("click.dropdown.data-api touchstart.dropdown.data-api",t,n.prototype.toggle).on("keydown.dropdown.data-api touchstart.dropdown.data-api",t+", [role=menu]",n.prototype.keydown)})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=n,this.$element=e(t).delegate('[data-dismiss="modal"]',"click.dismiss.modal",e.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};t.prototype={constructor:t,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var t=this,n=e.Event("show");this.$element.trigger(n);if(this.isShown||n.isDefaultPrevented())return;e("body").addClass("modal-open"),this.isShown=!0,this.escape(),this.backdrop(function(){var n=e.support.transition&&t.$element.hasClass("fade");t.$element.parent().length||t.$element.appendTo(document.body),t.$element.show(),n&&t.$element[0].offsetWidth,t.$element.addClass("in").attr("aria-hidden",!1).focus(),t.enforceFocus(),n?t.$element.one(e.support.transition.end,function(){t.$element.trigger("shown")}):t.$element.trigger("shown")})},hide:function(t){t&&t.preventDefault();var n=this;t=e.Event("hide"),this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return;this.isShown=!1,e("body").removeClass("modal-open"),this.escape(),e(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),e.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal()},enforceFocus:function(){var t=this;e(document).on("focusin.modal",function(e){t.$element[0]!==e.target&&!t.$element.has(e.target).length&&t.$element.focus()})},escape:function(){var e=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(t){t.which==27&&e.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var t=this,n=setTimeout(function(){t.$element.off(e.support.transition.end),t.hideModal()},500);this.$element.one(e.support.transition.end,function(){clearTimeout(n),t.hideModal()})},hideModal:function(e){this.$element.hide().trigger("hidden"),this.backdrop()},removeBackdrop:function(){this.$backdrop.remove(),this.$backdrop=null},backdrop:function(t){var n=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&r;this.$backdrop=e('<div class="modal-backdrop '+r+'" />').appendTo(document.body),this.options.backdrop!="static"&&this.$backdrop.click(e.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),i?this.$backdrop.one(e.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,e.proxy(this.removeBackdrop,this)):this.removeBackdrop()):t&&t()}},e.fn.modal=function(n){return this.each(function(){var r=e(this),i=r.data("modal"),s=e.extend({},e.fn.modal.defaults,r.data(),typeof n=="object"&&n);i||r.data("modal",i=new t(this,s)),typeof n=="string"?i[n]():s.show&&i.show()})},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e.fn.modal.Constructor=t,e(function(){e("body").on("click.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s).one("hide",function(){n.focus()})})})}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,n,r){var i,s;this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.enabled=!0,this.options.trigger=="click"?this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this)):this.options.trigger!="manual"&&(i=this.options.trigger=="hover"?"mouseenter":"focus",s=this.options.trigger=="hover"?"mouseleave":"blur",this.$element.on(i+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.leave,this))),this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=e.extend({},e.fn[this.type].defaults,t,this.$element.data()),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);if(!n.options.delay||!n.options.delay.show)return n.show();clearTimeout(this.timeout),n.hoverState="in",this.timeout=setTimeout(function(){n.hoverState=="in"&&n.show()},n.options.delay.show)},leave:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!n.options.delay||!n.options.delay.hide)return n.hide();n.hoverState="out",this.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},show:function(){var e,t,n,r,i,s,o;if(this.hasContent()&&this.enabled){e=this.tip(),this.setContent(),this.options.animation&&e.addClass("fade"),s=typeof this.options.placement=="function"?this.options.placement.call(this,e[0],this.$element[0]):this.options.placement,t=/in/.test(s),e.remove().css({top:0,left:0,display:"block"}).appendTo(t?this.$element:document.body),n=this.getPosition(t),r=e[0].offsetWidth,i=e[0].offsetHeight;switch(t?s.split(" ")[1]:s){case"bottom":o={top:n.top+n.height,left:n.left+n.width/2-r/2};break;case"top":o={top:n.top-i,left:n.left+n.width/2-r/2};break;case"left":o={top:n.top+n.height/2-i/2,left:n.left-r};break;case"right":o={top:n.top+n.height/2-i/2,left:n.left+n.width}}e.css(o).addClass(s).addClass("in")}},setContent:function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},hide:function(){function r(){var t=setTimeout(function(){n.off(e.support.transition.end).remove()},500);n.one(e.support.transition.end,function(){clearTimeout(t),n.remove()})}var t=this,n=this.tip();return n.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?r():n.remove(),this},fixTitle:function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(t){return e.extend({},t?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},tip:function(){return this.$tip=this.$tip||e(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(){this[this.tip().hasClass("in")?"hide":"show"]()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}},e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("tooltip"),s=typeof n=="object"&&n;i||r.data("tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover",title:"",delay:0,html:!0}}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype,{constructor:t,setContent:function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content > *")[this.options.html?"html":"text"](n),e.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-content")||(typeof n.content=="function"?n.content.call(t[0]):n.content),e},tip:function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}}),e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("popover"),s=typeof n=="object"&&n;i||r.data("popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.defaults=e.extend({},e.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'})}(window.jQuery),!function(e){"use strict";function t(t,n){var r=e.proxy(this.process,this),i=e(t).is("body")?e(window):e(t),s;this.options=e.extend({},e.fn.scrollspy.defaults,n),this.$scrollElement=i.on("scroll.scroll-spy.data-api",r),this.selector=(this.options.target||(s=e(t).attr("href"))&&s.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=e("body"),this.refresh(),this.process()}t.prototype={constructor:t,refresh:function(){var t=this,n;this.offsets=e([]),this.targets=e([]),n=this.$body.find(this.selector).map(function(){var t=e(this),n=t.data("target")||t.attr("href"),r=/^#\w/.test(n)&&e(n);return r&&r.length&&[[r.position().top,n]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},process:function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,n=t-this.$scrollElement.height(),r=this.offsets,i=this.targets,s=this.activeTarget,o;if(e>=n)return s!=(o=i.last()[0])&&this.activate(o);for(o=r.length;o--;)s!=i[o]&&e>=r[o]&&(!r[o+1]||e<=r[o+1])&&this.activate(i[o])},activate:function(t){var n,r;this.activeTarget=t,e(this.selector).parent(".active").removeClass("active"),r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',n=e(r).parent("li").addClass("active"),n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate")}},e.fn.scrollspy=function(n){return this.each(function(){var r=e(this),i=r.data("scrollspy"),s=typeof n=="object"&&n;i||r.data("scrollspy",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.defaults={offset:10},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(window.jQuery),!function(e){"use strict";var t=function(t){this.element=e(t)};t.prototype={constructor:t,show:function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),r=t.attr("data-target"),i,s,o;r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("active"))return;i=n.find(".active a").last()[0],o=e.Event("show",{relatedTarget:i}),t.trigger(o);if(o.isDefaultPrevented())return;s=e(r),this.activate(t.parent("li"),n),this.activate(s,s.parent(),function(){t.trigger({type:"shown",relatedTarget:i})})},activate:function(t,n,r){function o(){i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),s?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),r&&r()}var i=n.find("> .active"),s=r&&e.support.transition&&i.hasClass("fade");s?i.one(e.support.transition.end,o):o(),i.removeClass("in")}},e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("tab");i||r.data("tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e(function(){e("body").on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.typeahead.defaults,n),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.$menu=e(this.options.menu).appendTo("body"),this.source=this.options.source,this.shown=!1,this.listen()};t.prototype={constructor:t,select:function(){var e=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(e)).change(),this.hide()},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.offset(),{height:this.$element[0].offsetHeight});return this.$menu.css({top:t.top+t.height,left:t.left}),this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(t){var n;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(n=e.isFunction(this.source)?this.source(this.query,e.proxy(this.process,this)):this.source,n?this.process(n):this)},process:function(t){var n=this;return t=e.grep(t,function(e){return n.matcher(e)}),t=this.sorter(t),t.length?this.render(t.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(e){return~e.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(e){var t=[],n=[],r=[],i;while(i=e.shift())i.toLowerCase().indexOf(this.query.toLowerCase())?~i.indexOf(this.query)?n.push(i):r.push(i):t.push(i);return t.concat(n,r)},highlighter:function(e){var t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return e.replace(new RegExp("("+t+")","ig"),function(e,t){return"<strong>"+t+"</strong>"})},render:function(t){var n=this;return t=e(t).map(function(t,r){return t=e(n.options.item).attr("data-value",r),t.find("a").html(n.highlighter(r)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(t){var n=this.$menu.find(".active").removeClass("active"),r=n.next();r.length||(r=e(this.$menu.find("li")[0])),r.addClass("active")},prev:function(e){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||(n=this.$menu.find("li").last()),n.addClass("active")},listen:function(){this.$element.on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),(e.browser.chrome||e.browser.webkit||e.browser.msie)&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this))},move:function(e){if(!this.shown)return;switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()},keydown:function(t){this.suppressKeyPressRepeat=!~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){if(this.suppressKeyPressRepeat)return;this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPropagation(),e.preventDefault()},blur:function(e){var t=this;setTimeout(function(){t.hide()},150)},click:function(e){e.stopPropagation(),e.preventDefault(),this.select()},mouseenter:function(t){this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")}},e.fn.typeahead=function(n){return this.each(function(){var r=e(this),i=r.data("typeahead"),s=typeof n=="object"&&n;i||r.data("typeahead",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},e.fn.typeahead.Constructor=t,e(function(){e("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(t){var n=e(this);if(n.data("typeahead"))return;t.preventDefault(),n.typeahead(n.data())})})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=e.extend({},e.fn.affix.defaults,n),this.$window=e(window).on("scroll.affix.data-api",e.proxy(this.checkPosition,this)),this.$element=e(t),this.checkPosition()};t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var t=e(document).height(),n=this.$window.scrollTop(),r=this.$element.offset(),i=this.options.offset,s=i.bottom,o=i.top,u="affix affix-top affix-bottom",a;typeof i!="object"&&(s=o=i),typeof o=="function"&&(o=i.top()),typeof s=="function"&&(s=i.bottom()),a=this.unpin!=null&&n+this.unpin<=r.top?!1:s!=null&&r.top+this.$element.height()>=t-s?"bottom":o!=null&&n<=o?"top":!1;if(this.affixed===a)return;this.affixed=a,this.unpin=a=="bottom"?r.top-n:null,this.$element.removeClass(u).addClass("affix"+(a?"-"+a:""))},e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("affix"),s=typeof n=="object"&&n;i||r.data("affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.defaults={offset:0},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(window.jQuery);
View
44 source/aspnetserver/lang/en-us.html
@@ -0,0 +1,44 @@
+<!-- This is language file for English (United States) -->
+<p id="MangaWeb">MangaWeb</p>
+<p id="InstallMangaWeb">Install MangaWeb</p>
+<p id="PreinstallCheck">Please wait while MangaWeb is checking if it is already installed.</p>
+<p id="MySQL">MySQL</p>
+<p id="Error">Error</p>
+<p id="MySQLError">Looks like you don't have MySQL extension installed on your server. Please check and open this install page again.</p>
+<p id="MySQLConnectError">Cannot connect to MySQL server using your setting. Please try again.</p>
+<p id="GDError">Looks like you don't have GD extension installed on your server. Please check and open this install page again.</p>
+<p id="LoadSevenZipError">Cannot load 7z.dll using your setting. Please try again.</p>
+<p id="ZipExtensionError">Looks like you don't have Zip extension installed on your server. It is required to enable zip files.</p>
+<p id="RarExtensionError">Looks like you don't have RAR extension installed on your server. It is required to enable RAR files.</p>
+<p id="LoadPdfInfoError">Cannot load pdfinfo.exe using your setting. Please try again.</p>
+<p id="PdfInfoError">Looks like you don't have pdfinfo installed on your server. It is required to enable PDF files.</p>
+<p id="LoadMuDrawError">Cannot load mudraw.exe using your setting. Please try again.</p>
+<p id="PdfDrawError">Looks like you don't have pdfdraw installed on your server. It is required to enable PDF files.</p>
+<p id="Server">Server</p>
+<p id="Port">Port</p>
+<p id="UserName">User name</p>
+<p id="Password">Password</p>
+<p id="ConfirmPassword">Confirm Password</p>
+<p id="Database">Database</p>
+<p id="SevenZipDll">7z.dll</p>
+<p id="EnableZip">Enable Zip</p>
+<p id="EnableRar">Enable RAR</p>
+<p id="PdfInfoExe">pdfinfo.exe</p>
+<p id="MuDrawExe">mudraw.exe</p>
+<p id="EnablePdf">Enable PDF</p>
+<p id="Administrator">Administrator</p>
+<p id="CheckSetting">Check Setting</p>
+<p id="InstallCreateAdministrator">MangaWeb will create an Administrator during installation. You can add more users after the installation.</p>
+<p id="AlphabetsDigitsOnly">Alphabets and digits only</p>
+<p id="AtLeastEightCharacters">At least 8 characters</p>
+<p id="EnterPasswordAgain">Enter password again</p>
+<p id="Submit">Submit</p>
+<p id=""></p>
+<p id=""></p>
+<p id=""></p>
+<p id=""></p>
+<p id=""></p>
+<p id=""></p>
+<p id=""></p>
+<p id=""></p>
+<p id=""></p>
View
2  source/aspnetserver/lang/zh-hk.html
@@ -0,0 +1,2 @@
+<!-- This is language file for Chinese (Hong Kong) -->
+<p id="MangaWeb">MangaWeb</p>
View
0  source/aspnetserver/template/client.html
No changes.
View
1  source/aspnetserverinstall/InstallAjax.aspx
@@ -0,0 +1 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InstallAjax.aspx.cs" Inherits="afung.MangaWeb3.Server.Install.InstallAjax" %>
View
17 source/aspnetserverinstall/InstallAjax.aspx.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace afung.MangaWeb3.Server.Install
+{
+ public partial class InstallAjax : System.Web.UI.Page
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+
+ }
+ }
+}
View
15 source/aspnetserverinstall/InstallAjax.aspx.designer.cs
@@ -0,0 +1,15 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace afung.MangaWeb3.Server.Install {
+
+
+ public partial class InstallAjax {
+ }
+}
View
8 source/aspnetserverinstall/afung.MangaWeb3.Server.Install.csproj
@@ -50,6 +50,7 @@
<Reference Include="System.EnterpriseServices" />
</ItemGroup>
<ItemGroup>
+ <Content Include="InstallAjax.aspx" />
<Content Include="Web.config" />
<Content Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon>
@@ -59,6 +60,13 @@
</Content>
</ItemGroup>
<ItemGroup>
+ <Compile Include="InstallAjax.aspx.cs">
+ <DependentUpon>InstallAjax.aspx</DependentUpon>
+ <SubType>ASPXCodeBehind</SubType>
+ </Compile>
+ <Compile Include="InstallAjax.aspx.designer.cs">
+ <DependentUpon>InstallAjax.aspx</DependentUpon>
+ </Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
View
2  source/haxe/afung/mangaWeb3/server/ServerAjax.hx
@@ -1,7 +1,7 @@
package afung.mangaWeb3.server;
-import php.Lib;
import afung.mangaWeb3.server.install.InstallAjax;
+import php.Lib;
/**
* ...
View
26 source/less/mangaweb.less
@@ -1,2 +1,24 @@
-body {
-}
+body {
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif, "Meiryo UI", "MS UI Gothic", "MS PGothic", "MS Pゴシック", "MS Gothic", "MS ゴシック","Microsoft JHengHei UI", "Microsoft JHengHei", "微軟正黑體", MingLiU, "細明體";
+}
+
+code,
+pre {
+ font-family: Monaco, Menlo, Consolas, "Courier New", monospace, "Meiryo UI", "MS UI Gothic", "MS PGothic", "MS Pゴシック", "MS Gothic", "MS ゴシック","Microsoft JHengHei UI", "Microsoft JHengHei", "微軟正黑體", MingLiU, "細明體";
+}
+
+input,
+button,
+select,
+textarea {
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif, "Meiryo UI", "MS UI Gothic", "MS PGothic", "MS Pゴシック", "MS Gothic", "MS ゴシック","Microsoft JHengHei UI", "Microsoft JHengHei", "微軟正黑體", MingLiU, "細明體";
+}
+
+.navbar-search .search-query {
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif, "Meiryo UI", "MS UI Gothic", "MS PGothic", "MS Pゴシック", "MS Gothic", "MS ゴシック","Microsoft JHengHei UI", "Microsoft JHengHei", "微軟正黑體", MingLiU, "細明體";
+}
+
+.temp {
+ display: none;
+}
+
View
96 source/scriptsharp/Application.cs
@@ -0,0 +1,96 @@
+using System;
+using System.Collections.Generic;
+using jQueryApi;
+
+namespace afung.MangaWeb3.Client
+{
+ /// <summary>
+ /// Class Application
+ /// </summary>
+ public class Application
+ {
+ /// <summary>
+ /// The HTML for showing fatal error message
+ /// </summary>
+ private const string FatalErrorMessageHtml = "<div class=\"container\"><div class=\"row\"><div class=\"span12\"><div class=\"alert alert-error\"><h4>Fatal Error</h4><span class=\"fatalerrormsg\"></span></div></div></div></div>";
+
+ /// <summary>
+ /// The class for showing fatal error message inside the above HTML
+ /// </summary>
+ private const string FatalErrorMessageClass = ".fatalerrormsg";
+
+ /// <summary>
+ /// Start the application
+ /// </summary>
+ public Application()
+ {
+ // Load default language first
+ Action<Exception> defaultLanguageLoadFailed = delegate(Exception error)
+ {
+ ShowFatalError(String.Format("Unabled to load default language file ({0}). Please check that you have the correct file on your server", error));
+ };
+
+ Action defaultLanguageLoadFinished = delegate()
+ {
+ // Then load user language
+ Action<Exception> userLanguageLoadFailed = delegate(Exception error)
+ {
+ // TODO: Set default language as current/user language
+ StartStage2();
+ };
+
+ Action userLanguageLoadFinished = delegate()
+ {
+ StartStage2();
+ };
+
+ try
+ {
+ Strings.LoadUserLanguage(userLanguageLoadFinished, userLanguageLoadFailed);
+ }
+ catch (Exception error)
+ {
+ userLanguageLoadFailed(error);
+ }
+ };
+
+ try
+ {
+ Strings.LoadDefaultLanguage(defaultLanguageLoadFinished, defaultLanguageLoadFailed);
+ }
+ catch (Exception error)
+ {
+ defaultLanguageLoadFailed(error);
+ }
+ }
+
+ /// <summary>
+ /// Stage 2 of booting up the application
+ /// </summary>
+ protected virtual void StartStage2()
+ {
+ // Load default language first
+ Action<Exception> templateLoadFailed = delegate(Exception error)
+ {
+ ShowFatalError(String.Format("Unabled to load template file ({0}). Please check that you have the correct file on your server", error));
+ };
+
+ Action templateLoadFinished = delegate()
+ {
+ };
+
+ Template.LoadTemplateFile(templateLoadFinished, templateLoadFailed);
+ }
+
+ /// <summary>
+ /// Show fatal error
+ /// </summary>
+ /// <param name="message">the message to be shown</param>
+ public static void ShowFatalError(string message)
+ {
+ jQueryObject errorMessageObject = jQuery.FromHtml(FatalErrorMessageHtml);
+ jQuery.Select(HtmlConstants.TagBody).Prepend(errorMessageObject);
+ jQuery.Select(FatalErrorMessageClass, errorMessageObject).Text(message);
+ }
+ }
+}
View
17 source/scriptsharp/Environment.cs
@@ -2,14 +2,31 @@
namespace afung.MangaWeb3.Client
{
+ /// <summary>
+ /// Contain environment variables
+ /// </summary>
public class Environment
{
+ /// <summary>
+ /// The server type.
+ /// Should be set from servertype.js
+ /// </summary>
public static ServerType ServerType;
}
+ /// <summary>
+ /// Server Type enum
+ /// </summary>
public enum ServerType
{
+ /// <summary>
+ /// The server is running ASP.NET
+ /// </summary>
AspNet = 0,
+
+ /// <summary>
+ /// The server is running PHP
+ /// </summary>
Php = 1
}
}
View
39 source/scriptsharp/HtmlConstants.cs
@@ -0,0 +1,39 @@
+// HtmlConstants.cs
+//
+
+using System;
+using System.Collections.Generic;
+
+namespace afung.MangaWeb3.Client
+{
+ /// <summary>
+ /// Class for constants related to HTML
+ /// </summary>
+ public class HtmlConstants
+ {
+ /// <summary>
+ /// The ID attribute
+ /// </summary>
+ public const string AttributeId = "id";
+
+ /// <summary>
+ /// The class temp
+ /// </summary>
+ public const string ClassTemp = "temp";
+
+ /// <summary>
+ /// Tag Body
+ /// </summary>
+ public const string TagBody = "body";
+
+ /// <summary>
+ /// Tag Div
+ /// </summary>
+ public const string TagDiv = "div";
+
+ /// <summary>
+ /// Tag Paragraph
+ /// </summary>
+ public const string TagParagraph = "p";
+ }
+}
View
129 source/scriptsharp/Strings.cs
@@ -0,0 +1,129 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Html;
+using jQueryApi;
+
+namespace afung.MangaWeb3.Client
+{
+ /// <summary>
+ /// The Strings class which contains logic related to strings including language
+ /// </summary>
+ public class Strings
+ {
+ /// <summary>
+ /// The default language is English (United States)
+ /// </summary>
+ public const string DefaultLanguage = "en-us";
+
+ /// <summary>
+ /// List of supported languages
+ /// </summary>
+ public static readonly Dictionary<string, string> Languages = new Dictionary<string, string>(
+ "en-us", "English (United States)",
+ "zh-hk", "Chinese (Hong Kong)");
+
+ /// <summary>
+ /// Format of language file path
+ /// </summary>
+ private const string LanguageFilePathFormat = "lang/{0}.html";
+
+ /// <summary>
+ /// Current Language
+ /// </summary>
+ private static string CurrentLanguage = DefaultLanguage;
+
+ /// <summary>
+ /// Dictionary to store loaded language data
+ /// </summary>
+ private static Dictionary<string, Dictionary<string, string>> loadedLanguageData = new Dictionary<string, Dictionary<string, string>>();
+
+ /// <summary>
+ /// Load default language
+ /// </summary>
+ /// <param name="successCallback">Success Callback</param>
+ /// <param name="failureCallback">Failure Callback</param>
+ public static void LoadDefaultLanguage(Action successCallback, Action<Exception> failureCallback)
+ {
+ LoadLanguageFile(DefaultLanguage, successCallback, failureCallback);
+ }
+
+ /// <summary>
+ /// Load user language
+ /// </summary>
+ /// <param name="successCallback">Success Callback</param>
+ /// <param name="failureCallback">Failure Callback</param>
+ public static void LoadUserLanguage(Action successCallback, Action<Exception> failureCallback)
+ {
+ // TODO: add option to change user language
+ LoadLanguageFile(DefaultLanguage, successCallback, failureCallback);
+ }
+
+ /// <summary>
+ /// Load a language file
+ /// </summary>
+ /// <param name="language">The language to be loaded</param>
+ /// <param name="successCallback">Success Callback</param>
+ /// <param name="failureCallback">Failure Callback</param>
+ public static void LoadLanguageFile(string language, Action successCallback, Action<Exception> failureCallback)
+ {
+ if (loadedLanguageData.ContainsKey(language))
+ {
+ successCallback();
+ return;
+ }
+
+ AjaxErrorCallback onError = delegate(jQueryXmlHttpRequest request, string textStatus, Exception error)
+ {
+ failureCallback(error);
+ };
+
+ AjaxRequestCallback onFinish = delegate(object data, string textStatus, jQueryXmlHttpRequest request)
+ {
+ loadedLanguageData[language] = new Dictionary<string, string>();
+
+ jQuery.FromHtml((string)data).Each(delegate(int index, Element element)
+ {
+ jQueryObject currentObject = jQuery.FromElement(element);
+ if (String.Compare(element.TagName, HtmlConstants.TagParagraph, true) == 0)
+ {
+ string stringId = currentObject.GetAttribute(HtmlConstants.AttributeId);
+ if (!String.IsNullOrEmpty(stringId))
+ {
+ loadedLanguageData[language][stringId] = currentObject.GetHtml();
+ }
+ }
+ });
+
+ successCallback();
+ };
+
+ jQueryAjaxOptions options = new jQueryAjaxOptions();
+ options.Type = "GET";
+ options.DataType = "html";
+ options.Error = onError;
+ options.Success = onFinish;
+
+ jQuery.Ajax(String.Format(LanguageFilePathFormat, language), options);
+ }
+
+ /// <summary>
+ /// Get the string from string ID
+ /// </summary>
+ /// <param name="stringId">String ID</param>
+ /// <returns>The string to display</returns>
+ public static string Get(string stringId)
+ {
+ if (CurrentLanguage != DefaultLanguage && loadedLanguageData.ContainsKey(CurrentLanguage) && loadedLanguageData[CurrentLanguage].ContainsKey(stringId))
+ {
+ return loadedLanguageData[CurrentLanguage][stringId];
+ }
+ else if (loadedLanguageData.ContainsKey(DefaultLanguage) && loadedLanguageData[DefaultLanguage].ContainsKey(stringId))
+ {
+ return loadedLanguageData[DefaultLanguage][stringId];
+ }
+
+ return "String Not Defined";
+ }
+ }
+}
View
94 source/scriptsharp/Template.cs
@@ -0,0 +1,94 @@
+// Template.cs
+//
+
+using System;
+using System.Collections.Generic;
+using jQueryApi;
+using System.Html;
+
+namespace afung.MangaWeb3.Client
+{
+ /// <summary>
+ /// Template class. Manage all template loading and parsing
+ /// </summary>
+ public class Template
+ {
+ /// <summary>
+ /// Format of template file path
+ /// </summary>
+ private const string TemplateFilePathFormat = "template/{0}.html";
+
+ /// <summary>
+ /// The template files to load
+ /// </summary>
+ public static string[] Templates = { "client" };
+
+ /// <summary>
+ /// The IDs in template files to parse
+ /// The order of the IDs matters!
+ /// </summary>
+ public static Dictionary<string, string[]> TemplateIds =
+ new Dictionary<string, string[]>(
+ "client",
+ new string[] {
+ });
+
+ /// <summary>
+ /// The loaded template data
+ /// </summary>
+ private static Dictionary<string, Dictionary<string, jQueryObject>> loadedTemplateData = new Dictionary<string, Dictionary<string, jQueryObject>>();
+
+ public static void LoadTemplateFile(Action successCallback, Action<Exception> failureCallback)
+ {
+ int templateIndex = 0;
+ string currentTemplateFile = string.Empty;
+ jQueryObject tempDiv = jQuery.FromElement(Document.CreateElement(HtmlConstants.TagDiv)).AppendTo(jQuery.Select(HtmlConstants.TagBody)).AddClass(HtmlConstants.ClassTemp);
+ Action loadNextTemplate = delegate { };
+
+ AjaxErrorCallback onError = delegate(jQueryXmlHttpRequest request, string textStatus, Exception error)
+ {
+ failureCallback(error);
+ };
+
+ AjaxRequestCallback onFinish = delegate(object data, string textStatus, jQueryXmlHttpRequest request)
+ {
+ jQueryObject templateDiv = jQuery.FromElement(Document.CreateElement(HtmlConstants.TagDiv)).AppendTo(tempDiv).Append(jQuery.FromHtml((string)data));
+
+ loadedTemplateData[currentTemplateFile] = new Dictionary<string, jQueryObject>();
+ foreach (string templateId in TemplateIds[currentTemplateFile])
+ {
+ jQueryObject selectedTemplate = jQuery.Select("#" + templateId, templateDiv);
+ loadedTemplateData[currentTemplateFile][templateId] = selectedTemplate.Clone();
+ selectedTemplate.Remove();
+ }
+
+ templateDiv.Remove();
+
+ templateIndex++;
+ loadNextTemplate();
+ };
+
+ loadNextTemplate = delegate
+ {
+ if (templateIndex >= Templates.Length)
+ {
+ tempDiv.Remove();
+ successCallback();
+ return;
+ }
+
+ currentTemplateFile = Templates[templateIndex];
+
+ jQueryAjaxOptions options = new jQueryAjaxOptions();
+ options.Type = "GET";
+ options.DataType = "html";
+ options.Error = onError;
+ options.Success = onFinish;
+
+ jQuery.Ajax(String.Format(TemplateFilePathFormat, currentTemplateFile), options);
+ };
+
+ loadNextTemplate();
+ }
+ }
+}
View
11 source/scriptsharp/afung.MangaWeb3.Client.csproj
@@ -41,9 +41,17 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="mscorlib, Version=0.7.0.0, Culture=neutral, PublicKeyToken=8fc0e3af5abcb6c4, processorArchitecture=MSIL" />
+ <Reference Include="Script.jQuery, Version=0.7.0.0, Culture=neutral, PublicKeyToken=8fc0e3af5abcb6c4, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\..\Program Files (x86)\ScriptSharp\v1.0\Framework\Script.jQuery.dll</HintPath>
+ </Reference>
<Reference Include="Script.Web" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="Application.cs" />
+ <Compile Include="HtmlConstants.cs" />
+ <Compile Include="Strings.cs" />
+ <Compile Include="Template.cs" />
<Content Include="Properties\afung.MangaWeb3.Client.ruleset" />
<Content Include="Properties\afung.MangaWeb3.Client.script" />
<Compile Include="Environment.cs" />
@@ -55,5 +63,8 @@
<Name>afung.MangaWeb3.Common%28script%29</Name>
</ProjectReference>
</ItemGroup>
+ <ItemGroup>
+ <Folder Include="Import\" />
+ </ItemGroup>
<Import Project="$(ProgramFiles)\ScriptSharp\v1.0\ScriptSharp.targets" />
</Project>
View
33 source/scriptsharpinstall/InstallApp.cs
@@ -0,0 +1,33 @@
+// Application.cs
+//
+
+using System;
+using System.Collections.Generic;
+
+namespace afung.MangaWeb3.Client.Install
+{
+ /// <summary>
+ /// Class InstallApp
+ /// </summary>
+ public class InstallApp : Application
+ {
+ protected override void StartStage2()
+ {
+ Template.Templates[Template.Templates.Length] = "install";
+ Template.TemplateIds["install"] = new string[] {
+ "install-mudraw-error",
+ "install-pdfdraw-error",
+ "install-pdfinfo-error",
+ "install-pdfinfoexe-error",
+ "install-rar-error",
+ "install-zip-error",
+ "install-sevenzip-error",
+ "install-gd-error",
+ "install-mysql-connect-error",
+ "install-mysql-error",
+ "install-module"
+ };
+ base.StartStage2();
+ }
+ }
+}
View
1  source/scriptsharpinstall/afung.MangaWeb3.Client.Install.csproj
@@ -46,6 +46,7 @@
<ItemGroup>
<Content Include="Properties\afung.MangaWeb3.Client.Install.ruleset" />
<Content Include="Properties\afung.MangaWeb3.Client.Install.script" />
+ <Compile Include="InstallApp.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
Please sign in to comment.
Something went wrong with that request. Please try again.