Dotclear

source: admin/popup_web_media.php @ 411:7735865d1ac0

Revision 411:7735865d1ac0, 2.8 KB checked in by Tomtom33 <tbouron@…>, 14 years ago (diff)

Improved editor popups/display/CSS

Line 
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
13require dirname(__FILE__).'/../inc/admin/prepend.php';
14
15dcPage::check('usage,contentadmin');
16
17dcPage::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
35echo
36'<h2>'.__('Add a web media').'</h2>'.
37
38'<p class="error" style="display: none;"></p>'.
39'<form id="video-insert-form" action="#" method="get">'.
40'<p><label class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Source URL:').'</label>'.
41form::field('src',65,512,'').'&nbsp;'.
42'<a class="button" href="#" id="webmedia-insert-search">'.__('preview').'</a>'.
43'<a class="button insert" href="#" id="webmedia-insert-ok">'.__('insert').'</a>'.
44'<a class="button cancel" href="#" id="webmedia-insert-cancel">'.__('cancel').'</a></p>'.
45
46'<div class="two-cols" style="display:none;"><div class="col">'.
47'<p><label class="required"><abbr title="'.__('Width').'">*</abbr> '.__('Width:').'</label>'.
48form::field('width',35,4,'').'</p>'.
49'<p><label class="required"><abbr title="'.__('Height').'">*</abbr> '.__('Height:').'</label>'.
50form::field('height',35,4,'').'</label></p>'.
51'<p><label for="alt">'.__('Alternative text:').' '.
52form::field('alt',35,512,'').'</label></p>'.
53'<p><label for="title">'.__('Title:').' '.
54form::field('title',35,512,'').'</label></p>'.
55'<p><label class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Insertion').' '.
56'</label></p>'.
57'<p>';
58foreach ($v_insert as $k => $v) {
59     echo '<label class="classic">'.
60     form::radio(array('insertion'),$k,$v[1]).' '.$v[0].'</label><br /> ';
61}
62echo
63'</p>'.
64'<p><label class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Alignment').' '.
65'</label></p>'.
66'<p>';
67foreach ($align as $k => $v) {
68     echo '<label class="classic">'.
69     form::radio(array('alignment'),$k,$v[1]).' '.$v[0].'</label><br /> ';
70}
71echo
72'</p>'."\n".
73'</div><div class="col preview">'.
74'</div></div>'.
75'</form>'.
76
77'<script type="text/javascript">'."\n".
78'//<![CDATA['."\n".
79'$(\'input[name="src"]\').get(0).focus();'."\n".
80'//]]>'."\n".
81'</script>'."\n";
82
83dcPage::closePopup();
84
85?>
Note: See TracBrowser for help on using the repository browser.

Sites map