return _self;
};
+ /**
+ * datasource - file
+ */
+ uibinding.dataSourceFile = function () {
+ if (arguments.length !== 1) {
+ return null;
+ }
+
+ var _self = this;
+ _self.options = {
+ path: "",
+ dataType: "json"
+ };
+
+ var args = Array.prototype.slice.call(arguments, 0);
+ var new_options = args.shift();
+ _self._create(new_options);
+ return _self;
+ };
+ uibinding.dataSourceFile.prototype = new uibinding.dataSource();
+ uibinding.dataSourceFile.prototype.constructor = uibinding.dataSourceFile;
+ uibinding.dataSourceFile.prototype._create = function (obj) {
+ var _self = this;
+ if (arguments.length > 0) {
+ _self._updateOptions(obj);
+ }
+ };
+ uibinding.dataSourceFile.prototype._update = function () {
+ var _self = this;
+ $.get(_self.options.path, function (data) {
+ _self.data = _self._toJson(data, _self.options.dataType);
+ _self.fireHandler("success");
+ }).fail(function () {
+ _self.fireHandler("error");
+ });
+ };
+ uibinding.dataSourceFile.prototype.update = function () {
+ var _self = this;
+ _self._update();
+ return this;
+ };
})(jQuery);
return _self;
};
+ /**
+ * datasource - file
+ */
+ uibinding.dataSourceFile = function () {
+ if (arguments.length !== 1) {
+ return null;
+ }
+
+ var _self = this;
+ _self.options = {
+ path: "",
+ dataType: "json"
+ };
+
+ var args = Array.prototype.slice.call(arguments, 0);
+ var new_options = args.shift();
+ _self._create(new_options);
+ return _self;
+ };
+ uibinding.dataSourceFile.prototype = new uibinding.dataSource();
+ uibinding.dataSourceFile.prototype.constructor = uibinding.dataSourceFile;
+ uibinding.dataSourceFile.prototype._create = function (obj) {
+ var _self = this;
+ if (arguments.length > 0) {
+ _self._updateOptions(obj);
+ }
+ };
+ uibinding.dataSourceFile.prototype._update = function () {
+ var _self = this;
+ $.get(_self.options.path, function (data) {
+ _self.data = _self._toJson(data, _self.options.dataType);
+ _self.fireHandler("success");
+ }).fail(function () {
+ _self.fireHandler("error");
+ });
+ };
+ uibinding.dataSourceFile.prototype.update = function () {
+ var _self = this;
+ _self._update();
+ return this;
+ };
})(jQuery);
return _self;
};
+ /**
+ * datasource - file
+ */
+ uibinding.dataSourceFile = function () {
+ if (arguments.length !== 1) {
+ return null;
+ }
+
+ var _self = this;
+ _self.options = {
+ path: "",
+ dataType: "json"
+ };
+
+ var args = Array.prototype.slice.call(arguments, 0);
+ var new_options = args.shift();
+ _self._create(new_options);
+ return _self;
+ };
+ uibinding.dataSourceFile.prototype = new uibinding.dataSource();
+ uibinding.dataSourceFile.prototype.constructor = uibinding.dataSourceFile;
+ uibinding.dataSourceFile.prototype._create = function (obj) {
+ var _self = this;
+ if (arguments.length > 0) {
+ _self._updateOptions(obj);
+ }
+ };
+ uibinding.dataSourceFile.prototype._update = function () {
+ var _self = this;
+ $.get(_self.options.path, function (data) {
+ _self.data = _self._toJson(data, _self.options.dataType);
+ _self.fireHandler("success");
+ }).fail(function () {
+ _self.fireHandler("error");
+ });
+ };
+ uibinding.dataSourceFile.prototype.update = function () {
+ var _self = this;
+ _self._update();
+ return this;
+ };
})(jQuery);
return _self;
};
+ /**
+ * datasource - file
+ */
+ uibinding.dataSourceFile = function () {
+ if (arguments.length !== 1) {
+ return null;
+ }
+
+ var _self = this;
+ _self.options = {
+ path: "",
+ dataType: "json"
+ };
+
+ var args = Array.prototype.slice.call(arguments, 0);
+ var new_options = args.shift();
+ _self._create(new_options);
+ return _self;
+ };
+ uibinding.dataSourceFile.prototype = new uibinding.dataSource();
+ uibinding.dataSourceFile.prototype.constructor = uibinding.dataSourceFile;
+ uibinding.dataSourceFile.prototype._create = function (obj) {
+ var _self = this;
+ if (arguments.length > 0) {
+ _self._updateOptions(obj);
+ }
+ };
+ uibinding.dataSourceFile.prototype._update = function () {
+ var _self = this;
+ $.get(_self.options.path, function (data) {
+ _self.data = _self._toJson(data, _self.options.dataType);
+ _self.fireHandler("success");
+ }).fail(function () {
+ _self.fireHandler("error");
+ });
+ };
+ uibinding.dataSourceFile.prototype.update = function () {
+ var _self = this;
+ _self._update();
+ return this;
+ };
})(jQuery);