fix virtual js
This commit is contained in:
@ -122,8 +122,12 @@ function serendipity_plugin_api_pre_event_hook($event, &$bag, &$eventData, &$add
|
|||||||
echo serendipity_smarty_show('admin/serendipity_editor.js.tpl', $data);
|
echo serendipity_smarty_show('admin/serendipity_editor.js.tpl', $data);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case 'js':
|
case 'js':
|
||||||
echo "jQuery(function() {
|
// alway add \n\n for the next and start at line Col 1, to populate the (virtual) serendipity.js file
|
||||||
|
echo "
|
||||||
|
jQuery(function() {
|
||||||
jQuery('input[type=\"url\"]').change(function() {
|
jQuery('input[type=\"url\"]').change(function() {
|
||||||
if (this.value != '' && ! (this.value.substr(0,7) == 'http://' || this.value.substr(0,8) == 'https://')) {
|
if (this.value != '' && ! (this.value.substr(0,7) == 'http://' || this.value.substr(0,8) == 'https://')) {
|
||||||
this.value = 'http://' + this.value;
|
this.value = 'http://' + this.value;
|
||||||
|
Reference in New Issue
Block a user