* replace style of icons.

This commit is contained in:
Catouse
2013-09-17 10:56:19 +08:00
parent c9b01af26c
commit cece89e621
7 changed files with 32 additions and 41 deletions
+8 -9
View File
@@ -240,7 +240,7 @@ class common extends control
if(!common::hasPriv($module, 'edit')) return false;
echo "<span class='link-button'>";
echo html::a('#commentBox', '&nbsp;', '', "class='icon-green-common-comment' title='$lang->comment' onclick='setComment()'");
echo html::a('#commentBox', '<i class="icon-comments-alt icon-large"></i>', '', "title='$lang->comment' onclick='setComment()'");
echo "</span>";
}
@@ -298,9 +298,9 @@ class common extends control
/* set the class. */
if(!$icon) $icon = $method;
if(strpos(',edit,copy,report,export,delete,', ",$icon,") !== false) $module = 'common';
$color = $type == 'button' ? 'green' : ($clickable ? 'green' : 'gray');
$disabled = $type == 'button' ? '' : ($clickable ? '' : 'disabled');
$extraClass = strpos(',export,customFields,', ",$method,") !== false ? $method : $extraClass;
$class = $extraClass ? "icon-$color-$module-$icon $extraClass" : "icon-$color-$module-$icon";
$class = $extraClass ? "$icon $disabled $extraClass" : "$icon $disabled";
/* Create the icon link. */
if($clickable)
@@ -313,16 +313,15 @@ class common extends control
if($type == 'button')
{
echo "<span class='link-button'>";
echo html::a($link, '&nbsp;', $target, "class='$class' title='$title'", true);
if($method != 'edit' and $method != 'copy' and $method != 'delete')
{
echo html::a($link, $title, $target, "class='$extraClass'", true);
echo html::a($link, "<i class='$class'></i> " . $title, $target, "class='$extraClass'", true);
}
echo "</span>";
}
else
{
echo html::a($link, '&nbsp;', $target, "class='$class' title='$title'", false);
echo html::a($link, '<i class="$class"></i>', $target, "class='icon-link' title='$title'", false);
}
}
else
@@ -349,7 +348,7 @@ class common extends control
if(isonlybody()) return false;
echo "<span class='link-button'>";
echo html::a($backLink, '&nbsp;', '', "class='icon-goback' title={$lang->goback}");
echo html::a($backLink, '<i class="icon-level-down icon-large icon-rotate-90"></i>', '', "title={$lang->goback}");
echo "</span>";
if(isset($preAndNext->pre) and $preAndNext->pre)
@@ -358,7 +357,7 @@ class common extends control
$title = isset($preAndNext->pre->title) ? $preAndNext->pre->title : $preAndNext->pre->name;
$title = '#' . $preAndNext->pre->$id . ' ' . $title;
echo "<span class='link-button'>";
echo html::a(inLink('view', "ID={$preAndNext->pre->$id}"), '&nbsp', '', "id='pre' class='icon-pre' title='{$title}'");
echo html::a(inLink('view', "ID={$preAndNext->pre->$id}"), '<i class="icon-chevron-sign-left icon-large"></i>', '', "id='pre' title='{$title}'");
echo "</span>";
}
if(isset($preAndNext->next) and $preAndNext->next)
@@ -367,7 +366,7 @@ class common extends control
$title = isset($preAndNext->next->title) ? $preAndNext->next->title : $preAndNext->next->name;
$title = '#' . $preAndNext->next->$id . ' ' . $title;
echo "<span class='link-button'>";
echo html::a(inLink('view', "ID={$preAndNext->next->$id}"), '&nbsp;', '', "id='next' class='icon-next' title='$title'");
echo html::a(inLink('view', "ID={$preAndNext->next->$id}"), '<i class="icon-chevron-sign-right icon-large"></i>', '', "id='next' title='$title'");
echo "</span>";
}
}