This commit is contained in:
Christiaan Rakowski
2013-07-15 10:06:27 +02:00
6 changed files with 8535 additions and 289 deletions
+1
View File
@@ -157,6 +157,7 @@ List of Definitions
* [Sammy.js](http://sammyjs.org/) (by [Boris Yankov](https://github.com/borisyankov))
* [Select2](http://ivaynberg.github.com/select2/) (by [Boris Yankov](https://github.com/borisyankov))
* [Sencha Touch](http://www.sencha.com/products/touch/) (by [Brian Kotek](https://github.com/brian428))
* [SharePoint](http://sptypescript.codeplex.com) (by [Stanislav Vyshchepan](http://gandjustas.blogspot.ru) and [Andrey Markeev](http://markeev.com))
* [SignalR](http://www.asp.net/signalr) (by [Boris Yankov](https://github.com/borisyankov))
* [Sinon](http://sinonjs.org/) (by [William Sears](https://github.com/mrbigdog2u))
* [socket.io](http://socket.io) (by [William Orr](https://github.com/worr))
+1 -1
View File
@@ -93,6 +93,7 @@ declare module Backbone {
attributes: any;
changed: any[];
cid: string;
defaults: any;
id: any;
idAttribute: string;
validationError: any;
@@ -111,7 +112,6 @@ declare module Backbone {
changedAttributes(attributes?: any): any[];
clear(options?: Silenceable);
clone(): Model;
defaults(): any;
destroy(options?: ModelDestroyOptions);
escape(attribute: string);
has(attribute: string): boolean;
+11 -41
View File
@@ -3995,8 +3995,6 @@ declare module Ext {
focus?( selectText?:any, delay?:any, callback?:any, scope?:any ): any;
focus?( selectText?:bool, delay?:bool, callback?:any, scope?:any ): Ext.IComponent;
focus?( selectText?:bool, delay?:number, callback?:any, scope?:any ): Ext.IComponent;
/** [Method] Implements an upward event bubbling policy */
getBubbleTarget? (): Ext.container.IContainer;
/** [Method] Retrieves the top level element representing this component */
getEl?(): Ext.dom.IElement;
/** [Method] Retrieves the id of this component */
@@ -18237,7 +18235,7 @@ declare module Ext.form.field {
/** [Method] private override to use getSubmitValue as a convenience */
getSubmitData?(): any;
/** [Method] Returns the value that would be included in a standard form submit for this field */
getSubmitValue?(): string;
getSubmitValue?(): any;
/** [Method] Returns the current data value of the field */
getValue?(): any;
/** [Method] Tells whether the field currently has an active error message */
@@ -18424,7 +18422,7 @@ declare module Ext.form {
/** [Method] Returns the name attribute of the field */
getName?(): string;
/** [Method] Returns the raw value of the field without performing any normalization conversion or validation */
getRawValue?(): string;
getRawValue?(): any;
/** [Method] Creates and returns the data object to be used when rendering the fieldSubTpl */
getSubTplData?(): any;
/** [Method] Gets the markup to be inserted into the outer template s bodyEl */
@@ -18432,7 +18430,7 @@ declare module Ext.form {
/** [Method] private override to use getSubmitValue as a convenience */
getSubmitData?(): any;
/** [Method] Returns the value that would be included in a standard form submit for this field */
getSubmitValue?(): string;
getSubmitValue?(): any;
/** [Method] Returns the current data value of the field */
getValue?(): any;
/** [Method] Tells whether the field currently has an active error message */
@@ -18619,7 +18617,7 @@ declare module Ext.form {
/** [Method] Returns the name attribute of the field */
getName?(): string;
/** [Method] Returns the raw value of the field without performing any normalization conversion or validation */
getRawValue?(): string;
getRawValue?(): any;
/** [Method] Creates and returns the data object to be used when rendering the fieldSubTpl */
getSubTplData?(): any;
/** [Method] Gets the markup to be inserted into the outer template s bodyEl */
@@ -18627,7 +18625,7 @@ declare module Ext.form {
/** [Method] private override to use getSubmitValue as a convenience */
getSubmitData?(): any;
/** [Method] Returns the value that would be included in a standard form submit for this field */
getSubmitValue?(): string;
getSubmitValue?(): any;
/** [Method] Returns the current data value of the field */
getValue?(): any;
/** [Method] Tells whether the field currently has an active error message */
@@ -18788,7 +18786,7 @@ declare module Ext.form.field {
/** [Method] Creates and returns the data object to be used when rendering the fieldSubTpl */
getSubTplData?(): any;
/** [Method] Returns the submit value for the checkbox which can be used when submitting forms */
getSubmitValue?(): string;
getSubmitValue?(): any;
/** [Method] Returns the checked state of the checkbox */
getValue?(): bool;
/** [Method] private */
@@ -18881,7 +18879,7 @@ declare module Ext.form {
/** [Method] Creates and returns the data object to be used when rendering the fieldSubTpl */
getSubTplData?(): any;
/** [Method] Returns the submit value for the checkbox which can be used when submitting forms */
getSubmitValue?(): string;
getSubmitValue?(): any;
/** [Method] Returns the checked state of the checkbox */
getValue?(): bool;
/** [Method] private */
@@ -20480,7 +20478,7 @@ declare module Ext.form.field {
/** [Method] Returns the value s that should be saved to the Ext data Model instance for this field when Ext form Basic updateRe */
getModelData?(): any;
/** [Method] Returns the submit value for the checkbox which can be used when submitting forms */
getSubmitValue?(): string;
getSubmitValue?(): any;
/** [Method] Method to manage awareness of when components are removed from their respective Container firing a removed event */
onRemoved?(): void;
/** [Method] Sets either the checked unchecked status of this Radio or if a string value is passed checks a sibling Radio of th
@@ -20504,7 +20502,7 @@ declare module Ext.form {
/** [Method] Returns the value s that should be saved to the Ext data Model instance for this field when Ext form Basic updateRe */
getModelData?(): any;
/** [Method] Returns the submit value for the checkbox which can be used when submitting forms */
getSubmitValue?(): string;
getSubmitValue?(): any;
/** [Method] Method to manage awareness of when components are removed from their respective Container firing a removed event */
onRemoved?(): void;
/** [Method] Sets either the checked unchecked status of this Radio or if a string value is passed checks a sibling Radio of th
@@ -32643,7 +32641,7 @@ declare module Ext.slider {
/** [Method] private override */
getSubTplData?(): any;
/** [Method] Returns the value that would be included in a standard form submit for this field */
getSubmitValue?(): string;
getSubmitValue?(): any;
/** [Method] Returns the current value of the slider
* @param index Number The index of the thumb to return a value for
*/
@@ -32731,7 +32729,7 @@ declare module Ext.slider {
/** [Method] private override */
getSubTplData?(): any;
/** [Method] Returns the value that would be included in a standard form submit for this field */
getSubmitValue?(): string;
getSubmitValue?(): any;
/** [Method] Returns the current value of the slider
* @param index Number The index of the thumb to return a value for
*/
@@ -33663,14 +33661,10 @@ declare module Ext.tip {
cancelShow?( el?:string ): void;
cancelShow?( el?:HTMLElement ): void;
cancelShow?( el?:Ext.IElement ): void;
/** [Method] Hides this tooltip if visible */
hide?(): void;
/** [Method] Configures a new quick tip instance and assigns it to a target element
* @param config Object The config object with the following properties:
*/
register?( config?:any ): void;
/** [Method] Shows this tooltip at the current event target XY position */
show?(): void;
/** [Method] Removes this quick tip from its element and destroys it
* @param el String/HTMLElement/Ext.Element The element from which the quick tip is to be removed or ID of the element.
*/
@@ -33695,14 +33689,10 @@ declare module Ext {
cancelShow?( el?:string ): void;
cancelShow?( el?:HTMLElement ): void;
cancelShow?( el?:Ext.IElement ): void;
/** [Method] Hides this tooltip if visible */
hide?(): void;
/** [Method] Configures a new quick tip instance and assigns it to a target element
* @param config Object The config object with the following properties:
*/
register?( config?:any ): void;
/** [Method] Shows this tooltip at the current event target XY position */
show?(): void;
/** [Method] Removes this quick tip from its element and destroys it
* @param el String/HTMLElement/Ext.Element The element from which the quick tip is to be removed or ID of the element.
*/
@@ -33970,11 +33960,6 @@ declare module Ext.tip {
trackMouse?: bool;
/** [Property] (HTMLElement) */
triggerElement?: HTMLElement;
/** [Method] Hides this tooltip if visible */
hide? (animateTarget?: any, callback?: any, scope?: any): any;
hide? (animateTarget?: string, callback?: any, scope?: any): Ext.IComponent;
hide? (animateTarget?: Ext.IElement, callback?: any, scope?: any): Ext.IComponent;
hide? (animateTarget?: Ext.IComponent, callback?: any, scope?: any): Ext.IComponent;
/** [Method] Binds this ToolTip to the specified element
* @param t String/HTMLElement/Ext.Element The Element, HtmlElement, or ID of an element to bind to
*/
@@ -33982,10 +33967,6 @@ declare module Ext.tip {
setTarget?( t?:string ): void;
setTarget?( t?:HTMLElement ): void;
setTarget?( t?:Ext.IElement ): void;
/** [Method] Shows this tooltip at the current event target XY position */
show? (animateTarget?: any, callback?: any, scope?: any): any;
show? (animateTarget?: string, callback?: any, scope?: any): Ext.IComponent;
show? (animateTarget?: Ext.IElement, callback?: any, scope?: any): Ext.IComponent;
}
}
declare module Ext {
@@ -34014,11 +33995,6 @@ declare module Ext {
trackMouse?: bool;
/** [Property] (HTMLElement) */
triggerElement?: HTMLElement;
/** [Method] Hides this tooltip if visible */
hide? (animateTarget?: any, callback?: any, scope?: any): any;
hide? (animateTarget?: string, callback?: any, scope?: any): Ext.IComponent;
hide? (animateTarget?: Ext.IElement, callback?: any, scope?: any): Ext.IComponent;
hide? (animateTarget?: Ext.IComponent, callback?: any, scope?: any): Ext.IComponent;
/** [Method] Binds this ToolTip to the specified element
* @param t String/HTMLElement/Ext.Element The Element, HtmlElement, or ID of an element to bind to
*/
@@ -34026,10 +34002,6 @@ declare module Ext {
setTarget?( t?:string ): void;
setTarget?( t?:HTMLElement ): void;
setTarget?( t?:Ext.IElement ): void;
/** [Method] Shows this tooltip at the current event target XY position */
show? (animateTarget?: any, callback?: any, scope?: any): any;
show? (animateTarget?: string, callback?: any, scope?: any): Ext.IComponent;
show? (animateTarget?: Ext.IElement, callback?: any, scope?: any): Ext.IComponent;
}
}
declare module Ext.toolbar {
@@ -38262,8 +38234,6 @@ declare module Ext {
* @param parent Object
*/
applyOut?( values?:any, out?:any, parent?:any ): any[];
/** [Method] Does nothing */
compile?(): Ext.IXTemplate;
/** [Method] Gets an XTemplate from an object an instance of an Ext define d class
* @param instance Object The object from which to get the XTemplate (must be an instance of an Ext.define'd class).
* @param name String The name of the property by which to get the XTemplate.
+53 -247
View File
@@ -69,8 +69,7 @@ declare module Ext {
/** [Method] Returns the value of baseCls */
getBaseCls?(): string;
/** [Method] Returns the value of bottom */
getBottom? (): any;
getBottom? (): number;
getBottom?(): number;
/** [Method] Returns the value of defaultType */
getDefaultType?(): string;
/** [Method] Returns the value of height */
@@ -1895,7 +1894,7 @@ declare module Ext {
*/
createAlias?( alias?:any, origin?:any ): void;
/** [Method] Get the current class name in string format */
getName?(): string;
getName?(): any;
/** [Method] Override members of this class
* @param members Object The properties to add to this class. This should be specified as an object literal containing one or more properties.
*/
@@ -2135,7 +2134,7 @@ declare module Ext.carousel {
/** [Method] Returns the value of directionLock */
getDirectionLock?(): bool;
/** [Method] Returns the value of indicator */
getIndicator?(): bool;
getIndicator?(): any;
/** [Method] Returns the value of itemConfig */
getItemConfig?(): any;
/** [Method] Returns the value of itemLength */
@@ -2215,7 +2214,7 @@ declare module Ext {
/** [Method] Returns the value of directionLock */
getDirectionLock?(): bool;
/** [Method] Returns the value of indicator */
getIndicator?(): bool;
getIndicator?(): any;
/** [Method] Returns the value of itemConfig */
getItemConfig?(): any;
/** [Method] Returns the value of itemLength */
@@ -2295,7 +2294,7 @@ declare module Ext.carousel {
/** [Config Option] (Boolean) */
indicator?: bool;
/** [Method] Returns the value of indicator */
getIndicator?(): boolean;
getIndicator?(): any;
/** [Method] Returns the value of innerItemConfig */
getInnerItemConfig?(): any;
/** [Method] Returns the value of maxItemIndex */
@@ -4331,9 +4330,6 @@ declare module Ext.chart.series {
getDonut?(): bool;
/** [Method] Returns the value of donut */
getDonut?(): number;
/** [Method] Returns the value of hidden */
getHidden? (): boolean;
getHidden? (): any[];
/** [Method] For a given x y point relative to the main region find a corresponding item from this series if any
* @param x Object
* @param y Object
@@ -5254,9 +5250,6 @@ declare module Ext.chart.series {
hidden?: any[];
/** [Config Option] (Boolean) */
stacked?: bool;
/** [Method] Returns the value of hidden */
getHidden? (): boolean;
getHidden?(): any[];
/** [Method] For a given x y point relative to the main region find a corresponding item from this series if any
* @param x Object
* @param y Object
@@ -5514,15 +5507,11 @@ declare module Ext {
/** [Method] Returns the value of border */
getBorder?(): string;
/** [Method] Returns the value of bottom */
getBottom?(): number;
/** [Method] Returns the value of bottom */
getBottom?(): string;
getBottom?(): any;
/** [Method] Returns the value of centered */
getCentered?(): bool;
/** [Method] Returns the value of cls */
getCls?(): string;
/** [Method] Returns the value of cls */
getCls?(): string[];
getCls?(): any;
/** [Method] Returns the value of contentEl */
getContentEl?(): Ext.IElement;
/** [Method] Returns the value of contentEl */
@@ -6049,15 +6038,11 @@ declare module Ext.lib {
/** [Method] Returns the value of border */
getBorder?(): string;
/** [Method] Returns the value of bottom */
getBottom?(): number;
/** [Method] Returns the value of bottom */
getBottom?(): string;
getBottom?(): any;
/** [Method] Returns the value of centered */
getCentered?(): bool;
/** [Method] Returns the value of cls */
getCls?(): string;
/** [Method] Returns the value of cls */
getCls?(): string[];
getCls?(): any;
/** [Method] Returns the value of contentEl */
getContentEl?(): Ext.IElement;
/** [Method] Returns the value of contentEl */
@@ -7027,7 +7012,7 @@ declare module Ext.data.association {
/** [Method] Returns the value of associationKey */
getAssociationKey?(): string;
/** [Method] Returns the value of name */
getName?(): string;
getName?(): any;
/** [Method] Returns the value of ownerModel */
getOwnerModel?(): Ext.data.IModel;
/** [Method] Returns the value of ownerModel */
@@ -7103,7 +7088,7 @@ declare module Ext.data {
/** [Method] Returns the value of associationKey */
getAssociationKey?(): string;
/** [Method] Returns the value of name */
getName?(): string;
getName?(): any;
/** [Method] Returns the value of ownerModel */
getOwnerModel?(): Ext.data.IModel;
/** [Method] Returns the value of ownerModel */
@@ -8657,8 +8642,10 @@ declare module Ext.data {
setData?( rawData?:any ): Ext.data.IModel;
/** [Method] Marks this Record as dirty */
setDirty?(): void;
/** [Method] Updates the collection of Fields that all instances of this Model use */
setFields? (fields?: any[]): void;
/** [Method] Updates the collection of Fields that all instances of this Model use
* @param fields Array
*/
setFields?( fields?:any[] ): any;
/** [Method] Sets the value of hasMany
* @param hasMany String/Object/String[]/Object[]
*/
@@ -9052,8 +9039,10 @@ declare module Ext.data {
setData?( rawData?:any ): Ext.data.IModel;
/** [Method] Marks this Record as dirty */
setDirty?(): void;
/** [Method] Updates the collection of Fields that all instances of this Model use */
setFields?(): any[];
/** [Method] Updates the collection of Fields that all instances of this Model use
* @param fields Array
*/
setFields?( fields?:any[] ): any;
/** [Method] Sets the value of hasMany
* @param hasMany String/Object/String[]/Object[]
*/
@@ -11313,9 +11302,9 @@ declare module Ext.data.reader {
/** [Config Option] (String) */
totalProperty?: string;
/** [Method] Returns the value of successProperty */
getSuccessProperty?(): string;
getSuccessProperty?(): any;
/** [Method] Returns the value of totalProperty */
getTotalProperty?(): string;
getTotalProperty?(): any;
/** [Method] Sets the value of successProperty
* @param successProperty Object
*/
@@ -11333,9 +11322,9 @@ declare module Ext.data {
/** [Config Option] (String) */
totalProperty?: string;
/** [Method] Returns the value of successProperty */
getSuccessProperty?(): string;
getSuccessProperty?(): any;
/** [Method] Returns the value of totalProperty */
getTotalProperty?(): string;
getTotalProperty?(): any;
/** [Method] Sets the value of successProperty
* @param successProperty Object
*/
@@ -11501,9 +11490,9 @@ declare module Ext.data.reader {
/** [Method] Returns the value of rootProperty */
getRootProperty?(): string;
/** [Method] Returns the value of successProperty */
getSuccessProperty?(): string;
getSuccessProperty?(): any;
/** [Method] Returns the value of totalProperty */
getTotalProperty?(): string;
getTotalProperty?(): any;
/** [Method] Checks to see if this object has any listeners for a specified event
* @param eventName String The name of the event to check for
*/
@@ -11784,9 +11773,9 @@ declare module Ext.data {
/** [Method] Returns the value of rootProperty */
getRootProperty?(): string;
/** [Method] Returns the value of successProperty */
getSuccessProperty?(): string;
getSuccessProperty?(): any;
/** [Method] Returns the value of totalProperty */
getTotalProperty?(): string;
getTotalProperty?(): any;
/** [Method] Checks to see if this object has any listeners for a specified event
* @param eventName String The name of the event to check for
*/
@@ -12067,9 +12056,9 @@ declare module Ext.data {
/** [Method] Returns the value of rootProperty */
getRootProperty?(): string;
/** [Method] Returns the value of successProperty */
getSuccessProperty?(): string;
getSuccessProperty?(): any;
/** [Method] Returns the value of totalProperty */
getTotalProperty?(): string;
getTotalProperty?(): any;
/** [Method] Checks to see if this object has any listeners for a specified event
* @param eventName String The name of the event to check for
*/
@@ -14607,9 +14596,6 @@ declare module Ext.dataview.component {
getItems?(): any[];
/** [Method] Returns the value of record */
getRecord?(): Ext.data.IModel;
/** [Method] Returns the value of width */
getWidth? (): number;
getWidth?(): string;
/** [Method] Sets the value of baseCls
* @param baseCls String
*/
@@ -14662,16 +14648,6 @@ declare module Ext.dataview.component {
getDisclosure?(): any;
/** [Method] Returns the value of header */
getHeader?(): any;
/** [Method] Returns the value of items */
getItems? (): any[];
/** [Method] Returns the value of tpl */
getTpl? (): string;
/** [Method] Returns the value of tpl */
getTpl? (): string[];
/** [Method] Returns the value of tpl */
getTpl? (): Ext.ITemplate[];
/** [Method] Returns the value of tpl */
getTpl? (): Ext.IXTemplate[];
/** [Method] Sets the value of baseCls
* @param baseCls String
*/
@@ -15618,8 +15594,6 @@ declare module Ext.dataview {
getRefreshHeightOnUpdate?(): bool;
/** [Method] Returns all the items that are docked in the scroller in this list */
getScrollDockedItems?(): any[];
/** [Method] Returns the value of scrollable */
getScrollable?(): boolean;
/** [Method] Returns the value of striped */
getStriped?(): bool;
/** [Method] Returns the value of ui */
@@ -15776,8 +15750,6 @@ declare module Ext {
getRefreshHeightOnUpdate?(): bool;
/** [Method] Returns all the items that are docked in the scroller in this list */
getScrollDockedItems?(): any[];
/** [Method] Returns the value of scrollable */
getScrollable?(): boolean;
/** [Method] Returns the value of striped */
getStriped?(): bool;
/** [Method] Returns the value of ui */
@@ -15974,8 +15946,6 @@ declare module Ext.dataview {
getTitleTextTpl?( node?:Ext.data.IRecord ): string;
/** [Method] Returns the value of toolbar */
getToolbar?(): any;
/** [Method] Returns the value of ui */
getUi?(): string;
/** [Method] Returns the value of updateTitleText */
getUpdateTitleText?(): bool;
/** [Method] Returns the value of useSimpleItems */
@@ -16185,8 +16155,6 @@ declare module Ext {
getTitleTextTpl?( node?:Ext.data.IRecord ): string;
/** [Method] Returns the value of toolbar */
getToolbar?(): any;
/** [Method] Returns the value of ui */
getUi?(): string;
/** [Method] Returns the value of updateTitleText */
getUpdateTitleText?(): bool;
/** [Method] Returns the value of useSimpleItems */
@@ -20221,7 +20189,7 @@ declare module Ext.direct {
/** [Method] Returns the value of len */
getLen?(): any;
/** [Method] Returns the value of name */
getName?(): string;
getName?(): any;
/** [Method] Returns the value of ordered */
getOrdered?(): bool;
/** [Method] Returns the value of params */
@@ -20521,21 +20489,6 @@ declare module Ext.dom {
findParentNode?( simpleSelector?:string, maxDepth?:string, returnEl?:bool ): any;
findParentNode?( simpleSelector?:string, maxDepth?:HTMLElement, returnEl?:bool ): any;
findParentNode?( simpleSelector?:string, maxDepth?:Ext.IElement, returnEl?:bool ): any;
/** [Method] Gets the first child skipping text nodes
* @param selector String Find the next sibling that matches the passed simple selector.
* @param returnDom Boolean true to return a raw DOM node instead of an Ext.dom.Element.
*/
first? (selector?: string, returnDom?: bool): Ext.dom.IElement;
/** [Method] Gets the first child skipping text nodes
* @param selector String Find the next sibling that matches the passed simple selector.
* @param returnDom Boolean true to return a raw DOM node instead of an Ext.dom.Element.
*/
first? (selector?: string, returnDom?: bool): HTMLElement;
/** [Method] Gets the first child skipping text nodes
* @param selector String Find the next sibling that matches the passed simple selector.
* @param returnDom Boolean true to return a raw DOM node instead of an Ext.dom.Element.
*/
first? (selector?: string, returnDom?: bool): any;
/** [Method] Gets the x y coordinates to align this element with another element
* @param element Mixed The element to align to.
* @param position String The position to align to.
@@ -20705,22 +20658,7 @@ declare module Ext.dom {
/** [Method] Returns a flyweight Element of the dom element object at the specified index
* @param index Number
*/
item? (index?: number): Ext.dom.IElement;
/** [Method] Gets the last child skipping text nodes
* @param selector String Find the previous sibling that matches the passed simple selector.
* @param returnDom Boolean true to return a raw DOM node instead of an Ext.dom.Element.
*/
last? (selector?: string, returnDom?: bool): Ext.dom.IElement;
/** [Method] Gets the last child skipping text nodes
* @param selector String Find the previous sibling that matches the passed simple selector.
* @param returnDom Boolean true to return a raw DOM node instead of an Ext.dom.Element.
*/
last? (selector?: string, returnDom?: bool): HTMLElement;
/** [Method] Gets the last child skipping text nodes
* @param selector String Find the previous sibling that matches the passed simple selector.
* @param returnDom Boolean true to return a raw DOM node instead of an Ext.dom.Element.
*/
last? (selector?: string, returnDom?: bool): any;
item?( index?:number ): Ext.dom.IElement;
/** [Method] Puts a mask over this element to disable user interaction */
mask?(): void;
/** [Method] Gets the next sibling skipping text nodes
@@ -21139,22 +21077,7 @@ declare module Ext {
findParentNode?( simpleSelector?:string, maxDepth?:number, returnEl?:bool ): any;
findParentNode?( simpleSelector?:string, maxDepth?:string, returnEl?:bool ): any;
findParentNode?( simpleSelector?:string, maxDepth?:HTMLElement, returnEl?:bool ): any;
findParentNode? (simpleSelector?: string, maxDepth?: Ext.IElement, returnEl?: bool): any;
/** [Method] Gets the first child skipping text nodes
* @param selector String Find the next sibling that matches the passed simple selector.
* @param returnDom Boolean true to return a raw DOM node instead of an Ext.dom.Element.
*/
first? (selector?: string, returnDom?: bool): Ext.dom.IElement;
/** [Method] Gets the first child skipping text nodes
* @param selector String Find the next sibling that matches the passed simple selector.
* @param returnDom Boolean true to return a raw DOM node instead of an Ext.dom.Element.
*/
first? (selector?: string, returnDom?: bool): HTMLElement;
/** [Method] Gets the first child skipping text nodes
* @param selector String Find the next sibling that matches the passed simple selector.
* @param returnDom Boolean true to return a raw DOM node instead of an Ext.dom.Element.
*/
first? (selector?: string, returnDom?: bool): any;
findParentNode?( simpleSelector?:string, maxDepth?:Ext.IElement, returnEl?:bool ): any;
/** [Method] Gets the x y coordinates to align this element with another element
* @param element Mixed The element to align to.
* @param position String The position to align to.
@@ -21324,22 +21247,7 @@ declare module Ext {
/** [Method] Returns a flyweight Element of the dom element object at the specified index
* @param index Number
*/
item? (index?: number): Ext.dom.IElement;
/** [Method] Gets the last child skipping text nodes
* @param selector String Find the previous sibling that matches the passed simple selector.
* @param returnDom Boolean true to return a raw DOM node instead of an Ext.dom.Element.
*/
last? (selector?: string, returnDom?: bool): Ext.dom.IElement;
/** [Method] Gets the last child skipping text nodes
* @param selector String Find the previous sibling that matches the passed simple selector.
* @param returnDom Boolean true to return a raw DOM node instead of an Ext.dom.Element.
*/
last? (selector?: string, returnDom?: bool): HTMLElement;
/** [Method] Gets the last child skipping text nodes
* @param selector String Find the previous sibling that matches the passed simple selector.
* @param returnDom Boolean true to return a raw DOM node instead of an Ext.dom.Element.
*/
last? (selector?: string, returnDom?: bool): any;
item?( index?:number ): Ext.dom.IElement;
/** [Method] Puts a mask over this element to disable user interaction */
mask?(): void;
/** [Method] Gets the next sibling skipping text nodes
@@ -21758,22 +21666,7 @@ declare module Ext {
findParentNode?( simpleSelector?:string, maxDepth?:number, returnEl?:bool ): any;
findParentNode?( simpleSelector?:string, maxDepth?:string, returnEl?:bool ): any;
findParentNode?( simpleSelector?:string, maxDepth?:HTMLElement, returnEl?:bool ): any;
findParentNode? (simpleSelector?: string, maxDepth?: Ext.IElement, returnEl?: bool): any;
/** [Method] Gets the first child skipping text nodes
* @param selector String Find the next sibling that matches the passed simple selector.
* @param returnDom Boolean true to return a raw DOM node instead of an Ext.dom.Element.
*/
first? (selector?: string, returnDom?: bool): Ext.dom.IElement;
/** [Method] Gets the first child skipping text nodes
* @param selector String Find the next sibling that matches the passed simple selector.
* @param returnDom Boolean true to return a raw DOM node instead of an Ext.dom.Element.
*/
first? (selector?: string, returnDom?: bool): HTMLElement;
/** [Method] Gets the first child skipping text nodes
* @param selector String Find the next sibling that matches the passed simple selector.
* @param returnDom Boolean true to return a raw DOM node instead of an Ext.dom.Element.
*/
first? (selector?: string, returnDom?: bool): any;
findParentNode?( simpleSelector?:string, maxDepth?:Ext.IElement, returnEl?:bool ): any;
/** [Method] Gets the x y coordinates to align this element with another element
* @param element Mixed The element to align to.
* @param position String The position to align to.
@@ -21943,22 +21836,7 @@ declare module Ext {
/** [Method] Returns a flyweight Element of the dom element object at the specified index
* @param index Number
*/
item? (index?: number): Ext.dom.IElement;
/** [Method] Gets the last child skipping text nodes
* @param selector String Find the previous sibling that matches the passed simple selector.
* @param returnDom Boolean true to return a raw DOM node instead of an Ext.dom.Element.
*/
last? (selector?: string, returnDom?: bool): Ext.dom.IElement;
/** [Method] Gets the last child skipping text nodes
* @param selector String Find the previous sibling that matches the passed simple selector.
* @param returnDom Boolean true to return a raw DOM node instead of an Ext.dom.Element.
*/
last? (selector?: string, returnDom?: bool): HTMLElement;
/** [Method] Gets the last child skipping text nodes
* @param selector String Find the previous sibling that matches the passed simple selector.
* @param returnDom Boolean true to return a raw DOM node instead of an Ext.dom.Element.
*/
last? (selector?: string, returnDom?: bool): any;
item?( index?:number ): Ext.dom.IElement;
/** [Method] Puts a mask over this element to disable user interaction */
mask?(): void;
/** [Method] Gets the next sibling skipping text nodes
@@ -24436,8 +24314,7 @@ declare module Ext.draw {
/** [Method] Returns the value of background */
getBackground?(): any;
/** [Method] Returns the value of cls */
getCls? (): string;
getCls? (): string[];
getCls?(): string;
/** [Method] Returns the value of fitSurface */
getFitSurface?(): bool;
/** [Method] Returns the value of resizeHandler */
@@ -28284,8 +28161,7 @@ declare module Ext.field {
/** [Method] Returns the checked value of this field */
getChecked?(): any;
/** [Method] Returns the value of cls */
getCls? (): string;
getCls? (): string[];
getCls?(): string;
/** [Method] Returns the value of disabled */
getDisabled?(): bool;
/** [Method] Returns the value of focusCls */
@@ -28916,8 +28792,7 @@ declare module Ext.field {
/** [Config Option] (Number/Number[]) */
values?: any;
/** [Method] Returns the value of cls */
getCls? (): string;
getCls? (): string[];
getCls?(): string;
/** [Method] Returns the value of increment */
getIncrement?(): number;
/** [Method] Returns the value of maxValue */
@@ -28926,8 +28801,6 @@ declare module Ext.field {
getMinValue?(): number;
/** [Method] Returns the value of readOnly */
getReadOnly?(): bool;
/** [Method] Returns the value of tabIndex */
getTabIndex?(): number;
/** [Method] Returns the value of value */
getValue?(): number;
/** [Method] Returns the value of value */
@@ -28993,8 +28866,7 @@ declare module Ext.form {
/** [Config Option] (Number/Number[]) */
values?: any;
/** [Method] Returns the value of cls */
getCls? (): string;
getCls? (): string[];
getCls?(): string;
/** [Method] Returns the value of increment */
getIncrement?(): number;
/** [Method] Returns the value of maxValue */
@@ -29003,8 +28875,6 @@ declare module Ext.form {
getMinValue?(): number;
/** [Method] Returns the value of readOnly */
getReadOnly?(): bool;
/** [Method] Returns the value of tabIndex */
getTabIndex? (): number;
/** [Method] Returns the value of value */
getValue?(): number;
/** [Method] Returns the value of value */
@@ -29078,8 +28948,7 @@ declare module Ext.field {
/** [Method] Returns the value of accelerateOnTapHold */
getAccelerateOnTapHold?(): bool;
/** [Method] Returns the value of cls */
getCls? (): string;
getCls? (): string[];
getCls?(): string;
/** [Method] Returns the value of component */
getComponent?(): any;
/** [Method] Returns the value of cycle */
@@ -29165,8 +29034,7 @@ declare module Ext.form {
/** [Method] Returns the value of accelerateOnTapHold */
getAccelerateOnTapHold?(): bool;
/** [Method] Returns the value of cls */
getCls? (): string;
getCls? (): string[];
getCls?(): string;
/** [Method] Returns the value of component */
getComponent?(): any;
/** [Method] Returns the value of cycle */
@@ -29259,9 +29127,6 @@ declare module Ext.field {
getAutoComplete?(): bool;
/** [Method] Returns the value of autoCorrect */
getAutoCorrect?(): bool;
/** [Method] Returns the value of bubbleEvents */
getBubbleEvents? (): string;
getBubbleEvents?(): string[];
/** [Method] Returns the value of clearIcon */
getClearIcon?(): bool;
/** [Method] Returns the value of component */
@@ -29360,9 +29225,6 @@ declare module Ext.form {
getAutoComplete?(): bool;
/** [Method] Returns the value of autoCorrect */
getAutoCorrect?(): bool;
/** [Method] Returns the value of bubbleEvents */
getBubbleEvents? (): string;
getBubbleEvents? (): string[];
/** [Method] Returns the value of clearIcon */
getClearIcon?(): bool;
/** [Method] Returns the value of component */
@@ -29518,8 +29380,7 @@ declare module Ext.field {
/** [Property] (String) */
toggleOnLabel?: string;
/** [Method] Returns the value of cls */
getCls? (): string;
getCls? (): string[];
getCls?(): string;
/** [Method] Returns the value of labelAlign */
getLabelAlign?(): string;
/** [Method] Returns the value of maxValueCls */
@@ -29569,8 +29430,7 @@ declare module Ext.form {
/** [Property] (String) */
toggleOnLabel?: string;
/** [Method] Returns the value of cls */
getCls? (): string;
getCls? (): string[];
getCls?(): string;
/** [Method] Returns the value of labelAlign */
getLabelAlign?(): string;
/** [Method] Returns the value of maxValueCls */
@@ -32279,14 +32139,10 @@ declare module Ext {
getButtons?(): any;
/** [Method] Returns the value of defaultTextHeight */
getDefaultTextHeight?(): number;
/** [Method] Returns the value of hideAnimation */
getHideAnimation?(): any;
/** [Method] Returns the value of layout */
getLayout?(): any;
/** [Method] Returns the value of prompt */
getPrompt?(): any;
/** [Method] Returns the value of showAnimation */
getShowAnimation?(): any;
/** [Method] Returns the value of title */
getTitle?(): string;
/** [Method] Returns the value of ui */
@@ -34614,8 +34470,7 @@ declare module Ext.picker {
/** [Method] Returns the value of baseCls */
getBaseCls?(): string;
/** [Method] Returns the value of bottom */
getBottom? (): number;
getBottom? (): string;
getBottom?(): number;
/** [Method] Returns the value of cancelButton */
getCancelButton?(): string;
/** [Method] Returns the value of cancelButton */
@@ -34626,17 +34481,8 @@ declare module Ext.picker {
getDoneButton?(): string;
/** [Method] Returns the value of doneButton */
getDoneButton?(): any;
/** [Method] Returns the value of height */
getHeight? (): number;
getHeight? (): string;
/** [Method] Returns the value of layout */
getLayout?(): any;
/** [Method] Returns the value of left */
getLeft? (): number;
getLeft? (): string;
/** [Method] Returns the value of right */
getRight? (): number;
getRight? (): string;
/** [Method] Returns the value of slots */
getSlots?(): any[];
/** [Method] Returns the value of toolbar */
@@ -34757,8 +34603,7 @@ declare module Ext {
/** [Method] Returns the value of baseCls */
getBaseCls?(): string;
/** [Method] Returns the value of bottom */
getBottom? (): number;
getBottom? (): string;
getBottom?(): number;
/** [Method] Returns the value of cancelButton */
getCancelButton?(): string;
/** [Method] Returns the value of cancelButton */
@@ -34769,17 +34614,8 @@ declare module Ext {
getDoneButton?(): string;
/** [Method] Returns the value of doneButton */
getDoneButton?(): any;
/** [Method] Returns the value of height */
getHeight? (): number;
getHeight? (): string;
/** [Method] Returns the value of layout */
getLayout?(): any;
/** [Method] Returns the value of left */
getLeft? (): number;
getLeft? (): string;
/** [Method] Returns the value of right */
getRight? (): number;
getRight? (): string;
/** [Method] Returns the value of slots */
getSlots?(): any[];
/** [Method] Returns the value of toolbar */
@@ -34886,13 +34722,7 @@ declare module Ext.picker {
/** [Method] Returns the value of align */
getAlign?(): string;
/** [Method] Returns the value of displayField */
getDisplayField? (): string;
/** [Method] Returns the value of itemTpl */
getItemTpl? (): string;
/** [Method] Returns the value of itemTpl */
getItemTpl? (): string[];
/** [Method] Returns the value of itemTpl */
getItemTpl? (): Ext.IXTemplate;
getDisplayField?(): string;
/** [Method] Returns the value of name */
getName?(): string;
/** [Method] Returns the value of title */
@@ -35150,8 +34980,7 @@ declare module Ext.scroll.indicator {
/** [Config Option] (String/String[]) */
cls?: any;
/** [Method] Returns the value of cls */
getCls? (): string;
getCls? (): string[];
getCls?(): string;
/** [Method] Sets the value of cls
* @param cls String
*/
@@ -35171,8 +35000,7 @@ declare module Ext.scroll.indicator {
/** [Config Option] (String/String[]) */
cls?: any;
/** [Method] Returns the value of cls */
getCls? (): string;
getCls? (): string[];
getCls?(): string;
/** [Method] Sets the value of cls
* @param cls String
*/
@@ -35184,8 +35012,7 @@ declare module Ext.scroll.indicator {
/** [Config Option] (String/String[]) */
cls?: any;
/** [Method] Returns the value of cls */
getCls? (): string;
getCls? (): string[];
getCls?(): string;
/** [Method] Sets the value of cls
* @param cls String
*/
@@ -35489,14 +35316,8 @@ declare module Ext {
getEnter?(): string;
/** [Method] Returns the value of exit */
getExit?(): string;
/** [Method] Returns the value of hideAnimation */
getHideAnimation? (): string;
getHideAnimation?(): any;
/** [Method] Returns the value of modal */
getModal?(): bool;
/** [Method] Returns the value of showAnimation */
getShowAnimation? (): any;
getShowAnimation? (): string;
/** [Method] Returns the value of stretchX */
getStretchX?(): bool;
/** [Method] Returns the value of stretchY */
@@ -35709,9 +35530,6 @@ declare module Ext {
width?: number;
/** [Method] Returns the value of flex */
getFlex?(): number;
/** [Method] Returns the value of width */
getWidth? (): number;
getWidth? (): string;
/** [Method] Sets the value of flex
* @param flex Number
*/
@@ -35878,8 +35696,7 @@ declare module Ext.tab {
*/
doTabChange?( tabBar?:any, newTab?:any ): bool;
/** [Method] Returns the value of cls */
getCls? (): string;
getCls? (): string[];
getCls?(): string;
/** [Method] Returns the value of layout */
getLayout?(): any;
/** [Method] Returns the value of tabBar */
@@ -35937,8 +35754,7 @@ declare module Ext {
*/
doTabChange?( tabBar?:any, newTab?:any ): bool;
/** [Method] Returns the value of cls */
getCls? (): string;
getCls? (): string[];
getCls?(): string;
/** [Method] Returns the value of layout */
getLayout?(): any;
/** [Method] Returns the value of tabBar */
@@ -36279,15 +36095,11 @@ declare module Ext {
/** [Method] Returns the value of baseCls */
getBaseCls?(): string;
/** [Method] Returns the value of cls */
getCls? (): string;
getCls? (): string[];
getCls?(): string;
/** [Method] Returns the value of defaultType */
getDefaultType?(): string;
/** [Method] Returns the value of items */
getItems?(): any;
/** [Method] Returns the value of minHeight */
getMinHeight? (): string;
getMinHeight? (): number;
/** [Method] Returns the value of title */
getTitle?(): string;
/** [Method] Returns the value of ui */
@@ -36350,9 +36162,6 @@ declare module Ext {
getDocked?(): string;
/** [Method] Returns the value of layout */
getLayout?(): any;
/** [Method] Returns the value of minHeight */
getMinHeight? (): string;
getMinHeight? (): number;
/** [Method] Returns an Ext Title component */
getTitle?(): Ext.ITitle;
/** [Method] Returns the value of ui */
@@ -38974,8 +38783,7 @@ declare module Ext {
/** [Method] Returns the value of url */
getUrl?(): string;
/** [Method] Returns the value of url */
getUrl? (): any[];
getCls? (): string[];
getUrl?(): any[];
/** [Method] Allows addition of behavior to the rendering phase */
initialize?(): void;
/** [Method] Sets the value of cls
@@ -39932,8 +39740,6 @@ declare module Ext {
* @param parent Object
*/
applyOut?( values?:any, out?:any[], parent?:any ): any[];
/** [Method] Does nothing */
compile?(): Ext.IXTemplate;
/** [Method] Gets an XTemplate from an object an instance of an Ext define d class
* @param instance Object The object from which to get the XTemplate (must be an instance of an Ext.define'd class).
* @param name String The name of the property by which to get the XTemplate.
+525
View File
@@ -0,0 +1,525 @@
///<reference path="SharePoint.d.ts" />
// Website tasks
function retrieveWebsite(resultpanel:HTMLElement) {
var clientContext = SP.ClientContext.get_current();
var oWebsite = clientContext.get_web();
clientContext.load(oWebsite);
clientContext.executeQueryAsync(
successHandler,
errorHandler
);
function successHandler() {
resultpanel.innerHTML = "Web site title: " + oWebsite.get_title();
}
function errorHandler() {
resultpanel.innerHTML = "Request failed: " + arguments[1].get_message();
}
}
function retrieveWebsiteProps(resultpanel: HTMLElement) {
var clientContext = SP.ClientContext.get_current();
var oWebsite = clientContext.get_web();
clientContext.load(oWebsite, "Description", "Created");
clientContext.executeQueryAsync(successHandler,errorHandler);
function successHandler() {
resultpanel.innerHTML = "Description: " + oWebsite.get_description() +
"<br/>Date created: " + oWebsite.get_created();
}
function errorHandler() {
resultpanel.innerHTML = "Request failed: " + arguments[1].get_message();
}
}
function writeWebsiteProps(resultpanel: HTMLElement) {
var clientContext = SP.ClientContext.get_current();
var oWebsite = clientContext.get_web();
oWebsite.set_description("This is an updated description.");
oWebsite.update();
clientContext.load(oWebsite, "Description");
clientContext.executeQueryAsync(
successHandler,
errorHandler
);
function successHandler() {
resultpanel.innerHTML = "Web site description: " + oWebsite.get_description();
}
function errorHandler() {
resultpanel.innerHTML = "Request failed: " + arguments[1].get_message();
}
}
// Lists tasks
function readAllProps(resultpanel: HTMLElement) {
var clientContext = SP.ClientContext.get_current();
var oWebsite = clientContext.get_web();
var collList = oWebsite.get_lists();
clientContext.load(collList);
clientContext.executeQueryAsync(
successHandler,
errorHandler
);
function successHandler() {
var listEnumerator = collList.getEnumerator();
var listInfo = "";
while (listEnumerator.moveNext()) {
var oList = listEnumerator.get_current();
listInfo += "Title: " + oList.get_title() + " Created: " +
oList.get_created().toString() + "<br/>";
}
resultpanel.innerHTML = listInfo;
}
function errorHandler() {
resultpanel.innerHTML = "Request failed: " + arguments[1].get_message();
}
}
function readSpecificProps(resultpanel: HTMLElement) {
var clientContext = SP.ClientContext.get_current();
var oWebsite = clientContext.get_web();
var collList = oWebsite.get_lists();
clientContext.load(collList, "Include(Title, Id)");
clientContext.executeQueryAsync(
successHandler,
errorHandler
);
function successHandler() {
var listEnumerator = collList.getEnumerator();
var listInfo = "";
while (listEnumerator.moveNext()) {
var oList = listEnumerator.get_current();
listInfo += "Title: " + oList.get_title() +
" ID: " + oList.get_id().toString() + "<br/>";
}
resultpanel.innerHTML = listInfo;
}
function errorHandler() {
resultpanel.innerHTML = "Request failed: " + arguments[1].get_message();
}
}
function readColl(resultpanel: HTMLElement) {
var clientContext = SP.ClientContext.get_current();
var oWebsite = clientContext.get_web();
var collList = oWebsite.get_lists();
var listInfoCollection = clientContext.loadQuery(collList, "Include(Title, Id)");
clientContext.executeQueryAsync(
successHandler,
errorHandler
);
function successHandler() {
var listInfo = "";
for (var i = 0; i < listInfoCollection.length; i++) {
var oList = listInfoCollection[i];
listInfo += "Title: " + oList.get_title() +
" ID: " + oList.get_id().toString() + "<br/>";
}
resultpanel.innerHTML = listInfo;
}
function errorHandler() {
resultpanel.innerHTML = "Request failed: " + arguments[1].get_message();
}
}
function readFilter(resultpanel: HTMLElement) {
var clientContext = SP.ClientContext.get_current();
var oWebsite = clientContext.get_web();
var collList = oWebsite.get_lists();
var listInfoArray = clientContext.loadQuery(collList,
"Include(Title,Fields.Include(Title,InternalName))");
clientContext.executeQueryAsync(
successHandler,
errorHandler
);
function successHandler() {
for (var i = 0; i < listInfoArray.length; i++) {
var oList = listInfoArray[i];
var collField = oList.get_fields();
var fieldEnumerator = collField.getEnumerator();
var listInfo = "";
while (fieldEnumerator.moveNext()) {
var oField = fieldEnumerator.get_current();
var regEx = new RegExp("name", "ig");
if (regEx.test(oField.get_internalName())) {
listInfo += "List: " + oList.get_title() +
"<br/>&nbsp;&nbsp;&nbsp;&nbsp;Field Title: " + oField.get_title() +
"<br/>&nbsp;&nbsp;&nbsp;&nbsp;Field Internal name: " + oField.get_internalName();
}
}
}
resultpanel.innerHTML = listInfo;
}
function errorHandler() {
resultpanel.innerHTML = "Request failed: " + arguments[1].get_message();
}
}
// Create, update and delete lists
function createList(resultpanel: HTMLElement) {
var clientContext = SP.ClientContext.get_current();
var oWebsite = clientContext.get_web();
var listCreationInfo = new SP.ListCreationInformation();
listCreationInfo.set_title("My Announcements List");
listCreationInfo.set_templateType(SP.ListTemplateType.announcements);
var oList = oWebsite.get_lists().add(listCreationInfo);
clientContext.load(oList);
clientContext.executeQueryAsync(
successHandler,
errorHandler
);
function successHandler() {
resultpanel.innerHTML = "Go to the <a href='../Lists/My Announcements List'>list</a>.";
}
function errorHandler() {
resultpanel.innerHTML = "Request failed: " + arguments[1].get_message();
}
}
function updateList(resultpanel: HTMLElement) {
var clientContext = SP.ClientContext.get_current();
var oWebsite = clientContext.get_web();
var oList = oWebsite.get_lists().getByTitle("My Announcements List");
oList.set_description("New Announcements List");
oList.update();
clientContext.load(oList);
clientContext.executeQueryAsync(
successHandler,
errorHandler
);
function successHandler() {
resultpanel.innerHTML = "Check the description in the <a href='../Lists/My Announcements List'>list</a>.";
}
function errorHandler() {
resultpanel.innerHTML = "Request failed: " + arguments[1].get_message();
}
}
function addField(resultpanel: HTMLElement) {
var clientContext = SP.ClientContext.get_current();
var oWebsite = clientContext.get_web();
var oList = oWebsite.get_lists().getByTitle("My Announcements List");
var oField = oList.get_fields().addFieldAsXml(
"<Field DisplayName='MyField' Type='Number' />",
true,
SP.AddFieldOptions.defaultValue
);
var fieldNumber = <SP.FieldNumber>clientContext.castTo(oField, SP.FieldNumber);
fieldNumber.set_maximumValue(100);
fieldNumber.set_minimumValue(35);
fieldNumber.update();
clientContext.load(oField);
clientContext.executeQueryAsync(
successHandler,
errorHandler
);
function successHandler() {
resultpanel.innerHTML = "The <a href='../Lists/My Announcements List'>list</a> with a new field.";
}
function errorHandler() {
resultpanel.innerHTML = "Request failed: " + arguments[1].get_message();
}
}
function deleteList(resultpanel: HTMLElement) {
var listTitle = "My Announcements List";
var clientContext = SP.ClientContext.get_current();
var oWebsite = clientContext.get_web();
var oList = oWebsite.get_lists().getByTitle(listTitle);
oList.deleteObject();
clientContext.executeQueryAsync(
successHandler,
errorHandler
);
function successHandler() {
resultpanel.innerHTML = listTitle + " deleted.";
}
function errorHandler() {
resultpanel.innerHTML = "Request failed: " + arguments[1].get_message();
}
}
// Create, update and delete folders
function createFolder(resultpanel: HTMLElement) {
var clientContext = SP.ClientContext.get_current();
var oWebsite = clientContext.get_web();
var oList = oWebsite.get_lists().getByTitle("Shared Documents");
var itemCreateInfo = new SP.ListItemCreationInformation();
itemCreateInfo.set_underlyingObjectType(SP.FileSystemObjectType.folder);
itemCreateInfo.set_leafName("My new folder!");
var oListItem = oList.addItem(itemCreateInfo);
oListItem.update();
clientContext.load(oListItem);
clientContext.executeQueryAsync(
successHandler,
errorHandler
);
function successHandler() {
resultpanel.innerHTML = "Go to the <a href='../Lists/Shared Documents'>document library</a> to see your new folder.";
}
function errorHandler() {
resultpanel.innerHTML = "Request failed: " + arguments[1].get_message();
}
}
function updateFolder(resultpanel: HTMLElement) {
var clientContext = SP.ClientContext.get_current();
var oWebsite = clientContext.get_web();
var oList = oWebsite.get_lists().getByTitle("Shared Documents");
var oListItem = oList.getItemById(1);
oListItem.set_item("FileLeafRef", "My updated folder");
oListItem.update();
clientContext.load(oListItem);
clientContext.executeQueryAsync(
successHandler,
errorHandler
);
function successHandler() {
resultpanel.innerHTML = "Go to the <a href='../Lists/Shared Documents'>document library</a> to see your updated folder.";
}
function errorHandler() {
resultpanel.innerHTML = "Request failed: " + arguments[1].get_message();
}
}
function deleteFolder(resultpanel: HTMLElement) {
var clientContext = SP.ClientContext.get_current();
var oWebsite = clientContext.get_web();
var oList = oWebsite.get_lists().getByTitle("Shared Documents");
var oListItem = oList.getItemById(1);
oListItem.deleteObject();
clientContext.executeQueryAsync(
successHandler,
errorHandler
);
function successHandler() {
resultpanel.innerHTML = "Go to the <a href='../Lists/Shared Documents'>document library</a> to make sure the folder is no longer there.";
}
function errorHandler() {
resultpanel.innerHTML = "Request failed: " + arguments[1].get_message();
}
}
// List item tasks
function readItems(resultpanel: HTMLElement) {
var clientContext = SP.ClientContext.get_current();
var oWebsite = clientContext.get_web();
var oList = oWebsite.get_lists().getByTitle("Announcements");
var camlQuery = new SP.CamlQuery();
camlQuery.set_viewXml(
'<View><Query><Where><Geq><FieldRef Name=\'ID\'/>' +
'<Value Type=\'Number\'>1</Value></Geq></Where></Query>' +
'<RowLimit>10</RowLimit></View>'
);
var collListItem = oList.getItems(camlQuery);
clientContext.load(collListItem);
clientContext.executeQueryAsync(
successHandler,
errorHandler
);
function successHandler() {
var listItemEnumerator = collListItem.getEnumerator();
var listItemInfo = "";
while (listItemEnumerator.moveNext()) {
var oListItem = listItemEnumerator.get_current();
listItemInfo += "ID: " + oListItem.get_id() + "<br/>" +
"Title: " + oListItem.get_item("Title") + "<br/>" +
"Body: " + oListItem.get_item("Body") + "<br/>";
}
resultpanel.innerHTML = listItemInfo;
}
function errorHandler() {
resultpanel.innerHTML = "Request failed: " + arguments[1].get_message();
}
}
function readInclude(resultpanel: HTMLElement) {
var clientContext = SP.ClientContext.get_current();
var oWebsite = clientContext.get_web();
var oList = oWebsite.get_lists().getByTitle("Announcements");
var camlQuery = new SP.CamlQuery();
camlQuery.set_viewXml('<View><RowLimit>100</RowLimit></View>');
var collListItem = oList.getItems(camlQuery);
clientContext.load(collListItem, "Include(Id, DisplayName, HasUniqueRoleAssignments)");
clientContext.executeQueryAsync(
successHandler,
errorHandler
);
function successHandler() {
var listItemEnumerator = collListItem.getEnumerator();
var listItemInfo = "";
while (listItemEnumerator.moveNext()) {
var oListItem = listItemEnumerator.get_current();
listItemInfo += "ID: " + oListItem.get_id() + "<br/>" +
"Display name: " + oListItem.get_displayName() + "<br/>" +
"Unique role assignments: " + oListItem.get_hasUniqueRoleAssignments() + "<br/>";
}
resultpanel.innerHTML = listItemInfo;
}
function errorHandler() {
resultpanel.innerHTML = "Request failed: " + arguments[1].get_message();
}
}
// Create, update and delete list items
function createListItem(resultpanel: HTMLElement) {
var clientContext = SP.ClientContext.get_current();
var oWebsite = clientContext.get_web();
var oList = oWebsite.get_lists().getByTitle("Announcements");
var itemCreateInfo = new SP.ListItemCreationInformation();
var oListItem = oList.addItem(itemCreateInfo);
oListItem.set_item("Title", "My New Item!");
oListItem.set_item("Body", "Hello World!");
oListItem.update();
clientContext.load(oListItem);
clientContext.executeQueryAsync(
successHandler,
errorHandler
);
function successHandler() {
resultpanel.innerHTML = "Go to the <a href='../Lists/Announcements'>list</a> to see your new item.";
}
function errorHandler() {
resultpanel.innerHTML = "Request failed: " + arguments[1].get_message();
}
}
function updateListItem(resultpanel: HTMLElement) {
var clientContext = SP.ClientContext.get_current();
var oWebsite = clientContext.get_web();
var oList = oWebsite.get_lists().getByTitle("Announcements");
var oListItem = oList.getItemById(1);
oListItem.set_item("Title", "My updated title");
oListItem.update();
clientContext.load(oListItem);
clientContext.executeQueryAsync(
successHandler,
errorHandler
);
function successHandler() {
resultpanel.innerHTML = "Go to the <a href='../Lists/Announcements'>list</a> to see your updated item.";
}
function errorHandler() {
resultpanel.innerHTML = "Request failed: " + arguments[1].get_message();
}
}
function deleteListItem(resultpanel: HTMLElement) {
var clientContext = SP.ClientContext.get_current();
var oWebsite = clientContext.get_web();
var oList = oWebsite.get_lists().getByTitle("Announcements");
var oListItem = oList.getItemById(1);
oListItem.deleteObject();
clientContext.executeQueryAsync(
successHandler,
errorHandler
);
function successHandler() {
resultpanel.innerHTML = "Go to the <a href='../Lists/Announcements'>list</a> to make sure the item is no longer there.";
}
function errorHandler() {
resultpanel.innerHTML = "Request failed: " + arguments[1].get_message();
}
}
+7944
View File
File diff suppressed because it is too large Load Diff