From 1c5685d68f1b73270fb814fe04cbb490eb90ba5f Mon Sep 17 00:00:00 2001 From: mensonge Date: Fri, 14 Nov 2008 15:39:19 +0000 Subject: Minor fix: Remove DOJO library (60Mo) replaced by link to Google CDN (online DOJO library) git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@159 b3834d28-1941-0410-a4f8-b48e95affb8f --- includes/js/dojox/wire/ml/Data.js | 143 -------------------------------------- 1 file changed, 143 deletions(-) delete mode 100644 includes/js/dojox/wire/ml/Data.js (limited to 'includes/js/dojox/wire/ml/Data.js') diff --git a/includes/js/dojox/wire/ml/Data.js b/includes/js/dojox/wire/ml/Data.js deleted file mode 100644 index 71ab0ad..0000000 --- a/includes/js/dojox/wire/ml/Data.js +++ /dev/null @@ -1,143 +0,0 @@ -if(!dojo._hasResource["dojox.wire.ml.Data"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code. -dojo._hasResource["dojox.wire.ml.Data"] = true; -dojo.provide("dojox.wire.ml.Data"); -dojo.provide("dojox.wire.ml.DataProperty"); - -dojo.require("dijit._Widget"); -dojo.require("dijit._Container"); -dojo.require("dojox.wire.ml.util"); - -dojo.declare("dojox.wire.ml.Data", [dijit._Widget, dijit._Container], { - // summary: - // A widget for a data object - // description: - // This widget represents an object with '_properties' property. - // If child 'DataProperty' widgets exist, they are used to initialize - // propertiy values of '_properties' object. - - startup: function(){ - // summary: - // Call _initializeProperties() - // description: - // See _initializeProperties(). - this._initializeProperties(); - }, - - _initializeProperties: function(/*Boolean*/reset){ - // summary: - // Initialize a data object - // description: - // If this widget has child DataProperty widgets, their getValue() - // methods are called and set the return value to a property - // specified by 'name' attribute of the child widgets. - // reset: - // A boolean to reset current properties - if(!this._properties || reset){ - this._properties = {}; - } - var children = this.getChildren(); - for(var i in children){ - var child = children[i]; - if((child instanceof dojox.wire.ml.DataProperty) && child.name){ - this.setPropertyValue(child.name, child.getValue()); - } - } - }, - - getPropertyValue: function(/*String*/property){ - // summary: - // Return a property value - // description: - // This method returns the value of a property, specified with - // 'property' argument, in '_properties' object. - // property: - // A property name - // returns: - // A property value - return this._properties[property]; //anything - }, - - setPropertyValue: function(/*String*/property, /*anything*/value){ - // summary: - // Store a property value - // description: - // This method stores 'value' as a property, specified with - // 'property' argument, in '_properties' object. - // property: - // A property name - // value: - // A property value - this._properties[property] = value; - } -}); - -dojo.declare("dojox.wire.ml.DataProperty", [dijit._Widget, dijit._Container], { - // summary: - // A widget to define a data property - // description: - // Attributes of this widget are used to add a property to the parent - // Data widget. - // 'type' attribute specifies one of "string", "number", "boolean", - // "array", "object" and "element" (DOM Element) - // (default to "string"). - // If 'type' is "array" or "object", child DataProperty widgets are - // used to initialize the array elements or the object properties. - // name: - // A property name - // type: - // A property type name - // value: - // A property value - name: "", - type: "", - value: "", - - getValue: function(){ - // summary: - // Returns a property value - // description: - // If 'type' is specified, 'value' attribute is converted to - // the specified type and returned. - // Otherwise, 'value' attribute is returned as is. - // returns: - // A property value - var value = this.value; - if(this.type){ - if(this.type == "number"){ - value = parseInt(value); - }else if(this.type == "boolean"){ - value = (value == "true"); - }else if(this.type == "array"){ - value = []; - var children = this.getChildren(); - for(var i in children){ - var child = children[i]; - if(child instanceof dojox.wire.ml.DataProperty){ - value.push(child.getValue()); - } - } - }else if(this.type == "object"){ - value = {}; - var children = this.getChildren(); - for(var i in children){ - var child = children[i]; - if((child instanceof dojox.wire.ml.DataProperty) && child.name){ - value[child.name] = child.getValue(); - } - } - }else if(this.type == "element"){ - value = new dojox.wire.ml.XmlElement(value); - var children = this.getChildren(); - for(var i in children){ - var child = children[i]; - if((child instanceof dojox.wire.ml.DataProperty) && child.name){ - value.setPropertyValue(child.name, child.getValue()); - } - } - } - } - return value; //anything - } -}); - -} -- cgit v1.2.3-54-g00ecf