forked from 0x2620/oxjs
Ox.getPositionById() -> Ox.getIndexById()
This commit is contained in:
parent
4ca01b2bfa
commit
8097cc7812
19 changed files with 23 additions and 30 deletions
|
|
@ -495,7 +495,7 @@ Ox.ListCalendar = function(options, self) {
|
|||
|
||||
function editEvent(key, value) {
|
||||
var id = self.selectedEvent,
|
||||
index = Ox.getPositionById(self.options.events, id),
|
||||
index = Ox.getIndexById(self.options.events, id),
|
||||
data = {id: id};
|
||||
data[key] = value;
|
||||
self.options.editEvent(data, function(result) {
|
||||
|
|
@ -552,7 +552,7 @@ Ox.ListCalendar = function(options, self) {
|
|||
|
||||
function removeEvent() {
|
||||
var id = self.selectedEvent,
|
||||
index = Ox.getPositionById(self.options.events, id);
|
||||
index = Ox.getIndexById(self.options.events, id);
|
||||
self.options.removeEvent({id: id}, function(result) {
|
||||
if (result.status.code == '200') {
|
||||
self.options.events.splice(index, 1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue