[fix] dirty for text editor and use emoji for desktop icon
This commit is contained in:
parent
80679f1b2f
commit
97393402da
4 changed files with 19 additions and 10 deletions
|
|
@ -49,12 +49,12 @@
|
|||
"hide_toolbar": 0,
|
||||
"idx": 0,
|
||||
"image_view": 0,
|
||||
"in_create": 1,
|
||||
"in_create": 0,
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-07-26 21:29:00.353105",
|
||||
"modified": "2017-09-15 12:26:21.827149",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Domain",
|
||||
|
|
@ -65,7 +65,7 @@
|
|||
"amend": 0,
|
||||
"apply_user_permissions": 0,
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"create": 1,
|
||||
"delete": 0,
|
||||
"email": 1,
|
||||
"export": 1,
|
||||
|
|
@ -75,15 +75,15 @@
|
|||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "System Manager",
|
||||
"role": "Administrator",
|
||||
"set_user_permissions": 0,
|
||||
"share": 1,
|
||||
"submit": 0,
|
||||
"write": 0
|
||||
"write": 1
|
||||
}
|
||||
],
|
||||
"quick_entry": 1,
|
||||
"read_only": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"search_fields": "domain",
|
||||
"show_name_in_global_search": 0,
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
{%= __("Delete") %}</button>
|
||||
<button type="reset"
|
||||
class="grid-add-multiple-rows btn btn-xs btn-default hide"
|
||||
style="margin-right: 10px;">
|
||||
style="margin-right: 4px;">
|
||||
{%= __("Add Multiple") %}</a>
|
||||
<!-- hack to allow firefox include this in tabs -->
|
||||
<button type="reset" class="btn btn-xs btn-default grid-add-row">
|
||||
|
|
|
|||
|
|
@ -7,6 +7,10 @@ frappe.ui.app_icon = {
|
|||
get_html: function(module, small) {
|
||||
var icon = module.icon;
|
||||
var color = module.color;
|
||||
if (icon
|
||||
&& icon.match(/([\uE000-\uF8FF]|\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDDFF])/g)) {
|
||||
module.emoji = module.icon;
|
||||
}
|
||||
var icon_style = "";
|
||||
if(module.reverse) {
|
||||
icon_style = "color: #36414C;";
|
||||
|
|
@ -17,10 +21,10 @@ frappe.ui.app_icon = {
|
|||
}
|
||||
|
||||
// first letter
|
||||
if(!icon) {
|
||||
if(!icon || module.emoji) {
|
||||
icon = '<span class="inner" ' +
|
||||
(module.reverse ? ('style="' + icon_style + '"') : '')
|
||||
+ '>' + module._label[0].toUpperCase() + '</span>';
|
||||
+ '>' + (module.emoji || module._label[0].toUpperCase()) + '</span>';
|
||||
} else if(icon.split(".").slice(-1)[0]==="svg") {
|
||||
$.ajax({
|
||||
url: frappe.urllib.get_full_url(icon),
|
||||
|
|
|
|||
|
|
@ -195,7 +195,12 @@ _f.Frm.prototype.watch_model_updates = function() {
|
|||
frappe.model.on(me.doctype, "*", function(fieldname, value, doc) {
|
||||
// set input
|
||||
if(doc.name===me.docname) {
|
||||
me.dirty();
|
||||
if (!value && !doc[value]) {
|
||||
// both the incoming and outgoing values are falsy
|
||||
// so don't trigger dirty
|
||||
} else {
|
||||
me.dirty();
|
||||
}
|
||||
me.fields_dict[fieldname]
|
||||
&& me.fields_dict[fieldname].refresh(fieldname);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue