Skip to content

Commit

Permalink
Fix a number of typos.
Browse files Browse the repository at this point in the history
  • Loading branch information
wkeese committed Sep 12, 2016
1 parent 2362f47 commit c14082c
Show file tree
Hide file tree
Showing 15 changed files with 48 additions and 47 deletions.
2 changes: 1 addition & 1 deletion StoreBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ define([
this._itemStoreState[id] = {
id: id,
item: item,
renderItem: this.owner.itemToRenderItem(item, store),
renderItem: this.itemToRenderItem(item),
state: state
};
}
Expand Down
23 changes: 12 additions & 11 deletions ViewBase.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
define([
"dcl/dcl",
"requirejs-dplugins/Promise!",
"dojo/_base/lang",
"decor/sniff",
"dojo/dom-style",
Expand All @@ -13,6 +14,7 @@ define([
"./RendererManager"
], function (
dcl,
Promise,
lang,
has,
domStyle,
Expand Down Expand Up @@ -1193,7 +1195,7 @@ define([
this._tempItemsMap[id] = true;
}

var newRenderItem = this.itemToRenderItem(newItem, store);
var newRenderItem = this.itemToRenderItem(newItem);
newRenderItem._item = newItem;
this._setItemStoreState(newItem, "unstored");

Expand Down Expand Up @@ -1572,10 +1574,10 @@ define([
var synthEvent = this.emit("item-edit-end", e);

if (!synthEvent.defaultPrevented) {
var store = this.source;
var source = this.source;

// updated store item
var storeItem = this.renderItemToItem(e.item, store);
var storeItem = this.renderItemToItem(e.item);

var s = this._getItemStoreStateObj(e.item);

Expand All @@ -1587,20 +1589,20 @@ define([
// so we must do it here.
storeItem = lang.mixin(s.item, storeItem);
this._setItemStoreState(storeItem, "storing");
var oldID = store.getIdentity(storeItem);
var oldID = source.getIdentity(storeItem);
var options = null;

if (this._tempItemsMap && this._tempItemsMap[oldID]) {
options = {temporaryId: oldID};
delete this._tempItemsMap[oldID];
delete storeItem[store.idProperty];
delete storeItem[source.idProperty];
}

// add to the store.
when(store.add(storeItem, options), function (res) {
Promise.resolve(source.add(storeItem, options)).then(function (res) {
var id;
if (lang.isObject(res)) {
id = store.getIdentity(res);
id = source.getIdentity(res);
} else {
id = res;
}
Expand All @@ -1619,7 +1621,7 @@ define([
// Inject new properties in data store item
// and apply data changes
this._setItemStoreState(storeItem, "storing");
store.put(storeItem);
source.put(storeItem);
} else {
e.item.startTime = this._editStartTimeSave;
e.item.endTime = this._editEndTimeSave;
Expand Down Expand Up @@ -1818,9 +1820,8 @@ define([
// TODO abstract change?
item.subColumn = subColumn;
// refresh the other properties that depends on this one (especially cssClass)
var store = this.source;
var storeItem = this.renderItemToItem(item, store);
lang.mixin(item, this.itemToRenderItem(storeItem, store));
var storeItem = this.renderItemToItem(item);
lang.mixin(item, this.itemToRenderItem(storeItem));
moveOrResizeDone = true;
}
if (cal.compare(item.startTime, newTime) !== 0) {
Expand Down
2 changes: 1 addition & 1 deletion tests/calendar.html
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@

var calValue = calendarEditor.get("value");
editedItem.calendar = calValue == "Calendar 1" ? "cal1" : "cal2";
calendar.store.put(editedItem);
calendar.source.put(editedItem);
}
});

Expand Down
2 changes: 1 addition & 1 deletion tests/calendarMonthView.html
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@

var calValue = calendarEditor.value;
editedItem.calendar = calValue == "Calendar 1" ? "cal1" : "cal2";
calendar.store.put(editedItem);
calendar.source.put(editedItem);
}

});
Expand Down
2 changes: 1 addition & 1 deletion tests/calendar_ar.html
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@

var calValue = calendarEditor.get("value");
editedItem.calendar = calValue == "Calendar 1" ? "cal1" : "cal2";
calendar.store.put(editedItem);
calendar.source.put(editedItem);
}

});
Expand Down
2 changes: 1 addition & 1 deletion tests/columnview.html
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@

var calValue = calendarEditor.get("value");
editedItem.calendar = calValue == "Calendar 1" ? "cal1" : "cal2";
colView.store.put(editedItem);
colView.source.put(editedItem);
}

});
Expand Down
2 changes: 1 addition & 1 deletion tests/columnview_rtl.html
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@

var calValue = calendarEditor.get("value");
editedItem.calendar = calValue == "Calendar 1" ? "cal1" : "cal2";
colView.store.put(editedItem);
colView.source.put(editedItem);
}

});
Expand Down
2 changes: 1 addition & 1 deletion tests/contextmenu.html
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@

var calValue = calendarEditor.get("value");
editedItem.calendar = calValue == "Calendar 1" ? "cal1" : "cal2";
calendar.store.put(editedItem);
calendar.source.put(editedItem);
}

});
Expand Down
2 changes: 1 addition & 1 deletion tests/hcalendar.html
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@

var calValue = calendarEditor.get("value");
editedItem.calendar = calValue == "Calendar 1" ? "cal1" : "cal2";
calendar.store.put(editedItem);
calendar.source.put(editedItem);
}

});
Expand Down
6 changes: 3 additions & 3 deletions tests/isItemEditable.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,21 +114,21 @@
contextMenuEditable.on("click", function(e) {
calendar.selectedItems.forEach( function(item) {
item.editable = contextMenuEditable.checked;
calendar.store.put(item, {overwrite: true});
calendar.source.put(item, {overwrite: true});
});
});

contextMenuMove.on("click", function(e) {
calendar.selectedItems.forEach( function(item) {
item.moveEnabled = contextMenuMove.checked;
calendar.store.put(item, {overwrite: true});
calendar.source.put(item, {overwrite: true});
});
});

contextMenuResize.on("click", function(e) {
calendar.selectedItems.forEach( function(item) {
item.resizeEnabled = contextMenuResize.checked;
calendar.store.put(item, {overwrite: true});
calendar.source.put(item, {overwrite: true});
});
});

Expand Down
2 changes: 1 addition & 1 deletion tests/matrixview.html
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@

var calValue = calendarEditor.value;
editedItem.calendar = calValue == "Calendar 1" ? "cal1" : "cal2";
matrixView.store.put(editedItem);
matrixView.source.put(editedItem);
}

});
Expand Down
2 changes: 1 addition & 1 deletion tests/matrixview_rtl.html
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@

var calValue = calendarEditor.get("value");
editedItem.calendar = calValue == "Calendar 1" ? "cal1" : "cal2";
matrixView.store.put(editedItem);
matrixView.source.put(editedItem);
}
});

Expand Down
2 changes: 1 addition & 1 deletion tests/monthcolumnview.html
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@

var calValue = calendarEditor.value;
editedItem.calendar = calValue == "Calendar 1" ? "cal1" : "cal2";
colView.store.put(editedItem);
colView.source.put(editedItem);
}
});

Expand Down
2 changes: 1 addition & 1 deletion tests/monthcolumnview_rtl.html
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@

var calValue = calendarEditor.get("value");
editedItem.calendar = calValue == "Calendar 1" ? "cal1" : "cal2";
colView.store.put(editedItem);
colView.source.put(editedItem);
}

});
Expand Down
Loading

0 comments on commit c14082c

Please sign in to comment.