Skip to content

Commit 62d54e4

Browse files
committed
Added Knockout.Punches to durandal template.
1 parent b3fa2bd commit 62d54e4

File tree

7 files changed

+597
-2
lines changed

7 files changed

+597
-2
lines changed

Templates/All-In-One-Template/MySpaProject/MySpaProject.WebSpaDurandal/App/Main/main.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ define(['durandal/system', 'durandal/app', 'durandal/viewLocator', 'durandal/vie
1818
function (system, app, viewLocator, viewEngine, activator, ko) {
1919
//system.debug(true); //TODO: remove in production code
2020

21+
ko.punches.enableAll();
22+
2123
//TODO: Move to framework?
2224
viewEngine.convertViewIdToRequirePath = function (viewId) {
2325
return this.viewPlugin + '!/AbpAppView/Load?viewUrl=/App/Main/' + viewId + '.cshtml';

Templates/All-In-One-Template/MySpaProject/MySpaProject.WebSpaDurandal/App/Main/views/layout.cshtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
</ul>
1818
<ul class="nav navbar-nav navbar-right">
1919
<li class="dropdown">
20-
<a href="" data-toggle="dropdown"><i data-bind="css: currentLanguage.icon"></i> <span data-bind="text: currentLanguage.displayName"></span> <b class="caret"></b></a>
20+
<a href="" data-toggle="dropdown"><i class="{{currentLanguage.icon}}"></i> <span>{{currentLanguage.displayName}}</span> <b class="caret"></b></a>
2121
<ul class="dropdown-menu" data-bind="foreach: languages">
22-
<li data-bind="visible: $parent.currentLanguage.name != name"><a data-bind="attr: { href: '/AbpLocalization/ChangeCulture?cultureName=' + name }"><i data-bind="css: icon"></i> <span data-bind="text: displayName"></span></a></li>
22+
<li data-bind="visible: $parent.currentLanguage.name != name"><a href="{{'/AbpLocalization/ChangeCulture?cultureName=' + name}}"><i class="{{icon}}"></i> {{displayName}}</a></li>
2323
</ul>
2424
</li>
2525
</ul>

Templates/All-In-One-Template/MySpaProject/MySpaProject.WebSpaDurandal/App_Start/BundleConfig.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public static void RegisterBundles(BundleCollection bundles)
5151

5252
"~/Scripts/knockout-3.2.0.js",
5353
"~/Scripts/knockout.mapping-latest.js",
54+
"~/Scripts/knockout.punches.min.js",
5455

5556
"~/Abp/Framework/scripts/abp.js",
5657
"~/Abp/Framework/scripts/libs/abp.jquery.js",

Templates/All-In-One-Template/MySpaProject/MySpaProject.WebSpaDurandal/MySpaProject.WebSpaDurandal.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,8 @@
303303
<Content Include="Scripts\jquery.validate.unobtrusive.min.js" />
304304
<Content Include="Scripts\knockout-3.2.0.debug.js" />
305305
<Content Include="Scripts\knockout-3.2.0.js" />
306+
<Content Include="Scripts\knockout.punches.js" />
307+
<Content Include="Scripts\knockout.punches.min.js" />
306308
<Content Include="Scripts\modernizr-2.8.3.js" />
307309
<Content Include="Scripts\others\html5shiv.js" />
308310
<Content Include="Scripts\others\respond.min.js" />

0 commit comments

Comments
 (0)