本文整理汇总了PHP中DialogBox::setDialogBoxLevel方法的典型用法代码示例。如果您正苦于以下问题:PHP DialogBox::setDialogBoxLevel方法的具体用法?PHP DialogBox::setDialogBoxLevel怎么用?PHP DialogBox::setDialogBoxLevel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DialogBox
的用法示例。
在下文中一共展示了DialogBox::setDialogBoxLevel方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getAjaxEventFunctionRender
/**
* Method getAjaxEventFunctionRender
* @access protected
* @return string
* @since 1.0.35
*/
protected function getAjaxEventFunctionRender()
{
$html = "";
$loading_obj = null;
if (get_class($this) == "UploadFile") {
$loading_obj = $this->getProgressBarObject();
if ($this->isSizeLimitJsCheckActivated() && $this->getFileSizeLimit() != -1) {
$size_alert = new DialogBox(__(ERROR), __(UPLOAD_FILESIZE_LIMIT_ERROR_MSG, $this->getFileSizeLimitStr()));
$size_alert->activateCloseButton()->setWidth(500);
$size_alert->setDialogBoxLevel(rand(90000, 99999));
$html .= "var displaySizeErrorDialogBox" . get_class($this) . "_" . $this->getEventObjectName() . " = function(filename) {\n";
$html .= $size_alert->render();
$html .= "};\n";
} else {
$html .= "var displaySizeErrorDialogBox" . get_class($this) . "_" . $this->getEventObjectName() . " = null;\n";
}
if ($this->isMimeTypeJsCheckActivated() && sizeof($this->getAuthorizedMimeTypes()) > 0) {
$mime_alert = new DialogBox(__(ERROR), __(UPLOAD_MIME_TYPES_ERROR_MSG, implode(", ", $this->getAuthorizedMimeTypes())));
$mime_alert->activateCloseButton()->setWidth(500);
$mime_alert->setDialogBoxLevel(rand(90000, 99999));
$html .= "var displayMimeErrorDialogBox" . get_class($this) . "_" . $this->getEventObjectName() . " = function(filename, mime_type) {\n";
$html .= $mime_alert->render();
$html .= "};\n";
} else {
$html .= "var displayMimeErrorDialogBox" . get_class($this) . "_" . $this->getEventObjectName() . " = null;\n";
}
}
if (gettype($this->ajax_wait_message) != "object") {
$loading_img = new Picture("wsp/img/loading.gif", 32, 32);
$loading_img->setId("wspAjaxEventLoadingPic" . get_class($this) . "_" . $this->getEventObjectName());
$loading_modalbox = new DialogBox(__(LOADING), new Object($this->ajax_wait_message, "<br/>", $loading_img, $loading_obj));
$loading_modalbox->setDialogBoxLevel(rand(90000, 99999))->modal();
}
$error_alert = new DialogBox(__(ERROR), __(SUBMIT_ERROR));
$error_alert->activateCloseButton()->setWidth(500);
$error_alert->setDialogBoxLevel(rand(90000, 99999));
$error_unknow_alert = new DialogBox(__(ERROR), __(SUBMIT_UNKNOW_ERROR));
$error_unknow_alert->activateCloseButton()->setWidth(400);
$error_unknow_alert->setDialogBoxLevel(rand(90000, 99999));
$html .= "\tvar isRequestedAjaxEvent" . get_class($this) . "_" . $this->getEventObjectName() . " = false;\n";
$html .= "\tvar lastAjaxRequest" . get_class($this) . "_" . $this->getEventObjectName() . " = Array();\n";
$html .= "\tvar nbAjaxRequest" . get_class($this) . "_" . $this->getEventObjectName() . " = 0;\n";
if ($this->is_ajax_event) {
$html .= "\tvar encryptedObjectValueArray" . get_class($this) . "_" . $this->getEventObjectName() . " = Array();\n";
}
$html .= "\tcallAjax" . get_class($this) . "_" . $this->getEventObjectName() . "_event = function(callback_value, abort_last_request) {\n";
$html .= "\t\tif (isRequestedAjaxEvent" . get_class($this) . "_" . $this->getEventObjectName() . " && !abort_last_request) { return; }\n";
$html .= "\t\tisRequestedAjaxEvent" . get_class($this) . "_" . $this->getEventObjectName() . " = true;\n";
$html .= "\t\tnbAjaxRequest" . get_class($this) . "_" . $this->getEventObjectName() . "++;\n";
if (!$this->disable_ajax_wait_message) {
if (gettype($this->ajax_wait_message) == "object") {
$html .= "\t\t\$('#" . $this->ajax_wait_message->getId() . "').css('display', 'block');\n";
} else {
$html .= "\t\t" . $loading_modalbox->render() . "\n";
}
$html .= "\t\tsetTimeout(\"requestAjaxEvent" . get_class($this) . "_" . $this->getEventObjectName() . "(\\\"\" + callback_value + \"\\\", \" + abort_last_request + \");\", " . (gettype($this->ajax_wait_message) == "object" ? "1" : "1000") . ");\n";
} else {
$html .= "\t\tsetTimeout(\"requestAjaxEvent" . get_class($this) . "_" . $this->getEventObjectName() . "(\\\"\" + callback_value + \"\\\", \" + abort_last_request + \");\", (abort_last_request?(lastAjaxRequest" . get_class($this) . "_" . $this->getEventObjectName() . ".length==0?1:200):1));\n";
}
$html .= "\t};\n";
$html .= "\trequestAjaxEvent" . get_class($this) . "_" . $this->getEventObjectName() . " = function(callback_value, abort_last_request) {\n";
$html .= "\t\tnbAjaxRequest" . get_class($this) . "_" . $this->getEventObjectName() . "--;\n";
$html .= "\t\tif (abort_last_request) { for (var i=0; i < lastAjaxRequest" . get_class($this) . "_" . $this->getEventObjectName() . ".length; i++) { if (lastAjaxRequest" . get_class($this) . "_" . $this->getEventObjectName() . "[i]!=null) { lastAjaxRequest" . get_class($this) . "_" . $this->getEventObjectName() . "[i].abort(); lastAjaxRequest" . get_class($this) . "_" . $this->getEventObjectName() . "[i]=null; } } if (nbAjaxRequest" . get_class($this) . "_" . $this->getEventObjectName() . " > 0) { return; } }\n";
// encrypt formular if encrypt is active
if ($this->form_object != null) {
$html .= "\t\t" . $this->encryptObjectData($this->form_object, "isRequestedAjaxEvent" . get_class($this) . "_" . $this->getEventObjectName() . " = false;" . ($loading_modalbox == null ? "" : $loading_modalbox->close()->render()));
}
if (get_class($this) == "UploadFile") {
$html .= "var upload_status = \$('#" . $this->getId() . "').upload('";
} else {
$html .= "\t\tlastAjaxRequest" . get_class($this) . "_" . $this->getEventObjectName() . "[lastAjaxRequest" . get_class($this) . "_" . $this->getEventObjectName() . ".length] = \$.ajax({ type: '";
if ($this->form_object != null) {
$html .= $this->form_object->getMethod();
} else {
$html .= "POST";
}
$html .= "', url: '";
}
$html .= BASE_URL . LANGUAGE_URL . "/ajax/";
if ($this->form_object == null) {
$html .= $this->getPage()->getPage() . ".html";
if (PARAMS_URL != "") {
$pos = find(PARAMS_URL, "?", 0, $pos);
if ($pos > 0) {
$pos2 = strlen(PARAMS_URL);
$html .= "?" . substr(PARAMS_URL, $pos, $pos2 - $pos);
}
}
} else {
if ($this->form_object->getAction() == "") {
$html .= $this->form_object->getPageObject()->getPage() . ".html";
if (PARAMS_URL != "") {
$pos = find(PARAMS_URL, "?", 0, $pos);
if ($pos > 0) {
//.........这里部分代码省略.........
示例2: getArrayDialogBoxLevels
/**
* Method getArrayDialogBoxLevels
* @access static
* @return array
* @since 1.0.35
*/
public static function getArrayDialogBoxLevels()
{
if (isset($_GET['dialogbox_level'])) {
$page_is_init_var = $GLOBALS['__PAGE_IS_INIT__'];
$GLOBALS['__PAGE_IS_INIT__'] = false;
// create object for intern DialogBox management
$i = 1;
while ($i <= $_GET['dialogbox_level']) {
if (self::$array_dialog_indices[$i] == null) {
$dialog = new DialogBox('', '');
$dialog->setDialogBoxLevel($i);
}
$i++;
}
$GLOBALS['__PAGE_IS_INIT__'] = $page_is_init_var;
}
return self::$array_dialog_indices;
}