Merge lp:~abreu-alexandre/unity-webapps-qml/yuidocs-fix into lp:unity-webapps-qml
- yuidocs-fix
- Merge into trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | David Barth | ||||
Approved revision: | 84 | ||||
Merged at revision: | 81 | ||||
Proposed branch: | lp:~abreu-alexandre/unity-webapps-qml/yuidocs-fix | ||||
Merge into: | lp:unity-webapps-qml | ||||
Diff against target: |
844 lines (+442/-54) 14 files modified
examples/api-bindings/alarm/www/js/app.js (+5/-5) examples/api-bindings/content-hub-exporter/www/js/app.js (+1/-1) examples/api-bindings/content-hub/www/js/app.js (+1/-1) examples/api-bindings/online-accounts/www/js/app.js (+1/-1) examples/data/html/big-test.js (+1/-1) examples/data/userscripts/unity-webapps-bbcnews/BBCNews.user.js (+1/-1) examples/data/userscripts/unity-webapps-facebookmessenger/FacebookMessenger.user.js (+1/-1) src/Ubuntu/UnityWebApps/bindings/alarm-api/client/alarm-api.js (+142/-5) src/Ubuntu/UnityWebApps/bindings/content-hub/client/content-hub.js (+205/-17) src/Ubuntu/UnityWebApps/bindings/online-accounts/client/online-accounts.js (+80/-17) src/Ubuntu/UnityWebApps/unity-webapps-api.js.in (+1/-1) tests/unit/test_plugin/data/installed-webapps/invalid/valid.user.js (+1/-1) tests/unit/test_plugin/data/installed-webapps/unity-webapps-valid/valid.user.js (+1/-1) tests/unit/test_plugin/data/installed-webapps/unity-webapps-with-requires-valid/valid.user.js (+1/-1) |
||||
To merge this branch: | bzr merge lp:~abreu-alexandre/unity-webapps-qml/yuidocs-fix | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
David Barth (community) | Approve | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Review via email:
|
Commit message
Fix the inline docs to work properly with yuidocs.
Description of the change
Fix the inline docs to work properly with yuidocs.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
- 82. By Alexandre Abreu
-
add static to contenthub class doc
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Kyle Nitzsche (knitzsche) wrote : | # |
ContentHub currently looks like a class that can be instantiated. Yuidoc provides the @static tag for classes that cannot be instantiated and have no constructor. We should probably use this when appropriate.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:82
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Kyle Nitzsche (knitzsche) wrote : | # |
Many @example sections contain "JavaScript access:" text. These were used in the UbuntuUI API docs to differentiate the JS example text from the HTML example text. Since there are no HTML examples here, these are not needed and should be deleted.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Kyle Nitzsche (knitzsche) wrote : | # |
There is a lot of tab indentation now mixed with what I think is the standard of spaces for indentation.
For example this section is tab indented: @property ContentTransfer
We should clarify the standard use it.
- 83. By Alexandre Abreu
-
remove all javascript access & untabify
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Alexandre Abreu (abreu-alexandre) wrote : | # |
> Many @example sections contain "JavaScript access:" text. These were used in
> the UbuntuUI API docs to differentiate the JS example text from the HTML
> example text. Since there are no HTML examples here, these are not needed and
> should be deleted.
fixed,
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Alexandre Abreu (abreu-alexandre) wrote : | # |
> There is a lot of tab indentation now mixed with what I think is the standard
> of spaces for indentation.
>
> For example this section is tab indented: @property ContentTransfer
> {String}
>
> We should clarify the standard use it.
I removed all tabs
- 84. By Alexandre Abreu
-
remove all javascript access & untabify
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:84
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Preview Diff
1 | === modified file 'examples/api-bindings/alarm/www/js/app.js' |
2 | --- examples/api-bindings/alarm/www/js/app.js 2014-01-22 20:38:52 +0000 |
3 | +++ examples/api-bindings/alarm/www/js/app.js 2014-02-10 19:04:00 +0000 |
4 | @@ -26,7 +26,7 @@ |
5 | } |
6 | |
7 | function doStart() { |
8 | - var api = external.getUnityObject(1.0); |
9 | + var api = external.getUnityObject('1.0'); |
10 | |
11 | var date = getDate(); |
12 | if ( ! date) { |
13 | @@ -35,14 +35,14 @@ |
14 | return; |
15 | } |
16 | |
17 | - api.Alarm.api.createAndSaveAlarmFor( |
18 | + api.AlarmApi.api.createAndSaveAlarmFor( |
19 | date, |
20 | - api.Alarm.AlarmType.OneTime, |
21 | - api.Alarm.AlarmDayOfWeek.AutoDetect, |
22 | + api.AlarmApi.AlarmType.OneTime, |
23 | + api.AlarmApi.AlarmDayOfWeek.AutoDetect, |
24 | document.getElementById('message').value, |
25 | function(errorid) { |
26 | var results = document.getElementById('results'); |
27 | - results.innerHTML = api.Alarm.api.errorToMessage(errorid); |
28 | + results.innerHTML = api.AlarmApi.api.errorToMessage(errorid); |
29 | |
30 | }); |
31 | }; |
32 | |
33 | === modified file 'examples/api-bindings/content-hub-exporter/www/js/app.js' |
34 | --- examples/api-bindings/content-hub-exporter/www/js/app.js 2014-02-03 23:05:48 +0000 |
35 | +++ examples/api-bindings/content-hub-exporter/www/js/app.js 2014-02-10 19:04:00 +0000 |
36 | @@ -1,5 +1,5 @@ |
37 | window.onload = function() { |
38 | - var api = external.getUnityObject(1.0); |
39 | + var api = external.getUnityObject('1.0'); |
40 | var hub = api.ContentHub; |
41 | |
42 | var transferState = hub.ContentTransfer.State; |
43 | |
44 | === modified file 'examples/api-bindings/content-hub/www/js/app.js' |
45 | --- examples/api-bindings/content-hub/www/js/app.js 2014-01-30 18:23:58 +0000 |
46 | +++ examples/api-bindings/content-hub/www/js/app.js 2014-02-10 19:04:00 +0000 |
47 | @@ -1,5 +1,5 @@ |
48 | window.onload = function() { |
49 | - var api = external.getUnityObject(1.0); |
50 | + var api = external.getUnityObject('1.0'); |
51 | var hub = api.ContentHub; |
52 | |
53 | var transferState = hub.ContentTransfer.State; |
54 | |
55 | === modified file 'examples/api-bindings/online-accounts/www/js/app.js' |
56 | --- examples/api-bindings/online-accounts/www/js/app.js 2014-01-22 21:26:43 +0000 |
57 | +++ examples/api-bindings/online-accounts/www/js/app.js 2014-02-10 19:04:00 +0000 |
58 | @@ -9,7 +9,7 @@ |
59 | function doGetAuth() { |
60 | setResults(''); |
61 | |
62 | - var api = external.getUnityObject(1.0); |
63 | + var api = external.getUnityObject('1.0'); |
64 | var oa = api.OnlineAccounts; |
65 | |
66 | oa.api.getAccountsInfoFor(null, 'facebook', function(result) { |
67 | |
68 | === modified file 'examples/data/html/big-test.js' |
69 | --- examples/data/html/big-test.js 2013-07-17 16:36:31 +0000 |
70 | +++ examples/data/html/big-test.js 2014-02-10 19:04:00 +0000 |
71 | @@ -1,4 +1,4 @@ |
72 | -var Unity = external.getUnityObject(1); |
73 | +var Unity = external.getUnityObject('1.0'); |
74 | |
75 | var data_uri = "data:image/png;base64,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"; |
76 | |
77 | |
78 | === modified file 'examples/data/userscripts/unity-webapps-bbcnews/BBCNews.user.js' |
79 | --- examples/data/userscripts/unity-webapps-bbcnews/BBCNews.user.js 2013-07-17 16:36:31 +0000 |
80 | +++ examples/data/userscripts/unity-webapps-bbcnews/BBCNews.user.js 2014-02-10 19:04:00 +0000 |
81 | @@ -9,7 +9,7 @@ |
82 | "[]" |
83 | )); |
84 | |
85 | -window.Unity = external.getUnityObject(1); |
86 | +window.Unity = external.getUnityObject('1.0'); |
87 | |
88 | function isCorrectPage() { |
89 | var i, ids = ['tickerHolder']; |
90 | |
91 | === modified file 'examples/data/userscripts/unity-webapps-facebookmessenger/FacebookMessenger.user.js' |
92 | --- examples/data/userscripts/unity-webapps-facebookmessenger/FacebookMessenger.user.js 2013-07-31 16:29:07 +0000 |
93 | +++ examples/data/userscripts/unity-webapps-facebookmessenger/FacebookMessenger.user.js 2014-02-10 19:04:00 +0000 |
94 | @@ -11,7 +11,7 @@ |
95 | "%7B%22am%22%3A%20%7B%22Messages%22%3A%20%22%5Cu1218%5Cu120d%5Cu12a5%5Cu12ad%5Cu1276%5Cu127d%22%2C%20%22Notifications%22%3A%20%22%5Cu121b%5Cu1235%5Cu1273%5Cu12c8%5Cu1242%5Cu12eb%5Cu12ce%5Cu127d%22%7D%2C%20%22ar%22%3A%20%7B%22Messages%22%3A%20%22%5Cu0627%5Cu0644%5Cu0631%5Cu0633%5Cu0627%5Cu0626%5Cu0644%22%2C%20%22Notifications%22%3A%20%22%5Cu0627%5Cu0644%5Cu062a%5Cu0646%5Cu0628%5Cu064a%5Cu0647%5Cu0627%5Cu062a%22%7D%2C%20%22ast%22%3A%20%7B%22Messages%22%3A%20%22Mensaxes%22%2C%20%22Notifications%22%3A%20%22Notificaciones%22%7D%2C%20%22be%22%3A%20%7B%22Messages%22%3A%20%22%5Cu041f%5Cu0430%5Cu0432%5Cu0435%5Cu0434%5Cu0430%5Cu043c%5Cu043b%5Cu0435%5Cu043d%5Cu043d%5Cu0456%22%2C%20%22Notifications%22%3A%20%22%5Cu0410%5Cu043f%5Cu0430%5Cu0432%5Cu044f%5Cu0448%5Cu0447%5Cu044d%5Cu043d%5Cu043d%5Cu0456%22%7D%2C%20%22bem%22%3A%20%7B%22Messages%22%3A%20%22Amashiwi%22%2C%20%22Notifications%22%3A%20%22Ifishibisho%22%7D%2C%20%22bg%22%3A%20%7B%22Messages%22%3A%20%22%5Cu0421%5Cu044a%5Cu043e%5Cu0431%5Cu0449%5Cu0435%5Cu043d%5Cu0438%5Cu044f%22%2C%20%22Notifications%22%3A%20%22%5Cu0418%5Cu0437%5Cu0432%5Cu0435%5Cu0441%5Cu0442%5Cu044f%5Cu0432%5Cu0430%5Cu043d%5Cu0438%5Cu044f%22%7D%2C%20%22bs%22%3A%20%7B%22Messages%22%3A%20%22Poruke%22%2C%20%22Notifications%22%3A%20%22Obavje%5Cu0161tenja%22%7D%2C%20%22ca%22%3A%20%7B%22Messages%22%3A%20%22Missatges%22%2C%20%22Notifications%22%3A%20%22Notificacions%22%7D%2C%20%22ca%40valencia%22%3A%20%7B%22Messages%22%3A%20%22Missatges%22%2C%20%22Notifications%22%3A%20%22Notificacions%22%7D%2C%20%22cs%22%3A%20%7B%22Messages%22%3A%20%22Zpr%5Cu00e1vy%22%2C%20%22Notifications%22%3A%20%22Ozn%5Cu00e1men%5Cu00ed%22%7D%2C%20%22cy%22%3A%20%7B%22Messages%22%3A%20%22Negeseuon%22%2C%20%22Notifications%22%3A%20%22Hysbysiadau%22%7D%2C%20%22da%22%3A%20%7B%22Messages%22%3A%20%22Beskeder%22%2C%20%22Notifications%22%3A%20%22P%5Cu00e5mindelser%22%7D%2C%20%22de%22%3A%20%7B%22Messages%22%3A%20%22Mitteilungen%22%2C%20%22Notifications%22%3A%20%22Benachrichtigungen%22%7D%2C%20%22el%22%3A%20%7B%22Messages%22%3A%20%22%5Cu039c%5Cu03b7%5Cu03bd%5Cu03cd%5Cu03bc%5Cu03b1%5Cu03c4%5Cu03b1%22%2C%20%22Notifications%22%3A%20%22%5Cu0395%5Cu03b9%5Cu03b4%5Cu03bf%5Cu03c0%5Cu03bf%5Cu03b9%5Cu03ae%5Cu03c3%5Cu03b5%5Cu03b9%5Cu03c2%22%7D%2C%20%22en_AU%22%3A%20%7B%7D%2C%20%22en_CA%22%3A%20%7B%7D%2C%20%22en_GB%22%3A%20%7B%7D%2C%20%22en_US%22%3A%20%7B%7D%2C%20%22eo%22%3A%20%7B%22Messages%22%3A%20%22Mesa%5Cu011doj%22%2C%20%22Notifications%22%3A%20%22Atentigoj%22%7D%2C%20%22es%22%3A%20%7B%22Messages%22%3A%20%22Mensajes%22%2C%20%22Notifications%22%3A%20%22Notificaciones%22%7D%2C%20%22et%22%3A%20%7B%22Messages%22%3A%20%22S%5Cu00f5numid%22%2C%20%22Notifications%22%3A%20%22Teavitused%22%7D%2C%20%22eu%22%3A%20%7B%22Messages%22%3A%20%22Mezuak%22%2C%20%22Notifications%22%3A%20%22Jakinarazpenak%22%7D%2C%20%22fa%22%3A%20%7B%22Messages%22%3A%20%22%5Cu067e%5Cu06cc%5Cu0627%5Cu0645%5Cu200c%5Cu0647%5Cu0627%22%2C%20%22Notifications%22%3A%20%22%5Cu0622%5Cu06af%5Cu0627%5Cu0647%5Cu200c%5Cu0633%5Cu0627%5Cu0632%5Cu06cc%5Cu200c%5Cu0647%5Cu0627%22%7D%2C%20%22fi%22%3A%20%7B%22Messages%22%3A%20%22Viestit%22%2C%20%22Notifications%22%3A%20%22Ilmoitukset%22%7D%2C%20%22fr%22%3A%20%7B%7D%2C%20%22gd%22%3A%20%7B%22Messages%22%3A%20%22Teachdaireachdan%22%2C%20%22Notifications%22%3A%20%22Fiosan%22%7D%2C%20%22gl%22%3A%20%7B%22Messages%22%3A%20%22Mensaxes%22%2C%20%22Notifications%22%3A%20%22Notificaci%5Cu00f3ns%22%7D%2C%20%22gu%22%3A%20%7B%7D%2C%20%22he%22%3A%20%7B%22Messages%22%3A%20%22%5Cu05d4%5Cu05d5%5Cu05d3%5Cu05e2%5Cu05d5%5Cu05ea%22%2C%20%22Notifications%22%3A%20%22%5Cu05d4%5Cu05ea%5Cu05e8%5Cu05e2%5Cu05d5%5Cu05ea%22%7D%2C%20%22hi%22%3A%20%7B%7D%2C%20%22hr%22%3A%20%7B%7D%2C%20%22hu%22%3A%20%7B%22Messages%22%3A%20%22%5Cu00dczenetek%22%2C%20%22Notifications%22%3A%20%22%5Cu00c9rtes%5Cu00edt%5Cu00e9sek%22%7D%2C%20%22id%22%3A%20%7B%22Messages%22%3A%20%22Pesan%22%2C%20%22Notifications%22%3A%20%22Pemberitahuan%22%7D%2C%20%22is%22%3A%20%7B%22Messages%22%3A%20%22Skilabo%5Cu00f0%22%2C%20%22Notifications%22%3A%20%22Tilkynningar%22%7D%2C%20%22it%22%3A%20%7B%22Messages%22%3A%20%22Messaggi%22%2C%20%22Notifications%22%3A%20%22Notifiche%22%7D%2C%20%22ja%22%3A%20%7B%22Messages%22%3A%20%22%5Cu30e1%5Cu30c3%5Cu30bb%5Cu30fc%5Cu30b8%22%2C%20%22Notifications%22%3A%20%22%5Cu901a%5Cu77e5%22%7D%2C%20%22jbo%22%3A%20%7B%22Messages%22%3A%20%22notci%22%7D%2C%20%22ko%22%3A%20%7B%22Messages%22%3A%20%22%5Cuba54%5Cuc2dc%5Cuc9c0%22%2C%20%22Notifications%22%3A%20%22%5Cuc54c%5Cub9bc%22%7D%2C%20%22lt%22%3A%20%7B%22Messages%22%3A%20%22%5Cu017dinut%5Cu0117s%22%2C%20%22Notifications%22%3A%20%22Prane%5Cu0161imai%22%7D%2C%20%22lv%22%3A%20%7B%22Messages%22%3A%20%22Zi%5Cu0146ojumi%22%2C%20%22Notifications%22%3A%20%22Pazi%5Cu0146ojumi%22%7D%2C%20%22mhr%22%3A%20%7B%22Messages%22%3A%20%22%5Cu041a%5Cu0430%5Cu043b%5Cu0430%5Cu0441%5Cu044b%5Cu043c%5Cu0430%5Cu0448-%5Cu0432%5Cu043b%5Cu0430%5Cu043a%22%2C%20%22Notifications%22%3A%20%22%5Cu0423%5Cu0432%5Cu0435%5Cu0440%5Cu0442%5Cu0430%5Cu0440%5Cu044b%5Cu043c%5Cu0430%5Cu0448-%5Cu0432%5Cu043b%5Cu0430%5Cu043a%22%7D%2C%20%22mk%22%3A%20%7B%7D%2C%20%22ml%22%3A%20%7B%22Messages%22%3A%20%22%5Cu0d38%5Cu0d28%5Cu0d4d%5Cu0d26%5Cu0d47%5Cu0d36%5Cu0d19%5Cu0d4d%5Cu0d19%5Cu0d7e%22%2C%20%22Notifications%22%3A%20%22%5Cu0d05%5Cu0d31%5Cu0d3f%5Cu0d2f%5Cu0d3f%5Cu0d2a%5Cu0d4d%5Cu0d2a%5Cu0d41%5Cu0d15%5Cu0d7e%22%7D%2C%20%22mr%22%3A%20%7B%22Messages%22%3A%20%22%5Cu0938%5Cu0902%5Cu0926%5Cu0947%5Cu0936%22%7D%2C%20%22ms%22%3A%20%7B%22Messages%22%3A%20%22Mesej%22%2C%20%22Notifications%22%3A%20%22Pemberitahuan%22%7D%2C%20%22my%22%3A%20%7B%22Messages%22%3A%20%22%5Cu1005%5Cu102c%5Cu1019%5Cu103b%5Cu102c%5Cu1038%22%2C%20%22Notifications%22%3A%20%22%5Cu1021%5Cu101e%5Cu102d%5Cu1015%5Cu1031%5Cu1038%5Cu1001%5Cu103b%5Cu1000%5Cu103a%22%7D%2C%20%22nb%22%3A%20%7B%7D%2C%20%22nl%22%3A%20%7B%22Messages%22%3A%20%22Berichten%22%2C%20%22Notifications%22%3A%20%22Notificaties%22%7D%2C%20%22oc%22%3A%20%7B%22Messages%22%3A%20%22Messatges%22%2C%20%22Notifications%22%3A%20%22Notificacions%22%7D%2C%20%22os%22%3A%20%7B%7D%2C%20%22pl%22%3A%20%7B%22Messages%22%3A%20%22Wiadomo%5Cu015bci%22%2C%20%22Notifications%22%3A%20%22Powiadomienia%22%7D%2C%20%22pt%22%3A%20%7B%22Messages%22%3A%20%22Mensagens%22%2C%20%22Notifications%22%3A%20%22Notifica%5Cu00e7%5Cu00f5es%22%7D%2C%20%22pt_BR%22%3A%20%7B%22Messages%22%3A%20%22Mensagens%22%2C%20%22Notifications%22%3A%20%22Notifica%5Cu00e7%5Cu00f5es%22%7D%2C%20%22ro%22%3A%20%7B%22Messages%22%3A%20%22Mesaje%22%2C%20%22Notifications%22%3A%20%22Notific%5Cu0103ri%22%7D%2C%20%22ru%22%3A%20%7B%22Messages%22%3A%20%22%5Cu0421%5Cu043e%5Cu043e%5Cu0431%5Cu0449%5Cu0435%5Cu043d%5Cu0438%5Cu044f%22%2C%20%22Notifications%22%3A%20%22%5Cu0423%5Cu0432%5Cu0435%5Cu0434%5Cu043e%5Cu043c%5Cu043b%5Cu0435%5Cu043d%5Cu0438%5Cu044f%22%7D%2C%20%22se%22%3A%20%7B%22Messages%22%3A%20%22Reivvet%22%2C%20%22Notifications%22%3A%20%22Muittuhusat%22%7D%2C%20%22shn%22%3A%20%7B%22Messages%22%3A%20%22%5Cu101c%5Cu102d%5Cu1075%5Cu103a%5Cu1088%5Cu1075%5Cu1082%5Cu1062%5Cu1019%5Cu103a%5Cu1038%5Cu1015%5Cu103d%5Cu1010%5Cu103a%5Cu1038%22%2C%20%22Notifications%22%3A%20%22%5Cu1076%5Cu1031%5Cu1083%5Cu1088%5Cu107d%5Cu1062%5Cu1004%5Cu1037%5Cu103a%5Cu1015%5Cu107c%5Cu103a%22%7D%2C%20%22sk%22%3A%20%7B%22Messages%22%3A%20%22Spr%5Cu00e1vy%22%2C%20%22Notifications%22%3A%20%22Ozn%5Cu00e1menia%22%7D%2C%20%22sl%22%3A%20%7B%22Messages%22%3A%20%22Sporo%5Cu010dila%22%2C%20%22Notifications%22%3A%20%22Obvestila%22%7D%2C%20%22sq%22%3A%20%7B%22Messages%22%3A%20%22Mesazhet%22%2C%20%22Notifications%22%3A%20%22Njoftime%22%7D%2C%20%22sr%22%3A%20%7B%22Messages%22%3A%20%22%5Cu041f%5Cu043e%5Cu0440%5Cu0443%5Cu043a%5Cu0435%22%2C%20%22Notifications%22%3A%20%22%5Cu041e%5Cu0431%5Cu0430%5Cu0432%5Cu0435%5Cu0448%5Cu0442%5Cu0435%5Cu045a%5Cu0430%22%7D%2C%20%22sv%22%3A%20%7B%7D%2C%20%22tg%22%3A%20%7B%22Messages%22%3A%20%22%5Cu041f%5Cu0430%5Cu0451%5Cu043c%5Cu04b3%5Cu043e%22%2C%20%22Notifications%22%3A%20%22%5Cu041e%5Cu0433%5Cu043e%5Cu04b3%5Cu0438%5Cu04b3%5Cu043e%22%7D%2C%20%22th%22%3A%20%7B%7D%2C%20%22tr%22%3A%20%7B%22Messages%22%3A%20%22%5Cu0130letiler%22%2C%20%22Notifications%22%3A%20%22Bildirimler%22%7D%2C%20%22ug%22%3A%20%7B%22Messages%22%3A%20%22%5Cu0626%5Cu06c7%5Cu0686%5Cu06c7%5Cu0631%5Cu0644%5Cu0627%5Cu0631%22%2C%20%22Notifications%22%3A%20%22%5Cu0626%5Cu06c7%5Cu0642%5Cu062a%5Cu06c7%5Cu0631%5Cu06c7%5Cu0634%5Cu0644%5Cu0627%5Cu0631%22%7D%2C%20%22uk%22%3A%20%7B%22Messages%22%3A%20%22%5Cu041f%5Cu043e%5Cu0432%5Cu0456%5Cu0434%5Cu043e%5Cu043c%5Cu043b%5Cu0435%5Cu043d%5Cu043d%5Cu044f%22%2C%20%22Notifications%22%3A%20%22%5Cu0421%5Cu043f%5Cu043e%5Cu0432%5Cu0456%5Cu0449%5Cu0435%5Cu043d%5Cu043d%5Cu044f%22%7D%2C%20%22uz%22%3A%20%7B%22Messages%22%3A%20%22Xabarlar%22%2C%20%22Notifications%22%3A%20%22Eslatmalar%22%7D%2C%20%22vi%22%3A%20%7B%22Messages%22%3A%20%22Tin%20nh%5Cu1eafn%22%2C%20%22Notifications%22%3A%20%22Th%5Cu00f4ng%20b%5Cu00e1o%22%7D%2C%20%22zh_CN%22%3A%20%7B%22Messages%22%3A%20%22%5Cu6d88%5Cu606f%22%2C%20%22Notifications%22%3A%20%22%5Cu901a%5Cu77e5%22%7D%2C%20%22zh_HK%22%3A%20%7B%22Messages%22%3A%20%22%5Cu8a0a%5Cu606f%22%2C%20%22Notifications%22%3A%20%22%5Cu901a%5Cu77e5%22%7D%2C%20%22zh_TW%22%3A%20%7B%22Messages%22%3A%20%22%5Cu8a0a%5Cu606f%22%2C%20%22Notifications%22%3A%20%22%5Cu901a%5Cu77e5%22%7D%2C%20%22zn_CN%22%3A%20%7B%7D%7D" |
96 | )); |
97 | |
98 | -window.Unity = external.getUnityObject(1); |
99 | +window.Unity = external.getUnityObject('1.0'); |
100 | |
101 | function isCorrectPage() { |
102 | var i, ids = ['mercurymessagesCountValue']; |
103 | |
104 | === modified file 'src/Ubuntu/UnityWebApps/bindings/alarm-api/client/alarm-api.js' |
105 | --- src/Ubuntu/UnityWebApps/bindings/alarm-api/client/alarm-api.js 2014-01-22 19:38:46 +0000 |
106 | +++ src/Ubuntu/UnityWebApps/bindings/alarm-api/client/alarm-api.js 2014-02-10 19:04:00 +0000 |
107 | @@ -1,6 +1,31 @@ |
108 | +/** |
109 | + * AlarmApi gives access to Alarm management. |
110 | + |
111 | + * @module AlarmApi |
112 | + */ |
113 | function createAlarmApi(backendBridge) { |
114 | var PLUGIN_URI = 'Alarm'; |
115 | |
116 | +/** |
117 | + * An Alarm. |
118 | + |
119 | + * @class Alarm |
120 | + * @constructor |
121 | + * @example |
122 | + |
123 | + var date = new Date(); |
124 | + <set a valid date in the future> |
125 | + |
126 | + var api = external.getUnityObject('1.0'); |
127 | + api.AlarmApi.api.createAndSaveAlarmFor( |
128 | + date, |
129 | + api.AlarmApi.AlarmType.OneTime, |
130 | + api.AlarmApi.AlarmDayOfWeek.AutoDetect, |
131 | + "alarm triggered", |
132 | + function(errorid) { |
133 | + console.log(api.AlarmApi.api.errorToMessage(errorid)); |
134 | + }); |
135 | + */ |
136 | function Alarm(id) { |
137 | this._proxy = backendBridge.createRemoteObject( |
138 | PLUGIN_URI, 'Alarm', id); |
139 | @@ -179,7 +204,8 @@ |
140 | // methods |
141 | |
142 | /** |
143 | - * |
144 | + * Cancels a given Alarm. |
145 | + * |
146 | * @method cancel |
147 | */ |
148 | cancel: function() { |
149 | @@ -187,7 +213,8 @@ |
150 | }, |
151 | |
152 | /** |
153 | - * |
154 | + * Resets a given Alarm. |
155 | + * |
156 | * @method reset |
157 | */ |
158 | reset: function() { |
159 | @@ -224,7 +251,47 @@ |
160 | : null; |
161 | }; |
162 | |
163 | +/** |
164 | + * The AlarmApi object |
165 | + |
166 | + * @class AlarmApi |
167 | + * @constructor |
168 | + * @example |
169 | + |
170 | + var date = new Date(); |
171 | + <set a valid date in the future> |
172 | + |
173 | + var api = external.getUnityObject('1.0'); |
174 | + api.AlarmApi.api.createAndSaveAlarmFor( |
175 | + date, |
176 | + api.AlarmApi.AlarmType.OneTime, |
177 | + api.AlarmApi.AlarmDayOfWeek.AutoDetect, |
178 | + "alarm triggered", |
179 | + function(errorid) { |
180 | + console.log(api.AlarmApi.api.errorToMessage(errorid)); |
181 | + }); |
182 | + */ |
183 | return { |
184 | + /** |
185 | + Enumeration of the available types of Alarm. |
186 | + |
187 | + Values: |
188 | + |
189 | + OneTime: The alarm occurs only once |
190 | + |
191 | + Repeating: The alarm is a repeating one, |
192 | + either daily, weekly on a given day |
193 | + or on selected days |
194 | + |
195 | + @static |
196 | + @property AlarmType {Object} |
197 | + |
198 | + @example |
199 | + |
200 | + var api = external.getUnityObject('1.0'); |
201 | + var alarmtype = api.AlarmApi.AlarmType; |
202 | + // use alarmtype.OneTime or alarmtype.Repeating |
203 | + */ |
204 | AlarmType: { |
205 | // The alarm occurs only once. |
206 | OneTime: "OneTime", |
207 | @@ -233,6 +300,37 @@ |
208 | Repeating: "Repeating", |
209 | }, |
210 | |
211 | + /** |
212 | + Flags for the week days an Alarm should be triggered. |
213 | + |
214 | + Values: |
215 | + |
216 | + Monday: The alarm will kick on Mondays |
217 | + |
218 | + Tuesday: The alarm will kick on Tuesdays |
219 | + |
220 | + Wednesday: The alarm will kick on Wednesday |
221 | + |
222 | + Thursday: The alarm will kick on Thursday |
223 | + |
224 | + Friday: The alarm will kick on Friday |
225 | + |
226 | + Saturday: The alarm will kick on Saturday |
227 | + |
228 | + Sunday: The alarm will kick on Sunday |
229 | + |
230 | + AutoDetect: The alarm day will be detected |
231 | + from the alarm date. |
232 | + |
233 | + @static |
234 | + @property AlarmDayOfWeek {Integer} |
235 | + |
236 | + @example |
237 | + |
238 | + var api = external.getUnityObject('1.0'); |
239 | + var dayofweek = api.AlarmApi.AlarmDayOfWeek; |
240 | + // use dayofweek.Monday or/and dayofweek.Tuesday, etc. |
241 | + */ |
242 | AlarmDayOfWeek: { |
243 | // The alarm will kick on Mondays. |
244 | Monday: 1, |
245 | @@ -259,6 +357,45 @@ |
246 | AutoDetect: 128, |
247 | }, |
248 | |
249 | + /** |
250 | + Error ids returned during AlarmApi calls. |
251 | + |
252 | + Values: |
253 | + |
254 | + NoError: Successful operation completion |
255 | + |
256 | + InvalidDate: The date specified for the alarm was invalid |
257 | + |
258 | + EarlyDate: The date specified for the alarm is an earlier |
259 | + date than the current one |
260 | + |
261 | + NbDaysOfWeek: The daysOfWeek parameter of the alarm was not specified |
262 | + |
263 | + OneTimeOnMoreDays: The one-time alarm was set to be kicked in several days |
264 | + |
265 | + InvalidEvent: The alarm event is invalid |
266 | + |
267 | + AdaptationError: The error occurred in alarm adaptation layer. |
268 | + Adaptations may define additional behind this value |
269 | + |
270 | + |
271 | + @static |
272 | + @property AlarmError {Integer} |
273 | + |
274 | + @example |
275 | + var date = new Date(); |
276 | + <set a valid date in the future> |
277 | + |
278 | + var api = external.getUnityObject('1.0'); |
279 | + api.AlarmApi.api.createAndSaveAlarmFor( |
280 | + date, |
281 | + api.AlarmApi.AlarmType.OneTime, |
282 | + api.AlarmApi.AlarmDayOfWeek.AutoDetect, |
283 | + "alarm triggered", |
284 | + function(errorid) { |
285 | + console.log(api.AlarmApi.api.errorToMessage(errorid)); |
286 | + }); |
287 | + */ |
288 | AlarmError: { |
289 | // Successful operation completion |
290 | NoError: 0, |
291 | @@ -286,7 +423,7 @@ |
292 | * Creates a Alarm object. |
293 | * |
294 | * @method createAlarm |
295 | - * @param callback {Function ({Alarm})} Function called with the created Alarm. |
296 | + * @param callback {Function(Alarm)} Function called with the created Alarm. |
297 | */ |
298 | createAlarm: function(callback) { |
299 | backendBridge.call('Alarm.createAlarm' |
300 | @@ -298,7 +435,7 @@ |
301 | /** |
302 | * Creates and saves a new alarm. |
303 | * |
304 | - * @method createAndSaveAlarmFor |
305 | + * @method api.createAndSaveAlarmFor |
306 | * @param date {Date} date at which the alarm is to be triggered. |
307 | * @param type {AlarmType} type of the alarm. |
308 | * @param daysOfWeek {AlarmDayOfWeek} days of the week the alarm is scheduled. |
309 | @@ -313,7 +450,7 @@ |
310 | /** |
311 | * Returns a message adapted to the given error id. |
312 | * |
313 | - * @method errorToMessage |
314 | + * @method api.errorToMessage |
315 | * @param error {AlarmError} error id. |
316 | */ |
317 | errorToMessage: function(error) { |
318 | |
319 | === modified file 'src/Ubuntu/UnityWebApps/bindings/content-hub/client/content-hub.js' |
320 | --- src/Ubuntu/UnityWebApps/bindings/content-hub/client/content-hub.js 2014-01-31 01:44:10 +0000 |
321 | +++ src/Ubuntu/UnityWebApps/bindings/content-hub/client/content-hub.js 2014-02-10 19:04:00 +0000 |
322 | @@ -1,6 +1,39 @@ |
323 | +/** |
324 | + * ContentHub is the entry point to resource io transfer |
325 | + from/to remote applications (peers). |
326 | + |
327 | + * @module ContentHub |
328 | + */ |
329 | + |
330 | function createContentHubApi(backendBridge) { |
331 | var PLUGIN_URI = 'ContentHub'; |
332 | |
333 | +/** |
334 | + * ContentTransfer is an object created by the ContentHub to |
335 | + and allows one to properly setup and manage a data |
336 | + transfer between two peers. |
337 | + |
338 | + * @class ContentTransfer |
339 | + * @constructor |
340 | + * @example |
341 | + |
342 | + var api = external.getUnityObject('1.0'); |
343 | + var hub = api.ContentHub; |
344 | + |
345 | + var pictureContentType = hub.ContentType.Pictures; |
346 | + |
347 | + hub.defaultSourceForType( |
348 | + pictureContentType |
349 | + , function(peer) { |
350 | + hub.importContentForPeer( |
351 | + pictureContentType, |
352 | + peer, |
353 | + function(transfer) { |
354 | + [setup the transfer options and store] |
355 | + transfer.start(function(state) { [...] }); |
356 | + }); |
357 | + }); |
358 | + */ |
359 | function ContentTransfer(objectid, content) { |
360 | this._proxy = backendBridge.createRemoteObject( |
361 | PLUGIN_URI, 'ContentTransfer', objectid); |
362 | @@ -169,6 +202,27 @@ |
363 | }, |
364 | }; |
365 | |
366 | +/** |
367 | + * ContentPeer is an object returned by the ContentHub. |
368 | + It represents a remote peer that can be used in a request |
369 | + to export or import date. |
370 | + |
371 | + * @class ContentPeer |
372 | + * @module ContentHub |
373 | + * @constructor |
374 | + * @example |
375 | + |
376 | + var api = external.getUnityObject('1.0'); |
377 | + var hub = api.ContentHub; |
378 | + |
379 | + var pictureContentType = hub.ContentType.Pictures; |
380 | + |
381 | + hub.defaultSourceForType( |
382 | + pictureContentType |
383 | + , function(peer) { |
384 | + [do something with the peer] |
385 | + }); |
386 | + */ |
387 | function ContentPeer(objectid, content) { |
388 | this._proxy = backendBridge.createRemoteObject( |
389 | PLUGIN_URI, 'ContentPeer', objectid); |
390 | @@ -240,6 +294,27 @@ |
391 | }, |
392 | }; |
393 | |
394 | +/** |
395 | + * ContentStore is an object returned by the ContentHub. |
396 | + |
397 | + It represents a location where the resources imported or |
398 | + exported from a peer during a transfer operation are to be |
399 | + either saved or found. |
400 | + |
401 | + * @class ContentStore |
402 | + * @module ContentHub |
403 | + * @constructor |
404 | + * @example |
405 | + |
406 | + var api = external.getUnityObject('1.0'); |
407 | + var hub = api.ContentHub; |
408 | + |
409 | + var pictureContentType = hub.ContentType.Pictures; |
410 | + |
411 | + hub.defaultStoreForType(pictureContentType, function(store) { |
412 | + [do something with the store] |
413 | + }); |
414 | + */ |
415 | function ContentStore(objectid, content) { |
416 | this._proxy = backendBridge.createRemoteObject( |
417 | PLUGIN_URI, 'ContentStore', objectid); |
418 | @@ -301,10 +376,34 @@ |
419 | : null; |
420 | }; |
421 | |
422 | +/** |
423 | + * The ContentHub object. |
424 | + |
425 | + * @class ContentHub |
426 | + * @static |
427 | + * @constructor |
428 | + */ |
429 | return { |
430 | /** |
431 | - * ContentType is an enumeration of well known content types. |
432 | - * |
433 | + ContentType is an enumeration of well known content types. |
434 | + |
435 | + Values: |
436 | + |
437 | + Pictures |
438 | + |
439 | + Documents |
440 | + |
441 | + Music |
442 | + |
443 | + @static |
444 | + @property ContentType {String} |
445 | + |
446 | + @example |
447 | + |
448 | + var api = external.getUnityObject('1.0'); |
449 | + var hub = api.ContentHub; |
450 | + |
451 | + var pictureContentType = hub.ContentType.Pictures; |
452 | */ |
453 | ContentType: { |
454 | Pictures: "Pictures", |
455 | @@ -312,11 +411,55 @@ |
456 | Music: "Music" |
457 | }, |
458 | |
459 | - /** |
460 | - * ContentTransfer.State is an enumeration of the states of a content transfer. |
461 | - * |
462 | - */ |
463 | ContentTransfer: { |
464 | + |
465 | + /** |
466 | + ContentTransfer.State is an enumeration of the state of a given ongoing ContentTransfer. |
467 | + |
468 | + Values: |
469 | + |
470 | + Created: Transfer created, waiting to be initiated. |
471 | + |
472 | + Initiated: Transfer has been initiated. |
473 | + |
474 | + InProgress: Transfer is in progress. |
475 | + |
476 | + Charged: Transfer is charged with items and ready to be collected. |
477 | + |
478 | + Collected: Items in the transfer have been collected. |
479 | + |
480 | + Aborted: Transfer has been aborted. |
481 | + |
482 | + Finalized: Transfer has been finished and cleaned up. |
483 | + |
484 | + @static |
485 | + @property ContentTransfer.State {String} |
486 | + |
487 | + @example |
488 | + |
489 | + var api = external.getUnityObject('1.0'); |
490 | + var hub = api.ContentHub; |
491 | + |
492 | + var transferState = hub.ContentTransfer.State; |
493 | + var pictureContentType = hub.ContentType.Pictures; |
494 | + |
495 | + hub.importContentForPeer( |
496 | + pictureContentType, |
497 | + peer, |
498 | + function(transfer) { |
499 | + hub.defaultStoreForType(pictureContentType, function(store) { |
500 | + transfer.setStore(store, function() { |
501 | + transfer.start(function(state) { |
502 | + if (transferState.Aborted === state) { |
503 | + [...] |
504 | + } |
505 | + [...] |
506 | + }); |
507 | + }); |
508 | + }); |
509 | + }); |
510 | + |
511 | + */ |
512 | State: { |
513 | // Transfer created, waiting to be initiated. |
514 | Created: "Created", |
515 | @@ -340,6 +483,18 @@ |
516 | Finalized: "Finalized", |
517 | }, |
518 | |
519 | + /** |
520 | + ContentTransfer.Direction is an enumeration of the directions of a given ContentTransfer. |
521 | + |
522 | + Values: |
523 | + |
524 | + Import |
525 | + |
526 | + Export |
527 | + |
528 | + @static |
529 | + @property ContentTransfer.Direction {String} |
530 | + */ |
531 | Direction: { |
532 | // Transfer is a request to import content |
533 | Import: "Import", |
534 | @@ -348,6 +503,18 @@ |
535 | Export: "Export", |
536 | }, |
537 | |
538 | + /** |
539 | + ContentTransfer.SelectionType is an enumeration of the directions of a given ContentTransfer. |
540 | + |
541 | + Values: |
542 | + |
543 | + Single: Transfer should contain a single item |
544 | + |
545 | + Multiple: Transfer can contain multiple items |
546 | + |
547 | + @static |
548 | + @property ContentTransfer.SelectionType {String} |
549 | + */ |
550 | SelectionType: { |
551 | // Transfer should contain a single item |
552 | Single: "Single", |
553 | @@ -362,7 +529,7 @@ |
554 | * |
555 | * @method defaultSourceForType |
556 | * @param type {ContentType} Content type. |
557 | - * @param callback {Function ({ContentPeer})} Function called with the created ContentPeer. |
558 | + * @param callback {Function (ContentPeer)} Function called with the created ContentPeer. |
559 | */ |
560 | defaultSourceForType: function(type, callback) { |
561 | backendBridge.call('ContentHub.defaultSourceForType', |
562 | @@ -375,7 +542,7 @@ |
563 | * |
564 | * @method defaultStoreForType |
565 | * @param type {ContentType} Content type. |
566 | - * @param callback {Function ({ContentStore})} Function called with the created ContentStore. |
567 | + * @param callback {Function (ContentStore)} Function called with the created ContentStore. |
568 | */ |
569 | defaultStoreForType: function(type, callback) { |
570 | backendBridge.call('ContentHub.defaultStoreForType', |
571 | @@ -388,7 +555,7 @@ |
572 | * |
573 | * @method knownSourcesForType |
574 | * @param type {ContentType} Content type. |
575 | - * @param callback {Function ({ Array of {ContentPeer} })} Function called with the possible ContentPeers. |
576 | + * @param callback {Function (Array of ContentPeer)} Function called with the possible ContentPeers. |
577 | */ |
578 | knownSourcesForType: function(type, callback) { |
579 | backendBridge.call('ContentHub.knownSourcesForType', |
580 | @@ -408,11 +575,11 @@ |
581 | }, |
582 | |
583 | /** |
584 | - * Creates a ContentStore object for the given content type. |
585 | + * Creates a ContentTransfer object for the given content type. |
586 | * |
587 | * @method importContent |
588 | * @param type {ContentType} Content type. |
589 | - * @param callback {Function} function({ContentTransfer}) Function called with the created ContentTransfer. |
590 | + * @param callback {Function(ContentTransfer)} Function called with the created ContentTransfer. |
591 | */ |
592 | importContent: function(type, callback) { |
593 | backendBridge.call('ContentHub.importContent', |
594 | @@ -421,12 +588,12 @@ |
595 | }, |
596 | |
597 | /** |
598 | - * Creates a ContentStore object for the given ContentPeer. |
599 | + * Creates a ContentTransfer object for the given ContentPeer. |
600 | * |
601 | - * @method importContent |
602 | + * @method importContentForPeer |
603 | * @param type {ContentType} Content type. |
604 | * @param peer {ContentPeer} Content peer. |
605 | - * @param callback {Function} function({ContentTransfer}) Function called with the created ContentTransfer. |
606 | + * @param callback {Function(ContentTransfer)} Function called with the created ContentTransfer. |
607 | */ |
608 | importContentForPeer: function(type, peer, callback) { |
609 | backendBridge.call('ContentHub.importContentForPeer', |
610 | @@ -435,11 +602,32 @@ |
611 | }, |
612 | |
613 | /** |
614 | - * Creates a ContentStore object for the given ContentPeer. |
615 | + * Sets a handler that is to be called when the current application is the |
616 | + * target of an export request. |
617 | * |
618 | - * @method importContent |
619 | - * @param callback {Function} function({ContentTransfer}) Function when one requests a resource to be exported. |
620 | + * @method onExportRequested |
621 | + * @param callback {Function(ContentTransfer)} Function when one requests a resource to be exported. |
622 | * The corresponding ContentTransfer is provided as a parameter. |
623 | + * |
624 | + * @example |
625 | + |
626 | + var api = external.getUnityObject(1.0); |
627 | + var hub = api.ContentHub; |
628 | + |
629 | + var transferState = hub.ContentTransfer.State; |
630 | + |
631 | + function _exportRequested(transfer) { |
632 | + var url = window.location.href; |
633 | + url = url.substr(0, url.lastIndexOf('/')+1) + 'img/ubuntuone-music.png'; |
634 | + |
635 | + transfer.setItems([{name: 'Ubuntu One', url: url}], |
636 | + function() { |
637 | + transfer.setState(hub.ContentTransfer.State.Charged); |
638 | + }); |
639 | + }; |
640 | + |
641 | + hub.onExportRequested(_exportRequested); |
642 | + |
643 | */ |
644 | onExportRequested: function(callback) { |
645 | backendBridge.call('ContentHub.onExportRequested', |
646 | |
647 | === modified file 'src/Ubuntu/UnityWebApps/bindings/online-accounts/client/online-accounts.js' |
648 | --- src/Ubuntu/UnityWebApps/bindings/online-accounts/client/online-accounts.js 2014-01-22 21:26:43 +0000 |
649 | +++ src/Ubuntu/UnityWebApps/bindings/online-accounts/client/online-accounts.js 2014-02-10 19:04:00 +0000 |
650 | @@ -1,6 +1,18 @@ |
651 | +/** |
652 | + * OnlineAccounts is the entry point to online accounts service access. |
653 | + |
654 | + * @module OnlineAccounts |
655 | + */ |
656 | + |
657 | function createOnlineAccountsApi(backendBridge) { |
658 | var PLUGIN_URI = 'OnlineAccounts'; |
659 | |
660 | +/** |
661 | + * Account represents an single online account. |
662 | + |
663 | + * @class Account |
664 | + * @constructor |
665 | + */ |
666 | function Account(id, content) { |
667 | this._proxy = backendBridge.createRemoteObject( |
668 | PLUGIN_URI, 'Account', id); |
669 | @@ -61,6 +73,12 @@ |
670 | }, |
671 | }; |
672 | |
673 | +/** |
674 | + * AccountService. |
675 | + |
676 | + * @class AccountService |
677 | + * @constructor |
678 | + */ |
679 | function AccountService(id) { |
680 | this._proxy = backendBridge.createRemoteObject( |
681 | PLUGIN_URI, 'AccountService', id); |
682 | @@ -271,8 +289,21 @@ |
683 | ? constructorPerName[className] |
684 | : null; |
685 | }; |
686 | - |
687 | - return { |
688 | + |
689 | +/** |
690 | + * The OnlineAccounts object. |
691 | + |
692 | + * @class OnlineAccounts |
693 | + * @constructor |
694 | + * |
695 | + * @example |
696 | + |
697 | + var api = external.getUnityObject(1.0); |
698 | + var oa = api.OnlineAccounts; |
699 | + |
700 | + oa.api.getAccountsInfoFor(null, 'facebook', function(result) { [...] }); |
701 | + */ |
702 | + return { |
703 | |
704 | Account: { |
705 | RemovalOptions: { |
706 | @@ -285,7 +316,7 @@ |
707 | * Creates a AccountServiceModel object. |
708 | * |
709 | * @method createAccountServiceModel |
710 | - * @param callback {Function ( {ProviderModel} )} |
711 | + * @param callback {Function (ProviderModel)} |
712 | */ |
713 | createAccountServiceModel: function(callback) { |
714 | backendBridge.call('OnlineAccounts.createAccountServiceModel' |
715 | @@ -297,7 +328,7 @@ |
716 | * Creates a Manager object. |
717 | * |
718 | * @method createManager |
719 | - * @param callback {Function ( {Manager} )} |
720 | + * @param callback {Function (Manager)} |
721 | */ |
722 | createManager: function(callback) { |
723 | backendBridge.call('OnlineAccounts.createManager' |
724 | @@ -309,7 +340,7 @@ |
725 | * Creates a ProviderModel object. |
726 | * |
727 | * @method createProviderModel |
728 | - * @param callback {Function ( {ProviderModel} )} |
729 | + * @param callback {Function (ProviderModel)} |
730 | */ |
731 | createProviderModel: function(callback) { |
732 | backendBridge.call('OnlineAccounts.createProviderModel' |
733 | @@ -321,12 +352,28 @@ |
734 | /** |
735 | * Gets the access token for a given set of filtering parameters. |
736 | * |
737 | - * @method getAccessTokenFor |
738 | - * @param service If set, the access token will be retrieved for the accounts that correspond to that specific service. |
739 | - * @param provider If set, the access token will be retrieved for the accounts that correspond to that specific service. |
740 | - * @param accountId If set, the access token will be retrieved for the accounts that correspond to that specific service. |
741 | + * @method api.getAccessTokenFor |
742 | + * @param service {String} If set, the access token will be retrieved for the accounts that correspond to that specific service. |
743 | + * @param provider {String} If set, the access token will be retrieved for the accounts that correspond to that specific service. |
744 | + * @param accountId {Integer} If set, the access token will be retrieved for the accounts that correspond to that specific service. |
745 | * It is used when multiple accounts are found, otherwise the first account is selected. |
746 | - * @param callback {Function({Object(error:, authenticated: {Bool}, data: )})} Callback that receives the result or null |
747 | + * @param callback {Function(Object(error:, authenticated: Bool, data: ))} Callback that receives the result or null |
748 | + * |
749 | + * @example |
750 | + |
751 | + var api = external.getUnityObject(1.0); |
752 | + var oa = api.OnlineAccounts; |
753 | + |
754 | + oa.api.getAccessTokenFor(null, 'facebook', null, function(result) { |
755 | + if (result.error) { |
756 | + console.log("Error: " + result.error); |
757 | + return; |
758 | + } |
759 | + console.log("Authenticated: " |
760 | + + result.authenticated |
761 | + + ", token: " |
762 | + + result.data); |
763 | + }); |
764 | */ |
765 | getAccessTokenFor: function(service, provider, accountId, callback) { |
766 | backendBridge.call('OnlineAccounts.getAccessTokenFor' |
767 | @@ -337,10 +384,26 @@ |
768 | /** |
769 | * Gets the account information for a given set of filtering parameters. |
770 | * |
771 | - * @method getAccountsInfoFor |
772 | - * @param service If set, the access token will be retrieved for the accounts that correspond to that specific service. |
773 | - * @param provider If set, the access token will be retrieved for the accounts that correspond to that specific service. |
774 | - * @param callback {Function({List {Object(displayName:, accountId: {Bool}, providerName: {String}, serviceName: {String}, enabled: {Bool})} })} Callback that receives the result or null |
775 | + * @method api.getAccountsInfoFor |
776 | + * @param service {String} If set, the access token will be retrieved for the accounts that correspond to that specific service. |
777 | + * @param provider {String} If set, the access token will be retrieved for the accounts that correspond to that specific service. |
778 | + * @param callback {Function(List of Object(displayName:, accountId: Bool, providerName: String, serviceName: String, enabled: Bool))} Callback that receives the result or null |
779 | + * |
780 | + * @example |
781 | + var api = external.getUnityObject(1.0); |
782 | + var oa = api.OnlineAccounts; |
783 | + |
784 | + oa.api.getAccountsInfoFor(null, 'facebook', function(result) { |
785 | + for (var i = 0; i < result.length; ++i) { |
786 | + console.log("name: " + result[i].displayName |
787 | + + ', id: ' + result[i].accountId |
788 | + + ', providerName: ' + result[i].providerName |
789 | + + ', serviceName: ' + result[i].serviceName |
790 | + + ', enabled: ' + (result[i].enabled ? "true" : "false") |
791 | + ); |
792 | + } |
793 | + }); |
794 | + |
795 | */ |
796 | getAccountsInfoFor: function(service, provider, callback) { |
797 | backendBridge.call('OnlineAccounts.getAccountsInfoFor' |
798 | @@ -351,9 +414,9 @@ |
799 | /** |
800 | * Gets the account that corresponds to a given id. |
801 | * |
802 | - * @method getAccountById |
803 | - * @param accountId The account id. |
804 | - * @param callback {Function({Account})} Callback that receives the result or null |
805 | + * @method api.getAccountById |
806 | + * @param accountId {Integer} The account id. |
807 | + * @param callback {Function(Account)} Callback that receives the result or null |
808 | */ |
809 | getAccountById: function(accountId, callback) { |
810 | backendBridge.call('OnlineAccounts.getAccountById' |
811 | |
812 | === modified file 'src/Ubuntu/UnityWebApps/unity-webapps-api.js.in' |
813 | --- src/Ubuntu/UnityWebApps/unity-webapps-api.js.in 2014-01-21 19:58:04 +0000 |
814 | +++ src/Ubuntu/UnityWebApps/unity-webapps-api.js.in 2014-02-10 19:04:00 +0000 |
815 | @@ -277,7 +277,7 @@ |
816 | }, |
817 | |
818 | OnlineAccounts: createOnlineAccountsApi(backend), |
819 | - Alarm: createAlarmApi(backend), |
820 | + AlarmApi: createAlarmApi(backend), |
821 | ContentHub: createContentHubApi(backend), |
822 | }; |
823 | |
824 | |
825 | === modified file 'tests/unit/test_plugin/data/installed-webapps/invalid/valid.user.js' |
826 | --- tests/unit/test_plugin/data/installed-webapps/invalid/valid.user.js 2013-06-05 14:24:44 +0000 |
827 | +++ tests/unit/test_plugin/data/installed-webapps/invalid/valid.user.js 2014-02-10 19:04:00 +0000 |
828 | @@ -1,1 +1,1 @@ |
829 | -var Unity = window.external.getUnityObject(1); |
830 | +var Unity = window.external.getUnityObject('1.0'); |
831 | |
832 | === modified file 'tests/unit/test_plugin/data/installed-webapps/unity-webapps-valid/valid.user.js' |
833 | --- tests/unit/test_plugin/data/installed-webapps/unity-webapps-valid/valid.user.js 2013-06-05 14:24:44 +0000 |
834 | +++ tests/unit/test_plugin/data/installed-webapps/unity-webapps-valid/valid.user.js 2014-02-10 19:04:00 +0000 |
835 | @@ -1,1 +1,1 @@ |
836 | -var Unity = window.external.getUnityObject(1); |
837 | +var Unity = window.external.getUnityObject('1.0'); |
838 | |
839 | === modified file 'tests/unit/test_plugin/data/installed-webapps/unity-webapps-with-requires-valid/valid.user.js' |
840 | --- tests/unit/test_plugin/data/installed-webapps/unity-webapps-with-requires-valid/valid.user.js 2013-06-05 14:24:44 +0000 |
841 | +++ tests/unit/test_plugin/data/installed-webapps/unity-webapps-with-requires-valid/valid.user.js 2014-02-10 19:04:00 +0000 |
842 | @@ -1,1 +1,1 @@ |
843 | -var Unity = window.external.getUnityObject(1); |
844 | +var Unity = window.external.getUnityObject('1.0'); |
PASSED: Continuous integration, rev:81 jenkins. qa.ubuntu. com/job/ unity-webapps- qml-ci/ 61/ jenkins. qa.ubuntu. com/job/ unity-webapps- qml-trusty- amd64-ci/ 9 jenkins. qa.ubuntu. com/job/ unity-webapps- qml-trusty- armhf-ci/ 9
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/unity- webapps- qml-ci/ 61/rebuild
http://