JqueryUIdialog函数的基本用法

客户端:    

巴彦网站制作公司哪家好,找成都创新互联公司!从网页设计、网站建设、微信开发、APP开发、成都响应式网站建设等网站项目制作,到程序开发,运营维护。成都创新互联公司自2013年起到现在10年的时间,我们拥有了丰富的建站经验和运维经验,来保证我们的工作的顺利进行。专注于网站建设就选成都创新互联公司

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
        ));
    }


文章标题:JqueryUIdialog函数的基本用法
标题来源:http://csdahua.cn/article/pgjppp.html
扫二维码与项目经理沟通

我们在微信上24小时期待你的声音

解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流