Plugin Directory

Changeset 1167864


Ignore:
Timestamp:
05/26/2015 05:21:49 PM (11 years ago)
Author:
shankaranand12
Message:

version 1.2 assets folder

Location:
multi-image-widget/trunk/assets
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • multi-image-widget/trunk/assets/css/miw_admin.css

    r1163052 r1167864  
    1010.mycustom_on{display:block; position: relative;margin-bottom:15px;}
    1111.mycustom_off{display:none;}
     12
     13.miw_on{display:block; position: relative;margin-bottom:15px;}
     14.miw_off{display:none;}
     15
     16
    1217.delete{cursor:pointer;}
    1318.upload-file-container{
     
    2631    text-align: center;
    2732}
    28 .upload-thumb img.uploaded_img{width:100%;}
     33.upload-thumb img.uploaded_img{width:33%;}
    2934.upload-thumb img.delete{margin-left:90%;}
    3035.upload-thumb img{
  • multi-image-widget/trunk/assets/css/miw_frontend.css

    r1163052 r1167864  
    1717
    1818.miw-loop{
    19     cursor: pointer;
     19    list-style:none;
    2020    margin-bottom: 7px;
    2121}
  • multi-image-widget/trunk/assets/js/miw_custom.js

    r1163052 r1167864  
    66
    77    var miw_uploader;
    8     $('.upload_image_button').live("click", function(e) {
     8    var widgetid;
     9    var widgetname;
     10    var next_upload_btn;
     11
     12    $('.miw_upload_image').live("click", function(e) {
    913        e.preventDefault();
    1014        /*
    11          * This variable is used to show the other field option : like :upload lin,uploaded image and it's redirecting option.
     15         *Initialize the two variable : widgetid and widgetname
     16         *Because it is used to identify the unique field with unique widget.
    1217         */
    13         var formfieldID_current = jQuery(this).attr("name");
    14         /*
    15          *Next uploaded button field option:
    16          */
    17         var data_nextval = $(this).attr("data-nextval");
    18         /*
    19          *uplaod the current and next value to the hidden value so that we can use it once image have been uploaded.
    20          */
    21         $(".miw_current_running_value").attr("data-current",formfieldID_current);
    22         $(".miw_current_running_value").attr("data-next",data_nextval);
     18        widgetid = $(this).data('widgetid');
     19        widgetname = $(this).data('widgetname');
     20        next_upload_btn = $(this).data('next_uploadedbtn');
     21
    2322        //If the uploader object has already been created, reopen the dialog
    2423        if (miw_uploader) {
     
    2625            return;
    2726        }
     27
    2828        //Extend the wp.media object
    2929        miw_uploader = wp.media.frames.file_frame = wp.media({
     
    4242             */
    4343            var imgurl = attachment.url;
    44             var width  = attachment.width;
     44            var width = attachment.width;
    4545            var height = attachment.height;
    46            
    47            /*
    48             *Getting the current and next value.
    49             */
    50            
    51             var formfieldID_current =$(".miw_current_running_value").attr("data-current");
    52             var data_nextval        =$(".miw_current_running_value").attr("data-next");
    53        
    54         //image attribute information.
    55             jQuery("img." + formfieldID_current).attr("src", imgurl);
    56             jQuery("img." + formfieldID_current).attr("width",width);
    57             jQuery("img." + formfieldID_current).attr("height",height);
    58            
    59             jQuery("input[type=hidden]." + formfieldID_current).val(imgurl);
    60             //enable div also
    61             $(".field-options-" +formfieldID_current).removeClass("mycustom_off");
    62             $(".field-options-" +formfieldID_current).addClass("mycustom_on");
    63             /*
    64              *Update the nextval value to the :addmore: button
    65              */
    66             $(".addmore").attr("data-val",data_nextval);//alert(data_nextval);
    67            
     46            // alert(widgetid+""+widgetname+imgurl);
     47            //************* Add values to the : widget : field :**************
     48            $("img." + widgetid + "" + widgetname).attr('src', imgurl);
     49            $("input." + widgetid + "" + widgetname).val(imgurl);
     50            $("div." + widgetid + "" + widgetname).removeClass("miw_off");
     51            $("div." + widgetid + "" + widgetname).removeClass("miw_on");
     52            $(".miw_addmore").attr("data-nextbtn", next_upload_btn);
     53
     54            //************* Add values to the : widget : field :END **************
    6855        });
    6956
     
    7360    });
    7461
     62
    7563    /*
    76      *When click on the "addmore" then we will provide the new button.
     64     *When click on the Add More button.
    7765     */
    78     $(".addmore").live('click', function() { //alert("test");
    79         var click_btn = $(this).attr("data-val");//alert(click_btn);
    80         $(".upload-button-" + click_btn).removeClass("mycustom_off");
    81         $(".upload-button-" + click_btn).addClass("mycustom_on");
     66    $('.miw_addmore').live("click", function(e) {
    8267
     68        var widgetid = $(this).attr("data-widgetid");
     69        var widgetname = $(this).attr("data-nextbtn");
     70
     71        $("div.upload_btn-" + widgetid + "" + widgetname).removeClass("miw_off");
     72        $("div.upload_btn-" + widgetid + "" + widgetname).addClass("miw_on");
    8373    });
    84 
    8574    /*
    8675     *When click on the "Delete" button :complete
     
    9079
    9180        $("img." + delete_field).attr("src", "");  //first blank this image
    92         $("img." + delete_field).css("display", "none"); //hide this image
    9381        $("input." + delete_field).val(""); //blank this value
    94         $(".upload-link-"+delete_field).css("display", "none"); //hide this link and open new window link also.
    95         $(".del-"+delete_field).css("display", "none"); //disable delete button :current
     82       
    9683    });
    9784
  • multi-image-widget/trunk/assets/js/miw_frontend_custom.js

    r1163052 r1167864  
    1111        slideSpeed: 300,
    1212        paginationSpeed: 400,
    13         singleItem: true
     13        singleItem: true,
     14        autoPlay: 3000
    1415
    1516// "singleItem:true" is a shortcut for:
Note: See TracChangeset for help on using the changeset viewer.