Permalink
Browse files

Add new version that intercepts commands to open epics and only allow…

…s one

epic to be open at a time from the epic panel.
  • Loading branch information...
abierbaum committed Mar 9, 2013
1 parent baf8dbb commit 51028f01eaa6a69f618ed850c00c7d2874f2f75d
View
@@ -0,0 +1,6 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<gupdate xmlns='http://www.google.com/update2/response' protocol='2.0'>
+ <app appid='lekkffheaefgbegicmemdmnafkeikcfj'>
+ <updatecheck codebase='http://not.here.compivotal_tracker_tweaks-0.2.0.crx' version='0.2.0' />
+ </app>
+</gupdate>
Binary file not shown.
Binary file not shown.
@@ -1,3 +1,4 @@
+/*global EpicPreviewWidget: false, Epic: false, app:false, Panel:false */
/*
* Overrides for epics.
*
@@ -6,6 +7,8 @@
* Notes:
* - EpicsWidgetSource: Seems to be the place epics are partitioned to display
* - Epic: Main class for epics and holds the content.
+* - EpicPreviewWidget._showEpicStoriesPanel: hook to show stories from main interface
+* - layout.showEpicStoriesPanel
*/
if(window.app) {
console.log('Loading Epic Overrides');
@@ -23,4 +26,14 @@ if(window.app) {
return false;
};
+ // Override the default way EpicPreviewWidget shows epics so that we
+ // can force all other epic panels closed before showing the new one.
+ // note: this doesn't not prevent all places from do this, but works for us.
+ // to prevent all, look at layout.showEpicsStoriesPanel
+ EpicPreviewWidget.prototype._showEpicStoriesPanel = function() {
+ console.log('showing epic');
+ app.layout.hidePanels(Panel.EPIC_STORIES);
+ app.layout.showEpicStoriesPanel(this.model.id());
+ };
+
}
View
@@ -1,6 +1,6 @@
{
"name": "Pivotal Tracker Tweaks",
- "version": "0.1.0",
+ "version": "0.2.0",
"description": "",
"manifest_version": 2,

0 comments on commit 51028f0

Please sign in to comment.