Skip to content

Commit

Permalink
API Namespace changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Angelo Dini committed Jun 19, 2011
1 parent 689d372 commit e0db66a
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 18 deletions.
15 changes: 12 additions & 3 deletions cms/media/cms/js/change_list.js
Expand Up @@ -331,13 +331,22 @@

if(action=="copy"){
//url = insert_into_url(url, "copy", selected_page);
url = CMS.Helpers.setUrl(CMS.Helpers.getUrl(document.location), "copy=" + selected_page + "", "copy");
url = CMS.API.Helpers.setUrl(document.location, {
'addParam': "copy=" + selected_page,
'removeParam': "copy"
});
}else{
//url = remove_from_url(url, "copy");
url = CMS.Helpers.setUrl(CMS.Helpers.getUrl(document.location), "copy", "copy");
url = CMS.API.Helpers.setUrl(document.location, {
'addParam': "copy",
'removeParam': "copy"
});
}
//url = insert_into_url(url, "site__exact", id);
url = CMS.Helpers.setUrl(CMS.Helpers.getUrl(document.location), "site__exact=" + id + "", "site__exact");
url = CMS.API.Helpers.setUrl(document.location, {
'addParam': "site__exact=" + id,
'removeParam': "site__exact"
});

window.location = url;
});
Expand Down
8 changes: 4 additions & 4 deletions cms/media/cms/js/plugins/cms.base.js
Expand Up @@ -17,7 +17,7 @@ jQuery(document).ready(function ($) {
* @version: 1.0.0
* @description: Adds security layer to CMS namespace
* @public_methods:
* - CMS.Security.csrf();
* - CMS.API.Security.csrf();
*/
CMS.API.Security = {

Expand Down Expand Up @@ -62,9 +62,9 @@ jQuery(document).ready(function ($) {
* @version: 1.0.0
* @description: Adds helper methods to be invoked
* @public_methods:
* - CMS.Helpers.reloadBrowser();
* - CMS.Helpers.getUrl(urlString);
* - CMS.Helpers.setUrl(urlString, options);
* - CMS.API.Helpers.reloadBrowser();
* - CMS.API.Helpers.getUrl(urlString);
* - CMS.API.Helpers.setUrl(urlString, options);
*/
CMS.API.Helpers = {

Expand Down
10 changes: 5 additions & 5 deletions cms/media/cms/js/plugins/cms.placeholders.js
Expand Up @@ -13,11 +13,11 @@ jQuery(document).ready(function ($) {
* @version: 1.0.0
* @description: Handles placeholders when in editmode and adds "lightbox" to toolbar
* @public_methods:
* - CMS.Placeholder.addPlugin(url, obj);
* - CMS.Placeholder.editPlugin(placeholder_id, plugin_id);
* - CMS.Placeholder.deletePlugin(placeholder_id, plugin_id, plugin);
* - CMS.Placeholder.toggleFrame();
* - CMS.Placeholder.toggleDim();
* - CMS.API.Placeholder.addPlugin(url, obj);
* - CMS.API.Placeholder.editPlugin(placeholder_id, plugin_id);
* - CMS.API.Placeholder.deletePlugin(placeholder_id, plugin_id, plugin);
* - CMS.API.Placeholder.toggleFrame();
* - CMS.API.Placeholder.toggleDim();
* @compatibility: IE >= 6, FF >= 2, Safari >= 4, Chrome > =4, Opera >= 10
*/
CMS.Placeholders = CMS.Class.$extend({
Expand Down
10 changes: 5 additions & 5 deletions cms/media/cms/js/plugins/cms.toolbar.js
Expand Up @@ -14,11 +14,11 @@ jQuery(document).ready(function ($) {
* @version: 1.0.0
* @description: Implements and controls toolbar
* @public_methods:
* - CMS.Toolbar.toggleToolbar();
* - CMS.Toolbar.registerItem(obj);
* - CMS.Toolbar.registerItems(array);
* - CMS.Toolbar.removeItem(id);
* - CMS.Toolbar.registerType(function);
* - CMS.API.Toolbar.toggleToolbar();
* - CMS.API.Toolbar.registerItem(obj);
* - CMS.API.Toolbar.registerItems(array);
* - CMS.API.Toolbar.removeItem(id);
* - CMS.API.Toolbar.registerType(function);
* @compatibility: IE >= 6, FF >= 2, Safari >= 4, Chrome > =4, Opera >= 10
* TODO: login needs special treatment (errors, login on enter)
* TODO: styling of the collapser button needs to be somehow transparent
Expand Down
2 changes: 1 addition & 1 deletion cms/templates/admin/cms/page/plugin_forms_ok.html
Expand Up @@ -16,7 +16,7 @@
jQuery(document).ready(function ($) {
// if it is an iframe
if(window.parent != self) {
setTimeout(function () { window.parent.CMS.Helpers.reloadBrowser(); }, 1000);
setTimeout(function () { window.parent.CMS.API.Helpers.reloadBrowser(); }, 1000);
} else {
opener.dismissEditPluginPopup(window, "{{ plugin_id }}", "{{ icon }}", "{{ alt }}");
}
Expand Down

0 comments on commit e0db66a

Please sign in to comment.