quinta-feira, 7 de março de 2013

ColorBox lightbox plugin

ColorBox lightbox plugin
quarta-feira, 6 de Março de 2013 00:15

A lightweight customizable lightbox plugin
Fazer o download e extrair o .css, .js para as pastas respectivas, assim como a pasta "images" do exemplo que se pretende ter (exemplo: \example1\images\) para a pasta css (web/interface/themes/blueprint/css)
<<colorbox.css>>  (modificado)

(css/images/overlay.jpg)

clip_image001[6] web/interface/themes/blueprint/Search/list.tpl
{css media="screen, projection" filename="colorbox.css"}

(…)  <conteúdo do ficheiro> (…)

{literal}
    <script>
        jQuery(".iframePDF").colorbox({iframe:true, width:"968", height:"98%", close:"fechar [Esc]"});
        jQuery(".iframePage").colorbox({iframe:true, width:"95%", height:"95%", fastIframe:false, close:"fechar [Esc]"});
    </script>
{/literal}
{js filename="jquery.colorbox-min.js"}

clip_image001[8] web/interface/themes/blueprint/RecordDrivers/Index/result.tpl

{css media="screen, projection" filename="colorbox.css"}


            <spanclass="link_showHover_Result">
              {if $recordurl|stripos:'pdf'}PDF > <a href="{$recordurl|escape|rtrim}" Title='PDF: {$summTitle} [prima "Esc" para fechar esta janela]' class="iframePDF cboxElement fulltext">{translate text='Get full text'}</a>{else}{if $recordurl|stripos:'books_isbn'}ZIP > <a href={$recordurl} target=_new>e-book completo (pdf)</a>{else}<a href="{$recordurl}" Title='{$summTitle} [prima "Esc" para fechar esta janela]'class="iframePage cboxElement fulltext">{if $recordurl|stripos:'handle/10773'}{translate text='Access this record at RIA'}{elseif ($recordurl|stripos:'handle' || $recordurl|stripos:'dx.')}{translate text='View at publisher'}{else}{if $recordurl == $urldesc}{translate text='Get full text online'}{else}{$urldesc|escape}{/if}{/if}{/if}{/if}</a>
            </span>


NOTA: class > cboxElement : aparentemente não é necessário / não faz nada.


clip_image001[10] web/interface/themes/blueprint/RecordDrivers/Index/core.tpl (NÃO ESTÁ OK!):
{css media="screen, projection" filename="colorbox.css"}

(…)

{if $currentUrl|stripos:'.pdf'}PDF > <a href="{$currentUrl|escape|rtrim}" title="{$coreShortTitle}" class="iframePDF" target=_new>{translate text=$recordFormat[0]}</a>{else}{if $currentUrl|stripos:'dx.'} {translate text='View at publisher'} >{else} {if $currentUrl|stripos:'books_isbn'}PDF > <a href={$currentUrl} target=_new>e-book completo (zip)</a>{else} Editor > <a href="{$currentUrl|escape|rtrim}" title="{$coreShortTitle}" class="iframePage" target=_new>{translate text='View at publisher'}</a>{/if}{/if}{/if}<br/>

(…)

{literal}
    <script>
        jQuery(".iframePDF").colorbox({iframe:true, width:"968", height:"98%", close:"fechar [Esc]"});
        jQuery(".iframePage").colorbox({iframe:true, width:"95%", height:"95%", fastIframe:false, close:"fechar [Esc]"});
    </script>
{/literal}

{js filename="jquery.colorbox-min.js"} 
 <FEITO 06-03-2013 02:17 >


clip_image001[16]  <06-03-2013 21:16 -- após Focus Group dos Alunos Pós-Graduação>
Alterada a posição do texto / link de fechar da parte de baixo para o topo; legenda alinhada à direita.
clip_image002[4]clip_image003[4]
clip_image004[4]


clip_image001[18]  <06-03-2013 23:58 -- tirado das páginas individualmente, o que originava ser carregado várias vezes, por exemplo 10x na página de resultados e colocado na de layout (única) >

clip_image001[20] web/interface/themes/blueprint/layout.tpl
{css media="print" filename="print.css"}
<!--[if lt IE 8]><link rel="stylesheet" href="{$url}/interface/themes/blueprint/css/ie.css" type="text/css" media="screen, projection"><![endif]-->
{css media="screen, projection" filename="colorbox.css"}
{else}

(…)

           {* Load jQuery UI *}
           {js filename="jquery-ui-1.8.7.custom/js/jquery-ui-1.8.7.custom.min.js"}
{js filename="social-likes.min.js"}
{js filename="jquery.colorbox-min.js"}

(…)

    </script>
{literal}  
    <script>
      jQuery(document).ready(function () {
            jQuery(".iframePDF").colorbox({iframe:true, width:"968", height:"98%", close:"fechar [x]"});
            jQuery(".iframePage").colorbox({iframe:true, width:"95%", height:"95%", fastIframe:false, close:"fechar [x]"});
      });
    </script>
{/literal} 
    <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-4dbfda1546939581"></script>
   
  </head>

    --------------------------


clip_image001[22] web/interface/themes/blueprint/Search/Recommend/SideFacets_External.tpl
    <dl class="narrowList navmenu">
          <dt>{translate text='UA Subscrived Services'}</dt>
            <dd>* <a href=http://atoz.ebsco.com/Titles/SearchResults/10532?IsFromAdvancedSearch=True&resourceType=&SearchType=Contains&resourceTypeName=allTitles&{$searchIndex|replace:"AllFields":"GetResourcesBy=AllSearch"|replace:"Title":"GetResourcesBy=TitleNameSearch"|replace:"Author":"GetResourcesBy=AuthorSearch"|replace:"Subject":"GetResourcesBy=SubjectsSearch"|replace:"container_title":"resourceTypeName=journalsOnly&GetResourcesBy=TitleNameSearch"|replace:"ISN":"GetResourcesBy=IssnSearch"|replace:"tag":"GetResourcesBy=SubjectsSearch"}&Find={$lookfor|replace:" ":"%2B"|replace:'"':"&quot;" Title="A to Z -> {translate text=$searchIndex}: {$lookfor}" class="iframePage">{translate text='A to Z (journals & e-books)'}</a> <sup><font color=grey><small>1</small></font></sup></font></dd>
            <br />
            <dd><font color=grey><small>[1] Acesso ao documento / texto integral limitado por IP (UA[campus|VPN]/B-On)</small></font></dd>
            <br />
    </dl>
    <dl class="narrowList navmenu">
    <dt>{translate text='External Services'}</dt>
        <dd><font color=grey>[Sem garantia de acesso ao texto integral dos recursos]</font></dd>
        <dd>* <a href="javascript: void(0)" onClick="getLightboxexternalGSch('http://scholar.google.pt/scholar?sciui=1-----num=50-----{$searchIndex|replace:"AllFields":"as_q="|replace:"Title":"as_occt=title-----as_q="|replace:"Author":"q=autor%3A"|replace:"Subject":"as_q=&quot;"|replace:"container_title":"as_publication="|replace:"ISN":"as_q="}{$lookfor|replace:" ":"%2B"|replace:'"':"&quot;"}{if $searchIndex == "Subject"}&quot;{/if}','Google Scholar (Académico) -> {translate text=$searchIndex}: {$lookfor|replace:'"':"&quot;"}')">Google Scholar (Académico)</a></dd>
        <dd>* <a href={$path}/services/External/WoS.php?lookfor={$lookfor|replace:" ":"%2B"|replace:'"':"****"} Title="Web of Science -> {translate text='AllFields'}: {$lookfor}" class="iframePage">Web of Science</a> <sup><font color=grey><small>2</small></font></sup></dd>
        <dd>* <a href=http://www.scirus.com/srsapp/search?q={$lookfor|replace:" ":"%2B"|replace:'"':"&quot;"}&t=all&sort=0&g=s&co=and&cn={$searchIndex|replace:"AllFields":""|replace:"Title":"title"|replace:"Author":"author"|replace:"Subject":"keyword"|replace:"container_title":"journal"|replace:"ISN":"issn" Title="Scirus Scientific Information (Elsevier) -> {translate text=$searchIndex}: {$lookfor}" class="iframePage">Scirus Scientific Information</a></dd>   
        <br />
        <dd>&nbsp; <font color=grey><small>[2] {translate text='Search For'} {translate text='AllFields'}</small></font></dd>
       
    </dl>

Sem comentários:

Enviar um comentário