From ac144121ff6d871b181a6ce4dce2e9748e6962eb Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 27 Feb 2012 19:16:24 +0530 Subject: [PATCH] fix in hover effect --- css/all-app.css | 3 +- css/all-web.css | 3 +- .../trend_analyzer/trend_analyzer.py | 2 +- erpnext/home/page/desktop/desktop.css | 33 ++++--------------- .../home/page/event_updates/event_updates.py | 2 +- erpnext/startup/startup.css | 3 +- js/all-app.js | 5 +-- js/all-web.js | 5 +-- js/app.js | 8 ++++- version.num | 2 +- 10 files changed, 28 insertions(+), 38 deletions(-) diff --git a/css/all-app.css b/css/all-app.css index dec09ee18f..b2fd2e5732 100644 --- a/css/all-app.css +++ b/css/all-app.css @@ -2866,7 +2866,8 @@ body { .navbar-icon-home:hover, .navbar-icon-home:focus, -.navbar-icon-home:active { +.navbar-icon-home:active, +.navbar-icon-home-hover{ opacity:1; Filter:alpha(opacity=100); /* For IE8 and earlier */ } diff --git a/css/all-web.css b/css/all-web.css index ec9fff273d..9359de898e 100644 --- a/css/all-web.css +++ b/css/all-web.css @@ -1674,7 +1674,8 @@ body { .navbar-icon-home:hover, .navbar-icon-home:focus, -.navbar-icon-home:active { +.navbar-icon-home:active, +.navbar-icon-home-hover{ opacity:1; Filter:alpha(opacity=100); /* For IE8 and earlier */ } diff --git a/erpnext/analysis/search_criteria/trend_analyzer/trend_analyzer.py b/erpnext/analysis/search_criteria/trend_analyzer/trend_analyzer.py index 4016288fa2..ad5718154b 100644 --- a/erpnext/analysis/search_criteria/trend_analyzer/trend_analyzer.py +++ b/erpnext/analysis/search_criteria/trend_analyzer/trend_analyzer.py @@ -121,7 +121,7 @@ if customer_group or based_on == 'Customer Group': # Territory if territory or based_on == 'Territory': add_tab += ' ,`tabTerritory` t11 ' - add_cond += ' AND t1.territory = t11.name AND t1.territory = t11.name and (t11.name = "%s" or t11.name IN (SELECT t12.name FROM `tabTerritory` t12,`tabTerritory` t13 WHERE t12.lft BETWEEN t13.lft and t13.rgt and t12.docstatus !=2 and ifnull(t12.is_group,"No") = "No" and t13.name = "%s"))' % (based_on != 'Territory' and territory or '%(value)s', based_on != 'Territory' and territory or '%(value)s') + add_cond += ' AND t1.territory = t11.name and (t11.name = "%s" or t11.name IN (SELECT t12.name FROM `tabTerritory` t12,`tabTerritory` t13 WHERE t12.lft BETWEEN t13.lft and t13.rgt and t12.docstatus !=2 and ifnull(t12.is_group,"No") = "No" and t13.name = "%s"))' % (based_on != 'Territory' and territory or '%(value)s', based_on != 'Territory' and territory or '%(value)s') # Supplier if supplier or based_on == 'Supplier': diff --git a/erpnext/home/page/desktop/desktop.css b/erpnext/home/page/desktop/desktop.css index 564a361852..0aede60c67 100644 --- a/erpnext/home/page/desktop/desktop.css +++ b/erpnext/home/page/desktop/desktop.css @@ -65,36 +65,15 @@ /* Hover and click effects */ .case-border:hover, .circle:hover { - animation: hover-effect 0.1s; - -moz-animation: hover-effect 0.1s; /* Firefox */ - -webkit-animation: hover-effect 0.05s; /* Safari and Chrome */ - - animation-timing-function:linear; - -moz-animation-timing-function:linear; /* Firefox */ - -webkit-animation-timing-function:linear; /* Safari and Chrome */ - box-shadow: 0 0 2px 0 black, 0 0 10px 1px white; + box-shadow: 0 0 2px 0px black, 0 0 10px 1px white; } .case-border:active, .case-border:focus, .circle:active, .circle:focus { - box-shadow: 0 0 2px 0 black, 0 0 15px 2px white; -} - -@keyframes hover-effect -{ - from {box-shadow: 0 0 10px 1px black} - to {box-shadow: 0 0 2px 0 black, 0 0 10px 1px white;} -} - -@-moz-keyframes hover-effect /* Firefox */ -{ - from {box-shadow: 0 0 10px 1px black} - to {box-shadow: 0 0 2px 0 black, 0 0 10px 1px white;} -} - -@-webkit-keyframes hover-effect /* Safari and Chrome */ -{ - from {box-shadow: 0 0 10px 1px black} - to {box-shadow: 0 0 2px 0 black, 0 0 10px 1px white;} + 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 { diff --git a/erpnext/home/page/event_updates/event_updates.py b/erpnext/home/page/event_updates/event_updates.py index a755da93ee..05f1cfc609 100644 --- a/erpnext/home/page/event_updates/event_updates.py +++ b/erpnext/home/page/event_updates/event_updates.py @@ -32,7 +32,7 @@ def get_unread_messages(arg=None): return webnotes.conn.sql("""\ SELECT name, comment FROM `tabComment Widget Record` - WHERE comment_doctype='My Company' + WHERE comment_doctype IN ('My Company', 'Message') AND comment_docname = %s AND ifnull(docstatus,0)=0 """, webnotes.user.name, as_list=1) diff --git a/erpnext/startup/startup.css b/erpnext/startup/startup.css index 27fda48658..ae0ef606f1 100644 --- a/erpnext/startup/startup.css +++ b/erpnext/startup/startup.css @@ -70,7 +70,8 @@ body { .navbar-icon-home:hover, .navbar-icon-home:focus, -.navbar-icon-home:active { +.navbar-icon-home:active, +.navbar-icon-home-hover{ opacity:1; Filter:alpha(opacity=100); /* For IE8 and earlier */ } diff --git a/js/all-app.js b/js/all-app.js index 17a649d1b8..92ea5280ad 100644 --- a/js/all-app.js +++ b/js/all-app.js @@ -2187,7 +2187,8 @@ get_window_height=function(){var ht=window.innerHeight?window.innerHeight:docume * js/app.js */ wn.app={name:'ERPNext',license:'GNU/GPL - Usage Condition: All "erpnext" branding must be kept as it is',source:'https://github.com/webnotes/erpnext',publisher:'Web Notes Technologies Pvt Ltd, Mumbai',copyright:'© Web Notes Technologies Pvt Ltd',version:'2.'+window._version_number} -wn.modules_path='erpnext';wn.settings.no_history=true;$(document).bind('ready',function(){startup();});$(document).bind('toolbar_setup',function(){$('.brand').html('erpnext ');}) +wn.modules_path='erpnext';wn.settings.no_history=true;$(document).bind('ready',function(){startup();});$(document).bind('toolbar_setup',function(){$('.brand').html('erpnext\ + ').hover(function(){$(this).find('.icon-home').addClass('navbar-icon-home-hover');},function(){$(this).find('.icon-home').removeClass('navbar-icon-home-hover');});}) /* * erpnext/startup/startup.js */ @@ -2206,7 +2207,7 @@ btn.help_page=help_page;} if(callback)this.callback=function(){callback();}} var update_messages=function(){if(inList(['Guest'],user)){return;} $c_page('home','event_updates','get_unread_messages',null,function(r,rt){if(!r.exc){page_body.wntoolbar.set_new_comments(r.message);var circle=$('#msg_count') -if(circle){if(r.message.length){circle.find('span:first').text(r.message.length);circle.toggle(true);}else{circle.toggle(false);}}}});} +if(circle){if(r.message.length){circle.find('span:first').text(r.message.length);circle.toggle(true);}else{circle.toggle(false);}}}else{clearInterval(wn.updates.id);}});} erpnext.startup.set_periodic_updates=function(){wn.updates={};if(wn.updates.id){clearInterval(wn.updates.id);} wn.updates.id=setInterval(update_messages,60000);} $(document).bind('startup',function(){erpnext.startup.start();}); diff --git a/js/all-web.js b/js/all-web.js index 70a78b7698..1bccc82475 100644 --- a/js/all-web.js +++ b/js/all-web.js @@ -1035,7 +1035,8 @@ get_window_height=function(){var ht=window.innerHeight?window.innerHeight:docume * js/app.js */ wn.app={name:'ERPNext',license:'GNU/GPL - Usage Condition: All "erpnext" branding must be kept as it is',source:'https://github.com/webnotes/erpnext',publisher:'Web Notes Technologies Pvt Ltd, Mumbai',copyright:'© Web Notes Technologies Pvt Ltd',version:'2.'+window._version_number} -wn.modules_path='erpnext';wn.settings.no_history=true;$(document).bind('ready',function(){startup();});$(document).bind('toolbar_setup',function(){$('.brand').html('erpnext ');}) +wn.modules_path='erpnext';wn.settings.no_history=true;$(document).bind('ready',function(){startup();});$(document).bind('toolbar_setup',function(){$('.brand').html('erpnext\ + ').hover(function(){$(this).find('.icon-home').addClass('navbar-icon-home-hover');},function(){$(this).find('.icon-home').removeClass('navbar-icon-home-hover');});}) /* * erpnext/startup/startup.js */ @@ -1054,7 +1055,7 @@ btn.help_page=help_page;} if(callback)this.callback=function(){callback();}} var update_messages=function(){if(inList(['Guest'],user)){return;} $c_page('home','event_updates','get_unread_messages',null,function(r,rt){if(!r.exc){page_body.wntoolbar.set_new_comments(r.message);var circle=$('#msg_count') -if(circle){if(r.message.length){circle.find('span:first').text(r.message.length);circle.toggle(true);}else{circle.toggle(false);}}}});} +if(circle){if(r.message.length){circle.find('span:first').text(r.message.length);circle.toggle(true);}else{circle.toggle(false);}}}else{clearInterval(wn.updates.id);}});} erpnext.startup.set_periodic_updates=function(){wn.updates={};if(wn.updates.id){clearInterval(wn.updates.id);} wn.updates.id=setInterval(update_messages,60000);} $(document).bind('startup',function(){erpnext.startup.start();}); diff --git a/js/app.js b/js/app.js index 67f900f2bb..f2e24bba1e 100644 --- a/js/app.js +++ b/js/app.js @@ -31,5 +31,11 @@ $(document).bind('ready', function() { }); $(document).bind('toolbar_setup', function() { - $('.brand').html('erpnext '); + $('.brand').html('erpnext\ + ') + .hover(function() { + $(this).find('.icon-home').addClass('navbar-icon-home-hover'); + }, function() { + $(this).find('.icon-home').removeClass('navbar-icon-home-hover'); + }); }) diff --git a/version.num b/version.num index 5588794c62..8c28da60d7 100644 --- a/version.num +++ b/version.num @@ -1 +1 @@ -741 +747 \ No newline at end of file