mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
Merge pull request #1207 from jygaulier/THESAURUS_CHROME
removed "showmodaldialog(...)" from javascript (removed from chrome)
This commit is contained in:
@@ -40,10 +40,8 @@ class Thesaurus implements ControllerProviderInterface
|
|||||||
$controllers->match('linkfield2.php', $this->call('linkFieldStep2'));
|
$controllers->match('linkfield2.php', $this->call('linkFieldStep2'));
|
||||||
$controllers->match('linkfield3.php', $this->call('linkFieldStep3'));
|
$controllers->match('linkfield3.php', $this->call('linkFieldStep3'));
|
||||||
$controllers->match('loadth.php', $this->call('loadThesaurus'))->bind('thesaurus_loadth');
|
$controllers->match('loadth.php', $this->call('loadThesaurus'))->bind('thesaurus_loadth');
|
||||||
$controllers->match('newsy_dlg.php', $this->call('newSynonymDialog'));
|
|
||||||
$controllers->match('newterm.php', $this->call('newTerm'));
|
$controllers->match('newterm.php', $this->call('newTerm'));
|
||||||
$controllers->match('properties.php', $this->call('properties'));
|
$controllers->match('properties.php', $this->call('properties'));
|
||||||
$controllers->match('search.php', $this->call('search'));
|
|
||||||
$controllers->match('thesaurus.php', $this->call('thesaurus'))->bind('thesaurus_thesaurus');
|
$controllers->match('thesaurus.php', $this->call('thesaurus'))->bind('thesaurus_thesaurus');
|
||||||
|
|
||||||
$controllers->match('xmlhttp/accept.x.php', $this->call('acceptXml'));
|
$controllers->match('xmlhttp/accept.x.php', $this->call('acceptXml'));
|
||||||
@@ -1121,23 +1119,6 @@ class Thesaurus implements ControllerProviderInterface
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function newSynonymDialog(Application $app, Request $request)
|
|
||||||
{
|
|
||||||
$languages = array();
|
|
||||||
|
|
||||||
foreach ($app['locales.available'] as $lng_code => $lng) {
|
|
||||||
$lng_code = explode('_', $lng_code);
|
|
||||||
$languages[$lng_code[0]] = $lng;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $app['twig']->render('thesaurus/new-synonym-dialog.html.twig', array(
|
|
||||||
'piv' => $request->get('piv'),
|
|
||||||
'typ' => $request->get('typ'),
|
|
||||||
'languages' => $languages,
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public function newTerm(Application $app, Request $request)
|
public function newTerm(Application $app, Request $request)
|
||||||
{
|
{
|
||||||
list($term, $context) = $this->splitTermAndContext($request->get("t"));
|
list($term, $context) = $this->splitTermAndContext($request->get("t"));
|
||||||
@@ -1220,11 +1201,6 @@ class Thesaurus implements ControllerProviderInterface
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function search(Application $app, Request $request)
|
|
||||||
{
|
|
||||||
return $app['twig']->render('thesaurus/search.html.twig');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function thesaurus(Application $app, Request $request)
|
public function thesaurus(Application $app, Request $request)
|
||||||
{
|
{
|
||||||
$flags = $jsFlags = array();
|
$flags = $jsFlags = array();
|
||||||
|
@@ -1,86 +0,0 @@
|
|||||||
{% if 'TS' == typ %}
|
|
||||||
{% set title = 'thesaurus:: Nouveau terme' | trans %}
|
|
||||||
{% set label = 'thesaurus:: terme' | trans %}
|
|
||||||
{% elseif 'SY' == typ %}
|
|
||||||
{% set title = 'thesaurus:: Nouveau synonyme' | trans %}
|
|
||||||
{% set label = 'thesaurus:: synonyme' | trans %}
|
|
||||||
{% else %}
|
|
||||||
{% set title = '' %}
|
|
||||||
{% set label = '' %}
|
|
||||||
{% endif %}
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
||||||
<html lang="{{ app['locale.I18n'] }}">
|
|
||||||
<head>
|
|
||||||
<title>{{ title }}</title>
|
|
||||||
|
|
||||||
<link REL="stylesheet" TYPE="text/css" href="{{ path('minifier', { 'f' : 'skins/thesaurus/thesaurus.css' }) }}" />
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
|
||||||
self.returValue = null;
|
|
||||||
function clkBut(button)
|
|
||||||
{
|
|
||||||
switch(button)
|
|
||||||
{
|
|
||||||
case "submit":
|
|
||||||
t = document.forms[0].term.value;
|
|
||||||
k = document.forms[0].context.value;
|
|
||||||
if(k != "")
|
|
||||||
t += " ("+k+")";
|
|
||||||
self.returnValue = {"t":t, "lng":null };
|
|
||||||
for(i=0; i<(n=document.getElementsByName("lng")).length; i++)
|
|
||||||
{
|
|
||||||
if(n[i].checked)
|
|
||||||
{
|
|
||||||
self.returnValue.lng = n[i].value;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
self.close();
|
|
||||||
break;
|
|
||||||
case "cancel":
|
|
||||||
self.close();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body class="dialog" onload="self.document.forms[0].term.focus();">
|
|
||||||
<br/>
|
|
||||||
<form onsubmit="return(false);">
|
|
||||||
<table cellpadding="0" cellspacing="0" border="0">
|
|
||||||
<tr>
|
|
||||||
<td style="text-align:right; width:80px;">{{ label }} : </td>
|
|
||||||
<td></td>
|
|
||||||
<td><input type="text" style="width:250px;" name="term"></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td style="text-align:right">{% trans 'thesaurus:: contexte' %} : </td>
|
|
||||||
<td><b>(</b> </td>
|
|
||||||
<td><input type="text" style="width:250px;" name="context"> <b>)</b></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td valign="bottom" style="text-align:right">{% trans 'phraseanet:: language' %} : </td>
|
|
||||||
<td></td>
|
|
||||||
<td valign="bottom">
|
|
||||||
{% for code, language in languages %}
|
|
||||||
<span style="display:inline-block">
|
|
||||||
<input type="radio" {% if code == piv %}checked{% endif %} name="lng" value="{{ code }}" id="lng_{{ code }}">
|
|
||||||
<label for="lng_{{ code }}"><img src="/skins/lng/{{ code }}_flag_18.gif" />({{ language }})</label>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
{% endfor %}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<br/>
|
|
||||||
<div style="position:absolute; left:0px; bottom:0px; width:100%; text-align:center">
|
|
||||||
<input type="button" style="width:80px;" id="cancel_button" value="{% trans 'boutton::annuler' %}" onclick="clkBut('cancel');" style="width:80px">
|
|
||||||
|
|
||||||
<input type="button" style="width:80px;" id="submit_button" value="{% trans 'boutton::valider' %}" onclick="clkBut('submit');" style="width:80px">
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@@ -47,7 +47,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="menu" id="syMenu" style="z-index:50">
|
<div class="menu" id="syMenu" style="z-index:50">
|
||||||
<a href="javascript:void(0)" id="delete_sy">{% trans 'thesaurus::menu: supprimer' %}</a>
|
<a href="javascript:void(0)" id="delete_sy">{% trans 'thesaurus::menu: supprimer' %}</a>
|
||||||
<a href="javascript:void(0)" id="replace_sy" class="disabled">{% trans 'thesaurus:: remplacer' %}</a>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style='text-align:right'>
|
<div style='text-align:right'>
|
||||||
@@ -193,14 +192,6 @@
|
|||||||
document.getElementById("delete_sy").className = "";
|
document.getElementById("delete_sy").className = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// si on ne connait pas encore le client mais que start est ouvert, on lui demande
|
|
||||||
// if(!opener.wClient && opener.opener.wClient)
|
|
||||||
// opener.wClient = opener.opener.wClient;
|
|
||||||
// si on connait le client et qu'on peut s'en servir pour chercher, on active l'option dans le menu
|
|
||||||
// if(opener.wClient && opener.wClient.externQuery)
|
|
||||||
// document.getElementById("searchcli_sy").className = "";
|
|
||||||
// else
|
|
||||||
// document.getElementById("searchcli_sy").className = "disabled";
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -250,30 +241,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "searchcli_sy": // cbParm = objet 'TR'
|
|
||||||
url = "xmlhttp/getsy.x.php";
|
|
||||||
url += "?bid={{ bid | url_encode }}";
|
|
||||||
url += "&id=" + cbParm.id.substr(4);
|
|
||||||
url += "&typ={{ typ | url_encode }}";
|
|
||||||
ret = loadXMLDoc(url, null, true);
|
|
||||||
t = ret.getElementsByTagName("sy").item(0).getAttribute("t");
|
|
||||||
|
|
||||||
if(opener.wClient && opener.wClient.externQuery)
|
|
||||||
{
|
|
||||||
opener.wClient.focus();
|
|
||||||
opener.wClient.externQuery(opener.currentBaseId, t);
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
case "replace_sy":
|
|
||||||
url = "replace.php";
|
|
||||||
url += "?bid={{ bid }}";
|
|
||||||
url += "&piv={{ piv }}";
|
|
||||||
url += "&pid={{ id }}"
|
|
||||||
url += "&id=" + o.id.substr(4);
|
|
||||||
url += "&typ={{ typ | url_encode }}";
|
|
||||||
w = window.open(url, "REPLACE", "directories=no, height=300, width=500, location=no, menubar=no, resizable=yes, scrollbars=yes, status=no, toolbar=no");
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,65 +0,0 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
||||||
<html lang="{{ app['locale.I18n'] }}">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
||||||
<title>{% trans 'Chercher' %}</title>
|
|
||||||
<link REL="stylesheet" TYPE="text/css" href="{{ path('minifier', { 'f' : 'skins/thesaurus/thesaurus.css' }) }}" />
|
|
||||||
<script type="text/javascript">
|
|
||||||
function clkBut(button)
|
|
||||||
{
|
|
||||||
switch(button)
|
|
||||||
{
|
|
||||||
case "submit":
|
|
||||||
m = null;
|
|
||||||
for(i=0; !m && document.forms[0].m[i]; i++)
|
|
||||||
m = document.forms[0].m[i].checked ? document.forms[0].m[i].value : null;
|
|
||||||
self.returnValue = { t:document.forms[0].t.value, method:m };
|
|
||||||
self.close();
|
|
||||||
break;
|
|
||||||
case "cancel":
|
|
||||||
self.returnValue = null;
|
|
||||||
self.close();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function loaded()
|
|
||||||
{
|
|
||||||
document.forms[0].t.focus();
|
|
||||||
}
|
|
||||||
function ckis()
|
|
||||||
{
|
|
||||||
document.getElementById("submit_button").disabled = document.forms[0].t.value=="";
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
<body onload="loaded();" class="dialog">
|
|
||||||
<center>
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
<form onsubmit="clkBut('submit');return(false);">
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td>{% trans 'thesaurus:: le terme' %}</td>
|
|
||||||
<td><input type="radio" name="m" value="equal">{% trans 'thesaurus:: est egal a ' %}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td />
|
|
||||||
<td><input type="radio" checked name="m" value="begins">{% trans 'thesaurus:: commence par' %}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td />
|
|
||||||
<td><input type="radio" name="m" value="contains">{% trans 'thesaurus:: contient' %}</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<br/>
|
|
||||||
<input type="text" name="t" value="" style="width:200px" onkeyup="ckis();return(true);">
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
<input type="button" id="cancel_button" value="{% trans 'boutton::annuler' %}" onclick="clkBut('cancel');" style="width:80px;">
|
|
||||||
|
|
||||||
<input type="button" id="submit_button" value="{% trans 'boutton::chercher' %}" onclick="clkBut('submit');" disabled style="width:80px;">
|
|
||||||
</form>
|
|
||||||
</center>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@@ -9,6 +9,8 @@
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<link REL="stylesheet" TYPE="text/css" href="{{ path('minifier', { 'f' : 'include/jslibs/jquery-ui-1.10.3/css/ui-lightness/jquery-ui-1.10.3.custom.css' }) }}" />
|
||||||
<link REL="stylesheet" TYPE="text/css" href="{{ path('minifier', { 'f' : 'skins/thesaurus/thesaurus.css' }) }}" />
|
<link REL="stylesheet" TYPE="text/css" href="{{ path('minifier', { 'f' : 'skins/thesaurus/thesaurus.css' }) }}" />
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var p4 = {};
|
var p4 = {};
|
||||||
@@ -68,6 +70,18 @@
|
|||||||
|
|
||||||
f.target = "IFR0";
|
f.target = "IFR0";
|
||||||
f.submit();
|
f.submit();
|
||||||
|
|
||||||
|
$("#SEARCH_DLG").dialog({
|
||||||
|
modal: true,
|
||||||
|
title: "{% trans 'Chercher' %}",
|
||||||
|
autoOpen:false
|
||||||
|
});
|
||||||
|
$("#NEWSY_DLG").dialog({
|
||||||
|
modal: true,
|
||||||
|
title: "???",
|
||||||
|
autoOpen:false,
|
||||||
|
width:400
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function chgCkShowRejected()
|
function chgCkShowRejected()
|
||||||
@@ -223,6 +237,60 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- ------------------------------ the "search" dialog --------------------------- -->
|
||||||
|
<div id="SEARCH_DLG">
|
||||||
|
<form>
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td>{% trans 'thesaurus:: le terme' %}</td>
|
||||||
|
<td><input type="radio" name="m" value="equal">{% trans 'thesaurus:: est egal a ' %}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td />
|
||||||
|
<td><input type="radio" checked name="m" value="begins">{% trans 'thesaurus:: commence par' %}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td />
|
||||||
|
<td><input type="radio" name="m" value="contains">{% trans 'thesaurus:: contient' %}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br/>
|
||||||
|
<input type="text" name="t" value="" style="width:200px;" autofocus>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<!-- ------------------------------ end "search" dialog --------------------------- -->
|
||||||
|
|
||||||
|
<!-- ------------------------ the "new term/synonym" dialog ----------------------- -->
|
||||||
|
<div id="NEWSY_DLG">
|
||||||
|
<table cellpadding="0" cellspacing="0" border="0">
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right; width:80px;"><span class="label"></span> : </td>
|
||||||
|
<td></td>
|
||||||
|
<td><input type="text" style="width:250px;" name="term"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:right">{% trans 'thesaurus:: contexte' %} : </td>
|
||||||
|
<td><b>(</b> </td>
|
||||||
|
<td><input type="text" style="width:250px;" name="context"> <b>)</b></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="bottom" style="text-align:right">{% trans 'phraseanet:: language' %} : </td>
|
||||||
|
<td></td>
|
||||||
|
<td valign="bottom">
|
||||||
|
{% for code, language in flags %}
|
||||||
|
<span style="display:inline-block">
|
||||||
|
<input type="radio" {% if code == piv %}checked{% endif %} name="lng" value="{{ code }}" id="lng_{{ code }}">
|
||||||
|
<label for="lng_{{ code }}"><img src="/skins/lng/{{ code }}_flag_18.gif" />({{ language }})</label>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
{% endfor %}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<!-- ------------------------- end "new term/synonym" dialog ---------------------- -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
@@ -232,11 +300,13 @@
|
|||||||
<div id="clipboard" style="position:absolute; top:0px; left:0px; z-index:99"> </div>
|
<div id="clipboard" style="position:absolute; top:0px; left:0px; z-index:99"> </div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<iframe src="about:blank" name="IFRsave" id="IFRsave" style="visibility:hidden; ; position:absolute; top:0px; left:5px; height:50px; width:50px; overflow:scroll"></iframe>
|
<iframe src="about:blank" name="IFRsave" id="IFRsave" style="visibility:hidden; ; position:absolute; top:0px; left:5px; height:50px; width:50px; overflow:scroll"></iframe>
|
||||||
<iframe src="about:blank" name="IFR0" id="IFR0" style="visibility:hidden; ; position:absolute; top:0px; left:400px; height:50px; width:50px; overflow:scroll"></iframe>
|
<iframe src="about:blank" name="IFR0" id="IFR0" style="visibility:hidden; ; position:absolute; top:0px; left:400px; height:50px; width:50px; overflow:scroll"></iframe>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
|
||||||
document.body.oncontextmenu = function(){
|
document.body.oncontextmenu = function(){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -543,33 +613,46 @@
|
|||||||
url += "&piv={{ piv }}";
|
url += "&piv={{ piv }}";
|
||||||
url += "&id=" + o.id.substr(4);
|
url += "&id=" + o.id.substr(4);
|
||||||
url += "&typ=CT";
|
url += "&typ=CT";
|
||||||
url += "&dlg=1";
|
|
||||||
ret = window.showModalDialog(url, myObj, "dialogHeight:340px; dialogWidth:500px; center:yes; help:no; resizable:no; scroll:no; status:no; unadorned:yes");
|
w = window.open(url, "PROPERTIES", "directories=no, height=340, width=500, location=no, menubar=no, resizable=yes, scrollbars=no, status=no, toolbar=no");
|
||||||
break;
|
break;
|
||||||
case "kcterm_search":
|
case "kcterm_search":
|
||||||
ret = window.showModalDialog("search.php?dlg=1", null, "dialogHeight:240px; dialogWidth:300px; center:yes; help:no; resizable:yes; scroll:no; status:no; unadorned:yes");
|
$("#SEARCH_DLG").dialog("option", "buttons",
|
||||||
if(ret && ret.t != "")
|
[
|
||||||
{
|
{
|
||||||
url = "/thesaurus/xmlhttp/openbranches.x.php";
|
text:"{% trans 'boutton::annuler' %}",
|
||||||
parms = "bid={{ bid }}";
|
click: function() {
|
||||||
parms += "&id=" + cbParm.id.substr(4);
|
$(this).dialog("close");
|
||||||
parms += "&typ=CT";
|
}
|
||||||
parms += "&method=" + ret.method;
|
} ,
|
||||||
parms += "&t=" + encodeURIComponent(ret.t);
|
{
|
||||||
//alert(url + "?" + parms);
|
text:"{% trans 'boutton::chercher' %}",
|
||||||
|
click:function() {
|
||||||
ret = loadXMLDoc(url, parms, true);
|
var zdialog = $(this);
|
||||||
// alert(ret);
|
var nid = cbParm.id.substr(4).replace(".", "\\.", "g");
|
||||||
thb = document.getElementById("THB_" + cbParm.id.substr(4));
|
$("#THB_" + nid).empty();
|
||||||
|
$.post(
|
||||||
ts = ret.getElementsByTagName("html");
|
"/thesaurus/xmlhttp/openbranches.x.php",
|
||||||
if(ts.length==1)
|
{
|
||||||
{
|
bid: {{ bid }},
|
||||||
replaceContent(thb, ts.item(0));
|
id: cbParm.id.substr(4),
|
||||||
thb.className = "hb";
|
typ: "CT",
|
||||||
document.getElementById("THP_" + cbParm.id.substr(4)).innerText="...";
|
method: zdialog.find("[name=m]:checked").val(),
|
||||||
}
|
t: zdialog.find("[name=t]").val()
|
||||||
}
|
},
|
||||||
|
function(data, textStatus, jqXHR) {
|
||||||
|
var ts = $(data).find("html");
|
||||||
|
$("#THB_" + nid).html(ts.html()).removeClass().addClass("hb");
|
||||||
|
$("#THP_" + nid).text("...");
|
||||||
|
zdialog.dialog("close");
|
||||||
|
},
|
||||||
|
"xml"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
);
|
||||||
|
$("#SEARCH_DLG").dialog("open");
|
||||||
break;
|
break;
|
||||||
case "kcterm_export":
|
case "kcterm_export":
|
||||||
var myObj = { "win":window };
|
var myObj = { "win":window };
|
||||||
@@ -639,8 +722,8 @@
|
|||||||
url += "&piv={{ piv }}";
|
url += "&piv={{ piv }}";
|
||||||
url += "&id=" + o.id.substr(4);
|
url += "&id=" + o.id.substr(4);
|
||||||
url += "&typ=CT";
|
url += "&typ=CT";
|
||||||
url += "&dlg=1";
|
|
||||||
ret = window.showModalDialog(url, myObj, "dialogHeight:340px; dialogWidth:500px; center:yes; help:no; resizable:no; scroll:no; status:no; unadorned:yes");
|
w = window.open(url, "PROPERTIES", "directories=no, height=340, width=500, location=no, menubar=no, resizable=yes, scrollbars=no, status=no, toolbar=no");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -926,45 +1009,51 @@
|
|||||||
switch(menuelem_id)
|
switch(menuelem_id)
|
||||||
{
|
{
|
||||||
case "kterm_newts": // nouveau terme specifique
|
case "kterm_newts": // nouveau terme specifique
|
||||||
var myObj = { "win":window };
|
case "kterm_newsy": // nouveau synonyme
|
||||||
url = "newsy_dlg.php?piv={{ piv }}&typ=TS";
|
var typ = menuelem_id=="kterm_newts" ? "TS" : "SY";
|
||||||
|
$("#NEWSY_DLG .label").html(
|
||||||
|
typ=="TS" ? "{% trans 'thesaurus:: terme' %}" : "{% trans 'thesaurus:: synonyme' %}"
|
||||||
|
);
|
||||||
|
$("#NEWSY_DLG").dialog("option", "title", typ=="TS" ? "{% trans 'thesaurus:: Nouveau terme' %}" : "{% trans 'thesaurus:: Nouveau synonyme' %}");
|
||||||
|
$("#NEWSY_DLG").dialog("option", "buttons",
|
||||||
|
[
|
||||||
|
{
|
||||||
|
text:"{% trans 'boutton::annuler' %}",
|
||||||
|
click: function() {
|
||||||
|
$(this).dialog("close");
|
||||||
|
}
|
||||||
|
} ,
|
||||||
|
{
|
||||||
|
text:"{% trans 'boutton::valider' %}",
|
||||||
|
click:function() {
|
||||||
|
var zdialog = $(this);
|
||||||
|
var myObj = { "win":window };
|
||||||
|
|
||||||
ret = window.showModalDialog(url, myObj, "dialogHeight:200px; dialogWidth:400px; center:yes; help:no; resizable:yes; scroll:no; status:no; unadorned:yes");
|
var t = zdialog.find("[name=term]").val();
|
||||||
|
var k = zdialog.find("[name=context]").val();
|
||||||
|
if(k != "") {
|
||||||
|
t += " (" + k + ")";
|
||||||
|
}
|
||||||
|
var lng = zdialog.find("[name=lng]:checked").val();
|
||||||
|
|
||||||
if(ret && ret.t)
|
zdialog.dialog("close");
|
||||||
{
|
|
||||||
var myObj = { "win":window };
|
url = "newterm.php";
|
||||||
url = "newterm.php";
|
url += "?bid={{ bid }}";
|
||||||
url += "?bid={{ bid }}";
|
url += "&piv={{ piv }}";
|
||||||
url += "&piv={{ piv }}";
|
url += "&pid=" + o.id.substr(4);
|
||||||
url += "&pid=" + o.id.substr(4);
|
url += "&t=" + encodeURIComponent(t);
|
||||||
// url += "&t=" + escape(newts); // PAS avec un prompt UTF8
|
url += "&typ=" + typ;
|
||||||
url += "&t=" + encodeURIComponent(ret.t);
|
url += "&sylng=" + encodeURIComponent(lng);
|
||||||
url += "&typ=TS";
|
|
||||||
url += "&sylng=" + encodeURIComponent(ret.lng);
|
w = window.open(url, "NEWTERM", "directories=no, height=290, width=490, location=no, menubar=no, resizable=yes, scrollbars=yes, status=no, toolbar=no");
|
||||||
url += "&dlg=1";
|
}
|
||||||
ret = window.showModalDialog(url, myObj, "dialogHeight:290px; dialogWidth:490px; center:yes; help:no; resizable:yes; scroll:no; status:no; unadorned:yes");
|
}
|
||||||
}
|
]
|
||||||
break;
|
);
|
||||||
case "kterm_newsy":
|
$("#NEWSY_DLG").dialog("open");
|
||||||
var myObj = { "win":window };
|
|
||||||
url = "newsy_dlg.php?piv={{ piv }}&typ=SY";
|
|
||||||
ret = window.showModalDialog(url, myObj, "dialogHeight:200px; dialogWidth:400px; center:yes; help:no; resizable:yes; scroll:no; status:no; unadorned:yes");
|
|
||||||
if(ret && ret.t)
|
|
||||||
{
|
|
||||||
var myObj = { "win":window };
|
|
||||||
url = "newterm.php";
|
|
||||||
url += "?bid={{ bid }}";
|
|
||||||
url += "&piv={{ piv }}";
|
|
||||||
url += "&pid=" + o.id.substr(4);
|
|
||||||
// url += "&t=" + escape(newts); // PAS avec un prompt UTF8
|
|
||||||
url += "&t=" + encodeURIComponent(ret.t);
|
|
||||||
url += "&typ=SY";
|
|
||||||
url += "&sylng=" + encodeURIComponent(ret.lng);
|
|
||||||
url += "&dlg=1";
|
|
||||||
ret = window.showModalDialog(url, myObj, "dialogHeight:290px; dialogWidth:490px; center:yes; help:no; resizable:yes; scroll:no; status:no; unadorned:yes");
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "kterm_delete":
|
case "kterm_delete":
|
||||||
tid = o.id.substr(4);
|
tid = o.id.substr(4);
|
||||||
url = "/thesaurus/xmlhttp/getterm.x.php";
|
url = "/thesaurus/xmlhttp/getterm.x.php";
|
||||||
@@ -1012,8 +1101,7 @@
|
|||||||
url += "?bid={{ bid }}";
|
url += "?bid={{ bid }}";
|
||||||
url += "&piv={{ piv }}";
|
url += "&piv={{ piv }}";
|
||||||
url += "&tid=" + o.id.substr(4);
|
url += "&tid=" + o.id.substr(4);
|
||||||
url += "&dlg=1";
|
w = window.open(url, "LINK", "directories=no, height=340, width=500, location=no, menubar=no, resizable=yes, scrollbars=no, status=no, toolbar=no");
|
||||||
ret = window.showModalDialog(url, myObj, "dialogHeight:340px; dialogWidth:500px; center:yes; help:no; resizable:yes; scroll:no; status:no; unadorned:yes");
|
|
||||||
break;
|
break;
|
||||||
case "kterm_properties":
|
case "kterm_properties":
|
||||||
var myObj = { "win":window };
|
var myObj = { "win":window };
|
||||||
@@ -1026,30 +1114,42 @@
|
|||||||
w = window.open(url, "PROPERTIES", "directories=no, height=300, width=500, location=no, menubar=no, resizable=yes, scrollbars=no, status=no, toolbar=no");
|
w = window.open(url, "PROPERTIES", "directories=no, height=300, width=500, location=no, menubar=no, resizable=yes, scrollbars=no, status=no, toolbar=no");
|
||||||
break;
|
break;
|
||||||
case "kterm_search":
|
case "kterm_search":
|
||||||
ret = window.showModalDialog("search.php?dlg=1", myObj, "dialogHeight:240px; dialogWidth:300px; center:yes; help:no; resizable:yes; scroll:no; status:no; unadorned:yes");
|
$("#SEARCH_DLG").dialog("option", "buttons",
|
||||||
if(ret && ret.t != "")
|
[
|
||||||
{
|
{
|
||||||
url = "/thesaurus/xmlhttp/openbranches.x.php";
|
text:"{% trans 'boutton::annuler' %}",
|
||||||
parms = "bid={{ bid }}";
|
click: function() {
|
||||||
parms += "&id=" + cbParm.id.substr(4);
|
$(this).dialog("close");
|
||||||
parms += "&typ=TH";
|
}
|
||||||
parms += "&method=" + ret.method;
|
} ,
|
||||||
parms += "&t=" + encodeURIComponent(ret.t);
|
{
|
||||||
// alert(url + "?" + parms);
|
text:"{% trans 'boutton::chercher' %}",
|
||||||
|
click:function() {
|
||||||
ret = loadXMLDoc(url, parms, true);
|
var zdialog = $(this);
|
||||||
// alert(ret);
|
var nid = cbParm.id.substr(4).replace(".", "\\.", "g");
|
||||||
|
$("#THB_" + nid).empty();
|
||||||
thb = document.getElementById("THB_" + cbParm.id.substr(4));
|
$.post(
|
||||||
|
"/thesaurus/xmlhttp/openbranches.x.php",
|
||||||
ts = ret.getElementsByTagName("html");
|
{
|
||||||
if(ts.length==1)
|
bid: {{ bid }},
|
||||||
{
|
id: cbParm.id.substr(4),
|
||||||
replaceContent(thb, ts.item(0));
|
typ: "TH",
|
||||||
thb.className = "hb";
|
method: zdialog.find("[name=m]:checked").val(),
|
||||||
document.getElementById("THP_" + cbParm.id.substr(4)).innerText="...";
|
t: zdialog.find("[name=t]").val()
|
||||||
}
|
},
|
||||||
}
|
function(data, textStatus, jqXHR) {
|
||||||
|
var ts = $(data).find("html");
|
||||||
|
$("#THB_" + nid).html(ts.html()).removeClass().addClass("hb");
|
||||||
|
$("#THP_" + nid).text("...");
|
||||||
|
zdialog.dialog("close");
|
||||||
|
},
|
||||||
|
"xml"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
);
|
||||||
|
$("#SEARCH_DLG").dialog("open");
|
||||||
break;
|
break;
|
||||||
case "kterm_export":
|
case "kterm_export":
|
||||||
var myObj = { "win":window };
|
var myObj = { "win":window };
|
||||||
@@ -1172,8 +1272,7 @@
|
|||||||
url += "&piv={{ piv }}";
|
url += "&piv={{ piv }}";
|
||||||
url += "&id=" + o.id.substr(4);
|
url += "&id=" + o.id.substr(4);
|
||||||
url += "&typ=TH";
|
url += "&typ=TH";
|
||||||
url += "&dlg=1";
|
w = window.open(url, "PROPERTIES", "directories=no, height=340, width=500, location=no, menubar=no, resizable=yes, scrollbars=no, status=no, toolbar=no");
|
||||||
ret = window.showModalDialog(url, myObj, "dialogHeight:340px; dialogWidth:500px; center:yes; help:no; resizable:no; scroll:no; status:no; unadorned:yes");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -1296,10 +1395,11 @@
|
|||||||
{
|
{
|
||||||
case "kth_import": // importer
|
case "kth_import": // importer
|
||||||
var myObj = { "win":window };
|
var myObj = { "win":window };
|
||||||
url = "import_dlg.php?piv={{ piv }}&bid={{ bid }}&id=&dlg=1";
|
url = "import_dlg.php";
|
||||||
window.showModalDialog(url, myObj, "dialogHeight:400px; dialogWidth:600px; center:yes; help:no; resizable:yes; scroll:no; status:no; unadorned:yes");
|
url += "?piv={{ piv }}";
|
||||||
// url = "import_dlg.php?piv={{ piv }}&bid={{ bid }}&id=";
|
url += "&bid={{ bid }}";
|
||||||
// w = window.open(url, "IMPORT", "directories=no, height=300, width=500, location=no, menubar=no, resizable=yes, scrollbars=no, status=no, toolbar=no");
|
url += "&id=";
|
||||||
|
w = window.open(url, "IMPORT", "directories=no, height=400, width=600, location=no, menubar=no, resizable=yes, scrollbars=no, status=no, toolbar=no");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user