mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
fix: eslint errors for #2228
This commit is contained in:
parent
cc874d26cd
commit
4ab8a39d3d
2 changed files with 16 additions and 16 deletions
|
|
@ -45,14 +45,14 @@ function NotenameCtrl ($scope, noteListDataFactory, $routeParams, websocketMsgSr
|
|||
}
|
||||
|
||||
vm.preVisible = function(clone, sourceNoteName, path) {
|
||||
vm.clone = clone;
|
||||
vm.sourceNoteName = sourceNoteName;
|
||||
$scope.note.notename = vm.clone ? vm.cloneNoteName() : vm.newNoteName(path);
|
||||
$scope.$apply();
|
||||
};
|
||||
vm.clone = clone
|
||||
vm.sourceNoteName = sourceNoteName
|
||||
$scope.note.notename = vm.clone ? vm.cloneNoteName() : vm.newNoteName(path)
|
||||
$scope.$apply()
|
||||
}
|
||||
|
||||
vm.newNoteName = function(path) {
|
||||
var newCount = 1;
|
||||
let newCount = 1
|
||||
angular.forEach(vm.notes.flatList, function (noteName) {
|
||||
noteName = noteName.name
|
||||
if (noteName.match(/^Untitled Note [0-9]*$/)) {
|
||||
|
|
@ -61,9 +61,9 @@ function NotenameCtrl ($scope, noteListDataFactory, $routeParams, websocketMsgSr
|
|||
newCount = lastCount + 1
|
||||
}
|
||||
}
|
||||
});
|
||||
return (path ? path + '/' : '') +'Untitled Note ' + newCount;
|
||||
};
|
||||
})
|
||||
return (path ? path + '/' : '') + 'Untitled Note ' + newCount
|
||||
}
|
||||
|
||||
vm.cloneNoteName = function () {
|
||||
let copyCount = 1
|
||||
|
|
|
|||
|
|
@ -27,13 +27,13 @@ function modalvisible () {
|
|||
let previsibleMethod = scope.preVisibleCallback
|
||||
let postVisibleMethod = scope.postVisibleCallback
|
||||
element.on('show.bs.modal', function (e) {
|
||||
var relatedTarget = angular.element(e.relatedTarget);
|
||||
var clone = relatedTarget.data('clone');
|
||||
var sourceNoteName = relatedTarget.data('source-note-name');
|
||||
var path = relatedTarget.data('path');
|
||||
var cloneNote = clone ? true : false;
|
||||
previsibleMethod()(cloneNote, sourceNoteName, path);
|
||||
});
|
||||
let relatedTarget = angular.element(e.relatedTarget)
|
||||
let clone = relatedTarget.data('clone')
|
||||
let sourceNoteName = relatedTarget.data('source-note-name')
|
||||
let path = relatedTarget.data('path')
|
||||
let cloneNote = clone ? true : false
|
||||
previsibleMethod()(cloneNote, sourceNoteName, path)
|
||||
})
|
||||
element.on('shown.bs.modal', function (e) {
|
||||
if (scope.targetinput) {
|
||||
angular.element(e.target).find('input#' + scope.targetinput).select()
|
||||
|
|
|
|||
Loading…
Reference in a new issue