Supporting each other

Community forums

Welcome, Guest
Username: Password: Remember me
Report any technical problems you discover and discuss solutions.
  • Page:
  • 1

TOPIC:

v3: Imported project/template misleading popup 9 years 2 months ago #3110

  • jayaich
  • jayaich's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 82
  • Thank you received: 5
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').
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">
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.

Please Log in or Create an account to join the conversation.

Last edit: by jayaich. Reason: Remove display of old patch changes.

v3: Imported project/template misleading popup 9 years 2 months ago #3111

  • tom
  • tom's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 1286
  • Thank you received: 324
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'

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Moderators: ronmjultenJohnSmith
Time to create page: 0.041 seconds
Copyright © 2024 The Xerte Project.
Xerte logo Apereo logo OSI Logo

Search