jquery.filebrowser icon indicating copy to clipboard operation
jquery.filebrowser copied to clipboard

Tooltip for long name file/directory

Open nbao opened this issue 1 year ago • 4 comments

Is it possible to add a tooltip to the file name? Because the file and folder names are too long, I use CSS so that they can display properly.

.browser-widget .content ul:not(.ui-menu) li span{
  overflow: hidden;
  max-height: 4.3em;
  display: block;
}

But if there is a tooltip displaying the full file name, it would be better

nbao avatar Dec 05 '24 13:12 nbao

It should not be that hard, you only need to add the title attribute.

Do you want to contribute?

jcubic avatar Dec 05 '24 13:12 jcubic

sure it's so easy line 828 add hide class const $li = $(<li class="file"><span>${file}</span><span class="hide">${file}</span></li>).appendTo($ul).attr('draggable', true);

and add css in the end

.browser-widget .content ul:not(.ui-menu) li > span:first-of-type {
  display: inline-block;
  overflow: hidden;
  max-height: 4.5em;
  text-overflow: ellipsis;
}

.browser-widget .content ul:not(.ui-menu) li span.hide {
  position: absolute;
  z-index: 10;
  top: 3em;
  left: 0;
  display: none;
  padding: 5px;
  white-space: nowrap;
  border: 1px solid #ccc;
  background-color: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.browser-widget .content ul:not(.ui-menu) li {
  position: relative;
  cursor: pointer;
}

.browser-widget .content ul:not(.ui-menu) li:hover > span.hide {
  display: block;
}

nbao avatar Dec 05 '24 19:12 nbao

Do you want to create a PR?

jcubic avatar Dec 06 '24 15:12 jcubic

No i can't commit. could you do it.pls

nbao avatar Dec 06 '24 16:12 nbao