cloudcms-server 0.9.301 → 3.3.1-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.last_command +7 -0
- package/broadcast/providers/redis.js +32 -57
- package/clients/nrp.js +117 -0
- package/clients/redis.js +48 -0
- package/duster/helpers/sample/nyt.js +5 -7
- package/framework/controllers.js +0 -1
- package/index.js +23 -13
- package/insight/insight.js +6 -9
- package/locks/providers/redis.js +29 -58
- package/middleware/admin/admin.js +4 -4
- package/middleware/awareness/awareness.js +4 -1
- package/middleware/awareness/plugins/editorial.js +41 -66
- package/middleware/awareness/plugins/resources.js +74 -0
- package/middleware/awareness/providers/redis.js +263 -237
- package/middleware/cache/providers/redis.js +134 -92
- package/middleware/config/config.js +41 -2
- package/middleware/deployment/deployment.js +19 -27
- package/middleware/form/form.js +18 -33
- package/middleware/modules/modules.js +64 -11
- package/middleware/proxy/proxy.js +1 -2
- package/middleware/stores/engines/s3.js +0 -2
- package/middleware/stores/stores.js +50 -6
- package/middleware/themes/themes.js +49 -0
- package/middleware/virtual-config/virtual-config.js +35 -39
- package/notifications/notifications.js +75 -2
- package/package.json +18 -20
- package/server/index.js +105 -23
- package/server/standalone.js +2 -0
- package/util/auth.js +5 -9
- package/util/cloudcms.js +19 -34
- package/util/proxy-factory.js +20 -8
- package/util/redis.js +113 -0
- package/util/renditions.js +6 -12
- package/util/request.js +117 -0
- package/util/util.js +31 -40
- package/web/socket.io/socket.io.js +4240 -2
- package/web/cms/ice.js +0 -109
- package/web/cms/preview.js +0 -106
package/web/cms/ice.js
DELETED
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
$(document).ready(function() {
|
|
3
|
-
|
|
4
|
-
// bring up in-context menu with SHIFT, SHIFT, SHIFT combination
|
|
5
|
-
var SHIFT = 16;
|
|
6
|
-
var sequence = [ SHIFT, SHIFT, SHIFT ];
|
|
7
|
-
var sequenceIndex = 0;
|
|
8
|
-
$(document).keyup(function(event)
|
|
9
|
-
{
|
|
10
|
-
if (event.keyCode == sequence[sequenceIndex]) {
|
|
11
|
-
sequenceIndex++;
|
|
12
|
-
|
|
13
|
-
if (sequenceIndex == sequence.length) {
|
|
14
|
-
sequenceIndex = 0;
|
|
15
|
-
|
|
16
|
-
popupAuthorDialog();
|
|
17
|
-
return true;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
} else {
|
|
21
|
-
sequenceIndex = 0;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
return false;
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
var popupAuthorDialog = function()
|
|
28
|
-
{
|
|
29
|
-
var authorDialog = $("#authorDialog");
|
|
30
|
-
|
|
31
|
-
if ($(authorDialog).length == 0)
|
|
32
|
-
{
|
|
33
|
-
var html = '<div data-role="dialog" id="authorDialog" > \
|
|
34
|
-
<div data-role="header"><h3>What would you like to do?</h3></div> \
|
|
35
|
-
<div data-role="content"> \
|
|
36
|
-
<ul data-role="listview" data-inset="true" style="min-width:210px;" data-theme="a"> \
|
|
37
|
-
<li><a href="#" class="invalidate-cache" data-inline="true" data-prefetch="true" data-iconpos="notext" data-transition="none">Invalidate Cache</a></li> \
|
|
38
|
-
<li><a href="#" class="edit-mobile-project" data-inline="true" data-prefetch="true" data-iconpos="notext" data-transition="none">Edit Mobile Project</a></li> \
|
|
39
|
-
<li><a href="#" class="edit-page" data-inline="true" data-prefetch="true" data-iconpos="notext" data-transition="none">Edit this Page</a></li> \
|
|
40
|
-
<li><a href="#" class="switch-branch" data-inline="true" data-prefetch="true" data-iconpos="notext" data-transition="none">Switch Branches</a></li> \
|
|
41
|
-
</ul> \
|
|
42
|
-
</div> \
|
|
43
|
-
</div> \
|
|
44
|
-
';
|
|
45
|
-
|
|
46
|
-
authorDialog = $(html);
|
|
47
|
-
|
|
48
|
-
$(authorDialog).find(".invalidate-cache").click(function() {
|
|
49
|
-
$(authorDialog).dialog('close');
|
|
50
|
-
var location = window.location.href;
|
|
51
|
-
var x = location.indexOf("#");
|
|
52
|
-
if (x > -1 && location.indexOf("?invalidate") == -1)
|
|
53
|
-
{
|
|
54
|
-
location = location.substring(0, x) + "?invalidate=true" + location.substring(x);
|
|
55
|
-
}
|
|
56
|
-
var y = location.indexOf("&ui-state=dialog");
|
|
57
|
-
if (y > -1)
|
|
58
|
-
{
|
|
59
|
-
location = location.substring(0, y) + location.substring(y + 16);
|
|
60
|
-
}
|
|
61
|
-
window.location.href = location;
|
|
62
|
-
});
|
|
63
|
-
$(authorDialog).find(".edit-page").click(function() {
|
|
64
|
-
$(authorDialog).dialog('close');
|
|
65
|
-
});
|
|
66
|
-
$(authorDialog).find(".switch-branch").click(function() {
|
|
67
|
-
$(authorDialog).dialog('close');
|
|
68
|
-
popupBranchSelectionDialog();
|
|
69
|
-
});
|
|
70
|
-
$(authorDialog).find(".edit-mobile-project").click(function() {
|
|
71
|
-
$(authorDialog).dialog('close');
|
|
72
|
-
window.open("http://demo.cloudcms.net/console/#/repositories/d2039858cca205b23b7b/branches/b1dbc57b64c2426da244/folders/821c40ab613d9b5bcbbc656b62229301");
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
$(authorDialog).appendTo($.mobile.pageContainer);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
$.mobile.changePage(authorDialog,{'transition':'pop'});
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
var popupBranchSelectionDialog = function()
|
|
82
|
-
{
|
|
83
|
-
var branchSelectionDialog = $("#branchSelectionDialog");
|
|
84
|
-
|
|
85
|
-
if ($(branchSelectionDialog).length == 0)
|
|
86
|
-
{
|
|
87
|
-
var html = ' \
|
|
88
|
-
<div data-role="dialog" id="branchSelectionDialog" > \
|
|
89
|
-
<div data-role="header"><h3>Select a Branch</h3></div> \
|
|
90
|
-
<div data-role="content"> \
|
|
91
|
-
<ul data-role="listview" data-inset="true" style="min-width:210px;" data-theme="a"> \
|
|
92
|
-
<li><a href="#" data-inline="true" data-prefetch="true" data-iconpos="notext" data-transition="none">Master</a></li> \
|
|
93
|
-
<li><a href="#" data-inline="true" data-prefetch="true" data-iconpos="notext" data-transition="none">Sandbox 1</a></li> \
|
|
94
|
-
<li><a href="#" data-inline="true" data-prefetch="true" data-iconpos="notext" data-transition="none">Test Branch</a></li> \
|
|
95
|
-
</ul> \
|
|
96
|
-
</div> \
|
|
97
|
-
</div> \
|
|
98
|
-
';
|
|
99
|
-
|
|
100
|
-
branchSelectionDialog = $(html);
|
|
101
|
-
|
|
102
|
-
$(branchSelectionDialog).appendTo($.mobile.pageContainer);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
$.mobile.changePage(branchSelectionDialog,{'transition':'pop'});
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
});
|
|
109
|
-
*/
|
package/web/cms/preview.js
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
if (typeof($) !== "undefined")
|
|
2
|
-
{
|
|
3
|
-
// only do this code injection if we're running in a preview frame
|
|
4
|
-
if (parent.cmsPostMessage)
|
|
5
|
-
{
|
|
6
|
-
(function() {
|
|
7
|
-
|
|
8
|
-
var collectFields = function(el, array)
|
|
9
|
-
{
|
|
10
|
-
// look for any elements with special markup
|
|
11
|
-
$(el).find("[data-field-id]").each(function() {
|
|
12
|
-
|
|
13
|
-
var contentFieldId = $(this).attr("data-field-id");
|
|
14
|
-
|
|
15
|
-
// content type
|
|
16
|
-
var contentFieldType = $(this).attr("data-field-type");
|
|
17
|
-
if (!contentFieldType) {
|
|
18
|
-
contentFieldType = "string";
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
var contentField = {
|
|
22
|
-
"id": contentFieldId,
|
|
23
|
-
"type": contentFieldType
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
// value
|
|
27
|
-
var contentFieldValue = $(this).attr("data-field-value");
|
|
28
|
-
if (!contentFieldValue) {
|
|
29
|
-
// pull html value for certain tags
|
|
30
|
-
if (["p", "div", "span", "textarea"].indexOf($(this)[0].nodeName.toLowerCase()) > -1) {
|
|
31
|
-
contentFieldValue = $(this).html();
|
|
32
|
-
}
|
|
33
|
-
// pull value for form tags
|
|
34
|
-
if (["input"].indexOf($(this)[0].nodeName.toLowerCase()) > -1) {
|
|
35
|
-
contentFieldValue = $(this).val();
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
if (contentFieldValue) {
|
|
39
|
-
if (typeof(contentFieldValue) == "string") {
|
|
40
|
-
contentFieldValue = $.trim(contentFieldValue);
|
|
41
|
-
}
|
|
42
|
-
contentField.value = contentFieldValue;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// title
|
|
46
|
-
var contentFieldTitle = $(this).attr("data-field-title");
|
|
47
|
-
if (contentFieldTitle) {
|
|
48
|
-
contentField.title = contentFieldTitle;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
array.push(contentField);
|
|
52
|
-
});
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
var handle = function(allElement, currentElement)
|
|
56
|
-
{
|
|
57
|
-
var payload = {
|
|
58
|
-
"type": "fields",
|
|
59
|
-
"data": {
|
|
60
|
-
"pathname": window.location.pathname,
|
|
61
|
-
"hash": window.location.hash,
|
|
62
|
-
"search": window.location.search,
|
|
63
|
-
"href": window.location.href,
|
|
64
|
-
"allFields": [],
|
|
65
|
-
"currentFields": []
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
// collect all + current fields
|
|
70
|
-
collectFields(allElement, payload.data.allFields);
|
|
71
|
-
collectFields(currentElement, payload.data.currentFields);
|
|
72
|
-
|
|
73
|
-
// send field information to preview server
|
|
74
|
-
parent.cmsPostMessage(payload);
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
// if we're running in jQuery mobile, we attach to the "pageshow" method
|
|
78
|
-
if ($.mobile)
|
|
79
|
-
{
|
|
80
|
-
// tell jquery mobile to update preview location whenever the page changes
|
|
81
|
-
$(document).bind('pageshow', function(event) {
|
|
82
|
-
|
|
83
|
-
// the whole body
|
|
84
|
-
var allElement = $(document.body);
|
|
85
|
-
|
|
86
|
-
// the current element
|
|
87
|
-
// the "page show" event yields the selected dom element (for single page 'multi-page' apps)
|
|
88
|
-
var currentElement = $(event.target);
|
|
89
|
-
handle(allElement, currentElement);
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
else
|
|
93
|
-
{
|
|
94
|
-
// bind to document ready
|
|
95
|
-
$(document).ready(function() {
|
|
96
|
-
|
|
97
|
-
// we use the document body for both
|
|
98
|
-
var allElement = $(document.body);
|
|
99
|
-
handle(allElement, allElement);
|
|
100
|
-
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
})();
|
|
105
|
-
}
|
|
106
|
-
}
|