1
0
Fork 0
forked from 0x2620/oxjs

use Ox.Log

This commit is contained in:
j 2011-11-04 16:54:28 +01:00
commit dce2843303
50 changed files with 276 additions and 276 deletions

View file

@ -103,7 +103,7 @@ Ox.Form = function(options, self) {
function validateForm(pos, valid) {
self.itemIsValid[pos] = valid;
Ox.print('VALID???', self.itemIsValid)
Ox.Log('Form', 'VALID???', self.itemIsValid)
if (Ox.every(self.itemIsValid) != self.formIsValid) {
self.formIsValid = !self.formIsValid;
that.triggerEvent('validate', {
@ -113,7 +113,7 @@ Ox.Form = function(options, self) {
}
that.addItem = function(pos, item) {
Ox.print('addItem', pos)
Ox.Log('Form', 'addItem', pos)
self.options.items.splice(pos, 0, item);
self.$items.splice(pos, 0, Ox.FormItem({element: item}));
pos == 0 ?
@ -122,7 +122,7 @@ Ox.Form = function(options, self) {
}
that.removeItem = function(pos) {
Ox.print('removeItem', pos);
Ox.Log('Form', 'removeItem', pos);
self.$items[pos].removeElement();
self.options.items.splice(pos, 1);
self.$items.splice(pos, 1);
@ -130,7 +130,7 @@ Ox.Form = function(options, self) {
that.submit = function() {
// fixme: this seems to be unneeded
//Ox.print('---- that.values()', that.values())
//Ox.Log('Form', '---- that.values()', that.values())
self.options.submit(that.values(), submitCallback);
};
@ -147,13 +147,13 @@ Ox.Form = function(options, self) {
//fixme: make the following work
//values[self.itemIds[i]] = self.$items[i].options('value');
});
//Ox.print('VALUES', values)
//Ox.Log('Form', 'VALUES', values)
return values;
} else {
Ox.print('SET FORM VALUES', arguments[0])
Ox.Log('Form', 'SET FORM VALUES', arguments[0])
Ox.forEach(arguments[0], function(value, key) {
var index = getItemIndexById(key);
//index > -1 && Ox.print(':::::::', key, value)
//index > -1 && Ox.Log('Form', ':::::::', key, value)
index > -1 && self.options.items[index].options({value: value});
});
return that;