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.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;
@ -129,41 +116,41 @@ public class D4sRichTextarea extends ReportTextArea {
}); });
//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);
} }
} }
}); });

View File

@ -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;