Merge pull request #601 from rmehta/develop
reportview.js: fix select order
This commit is contained in:
commit
3bf2f28141
4 changed files with 57 additions and 41 deletions
|
|
@ -1,49 +1,54 @@
|
|||
{
|
||||
"allow_rename": 1,
|
||||
"autoname": "field:module_name",
|
||||
"creation": "2013-01-10 16:34:03",
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"allow_rename": 1,
|
||||
"autoname": "field:module_name",
|
||||
"creation": "2013-01-10 16:34:03",
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"fields": [
|
||||
{
|
||||
"fieldname": "module_name",
|
||||
"fieldtype": "Data",
|
||||
"in_list_view": 1,
|
||||
"label": "Module Name",
|
||||
"oldfieldname": "module_name",
|
||||
"oldfieldtype": "Data",
|
||||
"fieldname": "module_name",
|
||||
"fieldtype": "Data",
|
||||
"in_list_view": 1,
|
||||
"label": "Module Name",
|
||||
"oldfieldname": "module_name",
|
||||
"oldfieldtype": "Data",
|
||||
"permlevel": 0
|
||||
},
|
||||
},
|
||||
{
|
||||
"fieldname": "app_name",
|
||||
"fieldtype": "Data",
|
||||
"in_list_view": 1,
|
||||
"label": "App Name",
|
||||
"permlevel": 0,
|
||||
"fieldname": "app_name",
|
||||
"fieldtype": "Data",
|
||||
"in_list_view": 1,
|
||||
"label": "App Name",
|
||||
"permlevel": 0,
|
||||
"reqd": 1
|
||||
}
|
||||
],
|
||||
"icon": "icon-sitemap",
|
||||
"idx": 1,
|
||||
"modified": "2014-05-26 03:35:50.991776",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Module Def",
|
||||
"owner": "Administrator",
|
||||
],
|
||||
"icon": "icon-sitemap",
|
||||
"idx": 1,
|
||||
"modified": "2014-06-12 01:00:52.304755",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Module Def",
|
||||
"owner": "Administrator",
|
||||
"permissions": [
|
||||
{
|
||||
"amend": 0,
|
||||
"cancel": 0,
|
||||
"create": 1,
|
||||
"delete": 1,
|
||||
"email": 1,
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "Administrator",
|
||||
"submit": 0,
|
||||
"amend": 0,
|
||||
"cancel": 0,
|
||||
"create": 1,
|
||||
"delete": 1,
|
||||
"email": 1,
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "Administrator",
|
||||
"submit": 0,
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"permlevel": 0,
|
||||
"read": 1,
|
||||
"role": "System Manager"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -365,7 +365,8 @@ frappe.views.CommunicationComposer = Class.extend({
|
|||
if(comm_list.length > 0) {
|
||||
fields.content.set_input(reply
|
||||
+ "<p></p>"
|
||||
+"-----"+__("In response to")+"-----<p></p>"
|
||||
+"-----"+__("In response to")+"-----"
|
||||
+"<p style='font-size: 11px; color: #888'>"+__("Please reply above this line or remove it if you are replying below it")+"</p><br><br>"
|
||||
+ comm_list[0].content);
|
||||
} else {
|
||||
fields.content.set_input(reply);
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ frappe.views.QueryReport = Class.extend({
|
|||
f.set_input(df["default"]);
|
||||
}
|
||||
if(df.fieldtype=="Check") {
|
||||
$(f.wrapper).find("input[type='checkbox']").css({"float":"None"});
|
||||
$(f.wrapper).find("input[type='checkbox']").css({"float":"None", "margin-left": "0px"});
|
||||
}
|
||||
|
||||
if(df.get_query) f.get_query = df.get_query;
|
||||
|
|
|
|||
|
|
@ -598,7 +598,15 @@ frappe.ui.ColumnPicker = Class.extend({
|
|||
me.add_column(c);
|
||||
});
|
||||
|
||||
$(this.dialog.body).find('.column-list').sortable();
|
||||
$(this.dialog.body).find('.column-list').sortable({
|
||||
update: function(event, ui) {
|
||||
me.columns = [];
|
||||
$.each($(me.dialog.body).find('.column-list .column-list-item'),
|
||||
function(i, ele) {
|
||||
me.columns.push($(ele).data("fieldselect"))
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// add column
|
||||
$(this.dialog.body).find('.btn-add').click(function() {
|
||||
|
|
@ -623,7 +631,7 @@ frappe.ui.ColumnPicker = Class.extend({
|
|||
add_column: function(c) {
|
||||
if(!c) return;
|
||||
var w = $('<div style="padding: 5px; background-color: #eee; \
|
||||
width: 90%; margin-bottom: 10px; border-radius: 3px; cursor: move;">\
|
||||
width: 90%; margin-bottom: 10px; border-radius: 3px; cursor: move;" class="column-list-item">\
|
||||
<img src="assets/frappe/images/ui/drag-handle.png" style="margin-right: 10px;">\
|
||||
<a class="close" style="margin-top: 5px;">×</a>\
|
||||
</div>')
|
||||
|
|
@ -637,6 +645,8 @@ frappe.ui.ColumnPicker = Class.extend({
|
|||
fieldselect.$select.css({width: '70%', 'margin-top':'5px'})
|
||||
fieldselect.val((c[1] || this.doctype) + "." + c[0]);
|
||||
|
||||
w.data("fieldselect", fieldselect);
|
||||
|
||||
w.find('.close').data("fieldselect", fieldselect).click(function() {
|
||||
console.log(me.columns.indexOf($(this).data('fieldselect')));
|
||||
delete me.columns[me.columns.indexOf($(this).data('fieldselect'))];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue