Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Koen van Ras 54 posts 312 karma points c-trib
    Oct 03, 2019 @ 09:17
    Koen van Ras

    Button state busy custom Section


    I'm creating a custom section in Umbraco V8 for an export plugin. Now I want to generate an export when creating the export button in the footer of the section, this works but when I click on the export button, I want to change the state to busy so that the user can't click it again and it is visible that Umbraco is working.

    I created the button using the following documentation:

    Though I'm not sure how to call the button and change the state from the handler and from another angular function.

    enter image description here

  • Tobias Klika 100 posts 545 karma points c-trib
    Oct 03, 2019 @ 10:01
    Tobias Klika

    You can use the umb-button directive in case you don't need a group.

    <div ng-controller="MyController">
      <umb-button type="button" action="export()" state="exportState" label="Export" />

    And for the controller:

    angular.module("umbraco").controller("MyController", function ($scope)
      $scope.exportState = 'default';
      $scope.export = function ()
        $scope.exportState = 'busy';
        // TODO implementation here
  • Koen van Ras 54 posts 312 karma points c-trib
    Oct 03, 2019 @ 11:44
    Koen van Ras

    Thanks! I need a button group because there are some more options available later, for example download latest export. Though this helped because I implemented the export in the button group object and call it from there.

Please Sign in or register to post replies

Write your reply to: