nodebb-plugin-sso-biogrenci 2.0.5 → 2.0.7

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-sso-biogrenci",
3
- "version": "2.0.5",
3
+ "version": "2.0.7",
4
4
  "description": "bi'öğrenci öğrenci fırsatları sayfası for NodeBB",
5
5
  "main": "library.js",
6
6
  "keywords": [
@@ -3,15 +3,58 @@
3
3
  define('admin/plugins/biogrenci', ['settings'], function (Settings) {
4
4
  var ACP = {};
5
5
 
6
+ console.log('[biogrenci] admin.js loaded, Settings module:', typeof Settings);
7
+ console.log('[biogrenci] Settings methods:', Settings ? Object.keys(Settings) : 'N/A');
8
+ console.log('[biogrenci] Settings.load:', typeof Settings.load);
9
+ console.log('[biogrenci] Settings.save:', typeof Settings.save);
10
+ console.log('[biogrenci] Settings constructor:', typeof Settings.prototype);
11
+
6
12
  ACP.init = function () {
7
- var settings = new Settings('biogrenci', $('#biogrenci-settings'), function () {
8
- // settings loaded
13
+ console.log('[biogrenci] ACP.init called');
14
+
15
+ var formEl = $('#biogrenci-settings');
16
+ console.log('[biogrenci] Form element found:', formEl.length > 0);
17
+ console.log('[biogrenci] Form inputs:', formEl.find('[data-key]').length);
18
+ formEl.find('[data-key]').each(function () {
19
+ console.log('[biogrenci] input data-key:', $(this).attr('data-key'), 'value:', $(this).val());
9
20
  });
10
21
 
11
- $('#save').on('click', function () {
12
- settings.persist(function () {
13
- app.alertSuccess('Ayarlar kaydedildi.');
22
+ try {
23
+ Settings.load('biogrenci', formEl, function () {
24
+ console.log('[biogrenci] Settings loaded successfully');
25
+ formEl.find('[data-key]').each(function () {
26
+ console.log('[biogrenci] loaded value -', $(this).attr('data-key') + ':', $(this).val());
27
+ });
28
+ });
29
+ console.log('[biogrenci] Settings.load() called without error');
30
+ } catch (e) {
31
+ console.error('[biogrenci] Settings.load() threw error:', e);
32
+ }
33
+
34
+ var saveBtn = $('#save');
35
+ console.log('[biogrenci] Save button found:', saveBtn.length > 0);
36
+
37
+ saveBtn.on('click', function () {
38
+ console.log('[biogrenci] Save button clicked');
39
+ formEl.find('[data-key]').each(function () {
40
+ console.log('[biogrenci] saving -', $(this).attr('data-key') + ':', $(this).val());
14
41
  });
42
+
43
+ try {
44
+ Settings.save('biogrenci', formEl, function () {
45
+ console.log('[biogrenci] Settings saved successfully!');
46
+ app.alert({
47
+ type: 'success',
48
+ alert_id: 'biogrenci-settings-saved',
49
+ title: 'Ayarlar Kaydedildi',
50
+ message: 'bi\'öğrenci ayarları başarıyla kaydedildi.',
51
+ timeout: 2500,
52
+ });
53
+ });
54
+ console.log('[biogrenci] Settings.save() called without error');
55
+ } catch (e) {
56
+ console.error('[biogrenci] Settings.save() threw error:', e);
57
+ }
15
58
  });
16
59
  };
17
60
 
@@ -11,11 +11,11 @@
11
11
  <form id="biogrenci-settings">
12
12
  <div class="form-group">
13
13
  <label for="clientId">Client ID</label>
14
- <input type="text" id="clientId" name="clientId" class="form-control" placeholder="Partner Client ID">
14
+ <input type="text" id="clientId" name="clientId" data-key="clientId" class="form-control" placeholder="Partner Client ID">
15
15
  </div>
16
16
  <div class="form-group">
17
17
  <label for="clientSecret">Client Secret</label>
18
- <input type="password" id="clientSecret" name="clientSecret" class="form-control" placeholder="Partner Client Secret">
18
+ <input type="password" id="clientSecret" name="clientSecret" data-key="clientSecret" class="form-control" placeholder="Partner Client Secret">
19
19
  </div>
20
20
  </form>
21
21
  </div>