html5响应式留言评论楼层回复列表模板

所属分类: html模板-表单提交    2023-09-21 01:41:25

html5响应式留言评论楼层回复列表模板 ie兼容6
 查看演示  登录后下载 温馨提示
登录会员即可享受免费下载
 我要建站

html5响应式留言评论楼层回复列表模板(共7个文件)

    • screenshot.png
    • index.html

使用方法

(function (factory) {
    if (typeof define === 'function' && define.amd) {
        // AMD. Register as an anonymous module.
        define(['jquery'], factory);
    } else if (typeof module === 'object' && module.exports) {
        // Node/CommonJS
        module.exports = function(root, jQuery) {
            if (jQuery === undefined) {
                // require('jQuery') returns a factory that requires window to
                // build a jQuery instance, we normalize how we use modules
                // that require this pattern but the window provided is a noop
                // if it's defined (how jquery works)
                if (typeof window !== 'undefined') {
                    jQuery = require('jquery');
                }
                else {
                    jQuery = require('jquery')(root);
                }
            }
            factory(jQuery);
            return jQuery;
        };
    } else {
        // Browser globals
        factory(jQuery);
    }
}(function($) {
    var Comments = {
        // Instance variables
        // ==================
        $el: null,
        commentsById: {},
        dataFetched: false,
        currentSortKey: '',
        options: {},
        events: {
            // Close dropdowns
            'click': 'closeDropdowns',
            // Paste attachments
            'paste' : 'preSavePastedAttachments',
            // Save comment on keydown
            'keydown [contenteditable]' : 'saveOnKeydown',
            // Listening changes in contenteditable fields (due to input event not working with IE)
            'focus [contenteditable]' : 'saveEditableContent',
            'keyup [contenteditable]' : 'checkEditableContentForChange',
            'paste [contenteditable]' : 'checkEditableContentForChange',
            'input [contenteditable]' : 'checkEditableContentForChange',
            'blur [contenteditable]' : 'checkEditableContentForChange',
            // Navigation
            'click .navigation li[data-sort-key]' : 'navigationElementClicked',
            'click .navigation li.title' : 'toggleNavigationDropdown',
            // Main comenting field
            'click .commenting-field.main .textarea': 'showMainCommentingField',
            'click .commenting-field.main .close' : 'hideMainCommentingField',
            // All commenting fields
            'click .commenting-field .textarea' : 'increaseTextareaHeight',
            'change .commenting-field .textarea' : 'increaseTextareaHeight textareaContentChanged',
            'click .commenting-field:not(.main) .close' : 'removeCommentingField',
            // Edit mode actions
            'click .commenting-field .send.enabled' : 'postComment',
            'click .commenting-field .update.enabled' : 'putComment',
            'click .commenting-field .delete.enabled' : 'deleteComment',
            'click .commenting-field .attachments .attachment .delete' : 'preDeleteAttachment',
            'change .commenting-field .upload.enabled input[type="file"]' : 'fileInputChanged',
            // Other actions
            'click li.comment button.upvote' : 'upvoteComment',
            'click li.comment button.delete.enabled' : 'deleteComment',
            'click li.comment .hashtag' : 'hashtagClicked',
            'click li.comment .ping' : 'pingClicked',
            // Other
            'click li.comment ul.child-comments .toggle-all': 'toggleReplies',
            'click li.comment button.reply': 'replyButtonClicked',
            'click li.comment button.edit': 'editButtonClicked',
            // Drag & dropping attachments
            'dragenter' : 'showDroppableOverlay',
            'dragenter .droppable-overlay' : 'handleDragEnter',
            'dragleave .droppable-overlay' : 'handleDragLeaveForOverlay',
            'dragenter .droppable-overlay .droppable' : 'handleDragEnter',
            'dragleave .droppable-overlay .droppable' : 'handleDragLeaveForDroppable',
            'dragover .droppable-overlay' : 'handleDragOverForOverlay',
            'drop .droppable-overlay' : 'handleDrop',
            // Prevent propagating the click event into buttons under the autocomplete dropdown
            'click .dropdown.autocomplete': 'stopPropagation',
            'mousedown .dropdown.autocomplete': 'stopPropagation',
            'touchstart .dropdown.autocomplete': 'stopPropagation',
        },
        // Default options
        // ===============
        getDefaultOptions: function() {
            return {
                // User
                profilePictureURL: '',
                currentUserIsAdmin: false,
                currentUserId: null,
                // Font awesome icon overrides
                spinnerIconURL: '',
                upvoteIconURL: '',
                replyIconURL: '',
                uploadIconURL: '',
                attachmentIconURL: '',
                noCommentsIconURL: '',
                closeIconURL: '',
                // Strings to be formatted (for example localization)
                textareaPlaceholderText: '添加一条评论',
                newestText: '最新评论',
                oldestText: '历史评论',
                popularText: '热门评论',
                attachmentsText: '附件',
                sendText: '发送',
                replyText: '回复',
                editText: '编辑',
                editedText: '已编辑',
                youText: '自己',
                saveText: '保存',
                deleteText: '删除',
                newText: '最新',
                viewAllRepliesText: '查看所有 __replyCount__ 回复',
                hideRepliesText: '隐藏回复',
                noCommentsText: '没有评论',
                noAttachmentsText: '没有附件',
                attachmentDropText: '拖拽文件到这里',
                textFormatter: function(text) {return text},
                // Functionalities
                enableReplying: true,
                enableEditing: true,
                enableUpvoting: true,
                enableDeleting: true,
                enableAttachments: false,
                enableHashtags: false,
                enablePinging: false,
                enableDeletingCommentWithReplies: false,
                enableNavigation: true,
                postCommentOnEnter: false,
                forceResponsive: false,
                readOnly: false,
                defaultNavigationSortKey: 'newest',
                // Colors
                highlightColor: '#2793e6',
                deleteButtonColor: '#C9302C',
                scrollContainer: this.$el,
                roundProfilePictures: false,
                textareaRows: 2,
                textareaRowsOnFocus: 2,
                textareaMaxRows: 5,
                maxRepliesVisible: 2,
                fieldMappings: {
                    id: 'id',
                    parent: 'parent',
                    created: 'created',
                    modified: 'modified',
                    content: 'content',
                    attachments: 'attachments',
                    pings: 'pings',
                    creator: 'creator',
                    fullname: 'fullname',
                    profilePictureURL: 'profile_picture_url',
                    isNew: 'is_new',
                    createdByAdmin: 'created_by_admin',
                    createdByCurrentUser: 'created_by_current_user',
                    upvoteCount: 'upvote_count',
                    userHasUpvoted: 'user_has_upvoted'
                },
                searchUsers: function(term, success, error) {success([])},
                getComments: function(success, error) {success([])},
                postComment: function(commentJSON, success, error) {success(commentJSON)},
                putComment: function(commentJSON, success, error) {success(commentJSON)},
                deleteComment: function(commentJSON, success, error) {success()},
                upvoteComment: function(commentJSON, success, error) {success(commentJSON)},
                validateAttachments: function(attachments, callback) {return callback(attachments)},
                hashtagClicked: function(hashtag) {},
                pingClicked: function(userId) {},
                refresh: function() {},
                timeFormatter: function(time) {return new Date(time).toLocaleDateString()}
            }
        },
        // Initialization
        // ==============
        init: function(options, el) {
            this.$el = $(el);
            this.$el.addClass('jquery-comments');
            this.undelegateEvents();
            this.delegateEvents();
            }
}

站长提示:
1. 苦力吧素材官方QQ群:950875342
2. 平台上所有素材资源,需注册登录会员方能正常下载。
3. 会员用户积极反馈网站、素材资源BUG或错误问题,每次奖励2K币
4. PHP源码类素材,如需协助安装调试,或你有二次开发需求,可联系苦力吧客服。
5. 付费素材资源,需充值后方能下载,如有任何疑问可直接联系苦力吧客服
相关资源 / 表单提交

html蓝色风格学员登录页模板

一款公司员工系统登录页模板,蓝色风格学员登录,全屏大气。
  表单提交
 3236  0

html精仿酷狗官网问题反馈表单提交模板

一款蓝色问题反馈表单模板,表单填写和结果查询可互相切换显示,带完整的表单字段验证,超实用。
  表单提交
 4484  0

html5支持重叠切换用户登录注册页模板

一款可切换的会员注册登录页模板,默认隐藏注册模块,鼠标悬停右侧蓝色面板,点击可动画显示注册表单。
  表单提交
 619  0

html5响应式黑色主题视频背景表单提交模板

基于Bootstrap的黑色主题视频背景html模板,共包含6个HTML页面,用于会员登录、会员注册、重设倒计时、密码修改、404页面和联系人表单页面。右侧有一个弹出的通知电子邮件和滑入滑出主菜单。
  表单提交
 4210  0

评论数(0) 回复有机会获得K币 用户协议

^_^ 还没有人评论,快来抢个沙发!
😀
  • 😀
  • 😊
  • 😂
  • 😍
  • 😑
  • 😷
  • 😵
  • 😛
  • 😣
  • 😱
  • 😋
  • 😎
  • 😵
  • 😕
  • 😶
  • 😚
  • 😜
  • 😭
发表评论