Skip to content

Commit 532e43d

Browse files
committed
Merge branch 'master' of github.com:pmalves/cde
2 parents f39b244 + 0b02036 commit 532e43d

File tree

13 files changed

+163
-36
lines changed

13 files changed

+163
-36
lines changed

client/js/cdf-dd-layout.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ var LayoutMoveUpOperation = MoveUpOperation.extend({
696696

697697
id: "LAYOUT_MOVE_UP",
698698
types: [LayoutRowModel.MODEL,LayoutColumnModel.MODEL,LayoutSpaceModel.MODEL,LayoutImageModel.MODEL,LayoutHtmlModel.MODEL,
699-
LayoutCarouselModel.MODEL],
699+
LayoutCarouselModel.MODEL,FilterBlockModel.MODEL,FilterRowModel.MODEL,FilterHeaderModel.MODEL],
700700

701701
constructor: function(){
702702
this.logger = new Logger("LayoutMoveUpOperation");
@@ -711,7 +711,7 @@ var LayoutMoveDownOperation = MoveDownOperation.extend({
711711

712712
id: "LAYOUT_MOVE_DOWN",
713713
types: [LayoutRowModel.MODEL,LayoutColumnModel.MODEL,LayoutSpaceModel.MODEL,LayoutImageModel.MODEL,LayoutHtmlModel.MODEL,
714-
LayoutCarouselModel.MODEL],
714+
LayoutCarouselModel.MODEL,FilterBlockModel.MODEL,FilterRowModel.MODEL,FilterHeaderModel.MODEL],
715715

716716
constructor: function(){
717717
this.logger = new Logger("LayoutMoveDownOperation");
@@ -728,8 +728,8 @@ var LayoutDeleteOperation = DeleteOperation.extend({
728728
types: [LayoutRowModel.MODEL,LayoutColumnModel.MODEL,
729729
LayoutSpaceModel.MODEL,LayoutImageModel.MODEL,
730730
LayoutHtmlModel.MODEL,LayoutResourceModel.MODEL,
731-
732-
LayoutCarouselModel.MODEL],
731+
LayoutCarouselModel.MODEL,FilterBlockModel.MODEL,
732+
FilterRowModel.MODEL,FilterHeaderModel.MODEL],
733733

734734
constructor: function(){
735735
this.logger = new Logger("LayoutDeleteOperation");

server/plugin/resource/resources/custom/components/CCC/ccc-implementation.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ var CccComponent = BaseComponent.extend({
1919
if(typeof(this.chartDefinition.height) === "undefined")
2020
this.chartDefinition.height = ph.height();
2121

22-
if (Modernizr.svg) {
22+
if (Modernizr != undefined && Modernizr.svg) {
2323
this.renderChart();
2424
} else {
2525
pv.listenForPageLoad(function() {myself.renderChart();});
@@ -45,9 +45,12 @@ var CccComponent = BaseComponent.extend({
4545
});
4646

4747
}
48+
else if(this.valuesArray != undefined){
49+
this.render(this.valuesArray);
50+
}
4851
else{
4952
// initialize the component only
50-
this.render()
53+
this.render();
5154
}
5255
},
5356

server/plugin/resource/resources/mobile/cmd.css

Lines changed: 57 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,25 @@ body {
77
padding:0px;
88
font-family: Helvetica, Arial, sans;
99
}
10+
11+
/*
12+
* CSS for some of the blockUI stuff
13+
*/
14+
15+
#blockUIDragHandle {
16+
border-radius: 5px 5px 0 0;
17+
width: auto;
18+
background-color: rgb(170,170,170);
19+
text-align: right;
20+
padding: 0 10px;
21+
}
22+
23+
#blockUIDragHandle a {
24+
color: black;
25+
text-decoration: none;
26+
}
27+
28+
1029
/*
1130
* Fix some stuff that jQueryUI and jQueryMobile disagree about
1231
*/
@@ -169,6 +188,9 @@ div.cmdContent > div {
169188
color-stop(0, #4d4d4d),
170189
color-stop(1, #111)
171190
);
191+
background-image:
192+
-moz-linear-gradient(left, rgba(30,30,30,.8), rgba(10,10,10,0) 2px, rgba(0,0,0,0) 5px),
193+
-moz-linear-gradient(top, #4d4d4d, #111);
172194
background-image:
173195
-webkit-linear-gradient(left, rgba(30,30,30,.8), rgba(10,10,10,0) 2px, rgba(0,0,0,0) 5px),
174196
-webkit-linear-gradient(top, #4d4d4d, #111);
@@ -194,6 +216,10 @@ div.cmdContent > div {
194216
color-stop(0, #4d4d4d),
195217
color-stop(1, #111)
196218
);
219+
background-image:
220+
-moz-linear-gradient(left, rgba(30,30,30,.8), rgba(10,10,10,0) 2px, rgba(0,0,0,0) 5px),
221+
-moz-linear-gradient(right, rgba(20,20,20,.8), rgba(10,10,10,0) 2px, rgba(0,0,0,0) 5px),
222+
-moz-linear-gradient(top, #4d4d4d, #111);
197223
background-image:
198224
-webkit-linear-gradient(left, rgba(30,30,30,.8), rgba(10,10,10,0) 2px, rgba(0,0,0,0) 5px),
199225
-webkit-linear-gradient(right, rgba(20,20,20,.8), rgba(10,10,10,0) 2px, rgba(0,0,0,0) 5px),
@@ -214,6 +240,9 @@ div.cmdContent > div {
214240
color-stop(0, #4d4d4d),
215241
color-stop(1, #111)
216242
);
243+
background-image:
244+
-moz-linear-gradient(right, rgba(20,20,20,.8), rgba(10,10,10,0) 2px, rgba(0,0,0,0) 5px),
245+
-moz-linear-gradient(top, #4d4d4d, #111);
217246
background-image:
218247
-webkit-linear-gradient(right, rgba(20,20,20,.8), rgba(10,10,10,0) 2px, rgba(0,0,0,0) 5px),
219248
-webkit-linear-gradient(top, #4d4d4d, #111);
@@ -226,6 +255,7 @@ div.cmdContent > div {
226255
color-stop(1%,rgba(255,255,255,0))
227256
);
228257
background-image:-webkit-linear-gradient(left, #ddd 0px, rgba(240,240,240,.80) 2px, rgba(255,255,255,0) 3px);
258+
background-image:-moz-linear-gradient(left, #ddd 0px, rgba(240,240,240,.80) 2px, rgba(255,255,255,0) 3px);
229259
}
230260

231261
.tableComponent tr td:not(:first-child):not(:last-child) {
@@ -240,9 +270,12 @@ div.cmdContent > div {
240270
color-stop(.5%,rgba(240,240,240,.8)),
241271
color-stop(1%,rgba(255,255,255,0))
242272
);
273+
background-image:
274+
-moz-linear-gradient(left, #ddd 0px, rgba(240,240,240,.80) 2px, rgba(255,255,255,0) 3px),
275+
-moz-linear-gradient(right, #aaa 0px, rgba(240,240,240,.80) 2px, rgba(255,255,255,0) 3px);
243276
background-image:
244277
-webkit-linear-gradient(left, #ddd 0px, rgba(240,240,240,.80) 2px, rgba(255,255,255,0) 3px),
245-
-webkit-linear-gradient(right, #aaa 0px, rgba(240,240,240,.80) 2px, rgba(255,255,255,0) 3px);
278+
-webkit-linear-gradient(right, #aaa 0px, rgba(240,240,240,.80) 2px, rgba(255,255,255,0) 3px);
246279
}
247280

248281
.tableComponent tr td:first-child {
@@ -253,6 +286,7 @@ div.cmdContent > div {
253286
color-stop(1%,rgba(255,255,255,0))
254287
);
255288
background-image:-webkit-linear-gradient(right, #aaa 0px, rgba(240,240,240,.8) 2px, rgba(255,255,255,0) 3px);
289+
background-image:-moz-linear-gradient(right, #aaa 0px, rgba(240,240,240,.8) 2px, rgba(255,255,255,0) 3px);
256290

257291
}
258292
}
@@ -272,6 +306,9 @@ div.cmdContent > div {
272306
color-stop(0, #4d4d4d),
273307
color-stop(1, #111)
274308
);
309+
background-image:
310+
-moz-linear-gradient(right, rgba(30,30,30,.8), rgba(10,10,10,0) 2px, rgba(0,0,0,0) 5px),
311+
-moz-linear-gradient(top, #4d4d4d, #111);
275312
background-image:
276313
-webkit-linear-gradient(right, rgba(30,30,30,.8), rgba(10,10,10,0) 2px, rgba(0,0,0,0) 5px),
277314
-webkit-linear-gradient(top, #4d4d4d, #111);
@@ -291,6 +328,9 @@ div.cmdContent > div {
291328
color-stop(0, #4d4d4d),
292329
color-stop(1, #111)
293330
);
331+
background-image:
332+
-moz-linear-gradient(left, rgba(30,30,30,.8), rgba(10,10,10,0) 2px, rgba(0,0,0,0) 5px),
333+
-moz-linear-gradient(top, #4d4d4d, #111);
294334
background-image:
295335
-webkit-linear-gradient(left, rgba(30,30,30,.8), rgba(10,10,10,0) 2px, rgba(0,0,0,0) 5px),
296336
-webkit-linear-gradient(top, #4d4d4d, #111);
@@ -316,6 +356,10 @@ div.cmdContent > div {
316356
color-stop(0, #4d4d4d),
317357
color-stop(1, #111)
318358
);
359+
background-image:
360+
-moz-linear-gradient(left, rgba(30,30,30,.8), rgba(10,10,10,0) 2px, rgba(0,0,0,0) 5px),
361+
-moz-linear-gradient(right, rgba(20,20,20,.8), rgba(10,10,10,0) 2px, rgba(0,0,0,0) 5px),
362+
-moz-linear-gradient(top, #4d4d4d, #111);
319363
background-image:
320364
-webkit-linear-gradient(left, rgba(30,30,30,.8), rgba(10,10,10,0) 2px, rgba(0,0,0,0) 5px),
321365
-webkit-linear-gradient(right, rgba(20,20,20,.8), rgba(10,10,10,0) 2px, rgba(0,0,0,0) 5px),
@@ -330,6 +374,7 @@ div.cmdContent > div {
330374
color-stop(1%,rgba(255,255,255,0))
331375
);
332376
background-image:-webkit-linear-gradient(left, #ddd 0px, rgba(240,240,240,.80) 2px, rgba(255,255,255,0) 3px);
377+
background-image:-moz-linear-gradient(left, #ddd 0px, rgba(240,240,240,.80) 2px, rgba(255,255,255,0) 3px);
333378
}
334379

335380
.tableComponent tr td:not(:first-child):not(:last-child) {
@@ -344,9 +389,12 @@ div.cmdContent > div {
344389
color-stop(1%,rgba(240,240,240,.8)),
345390
color-stop(2%,rgba(255,255,255,0))
346391
);
392+
background-image:
393+
-moz-linear-gradient(left, #ddd 0px, rgba(240,240,240,.80) 2px, rgba(255,255,255,0) 3px),
394+
-moz-linear-gradient(right, #aaa 0px, rgba(240,240,240,.80) 2px, rgba(255,255,255,0) 3px);
347395
background-image:
348396
-webkit-linear-gradient(left, #ddd 0px, rgba(240,240,240,.80) 2px, rgba(255,255,255,0) 3px),
349-
-webkit-linear-gradient(right, #aaa 0px, rgba(240,240,240,.80) 2px, rgba(255,255,255,0) 3px);
397+
-webkit-linear-gradient(right, #aaa 0px, rgba(240,240,240,.80) 2px, rgba(255,255,255,0) 3px);
350398
}
351399

352400
.tableComponent tr td:first-child {
@@ -357,6 +405,7 @@ div.cmdContent > div {
357405
color-stop(2%,rgba(255,255,255,0))
358406
);
359407
background-image:-webkit-linear-gradient(right, #aaa 0px, rgba(240,240,240,.8) 2px, rgba(255,255,255,0) 3px);
408+
background-image:-moz-linear-gradient(right, #aaa 0px, rgba(240,240,240,.8) 2px, rgba(255,255,255,0) 3px);
360409

361410
}
362411

@@ -427,10 +476,14 @@ div.cmdContent > div {
427476
color-stop(0,rgba(77,77,77,1)),
428477
color-stop(1,rgba(33,33,33,1))
429478
);
430-
/* background-image:
479+
background-image:
480+
url("img/icons/search_icon_18x18px.png"),
481+
-moz-linear-gradient(left, rgba(0,0,0,0) 33px, rgba(0,0,0,.5) 34px, rgba(0,0,0,1) 36px),
482+
-moz-linear-gradient(top, #4d4d4d, #333);
483+
background-image:
431484
url("img/icons/search_icon_18x18px.png"),
432485
-webkit-linear-gradient(left, rgba(0,0,0,0) 33px, rgba(0,0,0,.5) 34px, rgba(0,0,0,1) 36px),
433-
-webkit-linear-gradient(top, #4d4d4d, #333);*/
486+
-webkit-linear-gradient(top, #4d4d4d, #333);
434487
background-position: 9px 4px, center,center;
435488
background-repeat:no-repeat;
436489
box-shadow: 0 0 7px 3px black;

server/plugin/resource/resources/mobile/cmd.js

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,31 @@
22
*/
33

44
$.blockUI.defaults.fadeIn = 0;
5-
$.blockUI.defaults.message = '<div style="padding: 15px;"><img src="' + webAppPath + '/content/pentaho-cdf/resources/style/images/busy.gif" /><h3>Processing...</h3></div>';
6-
$.blockUI.defaults.css.left = '40%';
7-
$.blockUI.defaults.css.top = '30%';
8-
$.blockUI.defaults.css.marginLeft = '85px';
9-
$.blockUI.defaults.css.width = '170px';
5+
$.blockUI.defaults.message = '<div style="padding: 15px;"><img src="res/system/pentaho-cdf-dd/resources/mobile/img/spinner.gif" />';
6+
$.blockUI.defaults.css.left = '50%';
7+
$.blockUI.defaults.css.top = '50%';
8+
$.blockUI.defaults.css.marginLeft = '-210px';
9+
$.blockUI.defaults.css.marginTop = '-220px';
10+
$.blockUI.defaults.css.width = '420px';
11+
$.blockUI.defaults.css.height = '440px';
12+
1013
$.blockUI.defaults.css.opacity = '.8';
1114
$.blockUI.defaults.css['-webkit-border-radius'] = '10px';
1215
$.blockUI.defaults.css['-moz-border-radius'] = '10px';
1316

17+
Dashboards.blockUIwithDrag = function() {
18+
if (typeof Dashboards.i18nSupport !== "undefined" && Dashboards.i18nSupport != null) {
19+
// If i18n support is enabled process the message accordingly
20+
$.blockUI.defaults.message = '<div style="padding: 15px;"><img src="' + webAppPath + '/content/pentaho-cdf/resources/style/images/busy.gif" /><h3>' + Dashboards.i18nSupport.prop('processing.message') + '</h3></div>';
21+
}
22+
23+
$.blockUI();
24+
var handle = $('<div id="blockUIDragHandle"> <a href="javascript:$.unblockUI()" title="Click to unblock">X</a></div>')
25+
$("div.blockUI.blockMsg").prepend(handle);
26+
$("div.blockUI.blockMsg").draggable({
27+
handle: "#blockUIDragHandle"
28+
});
29+
};
1430

1531

1632
function CDFMobile() {
4.27 KB
Loading
3.42 KB
Loading
50.6 KB
Loading

server/plugin/resource/resources/mobile/scroller.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ function Scroller(element,options,$_){
7373
$mask.width(_width);
7474
$wrapper = $mask.parent();
7575
// $holder.css('left', - _width * _currentPage);
76-
$holder.css('-webkit-transform', "transform3d(0," + (- _width * _currentPage) + "px,0)");
77-
$holder.css('-moz-transform', "transform3d(0," + (- _width * _currentPage) + "px,0)");
76+
$holder.css('-webkit-transform', "translate3d(" + (- _width * _currentPage) + "px,0,0)");
77+
$holder.css('-moz-transform', "translateX(" + (- _width * _currentPage) + "px)");
7878
$holder.find(".cdfCarouselItem:not(:nth-child("+(_currentPage+1)+"))");
7979
$holder.bind("webkitAnimationEnd", resetAnimation);
8080
$holder.bind("animationend", resetAnimation);
@@ -126,8 +126,8 @@ function Scroller(element,options,$_){
126126
var $next;
127127
if (_currentPage < _count - 1) {
128128
_currentPage += 1;
129-
cloneLeft['-webkit-transform'] = "transform3d(0," + (- _width * _currentPage) + "px,0)";
130-
cloneLeft['-moz-transform'] = "transform3d(0," + (- _width * _currentPage) + "px,0)";
129+
cloneLeft['-webkit-transform'] = "translate3d(" + (- _width * _currentPage) + "px,0,0)";
130+
cloneLeft['-moz-transform'] = "translateX(" + (- _width * _currentPage) + "px)";
131131
$holder.css(cloneLeft);
132132
refreshStatus();
133133
fitMaskHeight();
@@ -141,8 +141,8 @@ function Scroller(element,options,$_){
141141
var cloneLeft = $.extend({},scrollLeft);
142142
if (_currentPage > 0) {
143143
_currentPage -= 1;
144-
cloneLeft['-webkit-transform'] = "transform3d(0," + (- _width * _currentPage) + "px,0)";
145-
cloneLeft['-moz-transform'] = "transform3d(0," + (- _width * _currentPage) + "px,0)";
144+
cloneLeft['-webkit-transform'] = "translate3d(" + (- _width * _currentPage) + "px,0,0)";
145+
cloneLeft['-moz-transform'] = "translateX(" + (- _width * _currentPage) + "px)";
146146
$holder.css(cloneLeft);
147147
refreshStatus();
148148
fitMaskHeight();

server/plugin/src/pt/webdetails/cdf/dd/AbstractDashboard.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ public String filter(String input)
217217
}
218218

219219
String raw = DependenciesManager.getInstance().getEngine("CDF-RAW").getDependencies();
220-
return title + raw + cdfDependencies + dependencies + styles;
220+
return title + cdfDependencies + raw + dependencies + styles;
221221
}
222222

223223
public String getContent()

server/plugin/src/pt/webdetails/cdf/dd/BlueprintDashboard.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public String filter(String input)
147147
}
148148

149149
String raw = DependenciesManager.getInstance().getEngine("CDF-RAW").getDependencies();
150-
return title + raw + cdfDependencies + dependencies + styles;
150+
return title + cdfDependencies + raw + dependencies + styles;
151151
}
152152

153153
public String getType()

0 commit comments

Comments
 (0)