瀏覽代碼

[#505] fixed long workspace name display in caldav

Côme Huguiès 6 年之前
父節點
當前提交
2263a3e1cb
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      tracim/tracim/public/_caldavzap/resource.js

+ 3 - 1
tracim/tracim/public/_caldavzap/resource.js 查看文件

@@ -489,11 +489,13 @@ function ResourceCalDAVList()
489 489
 			newElement.addClass('r_operate');
490 490
 
491 491
     var uniqueIdForLabel = inputResource.displayvalue.replace('.', '') // remove the point so jquery doesn't consider it as 2 differents classes when used in a selector
492
+    // Côme - 2018/03/19 - added custom style to avoid the '...' for long workspace name that hide the entire name
493
+		var customStyle = 'display: inline-block;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;vertical-align: top;width: 80%;'
492 494
 		newElement.html("\
493 495
       <div class='resourceCalDAVColor' style='background:"+inputResource.ecolor+"'></div>\
494 496
       <input type='text' class='colorPicker'/>\
495 497
       <input type='checkbox' name="+inputResource.uid+" />\
496
-      <div class='"+uniqueIdForLabel+"' style='display:inline-block'>"+inputResource.displayvalue+"</div>");
498
+      <div class='"+uniqueIdForLabel+"' style='"+customStyle+"'>"+inputResource.displayvalue+"</div>");
497 499
 
498 500
     // +$('<div/>').text(inputResource.displayvalue).html()); // legacy code
499 501
     $.ajax({