From 2f07c9c4781a36ef59d2ca7f5ed82b846df14ea3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 26 Jan 2011 13:50:43 +0100 Subject: [PATCH] Change icon of page on activity. --- src/main/resources/static/images/icon-activity.png | Bin 0 -> 1218 bytes src/main/resources/static/javascript/sone.js | 14 ++++++++++++++ src/main/resources/templates/include/tail.html | 2 ++ 3 files changed, 16 insertions(+) create mode 100644 src/main/resources/static/images/icon-activity.png diff --git a/src/main/resources/static/images/icon-activity.png b/src/main/resources/static/images/icon-activity.png new file mode 100644 index 0000000000000000000000000000000000000000..5803edbdbbf28d8105deefbe3d8f8797675e979b GIT binary patch literal 1218 zcmV;z1U>tSP)Px(d`Uz>R9M5Mmu*a2RT#&Am)F5yLpELlWn+$zg)FlhBe3`~5HqI6%xG0MM5k`c z3^7Ea#Ka93QPeLumZ$_Z8Ti3$)Wm=aYD{s7Q7nup33E^f*wO-H2$Pr57Oo%e?aS>8 zZP}AFz2`a4x&Qw?=YO8_9Dxu`)RG142G$1=J_+;+8YcV&2tfeG0NU zCj|{ZheSZsQUrVk+|8Yv2)r$5I1`Y7{MGfqiC|_aL@N`)~=Lj0E z0)%;hr^;*YwCXS5@L45zR7CIu=59lam-NVWJcN04yajA_G`{JDbKik|*%gqT2G86Z z+ALV@%J!%=Ezuu=`y3CpWog=%Y)bHpRj@TFc<|V0I9jCiHBOg0DMh$Ve;knGXm=06 zA0tZe3srDWCiMIbkL?W%o|OtOJ_tLvxO~fmOog??2yp627xj7!N$nbN0HKw39# zr-cp0FA%#cuu#JMbwq~4yGI~8(&f8mmXgxw4Ijs9cm(;tCqV!77&lwr!BA6-uHiZA z+Uijo2SOtN@W>vhd=w(WUB0U(xbTa2Y*RuizX2zK9S%{6D`ZU>Dc85t-c&(dTYYE* z06usYT3(U%w7<;O0UWz&QuvnSmkYoy*;lS_r=__%I1R|^9W&dLjXQD^Y#(p8N9ub2 zOBk_OW3G?0uHU{hSws*T%!3^K*WxvHOfCQb%G~@#20g8xS3bTE-uFx3hCQ+OiP3W@ zBi3{kknTEPsP~-sE=PANCaZ$e;Nla%kiu1zFp~F!Pr? zuuqTqd_#tZ@H`1b0Z;iSuuVbW(tPfm#g>%fRPks(Q_Zg<+LqRoeoer`L6p$WB{)0v zyh4x*eVqZphXW8OBk*u1=;g(nX=P@M4EU8@Zb`?}ekZ8m3K8}yDjD?wgs7NR-*DcK z|1=Qika>XN&Z<~ds|y20fDC6Mnldrp(~f=Ge>vP>F>rilT;baY+ydg|e;?K;z{_4` zxvExo0Qf#s!L>A3Q)JLP+f{ODT>-r39o{KO`t*G zsy8E5t!_WixQfPn7cs^Gj`V)J^njtqo<2LdUOtnCWx<^npgW|?sj60&B3~ksgTS8$ g`b?*b455(zA8MU+w-062MgRZ+07*qoM6N<$f=2v2@c;k- literal 0 HcmV?d00001 diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index 251105a..e422237 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -1028,6 +1028,7 @@ function resetActivity() { if (title.indexOf('(') == 0) { document.title = title.substr(title.indexOf(' ') + 1); } + changeIcon("images/icon.png"); } function setActivity() { @@ -1036,10 +1037,23 @@ function setActivity() { if (title.indexOf('(') != 0) { document.title = "(!) " + title; } + changeIcon("images/icon-activity.png"); } } /** + * Changes the icon of the page. + * + * @param iconUrl + * The new URL of the icon + */ +function changeIcon(iconUrl) { + $("link[rel=icon]").remove(); + $("head").append($("").attr("rel", "icon").attr("type", "image/png").attr("href", iconUrl)); + $("iframe[id=icon-update]")[0].src += ""; +} + +/** * Creates a new notification. * * @param id diff --git a/src/main/resources/templates/include/tail.html b/src/main/resources/templates/include/tail.html index dd2e25e..ec2b587 100644 --- a/src/main/resources/templates/include/tail.html +++ b/src/main/resources/templates/include/tail.html @@ -16,4 +16,6 @@ + + -- 2.7.4