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:
Massimiliano Assante 2013-02-14 15:04:02 +00:00
parent 92a551d982
commit ab9f9043df
2 changed files with 47 additions and 59 deletions

View File

@ -68,20 +68,7 @@ public class D4sRichTextarea extends ReportTextArea {
area.setPixelSize(width-6, height-2);
area.setStyleName("d4sRichTextArea");
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:
area.addStyleName("bodyArea");
break;
@ -129,41 +116,41 @@ public class D4sRichTextarea extends ReportTextArea {
});
//TODO: aggiorna
// area.addKeyDownHandler(new KeyDownHandler() {
// public void onKeyDown(KeyDownEvent event) {
//// if (event.isAnyModifierKeyDown() && event.getNativeKeyCode() == 86) { //event.getNativeKeyCode() == 86 is the V (to avoid ctrl V or cmd V)
//// MessageBox.show(new MessageBoxConfig() {
//// {
//// setTitle("Paste operation");
//// setMsg("Please enter your text here (PLAIN)");
//// setWidth(500);
//// setButtons(MessageBox.OKCANCEL);
//// setMultiline(true);
//// setCallback(new MessageBox.PromptCallback() {
//// public void execute(String btnID, String text) {
//// if (btnID.compareTo("ok") == 0) {
//// area.setText(text);
////
//// //resize if needed
//// HTML div = ReportGenerator.get().getDivHidden();
//// //GWT.log("element.getHTML():\n" + area.getHTML(), null);
//// div.setHTML(area.getHTML());
//// int newHeight = div.getOffsetHeight()+20 ;
//// if (newHeight > height-10 && newHeight != currHeight) {
//// resizePanel(myPanel.getOffsetWidth(), div.getOffsetHeight());
//// }
//// }
////
//// }
//// });
//// }
//// });
// event.stopPropagation();
// event.preventDefault();
// }
//
// }
// });
// area.addKeyDownHandler(new KeyDownHandler() {
// public void onKeyDown(KeyDownEvent event) {
//// if (event.isAnyModifierKeyDown() && event.getNativeKeyCode() == 86) { //event.getNativeKeyCode() == 86 is the V (to avoid ctrl V or cmd V)
//// MessageBox.show(new MessageBoxConfig() {
//// {
//// setTitle("Paste operation");
//// setMsg("Please enter your text here (PLAIN)");
//// setWidth(500);
//// setButtons(MessageBox.OKCANCEL);
//// setMultiline(true);
//// setCallback(new MessageBox.PromptCallback() {
//// public void execute(String btnID, String text) {
//// if (btnID.compareTo("ok") == 0) {
//// area.setText(text);
////
//// //resize if needed
//// HTML div = ReportGenerator.get().getDivHidden();
//// //GWT.log("element.getHTML():\n" + area.getHTML(), null);
//// div.setHTML(area.getHTML());
//// int newHeight = div.getOffsetHeight()+20 ;
//// if (newHeight > height-10 && newHeight != currHeight) {
//// resizePanel(myPanel.getOffsetWidth(), div.getOffsetHeight());
//// }
//// }
////
//// }
//// });
//// }
//// });
// event.stopPropagation();
// event.preventDefault();
// }
//
// }
// });
area.addKeyUpHandler(new KeyUpHandler() {
public void onKeyUp(KeyUpEvent event) {
HTML div = ReportGenerator.get().getDivHidden();
@ -173,7 +160,7 @@ public class D4sRichTextarea extends ReportTextArea {
presenter.shiftComponentsByTextArea(myInstance.top, newHeight - currHeight);
resizePanel(myPanel.getOffsetWidth(), div.getOffsetHeight());
//Window.alert("myInstance.top: " + myInstance.top);
presenter.resizeTemplateComponentInModel(myInstance, myPanel.getOffsetWidth(), newHeight);
presenter.resizeTemplateComponentInModel(myInstance, myPanel.getOffsetWidth()+5, newHeight);
}
}
});

View File

@ -85,7 +85,6 @@ tableBorder td {
border: none;
}
.fixedTextArea {
font-family: Times;
font-size: 20px;
@ -233,12 +232,14 @@ tableBorder td {
}
.d4sFrame {
border: 1px dashed #CCC;
border: 1px solid #CCC;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
background-color: white;
margin-top: 5px;
}
.report-ui-component {
background-repeat: no-repeat;
color: maroon;