Report any technical problems you discover and discuss solutions.

v3: Imported project/template misleading popup

  • jayaich
  • Onderwerp Auteur
  • Offline
  • Premium lid
  • Premium lid
Meer
10 jaren 10 maanden geleden - 10 jaren 10 maanden geleden #3110 door jayaich
Hello,

When a project/template is imported successfully a popup appears saying 'New template imported'. Unfortunately the popup has as a title' PHP_ERROR'. I hoped that users would not be too bothered about this, but we have already had it raised as a concern.

So, below is a simple patch of two files to avoid this. It is very much a kludge which basically just removes the 'PHP_ERROR' title. It does this by looking for the explicit string 'New template imported', and if it is present then calls a different popup (called 'okpopup').
Code:
diff -u workspaceproperties.php.orig workspaceproperties.php --- workspaceproperties.php.orig 2015-07-29 23:17:24.000000000 +0100 +++ workspaceproperties.php 2015-09-04 16:49:44.100380842 +0100 @@ -79,6 +79,7 @@ <iframe id="upload_iframe" name="upload_iframe" src="" style="width:0px;height:0px; display:none"></iframe> <!--- error widget --> <div id="errorpopup" title="PHP_ERROR" style="display:none"></div> +<div id="okpopup" title="" style="display:none"></div> <div class="properties_main"> <div class="main_area">
Code:
diff -u website_code/scripts/import.js.orig website_code/scripts/import.js --- website_code/scripts/import.js.orig 2015-07-29 23:17:24.000000000 +0100 +++ website_code/scripts/import.js 2015-09-07 13:16:59.297016951 +0100 @@ -102,6 +102,21 @@ string = string.substr(0,string.length-4); + if (string == 'New template imported') { + $("#okpopup").html(string); + $("#okpopup").dialog({ + dialogClass: "no-close", + buttons: [ + { + text: "OK", + click: function() { + $( this ).dialog( "close" ); + } + } + ] + }); + } + else { $("#errorpopup").html(string); $("#errorpopup").dialog({ dialogClass: "no-close", @@ -114,6 +129,7 @@ } ] }); + } //alert(string); if(typeof window_reference==="undefined"){



John.
Laatst bewerkt 10 jaren 10 maanden geleden door jayaich. Reden: Remove display of old patch changes.

Graag Inloggen of een account aanmaken deelnemen aan het gesprek.

Meer
10 jaren 10 maanden geleden #3111 door tom
Beantwoord door tom in topic v3: Imported project/template misleading popup
Hi John,

Thank you for akl the patches. I'll be implementing them tjis month, so they don't get lost.

However, this issue is best resolved by simply removing the quotes around PHP_ERROR.

PHP_ERROR is a macro, that is defined in languages/<language>/workspaceproperties.inc, and in en-GB it reads 'Status messages'

Graag Inloggen of een account aanmaken deelnemen aan het gesprek.

Moderators: ronmjultenJohnSmith
Tijd voor maken pagina: 0.124 seconden
Copyright © 2026 The Xerte Project.
Xerte logo Apereo logo OSI Logo