moved directory structure

This commit is contained in:
Rushabh Mehta
2012-09-24 19:13:42 +05:30
parent e47a6779e9
commit 2fa2f7178d
1637 changed files with 47 additions and 11450 deletions

View File

@@ -0,0 +1 @@
from __future__ import unicode_literals

View File

@@ -0,0 +1,119 @@
/* Sprite CSS */
.sprite-account{ background-position: 0 0; width: 32px; height: 40px; }
.sprite-buying{ background-position: 0 -90px; width: 40px; height: 40px; }
.sprite-calendar{ background-position: 0 -180px; width: 35px; height: 40px; }
.sprite-dashboard{ background-position: 0 -270px; width: 40px; height: 29px; }
.sprite-feed{ background-position: 0 -349px; width: 32px; height: 40px; }
.sprite-hr{ background-position: 0 -439px; width: 40px; height: 32px; }
.sprite-kb{ background-position: 0 -521px; width: 24px; height: 39px; }
.sprite-messages{ background-position: 0 -610px; width: 40px; height: 26px; }
.sprite-production{ background-position: 0 -686px; width: 40px; height: 33px; }
.sprite-project{ background-position: 0 -769px; width: 40px; height: 22px; }
.sprite-report{ background-position: 0 -841px; width: 29px; height: 40px; }
.sprite-selling{ background-position: 0 -931px; width: 34px; height: 40px; }
.sprite-setting{ background-position: 0 -1021px; width: 37px; height: 40px; }
.sprite-stock{ background-position: 0 -1111px; width: 34px; height: 39px; }
.sprite-support{ background-position: 0 -1200px; width: 40px; height: 40px; }
.sprite-todo{ background-position: 0 -1290px; width: 40px; height: 34px; }
.sprite-website{ background-position: 0 -1374px; width: 40px; height: 40px; }
.sprite-image { background-image: url("images/sprite-desktop.png"); }
.sprite-account{ margin-top: 8px; margin-left: 12px; }
.sprite-selling{ margin-top: 8px; margin-left: 12px; }
.sprite-stock{ margin-top: 8px; margin-left: 8px; }
.sprite-buying{ margin-top: 8px; margin-left: 8px; }
.sprite-support{ margin-top: 8px; margin-left: 8px; }
.sprite-hr{ margin-top: 12px; margin-left: 8px; }
.sprite-project{ margin-top: 16px; margin-left: 8px; }
.sprite-production{ margin-top: 10px; margin-left: 8px; }
.sprite-website{ margin-top: 8px; margin-left: 8px; }
.sprite-setting{ margin-top: 8px; margin-left: 8px; }
.sprite-dashboard{ margin-top: 14px; margin-left: 8px; }
.sprite-report{ margin-top: 8px; margin-left: 14px; }
.sprite-messages{ margin-top: 14px; margin-left: 8px; }
.sprite-todo{ margin-top: 10px; margin-left: 10px; }
.sprite-calendar{ margin-top: 8px; margin-left: 10px; }
.sprite-kb{ margin-top: 8px; margin-left: 16px; }
.sprite-feed{ margin-top: 8px; margin-left: 14px; }
.case-border {
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
width: 56px;
height: 56px;
border: 4px solid white;
box-shadow: 0 0 4px 1px black;
-moz-box-shadow: 0 0 4px 1px black;
-webkit-box-shadow: 0 0 4px 1px black;
-o-box-shadow: 0 0 4px 1px black;
margin: auto;
}
.case-wrapper {
margin: 24px;
float: left;
width: 100px;
height: 100px;
}
.case-label {
color: white;
padding-top: 10px;
text-align: center;
text-shadow: 1px 1px 2px #000, 1px 1px 2px #000, 1px 1px 2px #000, 0px 0px 2px #000;
}
/* Hover and click effects */
.case-border:hover, .circle:hover, .hover-effect {
box-shadow: 0 0 2px 0px black, 0 0 4px 1px white !important;
-moz-box-shadow: 0 0 2px 0px black, 0 0 4px 1px white !important;
-webkit-box-shadow: 0 0 2px 0px black, 0 0 4px 1px white !important;
-o-box-shadow: 0 0 2px 0px black, 0 0 10px 1px white !important;
}
.case-border:active, .case-border:focus, .case-border-click {
transform: scale(0.98, 0.98);
-ms-transform: scale(0.98, 0.98); /* IE 9 */
-webkit-transform: scale(0.98, 0.98); /* Safari and Chrome */
-o-transform: scale(0.98, 0.98); /* Opera */
-moz-transform: scale(0.98, 0.98); /* Firefox */
}
.circle:active, .circle:focus, .circle-click {
transform: scale(1, 1);
-ms-transform: scale(1, 1); /* IE 9 */
-webkit-transform: scale(1, 1); /* Safari and Chrome */
-o-transform: scale(1, 1); /* Opera */
-moz-transform: scale(1, 1); /* Firefox */
}
.circle {
border-radius: 30px;
-moz-border-radius: 30px;
-webkit-border-radius: 30px;
height: 15px;
line-height: 12px;
min-width: 15px;
background: #B00D07;
padding: 3px;
float: right;
margin-top: -74px;
margin-right: 10px;
border: 2px solid white;
box-shadow: 0 0 4px 1px black;
-moz-box-shadow: 0 0 4px 1px black;
-webkit-box-shadow: 0 0 4px 1px black;
-o-box-shadow: 0 0 4px 1px black;
}
.circle-text {
color: white;
text-align: center;
display: inline-block;
margin-top: 1px;
}

View File

@@ -0,0 +1,6 @@
<div style="min-height: 500px; background: None; text-align: center;
margin: 0px auto;">
<div id="icon-grid">
</div>
</div>
<div style="clear: both"></div>

View File

@@ -0,0 +1,139 @@
wn.provide('erpnext.desktop');
erpnext.desktop.gradient = "<style>\
.case-%(name)s {\
background: %(start)s; /* Old browsers */\
background: -moz-radial-gradient(center, ellipse cover, %(start)s 0%, %(middle)s 44%, %(end)s 100%); /* FF3.6+ */\
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,%(start)s), color-stop(44%,%(middle)s), color-stop(100%,%(end)s)); /* Chrome,Safari4+ */\
background: -webkit-radial-gradient(center, ellipse cover, %(start)s 0%,%(middle)s 44%,%(end)s 100%); /* Chrome10+,Safari5.1+ */\
background: -o-radial-gradient(center, ellipse cover, %(start)s 0%,%(middle)s 44%,%(end)s 100%); /* Opera 12+ */\
background: -ms-radial-gradient(center, ellipse cover, %(start)s 0%,%(middle)s 44%,%(end)s 100%); /* IE10+ */\
background: radial-gradient(center, ellipse cover, %(start)s 0%,%(middle)s 44%,%(end)s 100%); /* W3C */\
}\
</style>"
erpnext.desktop.refresh = function() {
erpnext.desktop.add_classes();
erpnext.desktop.render();
}
erpnext.desktop.add_classes = function() {
var classes = [
{ name: 'red', start: '#A90329', middle: '#8F0222', end: '#6D0019' },
{ name: 'brown', start: '#723e02', middle: '#633501', end: '#4a2700' },
{ name: 'green', start: '#4b5602', middle: '#3f4901', end: '#313800' },
{ name: 'blue', start: '#026584', middle: '#025770', end: '#004256' },
{ name: 'yellow', start: '#be7902', middle: '#a66a02', end: '#865500' },
{ name: 'purple', start: '#4d017d', middle: '#410169', end: '#310050' },
{ name: 'ocean', start: '#02a47e', middle: '#018d6c', end: '#006a51' },
{ name: 'pink', start: '#a40281', middle: '#8d016e', end: '#6a0053' },
{ name: 'grey', start: '#545454', middle: '#484848', end: '#363636' },
{ name: 'dark-red', start: '#68021a', middle: '#590116', end: '#440010' },
{ name: 'leaf-green', start: '#b0a400', middle: '#968c00', end: '#726a00' },
//{ name: 'dark-blue', start: '#023bae', middle: '#013295', end: '#002672' },
{ name: 'bright-green', start: '#03ad1f', middle: '#02941a', end: '#007213' },
{ name: 'bright-yellow', start: '#ffd65e', middle: '#febf04', end: '#ed9017' },
{ name: 'peacock', start: '#026584', middle: '#026584', end: '#322476' },
{ name: 'violet', start: '#50448e', middle: '#473b7f', end: '#3a3169' },
{ name: 'ultra-dark-green', start: '#014333', middle: '#01372b', end: '#002a20' },
];
$.each(classes, function(i, v) {
$(repl(erpnext.desktop.gradient, v)).appendTo('head');
});
}
erpnext.desktop.render = function() {
var icons = {
'Accounts': { gradient: 'blue', sprite: 'account', label: 'Accounts'},
'Selling': { gradient: 'green', sprite: 'selling', label: 'Selling'},
'Stock': { gradient: 'yellow', sprite: 'stock', label: 'Stock'},
'Buying': { gradient: 'red', sprite: 'buying', label: 'Buying'},
'Support': { gradient: 'purple', sprite: 'support', label: 'Support'},
'HR': { gradient: 'ocean', sprite: 'hr', label: 'Human<br />Resources'},
'Projects': { gradient: 'violet', sprite: 'project', label: 'Projects'},
'Production': { gradient: 'dark-red', sprite: 'production', label: 'Production'},
'Website': { gradient: 'leaf-green', sprite: 'website', label: 'Website'},
'Activity': { gradient: 'brown', sprite: 'feed', label: 'Activity'},
'Setup': { gradient: 'grey', sprite: 'setting', label: 'Setup'},
'Dashboard': { gradient: 'bright-green', sprite: 'dashboard', label: 'Dashboard'},
'To Do': { gradient: 'bright-yellow', sprite: 'todo', label: 'To Do'},
'Messages': { gradient: 'pink', sprite: 'messages', label: 'Messages'},
'Calendar': { gradient: 'peacock', sprite: 'calendar', label: 'Calendar'},
'Knowledge Base': { gradient: 'ultra-dark-green', sprite: 'kb', label: 'Knowledge<br />Base'}
}
var add_icon = function(m) {
var icon = icons[m];
icon.link = erpnext.modules[m];
$('#icon-grid').append(repl('\
<div id="%(sprite)s" class="case-wrapper"><a href="#!%(link)s">\
<div class="case-border case-%(gradient)s">\
<div class="sprite-image sprite-%(sprite)s"></div>\
</div></a>\
<div class="case-label">%(label)s</div>\
</div>', icon));
}
// setup
for(var i in wn.boot.modules_list) {
var m = wn.boot.modules_list[i];
if(!in_list(['Setup', 'Dashboard'], m) && wn.boot.profile.allow_modules.indexOf(m)!=-1)
add_icon(m);
}
if(user_roles.indexOf('Accounts Manager')!=-1)
add_icon('Dashboard')
if(user_roles.indexOf('System Manager')!=-1)
add_icon('Setup')
// apps
erpnext.desktop.show_pending_notifications();
}
erpnext.desktop.show_pending_notifications = function() {
var add_circle = function(str_module, id, title) {
var module = $('#'+str_module);
module.find('a:first').append(
repl('<div id="%(id)s" class="circle" title="%(title)s" style="display: None">\
<span class="circle-text"></span>\
</div>', {id: id, title: title}));
var case_border = module.find('.case-border');
var circle = module.find('.circle');
var add_hover_and_click = function(primary, secondary, hover_class, click_class) {
primary
.hover(
function() { secondary.addClass(hover_class); },
function() { secondary.removeClass(hover_class); })
.mousedown(function() { secondary.addClass(click_class); })
.mouseup(function() { secondary.removeClass(click_class); })
.focusin(function() { $(this).mousedown(); })
.focusout(function() { $(this).mouseup(); })
}
add_hover_and_click(case_border, circle, 'hover-effect', 'circle-click');
add_hover_and_click(circle, case_border, 'hover-effect', 'case-border-click');
}
add_circle('messages', 'unread_messages', 'Unread Messages');
add_circle('support', 'open_support_tickets', 'Open Support Tickets');
add_circle('todo', 'things_todo', 'Things To Do');
add_circle('calendar', 'todays_events', 'Todays Events');
add_circle('project', 'open_tasks', 'Open Tasks');
add_circle('kb', 'unanswered_questions', 'Unanswered Questions');
erpnext.update_messages();
}
pscript.onload_desktop = function() {
// load desktop
erpnext.desktop.refresh();
}

View File

@@ -0,0 +1,28 @@
# Page, desktop
[
# These values are common in all dictionaries
{
'creation': '2012-02-24 11:37:43',
'docstatus': 0,
'modified': '2012-02-24 11:37:43',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
# These values are common for all Page
{
'doctype': 'Page',
'module': u'Home',
'name': '__common__',
'page_name': u'desktop',
'standard': u'Yes',
'title': u'Desktop'
},
# Page, desktop
{
'doctype': 'Page',
'name': u'desktop'
}
]