diff --git a/trelloscrum.js b/trelloscrum.js index 6d8f9e3..c6d154a 100644 --- a/trelloscrum.js +++ b/trelloscrum.js @@ -16,6 +16,7 @@ ** Kit Glennon ** Samuel Gaus ** Sean Colombo +** Roger Braunstein ** */ @@ -51,10 +52,12 @@ var _pointsAttr = ['cpoints', 'points']; var S4T_SETTINGS = []; var SETTING_NAME_LINK_STYLE = "burndownLinkStyle"; var SETTING_NAME_ESTIMATES = "estimatesSequence"; -var S4T_ALL_SETTINGS = [SETTING_NAME_LINK_STYLE, SETTING_NAME_ESTIMATES]; +var SETTING_NAME_INCREMENT = "expendedTimeIncrement"; +var S4T_ALL_SETTINGS = [SETTING_NAME_LINK_STYLE, SETTING_NAME_ESTIMATES, SETTING_NAME_INCREMENT]; var S4T_SETTING_DEFAULTS = {}; S4T_SETTING_DEFAULTS[SETTING_NAME_LINK_STYLE] = 'full'; S4T_SETTING_DEFAULTS[SETTING_NAME_ESTIMATES] = _pointSeq.join(); +S4T_SETTING_DEFAULTS[SETTING_NAME_INCREMENT] = 0.5; refreshSettings(); // get the settings right away (may take a little bit if using Chrome cloud storage) //internals @@ -179,7 +182,13 @@ var recalcTotalsObserver = new CrossBrowser.MutationObserver(function(mutations) $editControls = $(".card-detail-title .edit-controls"); if($editControls.length > 0) { - showPointPicker($editControls.get(0)); + showPointPicker($editControls.get(0)); + } + + $sidebarControls = $(".window-sidebar .other-actions"); + if ($sidebarControls.length > 0) + { + showAddExpendedTimeButton($sidebarControls); } }); recalcTotalsObserver.observe(document.body, obsConfig); @@ -277,6 +286,7 @@ function showSettings() // Load the current settings (with defaults in case Settings haven't been set). var setting_link = S4T_SETTINGS[SETTING_NAME_LINK_STYLE]; var setting_estimateSeq = S4T_SETTINGS[SETTING_NAME_ESTIMATES]; + var setting_increment = S4T_SETTINGS[SETTING_NAME_INCREMENT]; var settingsDiv = $('
', {style: "padding:0px 10px;font-family:'Helvetica Neue', Arial, Helvetica, sans-serif;"}); var iframeHeader = $('

', {style: 'text-align: center;'}); @@ -292,51 +302,57 @@ function showSettings() legend_burndownLink.text("Burndown Chart link"); var burndownLinkSetting_radioName = 'burndownLinkSetting'; fieldset_burndownLink.append(legend_burndownLink); - var burndownRadio_full = $('', {type: 'radio', name: burndownLinkSetting_radioName, id: 'link_full', value: 'full'}); - if(setting_link == 'full'){ - burndownRadio_full.prop('checked', true); - } - var label_full = $('