Report any technical problems you discover and discuss solutions.

v3: Imported project/template misleading popup

Plus d'informations
il y a 10 ans 10 mois - il y a 10 ans 10 mois #3110 par 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.
Dernière édition: il y a 10 ans 10 mois par jayaich. Raison: Remove display of old patch changes.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 10 ans 10 mois #3111 par tom
Réponse de tom sur le sujet 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'

Connexion ou Créer un compte pour participer à la conversation.

Modérateurs: ronmjultenJohnSmith
Temps de génération de la page : 0.267 secondes
Copyright © 2026 The Xerte Project.
Xerte logo Apereo logo OSI Logo