Opened 3 years ago

Closed 6 months ago

Last modified 6 months ago

#194 closed task (fixed)

Team: the alerts should be Indico style dialogs, not JS confirm()

Reported by: cangelov Owned by: arescope
Priority: normal Milestone: v1.0
Component: Paper reviewing Version: 0.98-dev
Keywords: Cc:

Description


Change History (13)

comment:1 Changed 2 years ago by jbenito

  • Resolution set to wontfix
  • Status changed from new to closed

comment:2 Changed 9 months ago by pferreir

  • Resolution wontfix deleted
  • Status changed from closed to new

comment:3 Changed 9 months ago by pferreir

  • Milestone changed from v0.98.1 to v0.99.0
  • Owner changed from cangelov to arescope
  • Status changed from new to assigned

comment:4 Changed 9 months ago by arescope

  • Status changed from assigned to awaiting_merge

comment:5 Changed 8 months ago by jbenito

  • Status changed from awaiting_merge to merging

comment:6 Changed 8 months ago by pferreir

  • Status changed from merging to assigned

comment:7 Changed 8 months ago by pferreir

  • Status changed from assigned to awaiting_merge

comment:8 Changed 8 months ago by jbenito

  • Milestone changed from v0.99.0 to v1.0

comment:9 Changed 6 months ago by pferreir

I've fixed:

  • cosa variables lying around
  • Broken "Modification key" option
  • Broken "protection" page (from a previous commit);

Available as pferreir-public/194-review.

However, there's a common pattern (confirm dialog after clicking on link) that is repeated several times.
Currently it's being done like this:

    $(".deleteAlarm").click(function(){
        var self = this;
        new ConfirmPopup($T("Delete alarm"), $T("Are you sure to delete this alarm?"), function(confirmed){
            if(confirmed){
                window.location = self.getAttribute("href");
            }
        }).open();
        return false;
    });

What about a more general approach which allows us to set a data attribute such as:

<a href="http://target/url" data-confirm="Really delete this?" data-title="Delete a thing">Delete</a>

This would basically consist of a general version of the code above without having to repeat it. The only challenge would be finding the right place where to execute the selector (after page load).

Last edited 6 months ago by pferreir (previous) (diff)

comment:10 Changed 6 months ago by pferreir

  • Status changed from awaiting_merge to assigned

comment:11 Changed 6 months ago by arescope

  • Status changed from assigned to awaiting_merge

comment:12 Changed 6 months ago by Alberto Resco Perez <alberto.resco.perez@…>

  • Resolution set to fixed
  • Status changed from awaiting_merge to closed

In 0d0df3ac543cf19e066d40e237cd873a0d4afe6a/indico:

[IMP] Remove js popups

comment:13 Changed 6 months ago by Alberto Resco Perez <alberto.resco.perez@…>

In e4c811bca4d1238e154aff1e0d3515105c4c16c9/indico:

[IMP] ConfirmPopup? with link template.

  • Refactor and reuse of code.
  • See #194.
Note: See TracTickets for help on using tickets.