File URL naming fixes
This commit is contained in:
parent
c1bc00d8bf
commit
052d211cbc
2 changed files with 3 additions and 6 deletions
|
|
@ -3,7 +3,7 @@ frappe.provide("frappe.ui");
|
|||
frappe.listview_settings['File'] = {
|
||||
hide_name_column: true,
|
||||
use_route: true,
|
||||
add_fields: ["is_folder", "file_name"],
|
||||
add_fields: ["is_folder", "file_name", "file_url"],
|
||||
formatters: {
|
||||
file_size: function(value) {
|
||||
// formatter for file size
|
||||
|
|
@ -22,7 +22,7 @@ frappe.listview_settings['File'] = {
|
|||
} else if(frappe.utils.is_image_file(data.file_name)) {
|
||||
data._title = '<i class="icon-picture icon-fixed-width"></i> ' + data.file_name;
|
||||
} else {
|
||||
data._title = '<i class="icon-file-alt icon-fixed-width"></i> ' + data.file_name;
|
||||
data._title = '<i class="icon-file-alt icon-fixed-width"></i> ' + (data.file_name ? data.file_name : data.file_url);
|
||||
}
|
||||
},
|
||||
onload: function(doclist) {
|
||||
|
|
@ -90,9 +90,7 @@ frappe.listview_settings['File'] = {
|
|||
set_primary_action:function(doclist){
|
||||
|
||||
doclist.page.clear_primary_action();
|
||||
doclist.page.set_primary_action(__("New File"), function() {
|
||||
|
||||
|
||||
doclist.page.set_primary_action(__("New"), function() {
|
||||
dialog = frappe.ui.get_upload_dialog({
|
||||
"data":{"folder": doclist.current_folder, "from_form": 1}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -71,7 +71,6 @@ frappe.upload = {
|
|||
}
|
||||
return;
|
||||
}
|
||||
console.log(args)
|
||||
|
||||
var dataurl = null;
|
||||
var _upload_file = function() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue