forked from 0x2620/oxjs
use Ox.Log
This commit is contained in:
parent
92d25b6776
commit
dce2843303
50 changed files with 276 additions and 276 deletions
|
|
@ -29,7 +29,7 @@ Ox.ListCalendar = function(options, self) {
|
|||
|
||||
self.durationCache = {};
|
||||
|
||||
Ox.print('EVENT[0]', self.options.events[0])
|
||||
Ox.Log('Calendar', 'EVENT[0]', self.options.events[0])
|
||||
|
||||
self.columns = [
|
||||
{
|
||||
|
|
@ -330,7 +330,7 @@ Ox.ListCalendar = function(options, self) {
|
|||
.hide()
|
||||
.bindEvent({
|
||||
change: function(data) {
|
||||
Ox.print('CHANGE', data);
|
||||
Ox.Log('Calendar', 'CHANGE', data);
|
||||
var exists = false, values
|
||||
if (['name', 'alternativeNames'].indexOf(data.id) > -1) {
|
||||
exists = '';
|
||||
|
|
@ -459,7 +459,7 @@ Ox.ListCalendar = function(options, self) {
|
|||
});
|
||||
|
||||
function addEvent() {
|
||||
Ox.print('ADD', self.$calendar.getBounds())
|
||||
Ox.Log('Calendar', 'ADD', self.$calendar.getBounds())
|
||||
var bounds = self.$calendar.getBounds(),
|
||||
middle = +self.$calendar.options('date'),
|
||||
startTime = +new Date((+bounds.startTime + middle) / 2),
|
||||
|
|
@ -474,14 +474,14 @@ Ox.ListCalendar = function(options, self) {
|
|||
event.type = 'other';
|
||||
event.start = Ox.formatDate(startTime, '%Y-%m-%d %H:%M:%S', true);
|
||||
event.end = Ox.formatDate(endTime, '%Y-%m-%d %H:%M:%S', true);
|
||||
Ox.print(event);
|
||||
Ox.Log('Calendar', event);
|
||||
self.options.addEvent(event, function(result) {
|
||||
if (result.status.code == '200') {
|
||||
event.id = result.data.id;
|
||||
self.options.events.push(event);
|
||||
var time0 = +new Date()
|
||||
self.$list.options({items: Ox.clone(self.options.events, true)});
|
||||
Ox.print('TIME TO SET LIST OPTIONS:', +new Date() - time0);
|
||||
Ox.Log('Calendar', 'TIME TO SET LIST OPTIONS:', +new Date() - time0);
|
||||
self.$calendar.addEvent(event);
|
||||
selectEvent(event);
|
||||
self.$nameInput.focusInput();
|
||||
|
|
@ -556,7 +556,7 @@ Ox.ListCalendar = function(options, self) {
|
|||
self.options.events.splice(index, 1);
|
||||
var time0 = +new Date();
|
||||
self.$list.options({items: Ox.clone(self.options.events, true)});
|
||||
Ox.print('TIME TO SET LIST OPTIONS:', +new Date() - time0);
|
||||
Ox.Log('Calendar', 'TIME TO SET LIST OPTIONS:', +new Date() - time0);
|
||||
self.$calendar.removeEvent();
|
||||
selectEvent({});
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue