minor fixes
This commit is contained in:
parent
ebd7289723
commit
6265a0bbbb
15 changed files with 40 additions and 33 deletions
|
|
@ -63,6 +63,7 @@
|
|||
"english": "Engels",
|
||||
"espa\u00f1ol": "espa\u00f1ol",
|
||||
"fran\u00e7ais": "fran\u00e7ais",
|
||||
"nederlands": "nederlands",
|
||||
"portugu\u00eas": "portugu\u00eas",
|
||||
"user_image_show": "user_image_show",
|
||||
"\u0627\u0644\u0639\u0631\u0628\u064a\u0629": "\u0627\u0644\u0639\u0631\u0628\u064a\u0629",
|
||||
|
|
|
|||
|
|
@ -802,11 +802,12 @@ _f.Frm.prototype.setup_client_js = function(caller, cdt, cdn) {
|
|||
// js
|
||||
var cs = doctype.__js || (doctype.client_script_core + doctype.client_script);
|
||||
if(cs) {
|
||||
//try {
|
||||
try {
|
||||
var tmp = eval(cs);
|
||||
// } catch(e) {
|
||||
// console.log(e);
|
||||
// }
|
||||
} catch(e) {
|
||||
show_alert("Error in Client Script.")
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
|
||||
// css
|
||||
|
|
|
|||
|
|
@ -245,9 +245,7 @@ _f.Grid.prototype.set_cell_value = function(cell) {
|
|||
// variations
|
||||
if(cell.cellIndex) {
|
||||
var df = copy_dict(hc);
|
||||
if(df.fieldtype=="Link")
|
||||
df.fieldtype=="Data";
|
||||
$(cell.div).html(wn.format(v, hc, doc));
|
||||
$(cell.div).html(wn.format(v, hc, {for_print:true}));
|
||||
} else {
|
||||
// Index column
|
||||
cell.div.style.padding = '2px';
|
||||
|
|
|
|||
|
|
@ -652,12 +652,7 @@ $.extend(_p, {
|
|||
|
||||
// Add label
|
||||
row.cells[0].innerHTML = f.label ? f.label : f.fieldname;
|
||||
var df = f;
|
||||
if(f.fieldtype=="Link") {
|
||||
df = copy_dict(f);
|
||||
df.fieldtype = "Data";
|
||||
}
|
||||
row.cells[1].innerHTML = wn.format(val, df);
|
||||
row.cells[1].innerHTML = wn.format(val, f, {for_print: true});
|
||||
|
||||
// left align currency in normal display
|
||||
if(f.fieldtype == 'Currency') {
|
||||
|
|
|
|||
|
|
@ -23,12 +23,13 @@ wn.form.formatters = {
|
|||
Check: function(value) {
|
||||
return value ? "<i class='icon-check'></i>" : "<i class='icon-check-empty'></i>";
|
||||
},
|
||||
Link: function(value, docfield) {
|
||||
if(!value) return "";
|
||||
Link: function(value, docfield, options) {
|
||||
if(options && options.for_print)
|
||||
return value;
|
||||
if(!value)
|
||||
return "";
|
||||
if(docfield && docfield.options) {
|
||||
return repl('<a href="#Form/%(doctype)s/%(name)s">\
|
||||
<i class="icon icon-share" title="Open %(name)s" \
|
||||
style="margin-top:-1px"></i></a> %(name)s', {
|
||||
return repl('<a href="#Form/%(doctype)s/%(name)s">%(name)s</a>', {
|
||||
doctype: docfield.options,
|
||||
name: value
|
||||
});
|
||||
|
|
@ -91,7 +92,7 @@ wn.form.get_formatter = function(fieldtype) {
|
|||
return wn.form.formatters[fieldtype.replace(/ /g, "")] || wn.form.formatters.Data;
|
||||
}
|
||||
|
||||
wn.format = function(value, df) {
|
||||
if(!df) df = {"fieldtype":"Data"}
|
||||
return wn.form.get_formatter(df.fieldtype)(value, df);
|
||||
wn.format = function(value, df, options) {
|
||||
if(!df) df = {"fieldtype":"Data"};
|
||||
return wn.form.get_formatter(df.fieldtype)(value, df, options);
|
||||
}
|
||||
|
|
@ -43,6 +43,7 @@
|
|||
"New",
|
||||
"Save",
|
||||
"Type",
|
||||
"More",
|
||||
"No records tagged.",
|
||||
"Page not found",
|
||||
"Add Message",
|
||||
|
|
@ -97,6 +98,7 @@
|
|||
"and",
|
||||
"For Links, use define linked",
|
||||
"From Date must be before To Date",
|
||||
"Sort By",
|
||||
"Permissions will be based on this DocType",
|
||||
"Attach",
|
||||
"Note: Other permission rules may also apply",
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@
|
|||
"Make a new": "\u062c\u0639\u0644 \u062c\u062f\u064a\u062f\u0629",
|
||||
"Message": "\u0631\u0633\u0627\u0644\u0629",
|
||||
"Modified by": "\u062a\u0639\u062f\u064a\u0644\u0647\u0627 \u0645\u0646 \u0642\u0628\u0644",
|
||||
"More": "\u0623\u0643\u062b\u0631",
|
||||
"New": "\u062c\u062f\u064a\u062f",
|
||||
"New Record": "\u0631\u0642\u0645 \u0642\u064a\u0627\u0633\u064a \u062c\u062f\u064a\u062f",
|
||||
"Next actions": "\u0627\u0644\u0625\u062c\u0631\u0627\u0621\u0627\u062a \u0627\u0644\u062a\u0627\u0644\u064a\u0629",
|
||||
|
|
@ -109,6 +110,7 @@
|
|||
"Showing only for": "\u062a\u0638\u0647\u0631 \u0641\u0642\u0637 \u0644\u0644",
|
||||
"Sorry we were unable to find what you were looking for.": "\u0648\u0622\u0633\u0641 \u0646\u062a\u0645\u0643\u0646 \u0645\u0646 \u0627\u0644\u0639\u062b\u0648\u0631 \u0639\u0644\u0649 \u0645\u0627 \u0643\u0646\u062a \u062a\u0628\u062d\u062b \u0639\u0646\u0647.",
|
||||
"Sorry you are not permitted to view this page.": "\u0639\u0630\u0631\u0627 \u063a\u064a\u0631 \u0645\u0633\u0645\u0648\u062d \u0644\u0643 \u0628\u0639\u0631\u0636 \u0647\u0630\u0647 \u0627\u0644\u0635\u0641\u062d\u0629.",
|
||||
"Sort By": "\u0641\u0631\u0632 \u062d\u0633\u0628",
|
||||
"Start Report For": "\u062a\u0642\u0631\u064a\u0631 \u0639\u0646 \u0628\u062f\u0621",
|
||||
"Subject": "\u0645\u0648\u0636\u0648\u0639",
|
||||
"Submitted": "\u0627\u0644\u0645\u0642\u062f\u0645\u0629",
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@
|
|||
"Make a new": "Hacer una nueva",
|
||||
"Message": "Mensaje",
|
||||
"Modified by": "Modificado por",
|
||||
"More": "M\u00e1s",
|
||||
"New": "Nuevo",
|
||||
"New Record": "Nuevo registro",
|
||||
"Next actions": "Pr\u00f3ximas acciones",
|
||||
|
|
@ -109,6 +110,7 @@
|
|||
"Showing only for": "Mostrando s\u00f3lo para",
|
||||
"Sorry we were unable to find what you were looking for.": "Lamentablemente no hemos podido encontrar lo que estabas buscando.",
|
||||
"Sorry you are not permitted to view this page.": "Disculpe, no tiene permiso para ver esta p\u00e1gina.",
|
||||
"Sort By": "Ordenado por",
|
||||
"Start Report For": "Inicio Informe para",
|
||||
"Subject": "Sujeto",
|
||||
"Submitted": "Enviado",
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@
|
|||
"Make a new": "Faire une nouvelle",
|
||||
"Message": "Message",
|
||||
"Modified by": "Modifi\u00e9 par",
|
||||
"More": "Plus",
|
||||
"New": "Nouveau",
|
||||
"New Record": "Nouveau record",
|
||||
"Next actions": "Prochaines actions",
|
||||
|
|
@ -109,6 +110,7 @@
|
|||
"Showing only for": "Affichage seulement pour",
|
||||
"Sorry we were unable to find what you were looking for.": "D\u00e9sol\u00e9, nous n'avons pas pu trouver ce que vous recherchez.",
|
||||
"Sorry you are not permitted to view this page.": "D\u00e9sol\u00e9, vous n'\u00eates pas autoris\u00e9 \u00e0 afficher cette page.",
|
||||
"Sort By": "Trier par",
|
||||
"Start Report For": "D\u00e9marrer Rapport pour",
|
||||
"Subject": "Sujet",
|
||||
"Submitted": "Soumis",
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@
|
|||
"Make a new": "\u090f\u0915 \u0928\u092f\u093e",
|
||||
"Message": "\u0938\u0902\u0926\u0947\u0936",
|
||||
"Modified by": "\u0915\u0947 \u0926\u094d\u0935\u093e\u0930\u093e \u091c\u093e\u0901\u091a\u093e \u0917\u092f\u093e",
|
||||
"More": "\u0905\u0927\u093f\u0915",
|
||||
"New": "\u0928\u0908",
|
||||
"New Record": "\u0928\u092f\u093e \u0930\u093f\u0915\u0949\u0930\u094d\u0921",
|
||||
"Next actions": "\u0905\u0917\u0932\u0940 \u0915\u093e\u0930\u094d\u0930\u0935\u093e\u0908",
|
||||
|
|
@ -110,6 +111,7 @@
|
|||
"Sorry we were unable to find what you were looking for.": "\u0916\u0947\u0926 \u0939\u0948 \u0915\u093f \u0939\u092e \u0916\u094b\u091c\u0928\u0947 \u0915\u0947 \u0932\u093f\u090f \u0906\u092a \u0915\u094d\u092f\u093e \u0926\u0947\u0916 \u0930\u0939\u0947 \u0925\u0947 \u0915\u0930\u0928\u0947 \u092e\u0947\u0902 \u0905\u0938\u092e\u0930\u094d\u0925 \u0925\u0947.",
|
||||
"Sorry you are not permitted to view this page": "\u0916\u0947\u0926 \u0939\u0948 \u0915\u093f \u0906\u092a\u0915\u094b \u0907\u0938 \u092a\u0943\u0937\u094d\u0920 \u0915\u094b \u0926\u0947\u0916\u0928\u0947 \u0915\u0940 \u0905\u0928\u0941\u092e\u0924\u093f \u0928\u0939\u0940\u0902 \u0939\u0948",
|
||||
"Sorry you are not permitted to view this page.": "\u0916\u0947\u0926 \u0939\u0948 \u0915\u093f \u0906\u092a\u0915\u094b \u0907\u0938 \u092a\u0943\u0937\u094d\u0920 \u0915\u094b \u0926\u0947\u0916\u0928\u0947 \u0915\u0940 \u0905\u0928\u0941\u092e\u0924\u093f \u0928\u0939\u0940\u0902 \u0939\u0948.",
|
||||
"Sort By": "\u0926\u094d\u0935\u093e\u0930\u093e \u0915\u094d\u0930\u092e\u092c\u0926\u094d\u0927 \u0915\u0930\u0947\u0902",
|
||||
"Start Report For": "\u092a\u094d\u0930\u093e\u0930\u0902\u092d \u0932\u093f\u090f \u0930\u093f\u092a\u094b\u0930\u094d\u091f",
|
||||
"Subject": "\u0935\u093f\u0937\u092f",
|
||||
"Submitted": "\u092a\u0947\u0936",
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@
|
|||
"Make a new": "Maak een nieuw",
|
||||
"Message": "Bericht",
|
||||
"Modified by": "Aangepast door",
|
||||
"More": "Meer",
|
||||
"New": "Nieuw",
|
||||
"New Record": "Nieuwe record",
|
||||
"Next actions": "Volgende acties",
|
||||
|
|
@ -109,6 +110,7 @@
|
|||
"Showing only for": "Resultaat alleen voor",
|
||||
"Sorry we were unable to find what you were looking for.": "Sorry we waren niet in staat om te vinden wat u zocht.",
|
||||
"Sorry you are not permitted to view this page.": "Sorry dat je niet toegestaan \u200b\u200bom deze pagina te bekijken.",
|
||||
"Sort By": "Sorteer op",
|
||||
"Start Report For": "Start Rapport Voor",
|
||||
"Subject": "Onderwerp",
|
||||
"Submitted": "Ingezonden",
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@
|
|||
"Make a new": "Fa\u00e7a um novo",
|
||||
"Message": "Mensagem",
|
||||
"Modified by": "Modificado por",
|
||||
"More": "Mais",
|
||||
"New": "Novo",
|
||||
"New Record": "Novo Registro",
|
||||
"Next actions": "Pr\u00f3ximas a\u00e7\u00f5es",
|
||||
|
|
@ -109,6 +110,7 @@
|
|||
"Showing only for": "Mostrando apenas para",
|
||||
"Sorry we were unable to find what you were looking for.": "Desculpe, n\u00e3o foram capazes de encontrar o que voc\u00ea estava procurando.",
|
||||
"Sorry you are not permitted to view this page.": "Desculpe, voc\u00ea n\u00e3o tem permiss\u00e3o para visualizar esta p\u00e1gina.",
|
||||
"Sort By": "Classificar por",
|
||||
"Start Report For": "Para come\u00e7ar Relat\u00f3rio",
|
||||
"Subject": "Assunto",
|
||||
"Submitted": "Enviado",
|
||||
|
|
|
|||
|
|
@ -136,11 +136,7 @@ wn.print.Table = Class.extend({
|
|||
var value = row[fieldname];
|
||||
|
||||
var df = wn.meta.docfield_map[me.tabletype][fieldname];
|
||||
if(df && df.fieldtype=="Link") {
|
||||
df = copy_dict(df);
|
||||
df.fieldtype = "Data";
|
||||
}
|
||||
value = wn.format(value, df);
|
||||
value = wn.format(value, df, {for_print:true});
|
||||
|
||||
// set formatted value back into data so that modifer can use it
|
||||
row[fieldname] = value;
|
||||
|
|
|
|||
|
|
@ -69,8 +69,9 @@ wn.ui.Listing = Class.extend({
|
|||
}
|
||||
}
|
||||
if(!this.opts.no_result_message) {
|
||||
this.opts.no_result_message = 'Nothing to show'
|
||||
this.opts.no_result_message = wn._('Nothing to show');
|
||||
}
|
||||
this.opts._more = wn._("More");
|
||||
},
|
||||
make: function(opts) {
|
||||
if(opts) {
|
||||
|
|
@ -112,7 +113,7 @@ wn.ui.Listing = Class.extend({
|
|||
</div>\
|
||||
\
|
||||
<div class="paging-button">\
|
||||
<button class="btn btn-more hide">More...</div>\
|
||||
<button class="btn btn-more hide">%(_more)s...</div>\
|
||||
</div>\
|
||||
</div>\
|
||||
', this.opts));
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ wn.views.ReportView = wn.ui.Listing.extend({
|
|||
|
||||
setup: function() {
|
||||
var me = this;
|
||||
this.page_title = 'Report: ' + (this.docname ? (this.doctype + ' - ' + this.docname) : this.doctype);
|
||||
this.page_title = wn._('Report')+ ': ' + wn._(this.docname ? (this.doctype + ' - ' + this.docname) : this.doctype);
|
||||
this.page.appframe.set_title(this.page_title)
|
||||
this.make({
|
||||
appframe: this.page.appframe,
|
||||
|
|
@ -179,11 +179,11 @@ wn.views.ReportView = wn.ui.Listing.extend({
|
|||
id: c[0],
|
||||
field: c[0],
|
||||
docfield: docfield,
|
||||
name: (docfield ? docfield.label : toTitle(c[0])),
|
||||
name: wn._(docfield ? docfield.label : toTitle(c[0])),
|
||||
width: (docfield ? cint(docfield.width) : 120) || 120,
|
||||
formatter: function(row, cell, value, columnDef, dataContext) {
|
||||
var docfield = columnDef.docfield;
|
||||
return wn.form.get_formatter(docfield ? docfield.fieldtype : "Data")(value, docfield);
|
||||
return wn.format(value, docfield);
|
||||
}
|
||||
}
|
||||
return coldef;
|
||||
|
|
@ -260,7 +260,7 @@ wn.views.ReportView = wn.ui.Listing.extend({
|
|||
make_column_picker: function() {
|
||||
var me = this;
|
||||
this.column_picker = new wn.ui.ColumnPicker(this);
|
||||
this.page.appframe.add_button('Pick Columns', function() {
|
||||
this.page.appframe.add_button(wn._('Pick Columns'), function() {
|
||||
me.column_picker.show(me.columns);
|
||||
}, 'icon-th-list');
|
||||
},
|
||||
|
|
@ -318,7 +318,7 @@ wn.views.ReportView = wn.ui.Listing.extend({
|
|||
this.sort_order_next_select.val('desc');
|
||||
|
||||
// button actions
|
||||
this.page.appframe.add_button('Sort By', function() {
|
||||
this.page.appframe.add_button(wn._('Sort By'), function() {
|
||||
me.sort_dialog.show();
|
||||
}, 'icon-arrow-down');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue