Merge branch 'master' of ssh://git.verdnatura.es:/var/lib/git/salix
This commit is contained in:
commit
f4a5274a9a
|
@ -1,7 +1,7 @@
|
|||
<div pad-large style="min-width: 30em;" ng-show="$ctrl.formVisibility">
|
||||
<form name="form" ng-submit="form.$valid && $ctrl.onSubmit()" ng-keyup="$ctrl.getKeyPressed($event)">
|
||||
<vn-horizontal>
|
||||
<vn-textfield vn-one label="Id Cliente" model="$ctrl.filter.id"></vn-textfield>
|
||||
<vn-textfield vn-one label="Id Cliente" model="$ctrl.filter.id" vn-focus></vn-textfield>
|
||||
<vn-textfield vn-one label="NIF/CIF" model="$ctrl.filter.fi"></vn-textfield>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
|
|
|
@ -1,24 +1,17 @@
|
|||
import {module} from '../module';
|
||||
|
||||
/**
|
||||
* Sets the focus and selects the text on the input.
|
||||
*/
|
||||
// Sets the focus and selects the text on the input.
|
||||
|
||||
export function directive() {
|
||||
return {
|
||||
restrict: 'A',
|
||||
link: function($scope, $element, $attrs) {
|
||||
let input = $element[0];
|
||||
let isInput =
|
||||
input instanceof HTMLInputElement ||
|
||||
input instanceof HTMLTextAreaElement;
|
||||
|
||||
if(!isInput)
|
||||
input = input.querySelector('input, textarea');
|
||||
if(!input)
|
||||
throw new Error(`vnFocus: Can't find an input element`);
|
||||
|
||||
input.focus();
|
||||
input.select();
|
||||
$scope.$watch($attrs.vnFocus, function(value) {
|
||||
if ($element[0].getElementsByTagName("INPUT")[0])
|
||||
$element[0].getElementsByTagName("INPUT")[0].focus();
|
||||
if ($element[0].getElementsByTagName("TEXTAREA")[0])
|
||||
$element[0].getElementsByTagName("TEXTAREA")[0].focus();
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -64,3 +64,4 @@
|
|||
2017/02/07 07:05:55 [notice] 3804#4508: signal process started
|
||||
2017/02/07 07:05:55 [error] 3804#4508: OpenEvent("Global\ngx_stop_6996") failed (2: FormatMessage() error:(15100))
|
||||
2017/02/07 12:56:15 [notice] 9668#8064: signal process started
|
||||
2017/02/08 12:53:38 [emerg] 9856#11204: CreateFile() "C:\Users\vfalco\Documents\vscode\salix\services\nginx/temp/error.log" failed (5: FormatMessage() error:(15100))
|
||||
|
|
Loading…
Reference in New Issue