partially updated styles
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/reports@69272 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
92a551d982
commit
ab9f9043df
|
@ -35,7 +35,7 @@ public class D4sRichTextarea extends ReportTextArea {
|
||||||
*/
|
*/
|
||||||
private RichTextArea area = new RichTextArea();
|
private RichTextArea area = new RichTextArea();
|
||||||
|
|
||||||
|
|
||||||
TextArea text = new TextArea();
|
TextArea text = new TextArea();
|
||||||
/**
|
/**
|
||||||
* a flag
|
* a flag
|
||||||
|
@ -43,7 +43,7 @@ public class D4sRichTextarea extends ReportTextArea {
|
||||||
boolean firstClick = true;
|
boolean firstClick = true;
|
||||||
|
|
||||||
int currHeight = 0;
|
int currHeight = 0;
|
||||||
|
|
||||||
VerticalPanel myPanel;
|
VerticalPanel myPanel;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -68,28 +68,15 @@ public class D4sRichTextarea extends ReportTextArea {
|
||||||
area.setPixelSize(width-6, height-2);
|
area.setPixelSize(width-6, height-2);
|
||||||
area.setStyleName("d4sRichTextArea");
|
area.setStyleName("d4sRichTextArea");
|
||||||
|
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case TITLE:
|
|
||||||
area.addStyleName("");
|
|
||||||
break;
|
|
||||||
case HEADING_1:
|
|
||||||
area.addStyleName("");
|
|
||||||
break;
|
|
||||||
case HEADING_2:
|
|
||||||
area.addStyleName("");
|
|
||||||
break;
|
|
||||||
case HEADING_3:
|
|
||||||
area.addStyleName("");
|
|
||||||
break;
|
|
||||||
case BODY:
|
case BODY:
|
||||||
area.addStyleName("bodyArea");
|
area.addStyleName("bodyArea");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
myPanel.add(area);
|
myPanel.add(area);
|
||||||
//repositionMyPanel(0, 15);
|
//repositionMyPanel(0, 15);
|
||||||
myPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM);
|
myPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM);
|
||||||
|
@ -101,7 +88,7 @@ public class D4sRichTextarea extends ReportTextArea {
|
||||||
if (event.getNativeButton() == Event.BUTTON_RIGHT) {
|
if (event.getNativeButton() == Event.BUTTON_RIGHT) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
MessageBox.alert("Warning","Please, use CTRL+V (CMD+V) for pasting into this area", null);
|
MessageBox.alert("Warning","Please, use CTRL+V (CMD+V) for pasting into this area", null);
|
||||||
}
|
}
|
||||||
if (firstClick) {
|
if (firstClick) {
|
||||||
presenter.enableTextToolBar(area);
|
presenter.enableTextToolBar(area);
|
||||||
|
@ -126,44 +113,44 @@ public class D4sRichTextarea extends ReportTextArea {
|
||||||
firstClick = true;
|
firstClick = true;
|
||||||
presenter.storeChangeInSession((Widget) event.getSource());
|
presenter.storeChangeInSession((Widget) event.getSource());
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
//TODO: aggiorna
|
//TODO: aggiorna
|
||||||
// area.addKeyDownHandler(new KeyDownHandler() {
|
// area.addKeyDownHandler(new KeyDownHandler() {
|
||||||
// public void onKeyDown(KeyDownEvent event) {
|
// public void onKeyDown(KeyDownEvent event) {
|
||||||
//// if (event.isAnyModifierKeyDown() && event.getNativeKeyCode() == 86) { //event.getNativeKeyCode() == 86 is the V (to avoid ctrl V or cmd V)
|
//// if (event.isAnyModifierKeyDown() && event.getNativeKeyCode() == 86) { //event.getNativeKeyCode() == 86 is the V (to avoid ctrl V or cmd V)
|
||||||
//// MessageBox.show(new MessageBoxConfig() {
|
//// MessageBox.show(new MessageBoxConfig() {
|
||||||
//// {
|
//// {
|
||||||
//// setTitle("Paste operation");
|
//// setTitle("Paste operation");
|
||||||
//// setMsg("Please enter your text here (PLAIN)");
|
//// setMsg("Please enter your text here (PLAIN)");
|
||||||
//// setWidth(500);
|
//// setWidth(500);
|
||||||
//// setButtons(MessageBox.OKCANCEL);
|
//// setButtons(MessageBox.OKCANCEL);
|
||||||
//// setMultiline(true);
|
//// setMultiline(true);
|
||||||
//// setCallback(new MessageBox.PromptCallback() {
|
//// setCallback(new MessageBox.PromptCallback() {
|
||||||
//// public void execute(String btnID, String text) {
|
//// public void execute(String btnID, String text) {
|
||||||
//// if (btnID.compareTo("ok") == 0) {
|
//// if (btnID.compareTo("ok") == 0) {
|
||||||
//// area.setText(text);
|
//// area.setText(text);
|
||||||
////
|
////
|
||||||
//// //resize if needed
|
//// //resize if needed
|
||||||
//// HTML div = ReportGenerator.get().getDivHidden();
|
//// HTML div = ReportGenerator.get().getDivHidden();
|
||||||
//// //GWT.log("element.getHTML():\n" + area.getHTML(), null);
|
//// //GWT.log("element.getHTML():\n" + area.getHTML(), null);
|
||||||
//// div.setHTML(area.getHTML());
|
//// div.setHTML(area.getHTML());
|
||||||
//// int newHeight = div.getOffsetHeight()+20 ;
|
//// int newHeight = div.getOffsetHeight()+20 ;
|
||||||
//// if (newHeight > height-10 && newHeight != currHeight) {
|
//// if (newHeight > height-10 && newHeight != currHeight) {
|
||||||
//// resizePanel(myPanel.getOffsetWidth(), div.getOffsetHeight());
|
//// resizePanel(myPanel.getOffsetWidth(), div.getOffsetHeight());
|
||||||
//// }
|
//// }
|
||||||
//// }
|
//// }
|
||||||
////
|
////
|
||||||
//// }
|
//// }
|
||||||
//// });
|
//// });
|
||||||
//// }
|
//// }
|
||||||
//// });
|
//// });
|
||||||
// event.stopPropagation();
|
// event.stopPropagation();
|
||||||
// event.preventDefault();
|
// event.preventDefault();
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
area.addKeyUpHandler(new KeyUpHandler() {
|
area.addKeyUpHandler(new KeyUpHandler() {
|
||||||
public void onKeyUp(KeyUpEvent event) {
|
public void onKeyUp(KeyUpEvent event) {
|
||||||
HTML div = ReportGenerator.get().getDivHidden();
|
HTML div = ReportGenerator.get().getDivHidden();
|
||||||
|
@ -173,7 +160,7 @@ public class D4sRichTextarea extends ReportTextArea {
|
||||||
presenter.shiftComponentsByTextArea(myInstance.top, newHeight - currHeight);
|
presenter.shiftComponentsByTextArea(myInstance.top, newHeight - currHeight);
|
||||||
resizePanel(myPanel.getOffsetWidth(), div.getOffsetHeight());
|
resizePanel(myPanel.getOffsetWidth(), div.getOffsetHeight());
|
||||||
//Window.alert("myInstance.top: " + myInstance.top);
|
//Window.alert("myInstance.top: " + myInstance.top);
|
||||||
presenter.resizeTemplateComponentInModel(myInstance, myPanel.getOffsetWidth(), newHeight);
|
presenter.resizeTemplateComponentInModel(myInstance, myPanel.getOffsetWidth()+5, newHeight);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -202,7 +189,7 @@ public class D4sRichTextarea extends ReportTextArea {
|
||||||
public String getHTML() {
|
public String getHTML() {
|
||||||
return area.getHTML();
|
return area.getHTML();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param html the html
|
* @param html the html
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -85,7 +85,6 @@ tableBorder td {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.fixedTextArea {
|
.fixedTextArea {
|
||||||
font-family: Times;
|
font-family: Times;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
|
@ -233,12 +232,14 @@ tableBorder td {
|
||||||
}
|
}
|
||||||
|
|
||||||
.d4sFrame {
|
.d4sFrame {
|
||||||
border: 1px dashed #CCC;
|
border: 1px solid #CCC;
|
||||||
|
-webkit-border-radius: 5px;
|
||||||
|
-moz-border-radius: 5px;
|
||||||
|
border-radius: 5px;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.report-ui-component {
|
.report-ui-component {
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
color: maroon;
|
color: maroon;
|
||||||
|
|
Reference in New Issue