Skip to content

Commit 1885790

Browse files
committed
Merge pull request #23 from vish250491/master
issue related to plugin disappearing is fixed in this .
2 parents 2bdc65e + d161ff0 commit 1885790

File tree

6 files changed

+115
-93
lines changed

6 files changed

+115
-93
lines changed

control/content/controllers/content.home.controller.js

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
ContentHome.editor = new Buildfire.components.carousel.editor("#carousel");
1313
$scope.pluginExist = 0;
1414

15-
var masterInfo = DEFAULT_DATA.ADVANCED_FOLDER_INFO;
15+
var masterInfo = null;//DEFAULT_DATA.ADVANCED_FOLDER_INFO;
1616
//Default initialise
17-
ContentHome.info = DEFAULT_DATA.ADVANCED_FOLDER_INFO;
17+
ContentHome.info = null;//DEFAULT_DATA.ADVANCED_FOLDER_INFO;
1818
ContentHome.restrictUpdate = false;
1919

2020
var timerDelay;
@@ -138,14 +138,29 @@
138138

139139
ContentHome.deleteEntity = function (obj, isFolder) {
140140
var nodeData = obj.$modelValue;
141+
var pluginInstanceArray=[];
141142
Modals.removePopupModal(isFolder).then(function (result) {
142143
if (result) {
143144
if (nodeData.hasOwnProperty('items')) {
144-
nodeData.items.forEach(function (item) {
145+
getLeaf(nodeData);
146+
function getLeaf(node) {
147+
if (node.items) {
148+
node.items.forEach(function (item) {
149+
return getLeaf(item);
150+
});
151+
}
152+
else {
153+
return pluginInstanceArray.push(node.instanceId);
154+
}
155+
}
156+
157+
ContentHome.info.data._buildfire.plugins.data = ContentHome.info.data._buildfire.plugins.data.filter(function(x) { return pluginInstanceArray.indexOf(x) < 0 })
158+
159+
/*nodeData.items.forEach(function (item) {
145160
var index = ContentHome.info.data._buildfire.plugins.data.indexOf(item.instanceId);
146161
ContentHome.info.data._buildfire.plugins.data.splice(index, 1);
147162
})
148-
163+
*/
149164
//ContentHome.info.data.content.entity.splice(ind, 1);
150165
obj.remove();
151166
} else {
@@ -161,6 +176,7 @@
161176
};
162177

163178

179+
164180
ContentHome.resizeImage = function (url, settings) {
165181
var options = {};
166182
if (!url) {

control/content/enums.js

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -35,50 +35,52 @@
3535
"images": [
3636
{
3737
"action": "noAction",
38-
"iconUrl": "http://imageserver.prod.s3.amazonaws.com/b55ee984-a8e8-11e5-88d3-124798dea82d/4f6c85e0-fa2e-11e5-a163-758fec3c9ebe.jpg",
38+
"iconUrl": "http://imageserver.prod.s3.amazonaws.com/1460958791423-042123055388219655/e116e1b0-0529-11e6-ad9d-6f08d19b7913.jpg",
3939
"title": "image"
4040
},
4141
{
4242
"action": "noAction",
43-
"iconUrl": "http://imageserver.prod.s3.amazonaws.com/b55ee984-a8e8-11e5-88d3-124798dea82d/50e0af50-fa2e-11e5-a163-758fec3c9ebe.jpg",
43+
"iconUrl": "http://imageserver.prod.s3.amazonaws.com/1460958791423-042123055388219655/e1729640-0529-11e6-aae4-45742639c60d.jpg",
4444
"title": "image"
4545
}
4646
],
47-
"description": "<p>&nbsp;Instant way to group all applications into group wise.</p>",
47+
"description": "<p>With the Advanced Folder plugin you can add existing plugins, create new plugins, or create groups so that you can group your plugins together in a hierarchy. Check out our tutorial in our knowledge base for more information. HINT: You'll also want to check out our article on the WYSIWYG</p>",
4848
"entity": [
4949
{
50-
"title": "A",
50+
"title": "This is a group",
5151
"iconUrl": "",
5252
"fileUrl": "",
53-
"items": []
53+
"items": [
54+
{
55+
"title": "You can add contents inside",
56+
"iconUrl": "",
57+
"fileUrl": "",
58+
"items": []
59+
}
60+
]
5461
},
5562
{
56-
"title": "B",
63+
"title": "This is another group",
5764
"iconUrl": "",
5865
"fileUrl": "",
59-
"items": []
60-
},
61-
{
62-
"title": "C",
63-
"iconUrl": "",
64-
"fileUrl": "",
65-
"items": []
66-
},
67-
{
68-
"title": "D",
69-
"iconUrl": "",
70-
"fileUrl": "",
71-
"items": []
66+
"items": [
67+
{
68+
"title": "Add plugins or other groups",
69+
"iconUrl": "",
70+
"fileUrl": "",
71+
"items": []
72+
}
73+
]
7274
}
7375
]
7476
},
7577
"design": {
7678
"itemListLayout": "list-layout1",
7779
"bgImage": {
78-
"i16x9": "http://imageserver.prod.s3.amazonaws.com/b55ee984-a8e8-11e5-88d3-124798dea82d/08facfd0-fa2f-11e5-a163-758fec3c9ebe.jpg",
79-
"i3x2": "http://imageserver.prod.s3.amazonaws.com/b55ee984-a8e8-11e5-88d3-124798dea82d/08facfd0-fa2f-11e5-a163-758fec3c9ebe.jpg",
80-
"i4x3": "http://imageserver.prod.s3.amazonaws.com/b55ee984-a8e8-11e5-88d3-124798dea82d/08facfd0-fa2f-11e5-a163-758fec3c9ebe.jpg",
81-
"i16x10": "http://imageserver.prod.s3.amazonaws.com/b55ee984-a8e8-11e5-88d3-124798dea82d/08facfd0-fa2f-11e5-a163-758fec3c9ebe.jpg"
80+
"i16x9": "",
81+
"i3x2": "",
82+
"i4x3": "",
83+
"i16x10": ""
8284
}
8385
}
8486

control/content/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<meta charset="UTF-8">
4848
</head>
4949
<body>
50-
<div ng-controller="ContentHomeCtrl as ContentHome">
50+
<div ng-cloak="" ng-controller="ContentHomeCtrl as ContentHome">
5151
<div id="carousel"></div>
5252
<hr class="none">
5353
<div class="item clearfix row">

control/design/enums.js

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -32,50 +32,52 @@
3232
"images": [
3333
{
3434
"action": "noAction",
35-
"iconUrl": "http://imageserver.prod.s3.amazonaws.com/b55ee984-a8e8-11e5-88d3-124798dea82d/4f6c85e0-fa2e-11e5-a163-758fec3c9ebe.jpg",
35+
"iconUrl": "http://imageserver.prod.s3.amazonaws.com/1460958791423-042123055388219655/e116e1b0-0529-11e6-ad9d-6f08d19b7913.jpg",
3636
"title": "image"
3737
},
3838
{
3939
"action": "noAction",
40-
"iconUrl": "http://imageserver.prod.s3.amazonaws.com/b55ee984-a8e8-11e5-88d3-124798dea82d/50e0af50-fa2e-11e5-a163-758fec3c9ebe.jpg",
40+
"iconUrl": "http://imageserver.prod.s3.amazonaws.com/1460958791423-042123055388219655/e1729640-0529-11e6-aae4-45742639c60d.jpg",
4141
"title": "image"
4242
}
4343
],
44-
"description": "<p>&nbsp;Instant way to group all applications into group wise.</p>",
44+
"description": "<p>With the Advanced Folder plugin you can add existing plugins, create new plugins, or create groups so that you can group your plugins together in a hierarchy. Check out our tutorial in our knowledge base for more information. HINT: You'll also want to check out our article on the WYSIWYG</p>",
4545
"entity": [
46-
{
47-
"title": "A",
48-
"iconUrl": "",
49-
"fileUrl": "",
50-
"items": []
51-
},
52-
{
53-
"title": "B",
54-
"iconUrl": "",
55-
"fileUrl": "",
56-
"items": []
57-
},
58-
{
59-
"title": "C",
60-
"iconUrl": "",
61-
"fileUrl": "",
62-
"items": []
63-
},
64-
{
65-
"title": "D",
66-
"iconUrl": "",
67-
"fileUrl": "",
68-
"items": []
69-
}
70-
]
46+
{
47+
"title": "This is a group",
48+
"iconUrl": "",
49+
"fileUrl": "",
50+
"items": [
51+
{
52+
"title": "You can add contents inside",
53+
"iconUrl": "",
54+
"fileUrl": "",
55+
"items": []
56+
}
57+
]
58+
},
59+
{
60+
"title": "This is another group",
61+
"iconUrl": "",
62+
"fileUrl": "",
63+
"items": [
64+
{
65+
"title": "Add plugins or other groups",
66+
"iconUrl": "",
67+
"fileUrl": "",
68+
"items": []
69+
}
70+
]
71+
}
72+
]
7173
},
7274
"design": {
7375
"itemListLayout": "list-layout1",
7476
"bgImage": {
75-
"i16x9": "http://imageserver.prod.s3.amazonaws.com/b55ee984-a8e8-11e5-88d3-124798dea82d/08facfd0-fa2f-11e5-a163-758fec3c9ebe.jpg",
76-
"i3x2": "http://imageserver.prod.s3.amazonaws.com/b55ee984-a8e8-11e5-88d3-124798dea82d/08facfd0-fa2f-11e5-a163-758fec3c9ebe.jpg",
77-
"i4x3": "http://imageserver.prod.s3.amazonaws.com/b55ee984-a8e8-11e5-88d3-124798dea82d/08facfd0-fa2f-11e5-a163-758fec3c9ebe.jpg",
78-
"i16x10": "http://imageserver.prod.s3.amazonaws.com/b55ee984-a8e8-11e5-88d3-124798dea82d/08facfd0-fa2f-11e5-a163-758fec3c9ebe.jpg"
77+
"i16x9": "",
78+
"i3x2": "",
79+
"i4x3": "",
80+
"i16x10": ""
7981
}
8082
}
8183

widget/controllers/widget.home.controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
WidgetHome.view = null;
2424
//Default initialise
25-
WidgetHome.info = DEFAULT_DATA.ADVANCED_FOLDER_INFO;
25+
WidgetHome.info = null;//DEFAULT_DATA.ADVANCED_FOLDER_INFO;
2626

2727

2828
WidgetHome.initData = [

widget/enums.js

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -35,50 +35,52 @@
3535
"images": [
3636
{
3737
"action": "noAction",
38-
"iconUrl": "http://imageserver.prod.s3.amazonaws.com/b55ee984-a8e8-11e5-88d3-124798dea82d/4f6c85e0-fa2e-11e5-a163-758fec3c9ebe.jpg",
38+
"iconUrl": "http://imageserver.prod.s3.amazonaws.com/1460958791423-042123055388219655/e116e1b0-0529-11e6-ad9d-6f08d19b7913.jpg",
3939
"title": "image"
4040
},
4141
{
4242
"action": "noAction",
43-
"iconUrl": "http://imageserver.prod.s3.amazonaws.com/b55ee984-a8e8-11e5-88d3-124798dea82d/50e0af50-fa2e-11e5-a163-758fec3c9ebe.jpg",
43+
"iconUrl": "http://imageserver.prod.s3.amazonaws.com/1460958791423-042123055388219655/e1729640-0529-11e6-aae4-45742639c60d.jpg",
4444
"title": "image"
4545
}
4646
],
47-
"description": "<p>&nbsp;Instant way to group all applications into group wise.</p>",
47+
"description": "<p>With the Advanced Folder plugin you can add existing plugins, create new plugins, or create groups so that you can group your plugins together in a hierarchy. Check out our tutorial in our knowledge base for more information. HINT: You'll also want to check out our article on the WYSIWYG</p>",
4848
"entity": [
49-
{
50-
"title": "A",
51-
"iconUrl": "",
52-
"fileUrl": "",
53-
"items": []
54-
},
55-
{
56-
"title": "B",
57-
"iconUrl": "",
58-
"fileUrl": "",
59-
"items": []
60-
},
61-
{
62-
"title": "C",
63-
"iconUrl": "",
64-
"fileUrl": "",
65-
"items": []
66-
},
67-
{
68-
"title": "D",
69-
"iconUrl": "",
70-
"fileUrl": "",
71-
"items": []
72-
}
73-
]
49+
{
50+
"title": "This is a group",
51+
"iconUrl": "",
52+
"fileUrl": "",
53+
"items": [
54+
{
55+
"title": "You can add contents inside",
56+
"iconUrl": "",
57+
"fileUrl": "",
58+
"items": []
59+
}
60+
]
61+
},
62+
{
63+
"title": "This is another group",
64+
"iconUrl": "",
65+
"fileUrl": "",
66+
"items": [
67+
{
68+
"title": "Add plugins or other groups",
69+
"iconUrl": "",
70+
"fileUrl": "",
71+
"items": []
72+
}
73+
]
74+
}
75+
]
7476
},
7577
"design": {
7678
"itemListLayout": "list-layout1",
7779
"bgImage": {
78-
"i16x9": "http://imageserver.prod.s3.amazonaws.com/b55ee984-a8e8-11e5-88d3-124798dea82d/08facfd0-fa2f-11e5-a163-758fec3c9ebe.jpg",
79-
"i3x2": "http://imageserver.prod.s3.amazonaws.com/b55ee984-a8e8-11e5-88d3-124798dea82d/08facfd0-fa2f-11e5-a163-758fec3c9ebe.jpg",
80-
"i4x3": "http://imageserver.prod.s3.amazonaws.com/b55ee984-a8e8-11e5-88d3-124798dea82d/08facfd0-fa2f-11e5-a163-758fec3c9ebe.jpg",
81-
"i16x10": "http://imageserver.prod.s3.amazonaws.com/b55ee984-a8e8-11e5-88d3-124798dea82d/08facfd0-fa2f-11e5-a163-758fec3c9ebe.jpg"
80+
"i16x9": "",
81+
"i3x2": "",
82+
"i4x3": "",
83+
"i16x10": ""
8284
}
8385
}
8486

0 commit comments

Comments
 (0)