-
+
+
+
A wiki or Q&A for your organization
\ No newline at end of file
diff --git a/erpnext/knowledge_base/page/questions/questions.js b/erpnext/knowledge_base/page/questions/questions.js
index edb8063cbc..5d2820aeef 100644
--- a/erpnext/knowledge_base/page/questions/questions.js
+++ b/erpnext/knowledge_base/page/questions/questions.js
@@ -24,7 +24,7 @@ pscript.onload_questions = function(wrapper) {
var kb = new KnowledgeBase(body);
// sidebar
- this.sidebar = new wn.widgets.PageSidebar($(wrapper).find('.layout-side-section').get(0), {
+ this.sidebar = new wn.widgets.PageSidebar($(wrapper).find('.questions-tags').get(0), {
sections: [
{
title: 'Top Tags',
@@ -113,6 +113,7 @@ function KnowledgeBase(w) {
this.list = new wn.ui.Listing({
parent: this.list_area,
no_results_message: 'No questions found. Ask a new question!',
+ appframe: wn.pages.questions.appframe,
as_dict: 1,
get_query: function() {
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.js b/erpnext/stock/doctype/delivery_note/delivery_note.js
index 6dfb628bd2..f0fd801613 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.js
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.js
@@ -258,18 +258,21 @@ cur_frm.fields_dict['territory'].get_query = function(doc,cdt,cdn) {
//------------------------for printing without amount----------
var set_print_hide= function(doc, cdt, cdn){
+ var dn_fields = wn.meta.docfield_map['Delivery Note'];
+ var dn_item_fields = wn.meta.docfield_map['Delivery Note Item'];
+
if (doc.print_without_amount) {
- fields['Delivery Note']['currency'].print_hide = 1;
- fields['Delivery Note Item']['export_rate'].print_hide = 1;
- fields['Delivery Note Item']['adj_rate'].print_hide = 1;
- fields['Delivery Note Item']['ref_rate'].print_hide = 1;
- fields['Delivery Note Item']['export_amount'].print_hide = 1;
+ dn_fields['currency'].print_hide = 1;
+ dn_item_fields['export_rate'].print_hide = 1;
+ dn_item_fields['adj_rate'].print_hide = 1;
+ dn_item_fields['ref_rate'].print_hide = 1;
+ dn_item_fields['export_amount'].print_hide = 1;
} else {
- fields['Delivery Note']['currency'].print_hide = 0;
- fields['Delivery Note Item']['export_rate'].print_hide = 0;
- fields['Delivery Note Item']['adj_rate'].print_hide = 0;
- fields['Delivery Note Item']['ref_rate'].print_hide = 0;
- fields['Delivery Note Item']['export_amount'].print_hide = 0;
+ dn_fields['currency'].print_hide = 0;
+ dn_item_fields['export_rate'].print_hide = 0;
+ dn_item_fields['adj_rate'].print_hide = 0;
+ dn_item_fields['ref_rate'].print_hide = 0;
+ dn_item_fields['export_amount'].print_hide = 0;
}
}
diff --git a/js/all-app.js b/js/all-app.js
index fe0efa9162..8c1058bed3 100644
--- a/js/all-app.js
+++ b/js/all-app.js
@@ -193,6 +193,12 @@ $.fn.done_working=function(){var ele=this.get(0);ele.disabled=0;if(ele.loading_i
* lib/js/wn/model.js
*/
wn.provide('wn.model');wn.model={no_value_type:['Section Break','Column Break','HTML','Table','Button','Image'],new_names:{},with_doctype:function(doctype,callback){if(locals.DocType[doctype]){callback();}else{wn.call({method:'webnotes.widgets.form.load.getdoctype',args:{doctype:doctype},callback:callback});}},with_doc:function(doctype,name,callback){if(!name)name=doctype;if(locals[doctype]&&locals[doctype][name]){callback(name);}else{wn.call({method:'webnotes.widgets.form.load.getdoc',args:{doctype:doctype,name:name},callback:function(r){callback(name,r);}});}},can_delete:function(doctype){if(!doctype)return false;return locals.DocType[doctype].allow_trash&&wn.boot.profile.can_cancel.indexOf(doctype)!=-1;}}
+/*
+ * lib/js/wn/meta.js
+ */
+wn.provide('wn.meta.docfield_map');wn.provide('wn.meta.docfield_list');wn.provide('wn.meta.doctypes');$.extend(wn.meta,{add_field:function(df){wn.provide('wn.meta.docfield_map.'+df.parent);wn.meta.docfield_map[df.parent][df.fieldname||df.label]=df;if(!wn.meta.docfield_list[df.parent])
+wn.meta.docfield_list[df.parent]=[]
+wn.meta.docfield_list[df.parent].push(df);}});
/*
* lib/js/wn/misc/tools.js
*/
@@ -207,6 +213,8 @@ if(!wn.boot.user_info[uid])return def
if(!wn.boot.user_info[uid].fullname)
wn.boot.user_info[uid].fullname=uid;if(!wn.boot.user_info[uid].image)
wn.boot.user_info[uid].image=def.image;return wn.boot.user_info[uid];}
+wn.provide('wn.user');$.extend(wn.user,{name:wn.boot.profile.name,has_role:function(rl){if(typeof rl=='string')rl=[rl];for(var i in rl){if(wn.boot.profile.roles.indexOf(rl[i])!=-1)
+return true;}}})
wn.session_alive=true;$(document).bind('mousemove',function(){wn.session_alive=true;if(wn.session_alive_timeout)
clearTimeout(wn.session_alive_timeout);wn.session_alive_timeout=setTimeout('wn.session_alive=false;',30000);})
/*
@@ -243,7 +251,7 @@ throw new SyntaxError('JSON.parse');};}}());
wn.re_route={}
wn.route=function(){if(wn.re_route[window.location.hash]){window.location.hash=wn.re_route[window.location.hash];}
wn._cur_route=window.location.hash;route=wn.get_route();switch(route[0]){case"List":wn.views.doclistview.show(route[1]);break;case"Form":if(route.length>3){route[2]=route.splice(2).join('/');}
-wn.views.formview.show(route[1],route[2]);break;case"Report":wn.views.reportview.show(route[1],route[2]);break;default:wn.views.pageview.show(route[0]);}}
+wn.views.formview.show(route[1],route[2]);break;case"Report":wn.views.reportview.show(route[1],route[2]);break;case"Report2":wn.views.reportview2.show(route[1],route[2]);break;default:wn.views.pageview.show(route[0]);}}
wn.get_route=function(route){if(!route)
route=window.location.hash;if(route.substr(0,1)=='#')route=route.substr(1);if(route.substr(0,1)=='!')route=route.substr(1);return $.map(route.split('/'),function(r){return decodeURIComponent(r);});}
wn.set_route=function(){route=$.map(arguments,function(a){return encodeURIComponent(a)}).join('/');window.location.hash=route;wn.app.set_favicon();}
@@ -282,7 +290,6 @@ this.prepare_opts();$.extend(this,this.opts);$(this.parent).html(repl('\
\
\
\