1
0
Fork 0
forked from 0x2620/oxjs

Ox.getPositionById() -> Ox.getIndexById()

This commit is contained in:
rolux 2012-01-04 13:41:05 +05:30
commit 8097cc7812
19 changed files with 23 additions and 30 deletions

View file

@ -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);