Skip to content

millioner/ExtJsFunTip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6073419 · May 1, 2011

History

7 Commits
May 1, 2011
May 1, 2011
May 1, 2011
May 1, 2011
May 1, 2011

Repository files navigation

It is a small extension for ExtJs library.

It displays small and no-annoying messages to user. For example:

or

##Usage:

  1. Sure you have to use ExtJs (was tested only with ExtJs 3.x)
  2. Copy js, css and image folders to project and include css/tooltip.css and js/tooltip.js to your html page
  3. Profit!!!

##Displaying success message Ext.Tips.msg('Success', 'Operation was completed');

##Displaying error message Ext.Tips.popup(Ext.Tips.CRITICAL, 'Unable to delete user.'); You can also use Ext.Tips.WARNING, Ext.Tips.INFO or Ext.Tips.HELP for different styling

##And displaying form errors Some times we have tabs inside a form, and user cannot see validation error at unactive tabs. So you can show it with tooltip: Ext.Tips.formErrors(form);

Also you can display validation errors, which was returned from the server: Ext.Tips.formErrors(form, response.result.errors);

Where response.result.errors is an array of objects. For example:

[
    {
        "id": "email",
        "msg": "Email '[email protected]' is already in use"
    },
    {
        "id": "login",
        "msg": "Login 'user' is already in use"
    },
    {
        "msg": "You have no rights for adding new users"
    }
]

So, id is a field name that contains an error and msg is an error message.

There is no id in the last array item, it is okay - just general error message with no connection to some field.

About

Some information tooltip on ExtJs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published