Permalink
Browse files

made some corrections to the presenter.

  • Loading branch information...
1 parent 67072e0 commit 01a1b6db46eed440232a63d74398b458d182db96 unknown committed Jun 14, 2011
@@ -11,7 +11,7 @@ define(['lib/jquery.tmpl', 'lib/jquery.datalink'], function () {
require([
'views/' + pageName + 'View',
'text!views/' + pageName + 'View.tmpl.htm',
- 'viewmodels/' + pageName + 'ViewModel'
+ 'viewmodels/' + pageName + 'ViewModel' /* TODO: Test a page with a missing viewModel */
], function (view, templateText, viewModel) {
if (viewModel) {
var vm = new viewModel();
@@ -21,7 +21,7 @@ define(['lib/jquery.tmpl', 'lib/jquery.datalink'], function () {
callback(new view(templated, vm));
}
else {
- callback(new view($(templateText)));
+ callback(new view($(templateText)));/* TODO: wrap in jquery necessary ? */
}
});
}
@@ -7,8 +7,8 @@ define(['presenter', 'services/kanban'], function (presenter, kanbanService) {
linkOptions: {
lastZIndex: {
name: "lastZIndex",
- convertBack: function (value, source, target) {
- $(target).text(value);
+ convertBack: function (value, source, target) {
+ $(target).text(value); //TODO: factor out jquery and datalinking references
}
}
},
@@ -25,7 +25,7 @@ define(['presenter', 'services/kanban'], function (presenter, kanbanService) {
},
getNextZIndex: function () {
- $(this).setField('lastZIndex', this.lastZIndex + 1);
+ $(this).setField('lastZIndex', this.lastZIndex + 1);//TODO: factor out jquery and datalinking references
return this.lastZIndex;
}
};
@@ -3,9 +3,9 @@
/// <reference path="../../Scripts/jquery.datalink.js" />
define(['services/messenger', 'viewmodels/stickynoteboardViewModel', 'text!views/stickynoteboardView.tmpl.htm'], function (messenger) {
- var stickynoteboard = function (templated, viewmodel) {
- var $this = this;
- this.view = templated;
+ var stickynoteboard = function (view, viewmodel) {
+ var $this = this;
+ this.view = view;
this.viewModel = viewmodel;
$(function () {
$('button[name="clickHere"]', $this.view).click(function () {

0 comments on commit 01a1b6d

Please sign in to comment.