Skip to content

Commit 4d40933

Browse files
committed
Refactored samples.
1 parent 994a0a8 commit 4d40933

File tree

6 files changed

+30
-28
lines changed

6 files changed

+30
-28
lines changed
Binary file not shown.

SimpleTaskSystem/SimpleTaskSystem.WebSpaAngular/App/Main/views/task/new.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,16 @@
2121
});
2222

2323
vm.saveTask = function() {
24-
abp.ui.setBusy(null, {
25-
promise: taskService.createTask(vm.task)
26-
.success(function() {
27-
abp.notify.info(abp.utils.formatString(localize("TaskCreatedMessage"), vm.task.description));
28-
$location.path('/');
29-
})
30-
});
24+
abp.ui.setBusy(
25+
null,
26+
taskService.createTask(
27+
vm.task
28+
).success(function() {
29+
abp.notify.info(abp.utils.formatString(localize("TaskCreatedMessage"), vm.task.description));
30+
$location.path('/');
31+
})
32+
);
3133
};
32-
3334
}
3435
]);
3536
})();

SimpleTaskSystem/SimpleTaskSystem.WebSpaAngular/SimpleTaskSystem.WebSpaAngular.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@
179179
<Content Include="Abp\Framework\styles\utils\ie10fix.css" />
180180
<Content Include="App\Main\app.js" />
181181
<Content Include="App\Main\filters\moment_filters.js" />
182-
<Content Include="App\Main\images\abp-logo.png" />
183182
<Content Include="App\Main\main.css">
184183
<DependentUpon>main.less</DependentUpon>
185184
</Content>

SimpleTaskSystem/SimpleTaskSystem.WebSpaDurandal/App/Main/viewmodels/newtask.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,14 @@
3333
return;
3434
}
3535

36-
abp.ui.setBusy(_$view, {
37-
promise: taskService.createTask(ko.mapping.toJS(that.task))
38-
.done(function () {
39-
abp.notify.info(abp.utils.formatString(localize("TaskCreatedMessage"), that.task.description()));
40-
history.navigate('');
41-
})
42-
});
36+
abp.ui.setBusy(_$view,
37+
taskService.createTask(
38+
ko.mapping.toJS(that.task)
39+
).done(function() {
40+
abp.notify.info(abp.utils.formatString(localize("TaskCreatedMessage"), that.task.description()));
41+
history.navigate('');
42+
})
43+
);
4344
};
4445
};
4546
});
Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
<form id="NewTaskForm" role="form">
2-
<div class="form-group">
3-
<label for="TaskDescription">@L("TaskDescription")</label>
4-
<textarea id="TaskDescription" data-bind="value: task.description" class="form-control" rows="3" placeholder="@L("EnterDescriptionHere")" required></textarea>
5-
</div>
6-
<div class="form-group">
7-
<label for="TaskAssignedPerson">@L("AssignTo")</label>
8-
<select id="TaskAssignedPerson" data-bind="options: people, optionsText: 'name', optionsValue: 'id', value: task.assignedPersonId, optionsCaption: '@L("SelectPerson")'" class="form-control"></select>
9-
</div>
10-
<button data-bind="click: saveTask" type="submit" class="btn btn-primary">@L("CreateTheTask")</button>
11-
</form>
1+
<div>
2+
<form id="NewTaskForm" role="form">
3+
<div class="form-group">
4+
<label for="TaskDescription">@L("TaskDescription")</label>
5+
<textarea id="TaskDescription" data-bind="value: task.description" class="form-control" rows="3" placeholder="@L("EnterDescriptionHere")" required></textarea>
6+
</div>
7+
<div class="form-group">
8+
<label for="TaskAssignedPerson">@L("AssignTo")</label>
9+
<select id="TaskAssignedPerson" data-bind="options: people, optionsText: 'name', optionsValue: 'id', value: task.assignedPersonId, optionsCaption: '@L("SelectPerson")'" class="form-control"></select>
10+
</div>
11+
<button data-bind="click: saveTask" type="submit" class="btn btn-primary">@L("CreateTheTask")</button>
12+
</form>
13+
</div>

SimpleTaskSystem/SimpleTaskSystem.WebSpaDurandal/SimpleTaskSystem.WebSpaDurandal.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,6 @@
364364
</None>
365365
</ItemGroup>
366366
<ItemGroup>
367-
<Folder Include="App\Main\images\" />
368367
<Folder Include="Models\" />
369368
</ItemGroup>
370369
<ItemGroup>

0 commit comments

Comments
 (0)