Plugin Directory

Changeset 1079595


Ignore:
Timestamp:
01/31/2015 02:57:22 PM (11 years ago)
Author:
think201
Message:

Issues Fixing

Location:
clients
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • clients/tags/1.0.1/assets/js/ct-admin.js

    r1079578 r1079595  
    1 window.$=jQuery.noConflict();var CTForm={settings:{formObj:null},post:function(a){return CTForm.settings.formObj=$(a),0==Validator.check(CTForm.settings.formObj)?!1:void $.ajax({url:ajaxurl,type:"post",data:CTForm.settings.formObj.serialize(),success:function(b){1==b.status?($(".ct_success_msg p").html(b.msg),$(".ct_success_msg").fadeIn(1e3).siblings(".ct-msg").hide(),$(a)[0].reset()):($(".ct_error_msg p").html(b.msg),$(".ct_error_msg").fadeIn(1e3).siblings(".ct-msg").hide())},error:function(){$(".ct_error_msg p").html(data.msg),$(".ct_error_msg").fadeIn(1e3).siblings(".ct-msg").hide()}})}},Upload={init:function(){var a;$("#upload_logo").click(function(b){return b.preventDefault(),a?void a.open():(a=wp.media.frames.file_frame=wp.media({title:"Choose Client's Logo",button:{text:"Choose Logo"},multiple:!1}),a.on("select",function(){attachment=a.state().get("selection").first().toJSON(),$("#logo").val(attachment.url)}),void a.open())})}},Validator={init:function(){},check:function(a){return a.validator("checkform",a)},set:function(a){$(a+" input").validator({events:"blur change"})}},CTCreateShortCode={settings:{shortcodeHolder:$("#shortcode-holder"),formObj:null},post:function(a){return CTCreateShortCode.settings.formObj=$(a),0==Validator.check(CTCreateShortCode.settings.formObj)?!1:void $.ajax({url:ajaxurl,type:"post",data:CTCreateShortCode.settings.formObj.serialize(),success:function(a){1==a.status?($(".ct_success_msg p").html(a.msg),$(".ct_success_msg").fadeIn(1e3).siblings(".ct-msg").hide(),CTCreateShortCode.settings.shortcodeHolder.html(a.shortcode)):($(".ct_error_msg p").html(a.msg),$(".ct_error_msg").fadeIn(1e3).siblings(".ct-msg").hide())},error:function(){$(".ct_error_msg p").html(data.msg),$(".ct_error_msg").fadeIn(1e3).siblings(".ct-msg").hide()}})}};$(function(){Upload.init(),Validator.set("#ct_add_form")});
     1window.$=jQuery.noConflict();var CTForm={settings:{formObj:null},post:function(a,b){return CTForm.settings.formObj=$(a),0==Validator.check(CTForm.settings.formObj)?!1:void $.ajax({url:ajaxurl,type:"post",data:CTForm.settings.formObj.serialize(),success:function(c){1==c.status?($(".ct_success_msg p").html(c.msg),$(".ct_success_msg").fadeIn(1e3).siblings(".ct-msg").hide(),b||$(a)[0].reset()):($(".ct_error_msg p").html(c.msg),$(".ct_error_msg").fadeIn(1e3).siblings(".ct-msg").hide())},error:function(){$(".ct_error_msg p").html(data.msg),$(".ct_error_msg").fadeIn(1e3).siblings(".ct-msg").hide()}})}},Upload={init:function(){var a;$("#upload_logo").click(function(b){return b.preventDefault(),a?void a.open():(a=wp.media.frames.file_frame=wp.media({title:"Choose Client's Logo",button:{text:"Choose Logo"},multiple:!1}),a.on("select",function(){attachment=a.state().get("selection").first().toJSON(),$("#logo").val(attachment.url)}),void a.open())})}},Validator={init:function(){},check:function(a){return a.validator("checkform",a)},set:function(a){$(a+" input").validator({events:"blur change"})}},CTCreateShortCode={settings:{shortcodeHolder:$("#shortcode-holder"),formObj:null},post:function(a){return CTCreateShortCode.settings.formObj=$(a),0==Validator.check(CTCreateShortCode.settings.formObj)?!1:void $.ajax({url:ajaxurl,type:"post",data:CTCreateShortCode.settings.formObj.serialize(),success:function(a){1==a.status?($(".ct_success_msg p").html(a.msg),$(".ct_success_msg").fadeIn(1e3).siblings(".ct-msg").hide(),CTCreateShortCode.settings.shortcodeHolder.html(a.shortcode)):($(".ct_error_msg p").html(a.msg),$(".ct_error_msg").fadeIn(1e3).siblings(".ct-msg").hide())},error:function(){$(".ct_error_msg p").html(data.msg),$(".ct_error_msg").fadeIn(1e3).siblings(".ct-msg").hide()}})}};$(function(){Upload.init(),Validator.set("#ct_add_form")});
  • clients/tags/1.0.1/includes/post-requests.php

    r1079578 r1079595  
    4848        $Data['description']        = isset($_POST['description']) ? $_POST['description'] : '';   
    4949
    50         $Data['url']                = isset($_POST['url']) ? $_POST['url'] : '';       
     50        $Data['url']                = isset($_POST['url']) ? $_POST['url'] : '#';       
    5151        $Data['logo']               = isset($_POST['logo']) ? $_POST['logo'] : '';
    5252        $Data['description']        = isset($_POST['description']) ? $_POST['description'] : '';       
  • clients/tags/1.0.1/js/ct-admin.js

    r1079578 r1079595  
    99  },
    1010
    11   post: function(FormId)
     11  post: function(FormId, isUpdate)
    1212  {   
    1313    CTForm.settings.formObj = $(FormId);
     
    2828          $('.ct_success_msg p').html(data.msg);
    2929          $('.ct_success_msg').fadeIn(1000).siblings('.ct-msg').hide();
    30           $(FormId)[0].reset();
     30         
     31          if(!isUpdate)
     32          {
     33            $(FormId)[0].reset(); 
     34          }
     35         
    3136        }
    3237        else
  • clients/tags/1.0.1/pages/admin-add-new.php

    r1079578 r1079595  
    7373                </table>
    7474                <p class="submit">     
    75                     <button onClick="CTForm.post('#ct_add_form')" class="button button-primary" type="button">Add Client</button>
     75                    <button onClick="CTForm.post('#ct_add_form', false)" class="button button-primary" type="button">Add Client</button>
    7676                </p>
    7777            </form>
  • clients/tags/1.0.1/pages/admin-edit-client.php

    r1079578 r1079595  
    9696                        </td>
    9797                        <td>
    98                                 <input type="checkbox" name="isfeatured" id="isfeatured" value="1">Is Featured?<br>
     98                                <input type="checkbox" name="isfeatured" id="isfeatured" value="1" <?php checked($Client->isfeatured, true, true); ?>>Is Featured?<br>
    9999                        </td>
    100100                    </tr>                   
    101101                </table>
    102102                <p class="submit">     
    103                 <button onClick="CTForm.post('#ct_add_form')" class="button button-primary" type="button">Update Client</button>
     103                <button onClick="CTForm.post('#ct_add_form', true)" class="button button-primary" type="button">Update Client</button>
    104104                </p>
    105105            </form>
  • clients/tags/1.0.1/templates/ct-lists.php

    r1079578 r1079595  
     1<?php
     2
     3$Config = shortcode_atts(
     4    array(
     5        'numcols' => CT_SHRT_NUMCOLUMNS,
     6        'class' => '',
     7        'showlogo' => true
     8        ), $Config);
     9?>
    110
    211<ul class="clients-list-holder">
  • clients/trunk/assets/js/ct-admin.js

    r1079578 r1079595  
    1 window.$=jQuery.noConflict();var CTForm={settings:{formObj:null},post:function(a){return CTForm.settings.formObj=$(a),0==Validator.check(CTForm.settings.formObj)?!1:void $.ajax({url:ajaxurl,type:"post",data:CTForm.settings.formObj.serialize(),success:function(b){1==b.status?($(".ct_success_msg p").html(b.msg),$(".ct_success_msg").fadeIn(1e3).siblings(".ct-msg").hide(),$(a)[0].reset()):($(".ct_error_msg p").html(b.msg),$(".ct_error_msg").fadeIn(1e3).siblings(".ct-msg").hide())},error:function(){$(".ct_error_msg p").html(data.msg),$(".ct_error_msg").fadeIn(1e3).siblings(".ct-msg").hide()}})}},Upload={init:function(){var a;$("#upload_logo").click(function(b){return b.preventDefault(),a?void a.open():(a=wp.media.frames.file_frame=wp.media({title:"Choose Client's Logo",button:{text:"Choose Logo"},multiple:!1}),a.on("select",function(){attachment=a.state().get("selection").first().toJSON(),$("#logo").val(attachment.url)}),void a.open())})}},Validator={init:function(){},check:function(a){return a.validator("checkform",a)},set:function(a){$(a+" input").validator({events:"blur change"})}},CTCreateShortCode={settings:{shortcodeHolder:$("#shortcode-holder"),formObj:null},post:function(a){return CTCreateShortCode.settings.formObj=$(a),0==Validator.check(CTCreateShortCode.settings.formObj)?!1:void $.ajax({url:ajaxurl,type:"post",data:CTCreateShortCode.settings.formObj.serialize(),success:function(a){1==a.status?($(".ct_success_msg p").html(a.msg),$(".ct_success_msg").fadeIn(1e3).siblings(".ct-msg").hide(),CTCreateShortCode.settings.shortcodeHolder.html(a.shortcode)):($(".ct_error_msg p").html(a.msg),$(".ct_error_msg").fadeIn(1e3).siblings(".ct-msg").hide())},error:function(){$(".ct_error_msg p").html(data.msg),$(".ct_error_msg").fadeIn(1e3).siblings(".ct-msg").hide()}})}};$(function(){Upload.init(),Validator.set("#ct_add_form")});
     1window.$=jQuery.noConflict();var CTForm={settings:{formObj:null},post:function(a,b){return CTForm.settings.formObj=$(a),0==Validator.check(CTForm.settings.formObj)?!1:void $.ajax({url:ajaxurl,type:"post",data:CTForm.settings.formObj.serialize(),success:function(c){1==c.status?($(".ct_success_msg p").html(c.msg),$(".ct_success_msg").fadeIn(1e3).siblings(".ct-msg").hide(),b||$(a)[0].reset()):($(".ct_error_msg p").html(c.msg),$(".ct_error_msg").fadeIn(1e3).siblings(".ct-msg").hide())},error:function(){$(".ct_error_msg p").html(data.msg),$(".ct_error_msg").fadeIn(1e3).siblings(".ct-msg").hide()}})}},Upload={init:function(){var a;$("#upload_logo").click(function(b){return b.preventDefault(),a?void a.open():(a=wp.media.frames.file_frame=wp.media({title:"Choose Client's Logo",button:{text:"Choose Logo"},multiple:!1}),a.on("select",function(){attachment=a.state().get("selection").first().toJSON(),$("#logo").val(attachment.url)}),void a.open())})}},Validator={init:function(){},check:function(a){return a.validator("checkform",a)},set:function(a){$(a+" input").validator({events:"blur change"})}},CTCreateShortCode={settings:{shortcodeHolder:$("#shortcode-holder"),formObj:null},post:function(a){return CTCreateShortCode.settings.formObj=$(a),0==Validator.check(CTCreateShortCode.settings.formObj)?!1:void $.ajax({url:ajaxurl,type:"post",data:CTCreateShortCode.settings.formObj.serialize(),success:function(a){1==a.status?($(".ct_success_msg p").html(a.msg),$(".ct_success_msg").fadeIn(1e3).siblings(".ct-msg").hide(),CTCreateShortCode.settings.shortcodeHolder.html(a.shortcode)):($(".ct_error_msg p").html(a.msg),$(".ct_error_msg").fadeIn(1e3).siblings(".ct-msg").hide())},error:function(){$(".ct_error_msg p").html(data.msg),$(".ct_error_msg").fadeIn(1e3).siblings(".ct-msg").hide()}})}};$(function(){Upload.init(),Validator.set("#ct_add_form")});
  • clients/trunk/includes/post-requests.php

    r1079578 r1079595  
    4848        $Data['description']        = isset($_POST['description']) ? $_POST['description'] : '';   
    4949
    50         $Data['url']                = isset($_POST['url']) ? $_POST['url'] : '';       
     50        $Data['url']                = isset($_POST['url']) ? $_POST['url'] : '#';       
    5151        $Data['logo']               = isset($_POST['logo']) ? $_POST['logo'] : '';
    5252        $Data['description']        = isset($_POST['description']) ? $_POST['description'] : '';       
  • clients/trunk/js/ct-admin.js

    r1079578 r1079595  
    99  },
    1010
    11   post: function(FormId)
     11  post: function(FormId, isUpdate)
    1212  {   
    1313    CTForm.settings.formObj = $(FormId);
     
    2828          $('.ct_success_msg p').html(data.msg);
    2929          $('.ct_success_msg').fadeIn(1000).siblings('.ct-msg').hide();
    30           $(FormId)[0].reset();
     30         
     31          if(!isUpdate)
     32          {
     33            $(FormId)[0].reset(); 
     34          }
     35         
    3136        }
    3237        else
  • clients/trunk/pages/admin-add-new.php

    r1079578 r1079595  
    7373                </table>
    7474                <p class="submit">     
    75                     <button onClick="CTForm.post('#ct_add_form')" class="button button-primary" type="button">Add Client</button>
     75                    <button onClick="CTForm.post('#ct_add_form', false)" class="button button-primary" type="button">Add Client</button>
    7676                </p>
    7777            </form>
  • clients/trunk/pages/admin-edit-client.php

    r1079578 r1079595  
    9696                        </td>
    9797                        <td>
    98                                 <input type="checkbox" name="isfeatured" id="isfeatured" value="1">Is Featured?<br>
     98                                <input type="checkbox" name="isfeatured" id="isfeatured" value="1" <?php checked($Client->isfeatured, true, true); ?>>Is Featured?<br>
    9999                        </td>
    100100                    </tr>                   
    101101                </table>
    102102                <p class="submit">     
    103                 <button onClick="CTForm.post('#ct_add_form')" class="button button-primary" type="button">Update Client</button>
     103                <button onClick="CTForm.post('#ct_add_form', true)" class="button button-primary" type="button">Update Client</button>
    104104                </p>
    105105            </form>
  • clients/trunk/templates/ct-lists.php

    r1079578 r1079595  
     1<?php
     2
     3$Config = shortcode_atts(
     4    array(
     5        'numcols' => CT_SHRT_NUMCOLUMNS,
     6        'class' => '',
     7        'showlogo' => true
     8        ), $Config);
     9?>
    110
    211<ul class="clients-list-holder">
Note: See TracChangeset for help on using the changeset viewer.