select2和sheepit jquery插件不能一起工作

时间:2016-02-12 14:46:37

标签: select2

select2和sheepit没有合作。我已经尝试过选择,也选择了也没有和sheepit一起工作。

你对此有何看法?



<div id="urun_satis_formu">
    <div id="urun_satis_formu_template">
      <div class="row"> 

        <span class="col-sm-2">
        <select onChange="urunleri_hesapla(   'satis','9'   )" class="input-small  s2 " data-title="-xix-" name="stok__so_gelir_gider__nesne_id__-xix-" id="stok__so_gelir_gider__nesne_id__-xix-" >
          <option value="">...</option>
          <option  value="53" > 128-Basketbol Forma( 16 Adet) </option>
        </select>
        </span><span class="col-sm-2">
        <input  onKeyUp="urunleri_hesapla('satis','9')" type="text" class=" form-control input-small" id="stok__so_gelir_gider__miktar__-xix-" data-title=""   name="stok__so_gelir_gider__miktar__-xix-" placeholder="" value="1" size="32">
        </span><span class="col-sm-2">
        <input  onKeyUp="urunleri_hesapla('satis','9')" type="text" class=" form-control input-small" id="stok__so_gelir_gider__fiyat__-xix-" data-title=""   name="stok__so_gelir_gider__fiyat__-xix-" placeholder="" value="0" size="32">
        </span><span class="col-sm-1">
        <input  onKeyUp="urunleri_hesapla('satis','9')" type="hidden" class=" form-control input-small" id="stok__so_gelir_gider__kdv__-xix-" data-title=""   name="stok__so_gelir_gider__kdv__-xix-" placeholder="" value="0" size="32">
        <span class="stok__so_gelir_gider__kdv__-xix-"></span>%</span><span class="col-sm-1">
        <input  onKeyUp="urunleri_hesapla('satis','9')" type="hidden" class=" form-control input-small" id="stok__so_gelir_gider__urun_tutari__-xix-" data-title=""   name="stok__so_gelir_gider__urun_tutari__-xix-" placeholder="" value="0" size="32">
        <span class="stok__so_gelir_gider__urun_tutari__-xix-"></span><span class="stok__so_gelir_gider__urun_tutari__-xix-_doviz"></span></span><span class="col-sm-1">
        <input checked type="checkbox" class="uniform-false left form-control input-small" id="stok__so_gelir_gider__teslim_durumu__-xix-" data-title=""   name="stok__so_gelir_gider__teslim_durumu__-xix-" placeholder="" value="1" size="32">
        </span> <span class="btn red urun_satis_formu_remove_current"><i class="fa fa-remove icon-white"></i></span>
        <hr />
      </div>
    </div>
    <div id="urun_satis_formu_noforms_template">Ürün Seçilmedi</div>
    <div style="clear:both"></div>
    <div id="urun_satis_formu_controls">
      <div id="urun_satis_formu_add" class="btn green"><i class="fa fa-plus"></i> <span>Ürün Ekle</span></div>
      <div id="urun_satis_formu_remove_last" class="btn red"><i class="fa fa-minus"></i> <span>Sil</span></div>
      <div id="urun_satis_formu_remove_all" class="btn red"><i class="fa fa-minus"></i> <span>Hepsini Sil</span></div>
      <div id="urun_satis_formu_add_n">
        <input class="form-control input-small" id="urun_satis_formu_add_n_input" type="text" size="4" />
        <div id="urun_satis_formu_add_n_button" class="btn green"><i class="fa fa-plus"></i> <span>Ekle</span></div>
      </div>
    </div>
  </div>
&#13;
&#13;
&#13;

此致 塞尔丘克

1 个答案:

答案 0 :(得分:0)

如果select2在sheepit之前运行,则sheepit会破坏select2的结构。所以我们在sheepit之后运行select2,它运行没有问题。我们正在添加类似'no-select2'的类来选择,我们不会让select2运行 它。我们正在添加sheepit配置;

afterAdd: function(source, clone) {
            $('.no-select2').select2();
        }

并且它会运行。