Ignore:
Timestamp:
Jan 12, 2013, 3:13:08 PM (11 years ago)
Author:
mistic100
Message:
  • add webservices
  • add mail function
  • add admin list
  • add admin export function
  • try to deal with Gthumb+
  • activate multisize dropdown menu of collection page

TODO : use webservices instead of toggle_image.php

Location:
extensions/UserCollections/template
Files:
8 added
5 edited
5 moved

Legend:

Unmodified
Added
Removed
  • extensions/UserCollections/template/edit.tpl

    r19843 r20090  
    11{combine_css path=$USER_COLLEC_PATH|@cat:"template/style.css"}
    2 {combine_script id='jquery.zclip' path=$USER_COLLEC_PATH|@cat:"template/jquery.zclip.min.js"}
     2{combine_script id='jquery.zclip' path=$USER_COLLEC_PATH|@cat:"template/resources/jquery.zclip.min.js"}
    33{combine_script id='jquery.tipTip' path='themes/default/js/plugins/jquery.tipTip.minified.js'}
    44
     5{combine_script id='jquery.colorbox' load='footer' require='jquery' path='themes/default/js/plugins/jquery.colorbox.min.js'}
     6{combine_css path="themes/default/js/plugins/colorbox/style2/colorbox.css"}
     7
    58{footer_script require='jquery'}
    6 function bindZclip() {ldelim}
    7   jQuery("#publicURL .button").zclip({ldelim}
    8     path:'{$ROOT_URL}{$USER_COLLEC_PATH}template/ZeroClipboard.swf',
    9     copy:$("#publicURL .url").html(),
    10     afterCopy: function() {ldelim}
    11       $('.confirm').remove();
    12       $("#publicURL .url").select();
    13       $('<span class="confirm" style="display:none;">{'Copied'|@translate}</span>').appendTo("#publicURL")
    14         .fadeIn(400).delay(1000).fadeOut(400, function(){ldelim} $(this).remove(); });
    15     }
     9{if $user_collections.allow_public}
     10  function bindZclip() {ldelim}
     11    jQuery("#publicURL .button").zclip({ldelim}
     12      path:'{$ROOT_URL}{$USER_COLLEC_PATH}template/resources/ZeroClipboard.swf',
     13      copy:$("#publicURL .url").html(),
     14      afterCopy: function() {ldelim}
     15        $('.confirm').remove();
     16        $("#publicURL .url").select();
     17        $('<span class="confirm" style="display:none;">{'Copied'|@translate}</span>').appendTo("#publicURL")
     18          .fadeIn(400).delay(1000).fadeOut(400, function(){ldelim} $(this).remove(); });
     19      }
     20    });
     21    $("#publicURL .url").click(function() {ldelim}
     22      $(this).select();
     23    });
     24  }
     25
     26  jQuery("input[name='public']").change(function() {ldelim}
     27    jQuery("#publicURL").fadeToggle("fast");
     28    bindZclip();
    1629  });
    17   $("#publicURL .url").click(function() {ldelim}
    18     $(this).select();
     30  jQuery("#publicURL .button").tipTip({ldelim}
     31    delay: 0,
     32    defaultPosition: 'right'
    1933  });
    20 }
     34  {if $collection.PUBLIC}bindZclip();{/if}
     35{/if}
    2136
    22 jQuery("input[name='public']").change(function() {ldelim}
    23   jQuery("#publicURL").fadeToggle("fast");
    24   bindZclip();
    25 });
    26 jQuery("#publicURL .button").tipTip({ldelim}
    27   delay: 0,
    28   defaultPosition: 'right'
    29 });
    30 
    31 jQuery("#actions input").click(function() {ldelim}
    32   if (confirm("{'Are you sure?'|@translate}")) {ldelim}
    33     document.location.href = jQuery(this).data("href");
    34   }
    35   return false;
    36 });
    37 {if $collection.PUBLIC}bindZclip();{/if}
     37{if $collection.PUBLIC && $user_collections.allow_mails}
     38  $(window).load(function(){ldelim}
     39    $(".mail_colorbox_open").colorbox({ldelim}
     40      {if isset($uc_mail_errors)}open: true, transition:"none",{/if}
     41      inline:true
     42    });
     43    $(".mail_colorbox_close").click(function() {ldelim}
     44      $(".mail_colorbox_open").colorbox.close();
     45      return false;
     46    })
     47  });
     48  $("#mail_form").css('background-color', $("#the_page #content").css('background-color'));
     49{/if}
    3850{/footer_script}
    3951
     
    5668
    5769{if $collection}
     70{* <!-- edit collection -->*}
    5871<form action="{$F_ACTION}" method="post">
    5972<fieldset id="colProperties">
     
    6174 
    6275  <p class="title"><label for="name">{'Name'|@translate}</label></p>
    63   <p><input type="text" name="name" id="name" value="{$collection.NAME}" size="60"></p>
     76  <p><input type="text" name="name" id="name" value="{$collection.NAME|escape:html}" size="60"></p>
     77{if $user_collections.allow_public}
    6478  <p class="title">{'Public collection'|@translate}</p>
    6579  <p>
     
    6882    <span id="publicURL" {if not $collection.PUBLIC}style="display:none;"{/if}><span class="button" title="{'Copy to clipboard'|@translate}">&nbsp;</span><input type="text" class="url" value="{$collection.U_PUBLIC}" size="{$collection.U_PUBLIC|strlen}"></span>
    6983  </p>
     84{/if}
    7085  <p>
    7186    <input type="submit" name="save_col" value="{'Save'|@translate}">
     
    7590</form>
    7691
     92{* <!-- send collection by mail -->*}
     93{if $user_collections.allow_public && $user_collections.allow_mails}
     94<div style="display:none;">
     95  <form id="mail_form" action="{$F_ACTION}" method="post">
     96  {if isset($uc_mail_errors)}
     97    {assign var=errors value=$uc_mail_errors}
     98    {include file='infos_errors.tpl'}
     99  {/if}
    77100
    78 <form id="actions" style="text-align:center;">
    79 <input type="submit" data-href="{$collection.U_CLEAR}" value="{'Clear collection'|@translate}">
    80 <input type="submit" data-href="{$collection.U_DELETE}" value="{'Delete'|@translate}">
    81 </form>
     101    <table>
     102      <tr>
     103        <td class="title"><label for="sender_name">{'Your name'|@translate}</label></td>
     104        <td>
     105          <input type="text" name="sender_name" id="sender_name" size="40" value="{$contact.sender_name}">
     106        </td>
     107      </tr>
     108      <tr>
     109        <td class="title"><label for="sender_email">{'Your e-mail'|@translate}</label></td>
     110        <td>
     111          <input type="text" name="sender_email" id="sender_email" size="40" value="{$contact.sender_email}">
     112        </td>
     113      </tr>
     114      <tr>
     115        <td class="title"><label for="recipient_name">{'Recipient name'|@translate}</label></td>
     116        <td>
     117          <input type="text" name="recipient_name" id="recipient_name" size="40" value="{$contact.recipient_name}">
     118        </td>
     119      </tr>
     120      <tr>
     121        <td class="title"><label for="recipient_email">{'Recipient e-mail'|@translate}</label></td>
     122        <td>
     123          <input type="text" name="recipient_email" id="recipient_email" size="40" value="{$contact.recipient_email}">
     124        </td>
     125      </tr>
     126      <tr>
     127        <td class="title"><label for="nb_images">{'Number of images'|@translate}</label></td>
     128        <td>
     129          <select name="nb_images">
     130            <option value="2" {if $contact.nb_images==2}selected="selected"{/if}>2</option>
     131            <option value="4" {if $contact.nb_images==4}selected="selected"{/if}>4</option>
     132            <option value="8" {if $contact.nb_images==8}selected="selected"{/if}>8</option>
     133          </select>
     134        </td>
     135      </tr>
     136      <tr>
     137        <td class="title"><label for="message">{'Message (optional)'|@translate}</label></td>
     138        <td><textarea name="message" id="message" rows="6" style="width:350px;">{$contact.message}</textarea></td>
     139      </tr>
     140      <tr>
     141        <td class="title">&nbsp;</td>
     142        <td>
     143          <input class="submit" type="submit" name="send_mail" value="{'Send'|@translate}">
     144          <a class="mail_colorbox_close" href="#">{'Cancel'|@translate}</a>
     145          <input type="hidden" name="key" value="{$contact.KEY}" />
     146        </td>
     147      </tr>
     148    </table>
     149  </form>
     150</div>
     151{/if}
    82152
    83 
     153{* <!-- collection content -->*}
    84154{if $collection.NB_IMAGES > 0}
    85155<ul class="thumbnails" id="thumbnails">
  • extensions/UserCollections/template/style.css

    r17914 r20090  
    2929  #publicURL .button {
    3030    display:inline-block;
    31     background:#e7e7e7 url('link.png') center center no-repeat;
     31    background:#e7e7e7 url('resources/link.png') center center no-repeat;
    3232    width:25px;
    3333    height:20px;
     
    7373    }
    7474 
     75/* SEND BY MAIL */
     76#mail_form {
     77  width:540px;
     78  padding:10px;
     79}
     80  #mail_form table td {
     81    padding-bottom:5px;
     82    text-align:left;
     83  }
     84  #mail_form table td.title {
     85    font-weight:bold;
     86    text-align:right !important;
     87    padding-top:3px;
     88    vertical-align:top;
     89    width:120px;
     90  }
     91  #mail_form input[type="text"], #mail_form textarea, #mail_form select {
     92    border-radius:2px;
     93    padding:3px;
     94  }
    7595 
    7696/* TipTip CSS - Version 1.2 */
  • extensions/UserCollections/template/themes/default.tpl

    r17493 r20090  
    44
    55<div class="titrePage">
     6        <ul class="categoryActions">
     7  {if !empty($image_derivatives)}
     8                <li>{strip}<a id="derivativeSwitchLink" title="{'Photo sizes'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
     9                        <span class="pwg-icon pwg-icon-sizes">&nbsp;</span><span class="pwg-button-text">{'Photo sizes'|@translate}</span>
     10                </a>
     11                <div id="derivativeSwitchBox" class="switchBox">
     12                        <div class="switchBoxTitle">{'Photo sizes'|@translate}</div>
     13                        {foreach from=$image_derivatives item=image_derivative name=loop}{if !$smarty.foreach.loop.first}<br>{/if}
     14                        {if $image_derivative.SELECTED}
     15                        <span>&#x2714; </span>{$image_derivative.DISPLAY}
     16                        {else}
     17                        <span style="visibility:hidden">&#x2714; </span><a href="{$image_derivative.URL}" rel="nofollow">{$image_derivative.DISPLAY}</a>
     18                        {/if}
     19                        {/foreach}
     20                </div>
     21                {footer_script require='jquery'}{literal}
     22    jQuery("#derivativeSwitchLink").click(function() {
     23      var elt = jQuery("#derivativeSwitchBox");
     24      elt.css("left", Math.min( jQuery(this).offset().left, jQuery(window).width() - elt.outerWidth(true) - 5))
     25        .css("top", jQuery(this).offset().top + jQuery(this).outerHeight(true))
     26        .toggle();
     27    });
     28    jQuery("#derivativeSwitchBox").on("mouseleave", function() {
     29      jQuery(this).hide();
     30    });
     31                {/literal}{/footer_script}
     32                {/strip}</li>
     33  {/if}
     34
    635  {if !empty($COLLECTION_ACTIONS)}
    7         <ul class="categoryActions">
    836    {$COLLECTION_ACTIONS}
     37  {/if}
    938        </ul>
    10   {/if}
    1139
    1240  <h2>{$TITLE}</h2>
  • extensions/UserCollections/template/thumbnails.tpl

    r16688 r20090  
    11{combine_script id='jquery.colorbox' load='footer' require='jquery' path='themes/default/js/plugins/jquery.colorbox.min.js'}
    22{combine_css path="themes/default/js/plugins/colorbox/style2/colorbox.css"}
     3
    34{footer_script}
    45jQuery("a.preview-box").colorbox({ldelim}
  • extensions/UserCollections/template/thumbnails_css_js.tpl

    r17178 r20090  
    1717  }).done(function(msg) {ldelim}
    1818    if (msg == "true") {ldelim}
    19       $trigger.html('{'Remove from collection'|@translate}&nbsp;<img src="{$ROOT_URL}{$USER_COLLEC_PATH}template/image_delete.png" title="{'Remove from collection'|@translate}">');
     19      $trigger.html('{'Remove from collection'|@translate}&nbsp;<img src="{$ROOT_URL}{$USER_COLLEC_PATH}template/resources/image_delete.png" title="{'Remove from collection'|@translate}">');
    2020      jQuery(".nbImagesCollec").html(parseInt(jQuery(".nbImagesCollec").html()) +1);
    2121    } else if (msg == "false") {ldelim}
     
    2424      if (typeof batchdown_count != 'undefined') batchdown_count-=1;
    2525    {else}
    26       $trigger.html('{'Add to collection'|@translate}&nbsp;<img src="{$ROOT_URL}{$USER_COLLEC_PATH}template/image_add.png" title="{'Add to collection'|@translate}">');
     26      $trigger.html('{'Add to collection'|@translate}&nbsp;<img src="{$ROOT_URL}{$USER_COLLEC_PATH}template/resources/image_add.png" title="{'Add to collection'|@translate}">');
    2727    {/if}
    2828      jQuery(".nbImagesCollec").html(parseInt(jQuery(".nbImagesCollec").html()) -1);
Note: See TracChangeset for help on using the changeset viewer.