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

File:
1 edited

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">
Note: See TracChangeset for help on using the changeset viewer.