Merge pull request #2814 from netchampfaris/listview-fixes

[kanban] open form when card clicked
This commit is contained in:
Nabin Hait 2017-03-07 19:45:09 +05:30 committed by GitHub
commit 3cc2a5e3c8
6 changed files with 19 additions and 9 deletions

View file

@ -94,6 +94,8 @@ kbd {
min-width: 200px;
padding: 0px;
font-size: 12px;
max-height: 400px;
overflow: auto;
border-radius: 0px 0px 4px 4px;
}
.dropdown-menu .dropdown-header {

View file

@ -94,6 +94,8 @@ kbd {
min-width: 200px;
padding: 0px;
font-size: 12px;
max-height: 400px;
overflow: auto;
border-radius: 0px 0px 4px 4px;
}
.dropdown-menu .dropdown-header {

View file

@ -94,6 +94,8 @@ kbd {
min-width: 200px;
padding: 0px;
font-size: 12px;
max-height: 400px;
overflow: auto;
border-radius: 0px 0px 4px 4px;
}
.dropdown-menu .dropdown-header {

View file

@ -69,17 +69,18 @@ frappe.views.GanttView = frappe.views.ListRenderer.extend({
},
custom_popup_html: function(task) {
var item = me.get_item(task.id);
var list_item_subject = frappe.render_template('list_item_subject', item);
var html = '<div class="heading">'+
list_item_subject +'</div>';
// custom html in {doctype}_list.js
var html =
`<h5>${task.name}</h5>
<p>${task._start.format('MMM D')} - ${task._end.format('MMM D')}</p>`;
// custom html in doctype settings
var custom = me.settings.gantt_custom_popup_html;
if(custom) {
html = custom(item, html);
if(custom && $.isFunction(custom)) {
var ganttobj = task;
html = custom(ganttobj, item);
}
return '<div class="details-container">'+ html +'</div>';
return '<div class="details-container">' + html + '</div>';
}
});
this.render_dropdown();

View file

@ -531,7 +531,8 @@ frappe.provide("frappe.views");
function bind_edit_card() {
self.$card.find('.kanban-card.content').on('click', function () {
setup_edit_card();
frappe.set_route('Form', card.doctype, card.name);
// setup_edit_card();
});
}

View file

@ -107,6 +107,8 @@ kbd {
min-width: 200px;
padding: 0px;
font-size: @text-medium;
max-height: 400px;
overflow: auto;
// only rounded bottoms
border-radius: 0px 0px 4px 4px;