PageSourceSearch

https://prok.org/Scripts/dimode.account.js?2026100603

js prok.org collected 2026-10-05 19:00:14 UTC 12,443 bytes, 276 lines download raw bytes

1/// <reference path="dimode.common.library.js" />
2(function () {
3    $(document).ready(function () {
4        // 회원 가입 s
5        $(document).on('keypress', '#joinForm input[type=text]', function (e) {
6            if (e.keyCode == 13) {
7                e.preventDefault();
8                $('#joinForm .submit-btn').trigger('click');
9            }
10        });
11
12        $('#joinForm').ajaxForm({
13            beforeSubmit: function () {
14                var returnValue = true;
15                var agreed = $('#joinForm input[name=isAgreed]');
16                var password = $('#joinForm input[name=password]');
17                var passwordConfirm = $('#joinForm input[name=passwordConfirm]');
18
19                dimodeLib.bandMessage('warning', '처리 중입니다.', 0);
20                if (agreed.length && !agreed.prop('checked')) {
21                    dimodeLib.bandMessage('warning', '약관에 동의하셔야 가입이 가능합니다.');
22                    returnValue = false;
23                }
24                else if (!dimodeLib.isValidated('#joinForm')) {
25                    returnValue = false;
26                }
27                else if (password.val() !== passwordConfirm.val()) {
28                    dimodeLib.bandMessage('warning', '패스워드가 일치하지 않습니다.');
29                    password.focus();
30                    returnValue = false;
31                }
32
33                if ($("input[name='authcheck']").length > 0) {
34                    if ($("input[name='authcheck']").val() != "1") {
35                        dimodeLib.bandMessage('warning', '회원 가입은 교인 인증 후에 가능합니다.');
36                        $("input[name='authnumber']").focus();
37                        returnValue = false;
38                    }
39                }
40
41                if (returnValue)
42                    $('#joinForm button[type=submit]').attr('disabled', true);
43
44                return returnValue;
45            },
46            success: function (returnData) {
47                if (returnData == 'success') {
48                    dimodeLib.bandMessageCookie('success', '회원가입하였습니다.');
49                    location.href = '/Guide/LatestUrl';
50                }
51                else if (returnData == 'notLogged') {
52                    dimodeLib.bandMessageCookie('success', '회원 가입 승인을 신청하셨습니다.');
53                    location.href = '/Guide/LatestUrl';
54                }
55				else if (returnData == 'spam') {
56                    dimodeLib.bandMessage('danger', '스팸 메일은 회원가입이 불가합니다', 0);
57                }
58                else if (returnData == 'noCap') {
59                    dimodeLib.bandMessage('danger', '보안문구가 틀렸습니다', 0);
60                }
61                else {
62                    dimodeLib.bandMessage('danger', '오류가 있습니다.#1', 0);
63                }
64            },
65            error: function () {
66                dimodeLib.bandMessage('danger', '오류가 있습니다.#2', 0);
67            }
68        });
69        // 회원 가입 e 
70
71        // 로그인 s 
72        $('#loginForm').ajaxForm({
73            beforeSubmit: function () {
74                dimodeLib.bandMessage('warning', '처리 중입니다.', 0);
75                return dimodeLib.isValidated('#loginForm');
76            },
77            success: function (res) {
78                switch (res) {
79                    case 'success':
80                        var getUrl = window.location.href;
81                        /*자동로그인 체크 했을 경우 어플이면 LocalStrage에 쿠키값 저장*/
82                        if (window.localStorage !== null && window._cordovaNative !== null) {
83                            if ($('.form-signin input[name=autoLogin]').prop('checked')) {
84                                window.localStorage.setItem("DimodeCMS_Login_Info", $.cookie("DimodeCMS_Login_Info"));
85                            }
86                            else {
87                                window.localStorage.getItem("DimodeC
87MS_Login_Info", "");
88                            }
89                        }
90                        if (getUrl.indexOf("Board/Write") > 0) {
91                            dimodeLib.bandMessage('success', '로그인되었습니다. 저장버튼을 눌러주세요.');
92                            $('#modal-login').modal('hide');
93                        } else {
94                            location.href = '/Guide/LatestUrl';
95                        }
96                        break;
97
98                    case 'password':
99                        dimodeLib.bandMessageCookie('warning', '패스워드를 변경하셔야 사용이 가능합니다.');
100                        location.href = '/Account/Password';
101                        break;
102
103                    case 'fail':
104                        dimodeLib.bandMessage('warning', '로그인 정보가 올바르지 않습니다.');
105                        break;
106
107                    case 'notEmail':
108                        dimodeLib.bandMessage('warning', '이메일 형식으로 입력해주세요.');
109                        break;
110
111                    case 'notId':
112                        dimodeLib.bandMessage('warning', '이메일이 아닌 아이디를 입력해주세요..');
113                        break;
114
115                    case 'notLogged':
116                        dimodeLib.bandMessage('warning', '현재 가입 대기 상태로 로그인할 수 없습니다.');
117                        break;
118
119                    default:
120                        dimodeLib.bandMessage('danger', '오류가 있습니다.#1', 0);
121                        break;
122                }
123            },
124            error: function () {
125                dimodeLib.bandMessage('danger', '오류가 있습니다.#2', 0);
126            }
127        });
128
129        $('.form-signin input[name=autoLogin]').on('change', function () {
130            if ($(this).prop('checked'))
131                $('.auto-login-description').removeClass('hide');
132            else
133                $('.auto-login-description').addClass('hide');
134        })
135        // 로그인 e 
136
137        // 회원정보 보기 s 
138        $('#memberInfoForm').ajaxForm({
139            beforeSubmit: function () {
140                var password = $('#memberInfoForm input[name=password]');
141                var passwordConfirm = $('#memberInfoForm input[name=passwordConfirm]');
142                if ($('#memberInfoForm input[name=passwordConfirm]').length) {
143                    if (password.val() !== passwordConfirm.val()) {
144                        dimodeLib.bandMessage('warning', '패스워드가 일치하지 않습니다.');
145                        password.focus();
146                        returnValue = false;
147                        return returnValue;
148                    }
149                    else {
150                        dimodeLib.bandMessage('warning', '처리 중입니다.', 0);
151                        return dimodeLib.isValidated('#memberInfoForm');
152                    }
153                }
154            },
155            success: function (returnData) {
156                if (returnData == 'success') {
157                    dimodeLib.bandMessageCookie('success', '저장하였습니다.');
158                    location.href = '/Guide/LatestUrl';
159                }
160                else {
161                    dimodeLib.bandMessage('danger', '오류가 있습니다.#1', 0);
162                }
163            },
164            error: function () {
165                dimodeLib.bandMessage('danger', '오류가 있습니다.#2', 0);
166            }
167        });
168        // 회원정보 보기 e 
169
170        // 회원정보 찾기 s
171        $('#findForm').ajaxForm({
172            beforeSubmit: function () {
173                if (dimodeLib.isNullOrEmpty($('#findForm input[name=emailAddress]').val())) {
174                    dimodeLib.bandMessage('warning', '메일 주소를 입력해주세요.');
175                    return false;
176                }
177                else {
178                    $('#findForm button[type=submit]').attr('disabled', true);
179                    dimodeLib.bandMessage('warning', '처리 중입니다.', 0);
180                }
181            },
182            success: function (returnData) {
183                if (returnData == 'success') {
184                    dimodeLib.bandMessage('success', '해당 메일로 메일을 발송하였습니다.');
185                    $('#findForm input[name=emailAddress]').val('');
186                }
187                else if (returnData == 'notExist') {
188                    dimodeLib.bandMessage('success', '해당 메일 주소가 존재하지 않습니다.');
189                }
190                else {
191                    dimodeLib.bandMessage('danger', '오류가 있습니다.#1', 0);
192                }
193
194                $('#findForm button[type=submit]').removeAttr('disabled');
195            },
196            error: function () {
197                dimodeLib.bandMessage('danger', '오류가 있습니다.#2', 0);
198            }
199        });
200        // 회원정보 찾기 e
201
202        // 패스워드 설정 s
203        $('#passwordForm').ajaxForm({
204            beforeSubmit: function () {
205                var returnValue = false;
206                var $oldPassword = $('#passwordForm input[name=oldPassword]');
207                var $newPassword = $('#passwordForm input[name=newPassword]');
208
209                dimodeLib.bandMessage('warning', '처리 중입니다.', 0);
210
211                if (!dimodeLib.isValidated('#passwordForm')) {
212                    returnValue = false;
213                }
214                else if ($oldPassword.val() === $newPassword.val()) {
215                    dimodeLib.bandMessage('warning', '새로운 패스워드 값은 기존 패스워드와 다르게 설정해주세요.');
216                    $newPassword.focus();
217                    returnValue = false;
218                }
219                else {
220                    $('#passwordForm button[type=submit]').attr('disabled', true);
221                    dimodeLib.bandMessage('warning', '처리 중입니다.', 0);
222                    returnValue = true;
223                }
224
225                return returnValue;
226            },
227            success: function (res) {
228                switch (res) {
229                    case 'success':
230                        dimodeLib.bandMessageCookie('success', '패스워드를 정상적으로 변경하였습니다.');
231                        location.href = '/Guide/LatestUrl';
232                        break;
233
234                    case 'invalid':
235                        dimodeLib.bandMessage('warning', '값이 유효하지 않습니다');
236                        $('#passwordForm button[type=submit]').removeAttr('disabled');
237                        break;
238
239                    default:
240                        dimodeLib.bandMessage('danger', '오류가 있습니다.#1', 0);
241                        $('#passwordForm button[type=submit]').removeAttr('disabled');
242                        break;
243                }
244            },
245            error: function () {
246                dimodeLib.bandMessage('danger', '오류가 있습니다.#2', 0);
247                $('#passwordForm button[type=submit]').removeAttr('disabled');
248            }
249        });
250        // 패스워드 설정 e
251		
252		// 회원탈퇴 s 
253        $('#deleteIDForm').ajaxForm({
254            beforeSubmit: function () {
255                dimodeLib.bandMessage('warning', '처리 중입니다.', 0);
256                return dimodeLib.isValidated('#deleteIDForm');
257            },
258            success: function (res) {
259                switch (res) {
260                    case 'success':
261                        dimodeLib.bandMessage('success', '회원 삭제를 진행하였습니다.');
262                        location.href = '/Guide/LatestUrl';
263                        break;
264
265                    default:
266                        dimodeLib.bandMessage('danger', '오류가 있습니다.#1', 0);
267                        break;
268                }
269            },
270            error: function () {
271                dimodeLib.bandMessage('danger', '오류가 있습니다.#2', 0);
272            }
273        });
274        // 회원탈퇴 e
275    });
276})(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.