Presentation is loading. Please wait.

Presentation is loading. Please wait.

function myPromise() { var deferred = $.Deferred(); setTimeout(function() { deferred.resolve("success!"); }, 1000); return deferred.promise();

Similar presentations


Presentation on theme: "function myPromise() { var deferred = $.Deferred(); setTimeout(function() { deferred.resolve("success!"); }, 1000); return deferred.promise();"— Presentation transcript:

1

2

3

4

5

6

7

8

9

10

11

12

13

14 function myPromise() { var deferred = $.Deferred(); setTimeout(function() { deferred.resolve("success!"); }, 1000); return deferred.promise(); } myPromise().then( function(value) { alert(value); }, function() { alert("error!"); } );

15

16

17 window.Wingtip = window.Wingtip || {}; Wingtip.ChromeControl = function () { render = function () { var options = { "appIconUrl": "../Images/AppIcon.png", "appTitle": "App Title", "appHelpPageUrl": "../Help", "settingsLinks": [ { "linkUrl": "../Page1/Method1?" + document.URL.split("?")[1], "displayName": "Page1" }, { "linkUrl": "../Page2/Method1?" + document.URL.split("?")[1], "displayName": "Page2" } ] }; var nav = new SP.UI.Controls.Navigation( "chrome_ctrl_placeholder_id", options ); nav.setVisible(true); }, getQueryStringParameter = function (p) { var params = document.URL.split("?")[1].split("&"); var strParams = ""; for (var i = 0; i < params.length; i = i + 1) { var singleParam = params[i].split("="); if (singleParam[0] == p) return singleParam[1]; } return {render: render } }(); window.Wingtip=window.Wingtip||{},Wingtip.ChromeControl=function(){return render=function(){var n=new SP.UI.Controls.Navigation("chrome_ctrl_placeholder_id",{appIconUrl:"../Images/AppIc on.png",appTitle:"App Title",appHelpPageUrl:"../Help",settingsLinks:[{linkUrl:"../Page1/Method1?"+documen t.URL.split("?")[1],displayName:"Page1"},{linkUrl:"../Page2/Method1?"+document.URL. split("?")[1],displayName:"Page2"}]});n.setVisible(!0)},getQueryStringParameter=fun ction(n){for(var r=document.URL.split("?")[1].split("&"),i,t=0;t<r.length;t=t+1)if(i=r[t].split("="),i[0]==n)return i[1]},{render:render}}(),$(document).ready(function(){Wingtip.ChromeControl.render( )}) 658 bytes 377 bytes

18

19

20

21

22

23

24 JavaScript Library Silverlight Library.NET CLR Library Custom Client Code Client Server _api is new alias for _vti_bin/client.svc OData Execute Query

25

26

27

28

29

30

31

32

33

34

35

36

37


Download ppt "function myPromise() { var deferred = $.Deferred(); setTimeout(function() { deferred.resolve("success!"); }, 1000); return deferred.promise();"

Similar presentations


Ads by Google