1 | <?php |
---|
2 | # -- BEGIN LICENSE BLOCK --------------------------------------- |
---|
3 | # |
---|
4 | # This file is part of Dotclear 2. |
---|
5 | # |
---|
6 | # Copyright (c) 2003-2010 Olivier Meunier & Association Dotclear |
---|
7 | # Licensed under the GPL version 2.0 license. |
---|
8 | # See LICENSE file or |
---|
9 | # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html |
---|
10 | # |
---|
11 | # -- END LICENSE BLOCK ----------------------------------------- |
---|
12 | |
---|
13 | require dirname(__FILE__).'/../inc/admin/prepend.php'; |
---|
14 | |
---|
15 | dcPage::check('usage,contentadmin'); |
---|
16 | |
---|
17 | dcPage::openPopup(__('Add a web media'), |
---|
18 | dcPage::jsOEmbed(). |
---|
19 | dcPage::jsLoad('js/tiny_mce/tiny_mce_popup.js'). |
---|
20 | dcPage::jsLoad('js/tiny_mce/plugins/dcControls/js/popup_web_media.js') |
---|
21 | ); |
---|
22 | |
---|
23 | $align = array( |
---|
24 | 'none' => array(__('None'),1), |
---|
25 | 'left' => array(__('Left'),0), |
---|
26 | 'right' => array(__('Right'),0), |
---|
27 | 'center' => array(__('Center'),0) |
---|
28 | ); |
---|
29 | $v_insert = array( |
---|
30 | 'media' => array(__('Full media'),1), |
---|
31 | 'thumbnail' => array(__('Media thumbnail'),0), |
---|
32 | 'link' => array(__('Media link'),0), |
---|
33 | ); |
---|
34 | |
---|
35 | echo |
---|
36 | '<h2>'.__('Add a web media').'</h2>'. |
---|
37 | |
---|
38 | '<form id="video-insert-form" action="#" method="get">'. |
---|
39 | '<p><label class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Source URL:').'</label>'. |
---|
40 | form::field('src',65,512,'').' '. |
---|
41 | '<a class="button" href="#" id="webmedia-insert-search">'.__('search').'</a> - '. |
---|
42 | '<strong><a class="button" href="#" id="webmedia-insert-ok">'.__('insert').'</a></strong> - '. |
---|
43 | '<a class="button reset" href="#" id="webmedia-insert-cancel">'.__('cancel').'</a></p>'. |
---|
44 | |
---|
45 | '<div class="two-cols" style="display:none;"><div class="col">'. |
---|
46 | '<p><label class="required"><abbr title="'.__('Width').'">*</abbr> '.__('Width:').'</label>'. |
---|
47 | form::field('width',35,4,'').'</p>'. |
---|
48 | '<p><label class="required"><abbr title="'.__('Height').'">*</abbr> '.__('Height:').'</label>'. |
---|
49 | form::field('height',35,4,'').'</label></p>'. |
---|
50 | '<p><label for="alt">'.__('Alternative text:').' '. |
---|
51 | form::field('alt',35,512,'').'</label></p>'. |
---|
52 | '<p><label for="title">'.__('Title:').' '. |
---|
53 | form::field('title',35,512,'').'</label></p>'. |
---|
54 | '<p><label class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Insertion').' '. |
---|
55 | '</label></p>'. |
---|
56 | '<p>'; |
---|
57 | foreach ($v_insert as $k => $v) { |
---|
58 | echo '<label class="classic">'. |
---|
59 | form::radio(array('insertion'),$k,$v[1]).' '.$v[0].'</label><br /> '; |
---|
60 | } |
---|
61 | echo |
---|
62 | '</p>'. |
---|
63 | '<p><label class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Alignment').' '. |
---|
64 | '</label></p>'. |
---|
65 | '<p>'; |
---|
66 | foreach ($align as $k => $v) { |
---|
67 | echo '<label class="classic">'. |
---|
68 | form::radio(array('alignment'),$k,$v[1]).' '.$v[0].'</label><br /> '; |
---|
69 | } |
---|
70 | echo |
---|
71 | '</p>'."\n". |
---|
72 | '</div><div class="col preview">'. |
---|
73 | '</div></div>'. |
---|
74 | '</form>'. |
---|
75 | |
---|
76 | '<script type="text/javascript">'."\n". |
---|
77 | '//<![CDATA['."\n". |
---|
78 | '$(\'input[name="src"]\').get(0).focus();'."\n". |
---|
79 | '//]]>'."\n". |
---|
80 | '</script>'."\n"; |
---|
81 | |
---|
82 | dcPage::closePopup(); |
---|
83 | |
---|
84 | ?> |
---|