Skip to content

Commit

Permalink
code refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
mayswind committed Nov 6, 2022
1 parent 52b5353 commit 32adc3f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/scripts/directives/exportCommandApiDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@

scope.copyCommandAPI = function () {
clipboard.copyText(scope.context.commandAPIUrl, {
container: angular.element('#exportCommandAPIModal')[0]
container: angular.element(element)[0]
});
scope.context.isCopied = true;
};

angular.element('#exportCommandAPIModal').on('hidden.bs.modal', function () {
angular.element(element).on('hidden.bs.modal', function () {
scope.$apply(function () {
scope.options = null;
scope.context.commandAPIUrl = null;
Expand All @@ -101,7 +101,7 @@
scope.generateCommandAPIUrl();
scope.context.isCopied = false;

angular.element('#exportCommandAPIModal').modal('show');
angular.element(element).modal('show');
}
}, true);
}
Expand Down
4 changes: 2 additions & 2 deletions src/scripts/directives/settingDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
});
};

angular.element('#quickSettingModal').on('hidden.bs.modal', function () {
angular.element(element).on('hidden.bs.modal', function () {
scope.$apply(function () {
scope.setting = null;
scope.context.availableOptions = [];
Expand All @@ -62,7 +62,7 @@
loadOptions(setting.type);
loadAria2OptionsValue();

angular.element('#quickSettingModal').modal('show');
angular.element(element).modal('show');
}
}, true);
}
Expand Down
2 changes: 1 addition & 1 deletion src/views/export-command-api-dialog.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div id="exportCommandAPIModal" class="modal fade" tabindex="-1" role="dialog">
<div class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
Expand Down
2 changes: 1 addition & 1 deletion src/views/setting-dialog.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div id="quickSettingModal" class="modal fade" tabindex="-1" role="dialog">
<div class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
Expand Down

0 comments on commit 32adc3f

Please sign in to comment.