remove PathDetails*, and use marshmallow schemas with methods to get icon_url, and "path" renamed to "root_dir", updated move* code to use new data structure
This commit is contained in:
@@ -119,12 +119,12 @@ function MoveDBox(path_details, db_url)
|
||||
<form id="mv_fm" class="form form-control-inline col-12">
|
||||
<input id="move_path_type" name="move_path_type" type="hidden"
|
||||
`
|
||||
div += ' value="' + path_details[0].type + '"></input>'
|
||||
div += ' value="' + path_details[0].type.name + '"></input>'
|
||||
div+=GetSelnAsDiv()
|
||||
yr=$('.highlight').first().attr('yr')
|
||||
dt=$('.highlight').first().attr('date')
|
||||
div+='<div class="row">Use Existing Directory (in the chosen path):</div><div id="existing"></div>'
|
||||
GetExistingDirsAsDiv( dt, "existing", path_details[0].type )
|
||||
GetExistingDirsAsDiv( dt, "existing", path_details[0].type.name )
|
||||
div+=`
|
||||
<div class="input-group my-3">
|
||||
<alert class="alert alert-primary my-auto py-1">
|
||||
@@ -133,7 +133,7 @@ function MoveDBox(path_details, db_url)
|
||||
div+= '<svg id="move_path_icon" width="20" height="20" fill="currentColor"><use xlink:href="' + path_details[0].icon_url + '"></svg>'
|
||||
div+= '<select id="rp_sel" name="rel_path" class="text-primary alert-primary py-1 border border-primary rounded" onChange="change_rp_sel()">'
|
||||
for(p of path_details) {
|
||||
div+= '<option path_type="'+p.type+'" icon_url="'+p.icon_url+'">'+p.path+'</option>'
|
||||
div+= '<option path_type="'+p.type.name+'" icon_url="'+p.icon_url+'">'+p.root_dir+'</option>'
|
||||
}
|
||||
div+= '</select>'
|
||||
div+=`
|
||||
|
||||
Reference in New Issue
Block a user