2016-03-02 11 views
0

我想補充輪盤如何在輪播中添加輸入字段?

部門輸入字段這裏是我的HTML表單

<div class="tree"> 
    <ul id="carouselDiv" class="caurosel-box"> 
     <li style="width: 75%;" > 

      <flex-slider slider-id="carousel" 
       flex-slide="department in data.departments track by $index" animation="slide" 
       animation-loop="false" item-width="240" item-margin="1" 
       as-nav-for="#slider" slideshow="false" control-nav="false"> 
      <ul style="margin-top: 20px; width:100%;" > 

       <li id="sl"> 
        <input type="text" class="form-control" style="width:95%;margin-top: 25px;" id="adddepartment" name="adddepartment" placeholder="+ Add Department" value="" ng-model="department.name" ng-blur="addDepartment(department);"> 

        <label style="width:95%; text-align:left;" for="inputEmail3">DEPARTMENT</label> 
        <div class="dropdown"> 
         <button class="btn btn-default dropdown-toggle" style="width:95%;height:50px;" type="button" data-toggle="dropdown">HR 
         <span class="caret" style="margin-left:60%"></span></button> 
         <ul class="dropdown-menu"> 
          <li><a href="#">Manager</a></li> 

         </ul> 
        </div> 

        <ul style="height:200px;width:100%;margin-top: 20px;border-radius:5px;"> 
         <li style="background-color:#fff"> 
          <div style="width:225px;white;border-radius:5px; padding: 0 10px 0px 10px;"> 
           <div class="strike"> 
            <span>{{department.name}}</span> 
           </div> 
           <label class='control-label pull-left'>ROLES</label> 
           <div ng-repeat="role in department.roles track by $index"> 
            <div class="form-group"> 
             <input type="text" class="form-control grn-text-input" value="{{role.name}}" readonly/> 
            </div> 
           </div> 
          </div> 
          <div class="form-group"> 
           <input type="button" ng-click="currentDepartment(department.name)" class="btn btn-info btn-lg" data-toggle="modal" data-target="#myModal" style="width:90%;background-color:#3CC01A" id="button" name="button" value="Add Role" /> 
          </div> 
         </li> 
        </ul> 
       </li> 
      </ul> 
      </flex-slider> 
     </li> 

    </ul> 
</div> 

這裏是輸入字段:

<li style="width:25%;"> 
        <input type="text" class="form-control" style="width:95%;margin-top: 25px;" id="adddepartment" name="adddepartment" placeholder="+ Add Department" value="{{department.name}}" ng-model="department.name" ng-blur="addDepartment(department);"> 
      </li> 

我想輪盤框中添加這一領域。如何把這個輸入字段正確的方式請給我一些建議。

+0

你提的問題是非常不清楚,請提供你已經嘗試什麼的例子,你想實現 – reinder

+0

你可以發佈所產生的旋轉木馬滑塊的屏幕截圖是什麼? –

+0

這裏是屏幕截圖鏈接http://screencast.com/t/KNYKUMr1xQJ –

回答

0

我想這就是你想要的,基於「寬度」和內聯風格假設的carroussel旁邊的輸入。

<div class="tree"> 
     <ul id="carouselDiv" class="caurosel-box"> 
      <li style="width: 75%;" > 

       <flex-slider slider-id="carousel" 
        flex-slide="department in data.departments track by $index" animation="slide" 
        animation-loop="false" item-width="240" item-margin="1" 
        as-nav-for="#slider" slideshow="false" control-nav="false"> 
       <ul style="margin-top: 20px; width:100%;" > 

        <li id="sl"> 
         <input type="text" class="form-control" style="width:95%;margin-top: 25px;" id="adddepartment" name="adddepartment" placeholder="+ Add Department" value="" ng-model="department.name" ng-blur="addDepartment(department);"> 

         <label style="width:95%; text-align:left;" for="inputEmail3">DEPARTMENT</label> 
         <div class="dropdown"> 
          <button class="btn btn-default dropdown-toggle" style="width:95%;height:50px;" type="button" data-toggle="dropdown">HR 
          <span class="caret" style="margin-left:60%"></span></button> 
          <ul class="dropdown-menu"> 
           <li><a href="#">Manager</a></li> 

          </ul> 
         </div> 

         <ul style="height:200px;width:100%;margin-top: 20px;border-radius:5px;"> 
          <li style="background-color:#fff"> 
           <div style="width:225px;white;border-radius:5px; padding: 0 10px 0px 10px;"> 
            <div class="strike"> 
             <span>{{department.name}}</span> 
            </div> 
            <label class='control-label pull-left'>ROLES</label> 
            <div ng-repeat="role in department.roles track by $index"> 
             <div class="form-group"> 
              <input type="text" class="form-control grn-text-input" value="{{role.name}}" readonly/> 
             </div> 
            </div> 
           </div> 
           <div class="form-group"> 
            <input type="button" ng-click="currentDepartment(department.name)" class="btn btn-info btn-lg" data-toggle="modal" data-target="#myModal" style="width:90%;background-color:#3CC01A" id="button" name="button" value="Add Role" /> 
           </div> 
          </li> 
         </ul> 
        </li> 
       </ul> 
       </flex-slider> 
      </li> 
      <li style="width:25%;"> 
       <input type="text" class="form-control" style="width:95%;margin-top: 25px;" id="adddepartment" name="adddepartment" placeholder="+ Add Department" value="{{department.name}}" ng-model="department.name" ng-blur="addDepartment(department);"> 
      </li> 
     </ul> 
    </div> 
相關問題