photools.com Community

IMatch Bug Reports and Feature Requests => Feature Requests => Archive (Feature Requests) => Topic started by: monochrome on February 09, 2018, 10:54:40 AM

Title: Allow title to be changed in IMatchModals
Post by: monochrome on February 09, 2018, 10:54:40 AM
The current template for IMatchModals dialog boxes has a fixed title - "IMatch". It would be much more space-efficient and clear to the user if the dialog box could be parameterized by "title" as well. According to "Error Message Guidelines" - https://msdn.microsoft.com/en-us/library/windows/desktop/ms679325(v=vs.85).aspx :

Quote from: MSDN Error Message Guidelines
Display only the product, component, or wizard name in the title bar of the message. This helps the user determine where the problem is. Do not summarize the problem in the title bar or include the word "error".

Having "IMatch" as the title, while correct, indicates that the error comes from IMatch itself, and not the embedded app.
Title: Re: Allow title to be changed in IMatchModals
Post by: Mario on February 09, 2018, 02:00:14 PM
It takes only a few lines of HTML to make your own template and load it. Would that not be the better solution?
All IMatch dialog boxes have the title "IMatch" so the user can tell.
Title: Re: Allow title to be changed in IMatchModals
Post by: monochrome on February 09, 2018, 02:31:14 PM
Sure. But I thought the whole point of having IMatchModals is so that each app doesn't have to reinvent the wheel.
Title: Re: Allow title to be changed in IMatchModals
Post by: Mario on February 09, 2018, 02:36:10 PM
I've included IMatchModals to make it easier to work with modal dialogs in IMatch apps, and to make it easy to create your own templates.

You can change the title of the modal (in the callback) easily like so:

$('#modal-title') = 'Oops!';
Title: Re: Allow title to be changed in IMatchModals
Post by: monochrome on February 09, 2018, 03:13:21 PM
How would that work? Before the modal is opened, the element doesn't exist, and the callback parameter is called when the modal closes.
Title: Re: Allow title to be changed in IMatchModals
Post by: Mario on February 09, 2018, 03:37:54 PM
I mean the callback of showModal(). Not from one of the pre-made modals I include as samples. See the modal documentation and the included source code for details.
Title: Re: Allow title to be changed in IMatchModals
Post by: Mario on March 13, 2018, 08:41:47 PM
IMatch 2018 contains some enhancements for the IMatchModals class. It now supports Bootstrap 4 (with implicit switch to FontAwesome 5) and you can now also change the title of the standard modals from 'IMatch' to whatever you want.