add js versions of basename and dirname
This commit is contained in:
parent
46422e6dbe
commit
b14265b5c3
|
@ -154,6 +154,12 @@ OC={
|
||||||
$('head').append(style);
|
$('head').append(style);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
basename: function(path) {
|
||||||
|
return path.replace(/\\/g,'/').replace( /.*\//, '' );
|
||||||
|
},
|
||||||
|
dirname: function(path) {
|
||||||
|
return path.replace(/\\/g,'/').replace(/\/[^\/]*$/, '');;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* do a search query and display the results
|
* do a search query and display the results
|
||||||
* @param query the search query
|
* @param query the search query
|
||||||
|
|
Loading…
Reference in New Issue