[PLUGINS] +crayons
[lhc/web/clavette_www.git] / www / plugins / crayons / modeles / uploader_liste.html
1 <style>
2 .uploader {border:solid red 1px;}
3 .uploader.hover {border:dotted red 1px;}
4 .uploader li {border solid transparent 3px; padding-left:10px}
5 .uploader li.loading {border:dotted red 3px;}
6 .uploader li.ok {border:solid green 3px;}
7
8 #uploader#ID_ARTICLE {
9 position: absolute;
10 top: 10px;
11 right: -180px;
12 width: 170px;
13 height: 100%;
14 max-height: 600px;
15 overflow: auto;
16 overflow-x: hidden;
17 background: #eee;
18 border: solid #ccc 1px;
19 }
20
21 #uploader#ID_ARTICLE.ferme {
22 width: 30px; height: 15px; overflow-x:hide;overflow-y:hide;overflow:hide;
23 }
24 </style>
25
26
27 <div id="uploader#ID_ARTICLE" class="ferme">
28 <i>Glissez un document ou une image dans cette zone pour l'ajouter à l'article.</i>
29
30 <ul id="uploader_liste" >
31 <BOUCLE_d(DOCUMENTS){tous}{id_article}{!par id_document}{0,10}>
32 <li>#MODELE{uploader_item,id_document}</li>
33 </BOUCLE_d>
34 [<li class="pagination">(#PAGINATION)</li>]
35 </B_d>
36 </ul>
37
38
39 </div>
40
41 <!--
42 /*
43
44 $(function(){
45 var fileTemplate="<div id=\"{{id}}\">";
46 fileTemplate+="<div class=\"progressbar\"></div>";
47 fileTemplate+="<div class=\"preview\"></div>";
48 fileTemplate+="<div class=\"filename\">{{filename}}</div>";
49 fileTemplate+="</div>";
50 function slugify(text){
51 text=text.replace(/[^-a-zA-Z0-9,&\s]+/ig,'');
52 text=text.replace(/-/gi,"_");
53 text=text.replace(/\s/gi,"-");
54 return text;
55 }
56
57 $("#dropbox")
58 .html5Uploader({
59 onClientLoadStart:function(e,file){
60 var upload=$("#upload");
61 if(upload.is(":hidden")){
62 upload.show();
63 }
64 upload.append(
65 fileTemplate
66 .replace(/{{id}}/g, slugify(file.name))
67 .replace(/{{filename}}/g,file.name)
68 );
69 },
70 onClientLoad:function(e,file){
71 $("#"+slugify(file.name))
72 .find(".preview")
73 .append("<img src=\""+e.target.result+"\" alt=\"\">");
74 },
75 onServerLoadStart:function(e,file){
76 $("#"+slugify(file.name))
77 .find(".progressbar")
78 .progressbar({value:0});
79 },
80 onServerProgress:function(e,file){
81 if(e.lengthComputable){
82 var percentComplete=(e.loaded/e.total)*100;
83 $("#"+slugify(file.name))
84 .find(".progressbar")
85 .progressbar({value:percentComplete});
86 }
87 },
88 onServerLoad:function(e,file){
89 $("#"+slugify(file.name))
90 .find(".progressbar")
91 .progressbar({value:100});
92 }
93 });
94
95 $(".download")
96 .mousedown(function(){
97 $(this).css({
98 "background-image":"url('images/download-clicked.png')"
99 });
100 })
101 .mouseup(function(){
102 $(this).css({
103 "background-image":"url('images/download.png')"
104 });
105 });
106
107
108 });
109
110
111 */
112 -->