fixes to desktop

This commit is contained in:
Rushabh Mehta
2013-01-24 16:30:50 +05:30
parent 877a1a9274
commit 6c8cef71a0
3 changed files with 18 additions and 8 deletions

View File

@@ -68,7 +68,7 @@
background: #B00D07; background: #B00D07;
padding: 3px; padding: 3px;
float: right; float: right;
margin-top: -74px; margin-top: -12px;
margin-right: 10px; margin-right: 10px;
border: 2px solid white; border: 2px solid white;
box-shadow: 0 0 4px 1px black; box-shadow: 0 0 4px 1px black;

View File

@@ -24,13 +24,18 @@ erpnext.desktop.render = function() {
module.label = wn._(module.label); module.label = wn._(module.label);
module.gradient_css = wn.get_gradient_css(module.color, 45); module.gradient_css = wn.get_gradient_css(module.color, 45);
$('#icon-grid').append(repl('\ $module_icon = $(repl('\
<div id="module-icon-%(link)s" class="case-wrapper" data-name="%(name)s"><a href="#%(link)s">\ <div id="module-icon-%(link)s" class="case-wrapper" \
data-name="%(name)s" data-link="%(link)s">\
<div class="case-border" style="%(gradient_css)s">\ <div class="case-border" style="%(gradient_css)s">\
<i class="%(icon)s"></i>\ <i class="%(icon)s"></i>\
</div></a>\ </div>\
<div class="case-label">%(label)s</div>\ <div class="case-label">%(label)s</div>\
</div>', module)); </div>', module)).click(function() {
wn.set_route($(this).attr("data-link"));
}).css({
cursor:"pointer"
}).appendTo("#icon-grid");
} }
// modules // modules
@@ -52,7 +57,7 @@ erpnext.desktop.render = function() {
erpnext.desktop.show_pending_notifications = function() { erpnext.desktop.show_pending_notifications = function() {
var add_circle = function(str_module, id, title) { var add_circle = function(str_module, id, title) {
var module = $('#'+str_module); var module = $('#'+str_module);
module.find('a:first').append( module.prepend(
repl('<div id="%(id)s" class="circle" title="%(title)s" style="display: None">\ repl('<div id="%(id)s" class="circle" title="%(title)s" style="display: None">\
<span class="circle-text"></span>\ <span class="circle-text"></span>\
</div>', {id: id, title: wn._(title)})); </div>', {id: id, title: wn._(title)}));

View File

@@ -61,7 +61,7 @@ $.extend(wn.modules, {
"HR": { "HR": {
link: "hr-home", link: "hr-home",
color: "#018d6c", color: "#018d6c",
label: "Human Resources", label: wn._("Human Resources"),
icon: "icon-group" icon: "icon-group"
}, },
"Setup": { "Setup": {
@@ -72,26 +72,31 @@ $.extend(wn.modules, {
"Activity": { "Activity": {
link: "activity", link: "activity",
color: "#633501", color: "#633501",
icon: "icon-play" icon: "icon-play",
label: wn._("Activity"),
}, },
"To Do": { "To Do": {
link: "todo", link: "todo",
color: "#febf04", color: "#febf04",
label: wn._("To Do"),
icon: "icon-check" icon: "icon-check"
}, },
"Calendar": { "Calendar": {
link: "calendar", link: "calendar",
color: "#026584", color: "#026584",
label: wn._("Calendar"),
icon: "icon-calendar" icon: "icon-calendar"
}, },
"Messages": { "Messages": {
link: "messages", link: "messages",
color: "#8d016e", color: "#8d016e",
label: wn._("Messages"),
icon: "icon-comments" icon: "icon-comments"
}, },
"Knowledge Base": { "Knowledge Base": {
link: "questions", link: "questions",
color: "#01372b", color: "#01372b",
label: wn._("Knowledge Base"),
icon: "icon-question-sign" icon: "icon-question-sign"
}, },