source: extensions/UserCollections/template/edit.tpl @ 17914

Last change on this file since 17914 was 17914, checked in by mistic100, 12 years ago

display public url in a input with auto-select

File size: 3.4 KB
Line 
1{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"}
3{combine_script id='jquery.tipTip' path='themes/default/js/plugins/jquery.tipTip.minified.js'}
4
5{footer_script require='jquery'}
6function bindZclip() {ldelim}
7  jQuery("#publicURL .button").zclip({ldelim}
8    path:'{$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    }
16  });
17  $("#publicURL .url").click(function() {ldelim}
18    $(this).select();
19  });
20}
21
22jQuery("input[name='public']").change(function() {ldelim}
23  jQuery("#publicURL").fadeToggle("fast");
24  bindZclip();
25});
26jQuery("#publicURL .button").tipTip({ldelim}
27  delay: 0,
28  defaultPosition: 'right'
29});
30
31jQuery("#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}
38{/footer_script}
39
40
41{* <!-- Menubar & titrePage --> *}
42{if $themeconf.name == "stripped" or $themeconf.parent == "stripped"}
43  {include file=$USER_COLLEC_ABS_PATH|@cat:'template/themes/stripped.tpl'}
44  {assign var="clear" value="true"}
45{elseif $themeconf.name == "simple-grey" or $themeconf.parent == "simple"}
46  {include file=$USER_COLLEC_ABS_PATH|@cat:'template/themes/simple.tpl'}
47  {assign var="clear" value="true"}
48{else}
49  {include file=$USER_COLLEC_ABS_PATH|@cat:'template/themes/default.tpl'}
50{/if}
51
52{if isset($errors) or not empty($infos)}
53{include file='infos_errors.tpl'}
54{/if}
55
56
57{if $collection}
58<form action="{$F_ACTION}" method="post">
59<fieldset id="colProperties">
60  <legend>{'Properties'|@translate}</legend>
61 
62  <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>
64  <p class="title">{'Public collection'|@translate}</p>
65  <p>
66    <label><input type="radio" name="public" value="0" {if not $collection.PUBLIC}checked="checked"{/if}> {'No'|@translate}</label>
67    <label><input type="radio" name="public" value="1" {if $collection.PUBLIC}checked="checked"{/if}> {'Yes'|@translate}</label>
68    <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>
69  </p>
70  <p>
71    <input type="submit" name="save_col" value="{'Save'|@translate}">
72    <a href="{$U_LIST}" rel="nofollow">{'Return to collections list'|@translate}</a>
73  </p>
74</fieldset>
75</form>
76
77
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>
82
83
84{if $collection.NB_IMAGES > 0}
85<ul class="thumbnails" id="thumbnails">
86{$THUMBNAILS}
87</ul>
88{else}
89<p><i>{'This collection is empty'|@translate}</i></p>
90{/if}
91
92{if !empty($navbar)}{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
93{/if}
94
95{if $clear}<div style="clear: both;"></div>
96</div>{/if}
97</div>{* <!-- content --> *}
Note: See TracBrowser for help on using the repository browser.