duanbishai5271 2013-08-08 14:23
浏览 44

创建一个jquery ajax图像管理器

I want to create a button on imperavi's redactor, that will display uploaded files (only photos) in a modal, that i previously uploaded, and i will allow the user, to organize this photos, order their order and organize them in folders, and create folders. And when the user select the photo, the tag is inserted in the text field (redactor). I rely want a place to begin, or a already existing solution, my knowledge with php is big but my jquery and ajax is very small
I don't want to display the computer folder, i want to display the images int the database Sorry for the bad English. Where do i begin?

edit 1: I manged to add the button

if (typeof RedactorPlugins === 'undefined') var RedactorPlugins = {};

RedactorPlugins.myPlugin = {

    init: function() {

        this.addBtn('myMethod', 'Add Image', function(obj) {
            obj.myMethod();
        });

    },

    myMethod: function()
    {
        // callback (optional)
        var callback = $.proxy(function()
        {
           return 1;

        }, this);

        var modal = String() +
                    '<div id="redactor_modal_content">' +
                        '<div class="modal-body">' +
                            '<p>One fine body...</p>' +
                        '</div>' +
                        '<div id="redactor_modal_footer">' +
                            '<a href="javascript:void(null);" class="redactor_modal_btn redactor_btn_modal_close">Close</a>' +
                            '<a href="javascript:void(null);" class="redactor_modal_btn" id="redactor_upload_btn">Save changes</a>' +
                        '</div>' +
                    '</div>';


        // 500 it is the width of the window in pixels

        // or call a modal with a code
        this.modalInit('<h3>Modal header</h3>', modal, 500, callback);

        // call a modal from element with ID #mymodal
        //this.modalInit('<h3>Modal header</h3>', '#mymodal', 500, callback);

    }
}
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 下图接收小电路,谁知道原理
    • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
    • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
    • ¥15 手机接入宽带网线,如何释放宽带全部速度
    • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
    • ¥15 ETLCloud 处理json多层级问题
    • ¥15 matlab中使用gurobi时报错
    • ¥15 这个主板怎么能扩出一两个sata口
    • ¥15 不是,这到底错哪儿了😭
    • ¥15 2020长安杯与连接网探