Dotclear

source: admin/popup_link.php @ 2749:993aebff97bb

Revision 2749:993aebff97bb, 1.9 KB checked in by Nicolas <nikrou77@…>, 11 years ago (diff)

Fix call of javascript of all editors on media_item page but also popup_link and popup_posts
Closes #1983

Line 
1<?php
2# -- BEGIN LICENSE BLOCK ---------------------------------------
3#
4# This file is part of Dotclear 2.
5#
6# Copyright (c) 2003-2013 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
17$href = !empty($_GET['href']) ? $_GET['href'] : '';
18$hreflang = !empty($_GET['hreflang']) ? $_GET['hreflang'] : '';
19$title = !empty($_GET['title']) ? $_GET['title'] : '';
20
21// perhaps better to put active editor in session
22$post_format = $core->auth->getOption('post_format');
23$post_editor = $core->auth->getOption('editor');
24
25dcPage::openPopup(__('Add a link'),$core->callBehavior('adminPopupLink', $post_editor[$post_format]));
26
27echo '<h2 class="page-title">'.__('Add a link').'</h2>';
28
29# Languages combo
30$rs = $core->blog->getLangs(array('order'=>'asc'));
31$lang_combo = dcAdminCombos::getLangsCombo($rs,true);
32
33echo
34'<form id="link-insert-form" action="#" method="get">'.
35'<p><label class="required" for="href"><abbr title="'.__('Required field').'">*</abbr> '.__('Link URL:').'</label> '.
36form::field('href',35,512,html::escapeHTML($href)).'</p>'.
37'<p><label for="title">'.__('Link title:').'</label> '.
38form::field('title',35,512,html::escapeHTML($title)).'</p>'.
39'<p><label for="hreflang">'.__('Link language:').'</label> '.
40form::combo('hreflang',$lang_combo,$hreflang).
41'</p>'.
42
43'</form>'.
44
45'<p><a class="button reset" href="#" id="link-insert-cancel">'.__('Cancel').'</a> - '.
46'<strong><a class="button" href="#" id="link-insert-ok">'.__('Insert').'</a></strong></p>'."\n".
47
48'<script type="text/javascript">'."\n".
49'//<![CDATA['."\n".
50'$(\'input[name="href"]\').get(0).focus();'."\n".
51'//]]>'."\n".
52'</script>'."\n";
53
54dcPage::closePopup();
Note: See TracBrowser for help on using the repository browser.

Sites map