Changeset 7759
- Timestamp:
- Nov 27, 2019, 1:00:25 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/clients/web/net/sf/basedb/clients/web/Base.java
r7738 r7759 1730 1730 if (l == Location.OFFLINE) 1731 1731 { 1732 link += " [offline]"; 1732 if (root == null) 1733 { 1734 link += " [offline]"; 1735 } 1736 else 1737 { 1738 link += " <span class=\"file-actions\">[<span title=\"This file is offline\">" + 1739 "<img src=\"" + root + "images/offline.png\" alt=\"offline\"></span>"; 1740 } 1733 1741 } 1734 1742 else if (l.isDownloadable()) … … 1740 1748 if (root != null) 1741 1749 { 1742 viewIcon = "<img src=\"" + root + "images/view.png " + "\" alt=\"view\">";1743 downloadIcon = "<img src=\"" + root + "images/download.png " + "\" alt=\"download\">";1744 separator = " ";1745 } 1746 link += " <span style=\"white-space: nowrap;\">[<span class=\"link auto-init\" data-auto-init=\"view-file\" data-file-id=\"" + file.getId() + "\"" +1750 viewIcon = "<img src=\"" + root + "images/view.png\" alt=\"view\">"; 1751 downloadIcon = "<img src=\"" + root + "images/download.png\" alt=\"download\">"; 1752 separator = ""; 1753 } 1754 link += " <span class=\"file-actions\">[<span class=\"link auto-init\" data-auto-init=\"view-file\" data-file-id=\"" + file.getId() + "\"" + 1747 1755 " title=\"View the contents of this file (" + bytes + ")\">" + viewIcon + "</span>" + 1748 1756 separator + -
trunk/src/clients/web/net/sf/basedb/clients/web/extensions/fileviewer/FileViewerUtil.java
r7757 r7759 68 68 if (result != null && result.length() > 0) 69 69 { 70 jspContext.getOut().write(" [" + result + "]");70 jspContext.getOut().write("<span class=\"file-actions\">[" + result + "]</span>"); 71 71 } 72 72 } -
trunk/src/clients/web/net/sf/basedb/clients/web/extensions/toolbar/CompactButtonRenderer.java
r6881 r7759 43 43 44 44 private JspContext context; 45 private String buttonTag = "a"; 45 46 46 47 public CompactButtonRenderer(JspContext context) 47 48 { 48 49 this.context = context; 50 } 51 52 /** 53 Set the HTML tag to use for the "button". The default is 'a'. 54 @since 3.16 55 */ 56 public void setButtonTag(String tag) 57 { 58 this.buttonTag = tag; 59 } 60 61 /** 62 Get the HTML tag to use for the "button". The default is 'a'. 63 @since 3.16 64 */ 65 public String getButtonTag() 66 { 67 return buttonTag; 49 68 } 50 69 … … 70 89 try 71 90 { 72 out.write("<a"); 91 String tag = getButtonTag(); 92 93 out.write("<"+tag); 73 94 if (btn.getId() != null) out.write(" id=\"" + btn.getId() + "\""); 74 95 if (btn.getClazz() != null) out.write(" class=\"" + btn.getClazz() + "\""); … … 93 114 out.write(" alt=\"" + HTML.encodeTags(btn.getTitle()) + "\""); 94 115 if (btn.getIcon() != null) out.write(" src=\"" + btn.getIcon() + "\""); 95 out.write("></ a>");116 out.write("></" + tag + ">"); 96 117 } 97 118 catch (IOException ex) -
trunk/src/clients/web/net/sf/basedb/clients/web/extensions/toolbar/CompactButtonRendererFactory.java
r6875 r7759 38 38 { 39 39 40 private String buttonTag; 41 40 42 public CompactButtonRendererFactory() 41 43 {} … … 44 46 public CompactButtonRenderer getRenderer(InvokationContext<? extends ButtonAction> context) 45 47 { 46 return new CompactButtonRenderer((JspContext)context.getClientContext()); 48 CompactButtonRenderer renderer = new CompactButtonRenderer((JspContext)context.getClientContext()); 49 renderer.setButtonTag(getButtonTag()); 50 return renderer; 47 51 } 48 52 53 /** 54 Set the HTML tag to use for the "button". The default is 'a'. 55 @since 3.16 56 */ 57 public void setButtonTag(String tag) 58 { 59 this.buttonTag = tag; 60 } 61 62 /** 63 Get the HTML tag to use for the "button". The default is 'a'. 64 @since 3.16 65 */ 66 public String getButtonTag() 67 { 68 return buttonTag; 69 } 70 49 71 } -
trunk/src/clients/web/web-extensions.xml
r7757 r7759 156 156 <renderer-factory override="true"> 157 157 <factory-class>net.sf.basedb.clients.web.extensions.toolbar.CompactButtonRendererFactory</factory-class> 158 <parameters> 159 <button-tag>span</button-tag> 160 </parameters> 158 161 </renderer-factory> 159 162 <name>File viewer</name> -
trunk/www/include/styles/main.css
r7604 r7759 707 707 { 708 708 border: 0px; 709 } 710 711 .file-actions 712 { 713 white-space: nowrap; 714 } 715 716 .file-actions > span + span 717 { 718 padding-left: 2px; 709 719 } 710 720
Note: See TracChangeset
for help on using the changeset viewer.