Message from discussion
Visually Shortening
Received: by 10.59.6.72 with SMTP id cs8mr12581397ved.27.1351618851779;
Tue, 30 Oct 2012 10:40:51 -0700 (PDT)
X-BeenThere: subjectsplus@googlegroups.com
Received: by 10.220.226.7 with SMTP id iu7ls105500vcb.6.gmail; Tue, 30 Oct
2012 10:40:51 -0700 (PDT)
Received: by 10.52.37.12 with SMTP id u12mr6273063vdj.8.1351618851353;
Tue, 30 Oct 2012 10:40:51 -0700 (PDT)
Date: Tue, 30 Oct 2012 10:40:50 -0700 (PDT)
From: "gs@stcloudstate" <gor...@stcloudstate.edu>
To: subjectsplus@googlegroups.com
Message-Id: <ab685740-7497-4165-8457-c890335eb973@googlegroups.com>
In-Reply-To: <b1c65505-68b1-4933-a6cb-2bd42f4f9bf6@googlegroups.com>
References: <b1c65505-68b1-4933-a6cb-2bd42f4f9bf6@googlegroups.com>
Subject: Re: Visually Shortening
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_297_16721085.1351618850977"
------=_Part_297_16721085.1351618850977
Content-Type: multipart/alternative;
boundary="----=_Part_298_12911927.1351618850978"
------=_Part_298_12911927.1351618850978
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
We wanted the same thing where the "All Items by Source" was compressed by
type and each type can be individually display by clicking. We used the
expand icon to
indicate there is something to view. Below are the changes we made to
implemented it.
Gordie
> Added show/hide,(display hidden/visible) feature to pluslet "All Items by
> Source"
> 1. Add css and small script to <head> area of the header file, in this
> case I added to our custom-header.phtml that is called by the header.php
> file
>
> [css stuff]
> .nolooky {
> display : none;
> }
>
> [script]
> <script><script>
> function showhide(id){
> jQuery('#'+id).toggle('slow');
>
> }
> </script>
>
>
> 2. Modify /sp/control/includes/classes/sp_Pluslet_1.php, in function
> output,
> We really don't need the TOC, so we decided to disable it
> from:
> /////////////////////////
> // Create TOC
> /////////////////////////
>
> $TOC = self::createTOC();
>
> $this->_body = $TOC;
>
> to (comment out the TOC stuff):
> /////////////////////////
> // Create TOC
> /////////////////////////
>
> //$TOC = self::createTOC();
>
> //$this->_body = $TOC;
> --------------------
> from:
> if ($this_source_id != $last_source_id) {
>
> $results .= "<p class=\"leftcolheader\"><a
> name=\"$myrow[4]\"></a>$myrow[3]</p>\n\n";
> $last_source_id = $this_source_id;
> $res_class = "dbresults no-border";
> } else {
> $res_class = "dbresults";
> }
>
> to:
> if ($this_source_id != $last_source_id) {
> $results .= "$enddiv"; #first time through $enddiv is blank
> which is what we want
>
> $nolooky_id += 1;
> $nolooky_id_name = sprintf("nolooky_id_%d",$nolooky_id); #
> create unique id names for each information type
>
> $results .= "<p onclick=\"showhide('{$nolooky_id_name}')\"
> class=\"leftcolheader\"><img src=\"/sp/assets/images/icons/expand.png\"
> /> <a name=\"$myrow[4]\"></a>$myrow[3]</p>\n\n<hr><div
> id=\"{$nolooky_id_name}\"class=\"nolooky\">";
> $last_source_id = $this_source_id;
> $enddiv = "</div>";
> $res_class = "dbresults no-border";
> } else {
> $res_class = "dbresults";
> }
> ---------------------
> And a little lower down, from:
> }
>
> $this->_body .= $results;
>
> parent::assemblePluslet();
>
> return $this->_pluslet;
>
> to:
> }
> $results .= $enddiv; # needed this last closing </div>
>
> $this->_body .= $results;
> parent::assemblePluslet();
>
> return $this->_pluslet;
>
>
------=_Part_298_12911927.1351618850978
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
<div>We wanted the same thing where the "All Items by Source" was compresse=
d by type and each type can be individually display by clicking. We used th=
e expand icon to</div><div>indicate there is something to view. Below are t=
he changes we made to implemented it.</div><div><br></div><div>Gordie</div>=
<div><br></div><div> </div><blockquote class=3D"gmail_quote" style=3D"=
margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;=
"><p><span class=3D"Apple-style-span" style=3D"border-collapse: separate; c=
olor: rgb(0, 0, 0); font-family: Arial; line-height: normal; border-spacing=
: 0px; font-size: medium; "></span></p><div>Added show/hide,(display hidden=
/visible) feature to pluslet "All Items by Source"</div><div>1. Add css and=
small script to <head> area of the header file, in this case I=
added to our custom-header.phtml that is called by the header.php file</di=
v><div><br></div><div>[css stuff]</div><div>.nolooky {</div><div> &nbs=
p; display : none;</div><div> }</div><d=
iv><br></div><div>[script]</div><div><script><script></div><div=
>function showhide(id){</div><div> jQuery('#'+id).t=
oggle('slow');</div><div> </div><div>}</div><d=
iv></script></div><div><br></div><div><br></div><div>2. Modify /sp/co=
ntrol/includes/classes/sp_Pluslet_1.php, in function output,</div><div>We r=
eally don't need the TOC, so we decided to disable it</div><div>from:</div>=
<div> /////////////////////////<div> &=
nbsp; // Create TOC</div><div> &nb=
sp; /////////////////////////</div><div><br></div><div>&n=
bsp; $TOC =3D self::createTOC();</div><=
div><br></div><div> $this->_body =3D $TOC;</di=
v></div><div><br></div><div>to (comment out the TOC stuff):</div><div> =
; /////////////////////////<div>  =
; // Create TOC</div><div> &=
nbsp; /////////////////////////</div><div><br></div><div>  =
; //$TOC =3D self::createTOC();</div><div><br></div><div>&nbs=
p; //$this->_body =3D $TOC;</div></d=
iv><div>--------------------</div><div>from:</div><div> =
if ($this_source_id !=3D $last_source_id) {<div><br><=
/div><div>  =
; $results .=3D "<p class=3D\"leftcolheade=
r\"><a name=3D\"$myrow[4]\"></a>$myrow[3]</p>\n\n";</d=
iv><div> &=
nbsp; $last_source_id =3D $this_source_id;</div><div>&nbs=
p; &=
nbsp; $res_class =3D "dbresults no-border";</div><div> &nb=
sp; } else {</div><div>&nbs=
p; &=
nbsp; $res_class =3D "dbresults";</div><div> &=
nbsp; }</div></div><div><br></div><div>=
to:</div><div> if ($this_source_id !=3D $=
last_source_id) {<div> $resu=
lts .=3D "$enddiv"; #first time through $enddiv is blank which is what we w=
ant</div></div><p></p></blockquote><blockquote class=3D"gmail_quote" style=
=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: =
1ex;"><p><span class=3D"Apple-style-span" style=3D"border-collapse: separat=
e; color: rgb(0, 0, 0); font-family: Arial; line-height: normal; border-spa=
cing: 0px; font-size: medium; "></span></p><div><div> &=
nbsp; $nolooky_id +=3D 1; </div><div>  =
; $nolooky_id_name =3D sprintf("nolooky_i=
d_%d",$nolooky_id); # create unique id names for each information typ=
e</div><div><br></div><div> =
$results .=3D "<p onclick=3D\=
"showhide('{$nolooky_id_name}')\" class=3D\"leftcolheader\"><img src=
=3D\"/sp/assets/images/icons/expand.png\" />&nbsp;&nbsp;<a na=
me=3D\"$myrow[4]\"></a>$myrow[3]</p>\n\n<hr><div id=
=3D\"{$nolooky_id_name}\"class=3D\"nolooky\">";</div><div> &n=
bsp;  =
; $last_source_id =3D $this_source_id;</div><div> &n=
bsp; $enddiv =
=3D "</div>";</div><div> &nb=
sp; $res_class =3D "dbresults no-=
border";</div><div> &n=
bsp; } else {</div><div> &nb=
sp; $res_class =3D "dbresults";</=
div><div> =
}</div></div><div>---------------------</div><div>And a little lower down,=
from:</div><div> }<div><br></div><div> &nb=
sp; $this->_body .=3D $results;</div><div>=
<br></div><div> parent::assembleP=
luslet();</div><div><br></div><div> &nbs=
p; return $this->_pluslet;</div></div><div><br></div><div>to:</div><div>=
}<div>  =
; $results .=3D $enddiv; # needed this last closing </div></div=
><div><br></div><div> $this->_=
body .=3D $results;</div><div> parent::assembleP=
luslet();<br></div><div><br></div><div> =
return $this->_pluslet;</div></div><div><br></div><p></p></blockq=
uote>
------=_Part_298_12911927.1351618850978--
------=_Part_297_16721085.1351618850977--