FSN#35094 Opfrissen icon-set font-awesome
svn path=/Website/trunk/; revision=31393
This commit is contained in:
@@ -22,23 +22,37 @@ function CreateButton(tekst, onClick, btn, params) //akey, id, params)
|
||||
params = params || {}; // voor alle buttons
|
||||
var hasIcon = (params.showIcons || btn.showIcon) && btn.icon;
|
||||
var cls = (params.isDialog? "dialog ": "") + (hasIcon? "hasIcon ": "") + (btn.xclass ? btn.xclass : "");
|
||||
var tt = btn.tooltip||"";
|
||||
if (!params.isDialog && tekst)
|
||||
tt = tekst + (tt?"\n":"") + tt;
|
||||
{
|
||||
if (!btn.tooltip) // Alles voor de eerste \n komt in de button, alles erna in de tooltip
|
||||
{
|
||||
var arr = tekst.split("\n");
|
||||
tekst = arr[0];
|
||||
// In de tooltip hoeven we de tekst niet (ook) nog een keer te tonen
|
||||
// Let wel: als we ooit responsive op een klein scherm de teksten
|
||||
// onderdrukken dan moet de tooltip toch blijven?
|
||||
arr.shift(); // eerste er af
|
||||
btn.tooltip = arr.join("\n");
|
||||
}
|
||||
}
|
||||
var display = params.display || 'block';
|
||||
%><li <%=params.vertical? ' style="display:'+display+'"' : ''%> class='<%= cls %>'
|
||||
<%=(tt?' title="' + safe.htmlattr(tt) + '"' : "")%>
|
||||
<%=(btn.tooltip?' title="' + safe.htmlattr(btn.tooltip) + '"' : "")%>
|
||||
<%=(btn.singlepress?" singlepress=1":"")%>
|
||||
onClick="iface.button.click(event, this)"
|
||||
fcltClick="<%=onClick%>"
|
||||
<%= btn.id != null ?'id="' + btn.id + '"' : '' %>><%
|
||||
if (hasIcon) {
|
||||
Response.Write(I(btn.icon) + " ");
|
||||
Response.write("<span class='icontxt'>"+safe.html(tekst)+"</span>");
|
||||
if (params.isDialog && btn.tooltip)
|
||||
{
|
||||
%><div class="dialogtext"><%= btn.tooltip %></div><%
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tekst)
|
||||
Response.write("<span class='icontxt'>"+safe.html(tekst)+"</span>");
|
||||
}
|
||||
} else {
|
||||
Response.write(safe.html(tekst));
|
||||
}
|
||||
@@ -71,12 +85,15 @@ function CreateButtons(buttons, params)
|
||||
{
|
||||
var btn = buttons[i];
|
||||
if (!params.autoshowOnly || btn.autoshow)
|
||||
inArray(btn.icon, ["print.png", "email.png", "fa-print", "fa-table"]) ? hambuttons.push(i) : CreateButton(btn.title, btn.action, btn, params);
|
||||
if (inArray(btn.icon, ["print.png", "email.png", "fa-print", "fa-table"]))
|
||||
hambuttons.push(i)
|
||||
else
|
||||
CreateButton(btn.title, btn.action, btn, params);
|
||||
}
|
||||
|
||||
if (hamburger)
|
||||
if (hamburger && !params.isDialog)
|
||||
{
|
||||
var btn = { icon: "fa-bars", tooltip: L("lcl_more"), action: "$('li.byHamburger').toggleClass('hidden').length" }
|
||||
var btn = { icon: "fa-bars", tooltip: L("lcl_more"), action: "$('li.byHamburger').toggleClass('hidden');FcltMgr.resized();" }
|
||||
CreateButton(null, btn.action, btn, params );
|
||||
}
|
||||
%>
|
||||
|
||||
Reference in New Issue
Block a user