Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions plugins/bc-admin-third/src/js/admin/users/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* baserCMS : Based Website Development Project <https://basercms.net>
* Copyright (c) NPO baser foundation <https://baserfoundation.org/>
*
* @copyright Copyright (c) NPO baser foundation
* @link https://basercms.net baserCMS Project
* @since 5.0.0
* @license https://basercms.net/license/index.html MIT License
*/

/**
* ユーザー一覧
*/
$(function () {
/**
* 代理ログインボタンの二重クリック防止
*/
$('.btn-login').on('click', function (e) {
if ($(this).attr('disabled')) {
e.preventDefault();
return false;
}
$(this).attr('disabled', 'disabled');
});
});
1 change: 1 addition & 0 deletions plugins/bc-admin-third/templates/Admin/Users/index.php

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ryuring

ログインボタンの二重クリック防止JSを以下のように分離しましたのでレビューお願いします!

  1. ユーザー一覧ページのパス/baser/admin/baser-core/users/indexに合わせて、plugins/bc-admin-third/src/js/admin/usersindex.jsを作成
  2. (1)で作成したindex.jsに二重クリック防止の内容を記述→そのbundleファイルをplugins/bc-admin-third/templates/Admin/Users/index.phpにて読み込む

Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
$this->BcAdmin->setTitle(__d('baser_core', 'ユーザー一覧'));
$this->BcAdmin->setSearch('users_index');
$this->BcAdmin->setHelp('users_index');
$this->BcBaser->js(['admin/users/index.bundle'], false);
?>


Expand Down
11 changes: 11 additions & 0 deletions plugins/bc-admin-third/webroot/js/admin/users/index.bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading