removed languages filled methods, added this methods into new file

This commit is contained in:
saurabh 2016-02-17 19:12:24 +05:30
parent 5265aa43e4
commit 648fd33576

View File

@ -1,6 +1,8 @@
// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
frappe.require("assets/erpnext/js/controllers/load_languages.js")
frappe.ui.form.on("Supplier", {
refresh: function(frm) {
frm.cscript.make_dashboard(frm.doc);
@ -88,22 +90,3 @@ cur_frm.fields_dict['accounts'].grid.get_field('account').get_query = function(d
}
}
}
cur_frm.cscript.before_load = function(doc, dt, dn, callback) {
var update_language_select = function(user_language) {
cur_frm.set_df_property("print_language", "options", frappe.languages || ["", "English"]);
callback && callback();
}
if(!frappe.languages) {
frappe.call({
method: "frappe.core.doctype.user.user.get_languages",
callback: function(r) {
frappe.languages = r.message.languages;
update_language_select();
}
});
} else {
update_language_select();
}
}