提交 | 用户 | 时间
|
58d006
|
1 |
;(function($){ |
A |
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: "View {0} - {1} of {2}", |
|
14 |
emptyrecords: "No records to view", |
|
15 |
loadtext: "Loading...", |
|
16 |
pgtext : "Page {0} of {1}" |
|
17 |
}, |
|
18 |
search : { |
|
19 |
caption: "Search...", |
|
20 |
Find: "Find", |
|
21 |
Reset: "Reset", |
|
22 |
odata: [{ oper:'eq', text:'equal'},{ oper:'ne', text:'not equal'},{ oper:'lt', text:'less'},{ oper:'le', text:'less or equal'},{ oper:'gt', text:'greater'},{ oper:'ge', text:'greater or equal'},{ oper:'bw', text:'begins with'},{ oper:'bn', text:'does not begin with'},{ oper:'in', text:'is in'},{ oper:'ni', text:'is not in'},{ oper:'ew', text:'ends with'},{ oper:'en', text:'does not end with'},{ oper:'cn', text:'contains'},{ oper:'nc', text:'does not contain'}], |
|
23 |
groupOps: [ { op: "AND", text: "all" }, { op: "OR", text: "any" } ] |
|
24 |
}, |
|
25 |
edit : { |
|
26 |
addCaption: "Add Record", |
|
27 |
editCaption: "Edit Record", |
|
28 |
bSubmit: "Submit", |
|
29 |
bCancel: "Cancel", |
|
30 |
bClose: "Close", |
|
31 |
saveData: "Data has been changed! Save changes?", |
|
32 |
bYes : "Yes", |
|
33 |
bNo : "No", |
|
34 |
bExit : "Cancel", |
|
35 |
msg: { |
|
36 |
required:"Field is required", |
|
37 |
number:"Please, enter valid number", |
|
38 |
minValue:"value must be greater than or equal to ", |
|
39 |
maxValue:"value must be less than or equal to", |
|
40 |
email: "is not a valid e-mail", |
|
41 |
integer: "Please, enter valid integer value", |
|
42 |
date: "Please, enter valid date value", |
|
43 |
url: "is not a valid URL. Prefix required ('http://' or 'https://')", |
|
44 |
nodefined : " is not defined!", |
|
45 |
novalue : " return value is required!", |
|
46 |
customarray : "Custom function should return array!", |
|
47 |
customfcheck : "Custom function should be present in case of custom checking!" |
|
48 |
|
|
49 |
} |
|
50 |
}, |
|
51 |
view : { |
|
52 |
caption: "View Record", |
|
53 |
bClose: "Close" |
|
54 |
}, |
|
55 |
del : { |
|
56 |
caption: "Delete", |
|
57 |
msg: "Delete selected record(s)?", |
|
58 |
bSubmit: "Delete", |
|
59 |
bCancel: "Cancel" |
|
60 |
}, |
|
61 |
nav : { |
|
62 |
edittext: "", |
|
63 |
edittitle: "Edit selected row", |
|
64 |
addtext:"", |
|
65 |
addtitle: "Add new row", |
|
66 |
deltext: "", |
|
67 |
deltitle: "Delete selected row", |
|
68 |
searchtext: "", |
|
69 |
searchtitle: "Find records", |
|
70 |
refreshtext: "", |
|
71 |
refreshtitle: "Reload Grid", |
|
72 |
alertcap: "Warning", |
|
73 |
alerttext: "Please, select row", |
|
74 |
viewtext: "", |
|
75 |
viewtitle: "View selected row" |
|
76 |
}, |
|
77 |
col : { |
|
78 |
caption: "Select columns", |
|
79 |
bSubmit: "Ok", |
|
80 |
bCancel: "Cancel" |
|
81 |
}, |
|
82 |
errors : { |
|
83 |
errcap : "Error", |
|
84 |
nourl : "No url is set", |
|
85 |
norecords: "No records to process", |
|
86 |
model : "Length of colNames <> 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 |
"Sun", "Mon", "Tue", "Wed", "Thr", "Fri", "Sat", |
|
95 |
"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" |
|
96 |
], |
|
97 |
monthNames: [ |
|
98 |
"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", |
|
99 |
"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" |
|
100 |
], |
|
101 |
AmPm : ["am","pm","AM","PM"], |
|
102 |
S: function (j) {return j < 11 || j > 13 ? ['st', 'nd', 'rd', 'th'][Math.min((j - 1) % 10, 3)] : 'th';}, |
|
103 |
srcformat: 'Y-m-d', |
|
104 |
newformat: 'n/j/Y', |
|
105 |
parseRe : /[Tt\\\/:_;.,\t\s-]/, |
|
106 |
masks : { |
|
107 |
// see http://php.net/manual/en/function.date.php for PHP format used in jqGrid |
|
108 |
// and see http://docs.jquery.com/UI/Datepicker/formatDate |
|
109 |
// and https://github.com/jquery/globalize#dates for alternative formats used frequently |
|
110 |
// one can find on https://github.com/jquery/globalize/tree/master/lib/cultures many |
|
111 |
// information about date, time, numbers and currency formats used in different countries |
|
112 |
// one should just convert the information in PHP format |
|
113 |
ISO8601Long:"Y-m-d H:i:s", |
|
114 |
ISO8601Short:"Y-m-d", |
|
115 |
// short date: |
|
116 |
// n - Numeric representation of a month, without leading zeros |
|
117 |
// j - Day of the month without leading zeros |
|
118 |
// Y - A full numeric representation of a year, 4 digits |
|
119 |
// example: 3/1/2012 which means 1 March 2012 |
|
120 |
ShortDate: "n/j/Y", // in jQuery UI Datepicker: "M/d/yyyy" |
|
121 |
// long date: |
|
122 |
// l - A full textual representation of the day of the week |
|
123 |
// F - A full textual representation of a month |
|
124 |
// d - Day of the month, 2 digits with leading zeros |
|
125 |
// Y - A full numeric representation of a year, 4 digits |
|
126 |
LongDate: "l, F d, Y", // in jQuery UI Datepicker: "dddd, MMMM dd, yyyy" |
|
127 |
// long date with long time: |
|
128 |
// l - A full textual representation of the day of the week |
|
129 |
// F - A full textual representation of a month |
|
130 |
// d - Day of the month, 2 digits with leading zeros |
|
131 |
// Y - A full numeric representation of a year, 4 digits |
|
132 |
// g - 12-hour format of an hour without leading zeros |
|
133 |
// i - Minutes with leading zeros |
|
134 |
// s - Seconds, with leading zeros |
|
135 |
// A - Uppercase Ante meridiem and Post meridiem (AM or PM) |
|
136 |
FullDateTime: "l, F d, Y g:i:s A", // in jQuery UI Datepicker: "dddd, MMMM dd, yyyy h:mm:ss tt" |
|
137 |
// month day: |
|
138 |
// F - A full textual representation of a month |
|
139 |
// d - Day of the month, 2 digits with leading zeros |
|
140 |
MonthDay: "F d", // in jQuery UI Datepicker: "MMMM dd" |
|
141 |
// short time (without seconds) |
|
142 |
// g - 12-hour format of an hour without leading zeros |
|
143 |
// i - Minutes with leading zeros |
|
144 |
// A - Uppercase Ante meridiem and Post meridiem (AM or PM) |
|
145 |
ShortTime: "g:i A", // in jQuery UI Datepicker: "h:mm tt" |
|
146 |
// long time (with seconds) |
|
147 |
// g - 12-hour format of an hour without leading zeros |
|
148 |
// i - Minutes with leading zeros |
|
149 |
// s - Seconds, with leading zeros |
|
150 |
// A - Uppercase Ante meridiem and Post meridiem (AM or PM) |
|
151 |
LongTime: "g:i:s A", // in jQuery UI Datepicker: "h:mm:ss tt" |
|
152 |
SortableDateTime: "Y-m-d\\TH:i:s", |
|
153 |
UniversalSortableDateTime: "Y-m-d H:i:sO", |
|
154 |
// month with year |
|
155 |
// Y - A full numeric representation of a year, 4 digits |
|
156 |
// F - A full textual representation of a month |
|
157 |
YearMonth: "F, Y" // in jQuery UI Datepicker: "MMMM, yyyy" |
|
158 |
}, |
|
159 |
reformatAfterEdit : false |
|
160 |
}, |
|
161 |
baseLinkUrl: '', |
|
162 |
showAction: '', |
|
163 |
target: '', |
|
164 |
checkbox : {disabled:true}, |
|
165 |
idName : 'id' |
|
166 |
} |
|
167 |
}); |
|
168 |
})(jQuery); |