Skip to content

Commit 63388bb

Browse files
authored
Update Client Script.js
1 parent 7d4abf3 commit 63388bb

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed
Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
api.controller=function($scope) {
22
/* widget controller */
33
var c = this;
4-
c.add =function(){
5-
c.data.action = "addMessage";
6-
c.server.update().then(function(){
7-
c.data.action = undefined;
8-
c.data.newColor ="";
9-
c.data.message = "";
10-
})
11-
}
12-
c.remove =function(i){
13-
c.data.i =i;
14-
c.data.action = "removeMessage";
15-
c.server.update().then(function(){
16-
c.data.action = undefined;
17-
})
18-
19-
}
4+
c.add =function(){
5+
c.data.action = "add";
6+
c.server.update().then(function(){
7+
c.data.action = undefined;
8+
c.data.newColor ="";
9+
c.data.text = "";
10+
})
11+
}
12+
c.remove =function(i){
13+
c.data.i =i;
14+
c.data.action = "remove";
15+
c.server.update().then(function(){
16+
c.data.action = undefined;
17+
})
18+
}
2019
}

0 commit comments

Comments
 (0)