refactored javascript to remove PromptingLoadingPanelController