[fix] multple entry bug via quick_entry
This commit is contained in:
parent
746d512924
commit
d3dda1a2eb
4 changed files with 19 additions and 7 deletions
|
|
@ -331,7 +331,7 @@ frappe.Application = Class.extend({
|
|||
},
|
||||
|
||||
trigger_primary_action: function() {
|
||||
if(cur_dialog) {
|
||||
if(cur_dialog && cur_dialog.display) {
|
||||
// trigger primary
|
||||
cur_dialog.get_primary_btn().trigger("click");
|
||||
} else if(cur_frm && cur_frm.page.btn_primary.is(':visible')) {
|
||||
|
|
|
|||
|
|
@ -1598,11 +1598,19 @@ frappe.ui.form.ControlTextEditor = frappe.ui.form.ControlCode.extend({
|
|||
['style', ['bold', 'italic', 'underline', 'clear']],
|
||||
['fontsize', ['fontsize']],
|
||||
['color', ['color']],
|
||||
['para', ['ul', 'ol', 'paragraph']],
|
||||
['height', ['height']],
|
||||
['para', ['ul', 'ol', 'paragraph', 'hr']],
|
||||
//['height', ['height']],
|
||||
['media', ['link', 'picture', 'video', 'table']],
|
||||
['misc', ['fullscreen', 'codeview']]
|
||||
],
|
||||
keyMap: {
|
||||
pc: {
|
||||
'CTRL+ENTER': ''
|
||||
},
|
||||
mac: {
|
||||
'CMD+ENTER': ''
|
||||
}
|
||||
},
|
||||
callbacks: {
|
||||
onChange: function(value) {
|
||||
me.parse_validate_and_set_in_model(value);
|
||||
|
|
|
|||
|
|
@ -107,6 +107,8 @@ frappe.ui.form.quick_entry = function(doctype, success) {
|
|||
if(!frappe.request.ajax_count) {
|
||||
// not already working -- double entry
|
||||
dialog.get_primary_btn().trigger("click");
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -254,10 +254,12 @@ frappe.views.Calendar = Class.extend({
|
|||
var palette_colors = ['red', 'green', 'blue', 'yellow', 'skyblue', 'orange'];
|
||||
var index = 0;
|
||||
|
||||
events = events.map(function(event) {
|
||||
event.className = "fc-bg-" + palette_colors[index];
|
||||
index = (index + 1) % palette_colors.length;
|
||||
})
|
||||
if(events) {
|
||||
events = events.map(function(event) {
|
||||
event.className = "fc-bg-" + palette_colors[index];
|
||||
index = (index + 1) % palette_colors.length;
|
||||
})
|
||||
}
|
||||
},
|
||||
update_event: function(event, revertFunc) {
|
||||
var me = this;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue