seems working, need to implement share with people tags now

git-svn-id: https://svn.research-infrastructures.eu/d4science/gcube/trunk/portlets/user/share-updates@73468 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2013-04-16 21:54:09 +00:00
parent 909a27d17e
commit a527575090
1 changed files with 16 additions and 12 deletions

View File

@ -82,17 +82,7 @@ public class SmartTextArea extends ContentEditDiv {
}
});
}
private String extractLink(String textToCheck) {
String [] parts = textToCheck.split("\\s");
// Attempt to convert each item into an URL.
for( String item : parts ) {
if (item.startsWith("http")) {
return item;
}
}
return null;
}
/**
* paste and other events overridden
*/
@ -138,7 +128,21 @@ public class SmartTextArea extends ContentEditDiv {
DomEvent.fireNativeEvent(event, this, this.getElement());
}
/**
* extract the pasted link
* @param textToCheck
* @return null if there's no link present
*/
private String extractLink(String textToCheck) {
String [] parts = textToCheck.split("\\s");
// Attempt to convert each item into an URL.
for( String item : parts ) {
if (item.startsWith("http")) {
return item;
}
}
return null;
}
protected void removeSampleText() {
if (getText().equals(ShareUpdateForm.SHARE_UPDATE_TEXT) || getText().equals(ShareUpdateForm.ERROR_UPDATE_TEXT) ) {