You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by anuruddhal <gi...@git.apache.org> on 2015/09/10 10:37:29 UTC

[GitHub] stratos pull request: Adding remove-signup button

GitHub user anuruddhal opened a pull request:

    https://github.com/apache/stratos/pull/460

    Adding remove-signup button

    - Adding remove-signup button for UI

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/anuruddhal/stratos stratos-4.1.x

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/stratos/pull/460.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #460
    
----
commit d3b17716de5c792cf3d862940745bc56955b598c
Author: anuruddhal <an...@gmail.com>
Date:   2015-09-10T08:36:02Z

    Adding remove-signup button

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] stratos pull request: Adding remove-signup button

Posted by dakshika <gi...@git.apache.org>.
Github user dakshika commented on a diff in the pull request:

    https://github.com/apache/stratos/pull/460#discussion_r39137831
  
    --- Diff: components/org.apache.stratos.manager.console/console/themes/theme0/partials/applications_form.hbs ---
    @@ -472,4 +482,48 @@
                 ]
             });
         });
    +
    +      $('.general-table').on('click', '.hover-remove-signup', function (event) {
    +
    +        var payload =$(this).attr("id");
    +        noty({
    +            layout: 'bottomRight',
    +            type: 'warning',
    +            text: 'Are you sure you want to remove signup for application: <strong>'+$(this).attr("id") + "</strong> ?",
    +            buttons: [
    +                {addClass: 'btn btn-primary', text: 'Yes', onClick: function($noty) {
    +                    var formtype = 'unsignupapplication';
    +                    $noty.close();
    +
    +                    $.ajax({
    +                        type: "POST",
    +                        url: caramel.context + "/controllers/applications/application_requests.jag",
    +                        dataType: 'json',
    +                        data: { "applicationId": payload, "formtype": formtype },
    +                        success: function (data) {
    +                            if (data.status == 'error') {
    +                                var n = noty({text: data.message, layout: 'bottomRight', type: 'error'});
    +                            } else if (data.status == 'warning') {
    +                                var n = noty({text: data.message, layout: 'bottomRight', type: 'warning'});
    +                            } else {
    +                                var n = noty({text: data.message, layout: 'bottomRight', type: 'success'});
    +                            }
    +                            window.setTimeout(function(){
    +                                location.reload();
    +                            }, 1000);
    +                        }
    +                    }).always(function () {
    --- End diff --
    
    No need of having always method


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] stratos pull request: Adding remove-signup button

Posted by anuruddhal <gi...@git.apache.org>.
Github user anuruddhal closed the pull request at:

    https://github.com/apache/stratos/pull/460


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] stratos pull request: Adding remove-signup button

Posted by anuruddhal <gi...@git.apache.org>.
Github user anuruddhal commented on a diff in the pull request:

    https://github.com/apache/stratos/pull/460#discussion_r39139203
  
    --- Diff: components/org.apache.stratos.manager.console/console/themes/theme0/partials/applications_form.hbs ---
    @@ -472,4 +482,48 @@
                 ]
             });
         });
    +
    +      $('.general-table').on('click', '.hover-remove-signup', function (event) {
    +
    +        var payload =$(this).attr("id");
    +        noty({
    +            layout: 'bottomRight',
    +            type: 'warning',
    +            text: 'Are you sure you want to remove signup for application: <strong>'+$(this).attr("id") + "</strong> ?",
    +            buttons: [
    +                {addClass: 'btn btn-primary', text: 'Yes', onClick: function($noty) {
    +                    var formtype = 'unsignupapplication';
    +                    $noty.close();
    +
    +                    $.ajax({
    +                        type: "POST",
    +                        url: caramel.context + "/controllers/applications/application_requests.jag",
    +                        dataType: 'json',
    +                        data: { "applicationId": payload, "formtype": formtype },
    +                        success: function (data) {
    +                            if (data.status == 'error') {
    +                                var n = noty({text: data.message, layout: 'bottomRight', type: 'error'});
    +                            } else if (data.status == 'warning') {
    +                                var n = noty({text: data.message, layout: 'bottomRight', type: 'warning'});
    +                            } else {
    +                                var n = noty({text: data.message, layout: 'bottomRight', type: 'success'});
    +                            }
    +                            window.setTimeout(function(){
    +                                location.reload();
    +                            }, 1000);
    +                        }
    +                    }).always(function () {
    --- End diff --
    
    Removed always method


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---