-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
357 additions
and
299 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
Copyright 2013 Joshua Marsh. All rights reserved. Use of this | ||
source code is governed by a BSD-style license that can be found in | ||
the LICENSE file. | ||
*/ | ||
|
||
// This is used to auto-focus the items then they are switched | ||
// from a span to a text box. | ||
function HasFocus() { | ||
return function(scope, element, attrs) { | ||
scope.$watch(attrs.ngHasfocus, function (nVal, oVal) { | ||
if (nVal) { | ||
$(element[0]).show(); | ||
$(element[0]).focus(); | ||
$(element[0]).select(); | ||
} | ||
}); | ||
|
||
element.bind('blur', function() { | ||
scope.$apply("edit(-1);"); | ||
}); | ||
|
||
element.bind('keydown', function (e) { | ||
if (e.which == 13) { | ||
scope.$apply("edit(-1);"); | ||
} | ||
}); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* | ||
Copyright 2013 Joshua Marsh. All rights reserved. Use of this | ||
source code is governed by a BSD-style license that can be found in | ||
the LICENSE file. | ||
*/ | ||
|
||
var home = angular.module('home', ['rest']); | ||
|
||
home.config(['$routeProvider', Router]); | ||
home.directive('ngHasfocus', HasFocus); | ||
home.directive('modal', Modal); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
Copyright 2013 Joshua Marsh. All rights reserved. Use of this | ||
source code is governed by a BSD-style license that can be found in | ||
the LICENSE file. | ||
*/ | ||
|
||
// This is used to auto-focus the items then they are switched | ||
// from a span to a text box. | ||
function Modal() { | ||
return { | ||
restrict: 'A', | ||
transclude: true, | ||
scope: { | ||
id: '@modalId', | ||
title: '@modalTitle', | ||
message: '@modalMessage', | ||
data: "=modalData", | ||
form: "=modalForm", | ||
okbtncls: '@modalOkButtonClass', | ||
okbtntxt: '@modalOkButtonText', | ||
okbtnico: '@modalOkButtonIcon', | ||
onok: '&modalOnOk' | ||
|
||
}, | ||
templateUrl: 'modal.html', | ||
link: function (scope, element, attrs) { | ||
|
||
} | ||
|
||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.