当前位置: 首页>>代码示例>>PHP>>正文


PHP HtmlPage::addJavascript方法代码示例

本文整理汇总了PHP中HtmlPage::addJavascript方法的典型用法代码示例。如果您正苦于以下问题:PHP HtmlPage::addJavascript方法的具体用法?PHP HtmlPage::addJavascript怎么用?PHP HtmlPage::addJavascript使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HtmlPage的用法示例。


在下文中一共展示了HtmlPage::addJavascript方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: function

    $page->addJavascript('
    var countErrorFiles = 0;
    var countFiles      = 0;

    $(function () {
        "use strict";
        $("#fileupload").fileupload({
            url: "../../system/file_upload.php?module=' . $getModule . '&mode=upload_files&id=' . $getId . '",
            sequentialUploads: true,
            dataType: "json",
            add: function (e, data) {
                $("#files").html("");
                countErrorFiles = 0;
                countFiles = 0;
                data.submit();
            },
            done: function (e, data) {
                $.each(data.result.files, function (index, file) {
                    if(typeof file.error !== "undefined") {
                        $("<p/>").html("<div class=\\"alert alert-danger\\"><span class=\\"glyphicon glyphicon-exclamation-sign\\"></span>"
                            + file.name + " - <strong>" + file.error + "</strong></div>").appendTo("#files");
                        countErrorFiles++;
                    } else {
                        var message = "' . $textFileUploaded . '";
                        var newMessage = message.replace("#VAR1_BOLD#", "<strong>" + file.name + "</strong>");
                        $("<p/>").html(newMessage).appendTo("#files");
                        countFiles++
                    }
                });
            },
            progressall: function (e, data) {
                var progress = parseInt(data.loaded / data.total * 100, 10);
                $("#progress .progress-bar").css(
                    "width",
                    progress + "%"
                );
            },
            stop: function (e, data) {
                if(countErrorFiles === 0 && countFiles > 0) {
                    $("<p/>").html("<div class=\\"alert alert-success\\"><span class=\\"glyphicon glyphicon-ok\\"></span>' . $textUploadSuccessful . '</div>").appendTo("#files");
                } else {
                    $("<p/>").html("<div class=\\"alert alert-danger\\"><span class=\\"glyphicon glyphicon-exclamation-sign\\"></span>' . $textUploadNotSuccessful . '</div>").appendTo("#files");
                }
            }
        }).prop("disabled", !$.support.fileInput)
            .parent().addClass($.support.fileInput ? undefined : "disabled");
    });', true);
开发者ID:martinbrylski,项目名称:admidio,代码行数:47,代码来源:file_upload.php

示例2: alert

                            checkbox.prop("checked", false);
                            if(checkbox.hasClass("memlist_leader")) {
                                $("input[type=checkbox]#member_"+userid).prop("checked", false);
                            }
                        } else {
                            checkbox.prop("checked", true);
                        }

                        alert(data);
                        return false;
                    }
                    return true;
                }
            );
        });';
    $page->addJavascript($javascriptCode, true);
    // get module menu
    $membersAssignmentMenu = $page->getMenu();
    $membersAssignmentMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png');
    if ($gCurrentUser->editUsers()) {
        $membersAssignmentMenu->addItem('menu_item_create_user', $g_root_path . '/adm_program/modules/members/members_new.php', $gL10n->get('MEM_CREATE_USER'), 'add.png');
    }
    $navbarForm = new HtmlForm('navbar_show_all_users_form', '', $page, array('type' => 'navbar', 'setFocus' => false));
    $sql = 'SELECT rol_id, rol_name, cat_name FROM ' . TBL_ROLES . ', ' . TBL_CATEGORIES . '
             WHERE rol_valid   = 1
               AND rol_visible = 1
               AND rol_cat_id  = cat_id
               AND (  cat_org_id  = ' . $gCurrentOrganization->getValue('org_id') . '
                   OR cat_org_id IS NULL )
             ORDER BY cat_sequence, rol_name';
    $navbarForm->addSelectBoxFromSql('filter_rol_id', $gL10n->get('SYS_ROLE'), $gDb, $sql, array('defaultValue' => $getFilterRoleId, 'firstEntry' => $gL10n->get('SYS_ALL')));
开发者ID:sistlind,项目名称:admidio,代码行数:31,代码来源:members_assignment.php

示例3: fread

        // Foto aus PHP-Temp-Ordner einlesen
        $user_image_data = fread(fopen($_FILES['userfile']['tmp_name'][0], 'r'), $_FILES['userfile']['size'][0]);
        // Zwischenspeichern des neuen Fotos in der Session
        $gCurrentSession->setValue('ses_binary', $user_image_data);
        $gCurrentSession->save();
    }
    //Image-Objekt löschen
    $user_image->delete();
    if ($getItemId == $gCurrentUser->getValue('inv_id')) {
        $headline = $gL10n->get('PRO_EDIT_MY_PROFILE_PICTURE');
    } else {
        $headline = $gL10n->get('PRO_EDIT_PROFILE_PIC_FROM', $inventory->getValue('FIRST_NAME'), $inventory->getValue('LAST_NAME'));
    }
    // create html page object
    $page = new HtmlPage($headline);
    $page->addJavascript('$("#btn_cancel").click(function() {
        self.location.href=\'' . $g_root_path . '/adm_program/modules/inventory/item_photo_edit.php?mode=dont_save&inv_id=' . $getItemId . '\';
    });', true);
    // show form
    $form = new HtmlForm('show_new_profile_picture_form', $g_root_path . '/adm_program/modules/inventory/item_photo_edit.php?mode=save&amp;inv_id=' . $getItemId, $page);
    $form->addCustomContent($gL10n->get('PRO_CURRENT_PICTURE'), '<img class="imageFrame" src="item_photo_show.php?inv_id=' . $getItemId . '" alt="' . $gL10n->get('PRO_CURRENT_PICTURE') . '" />');
    $form->addCustomContent($gL10n->get('PRO_NEW_PICTURE'), '<img class="imageFrame" src="item_photo_show.php?inv_id=' . $getItemId . '&new_photo=1" alt="' . $gL10n->get('PRO_NEW_PICTURE') . '" />');
    $form->addLine();
    $form->openButtonGroup();
    $form->addButton('btn_cancel', $gL10n->get('SYS_ABORT'), array('icon' => THEME_PATH . '/icons/error.png'));
    $form->addSubmitButton('btn_update', $gL10n->get('SYS_APPLY'), array('icon' => THEME_PATH . '/icons/database_in.png'));
    $form->closeButtonGroup();
    // add form to html page and show page
    $page->addHtml($form->show(false));
    $page->show();
}
开发者ID:bash-t,项目名称:admidio,代码行数:31,代码来源:item_photo_edit.php

示例4: unset

    // durch fehlerhafte Eingabe ist der User zu diesem Formular zurueckgekehrt
    // nun die vorher eingegebenen Inhalte ins Objekt schreiben
    $role->setArray($_SESSION['roles_request']);
    unset($_SESSION['roles_request']);
}
// holt eine Liste der ausgewaehlten abhaengigen Rolen
$childRoles = RoleDependency::getChildRoles($gDb, $getRoleId);
$childRoleObjects = array();
// create html page object
$page = new HtmlPage($headline);
$page->addJavascript('
    checkMaxMemberCount();
    $("#rol_assign_roles").change(function() {
        markRoleRight("rol_assign_roles", "rol_all_lists_view", true);
    });
    $("#rol_all_lists_view").change(function() {
        markRoleRight(\'rol_all_lists_view\', \'rol_assign_roles\', false);
    });
    $("#rol_max_members").change(function() {
        checkMaxMemberCount();
    });', true);
$page->addJavascript('
    // show/hide role dependencies if max count members will be changed
    function checkMaxMemberCount() {
        // Wenn eine Maximale Mitgliederzahl angeben wurde, duerfen keine Rollenabhaengigkeiten bestehen
        if($("#rol_max_members").val() > 0) {
            // Die Box zum konfigurieren der Rollenabhängig wird ausgeblendet
            $("#gb_dependencies").hide();

            // Alle Abhängigen Rollen werden markiert und auf unabhängig gesetzt
            $("#dependent_roles").val("");
开发者ID:sistlind,项目名称:admidio,代码行数:31,代码来源:roles_new.php

示例5: HtmlPage

    $gNavigation->addStartUrl(CURRENT_URL, $dates->getHeadline($getHeadline));
}
// create html page object
$page = new HtmlPage($dates->getHeadline($getHeadline));
$page->enableModal();
if ($getViewMode === 'html') {
    $datatable = true;
    $hoverRows = true;
    $classTable = 'table';
    if ($gPreferences['enable_rss'] == 1 && $gPreferences['enable_dates_module'] == 1) {
        $page->addRssFile($g_root_path . '/adm_program/modules/dates/rss_dates.php?headline=' . $getHeadline, $gL10n->get('SYS_RSS_FEED_FOR_VAR', $gCurrentOrganization->getValue('org_longname') . ' - ' . $getHeadline));
    }
    $page->addJavascript('
        $("#sel_change_view").change(function () {
            self.location.href = "dates.php?view=" + $("#sel_change_view").val() + "&mode=' . $getMode . '&headline=' . $getHeadline . '&date_from=' . $dates->getParameter('dateStartFormatAdmidio') . '&date_to=' . $dates->getParameter('dateEndFormatAdmidio') . '&cat_id=' . $getCatId . '";
        });

        $("#menu_item_print_view").click(function () {
            window.open("' . $g_root_path . '/adm_program/modules/dates/dates.php?view_mode=print&view=' . $getView . '&mode=' . $getMode . '&headline=' . $getHeadline . '&cat_id=' . $getCatId . '&date_from=' . $dates->getParameter('dateStartFormatEnglish') . '&date_to=' . $dates->getParameter('dateEndFormatEnglish') . '", "_blank");
        });', true);
    // If default view mode is set to compact we need a back navigation if one date is selected for detail view
    if ($getId > 0) {
        // add back link to module menu
        $datesMenu = $page->getMenu();
        $datesMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png');
    }
    // get module menu
    $DatesMenu = $page->getMenu();
    // Add new event
    if ($gCurrentUser->editDates() && $getId === 0) {
        $DatesMenu->addItem('admMenuItemAdd', $g_root_path . '/adm_program/modules/dates/dates_new.php?headline=' . $getHeadline, $gL10n->get('SYS_CREATE_VAR', $getHeadline), 'add.png');
    }
开发者ID:martinbrylski,项目名称:admidio,代码行数:32,代码来源:dates.php

示例6: getComments

    $page->addRssFile($g_root_path . '/adm_program/modules/guestbook/rss_guestbook.php?headline=' . $getHeadline, $gL10n->get('SYS_RSS_FEED_FOR_VAR', $gCurrentOrganization->getValue('org_longname') . ' - ' . $getHeadline));
}
$page->addJavascript('
    function getComments(commentId) {
        // RequestObjekt abschicken und Kommentar laden
        $.get("' . $g_root_path . '/adm_program/modules/guestbook/get_comments.php?cid=" + commentId + "&moderation=" + ' . $getModeration . ',
        function(data) {
            $("#comments_" + commentId).html(data);
        });
    }

    function toggleComments(commentId) {
        toggleDiv("admCommentsInvisible_" + commentId);
        toggleDiv("admCommentsVisible_" + commentId);

        if (document.getElementById("comments_" + commentId).innerHTML.length === 0) {
            getComments(commentId);
        } else {
            toggleDiv("comments_" + commentId);
        }
    }

    function toggleDiv(objectId) {
        if($("#" + objectId).is(":hidden")) {
            $("#" + objectId).show();
        } else {
            $("#" + objectId).hide();
        }
    }
');
// add headline and title of module
if ($getModeration == 1) {
开发者ID:sistlind,项目名称:admidio,代码行数:32,代码来源:guestbook.php

示例7: confirm

                    document.getElementById("mylist_configuration_form").action  = gRootPath + "/adm_program/modules/lists/mylist_function.php?lst_id=' . $getListId . '&mode=3";
                    document.getElementById("mylist_configuration_form").submit();
                }
                break;

            case "system":
                var msg_result = confirm("' . $gL10n->get('LST_WANT_CONFIGURATION_FOR_ALL_USERS') . '");
                if(msg_result)
                {
                    document.getElementById("mylist_configuration_form").action  = gRootPath + "/adm_program/modules/lists/mylist_function.php?lst_id=' . $getListId . '&mode=4";
                    document.getElementById("mylist_configuration_form").submit();
                }
                break;
        }
    }';
$page->addJavascript($javascriptCode);
$page->addJavascript('$(document).ready(function() {
    $("#sel_select_configuation").change(function() { loadList(); });
    $("#btn_show_list").click(function() { send("show"); });
    $("#btn_add_column").click(function() { addColumn(); });
    $("#btn_save").click(function() { send("save_as"); });
    $("#btn_save_changes").click(function() { send("save"); });
    $("#btn_delete").click(function() { send("delete"); });
    $("#btn_copy").click(function() { send("save_as"); });

    for(var counter = 0; counter < ' . $defaultColumnRows . '; counter++) {
        addColumn();
    }
});', true);
// get module menu
$myListMenu = $page->getMenu();
开发者ID:sistlind,项目名称:admidio,代码行数:31,代码来源:mylist.php

示例8: HtmlPage

                $memberElements[$date->getValue('dat_rol_id')] = $participants->getParticipantsArray($date->getValue('dat_rol_id'));
            }
        }
        $count++;
    }
}
// create html page object
$page = new HtmlPage($getHeadline);
if ($getViewMode === 'html' || $getViewMode === 'compact') {
    if ($gPreferences['enable_rss'] == 1 && $gPreferences['enable_dates_module'] == 1) {
        $page->addRssFile($g_root_path . '/adm_program/modules/dates/rss_dates.php?headline=' . $getHeadline, $gL10n->get('SYS_RSS_FEED_FOR_VAR', $gCurrentOrganization->getValue('org_longname') . ' - ' . $getHeadline));
    }
    $page->addJavascript('
        $("#admCalendar").change(function () {
            var calendarId = "";
            if ($("#admCalendar").selectedIndex != 0) {
                var calendarId = $("#admCalendar").val();
            }
            self.location.href = "dates.php?mode=' . $getMode . '&headline=' . $getHeadline . '&date_from=' . $dates->getParameter('dateStartFormatAdmidio') . '&date_to=' . $dates->getParameter('dateEndFormatAdmidio') . '&cat_id=" + calendarId;
        });', true);
    $page->addJavascript('
        function Datefilter() {
            var field_error = "' . $gL10n->get('ECA_FIELD_ERROR') . '";

            if (document.Formular.date_from.value == ""
            ||  document.Formular.date_to.value   == "") {
                alert(field_error);
                document.Formular.date_from.focus();
                return false;
            }
        }');
    // If default view mode is set to compact we need a back navigation if one date is selected for detail view
开发者ID:bash-t,项目名称:admidio,代码行数:32,代码来源:dates.php

示例9: unset

        if (isset($_SESSION['profile_request'][$field_name])) {
            $inventory->setValue($field->getValue('inf_name_intern'), $_SESSION['profile_request'][$field_name]);
        }
    }
    if (isset($_SESSION['profile_request']['usr_login_name'])) {
        $inventory->setArray(array('usr_login_name' => $_SESSION['profile_request']['usr_login_name']));
    }
    if (isset($_SESSION['profile_request']['reg_org_id'])) {
        $registrationOrgId = $_SESSION['profile_request']['reg_org_id'];
    }
    unset($_SESSION['profile_request']);
}
// create html page object
$page = new HtmlPage($headline);
$page->addJavascript('
    var profileJS = new profileJSClass();
    profileJS.init();', true);
// add back link to module menu
$profileEditMenu = $page->getMenu();
$profileEditMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png');
// create html form
$form = new HtmlForm('edit_item_form', $g_root_path . '/adm_program/modules/inventory/item_save.php?item_id=' . $getItemId . '&amp;new_item=' . $getNewItem, $page);
// *******************************************************************************
// Schleife ueber alle Kategorien und Felder ausser den Stammdaten
// *******************************************************************************
$category = '';
foreach ($gInventoryFields->mInventoryFields as $field) {
    // Kategorienwechsel den Kategorienheader anzeigen
    // bei schneller Registrierung duerfen nur die Pflichtfelder ausgegeben werden
    if ($category != $field->getValue('cat_name')) {
        if ($category !== '') {
开发者ID:sistlind,项目名称:admidio,代码行数:31,代码来源:item_new.php

示例10: imgrotate

    $page->addHtml('<h4 id="album-overview"><ol class="breadcrumb">
	            <li><a href="' . $g_root_path . '/adm_program/modules/photos/photos.php"></a>
	            <a href="' . $g_root_path . '/adm_program/modules/photos/photos.php">' . $gL10n->get('PHO_PHOTO_ALBUMS') . '</a></li>' . $navilink . '<li>' . $photoAlbum->getValue('pho_name') . '</li>
	        </ol></h4>');
}
$page->addHtml('</div>');
// add rss feed to announcements
if ($gPreferences['enable_rss'] == 1) {
    $page->addRssFile($g_root_path . '/adm_program/modules/photos/rss_photos.php?headline=' . $getHeadline, $gL10n->get('SYS_RSS_FEED_FOR_VAR', $gCurrentOrganization->getValue('org_longname') . ' - ' . $getHeadline));
}
if ($gCurrentUser->editPhotoRight()) {
    $page->addJavascript('
        // rotate image
        function imgrotate(img, direction) {
            $.get("' . $g_root_path . '/adm_program/modules/photos/photo_function.php", {pho_id: ' . $getPhotoId . ', photo_nr: img, job: "rotate", direction: direction}, function(data) {
                // Anhängen der Zufallszahl ist nötig um den Browsercache zu überlisten
                $("#img_"+img).attr("src", "photo_show.php?pho_id=' . $getPhotoId . '&photo_nr="+img+"&thumb=1&rand="+Math.random());
                return false;
            });
        }');
}
// integrate bootstrap ekko lightbox addon
if ($gPreferences['photo_show_mode'] == 1) {
    $page->addCssFile('adm_program/libs/lightbox/ekko-lightbox.css');
    $page->addJavascriptFile('adm_program/libs/lightbox/ekko-lightbox.js');
    $page->addJavascript('$(document).delegate("*[data-toggle=\\"lightbox\\"]", "click", function(event) { event.preventDefault(); $(this).ekkoLightbox(); });', true);
}
$page->addJavascript('
    $("body").on("hidden.bs.modal", ".modal", function () { $(this).removeData("bs.modal"); location.reload(); });
    $("#menu_item_upload_photo").attr("data-toggle", "modal");
    $("#menu_item_upload_photo").attr("data-target", "#admidio_modal");
开发者ID:sxwid,项目名称:admidio3.1_scoutversion,代码行数:31,代码来源:photos.php

示例11: profileJSClass

$page->addJavascript('
    var profileJS = new profileJSClass();
    profileJS.deleteRole_ConfirmText  = "' . $gL10n->get('ROL_MEMBERSHIP_DEL', '[rol_name]') . '";
    profileJS.deleteFRole_ConfirmText = "' . $gL10n->get('ROL_LINK_MEMBERSHIP_DEL', '[rol_name]') . '";
    profileJS.setBy_Text              = "' . $gL10n->get('SYS_SET_BY') . '";
    profileJS.usr_id                  = ' . $user->getValue('usr_id') . ';

    function showHideMembershipInformation(element) {
        id = "#" + element.attr("id") + "_Content";

        if($(id).css("display") === "none") {
            $(id).show("fast");
        } else {
            $(id).hide("fast");
        }
    }

    function callbackProfilePhoto() {
        var img_src = $("#profile_photo").attr("src");
        var timestamp = new Date().getTime();
        $("#btn_delete_photo").hide();
        $("#profile_photo").attr("src",img_src+"&"+timestamp);
    }

    function callbackRoles() {
        if(profileJS) {
            profileJS.formerRoleCount++;
            profileJS.reloadFormerRoleMemberships();
        };
    }

    function callbackFormerRoles() {
        if(profileJS) {
            profileJS.formerRoleCount--;
            if(profileJS.formerRoleCount === 0) {
                $("#profile_former_roles_box").fadeOut("slow");
            }
        };
    }

    function callbackFutureRoles() {
        if(profileJS) {
            profileJS.futureRoleCount--;
            if(profileJS.futureRoleCount === 0) {
                $("#profile_future_roles_box").fadeOut("slow");
            }
        };
    }

    function formSubmitEvent()
    {
        $(".button-membership-period-form").click(function(event) {
            var memberId  = $(this).attr("data-admidio");
            var dateStart = $("#membership_start_date_"+memberId).val();
            var dateEnd   = $("#membership_end_date_"+memberId).val();
            var action    = $("#membership_period_form_"+memberId).attr("action")+"&membership_start_date_"+memberId+"="+dateStart+"&membership_end_date_"+memberId+"="+dateEnd;

            $("#membership_period_form_"+memberId+" .form-alert").hide();

            $.ajax({
                type:    "GET",
                url:     action,
                success: function(data) {
                    if(data === "success") {
                        $("#membership_period_form_"+memberId+" .form-alert").attr("class", "alert alert-success form-alert");
                        $("#membership_period_form_"+memberId+" .form-alert").html("<span class=\\"glyphicon glyphicon-ok\\"></span><strong>' . $gL10n->get('SYS_SAVE_DATA') . '</strong>");
                        $("#membership_period_form_"+memberId+" .form-alert").fadeIn("slow");
                        $("#membership_period_form_"+memberId+" .form-alert").animate({opacity: 1.0}, 2500);
                        $("#membership_period_form_"+memberId+" .form-alert").fadeOut("slow");
                        $("#membership_period_"+memberId).animate({opacity: 1.0}, 2500);
                        $("#membership_period_"+memberId).fadeOut("slow");
                        profileJS.reloadRoleMemberships();
                        profileJS.reloadFormerRoleMemberships();
                        profileJS.reloadFutureRoleMemberships();
                    } else {
                        $("#membership_period_form_"+memberId+" .form-alert").attr("class", "alert alert-danger form-alert");
                        $("#membership_period_form_"+memberId+" .form-alert").fadeIn();
                        $("#membership_period_form_"+memberId+" .form-alert").html("<span class=\\"glyphicon glyphicon-exclamation-sign\\"></span>"+data);
                    }
                }
            });
        });
    }

    ');
开发者ID:sxwid,项目名称:admidio3.1_scoutversion,代码行数:85,代码来源:profile.php

示例12: TableCategory

// set headline
if ($getActiveRole) {
    $headline = $gL10n->get('LST_ACTIVE_ROLES');
} else {
    $headline = $gL10n->get('LST_INACTIVE_ROLES');
}
if ($getCatId > 0) {
    $category = new TableCategory($gDb, $getCatId);
    $headline .= ' - ' . $category->getValue('cat_name');
}
// Navigation of the module starts here
$gNavigation->addStartUrl(CURRENT_URL, $headline);
// create html page object
$page = new HtmlPage($headline);
if ($gPreferences['lists_hide_overview_details'] == 0) {
    $page->addJavascript('$(".collapse").collapse();', true);
}
$page->addJavascript('
    $(".panel-collapse select").change(function () {
        elementId = $(this).attr("id");
        roleId    = elementId.substr(elementId.search(/_/)+1);

        if($(this).val() === "mylist") {
            self.location.href = gRootPath + "/adm_program/modules/lists/mylist.php?rol_id=" + roleId + "&active_role=' . $getActiveRole . '";
        } else {
            self.location.href = gRootPath + "/adm_program/modules/lists/lists_show.php?mode=html&lst_id=" + $(this).val() + "&rol_id=" + roleId;
        }
    });', true);
// add headline and title of module
$page->addHtml('<div id="lists_overview">');
// get module menu
开发者ID:sistlind,项目名称:admidio,代码行数:31,代码来源:lists.php

示例13: HtmlPage

                }
            });
        });
    });
    --></script>

    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title">' . $headline . '</h4>
    </div>
    <div class="modal-body">';
} else {
    // create html page object
    $page = new HtmlPage($headline);
    $page->addJavascriptFile($g_root_path . '/adm_program/modules/profile/profile.js');
    $page->addJavascript('var profileJS = new profileJSClass();');
    // add back link to module menu
    $rolesMenu = $page->getMenu();
    $rolesMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png');
}
// show headline of module
$html .= '<form id="roles_assignment_form" action="' . $g_root_path . '/adm_program/modules/profile/roles_save.php?usr_id=' . $getUserId . '&amp;new_user=' . $getNewUser . '&amp;inline=' . $getInline . '" method="post">';
// Create table
$table = new HtmlTable('role_assignment_table');
$columnHeading = array('&nbsp;', $gL10n->get('ROL_ROLE'), $gL10n->get('SYS_DESCRIPTION'), $gL10n->get('SYS_LEADER'));
$table->addRowHeadingByArray($columnHeading);
$table->setColumnAlignByArray(array('center', 'left', 'left', 'left'));
if ($gCurrentUser->manageRoles()) {
    // Benutzer mit Rollenrechten darf ALLE Rollen zuordnen
    $sql = 'SELECT cat_id, cat_name, rol_name, rol_description, rol_id, rol_visible, rol_leader_rights,
                     mem_rol_id, mem_usr_id, mem_leader
开发者ID:sistlind,项目名称:admidio,代码行数:31,代码来源:roles.php

示例14: HtmlPage

$page = new HtmlPage($headline);
$page->addCssFile(THEME_PATH . '/css/chat.css');
$page->addJavascriptFile('adm_program/modules/messages/chat.js');
$page->addJavascript('
    // kick off chat
    var chat = new Chat();

    chat.getState();

    $(function() {
        // watch textarea for release of key press [enter]
        $("#sendie").keyup(function(e) {
            if (e.keyCode === 13) {
                var text = $(this).val().trim();
                if (text.length > 0)
                {
                    chat.send(text);
                }
                $(this).val("");
            }
        });
    });

    $(document).ready(function()
    {
        var intervalID = setInterval(chat.update, 2500);
    });

');
// add back link to module menu
$messagesChatMenu = $page->getMenu();
$messagesChatMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png');
开发者ID:martinbrylski,项目名称:admidio,代码行数:32,代码来源:messages_chat.php

示例15: unset

        $_SESSION['fields_request']['usf_hidden'] = 1;
    }
    // durch fehlerhafte Eingabe ist der User zu diesem Formular zurueckgekehrt
    // nun die vorher eingegebenen Inhalte ins Objekt schreiben
    $userField->setArray($_SESSION['fields_request']);
    unset($_SESSION['fields_request']);
}
// create html page object
$page = new HtmlPage($headline);
$page->addJavascript('
    function setValueList() {
        if ($("#usf_type").val() === "DROPDOWN" || $("#usf_type").val() === "RADIO_BUTTON") {
            $("#usf_value_list_group").show("slow");
            $("#usf_value_list").attr("required", "required");
        } else {
            $("#usf_value_list").removeAttr("required");
            $("#usf_value_list_group").hide();
        }
    }

    setValueList();
    $("#usf_type").click(function() { setValueList(); });', true);
// add back link to module menu
$profileFieldsEditMenu = $page->getMenu();
$profileFieldsEditMenu->addItem('menu_item_back', $gNavigation->getPreviousUrl(), $gL10n->get('SYS_BACK'), 'back.png');
// show form
$form = new HtmlForm('profile_fields_edit_form', $g_root_path . '/adm_program/modules/preferences/fields_function.php?usf_id=' . $getUsfId . '&amp;mode=1', $page);
$form->openGroupBox('gb_designation', $gL10n->get('SYS_DESIGNATION'));
if ($userField->getValue('usf_system') == 1) {
    $form->addInput('usf_name', $gL10n->get('SYS_NAME'), $userField->getValue('usf_name', 'database'), array('maxLength' => 100, 'property' => FIELD_DISABLED));
} else {
开发者ID:sistlind,项目名称:admidio,代码行数:31,代码来源:fields_new.php


注:本文中的HtmlPage::addJavascript方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。