From 754f8957ede9db339f0a7be3fdb7b0d600312617 Mon Sep 17 00:00:00 2001 From: fabrixxm Date: Fri, 15 Feb 2013 06:39:37 -0500 Subject: [PATCH] tools icon in item footer compact display in network page floating "remove selected" tool --- view/theme/blog/default.php | 1 + view/theme/blog/end.tpl | 1 + view/theme/blog/icons/folder-open.png | Bin 0 -> 211 bytes view/theme/blog/icons/remove.png | Bin 0 -> 207 bytes view/theme/blog/icons/share.png | Bin 0 -> 250 bytes view/theme/blog/icons/star.png | Bin 0 -> 314 bytes view/theme/blog/icons/star3.png | Bin 0 -> 281 bytes view/theme/blog/icons/tag.png | Bin 0 -> 228 bytes view/theme/blog/icons/thumbs-up.png | Bin 0 -> 239 bytes view/theme/blog/icons/thumbs-up2.png | Bin 0 -> 270 bytes view/theme/blog/js/jquery-color-min.js | 1 + view/theme/blog/js/theme.js | 38 ++++++++++ view/theme/blog/search_item.tpl | 7 ++ view/theme/blog/style.css | 81 +++++++++++++++++++--- view/theme/blog/threaded_conversation.tpl | 23 +++--- view/theme/blog/wall_thread.tpl | 53 ++++++++++++-- 16 files changed, 179 insertions(+), 26 deletions(-) create mode 100644 view/theme/blog/end.tpl create mode 100644 view/theme/blog/icons/folder-open.png create mode 100644 view/theme/blog/icons/remove.png create mode 100644 view/theme/blog/icons/share.png create mode 100644 view/theme/blog/icons/star.png create mode 100644 view/theme/blog/icons/star3.png create mode 100644 view/theme/blog/icons/tag.png create mode 100644 view/theme/blog/icons/thumbs-up.png create mode 100644 view/theme/blog/icons/thumbs-up2.png create mode 100644 view/theme/blog/js/jquery-color-min.js create mode 100644 view/theme/blog/js/theme.js diff --git a/view/theme/blog/default.php b/view/theme/blog/default.php index 82c868a..137985d 100755 --- a/view/theme/blog/default.php +++ b/view/theme/blog/default.php @@ -62,6 +62,7 @@ + diff --git a/view/theme/blog/end.tpl b/view/theme/blog/end.tpl new file mode 100644 index 0000000..252b924 --- /dev/null +++ b/view/theme/blog/end.tpl @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/view/theme/blog/icons/folder-open.png b/view/theme/blog/icons/folder-open.png new file mode 100644 index 0000000000000000000000000000000000000000..e66886e051e5aa0170c4ba26706e00364972d54d GIT binary patch literal 211 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`vpiiKLoEE0Qx*sq1g)6Qm~x=r z#MzGFXP-k&qr~Bjk_?yJw^MI;z@qLoEE0Qx5R{TkL6=6x!AEXpZxY`oCY!#4nnyiMnZ+31dMI4vRQSq0;V^^k1&*2Q*Sd2KFe}8*o1nMi zkE=p%L*4<#1r4?n*<@H&6))JuDBPg-O!#G!+k#zeCE^V%uU@7)C|*#S&>fh>D5CMZ zv!qcuKvv_z%4`OWxbwm@Uhdk_X7(D!xLX=!QKDjLC$6HboFyt=akR{ E02X&fw*UYD literal 0 HcmV?d00001 diff --git a/view/theme/blog/icons/share.png b/view/theme/blog/icons/share.png new file mode 100644 index 0000000000000000000000000000000000000000..09c6f27907d9935462434aed86e5751d977b296e GIT binary patch literal 250 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`2R&UJLoEE41~>9H8}KX^KfwNm z#qI{@8q@@X`mApKSBcZU1xB=3fG^9)ZLGFG!h=`+eL{oL|JKsDCLWm2r7K6^=e>kSRd yQ&ArM2YDyWy?H-SY$2!qay{Yo#-BfSe-hsism;IKur3AY83s>RKbLh*2~7YHRbM6m literal 0 HcmV?d00001 diff --git a/view/theme/blog/icons/star.png b/view/theme/blog/icons/star.png new file mode 100644 index 0000000000000000000000000000000000000000..6a0133a79f1e183c4bd10a71131efc7baf8d8f53 GIT binary patch literal 314 zcmV-A0mc4_P)5+}B-Ofz0gCQZd)~)flmSB}wWUiKCCU>>F8OpOjmXmz=?OT@F&KwLeHQY}zW9<)A#_*ek9WwgWlte9UXsIhY+_$l$gY zux2pqkZpMOkk{cKtAZWF5&4BVY!ety_^ApklepAtAg;sUb#(HIYQ=zBrcL4=hAe9& zQxvNdgpxU8jLn!G7XF*p5YE#0>4Qn*JEj1hH|hxu$|h*DVCecPY_LE;!=7;& z+g*kUE_NZG6im7t@31LsYwz-Bxunp&Vb=qOfDp!23{wgwI5J&X!0vF1aXRCIEA8t9 d@49PbF-*=;omiMR`vcIg44$rjF6*2UngFHXU;F?7 literal 0 HcmV?d00001 diff --git a/view/theme/blog/icons/tag.png b/view/theme/blog/icons/tag.png new file mode 100644 index 0000000000000000000000000000000000000000..74a5151b6020937c853cfaca8c60daa409423b0f GIT binary patch literal 228 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`t36#DLoEE0Qx5R6G+g@YAj5D( z!OSWn<;ddu3>w?z+ue4U#jriNbcf^0O@^ai6@oWNHk?mO`TBpOq{E4u3bzy29VlQ_ zJR8x>{Y+((3A67X4x@&cvkKz6ERqF`9bY+@u;*NoZ*1aHV76m0wC`kVFtKjXX|H_9 zz}a@dRM}lwL#D%!#nrgVN+E@#EiHzVbGG+}tYg!sOyoVdQgS+@Lg9>ZIfk2@7gijT a3S>A^p{A2`=Y1p4*$kepelF{r5}E+M`cGv5 literal 0 HcmV?d00001 diff --git a/view/theme/blog/icons/thumbs-up.png b/view/theme/blog/icons/thumbs-up.png new file mode 100644 index 0000000000000000000000000000000000000000..f2664ef6f1951c34907026de77162f70263cdd96 GIT binary patch literal 239 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`+dN$yLoEE0Qxtf87_|N~9N{&{ z?OF1YJ^LAZ(hj>Io(P6368u{yq%cn~&1aDka#$lS(!lkcc_Z_raM{K;%q=_u3|c4H zA2BJgZA^TiFe~xH0fw0w{6~5nau|;Mb75PjtYh#`nU$}{w@0#dio^%OCsAHJ3`;p3 zfn?>xi9*b3O-Y?X%p#3!HVW4n0vMVuv!7vzu*zuYvUIr2x^9IDi&u<;8N+O+3A_tT j<~O8CXl!iMVPa;8s8V@2y})@l&<6~ju6{1-oD!MuH7f4z+mPL}m1`+JNcO`(a{%bG?inG8uI76kL199YlEL9W- zhh3tQX|w>F4R5KT`>*;epoQZqIyW(R@NFzW=D`(Aat`o-y_nJx?aPPaVryON0}OpB U5yn!D1poj507*qoM6N<$f@NN6XaE2J literal 0 HcmV?d00001 diff --git a/view/theme/blog/js/jquery-color-min.js b/view/theme/blog/js/jquery-color-min.js new file mode 100644 index 0000000..17747b5 --- /dev/null +++ b/view/theme/blog/js/jquery-color-min.js @@ -0,0 +1 @@ +(function(d){d.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(f,e){d.fx.step[e]=function(g){if(!g.colorInit){g.start=c(g.elem,e);g.end=b(g.end);g.colorInit=true}g.elem.style[e]="rgb("+[Math.max(Math.min(parseInt((g.pos*(g.end[0]-g.start[0]))+g.start[0]),255),0),Math.max(Math.min(parseInt((g.pos*(g.end[1]-g.start[1]))+g.start[1]),255),0),Math.max(Math.min(parseInt((g.pos*(g.end[2]-g.start[2]))+g.start[2]),255),0)].join(",")+")"}});function b(f){var e;if(f&&f.constructor==Array&&f.length==3){return f}if(e=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(f)){return[parseInt(e[1]),parseInt(e[2]),parseInt(e[3])]}if(e=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(f)){return[parseFloat(e[1])*2.55,parseFloat(e[2])*2.55,parseFloat(e[3])*2.55]}if(e=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(f)){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}if(e=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(f)){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}if(e=/rgba\(0, 0, 0, 0\)/.exec(f)){return a.transparent}return a[d.trim(f).toLowerCase()]}function c(g,e){var f;do{f=d.curCSS(g,e);if(f!=""&&f!="transparent"||d.nodeName(g,"body")){break}e="backgroundColor"}while(g=g.parentNode);return b(f)}var a={transparent:[255,255,255]}})(jQuery); \ No newline at end of file diff --git a/view/theme/blog/js/theme.js b/view/theme/blog/js/theme.js new file mode 100644 index 0000000..313b23c --- /dev/null +++ b/view/theme/blog/js/theme.js @@ -0,0 +1,38 @@ +// confirm delete, call delete via ajax, remove item from dom +$(".item.drophide").bind("click", function(e){ + var sender = (e && e.target) || (window.event && window.event.srcElement); + var dropurl = baseurl + "/" +$(sender).attr('href'); + var ret = confirmDelete(); // use friendica confirmDelete function. Translated message for free. + if (ret==false) return false; + $.ajax(dropurl,{ + dataType: "json", + url: dropurl, + success: function(data){ + console.log(data); + /* if(data[1]!=0){ + $("#item-"+data[0]).hide(400, function(){ + $(this).remove(); + }); + }*/ + } + }); + return false; +}); + +// move selection tools on clicks +$("input.item-select").bind("click", function(e){ + var sender = (e && e.target) || (window.event && window.event.srcElement); + var position = $(sender).offset(); + position.left = position.left + 30; + + var n = $( "input.item-select:checked" ).length; + if (n>0){ + $("#selection-tools").show(400).offset(position); + } else { + position.top = 0; + $("#selection-tools").offset(position).hide(400); + + + } + console.log(position); +}); \ No newline at end of file diff --git a/view/theme/blog/search_item.tpl b/view/theme/blog/search_item.tpl index 13b0235..0192fde 100644 --- a/view/theme/blog/search_item.tpl +++ b/view/theme/blog/search_item.tpl @@ -23,5 +23,12 @@

$item.body

+ + + diff --git a/view/theme/blog/style.css b/view/theme/blog/style.css index 293bef9..20b1ef4 100644 --- a/view/theme/blog/style.css +++ b/view/theme/blog/style.css @@ -357,7 +357,7 @@ h2.fn { font-weight: bold; font-size: 1.2em;} /* tabs */ -ul.tabs { display: block; list-style: none; margin: 0px; height: auto; overflow: auto;} +ul.tabs { display: block; list-style: none; margin: 0px 100px 0px 0px; height: auto; overflow: auto;} ul.tabs li { display: block; float: left; padding-right: 0.2em; } ul.tabs li a { display: block; text-align: center; text-decoration: none; padding: 0px 0.5em; } ul.tabs li a:hover { background-color: #EEEEEE; } @@ -451,7 +451,6 @@ ul.tabs li a.active { background-color: #1982D1; color: #ffffff; } .reply li.comment { position: relative; margin-left: 40px; background-color:rgba(0, 0, 0, 0.03); padding-left: 20px;} .reply .avatar { left: -40px; width: 32px; height: 32px; background-color: #fff;} - /* comment form */ .respond { height: auto; overflow: auto; } .respond .form-submit { margin-top: 20px; } @@ -467,6 +466,19 @@ ul.tabs li a.active { background-color: #1982D1; color: #ffffff; } clear: both; margin-top: 40px; } +/* compact in network view */ +.hentry.compact { margin-bottom: 0px;} +#comments.compact { border-bottom: 1px solid #aaaaaa; padding: 0px; background-color: #DDDDDD;} +#comments.compact > .reply-link { padding: 10px; } +.compact .respond { display: none; } +.compact .commentlist { width: 100%; } +.compact .commentlist > li.comment { border: none; border-radius: 0px; margin: 0px; padding: 10px; border-top: 1px solid #aaaaaa; } +.compact .commentlist .avatar { left: -44px; width: 34px; height: 34px; } +.compact .commentlist > li::before { display: none; } +/* item author icon */ +.hentry .avatar { position: absolute; left: -73px; top: 20px; border-radius: 3px; box-shadow: 0px 1px 2px #CCCCCC; } + + /* search item */ article.search { background: #F6F6F6; @@ -504,6 +516,44 @@ article.search .avatar { #search-box input[type="submit"]{ margin: 1em 2em 2em 0px; } #content > h2 { margin-bottom: 2em; } /* evabbe', poi tolgo l'html da 'sto schifo di php */ +/* lock panel */ +#panel { + position: absolute; + background: #F9F9F9; + border: 1px solid #DDDDDD; + color: #444444; + display: block; + font-weight: 400; + height: auto; + line-height: 1em; + padding: 10px; + text-decoration: none; + z-index: 99999; +} + +/* selected tools panel */ +#selection-tools { + position: absolute; + background: #F9F9F9; + border: 1px solid #DDDDDD; + color: #444444; + display: block; + font-weight: 400; + height: auto; + line-height: 1em; + padding: 10px; + text-decoration: none; + z-index: 99999; + transition: top 1s; + -moz-transition: top 1s; /* Firefox 4 */ + -webkit-transition: top 1s; /* Safari and Chrome */ + -o-transition: top 1s; /* Opera */ + top: 0px; +} + +/* item tools */ +.right-tools {float: right;} + /* profile menu */ ul#profiles-menu { top: 2em; left: 9px; width: 176px; } ul#profiles-menu li img { width: 16px; vertical-align: middle; margin-right: 10px;} @@ -528,17 +578,30 @@ ul#profiles-menu li img { width: 16px; vertical-align: middle; margin-right: 10p .contact.dropmenu .menu-popup { left: 120px; top: 0px;} /* icons */ +.like-rotator { position: absolute; left: -20px;} + .icon { display: inline-block; margin: 0px; padding: 0px; width: 16px; height: 16px; } .icon.camera { background: url(icons/image.png) transparent center center no-repeat; } -.icon.attach { background: url(icons/attachment.png) transparent center center no-repeat; } -.icon.link { background: url(icons/link.png) transparent center center no-repeat; } -.icon.video { background: url(icons/youtube2.png) transparent center center no-repeat; } -.icon.audio { background: url(icons/headphones.png) transparent center center no-repeat; } -.icon.globe { background: url(icons/location.png) transparent center center no-repeat; } +.icon.attach { background: url(icons/attachment.png) transparent center center no-repeat; } +.icon.link { background: url(icons/link.png) transparent center center no-repeat; } +.icon.video { background: url(icons/youtube2.png) transparent center center no-repeat; } +.icon.audio { background: url(icons/headphones.png) transparent center center no-repeat; } +.icon.globe { background: url(icons/location.png) transparent center center no-repeat; } .icon.noglobe { background: url(icons/globe.png) transparent center center no-repeat; } -.icon.lock { background: url(icons/lock2.png) transparent center center no-repeat; } +.icon.lock { background: url(icons/lock2.png) transparent center center no-repeat; } .icon.unlock { background: url(icons/unlocked.png) transparent center center no-repeat; } -.icon.edit { background: url(icons/pencil.png) transparent center center no-repeat; } +.icon.edit { background: url(icons/pencil.png) transparent center center no-repeat; } + +.icon.like { background: url(icons/thumbs-up.png) transparent center center no-repeat; } +.icon.dislike { background: url(icons/thumbs-up2.png) transparent center center no-repeat; } +.icon.recycle { background: url(icons/share.png) transparent center center no-repeat; } +.icon.starred { background: url(icons/star3.png) transparent center center no-repeat; } +.icon.unstarred { background: url(icons/star.png) transparent center center no-repeat; } +.icon.file { background: url(icons/folder-open.png) transparent center center no-repeat; } +.icon.tag { background: url(icons/tag.png) transparent center center no-repeat; } +.icon.drophide { background: url(icons/remove.png) transparent center center no-repeat; } + +.icon.sep { display:inline-block; text-align: center; font-size: 26px; line-height: 16px;} .icon.on { border: 1px solid #cccccc; background-color: #56ef46; -webkit-border-radius: 16px 16px 16px 16px; diff --git a/view/theme/blog/threaded_conversation.tpl b/view/theme/blog/threaded_conversation.tpl index e79d4dc..4b23f3f 100644 --- a/view/theme/blog/threaded_conversation.tpl +++ b/view/theme/blog/threaded_conversation.tpl @@ -4,15 +4,16 @@ $live_update {{ inc $thread.template with $item=$thread }}{{ endinc }} {{ endfor }} -
{{ if $dropping }} -