Author: tyrell
Date: Sun Jan 20 19:05:20 2008
New Revision: 12550
Log:
Adding verification code to make sure some text is selected before a 'surround
with' action is called. Fixing MASHUP-414.
Modified:
trunk/mashup/java/modules/www/js/scraper.js
Modified: trunk/mashup/java/modules/www/js/scraper.js
==============================================================================
--- trunk/mashup/java/modules/www/js/scraper.js (original)
+++ trunk/mashup/java/modules/www/js/scraper.js Sun Jan 20 19:05:20 2008
@@ -403,6 +403,11 @@
}
}
+ if (selText == "") {
+ alert("You need to select a portion of the code to surround
first.");
+ return;
+ }
+
if (tag == "empty") {
selText = "<empty>" + selText + "</empty>";
} else if (tag == "text") {
_______________________________________________
Mashup-dev mailing list
[email protected]
http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev