Permalink
Browse files

TempHire.Breeze: Rebuilt solution with latest HotTowelette package

  • Loading branch information...
1 parent 4a87636 commit 8eb888e7907163ab523b42ed99c58d5163bb61e3 @marcelgood marcelgood committed Feb 28, 2013
Showing with 2,010 additions and 581 deletions.
  1. BIN Samples/TempHire.Breeze/.nuget/NuGet.exe
  2. +1 −3 Samples/TempHire.Breeze/.nuget/NuGet.targets
  3. +10 −10 Samples/TempHire.Breeze/TempHire.Breeze.sln
  4. +8 −20 Samples/TempHire.Breeze/TempHire/App/main.js
  5. 0 Samples/TempHire.Breeze/TempHire/App/{ → services}/logger.js
  6. +3 −3 Samples/TempHire.Breeze/TempHire/App/viewmodels/contacts.js
  7. +17 −17 Samples/TempHire.Breeze/TempHire/App/viewmodels/details.js
  8. +2 −1 Samples/TempHire.Breeze/TempHire/App/viewmodels/home.js
  9. +1 −1 Samples/TempHire.Breeze/TempHire/App/viewmodels/nameeditor.js
  10. +17 −12 Samples/TempHire.Breeze/TempHire/App/viewmodels/resourcemgt.js
  11. +4 −22 Samples/TempHire.Breeze/TempHire/App/viewmodels/shell.js
  12. +1 −1 Samples/TempHire.Breeze/TempHire/App/views/home.html
  13. +1 −1 Samples/TempHire.Breeze/TempHire/App/views/nav.html
  14. +26 −22 Samples/TempHire.Breeze/TempHire/App_Start/BreezeWebApiConfig.cs
  15. +13 −18 Samples/TempHire.Breeze/TempHire/App_Start/BundleConfig.cs
  16. +7 −4 Samples/TempHire.Breeze/TempHire/App_Start/InfrastructureConfig.cs
  17. +1 −1 Samples/TempHire.Breeze/TempHire/Properties/AssemblyInfo.cs
  18. +95 −93 Samples/TempHire.Breeze/TempHire/TempHire.csproj
  19. +10 −16 Samples/TempHire.Breeze/TempHire/Web.config
  20. +178 −69 Samples/TempHire.Breeze/TempHire/content/{styles.css → app.css}
  21. +19 −0 Samples/TempHire.Breeze/TempHire/content/ie10mobile.css
  22. BIN Samples/TempHire.Breeze/TempHire/content/images/icon.png
  23. +1 −1 Samples/TempHire.Breeze/TempHire/content/toastr.css
  24. +22 −5 Samples/TempHire.Breeze/TempHire/index.cshtml
  25. +4 −3 Samples/TempHire.Breeze/TempHire/packages.config
  26. BIN Samples/TempHire.Breeze/TempHire/scripts/_references.js
  27. +0 −4 Samples/TempHire.Breeze/TempHire/scripts/jquery-1.9.0.min.js
  28. +0 −1 Samples/TempHire.Breeze/TempHire/scripts/jquery-1.9.0.min.map
  29. +42 −2 ...es/TempHire.Breeze/TempHire/scripts/{jquery-1.9.0.intellisense.js → jquery-1.9.1.intellisense.js}
  30. +229 −187 Samples/TempHire.Breeze/TempHire/scripts/{jquery-1.9.0.js → jquery-1.9.1.js}
  31. +5 −0 Samples/TempHire.Breeze/TempHire/scripts/jquery-1.9.1.min.js
  32. +1 −0 Samples/TempHire.Breeze/TempHire/scripts/jquery-1.9.1.min.map
  33. +1,213 −0 Samples/TempHire.Breeze/TempHire/scripts/moment.js
  34. +6 −0 Samples/TempHire.Breeze/TempHire/scripts/moment.min.js
  35. +72 −62 Samples/TempHire.Breeze/TempHire/scripts/toastr.js
  36. +1 −2 Samples/TempHire.Breeze/TempHire/scripts/toastr.min.js
Binary file not shown.
@@ -29,14 +29,12 @@
<!-- Windows specific commands -->
<NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath>
<PackagesConfig>$([System.IO.Path]::Combine($(ProjectDir), "packages.config"))</PackagesConfig>
- <PackagesDir>$([System.IO.Path]::Combine($(SolutionDir), "packages"))</PackagesDir>
</PropertyGroup>
<PropertyGroup Condition=" '$(OS)' != 'Windows_NT'">
<!-- We need to launch nuget.exe with the mono command if we're not on windows -->
<NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>
<PackagesConfig>packages.config</PackagesConfig>
- <PackagesDir>$(SolutionDir)packages</PackagesDir>
</PropertyGroup>
<PropertyGroup>
@@ -51,7 +49,7 @@
<RequireConsentSwitch Condition=" $(RequireRestoreConsent) == 'true' ">-RequireConsent</RequireConsentSwitch>
<!-- Commands -->
- <RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(RequireConsentSwitch) -o "$(PackagesDir)"</RestoreCommand>
+ <RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(RequireConsentSwitch) -solutionDir "$(SolutionDir) "</RestoreCommand>
<BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -p Configuration=$(Configuration) -o "$(PackageOutputDir)" -symbols</BuildCommand>
<!-- We need to ensure packages are restored prior to assembly resolve -->
@@ -1,9 +1,9 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TempHire", "TempHire\TempHire.csproj", "{E82547C1-5104-49C7-8D6E-F32A4D82F2CB}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TempHire", "TempHire\TempHire.csproj", "{9D6F789C-9AE3-436D-BA94-9FF606FA3EEB}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{19FC1071-BF7D-41DE-A4E1-E1A8EE9BBABE}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{DEF2911A-5BC1-4629-9ACC-7EE0672ADF64}"
ProjectSection(SolutionItems) = preProject
.nuget\NuGet.Config = .nuget\NuGet.Config
.nuget\NuGet.exe = .nuget\NuGet.exe
@@ -20,14 +20,14 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {E82547C1-5104-49C7-8D6E-F32A4D82F2CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {E82547C1-5104-49C7-8D6E-F32A4D82F2CB}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {E82547C1-5104-49C7-8D6E-F32A4D82F2CB}.Demo|Any CPU.ActiveCfg = Debug|Any CPU
- {E82547C1-5104-49C7-8D6E-F32A4D82F2CB}.Demo|Any CPU.Build.0 = Debug|Any CPU
- {E82547C1-5104-49C7-8D6E-F32A4D82F2CB}.Fakestore|Any CPU.ActiveCfg = Release|Any CPU
- {E82547C1-5104-49C7-8D6E-F32A4D82F2CB}.Fakestore|Any CPU.Build.0 = Release|Any CPU
- {E82547C1-5104-49C7-8D6E-F32A4D82F2CB}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {E82547C1-5104-49C7-8D6E-F32A4D82F2CB}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9D6F789C-9AE3-436D-BA94-9FF606FA3EEB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9D6F789C-9AE3-436D-BA94-9FF606FA3EEB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9D6F789C-9AE3-436D-BA94-9FF606FA3EEB}.Demo|Any CPU.ActiveCfg = Debug|Any CPU
+ {9D6F789C-9AE3-436D-BA94-9FF606FA3EEB}.Demo|Any CPU.Build.0 = Debug|Any CPU
+ {9D6F789C-9AE3-436D-BA94-9FF606FA3EEB}.Fakestore|Any CPU.ActiveCfg = Release|Any CPU
+ {9D6F789C-9AE3-436D-BA94-9FF606FA3EEB}.Fakestore|Any CPU.Build.0 = Release|Any CPU
+ {9D6F789C-9AE3-436D-BA94-9FF606FA3EEB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9D6F789C-9AE3-436D-BA94-9FF606FA3EEB}.Release|Any CPU.Build.0 = Release|Any CPU
{58F6DA15-8C8C-4FC0-A277-A6FFCDEDBF24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{58F6DA15-8C8C-4FC0-A277-A6FFCDEDBF24}.Debug|Any CPU.Build.0 = Debug|Any CPU
{58F6DA15-8C8C-4FC0-A277-A6FFCDEDBF24}.Demo|Any CPU.ActiveCfg = Demo|Any CPU
@@ -2,28 +2,16 @@
paths: { "text": "durandal/amd/text" }
});
-define(function (require) {
- var app = require('durandal/app'),
- viewLocator = require('durandal/viewLocator'),
- system = require('durandal/system'),
- router = require('durandal/plugins/router'),
- logger = require('logger');
+define(['durandal/app', 'durandal/viewLocator', 'durandal/system', 'durandal/plugins/router', 'services/logger'],
+ function (app, viewLocator, system, router, logger) {
// Enable debug message to show in the console
system.debug(true);
app.start().then(function () {
toastr.options.positionClass = 'toast-bottom-right';
toastr.options.backgroundpositionClass = 'toast-bottom-right';
- customizeConventions();
- // Adapt to touch devices
- app.adaptToDevice();
- //Show the app by setting the root view model for our application.
-
- app.setRoot('viewmodels/shell', 'entrance');
- });
- function customizeConventions() {
router.handleInvalidRoute = function (route, params) {
logger.logError('No Route Found', route, 'main', true);
};
@@ -32,10 +20,10 @@ define(function (require) {
// with view to find it partner view.
router.useConvention();
viewLocator.useConvention();
-
- // Specify a view to always be in the views folder
- viewLocator.convertViewUrlToAreaUrl = function (area, viewUrl) {
- return 'views/' + viewUrl;
- };
- }
+
+ // Adapt to touch devices
+ app.adaptToDevice();
+ //Show the app by setting the root view model for our application.
+ app.setRoot('viewmodels/shell', 'entrance');
+ });
});
@@ -1,4 +1,4 @@
-define(['services/unitofwork', 'logger', 'durandal/system', 'viewmodels/dialog', 'viewmodels/optionselector'],
+define(['services/unitofwork', 'services/logger', 'durandal/system', 'viewmodels/dialog', 'viewmodels/optionselector'],
function(unitofwork, logger, system, dialog, optionselector) {
var Contacts = (function () {
@@ -73,9 +73,9 @@
.then(this.staffingResource);
// Load states
- var vm = this;
+ var self = this;
var states = this.unitOfWork.states.all()
- .then(vm.states);
+ .then(self.states);
// Load addresses
var predicate = breeze.Predicate.create("staffingResourceId", "==", this.staffingResourceId);
@@ -1,4 +1,4 @@
-define(['services/unitofwork', 'logger', 'durandal/system', 'durandal/viewModel', 'viewmodels/contacts', 'durandal/app', 'viewmodels/nameeditor', 'viewmodels/dialog'],
+define(['services/unitofwork', 'services/logger', 'durandal/system', 'durandal/viewModel', 'viewmodels/contacts', 'durandal/app', 'viewmodels/nameeditor', 'viewmodels/dialog'],
function(unitofwork, logger, system, viewModel, contacts, app, nameeditor, dialog) {
var Details = (function() {
@@ -24,20 +24,20 @@
this.canSave(this.unitOfWork.hasChanges());
}, this);
- var vm = this;
+ var self = this;
return Q.when(this.contacts.activate())
.then(function() {
- if (vm.initialized()) {
+ if (self.initialized()) {
return true;
}
- return vm.unitOfWork.staffingResources.withId(vm.staffingResourceId)
+ return self.unitOfWork.staffingResources.withId(self.staffingResourceId)
.then(function(data) {
- vm.staffingResource(data);
- vm.log("StaffingResource loaded", true);
- return Q.when(vm.contacts.activateItem(contacts.create(vm.staffingResourceId)))
+ self.staffingResource(data);
+ self.log("StaffingResource loaded", true);
+ return Q.when(self.contacts.activateItem(contacts.create(self.staffingResourceId)))
.then(function() {
- vm.initialized(true);
+ self.initialized(true);
return true;
});
});
@@ -46,17 +46,17 @@
};
ctor.prototype.canDeactivate = function (close) {
- var vm = this;
+ var self = this;
if (this.unitOfWork.hasChanges() && close) {
return Q.when(app.showMessage("You have pending changes. Would you like to save them?", "Confirm", ['Yes', 'No', 'Cancel']))
.then(function(response) {
if (response === 'Yes') {
- return vm.unitOfWork.commit()
+ return self.unitOfWork.commit()
.then(function() { return true; })
- .fail(vm.handleError);
+ .fail(self.handleError);
}
else if (response === 'No') {
- vm.unitOfWork.rollback();
+ self.unitOfWork.rollback();
return true;
}
return false;
@@ -86,14 +86,14 @@
};
ctor.prototype.editName = function () {
- var self = this;
- var editor = nameeditor.create(self.id());
+ var staffingResource = this;
+ var editor = nameeditor.create(staffingResource.id());
dialog.show(editor, ['Ok', 'Cancel'])
.then(function(response) {
if (response === 'Ok') {
- self.firstName(editor.firstName());
- self.middleName(editor.middleName());
- self.lastName(editor.lastName());
+ staffingResource.firstName(editor.firstName());
+ staffingResource.middleName(editor.middleName());
+ staffingResource.lastName(editor.lastName());
}
})
.done();
@@ -1,4 +1,4 @@
-define(function () {
+define(['services/logger'], function (logger) {
var vm = {
activate: activate,
title: 'Home View'
@@ -8,6 +8,7 @@
//#region Internal Methods
function activate() {
+ logger.log('Home View Activated', null, 'home', true);
return true;
}
//#endregion
@@ -1,4 +1,4 @@
-define(['durandal/system', 'services/unitofwork', 'logger'],
+define(['durandal/system', 'services/unitofwork', 'services/logger'],
function(system, unitofwork, logger) {
var NameEditor = (function() {
@@ -1,10 +1,10 @@
-define(['services/unitofwork', 'logger', 'durandal/system', 'durandal/viewModel', 'viewmodels/details', 'durandal/plugins/router', 'durandal/app'],
+define(['services/unitofwork', 'services/logger', 'durandal/system', 'durandal/viewModel', 'viewmodels/details', 'durandal/plugins/router', 'durandal/app'],
function (unitofwork, logger, system, viewModel, details, router, app) {
return (function () {
var ctor = function () {
- var vm = this;
+ var self = this;
var uow = unitofwork.create();
this.title = "Resource Management";
@@ -20,58 +20,63 @@
loadList().fail(handleError);
}, this);
- return Q.when(vm.activeDetail.activate())
+ return Q.when(self.activeDetail.activate())
.then(function() {
return loadList()
.then(querySucceeded)
.fail(handleError);
});
- function querySucceeded(data) {
+ function querySucceeded() {
if (splat.id) {
- var detail = details.create(splat.id);
- return Q.when(vm.activeDetail.activateItem(detail));
+ activateDetail(splat.id);
}
return true;
}
}
+ function activateDetail(id) {
+ var detail = details.create(id);
+ return Q.when(self.activeDetail.activateItem(detail));
+ }
+
function loadList() {
return uow.staffingResourceListItems.all()
.then(function(data) {
- vm.staffingResources(data);
+ self.staffingResources(data);
log("StaffingResourceListItems loaded", true);
});
}
function deactivate(close) {
app.off(null, null, this);
- return vm.activeDetail.deactivate(close);
+ return self.activeDetail.deactivate(close);
}
function canDeactivate(close) {
- return vm.activeDetail.canDeactivate(close);
+ return self.activeDetail.canDeactivate(close);
}
function viewAttached(view) {
$(view).on('click', '.selectable-row', function () {
var staffingResource = ko.dataFor(this);
- router.navigateTo('#/resourcemgt/' + staffingResource.id);
+ //router.navigateTo('#/resourcemgt/' + staffingResource.id);
+ activateDetail(staffingResource.id);
return false;
});
}
function handleError(error) {
- logger.log(error.message, null, system.getModuleId(vm), true);
+ logger.log(error.message, null, system.getModuleId(self), true);
throw error;
}
function log(message, showToast) {
- logger.log(message, null, system.getModuleId(vm), showToast);
+ logger.log(message, null, system.getModuleId(self), showToast);
}
};
@@ -1,16 +1,7 @@
-define(['durandal/system', 'durandal/plugins/router', 'logger', 'services/entitymanagerprovider'],
+define(['durandal/system', 'durandal/plugins/router', 'services/logger', 'services/entitymanagerprovider'],
function (system, router, logger, entitymanagerprovider) {
-
- var adminRoutes = ko.computed(function () {
- return router.allRoutes().filter(function (r) {
- return r.settings.admin;
- });
- });
-
var shell = {
activate: activate,
- adminRoutes: adminRoutes,
- navigate: navigate,
router: router
};
@@ -22,22 +13,13 @@
}
function boot() {
- // TODO: map routes here
- var routes = [
- { url: 'home', moduleId: 'viewmodels/home', name: 'Home', visible: true },
- { url: 'resourcemgt', moduleId: 'viewmodels/resourcemgt', name: 'Resource Management', visible: true },
- { url: 'resourcemgt/:id', moduleId: 'viewmodels/resourcemgt', name: 'Resource Management Detail', visible: false }
- ];
- router.map(routes);
+ router.mapNav('home');
+ router.mapNav('resourcemgt', 'viewmodels/resourcemgt', 'Resource Management');
+ router.mapRoute('resourcemgt/:id', 'viewmodels/resourcemgt', 'Resource Management', false);
log('TempHire Loaded!', null, true);
- //TODO: set your default startup route here
return router.activate('home');
}
- function navigate(item) {
- router.navigateTo(item.hash);
- }
-
function log(msg, data, showToast) {
logger.log(msg, data, system.getModuleId(shell), showToast);
}
@@ -1,3 +1,3 @@
<section>
- <h2>Home View</h2>
+ <h2 class="page-title" data-bind="text: title"></h2>
</section>
@@ -4,7 +4,7 @@
<span class="title">TempHire Breeze</span>
</a>
<div class="btn-group" data-bind="foreach: router.visibleRoutes">
- <a data-bind="css: { active: isActive }, click: $parent.navigate, text: name"
+ <a data-bind="css: { active: isActive }, attr: { href: hash }, text: name"
class="btn btn-info" href="#"></a>
</div>
<div class="loader pull-right" data-bind="css: { active: router.isNavigating }">
Oops, something went wrong.

0 comments on commit 8eb888e

Please sign in to comment.