溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

JqueryUI dialog函數的基本用法

發布時間:2020-08-06 14:56:02 來源:網絡 閱讀:620 作者:weiw123 欄目:web開發


客戶端:    

var dialog = $("#classifications").dialog({
        autoOpen: false,
        width: 800,
        position: { my: "center", at: "center", of: window },
        buttons: {
            'Save': function () {
                var formData = $("#showClassificationForm").serialize();
                $.ajax({
                    type: "POST",
                    data: formData,
                    url: '{{ add_classification_to_maunscript_path(hash_key) }}',
                    success: function(msg) {
                        $(".list-clsfi").html(msg);
                    }
                });
                $("#classifications").dialog('close');
            }
        }
    });
    $("#addClassification").on('click', function(e) {
        e.preventDefault();
        $.get('{{ list_classifications_path(hash_key) }}', function(msg) {
            dialog.dialog('open').html(msg);
        });
    });

服務器端:

   /**
     * List all classifications
     *
     * @param string $hash_key
     */
    public function listClassificationsAction($hash_key)
    {
        $manuscript = $this->getManuscriptByHashKey($hash_key);
        if (!$this->currentUser->isOwnerOfManuscript($manuscript) &&
            !$this->currentUser->canManageManuscript($manuscript)) {
                return $this->stopAndNoPermission();
            }
        $classifications = ClassificationRepository::getByHashKey($hash_key);
        return $this->renderSusyBundle('User:list_classifications.html.twig', array(
            'classifications' => $classifications,
            'hash_key' => $hash_key
        ));
    }


向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

亚洲午夜精品一区二区_中文无码日韩欧免_久久香蕉精品视频_欧美主播一区二区三区美女