From 2d700dd90d1add62e94e956d8c002dd2acc2c988 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 1 Oct 2012 14:46:37 +0530 Subject: [PATCH] added query report and cleaned up wn.ui.Dialog --- home/page/dashboard/dashboard.js | 2 +- home/page/profile_settings/profile_settings.js | 8 ++++---- public/js/complete_setup.js | 2 +- setup/doctype/email_digest/email_digest.js | 4 ++-- utilities/doctype/sms_control/sms_control.js | 2 +- utilities/page/questions/questions.js | 2 +- utilities/page/todo/todo.js | 3 +-- utilities/page/users/users.js | 10 +++++----- website/templates/js/blog_page.js | 2 +- 9 files changed, 17 insertions(+), 18 deletions(-) diff --git a/home/page/dashboard/dashboard.js b/home/page/dashboard/dashboard.js index 743f84e5db..5dae7af482 100644 --- a/home/page/dashboard/dashboard.js +++ b/home/page/dashboard/dashboard.js @@ -120,7 +120,7 @@ Dashboard = function() { }, show_settings: function() { - var d = new wn.widgets.Dialog({ + var d = new wn.ui.Dialog({ title: 'Set Company Settings', width: 500, fields: [ diff --git a/home/page/profile_settings/profile_settings.js b/home/page/profile_settings/profile_settings.js index 3c74e4d3e9..96a78e339e 100644 --- a/home/page/profile_settings/profile_settings.js +++ b/home/page/profile_settings/profile_settings.js @@ -65,7 +65,7 @@ MyProfile = function(wrapper) { // this.make_form = function() { var div = $a($td(this.tab, 0, 1), 'div'); - this.form = new wn.widgets.FieldGroup() + this.form = new wn.ui.FieldGroup() this.form.make_fields(div, [ {fieldname:'first_name', fieldtype:'Data',label:'First Name',reqd:1}, {fieldname:'last_name', fieldtype:'Data',label:'Last Name'}, @@ -89,7 +89,7 @@ MyProfile = function(wrapper) { // change password // this.change_password = function() { - var d = new wn.widgets.Dialog({ + var d = new wn.ui.Dialog({ title:'Change Password', width: 400, fields: [ @@ -121,7 +121,7 @@ MyProfile = function(wrapper) { // this.change_image = function() { - var d = new wn.widgets.Dialog({ + var d = new wn.ui.Dialog({ title: 'Set your Profile' }); @@ -142,7 +142,7 @@ MyProfile = function(wrapper) { } this.change_background = function() { - var d = new wn.widgets.Dialog({ + var d = new wn.ui.Dialog({ title: 'Set Background Image' }) diff --git a/public/js/complete_setup.js b/public/js/complete_setup.js index 83d65671c0..d00abb6f0a 100644 --- a/public/js/complete_setup.js +++ b/public/js/complete_setup.js @@ -25,7 +25,7 @@ $.extend(erpnext.complete_setup, { }, prepare_dialog: function() { - var d = new wn.widgets.Dialog({ + var d = new wn.ui.Dialog({ title: "Setup", fields: [ {fieldname:'first_name', label:'Your First Name', fieldtype:'Data', reqd: 1}, diff --git a/setup/doctype/email_digest/email_digest.js b/setup/doctype/email_digest/email_digest.js index 0ff57363d7..52068428ca 100644 --- a/setup/doctype/email_digest/email_digest.js +++ b/setup/doctype/email_digest/email_digest.js @@ -28,7 +28,7 @@ cur_frm.cscript.refresh = function(doc, dt, dn) { console.log(r.exc); } else { //console.log(arguments); - var d = new wn.widgets.Dialog({ + var d = new wn.ui.Dialog({ title: 'Email Digest: ' + dn, width: 800 }); @@ -68,7 +68,7 @@ cur_frm.cscript.addremove_recipients = function(doc, dt, dn) { } else { // Open a dialog and display checkboxes against email addresses doc = locals[dt][dn]; - var d = new wn.widgets.Dialog({ + var d = new wn.ui.Dialog({ title: 'Add/Remove Recipients', width: 400 }); diff --git a/utilities/doctype/sms_control/sms_control.js b/utilities/doctype/sms_control/sms_control.js index cd3db12626..9cc152fe06 100644 --- a/utilities/doctype/sms_control/sms_control.js +++ b/utilities/doctype/sms_control/sms_control.js @@ -50,7 +50,7 @@ function SMSManager() { me.dialog.show(); } this.make_dialog = function() { - var d = new wn.widgets.Dialog({ + var d = new wn.ui.Dialog({ title: 'Send SMS', width: 400, fields: [ diff --git a/utilities/page/questions/questions.js b/utilities/page/questions/questions.js index 1c208a882b..fced563d66 100644 --- a/utilities/page/questions/questions.js +++ b/utilities/page/questions/questions.js @@ -68,7 +68,7 @@ function KnowledgeBase(w) { // suggest a few users who can answer this.suggest = function() { - this.dialog = new wn.widgets.Dialog({ + this.dialog = new wn.ui.Dialog({ title: 'Suggest a users', width: 400, fields: [ diff --git a/utilities/page/todo/todo.js b/utilities/page/todo/todo.js index 39c8c2de01..0a725a7427 100644 --- a/utilities/page/todo/todo.js +++ b/utilities/page/todo/todo.js @@ -137,8 +137,7 @@ erpnext.todo.ToDoItem = Class.extend({ erpnext.todo.make_dialog = function(det) { if(!erpnext.todo.dialog) { - var dialog = new wn.widgets.Dialog(); - dialog.make({ + var dialog = new wn.ui.Dialog({ width: 480, title: 'To Do', fields: [ diff --git a/utilities/page/users/users.js b/utilities/page/users/users.js index 7f92609906..d09b20759c 100644 --- a/utilities/page/users/users.js +++ b/utilities/page/users/users.js @@ -140,7 +140,7 @@ $.extend(wn.pages.users, { }, make_settings_dialog: function() { var me = wn.pages.users; - me.settings_dialog = new wn.widgets.Dialog({ + me.settings_dialog = new wn.ui.Dialog({ title: 'Set User Security', width: 500, fields: [ @@ -205,7 +205,7 @@ $.extend(wn.pages.users, { }, get_password: function(btn, args) { var me = wn.pages.users; - var pass_d = new wn.widgets.Dialog({ + var pass_d = new wn.ui.Dialog({ title: 'Your Password', width: 300, fields: [ @@ -244,7 +244,7 @@ $.extend(wn.pages.users, { {active_users: active_users.length})); return; } - var d = new wn.widgets.Dialog({ + var d = new wn.ui.Dialog({ title: 'Add User', width: 400, fields: [{ @@ -282,7 +282,7 @@ $.extend(wn.pages.users, { erpnext.RoleEditor = Class.extend({ init: function() { - this.dialog = new wn.widgets.Dialog({ + this.dialog = new wn.ui.Dialog({ title: 'Set Roles' }); var me = this; @@ -407,7 +407,7 @@ erpnext.RoleEditor = Class.extend({ }, make_perm_dialog: function() { - this.perm_dialog = new wn.widgets.Dialog({ + this.perm_dialog = new wn.ui.Dialog({ title:'Role Permissions', width: 500 }); diff --git a/website/templates/js/blog_page.js b/website/templates/js/blog_page.js index 02d6dd5377..617993c508 100644 --- a/website/templates/js/blog_page.js +++ b/website/templates/js/blog_page.js @@ -94,7 +94,7 @@ erpnext.blog.make_comment_dialog = function(wrapper) { $comment_btn.click(function() { if(!erpnext.blog.comment_dialog) { - var d = new wn.widgets.Dialog({ + var d = new wn.ui.Dialog({ title: 'Add Comment', fields: [ {