60
60
showFeature : function (feature ) {
61
61
62
62
// fetch the contents of the current feature
63
- this . $ http .get (' features/' + feature .title ).then (
63
+ Vue . http .get (' features/' + feature .title ).then (
64
64
// success
65
65
function (response ) {
66
66
// set the currently viewing feature
67
- this .$set ( ' currentFeature' , response .json () );
67
+ this .currentFeature = response .json ();
68
68
69
- this .$set ( ' isCodeShowing' , true ) ;
69
+ this .isCodeShowing = true ;
70
70
71
71
this .showFeatureCodeDialog ();
72
72
73
73
// generate and set highlighted content for this feature
74
- this .$set ( ' currentFeature.highlightedContent' , Prism .highlight (this .$get ( ' currentFeature.content' ) , Prism .languages .php ) );
75
- },
74
+ this .currentFeature .highlightedContent = Prism .highlight (this .currentFeature .content , Prism .languages .php );
75
+ }. bind ( this ) ,
76
76
// error
77
77
function (response ) {
78
78
console .log (' Error fetching feature details' , response .status );
@@ -93,19 +93,19 @@ function (response) {
93
93
showJob : function (job ) {
94
94
console .log (job .title );
95
95
// fetch the contents of the current job
96
- this . $ http .get (' jobs/' + job .title ).then (
96
+ Vue . http .get (' jobs/' + job .title ).then (
97
97
// success
98
98
function (response ) {
99
99
// set the currently viewing job
100
- this .$set ( ' currentJob' , response .json () );
100
+ this .currentJob = response .json ();
101
101
102
- this .$set ( ' isCodeShowing' , true ) ;
102
+ this .isCodeShowing = true ;
103
103
104
104
this .showJobCodeDialog ();
105
105
106
106
// generate and set highlighted content for this job
107
- this .$set ( ' currentJob.highlightedContent' , Prism .highlight (this .$get ( ' currentJob.content' ) , Prism .languages .php ) );
108
- },
107
+ this .currentJob .highlightedContent = Prism .highlight (this .currentJob .content , Prism .languages .php );
108
+ }. bind ( this ) ,
109
109
// error
110
110
function (response ) {
111
111
console .log (' Error fetching job details' , response .status );
0 commit comments