Created attachment 739342 [details] Out of order alerts Description of problem: When deleting pages in "General configuration" section of dashbuilder, if you have no page to delete selected and you click "Clear" button the following alert is displayed: "Are you sure you want to delete page?" (1) - you click OK for this alert and another alert pops up: "A page selected is needed" (2). These alerts are clearly out of order. When no page for deletion is selected, only alert 2 should be displayed. Version-Release number of selected component (if applicable): How reproducible: Always In my case:Fedora 18, browsers: both Firefox 19, Google Chrome 26 Steps to Reproduce: 1. Download dashboard-builder from github and run quickstart demo as described in the "Quickstart" section cd dashboard-builder/scripts ./buildandrun_h2.sh 2. Browse to http://localhost:8080/dashbuilder/ and login with root/root 3. Using administration menu at the top go to "General configuration" (using gearwheel icon) 4. Expand: Workspace > Showcase > Sections 5. Click the "Clear" button (trash can - element with id="action_delete_section") without actually selecting a page to delete. Actual results: 1) First alert "Are you sure you want to delete page?" is displayed 2) You click OK 3) Second alert "A page selected is needed" Expected results: Only second alert should be displayed: "A page selected is needed", because user didn't select a page!
Order of the checking changes as suggested. Github commit: https://github.com/droolsjbpm/dashboard-builder/commit/5ccabf932d0d03697223563473e6b78e677036fe
QA: Ok, the issue is fixed. When trying to delete a page without a page selected, the alert with message "No page selected" is displayed. Verified with dashbuilder build DR5 deployed on EAP 6.1 GA