ソースを参照

[fix] multple entry bug via quick_entry

version-14
Rushabh Mehta 8年前
コミット
d3dda1a2eb
4個のファイルの変更19行の追加7行の削除
  1. +1
    -1
      frappe/public/js/frappe/desk.js
  2. +10
    -2
      frappe/public/js/frappe/form/control.js
  3. +2
    -0
      frappe/public/js/frappe/form/quick_entry.js
  4. +6
    -4
      frappe/public/js/frappe/views/calendar/calendar.js

+ 1
- 1
frappe/public/js/frappe/desk.js ファイルの表示

@@ -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')) {


+ 10
- 2
frappe/public/js/frappe/form/control.js ファイルの表示

@@ -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);


+ 2
- 0
frappe/public/js/frappe/form/quick_entry.js ファイルの表示

@@ -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;
}
}
});


+ 6
- 4
frappe/public/js/frappe/views/calendar/calendar.js ファイルの表示

@@ -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;


読み込み中…
キャンセル
保存