@girder/core 3.2.8 → 5.0.0-a7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (231) hide show
  1. package/README.md +61 -0
  2. package/package.json +79 -31
  3. package/assets/Girder_Mark.png +0 -0
  4. package/auth.js +0 -152
  5. package/collections/ApiKeyCollection.js +0 -9
  6. package/collections/AssetstoreCollection.js +0 -9
  7. package/collections/Collection.js +0 -295
  8. package/collections/CollectionCollection.js +0 -9
  9. package/collections/FileCollection.js +0 -11
  10. package/collections/FolderCollection.js +0 -11
  11. package/collections/GroupCollection.js +0 -9
  12. package/collections/ItemCollection.js +0 -11
  13. package/collections/UserCollection.js +0 -24
  14. package/collections/index.js +0 -21
  15. package/constants.js +0 -33
  16. package/dialog.js +0 -128
  17. package/events.js +0 -6
  18. package/index.js +0 -31
  19. package/main.js +0 -21
  20. package/misc.js +0 -260
  21. package/models/AccessControlledModel.js +0 -76
  22. package/models/ApiKeyModel.js +0 -31
  23. package/models/AssetstoreModel.js +0 -43
  24. package/models/CollectionCreationPolicyModel.js +0 -20
  25. package/models/CollectionModel.js +0 -12
  26. package/models/FileModel.js +0 -310
  27. package/models/FolderModel.js +0 -33
  28. package/models/GroupModel.js +0 -197
  29. package/models/ItemModel.js +0 -72
  30. package/models/MetadataMixin.js +0 -88
  31. package/models/Model.js +0 -187
  32. package/models/UserModel.js +0 -189
  33. package/models/index.js +0 -25
  34. package/pluginUtils.js +0 -11
  35. package/rest.js +0 -216
  36. package/router.js +0 -58
  37. package/routes.js +0 -231
  38. package/stylesheets/apidocs/apidocs.styl +0 -50
  39. package/stylesheets/body/adminConsole.styl +0 -21
  40. package/stylesheets/body/assetstores.styl +0 -46
  41. package/stylesheets/body/collectionList.styl +0 -39
  42. package/stylesheets/body/collectionPage.styl +0 -6
  43. package/stylesheets/body/frontPage.styl +0 -48
  44. package/stylesheets/body/groupList.styl +0 -43
  45. package/stylesheets/body/groupPage.styl +0 -116
  46. package/stylesheets/body/itemPage.styl +0 -81
  47. package/stylesheets/body/plugins.styl +0 -61
  48. package/stylesheets/body/searchResultsList.styl +0 -51
  49. package/stylesheets/body/systemConfig.styl +0 -56
  50. package/stylesheets/body/userAccount.styl +0 -57
  51. package/stylesheets/body/userList.styl +0 -79
  52. package/stylesheets/body/userPage.styl +0 -6
  53. package/stylesheets/layout/footer.styl +0 -19
  54. package/stylesheets/layout/global.styl +0 -154
  55. package/stylesheets/layout/globalNav.styl +0 -89
  56. package/stylesheets/layout/header.styl +0 -29
  57. package/stylesheets/layout/headerUser.styl +0 -33
  58. package/stylesheets/layout/layout.styl +0 -75
  59. package/stylesheets/layout/layoutVars.styl +0 -9
  60. package/stylesheets/layout/loading.styl +0 -37
  61. package/stylesheets/layout/progressArea.styl +0 -17
  62. package/stylesheets/widgets/accessWidget.styl +0 -106
  63. package/stylesheets/widgets/browserWidget.styl +0 -9
  64. package/stylesheets/widgets/hierarchyWidget.styl +0 -188
  65. package/stylesheets/widgets/markdownWidget.styl +0 -92
  66. package/stylesheets/widgets/metadataWidget.styl +0 -92
  67. package/stylesheets/widgets/searchFieldWidget.styl +0 -70
  68. package/stylesheets/widgets/taskProgress.styl +0 -41
  69. package/stylesheets/widgets/timelineWidget.styl +0 -41
  70. package/stylesheets/widgets/uploadWidget.styl +0 -43
  71. package/stylesheets/widgets/userOtpManagementWidget.styl +0 -159
  72. package/templates/body/adminConsole.pug +0 -13
  73. package/templates/body/assetstores.pug +0 -98
  74. package/templates/body/collectionList.pug +0 -40
  75. package/templates/body/collectionPage.pug +0 -36
  76. package/templates/body/filesystemImport.pug +0 -41
  77. package/templates/body/frontPage.pug +0 -83
  78. package/templates/body/groupList.pug +0 -30
  79. package/templates/body/groupPage.pug +0 -116
  80. package/templates/body/itemPage.pug +0 -61
  81. package/templates/body/plugins.pug +0 -20
  82. package/templates/body/s3Import.pug +0 -35
  83. package/templates/body/searchResults.pug +0 -15
  84. package/templates/body/searchResultsType.pug +0 -13
  85. package/templates/body/systemConfiguration.pug +0 -221
  86. package/templates/body/userAccount.pug +0 -83
  87. package/templates/body/userList.pug +0 -43
  88. package/templates/body/userPage.pug +0 -40
  89. package/templates/layout/alert.pug +0 -5
  90. package/templates/layout/layout.pug +0 -12
  91. package/templates/layout/layoutFooter.pug +0 -11
  92. package/templates/layout/layoutGlobalNav.pug +0 -7
  93. package/templates/layout/layoutHeader.pug +0 -8
  94. package/templates/layout/layoutHeaderUser.pug +0 -26
  95. package/templates/layout/layoutProgressArea.pug +0 -1
  96. package/templates/layout/loginDialog.pug +0 -30
  97. package/templates/layout/registerDialog.pug +0 -35
  98. package/templates/layout/resetPasswordDialog.pug +0 -25
  99. package/templates/widgets/accessEditor.pug +0 -23
  100. package/templates/widgets/accessEditorMixins.pug +0 -57
  101. package/templates/widgets/accessEditorNonModal.pug +0 -11
  102. package/templates/widgets/accessEntry.pug +0 -32
  103. package/templates/widgets/apiKeyList.pug +0 -50
  104. package/templates/widgets/browserWidget.pug +0 -32
  105. package/templates/widgets/checkedActionsMenu.pug +0 -46
  106. package/templates/widgets/collectionInfoDialog.pug +0 -37
  107. package/templates/widgets/confirmDialog.pug +0 -14
  108. package/templates/widgets/dateTimeRangeWidget.pug +0 -20
  109. package/templates/widgets/dateTimeWidget.pug +0 -8
  110. package/templates/widgets/editApiKeyWidget.pug +0 -43
  111. package/templates/widgets/editAssetstoreWidget.pug +0 -78
  112. package/templates/widgets/editCollectionWidget.pug +0 -27
  113. package/templates/widgets/editFileWidget.pug +0 -21
  114. package/templates/widgets/editFolderWidget.pug +0 -27
  115. package/templates/widgets/editGroupWidget.pug +0 -54
  116. package/templates/widgets/editItemWidget.pug +0 -27
  117. package/templates/widgets/fileInfoDialog.pug +0 -33
  118. package/templates/widgets/fileList.pug +0 -33
  119. package/templates/widgets/folderInfoDialog.pug +0 -42
  120. package/templates/widgets/folderList.pug +0 -21
  121. package/templates/widgets/groupAdminList.pug +0 -33
  122. package/templates/widgets/groupInviteDialog.pug +0 -76
  123. package/templates/widgets/groupInviteList.pug +0 -14
  124. package/templates/widgets/groupMemberList.pug +0 -39
  125. package/templates/widgets/groupModList.pug +0 -23
  126. package/templates/widgets/hierarchyBreadcrumb.pug +0 -37
  127. package/templates/widgets/hierarchyPaginated.pug +0 -19
  128. package/templates/widgets/hierarchyWidget.pug +0 -96
  129. package/templates/widgets/itemBreadcrumb.pug +0 -16
  130. package/templates/widgets/itemList.pug +0 -27
  131. package/templates/widgets/jsonMetadatumEditWidget.pug +0 -13
  132. package/templates/widgets/jsonMetadatumView.pug +0 -6
  133. package/templates/widgets/loadingAnimation.pug +0 -4
  134. package/templates/widgets/markdownWidget.pug +0 -34
  135. package/templates/widgets/metadataWidget.pug +0 -16
  136. package/templates/widgets/metadatumEditWidget.pug +0 -15
  137. package/templates/widgets/metadatumView.pug +0 -5
  138. package/templates/widgets/newAssetstore.pug +0 -118
  139. package/templates/widgets/paginateWidget.pug +0 -7
  140. package/templates/widgets/pluginConfigBreadcrumb.pug +0 -13
  141. package/templates/widgets/rootSelectorWidget.pug +0 -13
  142. package/templates/widgets/searchField.pug +0 -10
  143. package/templates/widgets/searchHelp.pug +0 -12
  144. package/templates/widgets/searchModeSelect.pug +0 -9
  145. package/templates/widgets/searchResults.pug +0 -14
  146. package/templates/widgets/sortCollectionWidget.pug +0 -14
  147. package/templates/widgets/taskProgress.pug +0 -16
  148. package/templates/widgets/timeline.pug +0 -15
  149. package/templates/widgets/uploadWidget.pug +0 -15
  150. package/templates/widgets/uploadWidgetMixins.pug +0 -31
  151. package/templates/widgets/uploadWidgetNonModal.pug +0 -10
  152. package/templates/widgets/userOtpBegin.pug +0 -4
  153. package/templates/widgets/userOtpDisable.pug +0 -6
  154. package/templates/widgets/userOtpEnable.pug +0 -44
  155. package/utilities/EventStream.js +0 -177
  156. package/utilities/PluginUtils.js +0 -36
  157. package/utilities/S3UploadHandler.js +0 -303
  158. package/utilities/index.js +0 -9
  159. package/utilities/jquery/girderEnable.js +0 -19
  160. package/utilities/jquery/girderModal.js +0 -48
  161. package/version.js +0 -10
  162. package/views/App.js +0 -359
  163. package/views/View.js +0 -78
  164. package/views/body/AdminView.js +0 -29
  165. package/views/body/AssetstoresView.js +0 -235
  166. package/views/body/CollectionView.js +0 -188
  167. package/views/body/CollectionsView.js +0 -120
  168. package/views/body/FilesystemImportView.js +0 -83
  169. package/views/body/FolderView.js +0 -54
  170. package/views/body/FrontPageView.js +0 -47
  171. package/views/body/GroupView.js +0 -336
  172. package/views/body/GroupsView.js +0 -106
  173. package/views/body/ItemView.js +0 -177
  174. package/views/body/PluginsView.js +0 -73
  175. package/views/body/S3ImportView.js +0 -80
  176. package/views/body/SearchResultsView.js +0 -162
  177. package/views/body/SystemConfigurationView.js +0 -196
  178. package/views/body/UserAccountView.js +0 -179
  179. package/views/body/UserView.js +0 -165
  180. package/views/body/UsersView.js +0 -124
  181. package/views/body/index.js +0 -37
  182. package/views/index.js +0 -13
  183. package/views/layout/FooterView.js +0 -29
  184. package/views/layout/GlobalNavView.js +0 -103
  185. package/views/layout/HeaderUserView.js +0 -45
  186. package/views/layout/HeaderView.js +0 -83
  187. package/views/layout/LoginView.js +0 -100
  188. package/views/layout/ProgressListView.js +0 -70
  189. package/views/layout/RegisterView.js +0 -101
  190. package/views/layout/ResetPasswordView.js +0 -70
  191. package/views/layout/index.js +0 -19
  192. package/views/widgets/AccessWidget.js +0 -427
  193. package/views/widgets/ApiKeyListWidget.js +0 -140
  194. package/views/widgets/BrowserWidget.js +0 -317
  195. package/views/widgets/CheckedMenuWidget.js +0 -68
  196. package/views/widgets/CollectionInfoWidget.js +0 -40
  197. package/views/widgets/DateTimeRangeWidget.js +0 -179
  198. package/views/widgets/DateTimeWidget.js +0 -109
  199. package/views/widgets/EditApiKeyWidget.js +0 -122
  200. package/views/widgets/EditAssetstoreWidget.js +0 -148
  201. package/views/widgets/EditCollectionWidget.js +0 -93
  202. package/views/widgets/EditFileWidget.js +0 -56
  203. package/views/widgets/EditFolderWidget.js +0 -116
  204. package/views/widgets/EditGroupWidget.js +0 -125
  205. package/views/widgets/EditItemWidget.js +0 -110
  206. package/views/widgets/FileInfoWidget.js +0 -26
  207. package/views/widgets/FileListWidget.js +0 -151
  208. package/views/widgets/FolderInfoWidget.js +0 -39
  209. package/views/widgets/FolderListWidget.js +0 -106
  210. package/views/widgets/GroupAdminsWidget.js +0 -88
  211. package/views/widgets/GroupInvitesWidget.js +0 -56
  212. package/views/widgets/GroupMembersWidget.js +0 -185
  213. package/views/widgets/GroupModsWidget.js +0 -77
  214. package/views/widgets/HierarchyWidget.js +0 -1097
  215. package/views/widgets/ItemBreadcrumbWidget.js +0 -38
  216. package/views/widgets/ItemListWidget.js +0 -345
  217. package/views/widgets/LoadingAnimation.js +0 -17
  218. package/views/widgets/MarkdownWidget.js +0 -217
  219. package/views/widgets/MetadataWidget.js +0 -504
  220. package/views/widgets/NewAssetstoreWidget.js +0 -81
  221. package/views/widgets/PaginateWidget.js +0 -37
  222. package/views/widgets/PluginConfigBreadcrumbWidget.js +0 -33
  223. package/views/widgets/RootSelectorWidget.js +0 -192
  224. package/views/widgets/SearchFieldWidget.js +0 -365
  225. package/views/widgets/SearchPaginateWidget.js +0 -149
  226. package/views/widgets/SortCollectionWidget.js +0 -53
  227. package/views/widgets/TaskProgressWidget.js +0 -91
  228. package/views/widgets/TimelineWidget.js +0 -155
  229. package/views/widgets/UploadWidget.js +0 -340
  230. package/views/widgets/UserOtpManagementWidget.js +0 -105
  231. package/views/widgets/index.js +0 -75
@@ -1,100 +0,0 @@
1
- import $ from 'jquery';
2
- import _ from 'underscore';
3
-
4
- import View from '@girder/core/views/View';
5
- import events from '@girder/core/events';
6
- import { handleClose, handleOpen } from '@girder/core/dialog';
7
- import { login } from '@girder/core/auth';
8
- import UserModel from '@girder/core/models/UserModel';
9
-
10
- import LoginDialogTemplate from '@girder/core/templates/layout/loginDialog.pug';
11
-
12
- import '@girder/core/utilities/jquery/girderEnable';
13
- import '@girder/core/utilities/jquery/girderModal';
14
-
15
- /**
16
- * This view shows a login modal dialog.
17
- */
18
- var LoginView = View.extend({
19
- events: {
20
- 'submit #g-login-form': function (e) {
21
- e.preventDefault();
22
-
23
- this.$('#g-login-button').girderEnable(false);
24
- this.$('.g-validation-failed-message').text('');
25
-
26
- const loginName = this.$('#g-login').val();
27
- const password = this.$('#g-password').val();
28
- const otpToken = this.$('#g-login-otp-group').hasClass('hidden') ? null : this.$('#g-login-otp').val();
29
- login(loginName, password, undefined, otpToken)
30
- .done(() => {
31
- this.$el.modal('hide');
32
- })
33
- .fail((err) => {
34
- if (err.responseJSON.message.indexOf('Girder-OTP') !== -1 &&
35
- this.$('#g-login-otp-group').hasClass('hidden')
36
- ) {
37
- this.$('#g-login-otp-group').removeClass('hidden');
38
- this.$('#g-login-otp').trigger('focus');
39
- return;
40
- }
41
-
42
- this.$('.g-validation-failed-message').text(err.responseJSON.message);
43
-
44
- if (err.responseJSON.extra === 'emailVerification') {
45
- var html = err.responseJSON.message +
46
- ' <a class="g-send-verification-email">Click here to send verification email.</a>';
47
- $('.g-validation-failed-message').html(html);
48
- }
49
- })
50
- .always(() => {
51
- this.$('#g-login-button').girderEnable(true);
52
- });
53
- },
54
-
55
- 'click .g-send-verification-email': function () {
56
- this.$('.g-validation-failed-message').html('');
57
-
58
- const loginName = this.$('#g-login').val();
59
- UserModel.sendVerificationEmail(loginName)
60
- .done((resp) => {
61
- this.$('.g-validation-failed-message').html(resp.message);
62
- }).fail((err) => {
63
- this.$('.g-validation-failed-message').html(err.responseJSON.message);
64
- });
65
- },
66
-
67
- 'click a.g-register-link': function () {
68
- events.trigger('g:registerUi');
69
- },
70
-
71
- 'click a.g-forgot-password': function () {
72
- events.trigger('g:resetPasswordUi');
73
- }
74
- },
75
-
76
- initialize: function (settings) {
77
- this.registrationPolicy = settings.registrationPolicy;
78
- this.enablePasswordLogin = _.has(settings, 'enablePasswordLogin') ? settings.enablePasswordLogin : true;
79
- },
80
-
81
- render: function () {
82
- this.$el.html(LoginDialogTemplate({
83
- registrationPolicy: this.registrationPolicy,
84
- enablePasswordLogin: this.enablePasswordLogin,
85
- showOtp: true
86
- })).girderModal(this)
87
- .on('shown.bs.modal', () => {
88
- this.$('#g-login').trigger('focus');
89
- }).on('hidden.bs.modal', () => {
90
- handleClose('login', { replace: true });
91
- });
92
-
93
- handleOpen('login', { replace: true });
94
- this.$('#g-login').trigger('focus');
95
-
96
- return this;
97
- }
98
- });
99
-
100
- export default LoginView;
@@ -1,70 +0,0 @@
1
- import _ from 'underscore';
2
-
3
- import TaskProgressWidget from '@girder/core/views/widgets/TaskProgressWidget';
4
- import View from '@girder/core/views/View';
5
-
6
- import LayoutProgressAreaTemplate from '@girder/core/templates/layout/layoutProgressArea.pug';
7
-
8
- import '@girder/core/stylesheets/layout/progressArea.styl';
9
-
10
- /**
11
- * Container showing list of active tasks that are reporting progress
12
- * via a EventStream object.
13
- */
14
- var ProgressListView = View.extend({
15
-
16
- initialize: function (settings) {
17
- this.eventStream = settings.eventStream;
18
- this.listenTo(this.eventStream, 'g:event.progress', this._handleProgress, this);
19
- // if the event stream disconnects, clear the progress so we don't have
20
- // stale values lingering.
21
- this.listenTo(this.eventStream, 'g:eventStream.stop', this._clearProgress, this);
22
-
23
- // map progress IDs to widgets
24
- this._map = {};
25
- },
26
-
27
- render: function () {
28
- this.$el.html(LayoutProgressAreaTemplate());
29
-
30
- this._onUpdate();
31
-
32
- return this;
33
- },
34
-
35
- _handleProgress: function (progress) {
36
- if (_.has(this._map, progress._id)) {
37
- this._map[progress._id].update(progress);
38
- } else {
39
- this._map[progress._id] = new TaskProgressWidget({
40
- className: 'g-progress-widget-container',
41
- progress: progress,
42
- parentView: null
43
- }).on('g:hide', function (p) {
44
- this._map[p._id].destroy();
45
- delete this._map[p._id];
46
- this._onUpdate();
47
- }, this).render();
48
- this._map[progress._id].$el.appendTo(this.$('.g-progress-list-container'));
49
- }
50
- this._onUpdate();
51
- },
52
-
53
- _clearProgress: function () {
54
- const needsUpdate = !_.isEmpty(this._map);
55
- _.each(this._map, (progressWidget, progressId) => {
56
- progressWidget.destroy();
57
- progressWidget.remove();
58
- delete this._map[progressId];
59
- });
60
- if (needsUpdate) {
61
- this._onUpdate();
62
- }
63
- },
64
-
65
- _onUpdate: function () {
66
- this.$el.toggle(!_.isEmpty(this._map));
67
- }
68
- });
69
-
70
- export default ProgressListView;
@@ -1,101 +0,0 @@
1
- import UserModel from '@girder/core/models/UserModel';
2
- import View from '@girder/core/views/View';
3
- import events from '@girder/core/events';
4
- import { getCurrentUser, setCurrentUser, getCurrentToken, setCurrentToken } from '@girder/core/auth';
5
- import { handleClose, handleOpen } from '@girder/core/dialog';
6
-
7
- import RegisterDialogTemplate from '@girder/core/templates/layout/registerDialog.pug';
8
-
9
- import '@girder/core/utilities/jquery/girderEnable';
10
- import '@girder/core/utilities/jquery/girderModal';
11
-
12
- /**
13
- * This view shows a register modal dialog.
14
- */
15
- var RegisterView = View.extend({
16
- events: {
17
- 'submit #g-register-form': function (e) {
18
- e.preventDefault();
19
-
20
- this.$('.form-group').removeClass('has-error');
21
-
22
- if (this.$('#g-password').val() !== this.$('#g-password2').val()) {
23
- this.$('#g-group-password,#g-group-password2').addClass('has-error');
24
- this.$('#g-password').trigger('focus');
25
- this.$('.g-validation-failed-message').text('Passwords must match.');
26
- return;
27
- }
28
-
29
- var user = new UserModel({
30
- login: this.$('#g-login').val(),
31
- password: this.$('#g-password').val(),
32
- email: this.$('#g-email').val(),
33
- firstName: this.$('#g-firstName').val(),
34
- lastName: this.$('#g-lastName').val()
35
- });
36
- user.on('g:saved', function () {
37
- if (getCurrentUser()) {
38
- this.trigger('g:userCreated', {
39
- user: user
40
- });
41
- } else {
42
- var authToken = user.get('authToken') || {};
43
-
44
- if (authToken.token) {
45
- setCurrentUser(user);
46
- setCurrentToken(authToken.token);
47
- window.localStorage.setItem('girderToken', getCurrentToken());
48
-
49
- events.trigger('g:login');
50
- } else {
51
- events.trigger('g:alert', {
52
- icon: 'ok',
53
- text: 'Check your email to verify registration.',
54
- type: 'success',
55
- timeout: 4000
56
- });
57
- }
58
-
59
- handleClose('register', { replace: true });
60
- }
61
-
62
- this.$el.modal('hide');
63
- }, this).on('g:error', function (err) {
64
- var resp = err.responseJSON;
65
- this.$('.g-validation-failed-message').text(resp.message);
66
- if (resp.field) {
67
- this.$('#g-group-' + resp.field).addClass('has-error');
68
- this.$('#g-' + resp.field).trigger('focus');
69
- }
70
- this.$('#g-register-button').girderEnable(true);
71
- }, this).save();
72
-
73
- this.$('#g-register-button').girderEnable(false);
74
- this.$('.g-validation-failed-message').text('');
75
- },
76
-
77
- 'click a.g-login-link': function () {
78
- events.trigger('g:loginUi');
79
- }
80
- },
81
-
82
- render: function () {
83
- this.$el.html(RegisterDialogTemplate({
84
- currentUser: getCurrentUser(),
85
- title: getCurrentUser() ? 'Create new user' : 'Sign up'
86
- })).girderModal(this)
87
- .on('shown.bs.modal', () => {
88
- this.$('#g-login').trigger('focus');
89
- }).on('hidden.bs.modal', () => {
90
- handleClose('register', { replace: true });
91
- });
92
- this.$('#g-login').trigger('focus');
93
-
94
- handleOpen('register', { replace: true });
95
-
96
- return this;
97
- }
98
-
99
- });
100
-
101
- export default RegisterView;
@@ -1,70 +0,0 @@
1
- import View from '@girder/core/views/View';
2
- import events from '@girder/core/events';
3
- import { handleClose, handleOpen } from '@girder/core/dialog';
4
- import { restRequest } from '@girder/core/rest';
5
-
6
- import ResetPasswordDialogTemplate from '@girder/core/templates/layout/resetPasswordDialog.pug';
7
-
8
- import '@girder/core/utilities/jquery/girderEnable';
9
- import '@girder/core/utilities/jquery/girderModal';
10
-
11
- /**
12
- * This view shows a modal dialog for resetting a forgotten password.
13
- */
14
- var ResetPasswordView = View.extend({
15
- events: {
16
- 'submit #g-reset-password-form': function (e) {
17
- e.preventDefault();
18
- restRequest({
19
- url: 'user/password/temporary',
20
- data: {
21
- email: this.$('#g-email').val().trim()
22
- },
23
- method: 'PUT',
24
- error: null // don't do default error behavior
25
- }).done(() => {
26
- this.$el.modal('hide');
27
- events.trigger('g:alert', {
28
- icon: 'mail-alt',
29
- text: 'Password reset email sent.',
30
- type: 'success'
31
- });
32
- }).fail((err) => {
33
- this.$('.g-validation-failed-message').text(err.responseJSON.message);
34
- this.$('#g-reset-password-button').girderEnable(true);
35
- });
36
-
37
- this.$('#g-reset-password-button').girderEnable(false);
38
- this.$('.g-validation-failed-message').text('');
39
- },
40
-
41
- 'click a.g-register-link': function () {
42
- events.trigger('g:registerUi');
43
- },
44
-
45
- 'click a.g-login-link': function () {
46
- events.trigger('g:loginUi');
47
- }
48
- },
49
-
50
- initialize: function (settings) {
51
- this.registrationPolicy = settings.registrationPolicy;
52
- },
53
-
54
- render: function () {
55
- this.$el.html(ResetPasswordDialogTemplate({
56
- registrationPolicy: this.registrationPolicy
57
- })).girderModal(this).on('shown.bs.modal', () => {
58
- this.$('#g-email').trigger('focus');
59
- }).on('hidden.bs.modal', () => {
60
- handleClose('resetpassword', { replace: true });
61
- });
62
- this.$('#g-email').trigger('focus');
63
-
64
- handleOpen('resetpassword', { replace: true });
65
-
66
- return this;
67
- }
68
- });
69
-
70
- export default ResetPasswordView;
@@ -1,19 +0,0 @@
1
- import FooterView from './FooterView';
2
- import GlobalNavView from './GlobalNavView';
3
- import HeaderUserView from './HeaderUserView';
4
- import HeaderView from './HeaderView';
5
- import LoginView from './LoginView';
6
- import ProgressListView from './ProgressListView';
7
- import RegisterView from './RegisterView';
8
- import ResetPasswordView from './ResetPasswordView';
9
-
10
- export {
11
- FooterView,
12
- GlobalNavView,
13
- HeaderUserView,
14
- HeaderView,
15
- LoginView,
16
- ProgressListView,
17
- RegisterView,
18
- ResetPasswordView
19
- };