Opened 14 years ago

Closed 13 years ago

#595 closed defect (fixed)

Add a "Loading..." message to Xinha

Reported by: anonymous Owned by: gogo
Priority: high Milestone: Version 1.0
Component: Xinha Core Version: trunk
Severity: normal Keywords:
Cc:

Description

It can take a long time for Xinha to load, it needs a panel in front of it that says it is loading so people don't think it is broken.

Attachments (3)

ticket595.patch (5.7 KB) - added by mokhet 14 years ago.
ticket595_2.patch (6.3 KB) - added by mokhet 14 years ago.
added a config.showLoading variable
ticket595_3.patch (6.3 KB) - added by mokhet 14 years ago.
set the config variable false by default

Download all attachments as: .zip

Change History (18)

Changed 14 years ago by mokhet

comment:1 Changed 14 years ago by mokhet

This patch has been tested for IE6 and FF 1.0.4/1.5rc2 only, seems to do the trick, but i'm much too scared to submit it on the repository since it's updating htmlarea.js and htmlarea.css, it's very new (just finished the first working version) and i bet betters devs than me will find a lot of stupid stuff in it or a better way to do it.

Anyway, if this patch do the trick for you mister anonymous, it's good enough :D

Changed 14 years ago by mokhet

added a config.showLoading variable

comment:2 Changed 14 years ago by mokhet

in this second version of the patch i have added a variable in the config object (config.showLoading) set to true by default. Make it false to not show the loading panel message.

comment:3 Changed 14 years ago by gogo

Havn't tried it out yet but a couple of suggestions. It should probably be off by default for now, and I don't think you are running the strings through the localiser so they won't be translated.

All you need to do to localise is

HTMLArea._lc("English Goes Here")

Changed 14 years ago by mokhet

set the config variable false by default

comment:4 Changed 14 years ago by mokhet

this third version is setting the config variable false by default as suggested by gogo. The strings were already running throuh the localiser

HTMLArea.prototype.setLoadingMessage = function(string, context)
{
  if (!this.config.showLoading || !document.getElementById("loading_sub_" + this._textArea.name)) { return ; }
  var elt = document.getElementById("loading_sub_" + this._textArea.name);
  elt.innerHTML = HTMLArea._lc(string, context);
};

comment:5 Changed 14 years ago by anonymous

I tried the second patch but didn't see the loader... I'll try again with the third patch.

comment:6 Changed 14 years ago by gocher

It seams to work!
de.js extensions:

  "Loading in progress. Please wait !": "Editor wird geladen. Bitte warten !",
  "Constructing main object": "Hauptteil wird erzeugt",
  "Create Toolbar": "Bearbeitungswerkzeuge werden angelegt",
  "Register panel right": "Erzeugt rechte Leiste",
  "Register panel left": "Erzeugt linke Leiste",
  "Register panel top": "Erzeugt obere Leiste",
  "Register panel bottom": "Erzeugt untere Leiste",

comment:7 Changed 14 years ago by anonymous

This is a lot of changes to make. It would be great if this was checked in, especially since the default is "off."

comment:8 Changed 14 years ago by anonymous

This greatly improves the usability of Xinha, because the user isn't left wondering if something has broken. "Loading" messages can make people not notice or mind delays as much, and progress status messages often makes users less impatient by giving them an understanding of how much longer it will take, and in this case better yet, what is happening.

comment:9 Changed 13 years ago by ray

  • Component changed from Documentation to Xinha Core
  • Milestone set to Version 1.0
  • Owner changed from akaEdge to gogo
  • Priority changed from normal to high
  • Version set to trunk

This should really in the distribution! It works great. Additionally you could make a public function out of it because I assume there are occasions where plugins would show a message to the user.

comment:10 Changed 13 years ago by mokhet

the function is in the prototype of HTMLArea and so is public and accessible from plugins.

Watching the last patch make me remember i had started an idea to allow sub messages but i didnt finished.

So i wonder what is the status of this ticket and what gogo and others are thinking about the proposed patch.

And i wonder what action should i take :

1) resolve as wontfix
2) wait for a better solution
3) commit the third patch as it is already (bad idea imo)
4) make a fourth version and submit it on this ticket, waiting for approval
5) or make the fourth version, commit it and close this ticket as fixed

thanks.

comment:11 Changed 13 years ago by anonymous

I sure wish you could do version 5, if it means adding it to the core Xinha.

comment:12 Changed 13 years ago by anonymous

I mean action 5 (sorry).

comment:13 Changed 13 years ago by mokhet

  • Resolution set to fixed
  • Status changed from new to closed

patch updated and commited in changeset:471

comment:14 Changed 13 years ago by anonymous

  • Resolution fixed deleted
  • Status changed from closed to reopened

Az oldal betöltés alatt... Kérem várjon!

comment:15 Changed 13 years ago by anonymous

  • Resolution set to fixed
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.