Ext.namespace('Backend');
Backend.locale = <%= I18n.t("backend.javascripts").to_json %>
Ext.UpdateManager.defaults.indicatorText = '
<%= I18n.t('extjs.msg') %>
';
if(Ext.View){
Ext.View.prototype.emptyText = "<%= I18n.t('extjs.emptyText') %>";
}
if(Ext.grid.Grid){
Ext.grid.Grid.prototype.ddText = "<%= I18n.t('extjs.ddText') %>";
}
if(Ext.TabPanelItem){
Ext.TabPanelItem.prototype.closeText = "<%= I18n.t('extjs.closeText') %>";
}
if(Ext.form.Field){
Ext.form.Field.prototype.invalidText = "<%= I18n.t('extjs.invalidText') %>";
}
if(Ext.LoadMask){
Ext.LoadMask.prototype.msg = "<%= I18n.t('extjs.msg') %>";
}
Date.monthNames = [<%= I18n.t('date.month_names').compact.to_json %>];
Date.getShortMonthName = function(month) {
return Date.monthNames[month].substring(0, 3);
};
Date.monthNumbers = {
Jan : 0,
Feb : 1,
Mar : 2,
Apr : 3,
May : 4,
Jun : 5,
Jul : 6,
Aug : 7,
Sep : 8,
Oct : 9,
Nov : 10,
Dec : 11
};
Date.getMonthNumber = function(name) {
return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
};
Date.dayNames = [<%= I18n.t('date.day_names').compact.to_json %>];
Date.getShortDayName = function(day) {
return Date.dayNames[day].substring(0, 3);
};
if(Ext.MessageBox){
Ext.MessageBox.buttonText = {
ok: "<%= I18n.t('extjs.messageBox.ok') %>",
cancel: "<%= I18n.t('extjs.messageBox.cancel') %>",
yes: "<%= I18n.t('extjs.messageBox.yesse') %>",
no: "<%= I18n.t('extjs.messageBox.none') %>"
};
}
if(Ext.util.Format){
Ext.util.Format.date = function(v, format){
if(!v) return "";
if(!(v instanceof Date)) v = new Date(Date.parse(v));
return v.dateFormat(format || "<%= I18n.t('extjs.dateFormat') %>");
};
Ext.util.Format.dateTimeRenderer = function(format){
return function(v){
return Ext.util.Format.date(v, format || "<%= I18n.t('extjs.dateTimeFormat') %>");
};
};
Ext.util.Format.dateRenderer = function(format){
return function(v){
return Ext.util.Format.date(v, format || "<%= I18n.t('extjs.dateFormat') %>");
};
};
}
if(Ext.DatePicker){
Ext.apply(Ext.DatePicker.prototype, <%= I18n.t('extjs.datePicker').to_json %>);
}
if(Ext.PagingToolbar){
Ext.apply(Ext.PagingToolbar.prototype, <%= I18n.t('extjs.pagingToolbar').to_json %>);
}
if(Ext.form.TextField){
Ext.apply(Ext.form.TextField.prototype, <%= I18n.t('extjs.form.textField').to_json %>);
}
if(Ext.form.NumberField){
Ext.apply(Ext.form.NumberField.prototype, <%= I18n.t('extjs.form.numberField').to_json %>);
}
if(Ext.form.DateField){
Ext.apply(Ext.form.DateField.prototype, <%= I18n.t('extjs.form.dateField').to_json %>);
}
if(Ext.form.ComboBox){
Ext.apply(Ext.form.ComboBox.prototype, <%= I18n.t('extjs.form.comboBox').to_json %>);
}
if(Ext.form.VTypes){
Ext.apply(Ext.form.VTypes, <%= I18n.t('extjs.form.vTypes').to_json %>);
}
if(Ext.form.HtmlEditor){
Ext.apply(Ext.form.HtmlEditor.prototype, <%= I18n.t('extjs.form.htmlEditor').to_json %>);
}
if(Ext.grid.GridView){
Ext.apply(Ext.grid.GridView.prototype, <%= I18n.t('extjs.grid.gridView').to_json %>);
}
if(Ext.grid.GroupingView){
Ext.apply(Ext.grid.GroupingView.prototype, <%= I18n.t('extjs.grid.groupingView').to_json %>);
}
if(Ext.grid.Search){
Ext.apply(Ext.grid.Search.prototype, <%= I18n.t('extjs.grid.search').to_json %>);
}
if(Ext.grid.PropertyColumnModel){
Ext.apply(Ext.grid.PropertyColumnModel.prototype, <%= I18n.t('extjs.grid.propertyColumnModel').to_json %>);
}
if(Ext.layout.BorderLayout.SplitRegion){
Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, <%= I18n.t('extjs.splitRegion').to_json %>);
}