Skip to content

Commit

Permalink
Refactored samples.
Browse files Browse the repository at this point in the history
  • Loading branch information
hikalkan committed Nov 2, 2014
1 parent 994a0a8 commit 4d40933
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 28 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,16 @@
});

vm.saveTask = function() {
abp.ui.setBusy(null, {
promise: taskService.createTask(vm.task)
.success(function() {
abp.notify.info(abp.utils.formatString(localize("TaskCreatedMessage"), vm.task.description));
$location.path('/');
})
});
abp.ui.setBusy(
null,
taskService.createTask(
vm.task
).success(function() {
abp.notify.info(abp.utils.formatString(localize("TaskCreatedMessage"), vm.task.description));
$location.path('/');
})
);
};

}
]);
})();
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@
<Content Include="Abp\Framework\styles\utils\ie10fix.css" />
<Content Include="App\Main\app.js" />
<Content Include="App\Main\filters\moment_filters.js" />
<Content Include="App\Main\images\abp-logo.png" />
<Content Include="App\Main\main.css">
<DependentUpon>main.less</DependentUpon>
</Content>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,14 @@
return;
}

abp.ui.setBusy(_$view, {
promise: taskService.createTask(ko.mapping.toJS(that.task))
.done(function () {
abp.notify.info(abp.utils.formatString(localize("TaskCreatedMessage"), that.task.description()));
history.navigate('');
})
});
abp.ui.setBusy(_$view,
taskService.createTask(
ko.mapping.toJS(that.task)
).done(function() {
abp.notify.info(abp.utils.formatString(localize("TaskCreatedMessage"), that.task.description()));
history.navigate('');
})
);
};
};
});
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<form id="NewTaskForm" role="form">
<div class="form-group">
<label for="TaskDescription">@L("TaskDescription")</label>
<textarea id="TaskDescription" data-bind="value: task.description" class="form-control" rows="3" placeholder="@L("EnterDescriptionHere")" required></textarea>
</div>
<div class="form-group">
<label for="TaskAssignedPerson">@L("AssignTo")</label>
<select id="TaskAssignedPerson" data-bind="options: people, optionsText: 'name', optionsValue: 'id', value: task.assignedPersonId, optionsCaption: '@L("SelectPerson")'" class="form-control"></select>
</div>
<button data-bind="click: saveTask" type="submit" class="btn btn-primary">@L("CreateTheTask")</button>
</form>
<div>
<form id="NewTaskForm" role="form">
<div class="form-group">
<label for="TaskDescription">@L("TaskDescription")</label>
<textarea id="TaskDescription" data-bind="value: task.description" class="form-control" rows="3" placeholder="@L("EnterDescriptionHere")" required></textarea>
</div>
<div class="form-group">
<label for="TaskAssignedPerson">@L("AssignTo")</label>
<select id="TaskAssignedPerson" data-bind="options: people, optionsText: 'name', optionsValue: 'id', value: task.assignedPersonId, optionsCaption: '@L("SelectPerson")'" class="form-control"></select>
</div>
<button data-bind="click: saveTask" type="submit" class="btn btn-primary">@L("CreateTheTask")</button>
</form>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,6 @@
</None>
</ItemGroup>
<ItemGroup>
<Folder Include="App\Main\images\" />
<Folder Include="Models\" />
</ItemGroup>
<ItemGroup>
Expand Down

0 comments on commit 4d40933

Please sign in to comment.