nodebb-plugin-sso-biogrenci 2.0.6 → 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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/static/lib/admin.js +47 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-sso-biogrenci",
3
- "version": "2.0.6",
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,21 +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.alert({
14
- type: 'success',
15
- alert_id: 'biogrenci-settings-saved',
16
- title: 'Ayarlar Kaydedildi',
17
- message: 'bi\'öğrenci ayarları başarıyla kaydedildi.',
18
- timeout: 2500,
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());
19
27
  });
20
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());
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
+ }
21
58
  });
22
59
  };
23
60