updated js code. added example of admin widget usage