Fixed the title of the locked button dialog
This commit is contained in:
parent
277223def5
commit
4f9f8d2449
|
@ -712,7 +712,7 @@ else {
|
||||||
'tnetwork_component',
|
'tnetwork_component',
|
||||||
array('id_plugin' => $row["id"]));
|
array('id_plugin' => $row["id"]));
|
||||||
if (($components_using_plugin + $modules_using_plugin) > 0) {
|
if (($components_using_plugin + $modules_using_plugin) > 0) {
|
||||||
echo "<a href='javascript: show_locked_dialog(" . $row['id'] . ");'>";
|
echo '<a href="javascript: show_locked_dialog(' . $row['id'] . ', \'' . $row["name"] . '\');">';
|
||||||
html_print_image('images/lock.png');
|
html_print_image('images/lock.png');
|
||||||
echo "</a>";
|
echo "</a>";
|
||||||
}
|
}
|
||||||
|
@ -739,8 +739,9 @@ else {
|
||||||
echo "<input name='crtbutton' type='submit' class='sub next' value='".__('Add')."'>";
|
echo "<input name='crtbutton' type='submit' class='sub next' value='".__('Add')."'>";
|
||||||
echo "</td></tr></table>";
|
echo "</td></tr></table>";
|
||||||
|
|
||||||
|
// The '%s' will be replaced in the javascript code of the function 'show_locked_dialog'
|
||||||
echo "<div id='dialog_locked' title='" .
|
echo "<div id='dialog_locked' title='" .
|
||||||
sprintf(__('List of modules and components created by "%s" '), $row["name"]) .
|
__('List of modules and components created by "%s" ') .
|
||||||
"' style='display: none; text-align: left;'>";
|
"' style='display: none; text-align: left;'>";
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
|
|
||||||
|
@ -784,7 +785,7 @@ ui_require_javascript_file('pandora_modules');
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function show_locked_dialog(id_plugin) {
|
function show_locked_dialog(id_plugin, plugin_name) {
|
||||||
var parameters = {};
|
var parameters = {};
|
||||||
parameters['page'] = "godmode/servers/plugin";
|
parameters['page'] = "godmode/servers/plugin";
|
||||||
parameters["get_list_modules_and_component_locked_plugin"] = 1;
|
parameters["get_list_modules_and_component_locked_plugin"] = 1;
|
||||||
|
@ -796,7 +797,10 @@ ui_require_javascript_file('pandora_modules');
|
||||||
data: parameters,
|
data: parameters,
|
||||||
dataType: "html",
|
dataType: "html",
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
|
var title = $("#dialog_locked").prop('title').replace(/%s/, plugin_name);
|
||||||
|
|
||||||
$("#dialog_locked")
|
$("#dialog_locked")
|
||||||
|
.prop('title', title)
|
||||||
.html(data);
|
.html(data);
|
||||||
$("#dialog_locked")
|
$("#dialog_locked")
|
||||||
.dialog ({
|
.dialog ({
|
||||||
|
|
Loading…
Reference in New Issue