jsxgrid 2.0.0 → 2.2.0
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/README.md +65 -0
- package/dist/fields/jsgrid.field.XDateTimeField.min.js +1 -1
- package/dist/fields/jsgrid.field.XRowSelectField.min.js +1 -1
- package/dist/fields/jsgrid.field.Xcheckbox.min.js +1 -1
- package/dist/fields/jsgrid.field.Xcontrol.min.js +6 -0
- package/dist/fields/jsgrid.field.XimgField.min.js +1 -1
- package/dist/fields/jsgrid.field.Xjsoneditor.min.js +1 -1
- package/dist/fields/jsgrid.field.Xnumber.min.js +6 -0
- package/dist/fields/jsgrid.field.Xselect.min.js +1 -1
- package/dist/fields/jsgrid.field.Xtext.min.js +6 -0
- package/dist/fields/jsgrid.field.Xtextarea.min.js +1 -1
- package/dist/fields/lib/jsGridSummaryPlugin.min.js +1 -1
- package/dist/fields/lib/jsgrid.popup.basic.min.js +1 -1
- package/dist/i18n/jsgrid-Ko.js +18 -0
- package/dist/i18n/jsgrid-cs.js +18 -0
- package/dist/i18n/jsgrid-de.js +18 -0
- package/dist/i18n/jsgrid-el.js +18 -0
- package/dist/i18n/jsgrid-es.js +18 -0
- package/dist/i18n/jsgrid-fa.js +18 -0
- package/dist/i18n/jsgrid-fr.js +18 -0
- package/dist/i18n/jsgrid-he.js +18 -0
- package/dist/i18n/jsgrid-it.js +18 -0
- package/dist/i18n/jsgrid-ja.js +18 -0
- package/dist/i18n/jsgrid-ka.js +18 -0
- package/dist/i18n/jsgrid-lt.js +18 -0
- package/dist/i18n/jsgrid-pl.js +18 -0
- package/dist/i18n/jsgrid-pt-br.js +18 -0
- package/dist/i18n/jsgrid-pt.js +18 -0
- package/dist/i18n/jsgrid-ru.js +18 -0
- package/dist/i18n/jsgrid-tr.js +18 -0
- package/dist/i18n/jsgrid-zh-cn.js +18 -0
- package/dist/i18n/jsgrid-zh-tw.js +18 -0
- package/dist/jsxgrid-fields.js +1 -1
- package/dist/jsxgrid-fields.min.js +1 -1
- package/dist/jsxgrid-theme.css +1 -1
- package/dist/jsxgrid-xfields.js +393 -2
- package/dist/jsxgrid-xfields.min.js +2 -2
- package/dist/jsxgrid.css +1 -1
- package/dist/jsxgrid.js +52 -5
- package/dist/jsxgrid.min.js +2 -2
- package/package.json +1 -1
- package/src/fields/jsgrid.field.Xcontrol.js +229 -0
- package/src/fields/jsgrid.field.Xnumber.js +84 -0
- package/src/fields/jsgrid.field.Xtext.js +76 -0
- package/src/i18n/Ko.js +18 -0
- package/src/i18n/cs.js +18 -0
- package/src/i18n/de.js +18 -0
- package/src/i18n/el.js +18 -0
- package/src/i18n/es.js +18 -0
- package/src/i18n/fa.js +18 -0
- package/src/i18n/fr.js +18 -0
- package/src/i18n/he.js +18 -0
- package/src/i18n/it.js +18 -0
- package/src/i18n/ja.js +18 -0
- package/src/i18n/ka.js +18 -0
- package/src/i18n/lt.js +18 -0
- package/src/i18n/pl.js +18 -0
- package/src/i18n/pt-br.js +18 -0
- package/src/i18n/pt.js +18 -0
- package/src/i18n/ru.js +18 -0
- package/src/i18n/tr.js +18 -0
- package/src/i18n/zh-cn.js +18 -0
- package/src/i18n/zh-tw.js +18 -0
- package/src/jsgrid.core.js +44 -2
- package/src/jsgrid.validation.js +6 -1
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
(function(jsGrid, $, undefined) {
|
|
2
|
+
|
|
3
|
+
// Standalone: does not extend jsGrid.TextField, only jsGrid.Field.
|
|
4
|
+
|
|
5
|
+
var Field = jsGrid.Field;
|
|
6
|
+
|
|
7
|
+
var Xtext = function (config) {
|
|
8
|
+
Field.call(this, config);
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
Xtext.prototype = new Field({
|
|
12
|
+
autosearch: true,
|
|
13
|
+
readOnly: false,
|
|
14
|
+
defaultSelected: null,//value to preset the filter input with, applied once on first filter render then reset
|
|
15
|
+
|
|
16
|
+
filterTemplate: function () {
|
|
17
|
+
if (!this.filtering)
|
|
18
|
+
return "";
|
|
19
|
+
|
|
20
|
+
var grid = this._grid,
|
|
21
|
+
$result = this.filterControl = this._createTextBox();
|
|
22
|
+
|
|
23
|
+
if (this.autosearch) {
|
|
24
|
+
$result.on("keypress", function (e) {
|
|
25
|
+
if (e.which === 13) {
|
|
26
|
+
grid.search();
|
|
27
|
+
e.preventDefault();
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (this.defaultSelected !== null) {
|
|
33
|
+
$result.val(this.defaultSelected);
|
|
34
|
+
this.defaultSelected = null;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return $result;
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
insertTemplate: function () {
|
|
41
|
+
if (!this.inserting)
|
|
42
|
+
return "";
|
|
43
|
+
|
|
44
|
+
return this.insertControl = this._createTextBox();
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
editTemplate: function (value) {
|
|
48
|
+
if (!this.editing)
|
|
49
|
+
return this.itemTemplate.apply(this, arguments);
|
|
50
|
+
|
|
51
|
+
var $result = this.editControl = this._createTextBox();
|
|
52
|
+
$result.val(value);
|
|
53
|
+
return $result;
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
filterValue: function () {
|
|
57
|
+
return this.filterControl.val();
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
insertValue: function () {
|
|
61
|
+
return this.insertControl.val();
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
editValue: function () {
|
|
65
|
+
return this.editControl.val();
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
_createTextBox: function () {
|
|
69
|
+
return $("<input>").attr("type", "text")
|
|
70
|
+
.prop("readonly", !!this.readOnly);
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
jsGrid.fields.Xtext = Xtext;
|
|
75
|
+
|
|
76
|
+
}(jsGrid, jQuery));
|
package/src/i18n/Ko.js
CHANGED
|
@@ -28,6 +28,24 @@
|
|
|
28
28
|
insertButtonTooltip: "등록",
|
|
29
29
|
updateButtonTooltip: "업데이트",
|
|
30
30
|
cancelEditButtonTooltip: "변경 취소"
|
|
31
|
+
},
|
|
32
|
+
Xcontrol: {
|
|
33
|
+
searchModeButtonTooltip: "검색 모드",
|
|
34
|
+
insertModeButtonTooltip: "등록 모드",
|
|
35
|
+
editButtonTooltip: "수정",
|
|
36
|
+
deleteButtonTooltip: "삭제",
|
|
37
|
+
searchButtonTooltip: "검색",
|
|
38
|
+
clearFilterButtonTooltip: "초기화",
|
|
39
|
+
insertButtonTooltip: "등록",
|
|
40
|
+
updateButtonTooltip: "업데이트",
|
|
41
|
+
cancelEditButtonTooltip: "변경 취소"
|
|
42
|
+
},
|
|
43
|
+
XimgField: {
|
|
44
|
+
editButtonText: "파일 관리자 열기"
|
|
45
|
+
},
|
|
46
|
+
Xjsoneditor: {
|
|
47
|
+
editText: "편집기",
|
|
48
|
+
closeText: "저장"
|
|
31
49
|
}
|
|
32
50
|
},
|
|
33
51
|
|
package/src/i18n/cs.js
CHANGED
|
@@ -28,6 +28,24 @@
|
|
|
28
28
|
insertButtonTooltip: "Vložit",
|
|
29
29
|
updateButtonTooltip: "Upravit",
|
|
30
30
|
cancelEditButtonTooltip: "Zrušit editaci"
|
|
31
|
+
},
|
|
32
|
+
Xcontrol: {
|
|
33
|
+
searchModeButtonTooltip: "Přepnout na hledání",
|
|
34
|
+
insertModeButtonTooltip: "Přepnout na vlkádání",
|
|
35
|
+
editButtonTooltip: "Upravit",
|
|
36
|
+
deleteButtonTooltip: "Smazat",
|
|
37
|
+
searchButtonTooltip: "Hledat",
|
|
38
|
+
clearFilterButtonTooltip: "Smazat filtr",
|
|
39
|
+
insertButtonTooltip: "Vložit",
|
|
40
|
+
updateButtonTooltip: "Upravit",
|
|
41
|
+
cancelEditButtonTooltip: "Zrušit editaci"
|
|
42
|
+
},
|
|
43
|
+
XimgField: {
|
|
44
|
+
editButtonText: "Otevřít správce souborů"
|
|
45
|
+
},
|
|
46
|
+
Xjsoneditor: {
|
|
47
|
+
editText: "Editor",
|
|
48
|
+
closeText: "Uložit"
|
|
31
49
|
}
|
|
32
50
|
},
|
|
33
51
|
|
package/src/i18n/de.js
CHANGED
|
@@ -28,6 +28,24 @@
|
|
|
28
28
|
insertButtonTooltip: "Hinzufügen",
|
|
29
29
|
updateButtonTooltip: "Speichern",
|
|
30
30
|
cancelEditButtonTooltip: "Abbrechen"
|
|
31
|
+
},
|
|
32
|
+
Xcontrol: {
|
|
33
|
+
searchModeButtonTooltip: "Suche",
|
|
34
|
+
insertModeButtonTooltip: "Eintrag hinzufügen",
|
|
35
|
+
editButtonTooltip: "Bearbeiten",
|
|
36
|
+
deleteButtonTooltip: "Löschen",
|
|
37
|
+
searchButtonTooltip: "Eintrag finden",
|
|
38
|
+
clearFilterButtonTooltip: "Filter zurücksetzen",
|
|
39
|
+
insertButtonTooltip: "Hinzufügen",
|
|
40
|
+
updateButtonTooltip: "Speichern",
|
|
41
|
+
cancelEditButtonTooltip: "Abbrechen"
|
|
42
|
+
},
|
|
43
|
+
XimgField: {
|
|
44
|
+
editButtonText: "Dateimanager öffnen"
|
|
45
|
+
},
|
|
46
|
+
Xjsoneditor: {
|
|
47
|
+
editText: "Editor",
|
|
48
|
+
closeText: "Speichern"
|
|
31
49
|
}
|
|
32
50
|
},
|
|
33
51
|
|
package/src/i18n/el.js
CHANGED
|
@@ -28,6 +28,24 @@
|
|
|
28
28
|
insertButtonTooltip: "Εισαγωγή",
|
|
29
29
|
updateButtonTooltip: "Αποθήκευση",
|
|
30
30
|
cancelEditButtonTooltip: "Ακύρωση"
|
|
31
|
+
},
|
|
32
|
+
Xcontrol: {
|
|
33
|
+
searchModeButtonTooltip: "Αναζήτηση",
|
|
34
|
+
insertModeButtonTooltip: "Εισάγετε φίλτρο",
|
|
35
|
+
editButtonTooltip: "Επεξεργασία",
|
|
36
|
+
deleteButtonTooltip: "Διαγραφή",
|
|
37
|
+
searchButtonTooltip: "Εύρεση",
|
|
38
|
+
clearFilterButtonTooltip: "Αφαίρεση φίλτρου",
|
|
39
|
+
insertButtonTooltip: "Εισαγωγή",
|
|
40
|
+
updateButtonTooltip: "Αποθήκευση",
|
|
41
|
+
cancelEditButtonTooltip: "Ακύρωση"
|
|
42
|
+
},
|
|
43
|
+
XimgField: {
|
|
44
|
+
editButtonText: "Άνοιγμα διαχειριστή αρχείων"
|
|
45
|
+
},
|
|
46
|
+
Xjsoneditor: {
|
|
47
|
+
editText: "Επεξεργαστής",
|
|
48
|
+
closeText: "Αποθήκευση"
|
|
31
49
|
}
|
|
32
50
|
},
|
|
33
51
|
|
package/src/i18n/es.js
CHANGED
|
@@ -28,6 +28,24 @@
|
|
|
28
28
|
insertButtonTooltip: "Insertar",
|
|
29
29
|
updateButtonTooltip: "Actualizar",
|
|
30
30
|
cancelEditButtonTooltip: "Cancelar edición"
|
|
31
|
+
},
|
|
32
|
+
Xcontrol: {
|
|
33
|
+
searchModeButtonTooltip: "Cambiar a búsqueda",
|
|
34
|
+
insertModeButtonTooltip: "Cambiar a inserción",
|
|
35
|
+
editButtonTooltip: "Editar",
|
|
36
|
+
deleteButtonTooltip: "Suprimir",
|
|
37
|
+
searchButtonTooltip: "Buscar",
|
|
38
|
+
clearFilterButtonTooltip: "Borrar filtro",
|
|
39
|
+
insertButtonTooltip: "Insertar",
|
|
40
|
+
updateButtonTooltip: "Actualizar",
|
|
41
|
+
cancelEditButtonTooltip: "Cancelar edición"
|
|
42
|
+
},
|
|
43
|
+
XimgField: {
|
|
44
|
+
editButtonText: "Abrir gestor de archivos"
|
|
45
|
+
},
|
|
46
|
+
Xjsoneditor: {
|
|
47
|
+
editText: "Editor",
|
|
48
|
+
closeText: "Guardar"
|
|
31
49
|
}
|
|
32
50
|
},
|
|
33
51
|
|
package/src/i18n/fa.js
CHANGED
|
@@ -28,6 +28,24 @@
|
|
|
28
28
|
insertButtonTooltip: "درج",
|
|
29
29
|
updateButtonTooltip: "به روز رسانی",
|
|
30
30
|
cancelEditButtonTooltip: "لغو ویرایش"
|
|
31
|
+
},
|
|
32
|
+
Xcontrol: {
|
|
33
|
+
searchModeButtonTooltip: "تغییر به حالت جستجو",
|
|
34
|
+
insertModeButtonTooltip: "تغییر به حالت درج",
|
|
35
|
+
editButtonTooltip: "تغییر به حالت ویرایش",
|
|
36
|
+
deleteButtonTooltip: "حذف",
|
|
37
|
+
searchButtonTooltip: "جستجو",
|
|
38
|
+
clearFilterButtonTooltip: "پاک کردن فیلترها",
|
|
39
|
+
insertButtonTooltip: "درج",
|
|
40
|
+
updateButtonTooltip: "به روز رسانی",
|
|
41
|
+
cancelEditButtonTooltip: "لغو ویرایش"
|
|
42
|
+
},
|
|
43
|
+
XimgField: {
|
|
44
|
+
editButtonText: "باز کردن مدیر فایل"
|
|
45
|
+
},
|
|
46
|
+
Xjsoneditor: {
|
|
47
|
+
editText: "ویرایشگر",
|
|
48
|
+
closeText: "ذخیره"
|
|
31
49
|
}
|
|
32
50
|
},
|
|
33
51
|
|
package/src/i18n/fr.js
CHANGED
|
@@ -28,6 +28,24 @@
|
|
|
28
28
|
insertButtonTooltip: "Ajouter",
|
|
29
29
|
updateButtonTooltip: "Sauvegarder",
|
|
30
30
|
cancelEditButtonTooltip: "Annuler"
|
|
31
|
+
},
|
|
32
|
+
Xcontrol: {
|
|
33
|
+
searchModeButtonTooltip: "Recherche",
|
|
34
|
+
insertModeButtonTooltip: "Ajouter une entrée",
|
|
35
|
+
editButtonTooltip: "Changer",
|
|
36
|
+
deleteButtonTooltip: "Effacer",
|
|
37
|
+
searchButtonTooltip: "Trouve",
|
|
38
|
+
clearFilterButtonTooltip: "Effacer",
|
|
39
|
+
insertButtonTooltip: "Ajouter",
|
|
40
|
+
updateButtonTooltip: "Sauvegarder",
|
|
41
|
+
cancelEditButtonTooltip: "Annuler"
|
|
42
|
+
},
|
|
43
|
+
XimgField: {
|
|
44
|
+
editButtonText: "Ouvrir le gestionnaire de fichiers"
|
|
45
|
+
},
|
|
46
|
+
Xjsoneditor: {
|
|
47
|
+
editText: "Éditeur",
|
|
48
|
+
closeText: "Enregistrer"
|
|
31
49
|
}
|
|
32
50
|
},
|
|
33
51
|
|
package/src/i18n/he.js
CHANGED
|
@@ -28,6 +28,24 @@
|
|
|
28
28
|
insertButtonTooltip: "הכנסה",
|
|
29
29
|
updateButtonTooltip: "עדכון",
|
|
30
30
|
cancelEditButtonTooltip: "ביטול עריכה"
|
|
31
|
+
},
|
|
32
|
+
Xcontrol: {
|
|
33
|
+
searchModeButtonTooltip: "ביצוע חיפוש",
|
|
34
|
+
insertModeButtonTooltip: "ביצוע עריכת שורה",
|
|
35
|
+
editButtonTooltip: "עריכה",
|
|
36
|
+
deleteButtonTooltip: "מחיקה",
|
|
37
|
+
searchButtonTooltip: "חיפוש",
|
|
38
|
+
clearFilterButtonTooltip: "ניקוי מסנן",
|
|
39
|
+
insertButtonTooltip: "הכנסה",
|
|
40
|
+
updateButtonTooltip: "עדכון",
|
|
41
|
+
cancelEditButtonTooltip: "ביטול עריכה"
|
|
42
|
+
},
|
|
43
|
+
XimgField: {
|
|
44
|
+
editButtonText: "פתח מנהל קבצים"
|
|
45
|
+
},
|
|
46
|
+
Xjsoneditor: {
|
|
47
|
+
editText: "עורך",
|
|
48
|
+
closeText: "שמור"
|
|
31
49
|
}
|
|
32
50
|
},
|
|
33
51
|
|
package/src/i18n/it.js
CHANGED
|
@@ -28,6 +28,24 @@
|
|
|
28
28
|
insertButtonTooltip: "Inserisci",
|
|
29
29
|
updateButtonTooltip: "Aggiorna",
|
|
30
30
|
cancelEditButtonTooltip: "Annulla"
|
|
31
|
+
},
|
|
32
|
+
Xcontrol: {
|
|
33
|
+
searchModeButtonTooltip: "Modallità ricerca",
|
|
34
|
+
insertModeButtonTooltip: "Modalità inserimento",
|
|
35
|
+
editButtonTooltip: "Modifica",
|
|
36
|
+
deleteButtonTooltip: "Cancella",
|
|
37
|
+
searchButtonTooltip: "Cerca",
|
|
38
|
+
clearFilterButtonTooltip: "Cancella filtri",
|
|
39
|
+
insertButtonTooltip: "Inserisci",
|
|
40
|
+
updateButtonTooltip: "Aggiorna",
|
|
41
|
+
cancelEditButtonTooltip: "Annulla"
|
|
42
|
+
},
|
|
43
|
+
XimgField: {
|
|
44
|
+
editButtonText: "Apri gestore file"
|
|
45
|
+
},
|
|
46
|
+
Xjsoneditor: {
|
|
47
|
+
editText: "Editor",
|
|
48
|
+
closeText: "Salva"
|
|
31
49
|
}
|
|
32
50
|
},
|
|
33
51
|
|
package/src/i18n/ja.js
CHANGED
|
@@ -28,6 +28,24 @@
|
|
|
28
28
|
insertButtonTooltip: "登録",
|
|
29
29
|
updateButtonTooltip: "更新",
|
|
30
30
|
cancelEditButtonTooltip: "編集戻す"
|
|
31
|
+
},
|
|
32
|
+
Xcontrol: {
|
|
33
|
+
searchModeButtonTooltip: "検索モードへ",
|
|
34
|
+
insertModeButtonTooltip: "登録モードへ",
|
|
35
|
+
editButtonTooltip: "編集",
|
|
36
|
+
deleteButtonTooltip: "削除",
|
|
37
|
+
searchButtonTooltip: "フィルター",
|
|
38
|
+
clearFilterButtonTooltip: "クリア",
|
|
39
|
+
insertButtonTooltip: "登録",
|
|
40
|
+
updateButtonTooltip: "更新",
|
|
41
|
+
cancelEditButtonTooltip: "編集戻す"
|
|
42
|
+
},
|
|
43
|
+
XimgField: {
|
|
44
|
+
editButtonText: "ファイルマネージャーを開く"
|
|
45
|
+
},
|
|
46
|
+
Xjsoneditor: {
|
|
47
|
+
editText: "エディター",
|
|
48
|
+
closeText: "保存"
|
|
31
49
|
}
|
|
32
50
|
},
|
|
33
51
|
|
package/src/i18n/ka.js
CHANGED
|
@@ -28,6 +28,24 @@
|
|
|
28
28
|
insertButtonTooltip: "დამატება",
|
|
29
29
|
updateButtonTooltip: "შენახვა",
|
|
30
30
|
cancelEditButtonTooltip: "გაუქმება"
|
|
31
|
+
},
|
|
32
|
+
Xcontrol: {
|
|
33
|
+
searchModeButtonTooltip: "ძებნა",
|
|
34
|
+
insertModeButtonTooltip: "ჩანაწერის დამატება",
|
|
35
|
+
editButtonTooltip: "შესწორება",
|
|
36
|
+
deleteButtonTooltip: "წაშლა",
|
|
37
|
+
searchButtonTooltip: "ძებნა",
|
|
38
|
+
clearFilterButtonTooltip: "ფილტრის გასუფთავება",
|
|
39
|
+
insertButtonTooltip: "დამატება",
|
|
40
|
+
updateButtonTooltip: "შენახვა",
|
|
41
|
+
cancelEditButtonTooltip: "გაუქმება"
|
|
42
|
+
},
|
|
43
|
+
XimgField: {
|
|
44
|
+
editButtonText: "ფაილების მენეჯერის გახსნა"
|
|
45
|
+
},
|
|
46
|
+
Xjsoneditor: {
|
|
47
|
+
editText: "რედაქტორი",
|
|
48
|
+
closeText: "შენახვა"
|
|
31
49
|
}
|
|
32
50
|
},
|
|
33
51
|
|
package/src/i18n/lt.js
CHANGED
|
@@ -28,6 +28,24 @@
|
|
|
28
28
|
insertButtonTooltip: "Pridėti",
|
|
29
29
|
updateButtonTooltip: "Išsaugoti",
|
|
30
30
|
cancelEditButtonTooltip: "Atšaukti"
|
|
31
|
+
},
|
|
32
|
+
Xcontrol: {
|
|
33
|
+
searchModeButtonTooltip: "Paieška",
|
|
34
|
+
insertModeButtonTooltip: "Naujas įrašas",
|
|
35
|
+
editButtonTooltip: "Pakeisti",
|
|
36
|
+
deleteButtonTooltip: "Pašalinti",
|
|
37
|
+
searchButtonTooltip: "Surasti",
|
|
38
|
+
clearFilterButtonTooltip: "Išvalyti filtrą",
|
|
39
|
+
insertButtonTooltip: "Pridėti",
|
|
40
|
+
updateButtonTooltip: "Išsaugoti",
|
|
41
|
+
cancelEditButtonTooltip: "Atšaukti"
|
|
42
|
+
},
|
|
43
|
+
XimgField: {
|
|
44
|
+
editButtonText: "Atidaryti failų tvarkyklę"
|
|
45
|
+
},
|
|
46
|
+
Xjsoneditor: {
|
|
47
|
+
editText: "Redaktorius",
|
|
48
|
+
closeText: "Išsaugoti"
|
|
31
49
|
}
|
|
32
50
|
},
|
|
33
51
|
|
package/src/i18n/pl.js
CHANGED
|
@@ -28,6 +28,24 @@
|
|
|
28
28
|
insertButtonTooltip: "Dodaj",
|
|
29
29
|
updateButtonTooltip: "Aktualizuj",
|
|
30
30
|
cancelEditButtonTooltip: "Anuluj edytowanie"
|
|
31
|
+
},
|
|
32
|
+
Xcontrol: {
|
|
33
|
+
searchModeButtonTooltip: "Wyszukiwanie",
|
|
34
|
+
insertModeButtonTooltip: "Dodawanie",
|
|
35
|
+
editButtonTooltip: "Edytuj",
|
|
36
|
+
deleteButtonTooltip: "Usuń",
|
|
37
|
+
searchButtonTooltip: "Szukaj",
|
|
38
|
+
clearFilterButtonTooltip: "Wyczyść filtr",
|
|
39
|
+
insertButtonTooltip: "Dodaj",
|
|
40
|
+
updateButtonTooltip: "Aktualizuj",
|
|
41
|
+
cancelEditButtonTooltip: "Anuluj edytowanie"
|
|
42
|
+
},
|
|
43
|
+
XimgField: {
|
|
44
|
+
editButtonText: "Otwórz menedżera plików"
|
|
45
|
+
},
|
|
46
|
+
Xjsoneditor: {
|
|
47
|
+
editText: "Edytor",
|
|
48
|
+
closeText: "Zapisz"
|
|
31
49
|
}
|
|
32
50
|
},
|
|
33
51
|
|
package/src/i18n/pt-br.js
CHANGED
|
@@ -28,6 +28,24 @@
|
|
|
28
28
|
insertButtonTooltip: "Adicionar",
|
|
29
29
|
updateButtonTooltip: "Atualizar",
|
|
30
30
|
cancelEditButtonTooltip: "Cancelar Edição"
|
|
31
|
+
},
|
|
32
|
+
Xcontrol: {
|
|
33
|
+
searchModeButtonTooltip: "Mudar para busca",
|
|
34
|
+
insertModeButtonTooltip: "Mudar para inserção",
|
|
35
|
+
editButtonTooltip: "Editar",
|
|
36
|
+
deleteButtonTooltip: "Remover",
|
|
37
|
+
searchButtonTooltip: "Buscar",
|
|
38
|
+
clearFilterButtonTooltip: "Remover filtro",
|
|
39
|
+
insertButtonTooltip: "Adicionar",
|
|
40
|
+
updateButtonTooltip: "Atualizar",
|
|
41
|
+
cancelEditButtonTooltip: "Cancelar Edição"
|
|
42
|
+
},
|
|
43
|
+
XimgField: {
|
|
44
|
+
editButtonText: "Abrir gerenciador de arquivos"
|
|
45
|
+
},
|
|
46
|
+
Xjsoneditor: {
|
|
47
|
+
editText: "Editor",
|
|
48
|
+
closeText: "Salvar"
|
|
31
49
|
}
|
|
32
50
|
},
|
|
33
51
|
|
package/src/i18n/pt.js
CHANGED
|
@@ -28,6 +28,24 @@
|
|
|
28
28
|
insertButtonTooltip: "Adicionar",
|
|
29
29
|
updateButtonTooltip: "Atualizar",
|
|
30
30
|
cancelEditButtonTooltip: "Cancelar Edição"
|
|
31
|
+
},
|
|
32
|
+
Xcontrol: {
|
|
33
|
+
searchModeButtonTooltip: "Mudar para busca",
|
|
34
|
+
insertModeButtonTooltip: "Mudar para inserção",
|
|
35
|
+
editButtonTooltip: "Editar",
|
|
36
|
+
deleteButtonTooltip: "Remover",
|
|
37
|
+
searchButtonTooltip: "Buscar",
|
|
38
|
+
clearFilterButtonTooltip: "Remover filtro",
|
|
39
|
+
insertButtonTooltip: "Adicionar",
|
|
40
|
+
updateButtonTooltip: "Atualizar",
|
|
41
|
+
cancelEditButtonTooltip: "Cancelar Edição"
|
|
42
|
+
},
|
|
43
|
+
XimgField: {
|
|
44
|
+
editButtonText: "Abrir gestor de ficheiros"
|
|
45
|
+
},
|
|
46
|
+
Xjsoneditor: {
|
|
47
|
+
editText: "Editor",
|
|
48
|
+
closeText: "Guardar"
|
|
31
49
|
}
|
|
32
50
|
},
|
|
33
51
|
|
package/src/i18n/ru.js
CHANGED
|
@@ -28,6 +28,24 @@
|
|
|
28
28
|
insertButtonTooltip: "Добавить",
|
|
29
29
|
updateButtonTooltip: "Сохранить",
|
|
30
30
|
cancelEditButtonTooltip: "Отменить"
|
|
31
|
+
},
|
|
32
|
+
Xcontrol: {
|
|
33
|
+
searchModeButtonTooltip: "Поиск",
|
|
34
|
+
insertModeButtonTooltip: "Добавить запись",
|
|
35
|
+
editButtonTooltip: "Изменить",
|
|
36
|
+
deleteButtonTooltip: "Удалить",
|
|
37
|
+
searchButtonTooltip: "Найти",
|
|
38
|
+
clearFilterButtonTooltip: "Очистить фильтр",
|
|
39
|
+
insertButtonTooltip: "Добавить",
|
|
40
|
+
updateButtonTooltip: "Сохранить",
|
|
41
|
+
cancelEditButtonTooltip: "Отменить"
|
|
42
|
+
},
|
|
43
|
+
XimgField: {
|
|
44
|
+
editButtonText: "Открыть менеджер файлов"
|
|
45
|
+
},
|
|
46
|
+
Xjsoneditor: {
|
|
47
|
+
editText: "Редактор",
|
|
48
|
+
closeText: "Сохранить"
|
|
31
49
|
}
|
|
32
50
|
},
|
|
33
51
|
|
package/src/i18n/tr.js
CHANGED
|
@@ -28,6 +28,24 @@
|
|
|
28
28
|
insertButtonTooltip: "Ekle",
|
|
29
29
|
updateButtonTooltip: "Güncelle",
|
|
30
30
|
cancelEditButtonTooltip: "Güncelleme iptali"
|
|
31
|
+
},
|
|
32
|
+
Xcontrol: {
|
|
33
|
+
searchModeButtonTooltip: "Arama moduna geç",
|
|
34
|
+
insertModeButtonTooltip: "Yeni kayıt moduna geç",
|
|
35
|
+
editButtonTooltip: "Değiştir",
|
|
36
|
+
deleteButtonTooltip: "Sil",
|
|
37
|
+
searchButtonTooltip: "Bul",
|
|
38
|
+
clearFilterButtonTooltip: "Filtreyi temizle",
|
|
39
|
+
insertButtonTooltip: "Ekle",
|
|
40
|
+
updateButtonTooltip: "Güncelle",
|
|
41
|
+
cancelEditButtonTooltip: "Güncelleme iptali"
|
|
42
|
+
},
|
|
43
|
+
XimgField: {
|
|
44
|
+
editButtonText: "Dosya yöneticisini aç"
|
|
45
|
+
},
|
|
46
|
+
Xjsoneditor: {
|
|
47
|
+
editText: "Düzenleyici",
|
|
48
|
+
closeText: "Kaydet"
|
|
31
49
|
}
|
|
32
50
|
},
|
|
33
51
|
|
package/src/i18n/zh-cn.js
CHANGED
|
@@ -28,6 +28,24 @@
|
|
|
28
28
|
insertButtonTooltip: "插入",
|
|
29
29
|
updateButtonTooltip: "更新",
|
|
30
30
|
cancelEditButtonTooltip: "取消编辑"
|
|
31
|
+
},
|
|
32
|
+
Xcontrol: {
|
|
33
|
+
searchModeButtonTooltip: "切换为搜索",
|
|
34
|
+
insertModeButtonTooltip: "切换为新增",
|
|
35
|
+
editButtonTooltip: "编辑",
|
|
36
|
+
deleteButtonTooltip: "删除",
|
|
37
|
+
searchButtonTooltip: "搜索",
|
|
38
|
+
clearFilterButtonTooltip: "清空过滤",
|
|
39
|
+
insertButtonTooltip: "插入",
|
|
40
|
+
updateButtonTooltip: "更新",
|
|
41
|
+
cancelEditButtonTooltip: "取消编辑"
|
|
42
|
+
},
|
|
43
|
+
XimgField: {
|
|
44
|
+
editButtonText: "打开文件管理器"
|
|
45
|
+
},
|
|
46
|
+
Xjsoneditor: {
|
|
47
|
+
editText: "编辑器",
|
|
48
|
+
closeText: "保存"
|
|
31
49
|
}
|
|
32
50
|
},
|
|
33
51
|
|
package/src/i18n/zh-tw.js
CHANGED
|
@@ -28,6 +28,24 @@
|
|
|
28
28
|
insertButtonTooltip: "新增",
|
|
29
29
|
updateButtonTooltip: "修改",
|
|
30
30
|
cancelEditButtonTooltip: "取消編輯"
|
|
31
|
+
},
|
|
32
|
+
Xcontrol: {
|
|
33
|
+
searchModeButtonTooltip: "切換為搜尋",
|
|
34
|
+
insertModeButtonTooltip: "切換為新增",
|
|
35
|
+
editButtonTooltip: "編輯",
|
|
36
|
+
deleteButtonTooltip: "刪除",
|
|
37
|
+
searchButtonTooltip: "搜尋",
|
|
38
|
+
clearFilterButtonTooltip: "清除搜尋條件",
|
|
39
|
+
insertButtonTooltip: "新增",
|
|
40
|
+
updateButtonTooltip: "修改",
|
|
41
|
+
cancelEditButtonTooltip: "取消編輯"
|
|
42
|
+
},
|
|
43
|
+
XimgField: {
|
|
44
|
+
editButtonText: "開啟檔案總管"
|
|
45
|
+
},
|
|
46
|
+
Xjsoneditor: {
|
|
47
|
+
editText: "編輯器",
|
|
48
|
+
closeText: "儲存"
|
|
31
49
|
}
|
|
32
50
|
},
|
|
33
51
|
|
package/src/jsgrid.core.js
CHANGED
|
@@ -83,6 +83,14 @@
|
|
|
83
83
|
height: "auto",
|
|
84
84
|
updateOnResize: true,
|
|
85
85
|
|
|
86
|
+
// Per-instance locale: a key from jsGrid.locales (e.g. "ru"), or an
|
|
87
|
+
// inline locale config object with the same {grid, fields} shape.
|
|
88
|
+
// Applied once at construction time, before the rest of `config` -
|
|
89
|
+
// any option the caller also sets explicitly still wins. Unlike
|
|
90
|
+
// jsGrid.locale(), this never touches shared prototypes, so two
|
|
91
|
+
// grids on the same page can run in different languages at once.
|
|
92
|
+
locale: null,
|
|
93
|
+
|
|
86
94
|
rowClass: $.noop,
|
|
87
95
|
rowRenderer: null,
|
|
88
96
|
|
|
@@ -196,6 +204,7 @@
|
|
|
196
204
|
gridBodyClass: "jsgrid-grid-body",
|
|
197
205
|
|
|
198
206
|
_init: function(config) {
|
|
207
|
+
this._initInstanceLocale(config && config.locale);
|
|
199
208
|
$.extend(this, config);
|
|
200
209
|
this._initLoadStrategy();
|
|
201
210
|
this._initController();
|
|
@@ -205,6 +214,24 @@
|
|
|
205
214
|
this._callEventHandler(this.onInit)
|
|
206
215
|
},
|
|
207
216
|
|
|
217
|
+
_initInstanceLocale: function(locale) {
|
|
218
|
+
if(!locale) {
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
var localeConfig = $.isPlainObject(locale) ? locale : jsGrid.locales[locale];
|
|
223
|
+
if(!localeConfig) {
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
if(localeConfig.grid) {
|
|
228
|
+
$.extend(this, localeConfig.grid);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
this._fieldsLocaleConfig = localeConfig.fields;
|
|
232
|
+
this._validatorsLocaleConfig = localeConfig.validators;
|
|
233
|
+
},
|
|
234
|
+
|
|
208
235
|
loadStrategy: function() {
|
|
209
236
|
return this.pageLoading
|
|
210
237
|
? new jsGrid.loadStrategies.PageLoadingStrategy(this)
|
|
@@ -241,9 +268,15 @@
|
|
|
241
268
|
|
|
242
269
|
_initFields: function() {
|
|
243
270
|
var self = this;
|
|
271
|
+
var fieldsLocale = self._fieldsLocaleConfig;
|
|
244
272
|
self.fields = $.map(self.fields, function(field) {
|
|
245
273
|
if($.isPlainObject(field)) {
|
|
246
274
|
var fieldConstructor = (field.type && jsGrid.fields[field.type]) || jsGrid.Field;
|
|
275
|
+
var fieldLocale = fieldsLocale && field.type && fieldsLocale[field.type];
|
|
276
|
+
if(fieldLocale) {
|
|
277
|
+
// locale strings are defaults; explicit keys on the field config still win
|
|
278
|
+
field = $.extend({}, fieldLocale, field);
|
|
279
|
+
}
|
|
247
280
|
field = new fieldConstructor(field);
|
|
248
281
|
}
|
|
249
282
|
field._grid = self;
|
|
@@ -415,7 +448,9 @@
|
|
|
415
448
|
},
|
|
416
449
|
|
|
417
450
|
_createValidation: function() {
|
|
418
|
-
return getOrApply(this.validation, this
|
|
451
|
+
return getOrApply(this.validation, this, {
|
|
452
|
+
validatorsLocale: this._validatorsLocaleConfig
|
|
453
|
+
});
|
|
419
454
|
},
|
|
420
455
|
|
|
421
456
|
_clear: function() {
|
|
@@ -1629,6 +1664,13 @@
|
|
|
1629
1664
|
};
|
|
1630
1665
|
|
|
1631
1666
|
var setLocale = function(obj, localeConfig) {
|
|
1667
|
+
if(!obj) {
|
|
1668
|
+
// target not loaded on the page (e.g. a locale file's fields.control
|
|
1669
|
+
// section with no native control.js loaded) - skip this branch
|
|
1670
|
+
// instead of throwing and aborting the rest of the locale.
|
|
1671
|
+
return;
|
|
1672
|
+
}
|
|
1673
|
+
|
|
1632
1674
|
$.each(localeConfig, function(field, value) {
|
|
1633
1675
|
if($.isPlainObject(value)) {
|
|
1634
1676
|
setLocale(obj[field] || obj[field[0].toUpperCase() + field.slice(1)], value);
|
|
@@ -1637,7 +1679,7 @@
|
|
|
1637
1679
|
|
|
1638
1680
|
if(obj.hasOwnProperty(field)) {
|
|
1639
1681
|
obj[field] = value;
|
|
1640
|
-
} else {
|
|
1682
|
+
} else if(obj.prototype) {
|
|
1641
1683
|
obj.prototype[field] = value;
|
|
1642
1684
|
}
|
|
1643
1685
|
});
|