@@ -1081,11 +1081,11 @@ function program1(depth0,data) {
10811081 if ( stack1 = helpers . id ) { stack1 = stack1 . call ( depth0 , { hash :{ } , data :data } ) ; }
10821082 else { stack1 = depth0 . id ; stack1 = typeof stack1 === functionType ? stack1 . apply ( depth0 ) : stack1 ; }
10831083 buffer += escapeExpression ( stack1 )
1084- + "' onclick =\"Docs.toggleEndpointListForResource(' " ;
1084+ + "' class =\"toggleEndpointList\" data-id=\" " ;
10851085 if ( stack1 = helpers . id ) { stack1 = stack1 . call ( depth0 , { hash :{ } , data :data } ) ; }
10861086 else { stack1 = depth0 . id ; stack1 = typeof stack1 === functionType ? stack1 . apply ( depth0 ) : stack1 ; }
10871087 buffer += escapeExpression ( stack1 )
1088- + "'); \">" ;
1088+ + "\">" ;
10891089 if ( stack1 = helpers . name ) { stack1 = stack1 . call ( depth0 , { hash :{ } , data :data } ) ; }
10901090 else { stack1 = depth0 . name ; stack1 = typeof stack1 === functionType ? stack1 . apply ( depth0 ) : stack1 ; }
10911091 buffer += escapeExpression ( stack1 )
@@ -1106,19 +1106,19 @@ function program1(depth0,data) {
11061106 if ( stack1 = helpers . id ) { stack1 = stack1 . call ( depth0 , { hash :{ } , data :data } ) ; }
11071107 else { stack1 = depth0 . id ; stack1 = typeof stack1 === functionType ? stack1 . apply ( depth0 ) : stack1 ; }
11081108 buffer += escapeExpression ( stack1 )
1109- + "'\n onclick =\"Docs.toggleEndpointListForResource(' " ;
1109+ + "' class=\"toggleEndpointList\" data-id =\"" ;
11101110 if ( stack1 = helpers . id ) { stack1 = stack1 . call ( depth0 , { hash :{ } , data :data } ) ; }
11111111 else { stack1 = depth0 . id ; stack1 = typeof stack1 === functionType ? stack1 . apply ( depth0 ) : stack1 ; }
11121112 buffer += escapeExpression ( stack1 )
1113- + "'); \">Show/Hide</a>\n </li>\n <li>\n <a href='#' onclick =\"Docs.collapseOperationsForResource(' " ;
1113+ + "\">Show/Hide</a>\n </li>\n <li>\n <a href='#' class =\"collapseResource\" data-id=\" " ;
11141114 if ( stack1 = helpers . id ) { stack1 = stack1 . call ( depth0 , { hash :{ } , data :data } ) ; }
11151115 else { stack1 = depth0 . id ; stack1 = typeof stack1 === functionType ? stack1 . apply ( depth0 ) : stack1 ; }
11161116 buffer += escapeExpression ( stack1 )
1117- + "'); return false; \">\n List Operations\n </a>\n </li>\n <li>\n <a href='#' onclick =\"Docs.expandOperationsForResource(' " ;
1117+ + "\">\n List Operations\n </a>\n </li>\n <li>\n <a href='#' class =\"expandResource\" data-id= " ;
11181118 if ( stack1 = helpers . id ) { stack1 = stack1 . call ( depth0 , { hash :{ } , data :data } ) ; }
11191119 else { stack1 = depth0 . id ; stack1 = typeof stack1 === functionType ? stack1 . apply ( depth0 ) : stack1 ; }
11201120 buffer += escapeExpression ( stack1 )
1121- + "'); return false;\" >\n Expand Operations\n </a>\n </li>\n <li>\n <a href='" ;
1121+ + ">\n Expand Operations\n </a>\n </li>\n <li>\n <a href='" ;
11221122 if ( stack1 = helpers . url ) { stack1 = stack1 . call ( depth0 , { hash :{ } , data :data } ) ; }
11231123 else { stack1 = depth0 . url ; stack1 = typeof stack1 === functionType ? stack1 . apply ( depth0 ) : stack1 ; }
11241124 buffer += escapeExpression ( stack1 )
@@ -1537,6 +1537,9 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
15371537 operation . parentId = this . model . id ;
15381538 this . addOperation ( operation ) ;
15391539 }
1540+ $ ( '.toggleEndpointList' , this . el ) . click ( this . callDocs . bind ( this , 'toggleEndpointListForResource' ) ) ;
1541+ $ ( '.collapseResource' , this . el ) . click ( this . callDocs . bind ( this , 'collapseOperationsForResource' ) ) ;
1542+ $ ( '.expandResource' , this . el ) . click ( this . callDocs . bind ( this , 'expandOperationsForResoruce' ) ) ;
15401543 return this ;
15411544 } ;
15421545
@@ -1553,6 +1556,11 @@ helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
15531556 return this . number ++ ;
15541557 } ;
15551558
1559+ ResourceView . prototype . callDocs = function ( fnName , e ) {
1560+ e . preventDefault ( ) ;
1561+ return Docs [ fnName ] ( e . currentTarget . getAttribute ( 'data-id' ) ) ;
1562+ } ;
1563+
15561564 return ResourceView ;
15571565
15581566 } ) ( Backbone . View ) ;
0 commit comments