📄 %%c1^c17^c1756a37%%jotpaddashletscript.tpl.php
字号:
<?php /* Smarty version 2.6.11, created on 2006-09-08 17:08:40 compiled from modules/Home/Dashlets/JotPadDashlet/JotPadDashletScript.tpl */ ?>
<?php echo '<script>
if(typeof JotPad == \'undefined\') { // since the dashlet can be included multiple times a page, don\'t redefine these functions
JotPad = function() {
return {
/**
* Called when the textarea is blurred
*/
blur: function(ta, id) {
ajaxStatus.showStatus(\''; echo $this->_tpl_vars['saving']; echo '\'); // show that AJAX call is happening
// what data to post to the dashlet
postData = \'to_pdf=1&module=Home&action=CallMethodDashlet&method=saveText&id=\' + id + \'&savedText=\' + ta.value;
var cObj = YAHOO.util.Connect.asyncRequest(\'POST\',\'index.php\',
{success: JotPad.saved, failure: JotPad.saved}, postData);
},
/**
* Called when the textarea is double clicked on
*/
edit: function(divObj, id) {
ta = document.getElementById(\'jotpad_textarea_\' + id);
if(isIE) ta.value = divObj.innerHTML.replace(/<br>/gi, "\\n");
else ta.value = divObj.innerHTML.replace(/<br>/gi, \'\');
divObj.style.display = \'none\';
ta.style.display = \'\';
ta.focus();
},
/**
* handle the response of the saveText method
*/
saved: function(data) {
eval(data.responseText);
ajaxStatus.showStatus(\''; echo $this->_tpl_vars['saved']; echo '\');
if(typeof result != \'undefined\') {
ta = document.getElementById(\'jotpad_textarea_\' + result[\'id\']);
theDiv = document.getElementById(\'jotpad_\' + result[\'id\']);
theDiv.innerHTML = result[\'savedText\'];
}
ta.style.display = \'none\';
theDiv.style.display = \'\';
window.setTimeout(\'ajaxStatus.hideStatus()\', 2000);
}
};
}();
}
</script>'; ?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -