summaryrefslogtreecommitdiffstats
path: root/core/js/oc-dialogs.js
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2016-10-14 17:31:10 +0200
committerRobin Appelman <robin@icewind.nl>2016-10-14 17:36:08 +0200
commit6d43942125347a961733845244711a6ea2f6651e (patch)
tree217ed2d6cfc156071bc99775b802e4b477a74b45 /core/js/oc-dialogs.js
parent8d093e976acd818311e3be97b0d9afd6631632f2 (diff)
downloadnextcloud-server-6d43942125347a961733845244711a6ea2f6651e.tar.gz
nextcloud-server-6d43942125347a961733845244711a6ea2f6651e.zip
filepicker styling
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'core/js/oc-dialogs.js')
-rw-r--r--core/js/oc-dialogs.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js
index edc0b3c797a..87d16a1394a 100644
--- a/core/js/oc-dialogs.js
+++ b/core/js/oc-dialogs.js
@@ -174,7 +174,7 @@ var OCdialogs = {
self.$filePicker.ready(function() {
self.$filelist = self.$filePicker.find('.filelist');
self.$dirTree = self.$filePicker.find('.dirtree');
- self.$dirTree.on('click', 'span:not(:last-child)', self, self._handleTreeListSelect);
+ self.$dirTree.on('click', 'div:not(:last-child)', self, self._handleTreeListSelect.bind(self));
self.$filelist.on('click', 'li', function(event) {
self._handlePickerClick(event, $(this));
});
@@ -799,8 +799,9 @@ var OCdialogs = {
_fillSlug: function() {
this.$dirTree.empty();
var self = this;
+ var dir;
var path = this.$filePicker.data('path');
- var $template = $('<span data-dir="{dir}">{name}</span>');
+ var $template = $('<div data-dir="{dir}"><a>{name}</a></div>').addClass('crumb');
if(path) {
var paths = path.split('/');
$.each(paths, function(index, dir) {
@@ -816,17 +817,17 @@ var OCdialogs = {
}
$template.octemplate({
dir: '',
- name: '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' // Ugly but works ;)
- }, {escapeFunction: null}).addClass('home svg').prependTo(this.$dirTree);
+ name: '' // Ugly but works ;)
+ }, {escapeFunction: null}).prependTo(this.$dirTree);
},
/**
* handle selection made in the tree list
*/
_handleTreeListSelect:function(event) {
var self = event.data;
- var dir = $(event.target).data('dir');
+ var dir = $(event.target).parent().data('dir');
self._fillFilePicker(dir);
- var getOcDialog = this.closest('.oc-dialog');
+ var getOcDialog = (event.target).closest('.oc-dialog');
var buttonEnableDisable = $('.primary', getOcDialog);
if (this.$filePicker.data('mimetype') === "http/unix-directory") {
buttonEnableDisable.prop("disabled", false);