From 3481235e63b9f841d12d80696dd60b62b212ef20 Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Wed, 5 Mar 2014 13:06:53 +0100 Subject: [PATCH] Use core icons --- css/contacts.css | 61 ++++------------------------------------ img/active_star.png | Bin 527 -> 0 bytes img/active_star.svg | 6 ---- img/checkmark-gray.png | Bin 688 -> 0 bytes img/checkmark-gray.svg | 6 ---- img/checkmark-green.png | Bin 618 -> 0 bytes img/checkmark-green.svg | 6 ---- img/checkmark.png | Bin 280 -> 0 bytes img/contact-new.png | Bin 525 -> 0 bytes img/contact-new.svg | 18 ------------ img/inactive_star.png | Bin 569 -> 0 bytes img/inactive_star.svg | 6 ---- img/person.png | Bin 605 -> 0 bytes img/person.svg | 41 --------------------------- img/starred.png | Bin 703 -> 0 bytes img/starred.svg | 6 ---- js/contacts.js | 12 ++++---- templates/contacts.php | 2 +- 18 files changed, 13 insertions(+), 151 deletions(-) delete mode 100644 img/active_star.png delete mode 100644 img/active_star.svg delete mode 100644 img/checkmark-gray.png delete mode 100644 img/checkmark-gray.svg delete mode 100644 img/checkmark-green.png delete mode 100644 img/checkmark-green.svg delete mode 100644 img/checkmark.png delete mode 100644 img/contact-new.png delete mode 100644 img/contact-new.svg delete mode 100644 img/inactive_star.png delete mode 100644 img/inactive_star.svg delete mode 100644 img/person.png delete mode 100644 img/person.svg delete mode 100644 img/starred.png delete mode 100644 img/starred.svg diff --git a/css/contacts.css b/css/contacts.css index 2ed84854..5f560a5a 100644 --- a/css/contacts.css +++ b/css/contacts.css @@ -85,13 +85,14 @@ #app-navigation .active { font-weight: bold; } -#app-navigation li > .utils > *:not(.numcontacts) { +#app-navigation li > .utils > *:not(.numcontacts):not(.starred) { display: none; } #app-navigation li > .utils > * { line-height: 44px; width: 44px; height: 44px; background-size: auto; + float: left; } #app-navigation li.active[data-type="category"] > .utils > * { display: inline-block; @@ -234,7 +235,6 @@ span.ui-icon { margin: 1px 3px 10px 0px; } } [class^="icon-"], [class*=" icon-"], .action, .icon { - display: inline-block; cursor: pointer; background-repeat: no-repeat; } @@ -250,21 +250,12 @@ span.ui-icon { margin: 1px 3px 10px 0px; } text-indent: 18px; } -/* TODO: Use @import url('../css/[no-]svg.css); instead. */ - -.no-svg .starred { background-image:url('../img/starred.png'); background-size: contain; } -.no-svg .checked { background-image:url('../img/checkmark-green.png'); } -.no-svg .checked.disabled { background-image:url('../img/checkmark-gray.png'); cursor: default; } - .svg .action.text, .svg .icon.text, .svg .svg.text { background-size: 16px 16px; background-origin: content-box; background-repeat: no-repeat; width: auto; height: auto; } -.svg .starred { background-image:url('../img/starred.svg'); background-size: contain; } -.svg .checked { background-image:url('../img/checkmark-green.svg'); } -.svg .checked.disabled { background-image:url('../img/checkmark-gray.svg'); cursor: default; } .transparent{ opacity: 0.6; } .float { float: left; display: inline-block; width: auto; } @@ -360,7 +351,7 @@ ul.propertylist { width: 100%; line-height: 34px; } clear: none; opacity: 0; } .propertylist li.propertycontainer:hover > .listactions { opacity: 1; } -.propertylist li.propertycontainer .listactions a { +.singleproperties .propertycontainer .listactions a, .propertylist li.propertycontainer .listactions a { display: inline-block; clear: none; width: 16px; height: 16px; @@ -431,42 +422,6 @@ dt[data-element="org"] { margin-top: 4px; } .addressbooks-settings a.action:hover { opacity: 1; } .addressbooks-settings td.active, .addressbooks-settings td.action { width: 20px; } -/* -#contacts-settings .settings { - height:1.4em; - background-repeat: no-repeat; - background-position:0px 0px; - background-origin: content-box; - background-image:url('%webroot%/core/img/actions/settings.svg'); -} -#contacts-settings .settings:hover { - font-weight: normal; - color: #666666; -} -#contacts-settings.open { - height: auto; - z-index: 10; - overflow-y: auto; -} -#contacts-settings { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - background: none repeat scroll 0 0 #EEEEEE; - border-right: 1px solid #CCCCCC; - border-top: 1px solid #CCCCCC; - bottom: 0; - height: 2.8em; - margin: 0; - overflow: visible; - padding: 0; - position: fixed; - width: 20em; - z-index: 2; -} -#contacts-settings li,#contacts-settings li:hover { background-color: transparent; white-space: nowrap; } -#contacts-settings a.action:not(.settings) { width: 16px; height: 16px; } -*/ .addressbooklist .actions { position: absolute; right: 0px; } .addressbooklist .actions > a { width: 20px; height: 20px; } .addressbooklist > li > div { @@ -584,13 +539,9 @@ input[type=checkbox].propertytype { width: 10px; } padding-left: 20px; font-weight: normal; } -.no-svg .favorite { display: inline-block; float: left; height: 20px; width: 20px; background-image:url('../img/inactive_star.png'); } -.no-svg .favorite.active, .favorite:hover { background-image:url('../img/active_star.png'); } -.no-svg .favorite.inactive { background-image:url('../img/inactive_star.png'); } +.no-svg .favorite { display: inline-block; float: left; height: 20px; width: 20px; } -.svg .favorite { display: inline-block; float: left; height: 20px; width: 20px; background-image:url('../img/inactive_star.svg'); background-size:contain; } -.svg .favorite.active, .favorite:hover { background-image:url('../img/active_star.svg'); } -.svg .favorite.inactive { background-image:url('../img/inactive_star.svg'); background-size:contain; } +.svg .favorite { display: inline-block; float: left; height: 20px; width: 20px; background-size:contain; } #app-content { top: 44px; @@ -750,7 +701,7 @@ fieldset.adr ul li input.label { margin-top: -4px !important; } width: 32px; margin-left: 10px; } -/* Override default style for an open cpntact */ +/* Override default style for an open contact */ tbody tr, tbody tr.hover { background-color: #fff !important; } diff --git a/img/active_star.png b/img/active_star.png deleted file mode 100644 index 287ffa65dc5b1ff435e6698f4d1b1534ee582786..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 527 zcmV+q0`UEbP)y~h1lG0S^@O`TJ?K8T5I_7+Q-<`u>uHpa=*>9<;yaJe# zdO+i4yz zFg+oxBeSR;`5;hU>~=bV*Em%HTa&r09-Yx(d2Jf;5pO1N_pS)r9@y8y1i%a11 - - - - - diff --git a/img/checkmark-gray.png b/img/checkmark-gray.png deleted file mode 100644 index 7dda20bc5963c5c164236b47cc29f0f66a7622dc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 688 zcmeAS@N?(olHy`uVBq!ia0vp^A|TAc3?z4jzqJQa%*9TgAsieWw;%dH0CG7CJR*yM z^cxUntkfvn3uH)^xJHx&=ckpFCl;kLl$V$5W#(lUCnpx9>g5-u&wghk1ymFSQskUp zP+63jo>9W!?5yBeQc{$eR9cdmpQjs~0o3Z4lbM~WkWo@nV5P60T$Gwvl3A9ToS&PU zpH~brNk1nuIW@01wOBu?Qnxr!-&oH;Kdw1y576{W0X`wF|Ns97G8-BiLPJA=IM>rN zAt52n*S91#HY+r=ARr(!Dk?iL5XjE*_sR==6Bw8q z6qFqj0+h-L3IZtrBcKR`0Tcmh2WkPz0!bhnsuHXPB#wj-T%h4#afAqxGGr}q_O6*T z*8;udS`y?J%)rRR%*M{a#myriC@di>udJq_rLAvj=H%@YoSc@^*xWH?`i!~r<}X>g zeBJs@o44)Qz3am?>|?oyJA2C7kaulhDb=J9_$QbOk`+# zsGodN!&`HaPUK>@piM0os{e1lV&7BzPxAcYjyu^gf#Jq+GOe+7jJ59Dx&`;m%jy5I zk9$)}m_%IEw)CDdpKZHkKgb22V41Pos_XRvo;CR*5?h6gj%`@45zySXq zPv-~~ksk+cOw0TKz)?M~nEB71Ms@G9uJ`8p(Wee)Xq=HeV6?R3iF)YVo$pS4;`b1d Vet7DRN-xl{44$rjF6*2UngC5Y1ZMyM diff --git a/img/checkmark-gray.svg b/img/checkmark-gray.svg deleted file mode 100644 index 9322e4db..00000000 --- a/img/checkmark-gray.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/img/checkmark-green.png b/img/checkmark-green.png deleted file mode 100644 index 9a8a43616ae9ece3587f41482c9e349c46747a39..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 618 zcmV-w0+s!VP)6Bd{Lc5DbMNin>GgV68&SnN z+`(Ly{0b9mfORmBGk6qLOs)xt8#q?458_EwG1*zo$Wg^Ct`A5(8ygr^?7%y8Td6NN z*%n8M+XG-9aVSeJjs=V=j$mI)ev9cW`58tYIjWe#BDOW;CG5_UpZdZ$w|uDu`+>tv z*vK756`PTmYRD(D-&(%&E!fRLu$2y@id}e(^>~2;S#r7FXk*>o zrn=@O_V@Gcn20Ji;6V+8y|~u!%rsy>F*6L-ANdNlxAfVl;tihSLPNimB|i*<^?_IM zy)JB?(>(5DYyG`cd;b|Lw;WY$sUg!tyhpR-!;yhCw2ON<)$+Z{l6(FKqxG<}-}>Z+_G{}d0RR9107*qoM6N<$ Eg0OrHJ^%m! diff --git a/img/checkmark-green.svg b/img/checkmark-green.svg deleted file mode 100644 index 0df88bf0..00000000 --- a/img/checkmark-green.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/img/checkmark.png b/img/checkmark.png deleted file mode 100644 index e00cc1d141414e17ec1257b6446dba954cfaafb8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 280 zcmeAS@N?(olHy`uVBq!ia0vp^d?3uh1|;P@bT0xamSQK*5Dp-y;YjHK@;M7UB8!1) zj({-ZRBb+Kpx`b~7sn8diF+??^kZ@qX?@tQdeBtNM1WgFo11w?PS4b>`iGLEUO3-K zSgXdt+R`Q=yyQl7j@s%(X+Pu1)<4hhEKawWso8Q@AP(5a` zR?OHYsjH5+L@rbQ#vca@tyYr>u>kXkcRfjx{9L2aNG2?o%fR#eMZSol!d|Zjj^p@D zr&DOR+pt_NFY=?1VHn8g^H-6{WFVKzL95mB!8j!B_xoU3)>Vk22rSFOY&L^ht>*3+ zhlJT|7D}a31e&HVUJnJ>cYMY@B2-m1^kaK)92XLe$7A=67K;T81_L*TJI3qv+O%!^ z(G|utIRbwD@6LC--3tnD2<$cN_xm@m9oQz61lvW>UhkLSM~Q|xFoa!@!N4o?{Wbsn;t&E}+O+Q(|OI;SCI2x0){-zN4ai4t~Wc^UZ4 P00000NkvXXu0mjf - - - - - - - - - - - - - - - - - diff --git a/img/inactive_star.png b/img/inactive_star.png deleted file mode 100644 index 6636884a9736f3c2d1e95027c467edad33fd9788..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 569 zcmeAS@N?(olHy`uVBq!ia0vp^B0wz6!3-pq2iR|DNig)WhgH%*UQYyE>2D?NY%?PN}v7CMhd9tWPneI z>wg$nwQALwGiQz*IRYdvUAlDa*s+r*PXgKJVBq}u^APUYvuA-~r%s&$a)IP&FaWZF z;y@;l1hRn)APE6L5g?T1y@5PBdfyh4A4_fB|(0{42(?7T)g~(Lc$`V zQt}GQTE-@(Huf(5p<$8H8HGi~B~|sU?Y)zxO`kPy{pKy(PoF(^`O5VhHy=EG_WI-J zFW-Lr{TE>Pt`BJ16i*k&5DCfDgPlT+0Sv4cq$8bEPVPIs&%5QtzyI!;v%-DmHctq1 zypz>Aqvx}a;wtwtLB-gU%1TmSLOxDDv+7pgywbgER31o1@lUU}`?i$7N78U2L&?2A zkGDKreUs;|3CAkWhXD>J78o2q-+4$<@#xYA&jd0imbf*Gd&)Ml?$l&Fs%zJ72{)DtmFiT;G7qL_gQ#l-e3+O%uPgg&ebxsLQ0P27-Z~y=R diff --git a/img/inactive_star.svg b/img/inactive_star.svg deleted file mode 100644 index 57a316ad..00000000 --- a/img/inactive_star.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/img/person.png b/img/person.png deleted file mode 100644 index 473d0a6fc4b06ac01fc90e5b8f80007c06896490..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 605 zcmV-j0;2tiP)MzCV_|S* zE^l&Yo9;Xs0005pNkl}0?UmCPhk6jlsy$o^$IV@wZ~DQDA=-2ew0Dia2DXwpF; z*f798ZNz{c3JvP0cr_y|D|BhoLPn;JS2n;$i82axE~#=!k;8-mcJHRZ_YW*Q3|IoA&yxWv8IpXZPn(a|{*L#h^Zo)p zdhF{Lv@5O|Geo6Jn - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/img/starred.png b/img/starred.png deleted file mode 100644 index 8109fba157d60778e22edccdd5c4b589b8e908bb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 703 zcmYjPdo0ue9RD2ayvG*vsAcPqRE8_AJSIC5JRZ+F zHa?CM&P<53X0fA-KOZ*(NX9;=7*wTFNzDIWMniKBSfrt%x z4r=*m5kV$ELl#nOaWmQdWV`Fo({BCPUcekRye`sWEVsd(BW_EV& z&GOpX`tLuRn_FAkCuWW&5IfpvZY~TH)5spd84}5aJSu7oCKp;wduCU;4vMYZ4tjb1 zdZn}ETuTm4>si&eUu8}m33z7^Z5;U1MqX+g zFy9sR!!|#6A%>E%pjE-`sBWUXt(Vt_OoYC?<7{(a+q}`B=n!>G_pD%1%V8*MaSKvK z`qF&KlH6QsI4BxlPK{8Ls@1i}D+ - - - - - diff --git a/js/contacts.js b/js/contacts.js index 50b78d7a..a2fa6caf 100644 --- a/js/contacts.js +++ b/js/contacts.js @@ -1182,7 +1182,7 @@ OC.Contacts = OC.Contacts || {}; } values = { id: this.id, - favorite:groupprops.favorite ? 'active' : '', + favorite:groupprops.favorite ? 'icon-starred' : 'icon-star', name: this.getPreferredValue('FN', ''), n0: n[0]||'', n1: n[1]||'', n2: n[2]||'', n3: n[3]||'', n4: n[4]||'', nickname: this.getPreferredValue('NICKNAME', ''), @@ -1259,7 +1259,7 @@ OC.Contacts = OC.Contacts || {}; self.deleteProperty({obj:event.target}); }); - this.$fullelem.on('click keydown', '.globe,.mail', function(event) { + this.$fullelem.on('click keydown', '.globe,.mail,.favorite', function(event) { $('.tipsy').remove(); if(wrongKey(event)) { return; @@ -1316,20 +1316,20 @@ OC.Contacts = OC.Contacts || {}; $bdayinput.attr('placeholder', $.datepicker.formatDate(datepickerFormatDate, new Date())); this.$fullelem.find('.favorite').on('click', function () { - var state = $(this).hasClass('active'); + var state = $(this).hasClass('icon-starred'); if(!self.data) { return; } if(state) { - $(this).switchClass('active', 'inactive'); + $(this).switchClass('icon-starred', 'icon-star'); } else { - $(this).switchClass('inactive', 'active'); + $(this).switchClass('icon-star', 'icon-starred'); } $(document).trigger('request.contact.setasfavorite', { id: self.id, state: !state }); - }); + }).tipsy(); this.loadAvatar(); if(!this.data) { // A new contact diff --git a/templates/contacts.php b/templates/contacts.php index b1397b2a..20d021de 100644 --- a/templates/contacts.php +++ b/templates/contacts.php @@ -225,7 +225,7 @@
  • - +

    t('Name')); ?>