This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"menu-test1_google": { | |
"weight": 500000, | |
"icon": "/google/icons/google.png", | |
"title": "Google Apps" | |
}, | |
"menu-test1_google-webmail": { | |
"parent": "menu-test1_google", | |
"weight": 10, | |
"title": "Webmail", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"menu-sub-menu-item": { | |
"parent": "menu-parent-item", | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"ribbon-test1_training": { | |
"weight": 500000, | |
"icon": "/icons/training.png", | |
"title": "Training" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var f = BCAPI.Models.FileSystem.Root.file('hello_world.txt'); | |
f.destroy().done(function() { | |
console.log('File was destroyed'); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var f = BCAPI.Models.FileSystem.Root.file('hello_world.txt'); | |
var data = 'Hello World !'; | |
f.upload(data).done(function () { | |
console.log('File uploaded succesfully'); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var apps = new BCAPI.Models.WebApp.AppCollection(); | |
apps.fetch({ | |
success: function (webAppItems) { | |
//Do something for each of the webapps found | |
}, | |
error: function (webAppItems, xhr) { | |
// handle errors | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript" src="//code.jquery.com/jquery-1.10.2.min.js"></script> | |
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.3.1/jquery.cookie.min.js"></script> | |
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.1/underscore-min.js"></script> | |
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/backbone.js/1.0.0/backbone-min.js"></script> | |
<script type="text/javascript" src="//cdn.worldsecuresystems.com/bcapi/bcapi-0.0.1.min.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Perform the AJAX request (make sure you've set the access token | |
var request = $.ajax({ | |
url: "/api/v2/admin/sites/current/tokens", | |
type: "DELETE", | |
headers: { | |
"Authorization": access_token | |
}, | |
contentType: "application/json", | |
}); // Request successful, response is in "msg" variable | |
request.done(function (msg) { |