Skip to content

Commit

Permalink
conditions and actions
Browse files Browse the repository at this point in the history
  • Loading branch information
pmurias committed Nov 27, 2010
1 parent 7cff253 commit 32dc61f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions public/editor.html
Expand Up @@ -28,7 +28,9 @@
addReaction: function() {
this.reactions.push({
text:[''],
replies:[]
replies:[],
action: [''],
conditions: ['']
});
}
};
Expand All @@ -50,6 +52,8 @@
selected_reaction = 0;
reactions = [
{
action: [''],
conditions: [''],
text:['Witam','Jesteś tu sam?'],
replies:[
{
Expand All @@ -63,6 +67,8 @@
]
},
{
action: [''],
conditions: [''],
text:['Stój złodzieju'],
replies:[]
}
Expand All @@ -74,7 +80,9 @@
<button id="add_reaction" ng:click="addReaction()">Add new reaction</button>
<div ng:controller="ReactionController">

<span ng:repeat="text in reactions[selected_reaction].text">
Conditions: <textarea name='reactions[selected_reaction].conditions[0]'></textarea>
Actions: <textarea name='reactions[selected_reaction].action[0]'></textarea>
Text: <span ng:repeat="text in reactions[selected_reaction].text">
<textarea name='reactions[selected_reaction].text[$index]'></textarea>
<a href="" ng:click="reactions[selected_reaction].text.splice($index,1)">Remove</a>
</span>
Expand Down

0 comments on commit 32dc61f

Please sign in to comment.