~dannyla/graphite/close-graph-menu

« back to all changes in this revision

Viewing changes to webapp/content/js/dashboard.js

  • Committer: Daniel Lawrence
  • Date: 2012-04-25 14:09:16 UTC
  • Revision ID: daniel@danielscottlawrence.com-20120425140916-2pt3rpbp81365kg5
Added close option from the graph menu button to mitigate BUG: #917929

Show diffs side-by-side

added added

removed removed

Lines of Context:
1781
1781
        });
1782
1782
        win.show();
1783
1783
      }
1784
 
    }]
 
1784
    } , 
 
1785
    {
 
1786
      xtype: 'button',
 
1787
      fieldLabel: "<span style='visibility: hidden'>",
 
1788
      text: 'Close Graph',
 
1789
      width: 100,
 
1790
      handler: function () { menu.destroy(); closeGraph(record); }
 
1791
    }
 
1792
   ]
1785
1793
  });
1786
1794
 
1787
1795
  var buttons = [functionsButton];
2013
2021
  refreshGraphs();
2014
2022
}
2015
2023
 
 
2024
function closeGraph(record) {
 
2025
  var index = graphStore.indexOf(record);
 
2026
  graphStore.removeAt(index);
 
2027
  refreshGraphs();
 
2028
}
 
2029
 
 
2030
 
2016
2031
function cloneGraphRecord(record) {
2017
2032
  //ensure we are working with copies, not references
2018
2033
  var props = {