瀏覽代碼

bugfix: button mako widgets did not take css class into account

damien 11 年之前
父節點
當前提交
927f831283
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      pboard/pboard/templates/pod.mak

+ 3 - 3
pboard/pboard/templates/pod.mak 查看文件

1
 <%def name="Button(piId, pbWithLabel, psButtonCssClass, psButtonTitle, psButtonIcon, psButtonLabel)" >
1
 <%def name="Button(piId, pbWithLabel, psButtonCssClass, psButtonTitle, psButtonIcon, psButtonLabel)" >
2
-  <button id='${piId}' type="button" class="btn" title="${psButtonTitle}"><i class="${psButtonIcon}"></i>${u'' if (pbWithLabel==False) else u' %s'%(psButtonLabel)}</button>
2
+  <button id='${piId}' type="button" class="${psButtonCssClass}" title="${psButtonTitle}"><i class="${psButtonIcon}"></i>${u'' if (pbWithLabel==False) else u' %s'%(psButtonLabel)}</button>
3
 </%def>
3
 </%def>
4
 
4
 
5
 <%def name="SaveButton(piId, pbWithLabel=False)" >
5
 <%def name="SaveButton(piId, pbWithLabel=False)" >
6
-  ${Button(piId, pbWithLabel, 'btn', _('Save'), 'icon-g-edit', _('Save'))}
6
+  ${Button(piId, pbWithLabel, 'btn btn-success', _('Save'), ' icon-g-ok-2 icon-g-white', _('Save'))}
7
 </%def>
7
 </%def>
8
 <%def name="EditButton(piId, pbWithLabel=False)" >
8
 <%def name="EditButton(piId, pbWithLabel=False)" >
9
   ${Button(piId, pbWithLabel, 'btn', _('Edit'), 'icon-g-edit', _('Edit'))}
9
   ${Button(piId, pbWithLabel, 'btn', _('Edit'), 'icon-g-edit', _('Edit'))}
10
 </%def>
10
 </%def>
11
 <%def name='CancelButton(piId, pbWithLabel=False)'>
11
 <%def name='CancelButton(piId, pbWithLabel=False)'>
12
-  ${Button(piId, pbWithLabel, 'btn', _('Cancel'), 'icon-g-ban', _('Cancel'))}
12
+  ${Button(piId, pbWithLabel, 'btn ', _('Cancel'), 'icon-g-ban', _('Cancel'))}
13
 </%def>
13
 </%def>
14
 <%def name='AddButton(piId, pbWithLabel=False, psLabel=None)'>
14
 <%def name='AddButton(piId, pbWithLabel=False, psLabel=None)'>
15
   ${Button(piId, pbWithLabel, 'btn', psLabel or _('New'), 'icon-g-circle-plus', psLabel or _('New'))}
15
   ${Button(piId, pbWithLabel, 'btn', psLabel or _('New'), 'icon-g-circle-plus', psLabel or _('New'))}