Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix bug where initial method for a new endpoint was not added to menu

  • Loading branch information...
commit 2004b2539ae8f5b6a9dc268f56e5ff0b1bcab523 1 parent 0042f35
@brandonmwest authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 public/js/default.js
View
8 public/js/default.js
@@ -254,6 +254,12 @@ var addFirstMethod = function(endpointIndex) {
var methodList = $('#ep' + endpointIndex).children('ul').first();
newMethod.appendTo(methodList);
+
+ //add the menuitem
+ var methodMenu = $('#methodMenuTemplate').children('li').first().clone();
+
+ updateMethodMenuItem(methodMenu, endpointIndex, methodIndex);
+ methodMenu.appendTo($('#endpointActuator' + endpointIndex).next('ul'));
}
var addMethod = function(e) {
@@ -391,7 +397,7 @@ var updateMethodMenuItem = function(menuItem, endpointIndex, newId, oldId) {
link = menuItem.children('a').first();
link.attr('id', 'endpoint' + endpointIndex + 'method' + newId + 'Actuator');
- link.attr('href', 'endpoint' + endpointIndex + 'method' + newId );
+ link.attr('href', '#endpoint' + endpointIndex + 'method' + newId );
if(link.text().length == 0)
link.text("New Method");
Please sign in to comment.
Something went wrong with that request. Please try again.