/
images.html.erb
91 lines (79 loc) · 2.1 KB
/
images.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<script type="text/javascript">
var upload_path = "<%=raw ckeditor_attachment_path(:image) %>";
function setUrl(url)
{
CKEDITOR.tools.callFunction(CKEditorFuncNum, url);
window.close();
}
function uploadButton(button)
{
var element = $('fj');
if (element.style.display == '')
{
element.style.display = 'none';
}
else
{
element.style.display = '';
}
}
window.onload = function()
{
init_swfupload();
var f = new FileThumb('qu');
var t = new ToolBar('nv');
var b1 = new Button('Upload New File', 'Upload', 'add.gif');
var b2 = new Button('Refresh', 'Refresh', 'refresh.gif');
b1.callback = uploadButton;
b2.callback = function(){ window.location.reload(); }
t.buttons.push(b1);
t.buttons.push(b2);
t.init();
}
</script>
<table width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="TB_ToolbarSet" id="nv"></td>
</tr>
<tr id="fj" style='display:none;'>
<td style="white-space: normal;" class="FCKUploadArea">
<div class="PopupTitle">
<span>Upload New Files</span>
</div>
<div id="cY">
<table cellspacing="0" cellpadding="0" style="padding: 10px;">
<tbody>
<tr>
<td>
<span id='spanButtonPlaceholder'></span>
<div id="divFileProgressContainer" style="clear:both;"></div>
<%= render :partial=>"swfupload" %>
</td>
</tr>
</tbody>
</table>
<div class="PopupButtons">
<div style="width: 100%;">
<table width="100%" cellspacing="0" cellpadding="0">
<tbody><tr>
<td width="100%"></td>
<td nowrap="nowrap">
<button onclick="uploadButton()" class="Button"><span ckf:lang="CancelBtn">Cancel</span></button>
</td>
</tr>
</tbody></table>
</div>
</div>
</div>
</td>
</tr>
<tr>
<td style="height: 100%;" id="qu">
<div style="overflow:auto; height:550px;" id='container'>
<%= render :partial => "asset", :collection => @images, :as => :asset %>
</div>
</td>
</tr>
</tbody>
</table>