jqgrid-jquery-rails 4.4.0.0 → 4.4.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cbea0a15abf4432a9712fdda8e1f38913679b1bf
4
- data.tar.gz: a8dbb4af2709c7898a7675d7484ed59850c9585f
3
+ metadata.gz: 17c68f8301f15436c546fcd991debb06e946de9e
4
+ data.tar.gz: 0f812c7c1cf42b29bbbccfcbc1c6f05aa078fc14
5
5
  SHA512:
6
- metadata.gz: 13ff7ec8f79ae79325ad93ae91fe85af25c52d49cb1445a3b40d01d81a5925ab2c0dcd8fe325130c9ec863fd7121a78461e2c848959e252a404fcf868553d7b7
7
- data.tar.gz: 7135b4f4f99b0816c011ef17112eec9d9db96bd7d7d00e4fa3d33f18d106c9e1955a6effdf29654a32e6b08a1f18d14375b2adea91ddfa493cf92881426d3dbd
6
+ metadata.gz: 15d0994a9328976f2e587dbd386c81cfd5fec34df8ef30454a8eb96ab447a353098a8d262aaac6ba1752d977e5b54a9d55800728fdb5937f8b9463e0549054a1
7
+ data.tar.gz: 29eca3f499eab8d44ae7633a7c0f22d55374e204953728f5d33bd065983a78fd6247b1a12c984f27371d4068d23fb743fe503213057ff548e4dffc028d9b9a4b
data/README.md CHANGED
@@ -10,7 +10,7 @@ Add these lines to your application's `Gemfile`:
10
10
 
11
11
  ```rb
12
12
  # jqgrid jquery plugin packaged for the rails asset pipeline
13
- gem 'jqgrid-jquery-rails', '~> 4.4.0'
13
+ gem 'jqgrid-jquery-rails', '~> 4.4.1'
14
14
  ```
15
15
 
16
16
  And then execute:
@@ -7,6 +7,6 @@ module JqgridJquery
7
7
  # "2.0.0.pre"
8
8
  # "2.0.0.beta"
9
9
  # Refer to Semantic Versioning 2.0.0 (http://semver.org).
10
- VERSION = "4.4.0.0"
10
+ VERSION = "4.4.1.0"
11
11
  end
12
12
  end
@@ -1,127 +1,127 @@
1
- ;(function($){
2
- /**
3
- * jqGrid French Translation
4
- * Tony Tomov tony@trirand.com
5
- * http://trirand.com/blog/
6
- * Dual licensed under the MIT and GPL licenses:
7
- * http://www.opensource.org/licenses/mit-license.php
8
- * http://www.gnu.org/licenses/gpl.html
9
- **/
10
- $.jgrid = $.jgrid || {};
11
- $.extend($.jgrid,{
12
- defaults : {
13
- recordtext: "Enregistrements {0} - {1} sur {2}",
14
- emptyrecords: "Aucun enregistrement à afficher",
15
- loadtext: "Chargement...",
16
- pgtext : "Page {0} sur {1}"
17
- },
18
- search : {
19
- caption: "Recherche...",
20
- Find: "Chercher",
21
- Reset: "Annuler",
22
- odata : ['égal', 'différent', 'inférieur', 'inférieur ou égal','supérieur','supérieur ou égal', 'commence par','ne commence pas par','est dans',"n'est pas dans",'finit par','ne finit pas par','contient','ne contient pas'],
23
- groupOps: [ { op: "AND", text: "tous" }, { op: "OR", text: "aucun" } ],
24
- matchText: " correspondance",
25
- rulesText: " règles"
26
- },
27
- edit : {
28
- addCaption: "Ajouter",
29
- editCaption: "Editer",
30
- bSubmit: "Valider",
31
- bCancel: "Annuler",
32
- bClose: "Fermer",
33
- saveData: "Les données ont changé ! Enregistrer les modifications ?",
34
- bYes: "Oui",
35
- bNo: "Non",
36
- bExit: "Annuler",
37
- msg: {
38
- required: "Champ obligatoire",
39
- number: "Saisissez un nombre correct",
40
- minValue: "La valeur doit être supérieure ou égale à",
41
- maxValue: "La valeur doit être inférieure ou égale à",
42
- email: "n'est pas un email correct",
43
- integer: "Saisissez un entier correct",
44
- url: "n'est pas une adresse correcte. Préfixe requis ('http://' or 'https://')",
45
- nodefined : " n'est pas défini!",
46
- novalue : " la valeur de retour est requise!",
47
- customarray : "Une fonction personnalisée devrait retourner un tableau (array)!",
48
- customfcheck : "Une fonction personnalisée devrait être présente dans le cas d'une vérification personnalisée!"
49
- }
50
- },
51
- view : {
52
- caption: "Voir les enregistrement",
53
- bClose: "Fermer"
54
- },
55
- del : {
56
- caption: "Supprimer",
57
- msg: "Supprimer les enregistrements sélectionnés ?",
58
- bSubmit: "Supprimer",
59
- bCancel: "Annuler"
60
- },
61
- nav : {
62
- edittext: " ",
63
- edittitle: "Editer la ligne sélectionnée",
64
- addtext:" ",
65
- addtitle: "Ajouter une ligne",
66
- deltext: " ",
67
- deltitle: "Supprimer la ligne sélectionnée",
68
- searchtext: " ",
69
- searchtitle: "Chercher un enregistrement",
70
- refreshtext: "",
71
- refreshtitle: "Recharger le tableau",
72
- alertcap: "Avertissement",
73
- alerttext: "Veuillez sélectionner une ligne",
74
- viewtext: "",
75
- viewtitle: "Afficher la ligne sélectionnée"
76
- },
77
- col : {
78
- caption: "Afficher/Masquer les colonnes",
79
- bSubmit: "Valider",
80
- bCancel: "Annuler"
81
- },
82
- errors : {
83
- errcap : "Erreur",
84
- nourl : "Aucune adresse n'est paramétrée",
85
- norecords: "Aucun enregistrement à traiter",
86
- model : "Nombre de titres (colNames) <> Nombre de données (colModel)!"
87
- },
88
- formatter : {
89
- integer : {thousandsSeparator: " ", defaultValue: '0'},
90
- number : {decimalSeparator:",", thousandsSeparator: " ", decimalPlaces: 2, defaultValue: '0,00'},
91
- currency : {decimalSeparator:",", thousandsSeparator: " ", decimalPlaces: 2, prefix: "", suffix:"", defaultValue: '0,00'},
92
- date : {
93
- dayNames: [
94
- "Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam",
95
- "Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi"
96
- ],
97
- monthNames: [
98
- "Jan", "Fév", "Mar", "Avr", "Mai", "Jui", "Jul", "Aou", "Sep", "Oct", "Nov", "Déc",
99
- "Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Aout", "Septembre", "Octobre", "Novembre", "Décembre"
100
- ],
101
- AmPm : ["am","pm","AM","PM"],
102
- S: function (j) {return j == 1 ? 'er' : 'e';},
103
- srcformat: 'Y-m-d',
104
- newformat: 'd/m/Y',
105
- masks : {
106
- ISO8601Long:"Y-m-d H:i:s",
107
- ISO8601Short:"Y-m-d",
108
- ShortDate: "n/j/Y",
109
- LongDate: "l, F d, Y",
110
- FullDateTime: "l, F d, Y g:i:s A",
111
- MonthDay: "F d",
112
- ShortTime: "g:i A",
113
- LongTime: "g:i:s A",
114
- SortableDateTime: "Y-m-d\\TH:i:s",
115
- UniversalSortableDateTime: "Y-m-d H:i:sO",
116
- YearMonth: "F, Y"
117
- },
118
- reformatAfterEdit : false
119
- },
120
- baseLinkUrl: '',
121
- showAction: '',
122
- target: '',
123
- checkbox : {disabled:true},
124
- idName : 'id'
125
- }
126
- });
127
- })(jQuery);
1
+ ;(function($){
2
+ /**
3
+ * jqGrid French Translation
4
+ * Tony Tomov tony@trirand.com
5
+ * http://trirand.com/blog/
6
+ * Dual licensed under the MIT and GPL licenses:
7
+ * http://www.opensource.org/licenses/mit-license.php
8
+ * http://www.gnu.org/licenses/gpl.html
9
+ **/
10
+ $.jgrid = $.jgrid || {};
11
+ $.extend($.jgrid,{
12
+ defaults : {
13
+ recordtext: "Enregistrements {0} - {1} sur {2}",
14
+ emptyrecords: "Aucun enregistrement à afficher",
15
+ loadtext: "Chargement...",
16
+ pgtext : "Page {0} sur {1}"
17
+ },
18
+ search : {
19
+ caption: "Recherche...",
20
+ Find: "Chercher",
21
+ Reset: "Réinitialiser",
22
+ odata : ['égal', 'différent', 'inférieur', 'inférieur ou égal','supérieur','supérieur ou égal', 'commence par','ne commence pas par','est dans',"n'est pas dans",'finit par','ne finit pas par','contient','ne contient pas'],
23
+ groupOps: [ { op: "AND", text: "tous" }, { op: "OR", text: "au moins un" } ],
24
+ matchText: " correspondance",
25
+ rulesText: " règles"
26
+ },
27
+ edit : {
28
+ addCaption: "Ajouter",
29
+ editCaption: "Editer",
30
+ bSubmit: "Valider",
31
+ bCancel: "Annuler",
32
+ bClose: "Fermer",
33
+ saveData: "Les données ont changé ! Enregistrer les modifications ?",
34
+ bYes: "Oui",
35
+ bNo: "Non",
36
+ bExit: "Annuler",
37
+ msg: {
38
+ required: "Champ obligatoire",
39
+ number: "Saisissez un nombre correct",
40
+ minValue: "La valeur doit être supérieure ou égale à",
41
+ maxValue: "La valeur doit être inférieure ou égale à",
42
+ email: "n'est pas un email correct",
43
+ integer: "Saisissez un entier correct",
44
+ url: "n'est pas une adresse correcte. Préfixe requis ('http://' or 'https://')",
45
+ nodefined : " n'est pas défini!",
46
+ novalue : " la valeur de retour est requise!",
47
+ customarray : "Une fonction personnalisée devrait retourner un tableau (array)!",
48
+ customfcheck : "Une fonction personnalisée devrait être présente dans le cas d'une vérification personnalisée!"
49
+ }
50
+ },
51
+ view : {
52
+ caption: "Voir les enregistrement",
53
+ bClose: "Fermer"
54
+ },
55
+ del : {
56
+ caption: "Supprimer",
57
+ msg: "Supprimer les enregistrements sélectionnés ?",
58
+ bSubmit: "Supprimer",
59
+ bCancel: "Annuler"
60
+ },
61
+ nav : {
62
+ edittext: " ",
63
+ edittitle: "Editer la ligne sélectionnée",
64
+ addtext:" ",
65
+ addtitle: "Ajouter une ligne",
66
+ deltext: " ",
67
+ deltitle: "Supprimer la ligne sélectionnée",
68
+ searchtext: " ",
69
+ searchtitle: "Chercher un enregistrement",
70
+ refreshtext: "",
71
+ refreshtitle: "Recharger le tableau",
72
+ alertcap: "Avertissement",
73
+ alerttext: "Veuillez sélectionner une ligne",
74
+ viewtext: "",
75
+ viewtitle: "Afficher la ligne sélectionnée"
76
+ },
77
+ col : {
78
+ caption: "Afficher/Masquer les colonnes",
79
+ bSubmit: "Valider",
80
+ bCancel: "Annuler"
81
+ },
82
+ errors : {
83
+ errcap : "Erreur",
84
+ nourl : "Aucune adresse n'est paramétrée",
85
+ norecords: "Aucun enregistrement à traiter",
86
+ model : "Nombre de titres (colNames) <> Nombre de données (colModel)!"
87
+ },
88
+ formatter : {
89
+ integer : {thousandsSeparator: " ", defaultValue: '0'},
90
+ number : {decimalSeparator:",", thousandsSeparator: " ", decimalPlaces: 2, defaultValue: '0,00'},
91
+ currency : {decimalSeparator:",", thousandsSeparator: " ", decimalPlaces: 2, prefix: "", suffix:"", defaultValue: '0,00'},
92
+ date : {
93
+ dayNames: [
94
+ "Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam",
95
+ "Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi"
96
+ ],
97
+ monthNames: [
98
+ "Jan", "Fév", "Mar", "Avr", "Mai", "Jui", "Jul", "Aou", "Sep", "Oct", "Nov", "Déc",
99
+ "Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Aout", "Septembre", "Octobre", "Novembre", "Décembre"
100
+ ],
101
+ AmPm : ["am","pm","AM","PM"],
102
+ S: function (j) {return j == 1 ? 'er' : 'e';},
103
+ srcformat: 'Y-m-d',
104
+ newformat: 'd/m/Y',
105
+ masks : {
106
+ ISO8601Long:"Y-m-d H:i:s",
107
+ ISO8601Short:"Y-m-d",
108
+ ShortDate: "n/j/Y",
109
+ LongDate: "l, F d, Y",
110
+ FullDateTime: "l, F d, Y g:i:s A",
111
+ MonthDay: "F d",
112
+ ShortTime: "g:i A",
113
+ LongTime: "g:i:s A",
114
+ SortableDateTime: "Y-m-d\\TH:i:s",
115
+ UniversalSortableDateTime: "Y-m-d H:i:sO",
116
+ YearMonth: "F, Y"
117
+ },
118
+ reformatAfterEdit : false
119
+ },
120
+ baseLinkUrl: '',
121
+ showAction: '',
122
+ target: '',
123
+ checkbox : {disabled:true},
124
+ idName : 'id'
125
+ }
126
+ });
127
+ })(jQuery);
@@ -0,0 +1,129 @@
1
+ ;(function($){
2
+ /**
3
+ * jqGrid English Translation
4
+ * Tony Tomov tony@trirand.com
5
+ * http://trirand.com/blog/
6
+ * Dual licensed under the MIT and GPL licenses:
7
+ * http://www.opensource.org/licenses/mit-license.php
8
+ * http://www.gnu.org/licenses/gpl.html
9
+ **/
10
+ $.jgrid = $.jgrid || {};
11
+ $.extend($.jgrid,{
12
+ defaults : {
13
+ recordtext: "보기 {0} - {1} / {2}",
14
+ emptyrecords: "표시할 행이 없습니다",
15
+ loadtext: "조회중...",
16
+ pgtext : "페이지 {0} / {1}"
17
+ },
18
+ search : {
19
+ caption: "검색...",
20
+ Find: "찾기",
21
+ Reset: "초기화",
22
+ odata : ['같다', '같지 않다', '작다', '작거나 같다','크다','크거나 같다', '로 시작한다','로 시작하지 않는다','내에 있다','내에 있지 않다','로 끝난다','로 끝나지 않는다','내에 존재한다','내에 존재하지 않는다'],
23
+ groupOps: [ { op: "AND", text: "전부" }, { op: "OR", text: "임의" } ],
24
+ matchText: " 일치하다",
25
+ rulesText: " 적용하다"
26
+ },
27
+ edit : {
28
+ addCaption: "행 추가",
29
+ editCaption: "행 수정",
30
+ bSubmit: "전송",
31
+ bCancel: "취소",
32
+ bClose: "닫기",
33
+ saveData: "자료가 변경되었습니다! 저장하시겠습니까?",
34
+ bYes : "예",
35
+ bNo : "아니오",
36
+ bExit : "취소",
37
+ msg: {
38
+ required:"필수항목입니다",
39
+ number:"유효한 번호를 입력해 주세요",
40
+ minValue:"입력값은 크거나 같아야 합니다",
41
+ maxValue:"입력값은 작거나 같아야 합니다",
42
+ email: "유효하지 않은 이메일주소입니다",
43
+ integer: "유효한 숫자를 입력하세요",
44
+ date: "유효한 날짜를 입력하세요",
45
+ url: "은 유효하지 않은 URL입니다. 문장앞에 다음단어가 필요합니다('http://' or 'https://')",
46
+ nodefined : " 은 정의도지 않았습니다!",
47
+ novalue : " 반환값이 필요합니다!",
48
+ customarray : "사용자정의 함수는 배열을 반환해야 합니다!",
49
+ customfcheck : "Custom function should be present in case of custom checking!"
50
+
51
+ }
52
+ },
53
+ view : {
54
+ caption: "행 조회",
55
+ bClose: "닫기"
56
+ },
57
+ del : {
58
+ caption: "삭제",
59
+ msg: "선택된 행을 삭제하시겠습니까?",
60
+ bSubmit: "삭제",
61
+ bCancel: "취소"
62
+ },
63
+ nav : {
64
+ edittext: "",
65
+ edittitle: "선택된 행 편집",
66
+ addtext:"",
67
+ addtitle: "행 삽입",
68
+ deltext: "",
69
+ deltitle: "선택된 행 삭제",
70
+ searchtext: "",
71
+ searchtitle: "행 찾기",
72
+ refreshtext: "",
73
+ refreshtitle: "그리드 갱신",
74
+ alertcap: "경고",
75
+ alerttext: "행을 선택하세요",
76
+ viewtext: "",
77
+ viewtitle: "선택된 행 조회"
78
+ },
79
+ col : {
80
+ caption: "열을 선택하세요",
81
+ bSubmit: "확인",
82
+ bCancel: "취소"
83
+ },
84
+ errors : {
85
+ errcap : "오류",
86
+ nourl : "설정된 url이 없습니다",
87
+ norecords: "처리할 행이 없습니다",
88
+ model : "colNames의 길이가 colModel과 일치하지 않습니다!"
89
+ },
90
+ formatter : {
91
+ integer : {thousandsSeparator: ",", defaultValue: '0'},
92
+ number : {decimalSeparator:".", thousandsSeparator: ",", decimalPlaces: 2, defaultValue: '0.00'},
93
+ currency : {decimalSeparator:".", thousandsSeparator: ",", decimalPlaces: 2, prefix: "", suffix:"", defaultValue: '0.00'},
94
+ date : {
95
+ dayNames: [
96
+ "Sun", "Mon", "Tue", "Wed", "Thr", "Fri", "Sat",
97
+ "일", "월", "화", "수", "목", "금", "토"
98
+ ],
99
+ monthNames: [
100
+ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
101
+ "1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"
102
+ ],
103
+ AmPm : ["am","pm","AM","PM"],
104
+ S: function (j) {return j < 11 || j > 13 ? ['st', 'nd', 'rd', 'th'][Math.min((j - 1) % 10, 3)] : 'th'},
105
+ srcformat: 'Y-m-d',
106
+ newformat: 'm-d-Y',
107
+ masks : {
108
+ ISO8601Long:"Y-m-d H:i:s",
109
+ ISO8601Short:"Y-m-d",
110
+ ShortDate: "Y/j/n",
111
+ LongDate: "l, F d, Y",
112
+ FullDateTime: "l, F d, Y g:i:s A",
113
+ MonthDay: "F d",
114
+ ShortTime: "g:i A",
115
+ LongTime: "g:i:s A",
116
+ SortableDateTime: "Y-m-d\\TH:i:s",
117
+ UniversalSortableDateTime: "Y-m-d H:i:sO",
118
+ YearMonth: "F, Y"
119
+ },
120
+ reformatAfterEdit : false
121
+ },
122
+ baseLinkUrl: '',
123
+ showAction: '',
124
+ target: '',
125
+ checkbox : {disabled:true},
126
+ idName : 'id'
127
+ }
128
+ });
129
+ })(jQuery);
@@ -3,6 +3,9 @@
3
3
  * jqGrid Brazilian-Portuguese Translation
4
4
  * Sergio Righi sergio.righi@gmail.com
5
5
  * http://curve.com.br
6
+ *
7
+ * Updated by Jonnas Fonini
8
+ * http://fonini.net
6
9
  * Dual licensed under the MIT and GPL licenses:
7
10
  * http://www.opensource.org/licenses/mit-license.php
8
11
  * http://www.gnu.org/licenses/gpl.html
@@ -10,7 +13,7 @@
10
13
  $.jgrid = $.jgrid || {};
11
14
  $.extend($.jgrid,{
12
15
  defaults : {
13
- recordtext: "Ver {0} - {1} of {2}",
16
+ recordtext: "Ver {0} - {1} de {2}",
14
17
  emptyrecords: "Nenhum registro para visualizar",
15
18
  loadtext: "Carregando...",
16
19
  pgtext : "Página {0} de {1}"
@@ -19,9 +22,9 @@ $.extend($.jgrid,{
19
22
  caption: "Procurar...",
20
23
  Find: "Procurar",
21
24
  Reset: "Resetar",
22
- odata : ['equal', 'not equal', 'less', 'less or equal','greater','greater or equal', 'begins with','does not begin with','is in','is not in','ends with','does not end with','contains','does not contain'],
25
+ odata : ['igual', 'diferente', 'menor', 'menor ou igual','maior','maior ou igual', 'inicia com','não inicia com','está em','não está em','termina com','não termina com','contém','não contém','nulo','não nulo'],
23
26
  groupOps: [ { op: "AND", text: "all" }, { op: "OR", text: "any" } ],
24
- matchText: " iguala",
27
+ matchText: " igual a",
25
28
  rulesText: " regras"
26
29
  },
27
30
  edit : {
@@ -55,7 +58,7 @@ $.extend($.jgrid,{
55
58
  },
56
59
  del : {
57
60
  caption: "Apagar",
58
- msg: "Apagar registros selecionado(s)?",
61
+ msg: "Apagar registro(s) selecionado(s)?",
59
62
  bSubmit: "Apagar",
60
63
  bCancel: "Cancelar"
61
64
  },
@@ -69,7 +72,7 @@ $.extend($.jgrid,{
69
72
  searchtext: " ",
70
73
  searchtitle: "Procurar registros",
71
74
  refreshtext: "",
72
- refreshtitle: "Recarrgando Tabela",
75
+ refreshtitle: "Recarregando tabela",
73
76
  alertcap: "Aviso",
74
77
  alerttext: "Por favor, selecione um registro",
75
78
  viewtext: "",
@@ -82,7 +85,7 @@ $.extend($.jgrid,{
82
85
  },
83
86
  errors : {
84
87
  errcap : "Erro",
85
- nourl : "Nenhuma URL defenida",
88
+ nourl : "Nenhuma URL definida",
86
89
  norecords: "Sem registros para exibir",
87
90
  model : "Comprimento de colNames <> colModel!"
88
91
  },
@@ -0,0 +1,130 @@
1
+ ;(function($){
2
+ /**
3
+ * jqGrid Chinese (Taiwan) Translation for v4.2
4
+ * linquize
5
+ * https://github.com/linquize/jqGrid
6
+ * Dual licensed under the MIT and GPL licenses:
7
+ * http://www.opensource.org/licenses/mit-license.php
8
+ * http://www.gnu.org/licenses/gpl.html
9
+ *
10
+ **/
11
+ $.jgrid = $.jgrid || {};
12
+ $.extend($.jgrid,{
13
+ defaults : {
14
+ recordtext: "{0} - {1} 共 {2} 條",
15
+ emptyrecords: "沒有記錄",
16
+ loadtext: "載入中...",
17
+ pgtext : " {0} 共 {1} 頁"
18
+ },
19
+ search : {
20
+ caption: "搜尋...",
21
+ Find: "搜尋",
22
+ Reset: "重設",
23
+ odata : ['等於 ', '不等於 ', '小於 ', '小於等於 ','大於 ','大於等於 ', '開始於 ','不開始於 ','在其中 ','不在其中 ','結束於 ','不結束於 ','包含 ','不包含 '],
24
+ groupOps: [ { op: "AND", text: "所有" }, { op: "OR", text: "任一" } ],
25
+ matchText: " 匹配",
26
+ rulesText: " 規則"
27
+ },
28
+ edit : {
29
+ addCaption: "新增記錄",
30
+ editCaption: "編輯記錄",
31
+ bSubmit: "提交",
32
+ bCancel: "取消",
33
+ bClose: "關閉",
34
+ saveData: "資料已改變,是否儲存?",
35
+ bYes : "是",
36
+ bNo : "否",
37
+ bExit : "取消",
38
+ msg: {
39
+ required:"此欄必要",
40
+ number:"請輸入有效的數字",
41
+ minValue:"值必須大於等於 ",
42
+ maxValue:"值必須小於等於 ",
43
+ email: "不是有效的e-mail地址",
44
+ integer: "請輸入有效整数",
45
+ date: "請輸入有效時間",
46
+ url: "網址無效。前綴必須為 ('http://' 或 'https://')",
47
+ nodefined : " 未定義!",
48
+ novalue : " 需要傳回值!",
49
+ customarray : "自訂函數應傳回陣列!",
50
+ customfcheck : "自訂檢查應有自訂函數!"
51
+
52
+ }
53
+ },
54
+ view : {
55
+ caption: "查看記錄",
56
+ bClose: "關閉"
57
+ },
58
+ del : {
59
+ caption: "刪除",
60
+ msg: "刪除已選記錄?",
61
+ bSubmit: "刪除",
62
+ bCancel: "取消"
63
+ },
64
+ nav : {
65
+ edittext: "",
66
+ edittitle: "編輯已選列",
67
+ addtext:"",
68
+ addtitle: "新增列",
69
+ deltext: "",
70
+ deltitle: "刪除已選列",
71
+ searchtext: "",
72
+ searchtitle: "搜尋記錄",
73
+ refreshtext: "",
74
+ refreshtitle: "重新整理表格",
75
+ alertcap: "警告",
76
+ alerttext: "請選擇列",
77
+ viewtext: "",
78
+ viewtitle: "檢視已選列"
79
+ },
80
+ col : {
81
+ caption: "選擇欄",
82
+ bSubmit: "確定",
83
+ bCancel: "取消"
84
+ },
85
+ errors : {
86
+ errcap : "錯誤",
87
+ nourl : "未設定URL",
88
+ norecords: "無需要處理的記錄",
89
+ model : "colNames 和 colModel 長度不同!"
90
+ },
91
+ formatter : {
92
+ integer : {thousandsSeparator: " ", defaultValue: '0'},
93
+ number : {decimalSeparator:".", thousandsSeparator: " ", decimalPlaces: 2, defaultValue: '0.00'},
94
+ currency : {decimalSeparator:".", thousandsSeparator: " ", decimalPlaces: 2, prefix: "", suffix:"", defaultValue: '0.00'},
95
+ date : {
96
+ dayNames: [
97
+ "日", "一", "二", "三", "四", "五", "六",
98
+ "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"
99
+ ],
100
+ monthNames: [
101
+ "一", "二", "三", "四", "五", "六", "七", "八", "九", "十", "十一", "十二",
102
+ "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"
103
+ ],
104
+ AmPm : ["上午","下午","上午","下午"],
105
+ S: function (j) {return j < 11 || j > 13 ? ['st', 'nd', 'rd', 'th'][Math.min((j - 1) % 10, 3)] : 'th'},
106
+ srcformat: 'Y-m-d',
107
+ newformat: 'm-d-Y',
108
+ masks : {
109
+ ISO8601Long:"Y-m-d H:i:s",
110
+ ISO8601Short:"Y-m-d",
111
+ ShortDate: "Y/j/n",
112
+ LongDate: "l, F d, Y",
113
+ FullDateTime: "l, F d, Y g:i:s A",
114
+ MonthDay: "F d",
115
+ ShortTime: "g:i A",
116
+ LongTime: "g:i:s A",
117
+ SortableDateTime: "Y-m-d\\TH:i:s",
118
+ UniversalSortableDateTime: "Y-m-d H:i:sO",
119
+ YearMonth: "F, Y"
120
+ },
121
+ reformatAfterEdit : false
122
+ },
123
+ baseLinkUrl: '',
124
+ showAction: '',
125
+ target: '',
126
+ checkbox : {disabled:true},
127
+ idName : 'id'
128
+ }
129
+ });
130
+ })(jQuery);
@@ -1,13 +1,13 @@
1
1
  // ==ClosureCompiler==
2
2
  // @compilation_level SIMPLE_OPTIMIZATIONS
3
3
 
4
- /**
5
- * @license jqGrid 4.4.0 - jQuery Grid
4
+ /*
5
+ * @license jqGrid 4.4.1 - jQuery Grid
6
6
  * Copyright (c) 2008, Tony Tomov, tony@trirand.com
7
7
  * Dual licensed under the MIT and GPL licenses
8
8
  * http://www.opensource.org/licenses/mit-license.php
9
9
  * http://www.gnu.org/licenses/gpl-2.0.html
10
- * Date: 2012-06-14
10
+ * Date: 2012-08-28
11
11
  */
12
12
  //jsHint options
13
13
  /*global document, window, jQuery, DOMParser, ActiveXObject, $, alert */
@@ -16,7 +16,7 @@
16
16
  "use strict";
17
17
  $.jgrid = $.jgrid || {};
18
18
  $.extend($.jgrid,{
19
- version : "4.4.0",
19
+ version : "4.4.1",
20
20
  htmlDecode : function(value){
21
21
  if(value && (value=='&nbsp;' || value=='&#160;' || (value.length===1 && value.charCodeAt(0)===160))) { return "";}
22
22
  return !value ? value : String(value).replace(/&gt;/g, ">").replace(/&lt;/g, "<").replace(/&quot;/g, '"').replace(/&amp;/g, "&");
@@ -124,6 +124,9 @@ $.extend($.jgrid,{
124
124
  tsp.h = h12to24(date[k], tsp.h);
125
125
  }
126
126
  }
127
+ if (format[k] === 'g') {
128
+ tsp.h = parseInt(date[k], 10);
129
+ }
127
130
  if(date[k] !== undefined) {
128
131
  tsp[format[k].toLowerCase()] = parseInt(date[k],10);
129
132
  }
@@ -1022,8 +1025,8 @@ $.fn.jqGrid = function( pin ) {
1022
1025
  prp = formatCol( pos,irow, v, srvr, rowId, true);
1023
1026
  return "<td role=\"gridcell\" "+prp+">"+v+"</td>";
1024
1027
  },
1025
- addMulti = function(rowid,pos,irow){
1026
- var v = "<input role=\"checkbox\" type=\"checkbox\""+" id=\"jqg_"+ts.p.id+"_"+rowid+"\" class=\"cbox\" name=\"jqg_"+ts.p.id+"_"+rowid+"\"/>",
1028
+ addMulti = function(rowid,pos,irow,checked){
1029
+ var v = "<input role=\"checkbox\" type=\"checkbox\""+" id=\"jqg_"+ts.p.id+"_"+rowid+"\" class=\"cbox\" name=\"jqg_"+ts.p.id+"_"+rowid+"\"" + ((checked) ? "checked=\"checked\"" : "")+"/>",
1027
1030
  prp = formatCol( pos,irow,'',null, rowid, true);
1028
1031
  return "<td role=\"gridcell\" "+prp+">"+v+"</td>";
1029
1032
  },
@@ -1090,9 +1093,9 @@ $.fn.jqGrid = function( pin ) {
1090
1093
  ts.p._index[val] = i;
1091
1094
  }
1092
1095
  },
1093
- constructTr = function(id, hide, altClass, rd, cur) {
1096
+ constructTr = function(id, hide, altClass, rd, cur, selected) {
1094
1097
  var tabindex = '-1', restAttr = '', attrName, style = hide ? 'display:none;' : '',
1095
- classes = 'ui-widget-content jqgrow ui-row-' + ts.p.direction + altClass,
1098
+ classes = 'ui-widget-content jqgrow ui-row-' + ts.p.direction + altClass + ((selected) ? ' ui-state-highlight' : ''),
1096
1099
  rowAttrObj = $.isFunction(ts.p.rowattr) ? ts.p.rowattr.call(ts, rd, cur) : {};
1097
1100
  if(!$.isEmptyObject( rowAttrObj )) {
1098
1101
  if (rowAttrObj.hasOwnProperty("id")) {
@@ -1163,7 +1166,7 @@ $.fn.jqGrid = function( pin ) {
1163
1166
  getId = function( trow, k) {return trow.getAttribute(idn.replace(/[\[\]]/g,"")) || k;};
1164
1167
  }
1165
1168
  ts.p.userData = {};
1166
- ts.p.page = $.jgrid.getXmlData( xml,xmlRd.page ) || 0;
1169
+ ts.p.page = $.jgrid.getXmlData( xml,xmlRd.page ) || ts.p.page || 0;
1167
1170
  ts.p.lastpage = $.jgrid.getXmlData( xml,xmlRd.total );
1168
1171
  if(ts.p.lastpage===undefined) { ts.p.lastpage=1; }
1169
1172
  ts.p.records = $.jgrid.getXmlData( xml,xmlRd.records ) || 0;
@@ -1193,7 +1196,7 @@ $.fn.jqGrid = function( pin ) {
1193
1196
  rowData.push( addRowNum(0,j,ts.p.page,ts.p.rowNum) );
1194
1197
  }
1195
1198
  if( gi ) {
1196
- rowData.push( addMulti(rid,ni,j) );
1199
+ rowData.push( addMulti(rid,ni,j, false) );
1197
1200
  }
1198
1201
  if( si ) {
1199
1202
  rowData.push( $(ts).jqGrid("addSubGridCell",gi+ni,j+rcnt) );
@@ -1215,7 +1218,7 @@ $.fn.jqGrid = function( pin ) {
1215
1218
  rowData.push( addCell(rid, v, i+gi+si+ni, j+rcnt, xmlr) );
1216
1219
  }
1217
1220
  }
1218
- rowData[iStartTrTag] = constructTr(rid, hiderow, cn1, rd, xmlr);
1221
+ rowData[iStartTrTag] = constructTr(rid, hiderow, cn1, rd, xmlr, false);
1219
1222
  rowData.push("</tr>");
1220
1223
  if(ts.p.grouping) {
1221
1224
  grpdata = $(ts).jqGrid('groupingPrepare',rowData, grpdata, rd, j);
@@ -1316,7 +1319,7 @@ $.fn.jqGrid = function( pin ) {
1316
1319
  frd='json';
1317
1320
  }
1318
1321
  var ir=0,v,i,j,f=[],F,cur,gi=ts.p.multiselect?1:0,si=ts.p.subGrid?1:0,ni=ts.p.rownumbers===true?1:0,len,drows,idn,rd={}, fpos, idr,rowData=[],cn=(ts.p.altRows === true) ? " "+ts.p.altclass:"",cn1,lp;
1319
- ts.p.page = $.jgrid.getAccessor(data,dReader.page) || 0;
1322
+ ts.p.page = $.jgrid.getAccessor(data,dReader.page) || ts.p.page || 0;
1320
1323
  lp = $.jgrid.getAccessor(data,dReader.total);
1321
1324
  ts.p.lastpage = lp === undefined ? 1 : lp;
1322
1325
  ts.p.records = $.jgrid.getAccessor(data,dReader.records) || 0;
@@ -1339,8 +1342,11 @@ $.fn.jqGrid = function( pin ) {
1339
1342
  if (!drows) { drows = []; }
1340
1343
  len = drows.length; i=0;
1341
1344
  if (len > 0 && ts.p.page <= 0) { ts.p.page = 1; }
1342
- var rn = parseInt(ts.p.rowNum,10),br=ts.p.scroll?$.jgrid.randId():1, altr;
1345
+ var rn = parseInt(ts.p.rowNum,10),br=ts.p.scroll?$.jgrid.randId():1, altr, selected=false, selr;
1343
1346
  if (adjust) { rn *= adjust+1; }
1347
+ if(ts.p.datatype === "local" && !ts.p.deselectAfterSort) {
1348
+ selected = true;
1349
+ }
1344
1350
  var afterInsRow = $.isFunction(ts.p.afterInsertRow), grpdata=[], hiderow=ts.p.grouping && ts.p.groupingView.groupCollapse === true;
1345
1351
  while (i<len) {
1346
1352
  cur = drows[i];
@@ -1358,13 +1364,20 @@ $.fn.jqGrid = function( pin ) {
1358
1364
  idr = ts.p.idPrefix + idr;
1359
1365
  altr = rcnt === 1 ? 0 : rcnt;
1360
1366
  cn1 = (altr+i)%2 == 1 ? cn : '';
1367
+ if( selected) {
1368
+ if( ts.p.multiselect) {
1369
+ selr = ($.inArray(idr, ts.p.selarrrow) !== -1);
1370
+ } else {
1371
+ selr = (idr === ts.p.selrow);
1372
+ }
1373
+ }
1361
1374
  var iStartTrTag = rowData.length;
1362
1375
  rowData.push("");
1363
1376
  if( ni ) {
1364
1377
  rowData.push( addRowNum(0,i,ts.p.page,ts.p.rowNum) );
1365
1378
  }
1366
1379
  if( gi ){
1367
- rowData.push( addMulti(idr,ni,i) );
1380
+ rowData.push( addMulti(idr,ni,i,selr) );
1368
1381
  }
1369
1382
  if( si ) {
1370
1383
  rowData.push( $(ts).jqGrid("addSubGridCell",gi+ni,i+rcnt) );
@@ -1378,7 +1391,7 @@ $.fn.jqGrid = function( pin ) {
1378
1391
  rowData.push( addCell(idr,v,j+gi+si+ni,i+rcnt,cur) );
1379
1392
  rd[ts.p.colModel[j+gi+si+ni].name] = v;
1380
1393
  }
1381
- rowData[iStartTrTag] = constructTr(idr, hiderow, cn1, rd, cur);
1394
+ rowData[iStartTrTag] = constructTr(idr, hiderow, cn1, rd, cur, selr);
1382
1395
  rowData.push( "</tr>" );
1383
1396
  if(ts.p.grouping) {
1384
1397
  grpdata = $(ts).jqGrid('groupingPrepare',rowData, grpdata, rd, i);
@@ -1761,7 +1774,13 @@ $.fn.jqGrid = function( pin ) {
1761
1774
  $(ts).jqGrid('groupingSetup');
1762
1775
  var grp = ts.p.groupingView, gi, gs="";
1763
1776
  for(gi=0;gi<grp.groupField.length;gi++) {
1764
- gs += grp.groupField[gi]+" "+grp.groupOrder[gi]+", ";
1777
+ var index = grp.groupField[gi];
1778
+ $.each(ts.p.colModel, function(cmIndex, cmValue) {
1779
+ if (cmValue.name == index && cmValue.index){
1780
+ index = cmValue.index;
1781
+ }
1782
+ } );
1783
+ gs += index +" "+grp.groupOrder[gi]+", ";
1765
1784
  }
1766
1785
  prm[pN.sort] = gs + prm[pN.sort];
1767
1786
  }
@@ -2497,7 +2516,7 @@ $.fn.jqGrid = function( pin ) {
2497
2516
  .scroll(grid.scrollGrid);
2498
2517
  $("table:first",grid.bDiv).css({width:ts.p.tblwidth+"px"});
2499
2518
  if( isMSIE ) {
2500
- if( $("tbody",this).size() == 2 ) { $("tbody:gt(0)",this).remove();}
2519
+ if( $("tbody",this).length == 2 ) { $("tbody:gt(0)",this).remove();}
2501
2520
  if( ts.p.multikey) {$(grid.bDiv).bind("selectstart",function(){return false;});}
2502
2521
  } else {
2503
2522
  if( ts.p.multikey) {$(grid.bDiv).bind("mousedown",function(){return false;});}
@@ -2609,9 +2628,6 @@ $.fn.jqGrid = function( pin ) {
2609
2628
  this.grid.cols = this.rows[0].cells;
2610
2629
 
2611
2630
  populate();ts.p.hiddengrid=false;
2612
- $(window).unload(function () {
2613
- ts = null;
2614
- });
2615
2631
  });
2616
2632
  };
2617
2633
  $.jgrid.extend({
@@ -2652,7 +2668,7 @@ $.jgrid.extend({
2652
2668
  function scrGrid(iR){
2653
2669
  var ch = $($t.grid.bDiv)[0].clientHeight,
2654
2670
  st = $($t.grid.bDiv)[0].scrollTop,
2655
- rpos = $t.rows[iR].offsetTop,
2671
+ rpos = $($t.rows[iR]).position().top,
2656
2672
  rh = $t.rows[iR].clientHeight;
2657
2673
  if(rpos+rh >= ch+st) { $($t.grid.bDiv)[0].scrollTop = rpos-(ch+st)+rh+st; }
2658
2674
  else if(rpos < ch+st) {
@@ -2943,7 +2959,7 @@ $.jgrid.extend({
2943
2959
  prp = t.formatCol(i,1,v, data, rowid, true);
2944
2960
  row[row.length] = "<td role=\"gridcell\" "+prp+">"+v+"</td>";
2945
2961
  }
2946
- row.unshift( t.constructTr(rowid, false, cna, lcdata, lcdata ) );
2962
+ row.unshift( t.constructTr(rowid, false, cna, lcdata, data, false ) );
2947
2963
  row[row.length] = "</tr>";
2948
2964
  if(t.rows.length === 0){
2949
2965
  $("table:first",t.grid.bDiv).append(row.join(''));
@@ -3370,13 +3386,9 @@ $.jgrid.extend({
3370
3386
  if(mathopr) {
3371
3387
  v = parseFloat(val);
3372
3388
  sum += v;
3373
- if(i===0) {
3374
- min = v;
3375
- max = v;
3376
- } else {
3377
- min = Math.min(min, v);
3378
- max = Math.max(max, v);
3379
- }
3389
+ if (max === undefined) {max = min = v}
3390
+ min = Math.min(min, v);
3391
+ max = Math.max(max, v);
3380
3392
  }
3381
3393
  else if(obj) { ret.push( {id:$t.rows[i].id,value:val} ); }
3382
3394
  else { ret.push( val ); }
@@ -3458,6 +3470,7 @@ $.jgrid.extend({
3458
3470
  }
3459
3471
  }
3460
3472
  $($t).jqGrid('setSelection', id, true, event);
3473
+ event.preventDefault();
3461
3474
  }
3462
3475
  //if key is down arrow
3463
3476
  if(event.keyCode === 40){
@@ -3474,6 +3487,7 @@ $.jgrid.extend({
3474
3487
  }
3475
3488
  }
3476
3489
  $($t).jqGrid('setSelection', id, true, event);
3490
+ event.preventDefault();
3477
3491
  }
3478
3492
  // left
3479
3493
  if(event.keyCode === 37 ){
@@ -3887,7 +3901,7 @@ $.jgrid.extend({
3887
3901
  if (!$t.grid || $t.p.cellEdit !== true ) {return;}
3888
3902
  // trick to process keydown on non input elements
3889
3903
  $t.p.knv = $t.p.id + "_kn";
3890
- var selection = $("<span style='width:0px;height:0px;background-color:black;' tabindex='0'><span tabindex='-1' style='width:0px;height:0px;background-color:grey' id='"+$t.p.knv+"'></span></span>"),
3904
+ var selection = $("<div style='position:absolute;top:-1000000px;width:1px;height:1px;' tabindex='0'><div tabindex='-1' style='width:1px;height:1px;' id='"+$t.p.knv+"'></div></div>"),
3891
3905
  i, kdir;
3892
3906
  function scrollGrid(iR, iC, tp){
3893
3907
  if (tp.substr(0,1)=='v') {
@@ -4075,7 +4089,8 @@ $.extend($.jgrid,{
4075
4089
  }
4076
4090
  return [curleft,curtop];
4077
4091
  },
4078
- createModal : function(aIDs, content, p, insertSelector, posSelector, appendsel, css) {
4092
+ createModal : function(aIDs, content, p, insertSelector, posSelector, appendsel, css) {
4093
+ p = $.extend(true, $.jgrid.jqModal || {}, p);
4079
4094
  var mw = document.createElement('div'), rtlsup, self = this;
4080
4095
  css = $.extend({}, css || {});
4081
4096
  rtlsup = $(p.gbox).attr("dir") == "rtl" ? true : false;
@@ -4762,6 +4777,44 @@ $.jgrid.extend({
4762
4777
  }
4763
4778
  });
4764
4779
  },
4780
+ clearBeforeUnload : function () {
4781
+ return this.each(function(){
4782
+ var grid = this.grid;
4783
+ grid.emptyRows.call(this, true, true); // this work quick enough and reduce the size of memory leaks if we have someone
4784
+
4785
+ //$(document).unbind("mouseup"); // TODO add namespace
4786
+ $(grid.hDiv).unbind("mousemove"); // TODO add namespace
4787
+ $(this).unbind();
4788
+
4789
+ grid.dragEnd = null;
4790
+ grid.dragMove = null;
4791
+ grid.dragStart = null;
4792
+ grid.emptyRows = null;
4793
+ grid.populate = null;
4794
+ grid.populateVisible = null;
4795
+ grid.scrollGrid = null;
4796
+ grid.selectionPreserver = null;
4797
+
4798
+ grid.bDiv = null;
4799
+ grid.cDiv = null;
4800
+ grid.hDiv = null;
4801
+ grid.cols = null;
4802
+ var i, l = grid.headers.length;
4803
+ for (i = 0; i < l; i++) {
4804
+ grid.headers[i].el = null;
4805
+ }
4806
+
4807
+ this.formatCol = null;
4808
+ this.sortData = null;
4809
+ this.updatepager = null;
4810
+ this.refreshIndex = null;
4811
+ this.setHeadCheckBox = null;
4812
+ this.constructTr = null;
4813
+ this.formatter = null;
4814
+ this.addXmlData = null;
4815
+ this.addJSONData = null;
4816
+ });
4817
+ },
4765
4818
  GridDestroy : function () {
4766
4819
  return this.each(function(){
4767
4820
  if ( this.grid ) {
@@ -4769,6 +4822,7 @@ $.jgrid.extend({
4769
4822
  $(this.p.pager).remove();
4770
4823
  }
4771
4824
  try {
4825
+ $(this).jqGrid('clearBeforeUnload');
4772
4826
  $("#gbox_"+$.jgrid.jqID(this.id)).remove();
4773
4827
  } catch (_) {}
4774
4828
  }
@@ -4792,6 +4846,7 @@ $.jgrid.extend({
4792
4846
  } else {
4793
4847
  $(newtable).insertBefore("#gbox_"+gid).show();
4794
4848
  }
4849
+ $(this).jqGrid('clearBeforeUnload');
4795
4850
  $("#gbox_"+gid).remove();
4796
4851
  });
4797
4852
  },
@@ -5203,7 +5258,7 @@ $.jgrid.extend({
5203
5258
  $thead = $htable.children("thead"),
5204
5259
  $theadInTable,
5205
5260
  $firstHeaderRow = $htable.find(".jqg-first-row-header");
5206
- if($firstHeaderRow.html() === null) {
5261
+ if($firstHeaderRow[0] === undefined) {
5207
5262
  $firstHeaderRow = $('<tr>', {role: "row", "aria-hidden": "true"}).addClass("jqg-first-row-header").css("height", "auto");
5208
5263
  } else {
5209
5264
  $firstHeaderRow.empty();
@@ -6295,7 +6350,7 @@ $.jgrid.extend({
6295
6350
  }
6296
6351
  }
6297
6352
  }
6298
- if ( $("#"+$.jgrid.jqID(IDs.themodal)).html() !== null ) {
6353
+ if ( $("#"+$.jgrid.jqID(IDs.themodal))[0] !== undefined ) {
6299
6354
  showFilter($("#fbox_"+$.jgrid.jqID(+$t.p.id)));
6300
6355
  } else {
6301
6356
  var fil = $("<div><div id='"+fid+"' class='searchFilter' style='overflow:auto'></div></div>").insertBefore("#gview_"+$.jgrid.jqID($t.p.id)),
@@ -6573,7 +6628,7 @@ $.jgrid.extend({
6573
6628
  p.caption=rp_ge[$t.p.id].editCaption;
6574
6629
  frmoper = "edit";
6575
6630
  }
6576
- if(p.recreateForm===true && $("#"+$.jgrid.jqID(IDs.themodal)).html() !== null) {
6631
+ if(p.recreateForm===true && $("#"+$.jgrid.jqID(IDs.themodal))[0] !== undefined) {
6577
6632
  $("#"+$.jgrid.jqID(IDs.themodal)).remove();
6578
6633
  }
6579
6634
  var closeovrl = true;
@@ -7109,8 +7164,8 @@ $.jgrid.extend({
7109
7164
  return [pos,rowsInGrid];
7110
7165
  }
7111
7166
 
7112
- if ( $("#"+$.jgrid.jqID(IDs.themodal)).html() !== null ) {
7113
- showFrm = $($t).triggerHandler("jqGridAddEditBeforeInitData", [$("#"+$.jgrid.jqID(frmgr))]);
7167
+ if ( $("#"+$.jgrid.jqID(IDs.themodal))[0] !== undefined ) {
7168
+ showFrm = $($t).triggerHandler("jqGridAddEditBeforeInitData", [$("#"+$.jgrid.jqID(frmgr)), frmoper]);
7114
7169
  if(typeof(showFrm) == "undefined") {
7115
7170
  showFrm = true;
7116
7171
  }
@@ -7362,9 +7417,12 @@ $.jgrid.extend({
7362
7417
  npos[0] = parseInt(npos[0],10);
7363
7418
  if(npos[0] != -1 && npos[1][npos[0]+1]) {
7364
7419
  $($t).triggerHandler("jqGridAddEditClickPgButtons", ['next',$("#"+frmgr),npos[1][npos[0]]]);
7420
+ var nposret = true;
7365
7421
  if($.isFunction(p.onclickPgButtons)) {
7366
- p.onclickPgButtons.call($t, 'next',$("#"+frmgr),npos[1][npos[0]]);
7422
+ nposret = p.onclickPgButtons.call($t, 'next',$("#"+frmgr),npos[1][npos[0]]);
7423
+ if( nposret !== undefined && nposret === false ) {return false;}
7367
7424
  }
7425
+ if( $("#"+$.jgrid.jqID(npos[1][npos[0]+1])).hasClass('ui-state-disabled')) {return false;}
7368
7426
  fillData(npos[1][npos[0]+1],$t,frmgr);
7369
7427
  $($t).jqGrid("setSelection",npos[1][npos[0]+1]);
7370
7428
  $($t).triggerHandler("jqGridAddEditAfterClickPgButtons", ['next',$("#"+frmgr),npos[1][npos[0]]]);
@@ -7381,9 +7439,12 @@ $.jgrid.extend({
7381
7439
  var ppos = getCurrPos();
7382
7440
  if(ppos[0] != -1 && ppos[1][ppos[0]-1]) {
7383
7441
  $($t).triggerHandler("jqGridAddEditClickPgButtons", ['prev',$("#"+frmgr),ppos[1][ppos[0]]]);
7442
+ var pposret = true;
7384
7443
  if($.isFunction(p.onclickPgButtons)) {
7385
- p.onclickPgButtons.call($t, 'prev',$("#"+frmgr),ppos[1][ppos[0]]);
7444
+ pposret = p.onclickPgButtons.call($t, 'prev',$("#"+frmgr),ppos[1][ppos[0]]);
7445
+ if( pposret !== undefined && pposret === false ) {return false;}
7386
7446
  }
7447
+ if( $("#"+$.jgrid.jqID(ppos[1][ppos[0]-1])).hasClass('ui-state-disabled')) {return false;}
7387
7448
  fillData(ppos[1][ppos[0]-1],$t,frmgr);
7388
7449
  $($t).jqGrid("setSelection",ppos[1][ppos[0]-1]);
7389
7450
  $($t).triggerHandler("jqGridAddEditAfterClickPgButtons", ['prev',$("#"+frmgr),ppos[1][ppos[0]]]);
@@ -7421,6 +7482,7 @@ $.jgrid.extend({
7421
7482
  beforeInitData : null,
7422
7483
  viewPagerButtons : true
7423
7484
  }, $.jgrid.view, p || {});
7485
+ rp_ge[$(this)[0].p.id] = p;
7424
7486
  return this.each(function(){
7425
7487
  var $t = this;
7426
7488
  if (!$t.grid || !rowid) {return;}
@@ -7428,11 +7490,11 @@ $.jgrid.extend({
7428
7490
  frmgr = "ViewGrid_"+$.jgrid.jqID( gID ), frmtb = "ViewTbl_" + $.jgrid.jqID( gID ),
7429
7491
  frmgr_id = "ViewGrid_"+gID, frmtb_id = "ViewTbl_"+gID,
7430
7492
  IDs = {themodal:'viewmod'+gID,modalhead:'viewhd'+gID,modalcontent:'viewcnt'+gID, scrollelm : frmgr},
7431
- onBeforeInit = $.isFunction(p.beforeInitData) ? p.beforeInitData : false,
7493
+ onBeforeInit = $.isFunction(rp_ge[$t.p.id].beforeInitData) ? rp_ge[$t.p.id].beforeInitData : false,
7432
7494
  showFrm = true,
7433
7495
  maxCols = 1, maxRows=0;
7434
7496
  function focusaref(){ //Sfari 3 issues
7435
- if(p.closeOnEscape===true || p.navkeys[0]===true) {
7497
+ if(rp_ge[$t.p.id].closeOnEscape===true || rp_ge[$t.p.id].navkeys[0]===true) {
7436
7498
  setTimeout(function(){$(".ui-jqdialog-titlebar-close","#"+$.jgrid.jqID(IDs.modalhead)).focus();},0);
7437
7499
  }
7438
7500
  }
@@ -7483,8 +7545,7 @@ $.jgrid.extend({
7483
7545
  }
7484
7546
  }
7485
7547
  setme = this.align === 'right' && maxw !==0 ? true : false;
7486
- var opt = $.extend({}, this.editoptions || {} ,{id:nm,name:nm}),
7487
- frmopt = $.extend({},{rowabove:false,rowcontent:''}, this.formoptions || {}),
7548
+ var frmopt = $.extend({},{rowabove:false,rowcontent:''}, this.formoptions || {}),
7488
7549
  rp = parseInt(frmopt.rowpos,10) || cnt+1,
7489
7550
  cp = parseInt((parseInt(frmopt.colpos,10) || 1)*2,10);
7490
7551
  if(frmopt.rowabove) {
@@ -7553,7 +7614,7 @@ $.jgrid.extend({
7553
7614
  return [pos,rowsInGrid];
7554
7615
  }
7555
7616
 
7556
- if ( $("#"+$.jgrid.jqID(IDs.themodal)).html() !== null ) {
7617
+ if ( $("#"+$.jgrid.jqID(IDs.themodal))[0] !== undefined ) {
7557
7618
  if(onBeforeInit) {
7558
7619
  showFrm = onBeforeInit.call($t,$("#"+frmgr));
7559
7620
  if(typeof(showFrm) == "undefined") {
@@ -7564,7 +7625,7 @@ $.jgrid.extend({
7564
7625
  $(".ui-jqdialog-title","#"+$.jgrid.jqID(IDs.modalhead)).html(p.caption);
7565
7626
  $("#FormError","#"+frmtb).hide();
7566
7627
  fillData(rowid,$t);
7567
- if($.isFunction(p.beforeShowForm)) {p.beforeShowForm.call($t,$("#"+frmgr));}
7628
+ if($.isFunction(rp_ge[$t.p.id].beforeShowForm)) {rp_ge[$t.p.id].beforeShowForm.call($t,$("#"+frmgr));}
7568
7629
  $.jgrid.viewModal("#"+$.jgrid.jqID(IDs.themodal),{gbox:"#gbox_"+$.jgrid.jqID(gID),jqm:p.jqModal, jqM: false, overlay: p.overlay, modal:p.modal});
7569
7630
  focusaref();
7570
7631
  } else {
@@ -7609,11 +7670,6 @@ $.jgrid.extend({
7609
7670
  });
7610
7671
  }
7611
7672
  p.gbox = "#gbox_"+$.jgrid.jqID(gID);
7612
- var cle = false;
7613
- if(p.closeOnEscape===true){
7614
- p.closeOnEscape = false;
7615
- cle = true;
7616
- }
7617
7673
  var bt = $("<span></span>").append(frm).append("<table border='0' class='EditTable' id='"+frmtb+"_2'><tbody><tr id='Act_Buttons'><td class='navButton' width='"+p.labelswidth+"'>"+(rtlb ? bN+bP : bP+bN)+"</td><td class='EditButton'>"+bC+"</td></tr></tbody></table>");
7618
7674
  $.jgrid.createModal(IDs,bt,p,"#gview_"+$.jgrid.jqID($t.p.id),$("#gview_"+$.jgrid.jqID($t.p.id))[0]);
7619
7675
  if(rtlb) {
@@ -7624,7 +7680,7 @@ $.jgrid.extend({
7624
7680
  bt = null;
7625
7681
  $("#"+IDs.themodal).keydown( function( e ) {
7626
7682
  if(e.which === 27) {
7627
- if(cle) {$.jgrid.hideModal(this,{gb:p.gbox,jqm:p.jqModal, onClose: p.onClose});}
7683
+ if(rp_ge[$t.p.id].closeOnEscape) {$.jgrid.hideModal(this,{gb:p.gbox,jqm:p.jqModal, onClose: p.onClose});}
7628
7684
  return false;
7629
7685
  }
7630
7686
  if(p.navkeys[0]===true) {
@@ -7739,7 +7795,7 @@ $.jgrid.extend({
7739
7795
  dtbl_id = "DelTbl_" + gID,
7740
7796
  IDs = {themodal:'delmod'+gID,modalhead:'delhd'+gID,modalcontent:'delcnt'+gID, scrollelm: dtbl};
7741
7797
  if (jQuery.isArray(rowids)) {rowids = rowids.join();}
7742
- if ( $("#"+$.jgrid.jqID(IDs.themodal)).html() !== null ) {
7798
+ if ( $("#"+$.jgrid.jqID(IDs.themodal))[0] !== undefined ) {
7743
7799
  if(onBeforeInit) {
7744
7800
  showFrm = onBeforeInit.call($t,$("#"+dtbl));
7745
7801
  if(typeof(showFrm) == "undefined") {
@@ -7936,7 +7992,7 @@ $.jgrid.extend({
7936
7992
  var alertIDs = {themodal:'alertmod',modalhead:'alerthd',modalcontent:'alertcnt'},
7937
7993
  $t = this, twd, tdw;
7938
7994
  if(!$t.grid || typeof elem != 'string') {return;}
7939
- if ($("#"+alertIDs.themodal).html() === null) {
7995
+ if ($("#"+alertIDs.themodal)[0] === undefined) {
7940
7996
  if(!o.alerttop && !o.alertleft) {
7941
7997
  if (typeof window.innerWidth != 'undefined') {
7942
7998
  o.alertleft = window.innerWidth;
@@ -8197,7 +8253,7 @@ $.jgrid.extend({
8197
8253
  if( typeof elem === "string" && elem.indexOf("#") !== 0) {elem = "#"+$.jgrid.jqID(elem);}
8198
8254
  var findnav = $(".navtable",elem)[0], $t = this;
8199
8255
  if (findnav) {
8200
- if( p.id && $("#"+$.jgrid.jqID(p.id), findnav).html() !== null ) {return;}
8256
+ if( p.id && $("#"+$.jgrid.jqID(p.id), findnav)[0] !== undefined ) {return;}
8201
8257
  var tbd = $("<td></td>");
8202
8258
  if(p.buttonicon.toString().toUpperCase() == "NONE") {
8203
8259
  $(tbd).addClass('ui-pg-button ui-corner-all').append("<div class='ui-pg-div'>"+p.caption+"</div>");
@@ -8293,7 +8349,7 @@ $.jgrid.extend({
8293
8349
  "use strict";
8294
8350
  $.extend($.jgrid,{
8295
8351
  template : function(format){ //jqgformat
8296
- var args = $.makeArray(arguments).slice(1), j = 0;
8352
+ var args = $.makeArray(arguments).slice(1), j = 1;
8297
8353
  if(format===undefined) { format = ""; }
8298
8354
  return format.replace(/\{([\w\-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g, function(m,i){
8299
8355
  if(!isNaN(parseInt(i,10))) {
@@ -8379,15 +8435,13 @@ $.jgrid.extend({
8379
8435
  grp.groups.push({idx:i,dataIndex:fieldName,value:v, startRow: irow, cnt:1, summary : [] } );
8380
8436
  grp.lastvalues[i] = v;
8381
8437
  grp.counters[i] = {cnt:1, pos:grp.groups.length-1, summary: $.extend(true,[],grp.summary)};
8382
- if(grp.groupSummary[i]) {
8383
- $.each(grp.counters[i].summary,function() {
8384
- if ($.isFunction(this.st)) {
8385
- this.v = this.st.call($t, this.v, this.nm, record);
8386
- } else {
8387
- this.v = $($t).jqGrid('groupingCalculations.handler',this.st, this.v, this.nm, this.sr, this.srt, record);
8388
- }
8389
- });
8390
- }
8438
+ $.each(grp.counters[i].summary,function() {
8439
+ if ($.isFunction(this.st)) {
8440
+ this.v = this.st.call($t, this.v, this.nm, record);
8441
+ } else {
8442
+ this.v = $($t).jqGrid('groupingCalculations.handler',this.st, this.v, this.nm, this.sr, this.srt, record);
8443
+ }
8444
+ });
8391
8445
  grp.groups[grp.counters[i].pos].summary = grp.counters[i].summary;
8392
8446
  } else {
8393
8447
  if( (typeof(v) !== "object" && (grp.lastvalues[i] !== v) ) ) {
@@ -8396,15 +8450,13 @@ $.jgrid.extend({
8396
8450
  grp.lastvalues[i] = v;
8397
8451
  changed = 1;
8398
8452
  grp.counters[i] = {cnt:1, pos:grp.groups.length-1, summary: $.extend(true,[],grp.summary)};
8399
- if(grp.groupSummary[i]) {
8400
- $.each(grp.counters[i].summary,function() {
8401
- if ($.isFunction(this.st)) {
8402
- this.v = this.st.call($t, this.v, this.nm, record);
8403
- } else {
8404
- this.v = $($t).jqGrid('groupingCalculations.handler',this.st, this.v, this.nm, this.sr, this.srt, record);
8405
- }
8406
- });
8407
- }
8453
+ $.each(grp.counters[i].summary,function() {
8454
+ if ($.isFunction(this.st)) {
8455
+ this.v = this.st.call($t, this.v, this.nm, record);
8456
+ } else {
8457
+ this.v = $($t).jqGrid('groupingCalculations.handler',this.st, this.v, this.nm, this.sr, this.srt, record);
8458
+ }
8459
+ });
8408
8460
  grp.groups[grp.counters[i].pos].summary = grp.counters[i].summary;
8409
8461
  } else {
8410
8462
  if (changed === 1) {
@@ -8412,29 +8464,25 @@ $.jgrid.extend({
8412
8464
  grp.groups.push({idx:i,dataIndex:fieldName,value:v, startRow: irow, cnt:1, summary : [] } );
8413
8465
  grp.lastvalues[i] = v;
8414
8466
  grp.counters[i] = {cnt:1, pos:grp.groups.length-1, summary: $.extend(true,[],grp.summary)};
8415
- if(grp.groupSummary[i]) {
8416
- $.each(grp.counters[i].summary,function() {
8417
- if ($.isFunction(this.st)) {
8418
- this.v = this.st.call($t, this.v, this.nm, record);
8419
- } else {
8420
- this.v = $($t).jqGrid('groupingCalculations.handler',this.st, this.v, this.nm, this.sr, this.srt, record);
8421
- }
8422
- });
8423
- }
8467
+ $.each(grp.counters[i].summary,function() {
8468
+ if ($.isFunction(this.st)) {
8469
+ this.v = this.st.call($t, this.v, this.nm, record);
8470
+ } else {
8471
+ this.v = $($t).jqGrid('groupingCalculations.handler',this.st, this.v, this.nm, this.sr, this.srt, record);
8472
+ }
8473
+ });
8424
8474
  grp.groups[grp.counters[i].pos].summary = grp.counters[i].summary;
8425
8475
  } else {
8426
8476
  grp.counters[i].cnt += 1;
8427
8477
  grp.groups[grp.counters[i].pos].cnt = grp.counters[i].cnt;
8428
- if(grp.groupSummary[i]) {
8429
- $.each(grp.counters[i].summary,function() {
8430
- if ($.isFunction(this.st)) {
8431
- this.v = this.st.call($t, this.v, this.nm, record);
8432
- } else {
8433
- this.v = $($t).jqGrid('groupingCalculations.handler',this.st, this.v, this.nm, this.sr, this.srt, record);
8434
- }
8435
- });
8436
- grp.groups[grp.counters[i].pos].summary = grp.counters[i].summary;
8437
- }
8478
+ $.each(grp.counters[i].summary,function() {
8479
+ if ($.isFunction(this.st)) {
8480
+ this.v = this.st.call($t, this.v, this.nm, record);
8481
+ } else {
8482
+ this.v = $($t).jqGrid('groupingCalculations.handler',this.st, this.v, this.nm, this.sr, this.srt, record);
8483
+ }
8484
+ });
8485
+ grp.groups[grp.counters[i].pos].summary = grp.counters[i].summary;
8438
8486
  }
8439
8487
  }
8440
8488
  }
@@ -8458,12 +8506,17 @@ $.jgrid.extend({
8458
8506
  tar = $("#"+$.jgrid.jqID(hid)),
8459
8507
  r = tar.length ? tar[0].nextSibling : null,
8460
8508
  tarspan = $("#"+$.jgrid.jqID(hid)+" span."+"tree-wrap-"+$t.p.direction),
8461
- collapsed = false;
8509
+ collapsed = false, tspan;
8462
8510
  if( tarspan.hasClass(minus) ) {
8463
8511
  if(grp.showSummaryOnHide) {
8464
8512
  if(r){
8465
8513
  while(r) {
8466
- if($(r).hasClass('jqfoot') ) { break; }
8514
+ if($(r).hasClass('jqfoot') ) {
8515
+ var lv = parseInt($(r).attr("jqfootlevel"),10);
8516
+ if( lv <= num) {
8517
+ break;
8518
+ }
8519
+ }
8467
8520
  $(r).hide();
8468
8521
  r = r.nextSibling;
8469
8522
  }
@@ -8484,6 +8537,10 @@ $.jgrid.extend({
8484
8537
  while(r) {
8485
8538
  if($(r).hasClass(uid+"_"+String(num)) || $(r).hasClass(uid+"_"+String(num-1)) ) { break; }
8486
8539
  $(r).show();
8540
+ tspan = $(r).find("span."+"tree-wrap-"+$t.p.direction);
8541
+ if( tspan && $(tspan).hasClass(plus) ) {
8542
+ $(tspan).removeClass(plus).addClass(minus);
8543
+ }
8487
8544
  r = r.nextSibling;
8488
8545
  }
8489
8546
  }
@@ -8524,7 +8581,7 @@ $.jgrid.extend({
8524
8581
  }
8525
8582
  }
8526
8583
  }
8527
- var sumreverse = grp.groupSummary;
8584
+ var sumreverse = $.makeArray(grp.groupSummary);
8528
8585
  sumreverse.reverse();
8529
8586
  $.each(grp.groups,function(i,n){
8530
8587
  toEnd++;
@@ -8559,7 +8616,7 @@ $.jgrid.extend({
8559
8616
  if(grp.groupCollapse && !grp.showSummaryOnHide) {
8560
8617
  hhdr = " style=\"display:none;\"";
8561
8618
  }
8562
- str += "<tr"+hhdr+" role=\"row\" class=\"ui-widget-content jqfoot ui-row-"+$t.p.direction+"\">";
8619
+ str += "<tr"+hhdr+" jqfootlevel=\""+(n.idx-ik)+"\" role=\"row\" class=\"ui-widget-content jqfoot ui-row-"+$t.p.direction+"\">";
8563
8620
  var fdata = findGroupIdx(i, ik, grp.groups),
8564
8621
  cm = $t.p.colModel,
8565
8622
  vv, grlen = fdata.cnt;
@@ -8571,7 +8628,7 @@ $.jgrid.extend({
8571
8628
  if(cm[k].summaryTpl) {
8572
8629
  tplfld = cm[k].summaryTpl;
8573
8630
  }
8574
- if(this.st.toLowerCase() === 'avg') {
8631
+ if(typeof(this.st) === 'string' && this.st.toLowerCase() === 'avg') {
8575
8632
  if(this.v && grlen > 0) {
8576
8633
  this.v = (this.v/grlen);
8577
8634
  }
@@ -9172,7 +9229,7 @@ $.jgrid.extend({
9172
9229
  }
9173
9230
  if(fr >= 0) { $t.p.savedRow.splice(fr,1); }
9174
9231
  $($t).triggerHandler("jqGridInlineAfterSaveRow", [rowid, resp, tmp, o]);
9175
- if( $.isFunction(o.aftersavefunc) ) { o.aftersavefunc.call($t, rowid,resp); }
9232
+ if( $.isFunction(o.aftersavefunc) ) { o.aftersavefunc.call($t, rowid,resp, o); }
9176
9233
  success = true;
9177
9234
  $(ind).unbind("keydown");
9178
9235
  } else {
@@ -9232,10 +9289,11 @@ $.jgrid.extend({
9232
9289
  if($.isFunction(o.errorfunc) ) {
9233
9290
  o.errorfunc.call($t, rowid, res, stat, err);
9234
9291
  } else {
9292
+ var rT = res.responseText || res.statusText;
9235
9293
  try {
9236
- $.jgrid.info_dialog($.jgrid.errors.errcap,'<div class="ui-state-error">'+ res.responseText +'</div>', $.jgrid.edit.bClose,{buttonalign:'right'});
9294
+ $.jgrid.info_dialog($.jgrid.errors.errcap,'<div class="ui-state-error">'+ rT +'</div>', $.jgrid.edit.bClose,{buttonalign:'right'});
9237
9295
  } catch(e) {
9238
- alert(res.responseText);
9296
+ alert(rT);
9239
9297
  }
9240
9298
  }
9241
9299
  if(o.restoreAfterError === true) {
@@ -9838,7 +9896,7 @@ $.jgrid.extend({
9838
9896
  $("tr.jqgrow:not(.ui-draggable)",$t).draggable($.isFunction(datadnd.drag) ? datadnd.drag.call($($t),datadnd) : datadnd.drag);
9839
9897
  }
9840
9898
  var appender = "<table id='jqgrid_dnd' class='ui-jqgrid-dnd'></table>";
9841
- if($("#jqgrid_dnd").html() === null) {
9899
+ if($("#jqgrid_dnd")[0] === undefined) {
9842
9900
  $('body').append(appender);
9843
9901
  }
9844
9902
 
@@ -10099,7 +10157,7 @@ addSubGrid : function( pos, sind ) {
10099
10157
  return false;
10100
10158
  };
10101
10159
  var subGridJson = function(sjxml, sbid){
10102
- var tddiv,result , i,cur, sgmap,j,
10160
+ var tddiv,result,i,cur, sgmap,j,
10103
10161
  dummy = $("<table cellspacing='0' cellpadding='0' border='0'><tbody></tbody></table>"),
10104
10162
  trdiv = $("<tr></tr>");
10105
10163
  for (i = 0; i<ts.p.subGridModel[0].name.length; i++) {
@@ -10111,7 +10169,7 @@ addSubGrid : function( pos, sind ) {
10111
10169
  $(dummy).append(trdiv);
10112
10170
  if (sjxml){
10113
10171
  sgmap = ts.p.jsonReader.subgrid;
10114
- result = sjxml[sgmap.root];
10172
+ result = $.jgrid.getAccessor(sjxml, sgmap.root);
10115
10173
  if ( typeof result !== 'undefined' ) {
10116
10174
  for (i=0;i<result.length;i++) {
10117
10175
  cur = result[i];
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jqgrid-jquery-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.4.0.0
4
+ version: 4.4.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Doc Walker
@@ -120,6 +120,7 @@ files:
120
120
  - vendor/assets/javascripts/i18n/grid.locale-is.js
121
121
  - vendor/assets/javascripts/i18n/grid.locale-it.js
122
122
  - vendor/assets/javascripts/i18n/grid.locale-ja.js
123
+ - vendor/assets/javascripts/i18n/grid.locale-kr.js
123
124
  - vendor/assets/javascripts/i18n/grid.locale-lt.js
124
125
  - vendor/assets/javascripts/i18n/grid.locale-mne.js
125
126
  - vendor/assets/javascripts/i18n/grid.locale-nl.js
@@ -135,6 +136,7 @@ files:
135
136
  - vendor/assets/javascripts/i18n/grid.locale-sv.js
136
137
  - vendor/assets/javascripts/i18n/grid.locale-th.js
137
138
  - vendor/assets/javascripts/i18n/grid.locale-tr.js
139
+ - vendor/assets/javascripts/i18n/grid.locale-tw.js
138
140
  - vendor/assets/javascripts/i18n/grid.locale-ua.js
139
141
  - vendor/assets/javascripts/jqgrid-jquery-rails.js
140
142
  - vendor/assets/javascripts/jquery.jqGrid.js