Commit 02c7ab14 authored by Christoph Burgdorf's avatar Christoph Burgdorf

Select text on focus (unfortunatly I had to take jquery-1.7.1.min.js as a new reference)

parent 62fa615f
......@@ -44,6 +44,7 @@
</div>
<script src="js/booter.js"></script>
<script src="js/lib/angular/angular.min.js" ng:autobind></script>
<script src="js/lib/jquery-1.7.1.min.js"></script>
<script src="js/controllers.js"></script>
<script src="js/directive.js"></script>
</body>
......
......@@ -22,10 +22,12 @@ angular.directive('my:dblclick', function(expression, compiledElement) {
});
angular.directive("my:focus", function(expression, compiledElement){
return function(element){
this.$watch(expression, function(){
if(angular.formatter.boolean.parse(expression)){
element[0].focus();
$(element[0]).select();
}
}, element);
};
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment