.ui-datepicker-prev,.ui-datepicker-next{ border:1px solid #ddd; background:#fff; }
/* ---- DIALOGS ---- */
-#oc-dialog-filepicker-content .dirtree {width:92%; overflow:hidden; }
-#oc-dialog-filepicker-content .dirtree .home {
+#oc-dialog-filepicker-content .dirtree {
+ width:92%;
+ float: left;
+ margin-left: 15px;
+ overflow:hidden;
+}
+#oc-dialog-filepicker-content .dirtree div:first-child a {
background-image:url('../img/places/home.svg?v=1');
background-repeat:no-repeat;
background-position: left center;
- width: 30px;
- display: inline-block;
}
#oc-dialog-filepicker-content .dirtree span:not(:last-child) { cursor: pointer; }
#oc-dialog-filepicker-content .dirtree span:last-child { font-weight: bold; }
#oc-dialog-filepicker-content .dirtree span:not(:last-child)::after { content: '>'; padding: 3px;}
#oc-dialog-filepicker-content .filelist {
overflow-y:auto;
- height: 300px;
+ height: 290px;
background-color:white;
width:100%;
}
+
+#oc-dialog-filepicker-content .filelist li:first-child {
+ border-top: 1px solid #eee;
+}
#oc-dialog-filepicker-content .filelist li {
position: relative;
+ height: 40px;
+ padding: 5px;
+ border-bottom: 1px solid #eee;
}
#oc-dialog-filepicker-content .filelist .filename {
position: absolute;
- top: 8px;
+ padding-top: 9px;
max-width: 60%;
overflow: hidden;
white-space: nowrap;
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));
});
_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) {
}
$template.octemplate({
dir: '',
- name: ' ' // 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);