本文整理汇总了PHP中page_add_script函数的典型用法代码示例。如果您正苦于以下问题:PHP page_add_script函数的具体用法?PHP page_add_script怎么用?PHP page_add_script使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了page_add_script函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: SiteglossaryEditForm
function SiteglossaryEditForm()
{
parent::MailForm();
$this->parseSettings('inc/app/siteglossary/forms/edit/settings.php');
global $cgi;
page_title(intl_get('Editing Glossary Term') . ': ' . $cgi->_key);
page_add_script('
function cms_cancel (f) {
if (arguments.length == 0) {
window.location.href = "/index/cms-app";
} else {
if (f.elements["_return"] && f.elements["_return"].value.length > 0) {
window.location.href = f.elements["_return"].value;
} else {
window.location.href = "/index/siteglossary-app";
}
}
return false;
}
');
// add cancel handler
$this->widgets['submit_button']->buttons[1]->extra = 'onclick="return cms_cancel (this.form)"';
$res = db_single('select * from siteglossary_term where word = ?', $cgi->_key);
foreach (get_object_vars($res) as $k => $v) {
$this->widgets[$k]->setValue($v);
}
}
开发者ID:vojtajina,项目名称:sitellite,代码行数:27,代码来源:index.php
示例2: SitepresenterAddForm
function SitepresenterAddForm()
{
parent::MailForm();
global $page, $cgi;
$this->parseSettings('inc/app/sitepresenter/forms/add/settings.php');
page_title(intl_get('Adding Presentation'));
loader_import('ext.phpsniff');
$sniffer = new phpSniff();
$this->_browser = $sniffer->property('browser');
// include formhelp, edit panel init, and cancel handler
page_add_script(site_prefix() . '/js/formhelp.js');
page_add_script(CMS_JS_FORMHELP_INIT);
page_onload('cms_init_edit_panels ()');
page_add_script('
function cms_cancel (f) {
if (arguments.length == 0) {
window.location.href = "/index/cms-app";
} else {
if (f.elements["_return"] && f.elements["_return"].value.length > 0) {
window.location.href = f.elements["_return"].value;
} else {
window.location.href = "/index/sitepresenter-app";
}
}
return false;
}
');
// add cancel handler
$this->widgets['submit_button']->buttons[1]->extra = 'onclick="return cms_cancel (this.form)"';
}
开发者ID:vojtajina,项目名称:sitellite,代码行数:30,代码来源:index.php
示例3: SitepresenterEditSlideForm
function SitepresenterEditSlideForm()
{
parent::MailForm();
$this->parseSettings('inc/app/sitepresenter/forms/edit/slide/settings.php');
page_add_script('
function cms_cancel (f) {
if (arguments.length == 0) {
window.location.href = "/index/cms-app";
} else {
if (f.elements["_return"] && f.elements["_return"].value.length > 0) {
window.location.href = f.elements["_return"].value;
} else {
window.location.href = "/index/sitepresenter-app";
}
}
return false;
}
');
$this->widgets['submit_button']->buttons[1]->extra = 'onclick="return cms_cancel (this.form)"';
global $cgi;
page_title(intl_get('Adding Slide to Presentation') . ': ' . db_shift('select title from sitepresenter_presentation where id = ?', $cgi->presentation));
$res = db_single('select * from sitepresenter_slide where id = ?', $cgi->id);
foreach (get_object_vars($res) as $k => $v) {
$this->widgets[$k]->setValue($v);
}
}
开发者ID:vojtajina,项目名称:sitellite,代码行数:26,代码来源:index.php
示例4: _link
function _link()
{
// display a button that pops up the boxchooser app
static $included = false;
if (!$included) {
page_add_script(site_prefix() . '/js/dialog.js');
page_add_script(loader_box('boxchooser/js', $this));
$included = true;
}
return template_simple('
<script language="javascript" type="text/javascript">
function boxchooser_{name}_handler () {
if (typeof dialogWin.returnedValue == \'object\') {
url = dialogWin.returnedValue[\'src\'];
} else {
url = dialogWin.returnedValue;
}
boxchooser_{name}_form.elements[boxchooser_{name}_element].value = unescape (url);
}
</script>
<input type="submit" onclick="boxchooser_{name}_get_file (this.form, \'{name}\'); return false" value="{intl Choose}" />
', $this);
}
开发者ID:vojtajina,项目名称:sitellite,代码行数:26,代码来源:Boxchooser.php
示例5: onSubmit
function onSubmit($vals)
{
page_add_script(site_prefix() . '/js/dialog.js');
page_add_script(loader_box('boxchooser/js', $vals));
echo '<script language="javascript" type="text/javascript">';
echo 'boxchooser_' . $vals['name'] . '_select ("' . $vals['app'] . '/' . $vals['box'];
$pre = '?';
foreach ($this->_box_settings as $k => $v) {
echo $pre . $k . '=' . urlencode($vals[$k]);
$pre = '&';
}
echo '"); window.close (); </script>';
//info ($vals);
}
开发者ID:vojtajina,项目名称:sitellite,代码行数:14,代码来源:index.php
示例6: CmsAddSitellite_filesystemForm
function CmsAddSitellite_filesystemForm()
{
parent::MailForm();
global $page, $cgi;
$this->parseSettings('inc/app/cms/forms/add/sitellite_filesystem/settings.php');
page_title(intl_get('Adding File'));
loader_import('ext.phpsniff');
$sniffer = new phpSniff();
$this->_browser = $sniffer->property('browser');
// include formhelp, edit panel init, and cancel handler
page_add_script(site_prefix() . '/js/formhelp-compressed.js');
page_add_script(CMS_JS_FORMHELP_INIT);
page_add_script('
function cms_cancel (f) {
onbeforeunload_form_submitted = true;
if (arguments.length == 0) {
window.location.href = "/index/cms-browse-action?collection=sitellite_filesystem";
} else {
if (f.elements["_return"] && f.elements["_return"].value.length > 0) {
window.location.href = f.elements["_return"].value;
} else {
window.location.href = "/index/cms-browse-action?collection=sitellite_filesystem";
}
}
return false;
}
function cms_preview_action (f) {
cms_copy_values (f);
return cms_preview (f);
}
function cms_cancel_action (f) {
cms_copy_values (f);
if (confirm (\'Are you sure you want to cancel?\')) {
return cms_cancel (f);
}
return false;
}
');
if (session_pref('form_help') == 'off') {
page_add_script('
formhelp_disable = true;
');
}
$this->widgets['sitellite_owner']->setValue(session_username());
$this->widgets['sitellite_team']->setValue(session_team());
// add cancel handler
$this->widgets['submit_button']->buttons[1]->extra = 'onclick="return cms_cancel (this.form)"';
}
开发者ID:vojtajina,项目名称:sitellite,代码行数:50,代码来源:index.php
示例7: NewsEditForm
function NewsEditForm()
{
parent::MailForm();
$this->autosave = true;
$this->parseSettings('inc/app/news/forms/edit/settings.php');
global $page, $cgi;
page_title(intl_get('Editing News Story') . ': ' . $cgi->_key);
loader_import('ext.phpsniff');
$sniffer = new phpSniff();
$this->_browser = $sniffer->property('browser');
// include formhelp, edit panel init, and cancel handler
page_add_script(site_prefix() . '/js/formhelp-compressed.js');
page_add_script(CMS_JS_FORMHELP_INIT);
page_add_script('
function cms_cancel_unlock (f, collection, key) {
onbeforeunload_form_submitted = true;
if (arguments.length == 0) {
window.location.href = "' . site_prefix() . '/index/cms-unlock-action?collection=" + collection + "&key=" + key + "&return=' . site_prefix() . '/index/cms-app";
} else {
if (f.elements[\'_return\'] && f.elements[\'_return\'].value.length > 0) {
window.location.href = "' . site_prefix() . '/index/cms-unlock-action?collection=" + collection + "&key=" + key + "&return=" + f.elements[\'_return\'].value;
} else {
window.location.href = "' . site_prefix() . '/index/cms-unlock-action?collection=" + collection + "&key=" + key + "&return=' . site_prefix() . '/index/news-app";
}
}
return false;
}
');
if (session_pref('form_help') == 'off') {
page_add_script('
formhelp_disable = true;
');
}
// add cancel handler
$this->widgets['submit_button']->buttons[0]->extra = 'onclick="onbeforeunload_form_submitted = true;"';
$this->widgets['submit_button']->buttons[1]->extra = 'onclick="return cms_cancel_unlock (this.form, \'' . $cgi->_collection . '\', \'' . $cgi->_key . '\')"';
// get copy from repository
loader_import('cms.Versioning.Rex');
$rex = new Rex($cgi->_collection);
$_document = $rex->getCurrent($cgi->_key);
// set values from repository entry
foreach (get_object_vars($_document) as $k => $v) {
if (is_object($this->widgets[$k])) {
$this->widgets[$k]->setValue($v);
}
}
}
开发者ID:vojtajina,项目名称:sitellite,代码行数:47,代码来源:index.php
示例8: SitepollCommentAddForm
function SitepollCommentAddForm()
{
parent::MailForm();
$this->parseSettings('inc/app/sitepoll/forms/comment/add/settings.php');
page_title(intl_get('Add Comment'));
if (session_valid()) {
$this->widgets['user_id']->setDefault(session_username());
}
global $cgi;
page_add_script('
function sitepoll_cancel (f) {
window.location.href = "' . site_prefix() . '/index/sitepoll-results-action/poll.' . $cgi->poll . '";
return false;
}
');
$this->widgets['submit_button']->buttons[1]->extra = 'onclick="return sitepoll_cancel (this.form)"';
}
开发者ID:vojtajina,项目名称:sitellite,代码行数:17,代码来源:index.php
示例9: rpc_init
/**
* Sets up the necessary javascript includes and such for using
* the /js/rpc.js package. See that package for more info.
*
* Usage:
*
* echo rpc_init ('javascript to handle server response here...');
*
* @param string
* @return string
* @package Misc
*/
function rpc_init($handler = 'return false', $render = false)
{
if ($render) {
$out = '<script language="javascript" type="text/javascript" src="' . site_prefix() . '/js/rpc.js"> </script>' . NEWLINE;
$out .= '<script language="javascript" type="text/javascript">' . NEWLINE;
$out .= '<!-- ' . NEWLINEx2;
$out .= 'rpc_handler = new Function ("' . str_replace(array("\n", "\r", '"'), array(' ', ' ', '\\"'), $handler) . '");' . NEWLINEx2;
$out .= '// -->' . NEWLINE . '</script>' . NEWLINE;
$out .= '<iframe id="rpc-caller" style="border: 0px none; width: 0px; height: 0px"> </iframe>';
return $out;
}
page_add_script(site_prefix() . '/js/rpc.js');
page_add_script('
rpc_handler = new Function ("' . str_replace(array("\n", "\r", '"'), array(' ', ' ', '\\"'), $handler) . '");
');
return '<iframe id="rpc-caller" style="border: 0px none; width: 0px; height: 0px"> </iframe>';
}
开发者ID:vojtajina,项目名称:sitellite,代码行数:29,代码来源:RPC.php
示例10: SiteforumPostForm
function SiteforumPostForm()
{
parent::MailForm();
page_title(intl_get('Post a Message'));
$this->parseSettings('inc/app/siteforum/forms/post/settings.php');
page_add_script('
function siteforum_preview (f) {
t = f.target;
a = f.action;
f.target = "_blank";
f.action = "' . site_prefix() . '/index/siteforum-post-preview-action";
f.submit ();
f.target = t;
f.action = a;
return false;
}
function siteforum_insert_tag (tag) {
e = document.getElementById ("siteforum-body");
if (tag == "a") {
e.value += "<a href=\\"http://\\"></a>";
} else {
e.value += "<" + tag + "></" + tag + ">";
}
return false;
}
');
global $cgi;
$this->widgets['submit_button']->buttons[1]->extra = 'onclick="return siteforum_preview (this.form)"';
$this->widgets['submit_button']->buttons[2]->extra = 'onclick="history.go (-1); return false"';
if (!empty($cgi->quote)) {
$obj = db_single('select * from siteforum_post where id = ?', $cgi->quote);
if (strpos($obj->subject, 'Re: ') !== 0) {
$obj->subject = 'Re: ' . $obj->subject;
}
$this->widgets['subject']->setValue($obj->subject);
$this->widgets['body']->setValue("<strong>" . $obj->user_id . " said:</strong>\n" . "<blockquote>" . $obj->body . "</blockquote>\n\n");
}
if (!session_admin()) {
$this->widgets['notice'] = new MF_Widget_hidden('notice');
$this->widgets['notice']->form =& $this;
$this->widgets['notice']->setValue('no');
}
}
开发者ID:vojtajina,项目名称:sitellite,代码行数:46,代码来源:index.php
示例11: DiggerCommentsEditForm
function DiggerCommentsEditForm()
{
parent::MailForm();
$this->parseSettings('inc/app/digger/forms/comments/edit/settings.php');
page_title(intl_get('Editing Comment'));
global $cgi;
$comment = db_single('select * from digger_comments where id = ?', $cgi->id);
$this->widgets['user']->setValue($comment->user);
$this->widgets['comment_date']->setValue($comment->comment_date);
$this->widgets['comments']->setValue($comment->comments);
$this->widgets['story']->setValue($comment->story);
page_add_script('
function digger_cancel (f) {
window.location.href = "' . site_prefix() . '/index/digger-comments-action/id.' . $cgi->story . '";
return false;
}
');
$this->widgets['submit_button']->buttons[1]->extra = 'onclick="return digger_cancel (this.form)"';
}
开发者ID:vojtajina,项目名称:sitellite,代码行数:19,代码来源:index.php
示例12: NewsCommentAddForm
function NewsCommentAddForm()
{
parent::MailForm();
$this->parseSettings('inc/app/news/forms/comment/add/settings.php');
page_title(intl_get('Add Comment'));
if (session_valid()) {
$this->widgets['user_id']->setDefault(session_username());
}
global $cgi;
page_add_script('
function news_cancel (f) {
window.location.href = "' . site_prefix() . '/index/news-app/story.' . $cgi->story_id . '";
return false;
}
');
$this->widgets['submit_button']->buttons[1]->extra = 'onclick="return news_cancel (this.form)"';
if (!appconf('comments_security')) {
unset($this->widgets['security_test']);
}
}
开发者ID:vojtajina,项目名称:sitellite,代码行数:20,代码来源:index.php
示例13: NewsCommentEditForm
function NewsCommentEditForm()
{
parent::MailForm();
$this->parseSettings('inc/app/news/forms/comment/edit/settings.php');
page_title(intl_get('Editing Comment'));
loader_import('news.Comment');
$c = new NewsComment();
global $cgi;
$comment = $c->get($cgi->id);
$this->widgets['subject']->setValue($comment->subject);
$this->widgets['user_id']->setValue($comment->user_id);
$this->widgets['body']->setValue($comment->body);
$this->widgets['story_id']->setValue($comment->story_id);
page_add_script('
function news_cancel (f) {
window.location.href = "' . site_prefix() . '/index/news-app/story.' . $cgi->story_id . '";
return false;
}
');
$this->widgets['submit_button']->buttons[1]->extra = 'onclick="return news_cancel (this.form)"';
}
开发者ID:vojtajina,项目名称:sitellite,代码行数:21,代码来源:index.php
示例14: SiteglossaryAddForm
function SiteglossaryAddForm()
{
parent::MailForm();
$this->parseSettings('inc/app/siteglossary/forms/add/settings.php');
page_title(intl_get('Adding Glossary Term'));
page_add_script('
function cms_cancel (f) {
if (arguments.length == 0) {
window.location.href = "/index/cms-app";
} else {
if (f.elements["_return"] && f.elements["_return"].value.length > 0) {
window.location.href = f.elements["_return"].value;
} else {
window.location.href = "/index/siteglossary-app";
}
}
return false;
}
');
// add cancel handler
$this->widgets['submit_button']->buttons[1]->extra = 'onclick="return cms_cancel (this.form)"';
}
开发者ID:vojtajina,项目名称:sitellite,代码行数:22,代码来源:index.php
示例15: XedFullscreenForm
function XedFullscreenForm()
{
parent::MailForm();
$this->parseSettings('inc/app/xed/forms/fullscreen/settings.php');
global $cgi;
page_onunload('xed_fullscreen_copy_value ()');
page_add_script('
function xed_fullscreen_copy_value (form, field) {
s = xed_get_source ("xeditor");
opener.document.getElementById ("' . $cgi->ifname . '").contentWindow.document.body.innerHTML = s;
window.close ();
}
');
page_add_style('
.content {
padding-right: 0px ! important;
padding-left: 0px ! important;
padding-top: 3px ! important;
padding-bottom: 5px ! important;
}
');
}
开发者ID:vojtajina,项目名称:sitellite,代码行数:22,代码来源:index.php
示例16: sitestreamer_flash
function sitestreamer_flash($file, $width, $height, $fg = '0x444444', $bg = '0xAAAAAA')
{
static $num = 0;
$num++;
if (@file_exists('inc/app/sitestreamer/lib/swfobject.js')) {
$image = str_replace('.flv', '.jpg', $file);
if (!@file_exists('inc/data' . $image)) {
$image = '';
}
page_add_script(site_prefix() . '/inc/app/sitestreamer/lib/swfobject.js');
return template_simple('<p align="center" class="sitestreamer-video" id="sitestreamer-video{num}"><a href="http://www.macromedia.com/go/getflashplayer">You need the Flash Player to watch this video.</a></p>
<script type="text/javascript">
var swfobj{num} = new SWFObject ("{site/prefix}/inc/app/sitestreamer/lib/player.swf", "sitestreamer-video", "{width}", "{height}", "9", "{bg}");
swfobj{num}.addParam ("allowfullscreen","true");
swfobj{num}.addParam ("flashvars", "file={site/prefix}/index/cms-filesystem-action{file}{if not empty (obj[image])}&image={site/prefix}/index/cms-filesystem-action{image}{end if}");
swfobj{num}.write ("sitestreamer-video{num}");
</script>', array('file' => $file, 'image' => $image, 'width' => $width, 'height' => $height, 'fg' => $fg, 'bg' => $bg, 'num' => $num));
}
sitestreamer_flvheader();
$height += 40;
return template_simple("<p align='center' class='sitestreamer-video'><object width='{width}' height='{height}' id='flvPlayer'>\r\n <param name='allowFullScreen' value='true'>\r\n <param name='movie' value='{site/prefix}/inc/app/sitestreamer/lib/player.swf?movie={site/prefix}/index/cms-filesystem-action{file}&fgcolor={fg}&bgcolor={bg}&volume=70'>\r\n <embed src='{site/prefix}/inc/app/sitestreamer/lib/player.swf?movie={site/prefix}/index/cms-filesystem-action{file}&fgcolor={fg}&bgcolor={bg}&volume=70' width='{width}' height='{height}' allowFullScreen='true' type='application/x-shockwave-flash'>\r\n</object></p>", array('file' => $file, 'width' => $width, 'height' => $height, 'fg' => $fg, 'bg' => $bg));
}
开发者ID:vojtajina,项目名称:sitellite,代码行数:22,代码来源:flash.php
示例17: SiteforumPostEditForm
function SiteforumPostEditForm()
{
parent::MailForm();
page_title(intl_get('Edit a Post'));
$this->parseSettings('inc/app/siteforum/forms/post/edit/settings.php');
page_add_script('
function siteforum_preview (f) {
t = f.target;
a = f.action;
f.target = "_blank";
f.action = "' . site_prefix() . '/index/siteforum-post-preview-action";
f.submit ();
f.target = t;
f.action = a;
return false;
}
function siteforum_insert_tag (tag) {
e = document.getElementById ("siteforum-body");
if (tag == "a") {
e.value += "<a href=\\"http://\\"></a>";
} else {
e.value += "<" + tag + "></" + tag + ">";
}
return false;
}
');
global $cgi;
$this->widgets['submit_button']->buttons[1]->extra = 'onclick="return siteforum_preview (this.form)"';
$this->widgets['submit_button']->buttons[2]->extra = 'onclick="history.go (-1); return false"';
loader_import('siteforum.Post');
$p = new SiteForum_Post();
$post = $p->get($cgi->id);
$this->widgets['subject']->setValue($post->subject);
$this->widgets['body']->setValue($post->body);
}
开发者ID:vojtajina,项目名称:sitellite,代码行数:38,代码来源:index.php
示例18: NewsAddForm
function NewsAddForm()
{
parent::MailForm();
global $page, $cgi;
$this->parseSettings('inc/app/news/forms/add/settings.php');
page_title(intl_get('Adding News Story'));
loader_import('ext.phpsniff');
$sniffer = new phpSniff();
$this->_browser = $sniffer->property('browser');
// include formhelp, edit panel init, and cancel handler
page_add_script(site_prefix() . '/js/formhelp-compressed.js');
page_add_script(CMS_JS_FORMHELP_INIT);
page_add_script('
function cms_cancel (f) {
onbeforeunload_form_submitted = true;
if (arguments.length == 0) {
window.location.href = "/index/cms-app";
} else {
if (f.elements["_return"] && f.elements["_return"].value.length > 0) {
window.location.href = f.elements["_return"].value;
} else {
window.location.href = "/index/news-app";
}
}
return false;
}
');
if (session_pref('form_help') == 'off') {
page_add_script('
formhelp_disable = true;
');
}
// add cancel handler
$this->widgets['submit_button']->buttons[0]->extra = 'onclick="onbeforeunload_form_submitted = true;"';
$this->widgets['submit_button']->buttons[1]->extra = 'onclick="return cms_cancel (this.form)"';
}
开发者ID:vojtajina,项目名称:sitellite,代码行数:36,代码来源:index.php
示例19: page_title
// import any object we need from the global namespace
global $page, $menu;
// box logic begins here
if ($parameters['recursive'] == 'no') {
$recur = false;
} else {
$recur = true;
}
//page_id ('sitemap');
if ($context == 'action') {
page_title(intl_get('Site Map'));
}
page_add_script(site_prefix() . '/js/jquery-1.2.3.min.js');
page_add_script(site_prefix() . '/js/jquery.cookie.js');
page_add_script(site_prefix() . '/js/jquery-treeview/jquery.treeview.min.js');
page_add_style(site_prefix() . '/js/jquery-treeview/jquery.treeview.css');
page_add_script('<script type="text/javascript">
$(function () {
$("#sitemap").treeview ({
animated: "medium",
control: "#sidetreecontrol",
persist: "location"
});
});
</script>');
page_add_style('<style type="text/css">
ul#sitemap>li>a {
font-weight: bold;
}
</style>');
echo preg_replace('/^<ul>/', '<ul id="sitemap" class="treeview-gray">', $menu->display('html', '<a href="{site/prefix}/index/{id}">{title}</a>', $recur));
开发者ID:vojtajina,项目名称:sitellite,代码行数:31,代码来源:index.php
示例20: display
/**
* Returns the display HTML for this widget. The optional
* parameter determines whether or not to automatically display the widget
* nicely, or whether to simply return the widget (for use in a template).
*
* @access public
* @param boolean $generate_html
* @return string
*
*/
function display($generate_html = 0)
{
$data = '';
$attrstr = $this->getAttrs();
$selected = explode(',', $this->data_value);
loader_import('saf.Misc.RPC');
echo rpc_init('return false');
$this->size = false;
$this->multiple = false;
if ($this->size) {
$multiple = ' size="' . $this->size . '"';
$braces = '';
if ($this->multiple) {
$multiple = ' multiple="multiple"' . $multiple;
$braces = '[]';
}
} else {
$multiple = '';
$braces = '';
}
loader_import('saf.GUI.Prompt');
page_add_script('
var cms_' . $this->name . '_form = false;
var cms_' . $this->name . '_elem = false;
var cms_' . $this->name . '_action = false;
var cms_' . $this->name . '_oldhandler;
//var rpc_handler = new Function ("if (arguments[0] == true) { if (cms_' . $this->name . '_action == \'add\') { cms_' . $this->name . '_add_item (); } else { cms_' . $this->name . '_remove_item (); } } else { if (cms_' . $this->name . '_action == \'add\') { cms_' . $this->name . '_add_alert (); } else { cms_' . $this->name . '_remove_alert (); } }");
function cms_' . $this->name . '_add_item (res) {
if (res == false) {
cms_' . $this->name . '_add_alert ();
return;
}
f = cms_' . $this->name . '_form;
words = cms_' . $this->name . '_elem;
// 2. add the selected keywords to the list
for (i = 0; i < words.length; i++) {
if (document.all) {
f.elements[\'' . $this->name . $braces . '\'].options[f.elements[\'' . $this->name . $braces . '\'].options.length + 1] = new Option ("/" + words[i], words[i], false, true);
} else {
o = document.createElement (\'option\');
o.text = words[i];
o.value = words[i];
f.elements[\'' . $this->name . $braces . '\'].add (o, null);
}
}
rpc_handler = null;
rpc_handler = cms_' . $this->name . '_oldhandler;
}
function cms_' . $this->name . '_remove_item (res) {
if (res == false) {
cms_' . $this->name . '_remove_alert ();
return;
}
f = cms_' . $this->name . '_form;
// 2. remove the selected keywords from the list
for (i = f.elements[\'' . $this->name . $braces . '\'].options.length - 1; i >= 0; i--) {
if (f.elements[\'' . $this->name . $braces . '\'].options[i].selected) {
// remove
if (document.all) {
f.elements[\'' . $this->name . $braces . '\'].options.remove (i);
} else {
f.elements[\'' . $this->name . $braces . '\'].options[i] = null;
}
break;
}
}
rpc_handler = null;
rpc_handler = cms_' . $this->name . '_oldhandler;
}
function cms_' . $this->name . '_add_alert () {
alert (\'Failed to add folder: Permission denied. Please check your server permissions and try again.\');
}
function cms_' . $this->name . '_remove_alert () {
alert (\'Failed to remove folder: Permission denied. Please check that the selected folder is empty, and that your server permissions are correct, and try again.\');
}
function cms_' . $this->name . '_add (f) {
cms_' . $this->name . '_form = f;
//.........这里部分代码省略.........
开发者ID:vojtajina,项目名称:sitellite,代码行数:101,代码来源:Folder.php
注:本文中的page_add_script函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论