RT-Extension-LifecycleUI

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

0.02 2017-09-28
  - for interactive display on tickets, highlight the status that user
    clicked which opened a menu
  - add way to resize circle decorations
  - polish inspector UI
  - hide approvals and reminders options for non-ticket lifecycles
  - add more localization tags
  - stop picking random colors for new statuses
  - animate new status nodes and decorations into the scene
  - improve animations around transitions by drawing them from status to status
  - change the permission entry field from textbox to combobox
  - avoid rendering issues dragging status nodes over top of eachother
  - avoid rendering issues with transitions being drawn inside status circles
  - add new option for selecting whether user can pan and zoom on ticket
    display
  - add new option for selecting the initial center point on ticket display:
    origin, current status, or zoom to fit
  - hide canvas border on ticket display when sensible
  - make add/select controls available when any node is selected
  - disable, don't hide, undo/redo buttons that are unavailable

html/Elements/LifecycleInspectorTransition  view on Meta::CPAN

            <td>
%# taken from RT's /Widgets/ComboBox, except we can't know at Mason time which
%# values to provide
% my $z_index = 9999;
% my $Class = "";
% my $Name = "right";
% my $Size = undef;
% my $Default = "{{transition.right}}";
% my $Rows = 5;
              <nobr>
                <div id="<% $Name %>_Container" class="combobox <%$Class%>" style="z-index: <%$z_index--%>">
                  <input name="<% $Name %>" id="<% $Name %>" class="combo-text" value="<% $Default || '' %>" type="text" <% $Size ? "size='$Size'" : '' |n %> autocomplete="off" />
                  <br style="display: none" />
                  <span id="<% $Name %>_Button" class="combo-button">&#9660;</span>
                  <select name="List-<% $Name %>" id="<% $Name %>_List" class="combo-list" onchange="ComboBox_SimpleAttach(this, this.form[<% $Name |n,j%>]); " size="<% $Rows %>">
                    <optgroup>
{{#each (selectedRights lifecycle)}}
                      <option value="{{this}}">{{this}}</option>
{{/each}}
                    </optgroup>
                    <optgroup>

lib/RT/Extension/LifecycleUI.pm  view on Meta::CPAN

package RT::Extension::LifecycleUI;
use strict;
use warnings;
use Storable;

our $VERSION = '0.02';

RT->AddJavaScript("d3.min.js");
RT->AddJavaScript("handlebars-4.0.6.min.js");
RT->AddJavaScript("combobox.js");
RT->AddJavaScript("lifecycleui-model.js");
RT->AddJavaScript("lifecycleui-viewer.js");
RT->AddJavaScript("lifecycleui-viewer-interactive.js");
RT->AddJavaScript("lifecycleui-editor.js");

RT->AddStyleSheets("lifecycleui.css");
RT->AddStyleSheets("lifecycleui-viewer.css");
RT->AddStyleSheets("lifecycleui-viewer-interactive.css");
RT->AddStyleSheets("lifecycleui-editor.css");

static/js/lifecycleui-editor.js  view on Meta::CPAN

                if ((field.val() == option.val()) != flip) {
                    jQuery(selector).show();
                } else {
                    jQuery(selector).hide();
                }
            }
            field.change(function (e) { toggle() });
            toggle();
        });

        refreshedNode.find(".combobox input.combo-text").each(function () {
            ComboBox_Load(this.id);
        });
    };

    Editor.prototype.setInspectorContent = function (node) {
        this.inspectorNode = node;
        this._refreshInspector(true);
    };

    Editor.prototype.bindInspectorEvents = function () {
        var self = this;
        var lifecycle = self.lifecycle;
        var inspector = self.inspector;

        inspector.on('change', ':input', function () {
            var node = jQuery(this);
            var value;

            if (node.is('.combo-list')) {
                value = node.val();
                node = node.closest('.combobox').find('.combo-text');
            }
            else if (node.is(':checkbox')) {
                value = node[0].checked;
            }
            else {
                value = node.val();
            }

            var field = node.attr('name');



( run in 2.426 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )