diff --git a/frappe/core/doctype/todo/todo_list.js b/frappe/core/doctype/todo/todo_list.js index 0c6c9d684a..9a6b29c346 100644 --- a/frappe/core/doctype/todo/todo_list.js +++ b/frappe/core/doctype/todo/todo_list.js @@ -1,11 +1,11 @@ frappe.listview_settings['ToDo'] = { onload: function(me) { - $(frappe.container.page) - .find(".layout-main-section") - .css({ - "background-color":"cornsilk", - "min-height": "400px" - }) + // $(frappe.container.page) + // .find(".layout-main-section") + // .css({ + // "background-color":"cornsilk", + // "min-height": "400px" + // }) if(user_roles.indexOf("System Manager")!==-1) { frappe.route_options = { "owner": user diff --git a/frappe/public/css/appframe.css b/frappe/public/css/appframe.css index 83d72604a6..d660346702 100644 --- a/frappe/public/css/appframe.css +++ b/frappe/public/css/appframe.css @@ -5,16 +5,23 @@ padding-bottom: 15px; } +.appframe-wrapper { + background-color: #fff; + min-height: 400px; + box-shadow: 1px 0px 1px rgba(0,0,0,0.4); +} + .appframe-titlebar { border-bottom: 1px solid #ddd; } .appframe-footer { border-top: 1px solid #ddd; + background-color: rgba(255,255,255,0.9); } -.appframe-titlebar, .appframe-footer { - background-color: #e8e8e8; +.appframe-titlebar, .appframe-iconbar { + background-color: rgba(255,255,255,0.7); /*background: url(/assets/frappe/images/ui/sos.png) repeat;*/ /*-webkit-box-shadow: inset 0 0 7px rgba(0, 0, 0, .07); box-shadow: inset 0 0 7px rgba(0, 0, 0, .07);*/ @@ -171,7 +178,7 @@ h2.titlebar-left-item { .appframe-footer { - margin-top: 15px; + padding-top: 15px; } .workflow-button-area { diff --git a/frappe/public/css/desk.css b/frappe/public/css/desk.css index 551d4ee084..8fd8da13d0 100644 --- a/frappe/public/css/desk.css +++ b/frappe/public/css/desk.css @@ -293,12 +293,16 @@ ul.linked-with-list li { /* form footer */ .form-footer { - padding-top: 15px; - padding-bottom: 15px; - color: #888; + padding-bottom: 30px; /*box-shadow: 0px -1px 6px rgba(0,0,0,0.3);*/ } +.form-footer h5 { + margin: 15px 0px; + font-weight: bold; +} + + .like-disabled-input { background-color: #f8f8f8; padding: 6px; diff --git a/frappe/public/js/frappe/form/assign_to.js b/frappe/public/js/frappe/form/assign_to.js index 6bf24bdd76..66f8afb5db 100644 --- a/frappe/public/js/frappe/form/assign_to.js +++ b/frappe/public/js/frappe/form/assign_to.js @@ -41,18 +41,22 @@ frappe.ui.form.AssignTo = Class.extend({ if(d && d.length) { for(var i=0; i\ - %(avatar)s %(fullname)s \ - ×', info)) + $(repl('
\ + \ + \ +
\ + %(fullname)s \ + ×\ +
%(description)s
\ +
\ +
', info)) .appendTo(this.$list); - - this.$list.find(".avatar").css("margin-top", "-7px") - this.$list.find('.avatar img').centerImage(); } // set remove diff --git a/frappe/public/js/frappe/form/attachments.js b/frappe/public/js/frappe/form/attachments.js index a84c45b564..5dbdb62e28 100644 --- a/frappe/public/js/frappe/form/attachments.js +++ b/frappe/public/js/frappe/form/attachments.js @@ -68,7 +68,7 @@ frappe.ui.form.Attachments = Class.extend({ } var me = this; - var $attach = $(repl('
\ + var $attach = $(repl('
\ \ ").appendTo(this.parent); this.input = $('
\ -
') +
') .appendTo(this.row) .find("textarea"); this.button = $('
\ @@ -47,17 +47,16 @@ frappe.ui.form.Comments = Class.extend({ c.image = frappe.user_info(c.comment_by).image; c.comment_on = dateutil.comment_when(c.creation); c.fullname = frappe.user_info(c.comment_by).fullname; + c.comment = frappe.markdown(c.comment); - $(repl('
\ -
\ -
\ - \ -
\ -
%(delete)s\ + $(repl('
\ + \ + \ + \ +
%(delete)s\
%(comment)s
\ %(fullname)s / %(comment_on)s\
\ -
\
', c)) .appendTo(me.list) .on("click", ".close", function() { diff --git a/frappe/public/js/frappe/form/control.js b/frappe/public/js/frappe/form/control.js index fc53ac65ea..a53a47845f 100644 --- a/frappe/public/js/frappe/form/control.js +++ b/frappe/public/js/frappe/form/control.js @@ -434,14 +434,14 @@ frappe.ui.form.ControlTime = frappe.ui.form.ControlData.extend({ import_timepicker(); this._super(); this.$input.timepicker({ - timeFormat: 'hh:mm:ss', + timeFormat: 'HH:mm:ss', }); } }); frappe.ui.form.ControlDatetime = frappe.ui.form.ControlDate.extend({ set_datepicker: function() { - this.datepicker_options.timeFormat = "hh:mm:ss"; + this.datepicker_options.timeFormat = "HH:mm:ss"; this.datepicker_options.dateFormat = (frappe.boot.sysdefaults.date_format || 'yy-mm-dd').replace('yyyy','yy'); diff --git a/frappe/public/js/frappe/form/footer.js b/frappe/public/js/frappe/form/footer.js index 4deb9947df..eb153ae9d5 100644 --- a/frappe/public/js/frappe/form/footer.js +++ b/frappe/public/js/frappe/form/footer.js @@ -19,7 +19,7 @@ frappe.ui.form.Footer = Class.extend({ var me = this; this.wrapper = $('

\
\
\ '+__("Assigned To")+': \ \
\ -

\ +


\
\
\ '+__("Attachments")+':\ diff --git a/frappe/public/js/frappe/misc/user.js b/frappe/public/js/frappe/misc/user.js index e429195c33..3887197e19 100644 --- a/frappe/public/js/frappe/misc/user.js +++ b/frappe/public/js/frappe/misc/user.js @@ -25,10 +25,12 @@ frappe.avatar = function(user, large, title) { } frappe.ui.set_user_background = function(src, selector) { - if(!selector) selector = "#page-desktop"; + if(!selector) selector = "body"; if(!src) src = "assets/frappe/images/ui/random-polygons.jpg"; frappe.dom.set_style(repl('%(selector)s { \ - background: url("%(src)s") center center; \ + background: url("%(src)s") center center;\ + background-attachment: fixed; \ + background-size: 100%; \ }', {src:src, selector:selector})) } diff --git a/frappe/public/js/frappe/ui/appframe.js b/frappe/public/js/frappe/ui/appframe.js index 1c4d9799da..629d5b74c6 100644 --- a/frappe/public/js/frappe/ui/appframe.js +++ b/frappe/public/js/frappe/ui/appframe.js @@ -345,10 +345,12 @@ frappe.ui.make_app_page = function(opts) {
\
\
\ -
\ -
\ -
\ -
\ +
\ +
\ +
\ +
\ +
\ +
\
\ ').appendTo($wrapper); diff --git a/frappe/public/js/frappe/ui/dialog.js b/frappe/public/js/frappe/ui/dialog.js index 1bd47c6f16..ca31ea4ef7 100644 --- a/frappe/public/js/frappe/ui/dialog.js +++ b/frappe/public/js/frappe/ui/dialog.js @@ -10,7 +10,6 @@ frappe.ui.Dialog = frappe.ui.FieldGroup.extend({ init: function(opts) { this.display = false; this.is_dialog = true; - if(!opts.width) opts.width = "600px"; $.extend(this, opts); this._super(); @@ -19,7 +18,6 @@ frappe.ui.Dialog = frappe.ui.FieldGroup.extend({ make: function() { this.$wrapper = frappe.get_modal("", ""); this.wrapper = this.$wrapper.find('.modal-dialog') - .css("width", this.width) .get(0); this.make_head(); this.body = this.$wrapper.find(".modal-body").get(0); diff --git a/frappe/widgets/form/assign_to.py b/frappe/widgets/form/assign_to.py index b552e63bbb..0ed25bc86a 100644 --- a/frappe/widgets/form/assign_to.py +++ b/frappe/widgets/form/assign_to.py @@ -16,9 +16,9 @@ def get(args=None): get_docinfo(args.get("doctype"), args.get("name")) - return frappe.db.sql_list("""select owner from `tabToDo` + return frappe.db.sql("""select owner, description from `tabToDo` where reference_type=%(doctype)s and reference_name=%(name)s and status="Open" - order by modified desc limit 5""", args) + order by modified desc limit 5""", args, as_dict=True) @frappe.whitelist() def add(args=None): @@ -135,5 +135,4 @@ def notify_assignment(assigned_by, owner, doc_type, doc_name, action='CLOSE', arg["parenttype"] = "Assignment" from frappe.core.page.messages import messages - import json messages.post(**arg) diff --git a/frappe/widgets/form/load.py b/frappe/widgets/form/load.py index 915037acab..328e4430ed 100644 --- a/frappe/widgets/form/load.py +++ b/frappe/widgets/form/load.py @@ -110,12 +110,12 @@ def add_comments(dt, dn, limit=20): return cl def add_assignments(dt, dn): - cl = frappe.db.sql_list("""select owner from `tabToDo` + cl = frappe.db.sql("""select owner, description from `tabToDo` where reference_type=%(doctype)s and reference_name=%(name)s and status="Open" order by modified desc limit 5""", { "doctype": dt, "name": dn - }) + }, as_dict=True) return cl